2025-03-19 07:17:50 Well, it was fun thinking about it, but my attempt at an interpret-only forth is probably not really worth programming, or programming in. 2025-03-19 07:23:06 Basically it would compile strings literally, then re-interpret them. For words like :, IF, BEGIN and so on I'd them push the current scan pointer on the rstack, then ;, THEN, AGAIN and so on would pop the rstack and check that the popped value points to the relevant 'initiating' word. 2025-03-19 07:30:55 I'm giving it up because someone linked to FreeForth and while reading the criticism file there was a complaint that it's doing something very nonstandard to forth programmers (not a forth standard; forth programmers) and I thought to myself, maybe I'm doing the same thing. Time to reflect. 2025-03-19 07:33:51 Early forth used a similar approach, so maybe it wasn't entirely misguided. https://colorforth.github.io/HOPL.html Lessons learned, and fun had :) 2025-03-19 07:38:40 yeah, I was going to say, early Forth was a text interpreter 2025-03-19 07:39:03 like sh 2025-03-19 07:40:08 Come on, I haven't finished yet! 2025-03-19 07:40:12 Just kidding :D 2025-03-19 07:41:52 I wonder if that's the origin of factoring. Or at least a pretty practical example. 2025-03-19 07:46:07 The origin of factoring is 测圆海镜, a book written in the year 01248 by the mathematician 李治 2025-03-19 07:46:17 I think 2025-03-19 07:47:59 but it's pretty fuzzy, really 2025-03-19 07:49:25 the book title translates to "Sea mirror of circle measurements": https://en.wikipedia.org/wiki/Ceyuan_haijing 2025-03-19 07:54:18 الكتاب المختصر في حساب الجبر والمقابلة https://en.wikipedia.org/wiki/Al-Jabr was earlier but I'm not sure it really has factoring in it 2025-03-19 07:56:54 the connection between factoring polynomials over the reals and factoring programs is explained to some extent in https://en.wikipedia.org/wiki/Kleene_algebra 2025-03-19 07:58:11 it's more than just a metaphor 2025-03-19 11:01:16 There is whole language to https://c-language.org/ . https://github.com/c3lang/c3c is more refined. First of all defined. 2025-03-19 11:25:07 Not that impressed by C3 2025-03-19 11:25:21 A lot of pointless changes e.g. "fn" 2025-03-19 11:25:57 Why do a 'refined' C that looks identical to C but with more clutter 2025-03-19 11:26:10 veltas: Good point. 2025-03-19 11:26:13 Some of the changes are useful, like member functions, but otherwise no 2025-03-19 11:27:40 I absolutely agree. Superficial, but it could not be ALGOL Family otherwise. 2025-03-19 11:28:00 I would rather write C++ which has a lot more knowledge/support, and of which there is a relatively nice subset you can limit yourself to 2025-03-19 11:28:09 And if you want something simpler than C++ then use C 2025-03-19 11:28:42 And if you want something simpler than C then use Forth 2025-03-19 11:29:15 Or assembly I guess 2025-03-19 11:29:52 But I would prefer to use Forth like a macro assembler if I had to write a lot of assembly, but not 100% of the code needed to be low-level 2025-03-19 11:34:51 C absolutely was assembly for PDP-11. There was also some graphics card from Bell Labs (somewhere on YouTube) for which assembly was proper subset of C. Surprise? ""C Is Not a Low Level Language: Your computer is not a fast PDP-11"" ( https://queue.acm.org/detail.cfm?id=3212479 ) ?! 2025-03-19 11:37:14 Every low level language is assembly for the PDP-11, because it has a very simple and flexible architecture 2025-03-19 11:37:44 Dennis Ritchie denied that the post increment and pre decrement are borrowed from PDP-11, partly because they're in B and that predates the PDP-11 2025-03-19 11:44:44 I still do not see how is PDP-11 worth a second of my attention. In fact I think the less I know about it the better. I think the same about C and UNIX. 2025-03-19 11:46:14 I think Forth is an alternative to both C and UNIX 2025-03-19 11:46:35 Interesting to see how deep the rabbit hole goes 2025-03-19 11:47:18 I like the PDP-11, but yeah you don't need to know anything about it, not sure who said you do 2025-03-19 11:47:51 Exactly. I will apologize for Forth 94. Forth 2012 is not better. 2025-03-19 11:48:33 The only things in Forth 200x I like are +FIELD and PARSE-NAME 2025-03-19 11:48:43 Maybe some other things if I think hard, but it's a very short list 2025-03-19 11:49:01 FIELD: and CFIELD: can come too 2025-03-19 11:52:49 Forth 94 already is bad because of things like LOCALS| and ENVIRONMENT? 2025-03-19 11:53:30 And making FORGET obsolescent 2025-03-19 11:54:15 CATCH takes an xt 2025-03-19 11:54:22 I could go on, lots of bad decisions 2025-03-19 11:58:15 Why are We ignoring De Bruijn Index. BigNums? Am I (not to say We) feeble minded? Isn't it offending to our readers?! ATM I am glad more people do not waste their effort on... Forth 2012. 2025-03-19 11:59:58 def swap(*D, **Dictionary): return OK(D[1], D[0], *D, **Dictionary) 2025-03-19 12:00:18 The stack is sort of like a De Bruijn Index, given that it's not good for more than 2-3 items, unless you're 'stashing' something for long term use 2025-03-19 12:00:52 Assuming you don't want more than like 2-3 parameters 2025-03-19 12:01:22 Otherwise just use VARIABLE's, it was good enough in the 80's and it's good enough now 2025-03-19 12:02:32 Now I disagree. 2025-03-19 12:09:27 def example(*D, **Dictionary): OK(*D[1:], Var=D[0], **Dictionary) # to Var 2025-03-19 12:15:20 Return stack useful for stashing and R@ is a bit like an extra register 2025-03-19 12:15:37 To me for most things the stack feels like having 3 awkward registers 2025-03-19 12:17:31 Yes, `dup' and `swap' are also Variables. 2025-03-19 12:22:10 Why don't We have _local_ `value's?! No rain dance!! 2025-03-19 12:22:29 : swap value ToS value NoS NoS ToS ; 2025-03-19 12:22:29 : dup value ToS ToS ToS ; 2025-03-19 12:22:30 : drop value ToS ; 2025-03-19 13:58:00 ForthBot: CAT 2025-03-19 13:58:00 /_/ 2025-03-19 14:47:01 ForthBot: SEE CAT 2025-03-19 14:47:01 : CAT 32 EMIT 32 EMIT 32 EMIT 47 EMIT 95 EMIT 47 EMIT 32 EMIT CR 40 EMIT 32 EMIT 111 EMIT 46 EMIT 111 EMIT 32 EMIT 41 EMIT CR 32 EMIT 32 EMIT 62 EMIT 32 EMIT 94 EMIT 32 EMIT 60 EMIT CR ; 2025-03-19 15:38:55 xentrac: Speaking of math today I came across https://en.wikipedia.org/wiki/Extended_real_number_line and thought neat, that does seem close to signed/unsigned integers. The only thing I'm qualified to say is that it looks neat :) 2025-03-19 15:54:20 INTERPOL (integer police) are involved in hunting down those who sell fake number lines 2025-03-19 15:59:58 The trick is to get into as many watchlists as possible.. good chance of a false positive. :) 2025-03-19 16:44:52 ForthBot: 80 RECUNACCI 2025-03-19 16:46:09 ForthBot: SEE RECUNACCI 2025-03-19 16:46:09 : RECUNACCI 2 + 0 DO I FIBONACCI LOOP DROP ; 2025-03-19 17:02:16 ForthBot: ~ . 2025-03-19 17:02:16 -23416728348467686 2025-03-19 17:03:02 xentrac: I don't see how is Kleene Algebra related to Factoring. We do not grep(1) for `;' ;) . 2025-03-19 17:09:43 DKordic: no, I imagine you don't 2025-03-19 21:52:58 join python 2025-03-19 22:14:12 cleobuline: not allowed 2025-03-19 22:14:28 what ? 2025-03-19 22:15:21 just joking. your dropped your command "join python" into this channel as a normal message 2025-03-19 22:15:40 ha ok :) 2025-03-19 22:15:57 ForthBot: SOURCE @ PRINT 2025-03-19 22:15:57 https://github.com/cleobuline/some-c-sources/blob/main/forth_gmp_irc_bot.c 2025-03-19 22:20:36 ForthBot: " Ceci est un test " TEST ! 2025-03-19 22:20:47 ForthBot: TEST @ PRINT 2025-03-19 22:20:47 Ceci est un test 2025-03-19 22:46:52 join C 2025-03-19 22:53:14 many rivers do