2023-12-06 03:14:31 https://old.reddit.com/r/Forth/comments/1876qx7/the_siren_call_of_forth/ 2023-12-06 08: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 08:06:30 That's not very "siren-ly." 2023-12-06 08:07:37 I guess there's just a difference between loving a tool and love the creations of a tool. 2023-12-06 08:07:50 s/love/loving/ 2023-12-06 08:10:21 s/quite/quit/ 2023-12-06 08:23:46 Heh 2023-12-06 08:29:27 sounds like a song to lure forthfarers to be stackwrecked 2023-12-06 08: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 08: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 08: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 08:46:16 And what it "represents" in terms of dealing simply with computer systems. 2023-12-06 08: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 08:47:30 It's what Forth inately *is* that draws me to it. 2023-12-06 09: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 09:03:01 I can't name one forth usb stack other than the one in open firmware 2023-12-06 09: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 09:12:15 KipIngram: Well, keep in mind that the problem of determining equality with 0 is undecidable in most cases. 2023-12-06 09: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 09:15:54 Wheels way more general than just the one-dimensional incarnation. They give a general method for inverting 2023-12-06 09:16:55 without exceptions. 2023-12-06 09: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 09: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 10: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 12:53:57 congratulations, KipIngram . your stupid 1/0 story is on youtube now 2023-12-06 12:54:25 Really? I have no idea where my daughter saw it. YouTube link? 2023-12-06 12:55:18 It feels like one of those things that may be a recurring folklore meme. 2023-12-06 12:56:08 https://youtu.be/WI_qPBQhJSM 2023-12-06 12:56:20 and if it's not that then maybe the I is an l 2023-12-06 12:56:56 pretty spooky that youtube has decided to recommend me this video 2023-12-06 12:58:46 That reddit post he quotes is the one my daughter pasted into our chat. 2023-12-06 12: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 12:59:25 i didn't actually watch it 2023-12-06 12:59:37 I didn't watch it all. 2023-12-06 12:59:58 honestly i don't care. the "world issues" answer is to get your kids out of public indoctrination camps 2023-12-06 13:00:27 Yeah - not bad advice. 2023-12-06 13:00:49 No longer an issue for me to wrestle with, though; my youngest started college this year. 2023-12-06 13:01:46 I'm about five years away from "no kids in college, no mortgage." :-) 2023-12-06 13:02:42 then you can finally have your midlife crisis, buy a boat and a ferarri and start gambling 2023-12-06 13:03:10 :-) No Ferarri for me - I'm happy with my turbocharged Cayman S. 2023-12-06 13:03:31 My one major "indulgence" I've allowed myself over the years. 2023-12-06 13: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 13: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 13:07:08 Gambling has never held much lure for me. I know too much about probability or something. 2023-12-06 13:07:50 I've been intrigued by blackjack counting methods, but these days they defend pretty well against that. 2023-12-06 13:08:29 Learned their lesson when those MIT kids burned them down. 2023-12-06 13:09:08 The math behind it is still interesting, though. 2023-12-06 13:09:41 I have a thing for CAR and CDR 2023-12-06 13:10:16 You mean the LISP terms? 2023-12-06 13:10:16 ugh, i do not. 2023-12-06 13:10:43 I'm kind of interested in Lisp internals, but not really interested in serious Lisp programming. 2023-12-06 13: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 13:11:28 especially when i tried to look up what the terms originally meant, and it seems nobody even really knows 2023-12-06 13:11:34 ^ Sounds like you may dislike it more than I do, but it's not terribly appealing to me either. 2023-12-06 13:11:52 It just has to do with the two fields in a list node, doesn't it? 2023-12-06 13: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 13:12:28 Yeah, if you enjoy it then some sensible way to put safe limits on yourself would be wise. 2023-12-06 13:12:34 gambling is entertainment, it's not an investment 2023-12-06 13:12:37 or you nurse your drink during the poker game while the others drown their sorrows 2023-12-06 13:12:41 Some people just enjoy the social activity aspect of it. 2023-12-06 13:12:50 And maybe the rush when you do win. 2023-12-06 13:12:52 zelgomer: thrig: I believe a lot of lisps should have FIRST and REST 2023-12-06 13:12:59 But yeah, I also think of it as entertainment. 2023-12-06 13:13:12 Along with SECOND, THIRD, FOURTH, not sure how far it goes. 2023-12-06 13:13:53 I thought Lisp was based on basic two-field cells; basically a data field and a 'next' pointer field. 2023-12-06 13: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 13: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 13:14:26 LISP is a CONS job!! 2023-12-06 13:14:36 :-) 2023-12-06 13:14:52 thrig: :D What's a TANT job then? 2023-12-06 13:14:57 Lisp lists are binary trees 2023-12-06 13:15:01 (cons 'car 'cdr) 2023-12-06 13:15:14 I think serious Lisps have a lot of optimization applied; it's really the "basic architecture" I find interesting. 2023-12-06 13:15:30 I got the impression once that it could approach Forth in implementation simplicity. 2023-12-06 13:16:08 forth and lisp were dueling it out for smallest sector size 2023-12-06 13:19:40 and in the end forth won. not because it was smaller, but because lisp is gay 2023-12-06 13: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 13:20:50 As in it could have been a lot worse. 2023-12-06 13:21:07 tfti 2023-12-06 13: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 13:24:16 Plus it helps that we don't live in an "ultra-liberal" part of the country. 2023-12-06 13:25:09 I will probably regret asking but what does performance tend to be for lisp compared to forth or C? 2023-12-06 13:25:40 depends on the LISP. SBCL is pretty good, and CLISP pretty bad 2023-12-06 13:25:47 Lisp is so different; I wouldn't be exactly sure how to compare them. 2023-12-06 13:28:02 I usually think of Forth as "30% C speed" on straightforward implementations of common things. 2023-12-06 13:28:28 Assuming you don't use any assembly to optimize the Forth. 2023-12-06 13:29:28 SBCL compiles down to asm, and you can pull out the guard rails if you want 2023-12-06 13: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 13:30:05 So Python can look almost as good as C on certain numerical problems. 2023-12-06 13:37:42 i worked at a company where they thought that 2023-12-06 13:37:57 as far as i know, they're still battling with performance and memory problems in their python apps 2023-12-06 13:46:21 Well, it would totally depend on the app. 2023-12-06 13: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 13:51:33 buy more cloud compute! 2023-12-06 13: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 13:53:02 people usually aren't asking about numpy etc when they want to know python performance 2023-12-06 13:53:18 I've heard 50x or so as the ratio of vanilla python to C 2023-12-06 13: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 13:54:13 and I agree with 30% for those rare forths that optimize to machine code 2023-12-06 13: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 13:56:38 zelgomer: what were you solving like that? I at least like the TUI with gdb 2023-12-06 13:57:02 it was a use-after-free iirc 2023-12-06 13: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 13:59:39 s/bookkeeping/bread crumbs/ is probably a better word there. obviously libc still did all the bookkeeping 2023-12-06 14:02:49 meh 2023-12-06 14:02:52 python is my go-to language 2023-12-06 14:03:07 99% of what I write is perfectly fine in Python 2023-12-06 14:03:21 quite a lot of what's left needs to be C, and the rest assembler 2023-12-06 14: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 14:04:15 the ctypes stuff in Python is pretty slick imo 2023-12-06 15:03:34 zelgomer: I could not agree with you more about "coding without planning." 2023-12-06 15: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 15:15:30 The test was just a loop that decremented a value down from some huge number to zero. 2023-12-06 15:16:09 some benchmark I did revealed that node js leaked memory in a tight loop 2023-12-06 15:17:36 Ouch. 2023-12-06 15:18:16 It seems like it should be impossible for any kind of sane design to do that. 2023-12-06 15:19:07 https://thrig.me/tmp/my-seventh-node-script.png 2023-12-06 16:38:36 Oh, ok. 2023-12-06 16: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 16:39:47 If something like that leaked memory it would imply a bug in the virtual machine engine itself. 2023-12-06 16:40:35 But there's no telling what all sending to stdout gets up to. 2023-12-06 16:40:53 or looping like that never let the GC run 2023-12-06 16:41:07 (anyways they eventually fixed it) 2023-12-06 16:57:27 If it was just because GC wasn't allowed to run that wouldn't actually be a leak. 2023-12-06 16:58:39 it ran out of memory somehow and the OS took it out back and shot it 2023-12-06 17:04:49 :-) Yeah, if GC was blocked then it might have been releasing RAM fine, but not get any back. 2023-12-06 17: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 17:12:20 But - that just doesn't work. If I try it either way it throws an error and does nothing. 2023-12-06 17:13:52 look in the code and see what they have it doing? 2023-12-06 18:28:46 I suppose I could chase the code down, but I don't have it handy. 2023-12-06 18:28:56 It's easier to just endure the 10 second wait. 2023-12-06 18:29:16 It takes a minute or two to format the drive anyway, so it doesn't really change the experience significantly. 2023-12-06 19:59:33 Neat. I finally got around to plugging that CMOS camera I got last month into my computer. I already had the software installed. I was expectin a fight, because I had no root password set when I installed the GUI package, and I figured it would have failed to install the udev rules. 2023-12-06 20:00:10 But - it fired right up. I don't have it on the telescope yet, so no images, but it picked up light and went from dark to light when I uncapped the camera and so on. 2023-12-06 20:00:45 I like it when things just work out of the box. 2023-12-06 20:01:41 The USB handheld controller I ordered didn't work - I had to send that back. Now I've ordered a USB/serial converter cable to try with my existing hhc. 2023-12-06 20:03:48 And I did get a notebook holder tray bolted onto the scope. So, couple of steps closer. :-)