2023-11-23 04:08:26 I think this year I'm going to do sed + forth so I can make the input easier to parse with forth 2023-11-23 04:08:34 For Advent of Code 2023 2023-11-23 04:10:34 Just makes it a bit more fun because forth is pretty good at crunching data if it's in the right format 2023-11-23 05:14:29 Word of the day: pad 2023-11-23 05:27:33 'pad' ( -- c-addr ) core-ext "pad" 2023-11-23 05:27:40 C-ADDR is the address of a transient region that can be used as 2023-11-23 05:27:43 temporary data storage. At least 84 characters of space is available. 2023-11-23 05:28:31 The exercise is to write a couple of snippets using pad. :) 2023-11-23 05:39:10 That doesn't sound too different from HERE 2023-11-23 05:39:21 I think you'll be lucky to get one snippet 2023-11-23 05:42:55 It's OK, LLM will help me. 2023-11-23 05:42:58 <3 2023-11-23 05:43:41 : PROMPT CR ." What is your name? " ; 2023-11-23 05:43:46 : GET PAD 1+ 80 ACCEPT PAD C! ; 2023-11-23 05:43:50 : REPLY CR ." Hello, " PAD COUNT TYPE ; 2023-11-23 05:43:54 : TEST PROMPT GET REPLY ; 2023-11-23 05:43:58 TEST 2023-11-23 05:44:24 I think one year I used PAD in advent of code because it was just there and convenient 2023-11-23 05:44:50 PAD is sort of like a 'string register' in Forth, it probably seems extremely archaic today because of how volatile it is 2023-11-23 05:45:21 But it was useful in early memory limited forths, no buffer needs to be reserved 2023-11-23 05:45:54 Anyway, there's your snippet, that program is a typical early program for teaching languages like BASIC that have better string support 2023-11-23 05:48:27 \o/ 2023-11-23 05:49:08 Don't know if you saw logs olle but I suggested M* M*/ and M/ as words of the day yesterday 2023-11-23 05:49:18 Oh! Sorry, missed that. 2023-11-23 05:49:28 They're an important three words, good to learn 2023-11-23 05:49:39 veltas: Is that matrix operations? 2023-11-23 05:49:40 Not actually all standard anymore but it's easy to define them with standard words 2023-11-23 05:49:44 'm*' ( n1 n2 -- d ) core "m-star" ok 2023-11-23 05:49:49 Sparse doc in gforth 2023-11-23 05:49:59 They're mixed precision arithmetic 2023-11-23 05:50:34 M* is basically cell * cell -> double-cell, M*/ is double-cell * cell / cell -> double-cell, and M/ is double-cell / cell -> cell 2023-11-23 05:51:29 M* and M/ are typically one instruction on most arch's, i.e. x86 where they are equivalent to IMUL and IDIV 2023-11-23 05:51:48 We can talk about those tomorrow anyway 2023-11-23 05:51:53 Today is PAD day 2023-11-23 05:52:11 :)) 2023-11-23 05:52:26 Do you know PAD is clasically implemented as : PAD HERE x + ; where x is some small number? 2023-11-23 05:52:37 So PAD gets corrupted when you add to the dictionary in any way 2023-11-23 05:52:51 Damn 2023-11-23 05:52:53 Good info 2023-11-23 05:53:04 here #170 + aligned ; ok 2023-11-23 05:53:08 that's gforth def 2023-11-23 05:53:42 The standard talks about it being 'transient' and defines that somewhere 2023-11-23 05:54:22 This definition based on HERE allows it to not actually take up room in the dictionary, so tiny memory systems don't have any reservation for PAD in the way if they're not relying on it 2023-11-23 05:58:18 Hm 2023-11-23 07:25:18 I need a plugin to jekyll blog engine that supports forth syntax highlight 2023-11-23 07:25:31 Wonder if there's some simple JS that can do that 2023-11-23 07:41:41 I would guess it's not hard to write a simple forth syntax highlight 2023-11-23 07:41:49 I would just do it manually 2023-11-23 07:41:56 Or have no highlight 2023-11-23 07:42:05 I don't think Forth really lends to highlighting that well generally 2023-11-23 07:44:23 Perhaps not 2023-11-23 07:44:37 Some basic stuff for strings and numbers might be nice 2023-11-23 07:45:09 I personally think Forth looks best as just bold black on white, with Courier style font 2023-11-23 07:45:15 Nice big letters 2023-11-23 07:45:22 But I'm biased BECAUSE I WRITE FORTH LIKE THIS 2023-11-23 07:46:30 Hehe 2023-11-23 08:55:24 don't you mean I THISLIKE FORTH WRITE 2023-11-23 08:56:49 many modern forth have ditched the caps '(likewise lisp) 2023-11-23 08:58:24 I only do it because it feels more retro 2023-11-23 08:58:41 And also the standards don't assume lowercase / case-insensitivity 2023-11-23 08:59:07 on the subject of syntax highlighting - last time i delved into forth i lost a lot of brain cycles on trying to adhere to naming conventions so that i could write vim syntax patterns. one of the changes i'm making this time around is to just embrace monocolor 2023-11-23 08:59:54 syntax highlighting is entirely unnecessary if anything it distracts 2023-11-23 09:00:31 it's more in line with the "DIY" spirit, anyway. if i had to build forth from scratch on a desert island, i'm not going to have colors 2023-11-23 09:00:58 invisiFORTH? :P 2023-11-23 09:01:33 black on black spares writing to video memory 2023-11-23 09:02:30 Syntax highlight is very helpful to detect typos in core lib words/functions 2023-11-23 09:04:59 not with color disabled at the terminal level 2023-11-23 09:05:29 +1 for syntax highlighting 2023-11-23 09:05:38 especially when it shows a syntax error 2023-11-23 09:06:47 -1 for rubbing the backside of a unicorn all over the terminal and making the text difficult to read 2023-11-23 09:11:39 Thankfully, one can choose 2023-11-23 09:13:18 sometimes not, I've heard horror stories about modern IDE that make it darned difficult to nix colors 2023-11-23 09:13:31 Don't use that IDE? 2023-11-23 09:14:21 zelgomer: Yeah I absolutely agree with you re syntax highlighting, monocolor is the way to go 2023-11-23 09:14:43 Isn't everyone using their own block editor to edit their own Forth code :D 2023-11-23 09:15:04 MrMobius: I agree for most languages but for Forth I just think the lack of a formal lexer syntax makes it more trouble than it's worth, and syntax errors are usually 'okay' in forths 2023-11-23 09:15:53 The only place syntax highlighting can work in Forth is in LOCATE on code that's literally been run through the actual forth in question and has an opportunity to say exactly how it parsed it 2023-11-23 09:16:01 And even then it only works so well 2023-11-23 09:16:18 Well by 'work' I mean perfectly without misinterpreting 2023-11-23 09:16:47 But I understand if people prefer a compromise 2023-11-23 09:24:27 that's exactly the problem i ran into. it's impossible to colorize forth without executing it. so i tried to bake syntactic hints into my word names. words ending with : were parsing words, words that ended in " parsed literal strings, words surrounded by [] were immediate parsing eords, those ending in ; terminate compilation, etc. 2023-11-23 09:24:51 thrig: The syntax highlighting in visual studio code by default is like that, unicorn vomit, I spent quite a while configuring it when I demo'd it just to make it less noisy 2023-11-23 09:25:11 Like rainbow parentheses comes with it as a default.... why!?! Not every language is lisp 2023-11-23 09:25:17 the end result was that my vocabulary was full of weirdly named words with crazy characters and it still didn't colorize every case right 2023-11-23 09:25:29 user51: pad actually isn't that different from here, except that it's usually "further along" in RAM, so that the VERY NEXT THING you do that consumes dictionary memory won't overwrite pad. It will, however, MOVE pad. But if you store something at pad and "remember" the address, then it's likely to still be there evey after you've defined a small word or something like that. 2023-11-23 09:25:41 Whereas if you put it at HERE it would get immediately overwritten. 2023-11-23 09:26:12 The other issue with HERE is the WORD buffer goes there somewhere as well 2023-11-23 09:26:17 pad is usually just HERE + 2023-11-23 09:26:33 thrig: you should give vim a try sometimes. let me know if you need a link 2023-11-23 09:26:39 Yes, in some systems HERE gets used whether you define anything new or not. 2023-11-23 09:26:43 I moved from vim to vi 2023-11-23 09:26:43 Sometimes it's positioned very close to HERE, so using that space pretty much guarantees it will get corrupted by input loop 2023-11-23 09:27:13 I'm a vimmer 2023-11-23 09:27:37 I actually use vim at my day job and quite proficiently 2023-11-23 09:30:53 I do embedded C work and use vim/git for programming and version control, and then use whatever horrid IDE I need for the actual programming / configuring 2023-11-23 09:31:26 Yeah, I use vim for all my editing too. 2023-11-23 09:32:12 thrig: for any particular reason? 2023-11-23 09:32:52 When I say programming the second time I mean flashing 2023-11-23 09:33:11 aren't there laws against that? 2023-11-23 09:33:19 vim is slow to startup and the cursor motions are a bit sluggish and on RHEL I had to compile a custom vim to undo the wacky vendorisms, bloat in general 2023-11-23 09:34:20 (vi also has a bunch of bloat) 2023-11-23 09:34:26 :-) 2023-11-23 09:35:41 ed? 2023-11-23 09:35:49 fucking bloated too man 2023-11-23 09:35:57 interesting. my vim is generally fast. it feels a little "sluggish" when i hit esc and then o to open a new line, but i eventually realized that was because it saw o as a possible controo sequence prefix and was waiting for the next char to decide what to do 2023-11-23 09:36:10 ed lacks the nifty filters that ex added, and a few other things 2023-11-23 09:36:31 but I can use ed if need be 2023-11-23 09:38:00 zelgomer: On a lot of systems vim has been configured to wait a split second after seeing before it checks for the next key. 2023-11-23 09:38:10 ed is good for editing commit messages and quick and dirty operations from terminal 2023-11-23 09:38:16 It's to let it tell the differenece between a naked escape and the first byte of an escape sequence. 2023-11-23 09:38:17 apropos, if i use vim to open a giant script-generated c file then it does stall for a minute or two trying to syntax highlight 2023-11-23 09:38:20 It's adjustable. 2023-11-23 09:38:39 It can make ESC seem a little sluggish. 2023-11-23 09:38:43 zelgomer: vim is really slow to start on some distros, I think it's a bug with X or something 2023-11-23 09:38:52 I blame the maintainer for that distro 2023-11-23 09:38:58 KipIngram: i think that's what i said 2023-11-23 09:39:01 It's been find on the distros I've used. 2023-11-23 09:39:07 Oh, I'm sorry. 2023-11-23 09:39:34 Responded early I guess. 2023-11-23 09:39:50 Still getting the first cup of coffee down. 2023-11-23 09:40:11 I can't do more than one cup of coffee 2023-11-23 09:40:26 Oh, I can drink a lot of coffee. 2023-11-23 09:40:46 ACTION chuckles at what zelgomer said about flashing earlier 2023-11-23 09:41:08 veltas: DISPLAY= vim :) 2023-11-23 09:41:12 Yeah that was good. 2023-11-23 09:41:35 zelgomer: What's that for? 2023-11-23 09:41:56 minute or two would have me throwing the computer out. 30 milliseconds was the "too slow" vim startup, last I benched it 2023-11-23 09:42:29 oh, and forever having to turn off new crap they were adding 2023-11-23 09:42:39 Yeah the 'new crap' is distros 2023-11-23 09:42:47 Mainline vim doesn't enable that if you've got a .vimrc 2023-11-23 09:42:51 With anything in it at all 2023-11-23 09:43:02 I can't blame you though 2023-11-23 09:43:12 It is really annoying tracking down what distros enable 2023-11-23 09:44:04 veltas: if X is the problem then unset DOSPLAY so vim can't connect to it 2023-11-23 09:45:07 I think that didn't work when I tried it 2023-11-23 09:45:27 thrig's issue is different, he wants under 30ms startup so I don't know what is needed for that 2023-11-23 09:45:39 Probably not possible in general 2023-11-23 09:45:47 vi starts really quick. and so does emacsclient 2023-11-23 09:45:49 Without different editor or really stripped down build 2023-11-23 09:46:06 I am surprised, in my experience emacsclient is about as fast as vim to start 2023-11-23 09:46:12 But YMMV 2023-11-23 09:46:32 I don't doubt vi starts that fast, not a lot going on in that 2023-11-23 09:47:11 Personally my tolerance for startup is probably up to about 200ms before I really notice, or 500ms before it's annoying 2023-11-23 09:47:35 mine is an order of magnitude lower 2023-11-23 09:48:12 Probably learned from that Pentium 4 machine I was stuck on for about a decade 2023-11-23 09:48:19 Was slow when it was new, just got worse and worse 2023-11-23 09:48:37 there's a name for that. Officially they say it's 400 ms. 2023-11-23 09:48:46 Well it's obviously subjective 2023-11-23 09:48:47 starts with a D. 2023-11-23 09:48:59 Yeah, but I guess they did high sample count measurements. 2023-11-23 09:49:07 "on average" it's 400 ms. 2023-11-23 09:49:23 Was this for websites or something? 2023-11-23 09:49:34 Nah, it was a thing way back in the early days. 2023-11-23 09:49:38 probably I was spoiled by the apple 2e https://danluu.com/input-lag/ 2023-11-23 09:49:41 I saw it on Halt And Catch Fire. 2023-11-23 09:49:43 With the web because it's on internet, people are used to a certain latency strongly indicating that the page will never load at all 2023-11-23 09:50:08 It was from hitting Enter to getting a response to a command. 2023-11-23 09:50:15 Like on old systems like DOS. 2023-11-23 09:50:26 Depends what you're doing 2023-11-23 09:50:34 Doherty Threshold. 2023-11-23 09:50:43 This is why we have loading bars, so people see activity before they are wondering why it's so slow 2023-11-23 09:50:52 https://lawsofux.com/doherty-threshold/ 2023-11-23 09:51:36 Coolest thing on Halt and Catch Fire was when they dunked a motherboard in minteral oil so they could overclock the phooey out of it. 2023-11-23 09:51:40 400ms on a musical instrument would be hilariously terrible 2023-11-23 09:51:44 mineral 2023-11-23 09:51:50 Oh yeah, for sure. 2023-11-23 09:51:55 I'm assuming vim's startup is just from loading and running the startup scripts, and programming syntax scripts 2023-11-23 09:52:06 thrig: 400ms on a musical instrument would be fine for turning on 2023-11-23 09:52:07 The 400 ms wasn't for every keystroke - that would bug the hell out of you key by key. 2023-11-23 09:52:08 Not for playing 2023-11-23 09:52:12 it was for a "command" response. 2023-11-23 09:53:01 Context matters, I am very sensitive to delays, I probably wouldn't cope playing a musical instrument with 10ms delay 2023-11-23 09:53:59 I think any musician would get f***ed up by that 2023-11-23 09:54:47 if it were modulus the beat you could maybe play a note ahead? 2023-11-23 09:55:04 No clue 2023-11-23 09:55:59 Do you use a CRT? 2023-11-23 09:56:16 nope 2023-11-23 09:56:38 They have nice low latency 2023-11-23 09:56:51 And X-Rays and volume 2023-11-23 09:56:58 I do think we're much more delay sensitive when we're in "music' mode. 2023-11-23 10:02:58 I think the point is that I don't need my editor to seem 'instant', I just need it to not be 'slow'. 2023-11-23 10:03:23 There's a world of difference between the two, you can perceive very tiny delays but whether it feels slow is another thing 2023-11-23 10:06:58 Speaking of x-rays, I saw a video last night about a Soviet particle accelerator scientist who inadvertently walked through the accelerator beam. 2023-11-23 10:07:08 "Safety system failure." 2023-11-23 10:07:16 Amazingly, he survived it. 2023-11-23 10:07:40 Fouled up the left side of his face, and he had occasional seizures the rest of his life. 2023-11-23 10:07:51 But lived quite a long time. 2023-11-23 10:15:42 Yet Republicans won't allow an accelerator beam ban 2023-11-23 10:20:06 healthier than some cowbows using a screwdriver to play with the demon core 2023-11-23 10:24:20 About time they banned screwdrivers 2023-11-23 10:24:56 there was increased interest in automation following that 2023-11-23 10:25:47 I don't think anyone learned anything from the demon core incident because everyone involved knew it was dangerous and stupid 2023-11-23 10:28:45 I didn't know about the demon core, which is funny because I just played DOOM 2023-11-23 10:30:11 search for 'Tickling the Devils Tail' 2023-11-23 10:40:00 Yeah, I saw that demon core video last night as well. 2023-11-23 10:42:44 I had no idea that did all that stuff totally by hand back then. 2023-11-23 10:43:03 I think a lot of scientists at the time were surprised to learn they did that stuff by hand 2023-11-23 10:43:05 At least they managed not to let the demon core actually blow up. 2023-11-23 10:43:30 True 2023-11-23 10:45:16 When the screwdriver slip accident happened, there was an audience of other scientists in the room. They were standing a few feet away, though - just the one guy was right there immediately beside it. 2023-11-23 10:45:53 He was actually the second guy it killed. 2023-11-23 10:46:04 there had been an earlier accident with it as well. 2023-11-23 10:49:46 hmm... maybe you folks can help me regarding an phrase in English I heard recently: regression of the mean 2023-11-23 10:50:07 to the mean? 2023-11-23 10:50:25 nope spefically of 2023-11-23 10:50:46 haven't seen it with of before 2023-11-23 10:51:25 https://en.wikipedia.org/wiki/Regression_toward_the_mean 2023-11-23 10:51:46 Almost certainly what they meant 2023-11-23 10:53:09 veltas: I thought so too but they were very spefic that it was regression _of_ the mean, not towards it 2023-11-23 10:54:09 It's possible some people say it that way 2023-11-23 10:54:16 I think it does refer to same concept, just my guess 2023-11-23 10:54:21 That's what I think. 2023-11-23 10:54:27 Just different speaking habits. 2023-11-23 10:55:00 Some people say "Regression to the mean", and often 'to' and 'of' get equated in phrases 2023-11-23 10:55:10 Even if the meaning is quite different literally 2023-11-23 10:55:36 to/of/for I see get confused and muddled a lot 2023-11-23 10:56:46 nope, they meant _of_ and not _to_ and were explict about it. 2023-11-23 10:59:29 Maybe they're just being obstinate 2023-11-23 10:59:40 so I suspect she meant that the mean of the thing in question was lowering 2023-11-23 11:00:30 It's not impossible 2023-11-23 11:00:51 but yeah the of/to/for confusion is quite irritating to non native speakers of English like me. 2023-11-23 11:03:26 It's good for be aware to this 2023-11-23 11:24:15 Zarutian_iPad: What makes me pretty sure of it is that when I searched for "regression of the mean" it led me to that article on "regression toward the mean." 2023-11-23 11:24:38 I think if it were a distinct concept then a distinct separate article would have popped up. It would be documented as separate things. 2023-11-23 11:25:52 Plus it is just the kind of slop you find in English sometimes. 2023-11-23 11:25:54 :-| 2023-11-23 11:25:59 sorry about that. 2023-11-23 11:26:31 One thing about English that particularly frustrates Spanish speakers is that we don't stick to "one set of letters = one sound.' 2023-11-23 11:26:42 "ough" is a particularly bad offender their. 2023-11-23 11:26:48 It can sound all kind of different ways. 2023-11-23 11:27:31 You have the "through" sound, and the "enough/rough" sound and the "bought" sound and so on. 2023-11-23 11:28:00 The did a funny bit on that in the "I Love Lucy" show once, where Ricky was trying to read a bedtime story to Little Ricky. 2023-11-23 11:28:15 They made up a story that just had almost every ough word imaginable in it. 2023-11-23 11:30:39 ocho castillao (but English is a lot worse) 2023-11-23 11:33:41 Spelling reforms help ;) 2023-11-23 11:34:13 Help some and hinder others 2023-11-23 11:34:30 It would be painful to most people already familiar, but better for new learners 2023-11-23 11:35:03 Sure 2023-11-23 11:35:22 Especially older text become increasingly unavailable that way 2023-11-23 11:35:26 texts* 2023-11-23 11:35:51 Yes, as I know from pre-standard writing 2023-11-23 11:37:16 Right 2023-11-23 11:38:50 What is annoying is the etymology they tried to insert into standardised English spelling 2023-11-23 11:38:53 And got wrong 2023-11-23 11:39:05 So there are words with silent letters that literally have no purpose and never did 2023-11-23 11:39:08 "They"? 2023-11-23 11:39:15 I think I recall that youtube video. 2023-11-23 11:39:34 I've not seen any such YouTube video 2023-11-23 11:40:47 Lies! How could you know without it? 2023-11-23 11:45:08 I think I probably learned about this while reading about the older King James bible issues 2023-11-23 11:53:47 Yeah, just try to read something written in middle "English." 2023-11-23 11:59:04 Chaucer vs. Shakespeare - a lot changed in that not to huge amount of time. 2023-11-23 11:59:12 too 2023-11-23 12:00:36 the first English dictionary was also 1604, which will help retard evolution 2023-11-23 12:01:30 Yeah, and everything that makes people more "interconnected" would as well, by somewhat defeating "local divergences." 2023-11-23 12:01:55 printing press, telegraph, etc 2023-11-23 12:02:08 Yep. 2023-11-23 12:02:33 I think television slowed the rate of regional dialect divergence and probably even mitigated it to some extent. 2023-11-23 12:02:57 We live in different parts of our country, but everyone in the US tends to watch the same TV shows. 2023-11-23 12:03:44 It's not enough to wipe it totally out, of course. 2023-11-23 18:34:52 Wow - this is an interesting critter: 2023-11-23 18:34:54 https://www.youtube.com/watch?v=iP_9eb4RY4I&list=RDCMUCRlICXvO4XR4HMeEB9JjDlA&index=29 2023-11-23 18:38:53 is it mandatory for a forth to be named with forth in the name 2023-11-23 18:41:31 nope 2023-11-23 18:42:06 mecrisp comes to mind 2023-11-23 18:42:27 I never hear that called 'mecrisp forth' or anything 2023-11-23 18:48:12 it may help with brand identification to mention forth somewhere 2023-11-23 18:53:32 one of the best things about Forth is that you can do anything you want to. :-) 2023-11-23 19:05:46 KipIngram, that was a weird bugger, but I still like Boxing Shrimp mo'betta 2023-11-23 20:10:01 I was particularly impressed that if you cut off his gun claw the other ones just turns into a new gun claw, and the stub grows into a new normal claw. 2023-11-23 20:10:11 other "one" 2023-11-23 20:23:12 well, yeah: lotsa' sealife regenerates. 2023-11-23 20:23:42 ..they are prolly written in lisp with triads and closures and shit ;-) 2023-11-23 20:53:25 ACTION ♪ ♫ "stuck inside these 4 walls..." ♪ 2023-11-23 20:53:37 followup question re: naming a forth. if i don't call it "myforth" then what do i call it? :( 2023-11-23 20:54:48 make a markov model from /usr/share/dict/words and then ... 2023-11-23 20:56:29 lol 2023-11-23 21:09:44 i think i'll call it "thrig". thanks! 2023-11-23 22:58:07 http://archive.retro-kit.co.uk/bbcdocs.com/filebase/econet/ looks intresting for historical reasons 2023-11-23 22:58:49 hmm.. did BBC Micro have a Forth written for it I wonder 2023-11-23 23:51:10 BBC micro had a couple of Forth systems. Acornsoft Forth and rqForth are two I've seen, and I think there was a third, but I don't recall the name of that one