2023-12-06 00:55:19 You mean it sets bits in a cell? 2023-12-06 00:56:45 I'd call a word that sets bits in a cell |! and one that clears bits in a cell &! (or ~&! depending on polarity). 2023-12-06 00:57:55 But I like symbols. :-) 2023-12-06 01:46:08 well, it's more specific than that 2023-12-06 01:46:42 it sets a specific field, not general purpose 2023-12-06 01:47:43 and as for | and &, i've been tempted to use those, but it feels a bit too c-ish 2023-12-06 01:51:37 Oh, the bits to act on are specified in some other way? 2023-12-06 02:08:39 let me revise my example. variable file-mode : >owner! file-mode dup @ rot or swap ! ; or something like that 2023-12-06 05:05:01 You know, I'd never thought about how difficult it might be to bring the grid back online after a widesprerad power outage. I assume they have some ability to disconnect sections of the grid, but it's probably not incredibly fine-grained. You have no idea when you start to fire up the power how many switches out there are on and how many are off. 2023-12-06 05:05:42 All those big rotating machines are intended to be running continuously. Trying to start them all up at once would be "interesting," to say the least, and starting just one might expose it to more load than it could service. 2023-12-06 05:05:48 So I bet it's quite a juggle. 2023-12-06 05:06:12 Obviously they know how to do it, but I figure it takes more planning that I'd ever thought about. 2023-12-06 05:16:14 ah, I see. A subset of the power stations in a grid are 'black start' plants. They can turn themselves on using backup power sources. And they can then power up other plants in the network. And yeah - they can disconnect the cities and towns and stuff from the transmission line networks needed for that. 2023-12-06 05:16:38 So they switch everyone out, fire up the black start paths, fire up the other plants, and then brings the loads back into the network. 2023-12-06 05:16:44 black start plants 2023-12-06 05:17:56 Hydroelectric plants are often used for black starts, because they don't have to spin up their generator rotors - the water will do that. They only need a small amount of electricity to run their monitoring and control equipment during startup. 2023-12-06 05:20:08 Another thing most people don't think about is that all of the generators connected in parallel in a section of the grid have to be phase matched. It wouldn't do for them to try to drive out-of-phase voltages onto the grid. Once they're all running they are controlled to stay in phase, but that's another thing that's tricky during a full startup. 2023-12-06 05:24:42 Wow - initial load on a system when it's first brought back online can be 8-10 times its normal average. Every air conditioner, every refrigerator, every water heater, etc. - they all want to run at the same time. And every induction motor out there will start drawing its inrush current. 2023-12-06 05:24:55 It can be half an hour before the demand starts to come back down toward normal. 2023-12-06 09:14:31 https://old.reddit.com/r/Forth/comments/1876qx7/the_siren_call_of_forth/ 2023-12-06 14:06:10 Gee. I wasn't expecting the first sentence of something called "The Siren Call of Forth" to be "I quite Forth a few months ago." 2023-12-06 14:06:30 That's not very "siren-ly." 2023-12-06 14:07:37 I guess there's just a difference between loving a tool and love the creations of a tool. 2023-12-06 14:07:50 s/love/loving/ 2023-12-06 14:10:21 s/quite/quit/ 2023-12-06 14:23:46 Heh 2023-12-06 14:29:27 sounds like a song to lure forthfarers to be stackwrecked 2023-12-06 14:44:48 Yeah, I can make sense of it (as a title). I can imagine someone being lured to Forth because it's so simple and easy to learn but then later becoming jaded to it simply because it expects you to do more or less all of your coding yourself - you just don't find "libraries" like in C, Python, etc. 2023-12-06 14:45:15 I use Python quite a lot, and it's precisely because that huge availability of packages usually makes it easy to "quickly get something done." 2023-12-06 14:45:57 My own attraction to Forth, though, has nothing to do with what I can do with it. I just love the language itself. 2023-12-06 14:46:16 And what it "represents" in terms of dealing simply with computer systems. 2023-12-06 14:46:55 I see it as similar to loving my wife for her rather than for her cooking or her income or whatever. 2023-12-06 14:47:30 It's what Forth inately *is* that draws me to it. 2023-12-06 15:02:24 I don't think the point is that it's missing libraries, I think the point is that when forth meets the outside world (which isn't so simple) it feels insufficient 2023-12-06 15:03:01 I can't name one forth usb stack other than the one in open firmware 2023-12-06 15:03:34 shit is complicated, forth can't cope when compared to something else. I think that's the point of that article 2023-12-06 15:12:15 KipIngram: Well, keep in mind that the problem of determining equality with 0 is undecidable in most cases. 2023-12-06 15:14:23 It's worse when you want to deal with algebras of functions (e.g. matrices) and have to step carefully around a whole swathe of "zeroes". 2023-12-06 15:15:54 Wheels way more general than just the one-dimensional incarnation. They give a general method for inverting 2023-12-06 15:16:55 without exceptions. 2023-12-06 15:18:22 KipIngram: BTW, did you ever get pointed to the Cosy (http://cosy.com/) system? It's supposedly an APL+Forth marriage that's been around for a while. 2023-12-06 15:34:26 Oh, no, I hadn't seen that one. We talked about uiua (or something like that) here a while back, though. I'll look into Cosy. 2023-12-06 16:25:55 Probably nothing special, but I wanted some way to "promote"(overload?) existing words to work on variables. This is the result: https://0x0.st/H3sg.forth 2023-12-06 18:53:57 congratulations, KipIngram . your stupid 1/0 story is on youtube now 2023-12-06 18:54:25 Really? I have no idea where my daughter saw it. YouTube link? 2023-12-06 18:55:18 It feels like one of those things that may be a recurring folklore meme. 2023-12-06 18:56:08 https://youtu.be/WI_qPBQhJSM 2023-12-06 18:56:20 and if it's not that then maybe the I is an l 2023-12-06 18:56:56 pretty spooky that youtube has decided to recommend me this video 2023-12-06 18:58:46 That reddit post he quotes is the one my daughter pasted into our chat. 2023-12-06 18:59:13 he doesn't really get into the "world issues" though - he just shares his "favorite way of showing 1/0 is undefined." 2023-12-06 18:59:25 i didn't actually watch it 2023-12-06 18:59:37 I didn't watch it all. 2023-12-06 18:59:58 honestly i don't care. the "world issues" answer is to get your kids out of public indoctrination camps 2023-12-06 19:00:27 Yeah - not bad advice. 2023-12-06 19:00:49 No longer an issue for me to wrestle with, though; my youngest started college this year. 2023-12-06 19:01:46 I'm about five years away from "no kids in college, no mortgage." :-) 2023-12-06 19:02:42 then you can finally have your midlife crisis, buy a boat and a ferarri and start gambling 2023-12-06 19:03:10 :-) No Ferarri for me - I'm happy with my turbocharged Cayman S. 2023-12-06 19:03:31 My one major "indulgence" I've allowed myself over the years. 2023-12-06 19:04:52 No one expects that car - stock Cayman S's are peppy but nothing particularly special. With that turbo in there, though, it's happy to play with 911's and so on. 2023-12-06 19:05:23 It doesn't kick in until 35-40 mph or so, but then it feels like it's going to jump out from under you. 2023-12-06 19:07:08 Gambling has never held much lure for me. I know too much about probability or something. 2023-12-06 19:07:50 I've been intrigued by blackjack counting methods, but these days they defend pretty well against that. 2023-12-06 19:08:29 Learned their lesson when those MIT kids burned them down. 2023-12-06 19:09:08 The math behind it is still interesting, though. 2023-12-06 19:09:41 I have a thing for CAR and CDR 2023-12-06 19:10:16 You mean the LISP terms? 2023-12-06 19:10:16 ugh, i do not. 2023-12-06 19:10:43 I'm kind of interested in Lisp internals, but not really interested in serious Lisp programming. 2023-12-06 19:10:55 i tried to get into lisp, i was prepared to look past the parentheses, and then they started throwing this car, cdr, cdddr, caddr bullshit at me and at that point i had to say no 2023-12-06 19:11:28 especially when i tried to look up what the terms originally meant, and it seems nobody even really knows 2023-12-06 19:11:34 ^ Sounds like you may dislike it more than I do, but it's not terribly appealing to me either. 2023-12-06 19:11:52 It just has to do with the two fields in a list node, doesn't it? 2023-12-06 19:12:04 Gambling is fun, but it feels like.. a short-term investment? I remember reading Ben Graham's The Intelligent Investor where he recommended a small fund for bets. That doesn't seem unreasonable. 2023-12-06 19:12:28 Yeah, if you enjoy it then some sensible way to put safe limits on yourself would be wise. 2023-12-06 19:12:34 gambling is entertainment, it's not an investment 2023-12-06 19:12:37 or you nurse your drink during the poker game while the others drown their sorrows 2023-12-06 19:12:41 Some people just enjoy the social activity aspect of it. 2023-12-06 19:12:50 And maybe the rush when you do win. 2023-12-06 19:12:52 zelgomer: thrig: I believe a lot of lisps should have FIRST and REST 2023-12-06 19:12:59 But yeah, I also think of it as entertainment. 2023-12-06 19:13:12 Along with SECOND, THIRD, FOURTH, not sure how far it goes. 2023-12-06 19:13:53 I thought Lisp was based on basic two-field cells; basically a data field and a 'next' pointer field. 2023-12-06 19:14:13 user51: exactly. when fundamental primitives of your language are so antequated that nobody really agrees on why they were originally named the way they were, then it's time to choose new names that make sense 2023-12-06 19:14:20 KipIngram: Not sure if this is a good implementation, but it's written in Forth so why not https://github.com/schani/forthlisp 2023-12-06 19:14:26 LISP is a CONS job!! 2023-12-06 19:14:36 :-) 2023-12-06 19:14:52 thrig: :D What's a TANT job then? 2023-12-06 19:14:57 Lisp lists are binary trees 2023-12-06 19:15:01 (cons 'car 'cdr) 2023-12-06 19:15:14 I think serious Lisps have a lot of optimization applied; it's really the "basic architecture" I find interesting. 2023-12-06 19:15:30 I got the impression once that it could approach Forth in implementation simplicity. 2023-12-06 19:16:08 forth and lisp were dueling it out for smallest sector size 2023-12-06 19:19:40 and in the end forth won. not because it was smaller, but because lisp is gay 2023-12-06 19:20:32 zelgomer: I've got five daughters, all of whom went through the public education system. Theree of them have turned out "quite sensible." Of the other two, one swallowed the "environment" part of the message and one the "racial / gender identity" part of the message, but otherwise seem to be pretty sensible too. All in all I feel lucky enough. 2023-12-06 19:20:50 As in it could have been a lot worse. 2023-12-06 19:21:07 tfti 2023-12-06 19:23:15 Well, my point is just that public education isn't a "guarantee' of brainwashing, but I still know what you mean and you're not wrong. 2023-12-06 19:24:16 Plus it helps that we don't live in an "ultra-liberal" part of the country. 2023-12-06 19:25:09 I will probably regret asking but what does performance tend to be for lisp compared to forth or C? 2023-12-06 19:25:40 depends on the LISP. SBCL is pretty good, and CLISP pretty bad 2023-12-06 19:25:47 Lisp is so different; I wouldn't be exactly sure how to compare them. 2023-12-06 19:28:02 I usually think of Forth as "30% C speed" on straightforward implementations of common things. 2023-12-06 19:28:28 Assuming you don't use any assembly to optimize the Forth. 2023-12-06 19:29:28 SBCL compiles down to asm, and you can pull out the guard rails if you want 2023-12-06 19:29:29 Questions like that get blurry. E.g., Python is "slow," but if you have a number crunching app that spends 99.999% of its time in numpy, then really you're running C. 2023-12-06 19:30:05 So Python can look almost as good as C on certain numerical problems. 2023-12-06 19:37:42 i worked at a company where they thought that 2023-12-06 19:37:57 as far as i know, they're still battling with performance and memory problems in their python apps 2023-12-06 19:46:21 Well, it would totally depend on the app. 2023-12-06 19:50:42 the problem i see with languages like python is that they're usually wielded by people who don't know what to do about it when it doesn't meet performance specs 2023-12-06 19:51:33 buy more cloud compute! 2023-12-06 19:52:10 getting straight to coding without a deep understanding of the dirty hex is like eating your desert before your vegitables 2023-12-06 19:53:02 people usually aren't asking about numpy etc when they want to know python performance 2023-12-06 19:53:18 I've heard 50x or so as the ratio of vanilla python to C 2023-12-06 19:54:13 i've worked with people who looked at me incredulously when i started dumping raw memory in gdb, and thought i had just performed some kind of miracle when i actually found the problem staring at pages of hex. those are the sorts of people who i see tend to make python their go-to lang 2023-12-06 19:54:13 and I agree with 30% for those rare forths that optimize to machine code 2023-12-06 19:55:11 I love python but most of what I use it for would still be fine I'd it was 500x alower 2023-12-06 19:56:38 zelgomer: what were you solving like that? I at least like the TUI with gdb 2023-12-06 19:57:02 it was a use-after-free iirc 2023-12-06 19:58:20 at that company we used LD_PRELOAD to interpose malloc and free and inject some bookkeeping to help with those sorts of bugs 2023-12-06 19:59:39 s/bookkeeping/bread crumbs/ is probably a better word there. obviously libc still did all the bookkeeping 2023-12-06 20:02:49 meh 2023-12-06 20:02:52 python is my go-to language 2023-12-06 20:03:07 99% of what I write is perfectly fine in Python 2023-12-06 20:03:21 quite a lot of what's left needs to be C, and the rest assembler 2023-12-06 20:04:13 if you're comfortable in assembler then obviously you're not the sort of python user i'm talking about 2023-12-06 20:04:15 the ctypes stuff in Python is pretty slick imo 2023-12-06 21:03:34 zelgomer: I could not agree with you more about "coding without planning." 2023-12-06 21:04:26 MrMobius: Yes, I've actually measured Python / C / Forth on some simple loops, and the Python was like 1% of C speed. 2023-12-06 21:15:30 The test was just a loop that decremented a value down from some huge number to zero. 2023-12-06 21:16:09 some benchmark I did revealed that node js leaked memory in a tight loop 2023-12-06 21:17:36 Ouch. 2023-12-06 21:18:16 It seems like it should be impossible for any kind of sane design to do that. 2023-12-06 21:19:07 https://thrig.me/tmp/my-seventh-node-script.png 2023-12-06 22:38:36 Oh, ok. 2023-12-06 22:39:16 So there is a call in there that does who knows what. I thought you meant a loop that was clearly local and didn't go do potentially odd things with memory. Like the decrement a value loop I mentioned. 2023-12-06 22:39:47 If something like that leaked memory it would imply a bug in the virtual machine engine itself. 2023-12-06 22:40:35 But there's no telling what all sending to stdout gets up to. 2023-12-06 22:40:53 or looping like that never let the GC run 2023-12-06 22:41:07 (anyways they eventually fixed it) 2023-12-06 22:57:27 If it was just because GC wasn't allowed to run that wouldn't actually be a leak. 2023-12-06 22:58:39 it ran out of memory somehow and the OS took it out back and shot it 2023-12-06 23:04:49 :-) Yeah, if GC was blocked then it might have been releasing RAM fine, but not get any back. 2023-12-06 23:11:58 You know, when I format an ssd with "nvme format /dev/nvme0," it waits 10 seconds for me to change my mind before starting the format. It prints a warning about data loss, and tells me that if I use the -f or --force option it will suppress the warning. 2023-12-06 23:12:20 But - that just doesn't work. If I try it either way it throws an error and does nothing. 2023-12-06 23:13:52 look in the code and see what they have it doing?