2023-12-03 01:04:09 \o hi 2023-12-03 07:48:47 Hi sirmacik. 2023-12-03 11:22:55 is there a good reason for ' and ['] to be two different words? seems like you could make ' immediate and do the right thing in both interpretation and compulation modes 2023-12-03 11:24:58 : test ... ' thing ... ; do I want test to include the xt for thing or do I want test to parse a word when it's called? 2023-12-03 11:30:55 : doit ' execute ; 2023-12-03 11:59:21 zelgomer: ' is intended to be compilable. 2023-12-03 11:59:53 Whereas ['] (which is supposed to be evocative of [ ' ] ) is intended to run during compile time. 2023-12-03 12:00:04 The compiled ' will run when the new word is executed. 2023-12-03 12:01:01 I assume your familiar at this point with [ and ] ? [ switches you "out of" compile mode (and thus is immediate) and ] switches you into compile mode. 2023-12-03 12:01:16 Ugh. "you're" 2023-12-03 12:02:16 ur 2023-12-03 12:02:41 [ ' ] wouldn't actually replicate the effect of ['] since in the former the ' would pick up the ] instead of whatever word you put after the ]. so it's not as simple as just using [ ' ] where you might use [']; further hoop jumping is required. I'm sure that's why Chuck thought it was worth adding ['] 2023-12-03 12:03:17 You'd have to do some dance with LITERAL. 2023-12-03 12:04:30 : foo [ ' ] LITERAL ; 2023-12-03 12:04:58 so ['] == [ ' ] LITERAL 2023-12-03 12:08:53 on the other hand, you want to be able to say 2023-12-03 12:09:02 : foo ... ' ... ; 2023-12-03 12:09:07 so you can say 2023-12-03 12:09:17 foo later on. 2023-12-03 12:12:14 You could make it immediate then use postpone to delay its execution 2023-12-03 12:14:29 : just doit ; 2023-12-03 12:23:13 Well my Sunday socks have a hole in 2023-12-03 12:23:21 So they are holy indeed :) 2023-12-03 12:24:27 I love IKEA, we were there today 2023-12-03 12:24:36 I wish Sweden was a real place I'd visit 2023-12-03 12:24:53 Such deep lore in the IKEA universe, how many shops invent their own language and berry? 2023-12-03 12:25:16 You could, yes. There are usually several options on things like that. 2023-12-03 12:25:56 Shopping at IKEA does have "entertainment value." 2023-12-03 12:27:13 I love IKEA's meatballs 2023-12-03 12:27:38 I've gotten too many of the big plush toys there for my dog 2023-12-03 12:28:05 Ours is kind of far away, so it's not ever a "casual drop in" thing. There's generally a mission. 2023-12-03 12:28:47 Yes we were on a mission today for some 1x4 Kallax 2023-12-03 12:29:14 It's about an hour for us so not casual here either 2023-12-03 12:30:07 Oh, yeah - we've gotten some storage units like that too. Got a couple upstairs in daughter bedrooms. 2023-12-03 12:30:23 They're so... "sensible." 2023-12-03 12:31:23 I love the inserts 2023-12-03 12:39:26 We've gotten a couple different styles of those. Some are hard plastic of various colors - some are fabric on a frame, some are "wicker" style. 2023-12-03 12:39:54 I guess that's not "a couple." :-) 2023-12-03 13:18:03 Tyler Durden 2023-12-03 13:32:57 GeDaMo> You could make it immediate then use postpone to delay its execution 2023-12-03 13:33:17 yeah. so i say again: seems like you could make ' immediate and do the right thing 2023-12-03 13:33:38 maybe i should restate my question 2023-12-03 13:34:08 in mine, i have made ' immediate and it just does the right thing. in my experiences, this seems to cover 99% of use cases. for the other 1%, there's postpone 2023-12-03 13:34:55 shouldn't immediate be prepone 2023-12-03 13:36:11 yes. i haven't seen a forth word yet that doesn't take at least some time to execute 2023-12-03 13:36:23 "immediate" is ambitious 2023-12-03 13:40:34 zelgomer: In my own experience I use ' as non-immediate most of the time 2023-12-03 13:41:00 e.g. : thing create ' does> .... ; comes up a lot 2023-12-03 13:41:16 And ' just outside a word def 2023-12-03 13:49:01 zelgomer: Covering 99% of your use cases is a win; you can certainly make it work however suits you. 2023-12-03 13:49:48 I guess zelgomer's proposal wouldn't change the behavior outside of definitions. 2023-12-03 13:50:10 ' would work outside of defs as normal and inside defs as ['] 2023-12-03 13:50:23 Leaving you the "compile '" case to handle some other way. 2023-12-03 13:50:42 Which I guess would be POSTPONE ' 2023-12-03 13:50:56 But I've never been entirely sure about POSTPONE. 2023-12-03 13:52:42 I have hardly any immediate words in my system. 2023-12-03 13:52:55 ; of course, and [ 2023-12-03 13:53:08 ." 2023-12-03 13:53:23 No others are immediately coming to mind. 2023-12-03 13:54:10 All those recursion words require an offset be compiled after them, and that would normally mean they needed to be immediate. 2023-12-03 13:54:17 And there are a bunch of them. 2023-12-03 13:54:37 I dodged that by setting a bit in their headers that instructs the compiler to compile an offset. 2023-12-03 13:55:08 So I complicated the compiler a bit to avoid those dozens of immediate words becoming necessary. 2023-12-03 13:55:34 In the next system I won't need that either, since those words will no longer target by offset. 2023-12-03 13:56:05 Oh, and : is also immediate in my system, since I can put labels in the middle of definitions. 2023-12-03 13:59:20 sounds a bit like colorForth in that respect 2023-12-03 14:03:22 KipIngram: There's nothing wrong with what zelgomer's doing in my opinion 2023-12-03 14:03:55 I'm just saying there are some people who use the non-immediate ' for info 2023-12-03 14:04:16 The only thing I really have an opinion on here is that I don't think it's good for words to be 'smart' 2023-12-03 14:04:23 about state 2023-12-03 14:04:54 It's good for words to just be immediate and intended for using in a word def, or non-immediate and allowed anywhere 2023-12-03 14:47:45 veltas> e.g. : thing create ' does> .... ; comes up a lot -- how would you use that? thing foo ( and now foo's xt is left on the stack ) 2023-12-03 14:48:04 sorry, actually create foo bar ( and now bar's xt is left on top ) 2023-12-03 14:48:35 wouldn't you rather ' bar thing foo ? 2023-12-03 14:49:37 Often I have a DOES> word that changes another word 2023-12-03 14:50:48 "changes another word?" 2023-12-03 14:51:51 e.g. https://github.com/Veltas/aoc23/blob/main/1-1.4th#L3 2023-12-03 14:55:46 ah, that example has a comma which you were missing in what you posted to the channel 2023-12-03 14:56:22 and yeah, i'd have written those with ' open-file crucial open-file! 2023-12-03 14:56:51 just a difference in style 2023-12-03 14:58:33 in fact, another question that's occurred to me is whether does> is really all that useful. how is crucial open-file open-file! any different from : open-file! ['] open-file crucial ; ? 2023-12-03 14:59:10 or even : open-file! open-file crucial ; if crucial just checks for a return code 2023-12-03 14:59:35 If I have a lot of these it's nicer to just say they're all the same relation 2023-12-03 14:59:41 By using a DOES> word 2023-12-03 15:00:37 As you can see in that example there's three CRUCIAL words, I just think that's neater than defining them all 2023-12-03 15:13:56 i'm on the fence 2023-12-03 15:14:55 i've used does> a lot in previous escapades, and this time around i'm questioning whether all it did was add some mental overhead 2023-12-03 15:19:12 I never plan to use it but if I have a few words which are essentially the same thing with slightly different data I tend to factor it into DOES> 2023-12-03 15:19:51 But there's some argument to just using human pattern recognition on a bunch of similar looking word defs 2023-12-03 15:33:51 another stylistic question of critical importance 2023-12-03 15:34:33 nevermind, in trying to form the question i just answered it for myself LOL 2023-12-03 15:34:56 thanks rubber ducky! 2023-12-03 15:36:37 yup 2023-12-03 16:26:48 I think I'm already bored of Advent of Code 2023-12-03 16:27:35 Anyone else still working on it? 2023-12-03 16:28:15 i actually don't know what it is 2023-12-03 16:29:18 It's an advent calendar of 'little' coding problems https://adventofcode.com/ 2023-12-03 16:29:35 Although apparently they get harder half way through and take much longer 2023-12-03 16:29:56 Many of us attempt the first few in Forth and get burned out 2023-12-03 16:30:43 Because they're not incredibly interesting or incredibly suited to Forth, but it's just a nice opportunity to engage in something outside of the 'Forth community' 2023-12-03 16:31:13 I also honestly hope it will convince some people in here who spend all their time writing Forths to write some Forth *programs* ;) 2023-12-03 16:38:11 i am writing a forth program 2023-12-03 16:38:22 it compiles a forth interpreter 2023-12-03 16:38:50 and then it will take over the world 2023-12-03 16:40:04 I hope so 2023-12-03 16:57:53 veltas: I mostly agree with you re: avoiding "state smart" words. 2023-12-03 16:58:24 ." does it, and I guess I'm ok with that, but I don't think it's a good concept to carry too far. 2023-12-03 16:59:13 I likes me forth simple 2023-12-03 17:00:09 Yep. 2023-12-03 17:00:36 luv forth, luv codin, luv gregs 2023-12-03 17:07:55 :-| My daughter just shared a message she found somewhere. Guy was seeking advice. His kid's math teacher had taught the kid that 1/0 = 0. He told the kid that was wrong, and emailed the teacher. 2023-12-03 17:08:17 She replied that 1/0 = 0 and cc:'d the principal, wHO AGREED WITH HER. 2023-12-03 17:08:31 Makes me wanna cry. Damn US education... 2023-12-03 17:08:46 seen that, and logically she is right in one sense 2023-12-03 17:09:01 Let's say it is right - let's assume 1/0 = 0. 2023-12-03 17:09:13 Well, 0/1 = 0 too. 2023-12-03 17:09:18 So, 1/0 = 0/1. 2023-12-03 17:09:27 Cross multiply to get 0 = 1. 2023-12-03 17:09:38 That's a contradiction, so the starting assumption must have been wrong. 2023-12-03 17:09:51 depends on how division is explained: with boxes and beeds then it makes sense as the non existant box (zero) has nothing in it (zero) 2023-12-03 17:10:10 zero and undefined are not the same thing. 2023-12-03 17:10:45 how can an non existant box have anything in it? 2023-12-03 17:10:53 I.e., a box with nothing in it is not the same as "no box." 2023-12-03 17:11:54 the difference between js`undefined` and js`null` as it were 2023-12-03 17:12:02 My main point, though, is that once you've proven 1 = 0, you can prove anything equals anything. 2023-12-03 17:12:08 The whole tower falls over. 2023-12-03 17:12:30 Shouldn't really say 1/0 = 0 is anything 2023-12-03 17:12:46 yeah, I blame it on the teacher's education 2023-12-03 17:12:54 Me too. 2023-12-03 17:13:12 And on the "system's" teacher screening process. 2023-12-03 17:13:50 But also don't judge the teacher, not really fair for them to have to meet so many parents' expectations 2023-12-03 17:13:52 but in case of 4th`42 0 /%` what would the reminder be? 2023-12-03 17:13:54 On the other hand, most of us here in the US aren't willing to foot the bill to pay for high quality teachers, so... what do we expect? 2023-12-03 17:13:59 Their job is to teach the curriculum 2023-12-03 17:14:04 Not get everything perfect 2023-12-03 17:14:20 Kids aren't 'broken' for learning one or two incorrect things 2023-12-03 17:14:31 I though most of USA taxes got misspent on the millitary 2023-12-03 17:14:38 No, the kid will have many more math teachers - I assume the many will backfill for the few. 2023-12-03 17:14:49 That's one saving grace of the way it's structured. 2023-12-03 17:15:00 One teacher can do only limited damage. 2023-12-03 17:15:16 Zarutian_iPad: most of USA taxes are spent on entitlement programs 2023-12-03 17:15:22 military is second place 2023-12-03 17:15:41 With social media teachers are so much more exposed to criticism, and frankly that exposure is probably mostly bad. Lots of peering eyes and criticism isn't usually constructive. 2023-12-03 17:15:47 And education isn't really funded from the federal level anyway. 2023-12-03 17:15:55 It's a states/localities thing. 2023-12-03 17:15:57 if she had answered with the unicode symbol for undefined then I would have been impressed 2023-12-03 17:16:02 And so it helps to bear this in mind when you see things on social media that are critical 2023-12-03 17:16:29 The thing is, though, I don't regard this as a "subtle" mistake. 2023-12-03 17:16:33 It's a core principle. 2023-12-03 17:17:37 Well she doesn't tell you how to do your job 2023-12-03 17:18:36 I wish she would if she caught me out in a mistake that bad. 2023-12-03 17:18:56 That's your opinion it's bad, but you don't do her job 2023-12-03 17:19:17 So you don't actually know what matters as well as she does, most likely 2023-12-03 17:19:35 I utterly disagree with you, but there's no point arguing if you feel that way. 2023-12-03 17:19:39 its the "common core" crap, no? 2023-12-03 17:20:31 I would hope that would be included in any sane definition of "core." 2023-12-03 17:20:47 Not saying I necessarily admire modern educational structure. 2023-12-03 17:21:04 But... it's ARITHMETIC. Almost the bottom foundation stone of math. 2023-12-03 17:21:22 Not quite - these days they want to stick set theory in there below it. 2023-12-03 17:22:01 I think because they say it allows a logically rigorous development of the real number system (infinitesimals, etc.) 2023-12-03 17:22:15 "The continuum." 2023-12-03 17:22:27 division isnt part of ARithmetic, nor is multiplication. The latter because that is what rabbits do and the abstinith curriculum has no room for that. 2023-12-03 17:22:51 just adding and subtraction 2023-12-03 17:23:17 sorry aRithmetic 2023-12-03 17:23:31 What age group is she teaching? 2023-12-03 17:23:47 I don't think the message said that. 2023-12-03 17:24:01 Well depending on the age group this isn't a concern to me at all 2023-12-03 17:24:07 ya know from Reading, wRiting, and aRithmetic. The three ARRS every pirate learns. 2023-12-03 17:24:13 If they're end of high school then I'm thinking they're seriously underqualified 2023-12-03 17:24:20 Zarutian_iPad: I still regard it as arithmetic, but it is true that in a really formal development you start with natural numbers, which don't even include zero. 2023-12-03 17:24:24 And addition. 2023-12-03 17:24:47 Because in the natural numbers you can't subtract N from M if N is bigger. 2023-12-03 17:24:53 Not until you get to the integers can you do that. 2023-12-03 17:25:10 And you don't get division until you are dealing with rational numbers. 2023-12-03 17:25:53 and that is not until highschool? damn my elementary must been quite advanced in comparison 2023-12-03 17:26:47 but there you have it, rational numbers and irrational teachers do not go well together 2023-12-03 17:26:51 The view you have of this is very advanced, and kids need to be taught simplified versions of things that aren't even correct usually before they can broach that 2023-12-03 17:27:40 I learned division facts in the third grade. 2023-12-03 17:27:47 Along with fractions. 2023-12-03 17:28:12 just shows how far usa education system has regressed 2023-12-03 17:28:14 But is it important that children learn this? 2023-12-03 17:28:17 that was in the 1960's - I don't know how much it has changed. 2023-12-03 17:28:53 My answer to that is "yes," but that's another opinion. 2023-12-03 17:29:18 Regarding 1/0 = 0 I didn't 'learn' that until I was probably 15 years old, it doesn't even make sense as a proposition and unsurprisingly it has no answer in normal arithmetic, I don't think this impacted my understanding at all 2023-12-03 17:29:29 1/0 being undefined rather, I know it's not zero 2023-12-03 17:29:45 I've always thought the "3R's" is a good guide. It's a stupid term, though - it's supposed to designate "readin', ritin', rithmatic." 2023-12-03 17:29:45 I meant regarding that proposition 2023-12-03 17:29:55 So the very term has "faux igorance" built into it. 2023-12-03 17:30:09 But I do think reading, writing, and arithmetic are the three most important core skills. 2023-12-03 17:30:16 The rest builds on them. 2023-12-03 17:30:23 I don't know why you'd consider 1/0 as fundamental to young kids' arithmetic though 2023-12-03 17:30:45 it's not. The point is that the kid was explicitly TAUGHT that 1/0 = 0, which is entirely wrong. 2023-12-03 17:30:52 No problem if they'd just left it out of the fact list. 2023-12-03 17:31:14 But it's common knowledge (supposedly) that "you can't divide by zero." 2023-12-03 17:31:23 Unless you're Chuck Norris. 2023-12-03 17:31:40 tell them if they try to divide by zero their parents will get a divorce and it'll be their fault 2023-12-03 17:31:41 problem solved 2023-12-03 17:31:50 Doh... 2023-12-03 17:31:52 :-) 2023-12-03 17:31:56 you can but you get nonsense depending on the algorithm you are following 2023-12-03 17:32:22 that is, diffrent nonsense for diffrent algorithm 2023-12-03 17:32:28 whats the justification for 1/0=0? 2023-12-03 17:32:39 There isn't one. 2023-12-03 17:33:09 I don't know if you saw the whole conversation - my daughter shared a message she saw posted somewhere where some guy's kid's teacher had taught that to the kid. 2023-12-03 17:33:22 That dad tried to tell her it was wrong, but she argued, and the principle agreed with her. 2023-12-03 17:33:51 I think the dad just needs to deal with it really 2023-12-03 17:34:24 I think he was right to get confirmation he's not insane but he probably found confirmation with google anyway 2023-12-03 17:34:26 the dad needs to get his kids out of public indoctrination camps 2023-12-03 17:34:41 sorry, I scrolled up but couldnt find that part 2023-12-03 17:34:51 No problem. 2023-12-03 17:35:01 yeah were they teach that earth is flat in unbent spacetime 2023-12-03 17:35:16 Unfortunately rather than a mathematical problem, this is actually a social and political problem 2023-12-03 17:35:17 I also noted above that if you assume 1/0 = 0 you can then prove very quickly that 1 = 0. 2023-12-03 17:35:54 You see by having this tussle with the teacher, going to principle, and then going to social media, they've made pretty firm enemies with that irrational teacher 2023-12-03 17:35:56 KipIngram: isnt that done in some econmics disciplinrs? 2023-12-03 17:36:05 And that irrational teacher might just be good enough for their actual job 2023-12-03 17:36:13 Not that I'm aware of. 2023-12-03 17:36:23 Yes, like I said - it's not like we pay for quality in teaching. 2023-12-03 17:36:29 So now you've got an irrational teacher who hates you and will take it out on your kid 2023-12-03 17:36:39 I'd take a real teacher over an irrational one 2023-12-03 17:36:45 or that screenshot can be fiction, like Trump being a president at one time 2023-12-03 17:36:53 Part of the problem there, though, is that when the school district does get a big wad of money they spend on a jumbotron for the sports stadium. 2023-12-03 17:37:00 spend it 2023-12-03 17:37:11 But by the time you're a *dad* I have to wonder how you don't realise you shouldn't have these kinds of fights with your kids' crazy teachers? 2023-12-03 17:37:28 This feels like a life lesson playing out with lots of bystanders 2023-12-03 17:38:32 If your position in a social/political situation is just to be 'rational' you will very quickly self-destruct. People agree in principle with what this Dad said and did, but most people would avoid the conflict out of self-interest. 2023-12-03 17:39:05 use it as a lesson for the kid that teachers can be wrong? 2023-12-03 17:39:08 So my question is was the Dad sensible? And is *he* purely rational given the unsurprising consequences of his attack? 2023-12-03 17:39:16 Zarutian_iPad: Absolutely 2023-12-03 17:40:07 Ok - I'll say this one more time and then I'm done. The teacher was wrong. The principle was wrong. The dad was right to point the error out to his kid, right to point the error out to the teacher, and right to consider it a problem. Full stop. I'm bowing out for a while now, because... this is just sad. 2023-12-03 17:41:45 I love your principles and you're right it is sad. I would also argue with the teacher but not because I'm rational, it's because I love God and want to tell the truth. 2023-12-03 17:45:04 This conversation actually proves my point a bit because I'm trying to be totally honest, and yet I'm totally failing socially 2023-12-03 17:46:52 I'm not trying to annoy anyone but it's happened. I engaged only hoping that rationality would win over, knowing even that the risk of it just being annoying was high 2023-12-03 17:47:58 I'll take the Hemlock now... 2023-12-03 18:30:16 ACTION makes a note to update /mod - return n 0 when the divisor is 0 2023-12-03 22:13:52 Speaking of division by zero, there's a cool paper by Carlstrom that explores an axiom system with zero-division 2023-12-03 22:13:54 https://www2.math.su.se/reports/2001/11/2001-11.pdf 2023-12-03 22:14:48 Algebraically, it's, indeed, a tad sus that you can say a field is closed under addition, subtraction, multiplication, and division. 2023-12-03 22:15:08 But then you have to tack on "oh, except there's this one point where division is undefined" 2023-12-03 22:15:54 Carlstrom comes up with a nice way to essentially extend the field operations in a way that zero-division makes sense. 2023-12-03 22:16:12 He calls the system a "wheel".