2022-12-06 06:11:03 norayr: hi :) 2022-12-06 07:18:52 sts-q: hey! 2022-12-06 11:41:29 Hey hey hey 2022-12-06 16:05:01 Hey olle. 2022-12-06 16:07:43 c-addr is character address? 2022-12-06 16:07:45 So a byte? 2022-12-06 16:08:06 it addresses a byte 2022-12-06 16:08:20 kk 2022-12-06 16:08:27 O, byte! Hello, byte! etc. 2022-12-06 16:08:40 you have to use c@ on a c-addr 2022-12-06 16:09:24 Yep yep, looking at https://rosettacode.org/wiki/100_doors#Forth 2022-12-06 16:09:38 dup is used because the next word will eat it, right? 2022-12-06 16:09:46 So it's "stack cermony" in a sense 2022-12-06 16:11:01 olle: yes 2022-12-06 16:11:31 thrig: You put smiles on my face from time to time. Sense of humor reminds me of my dad's. 2022-12-06 16:11:48 I'm sorry? 2022-12-06 16:12:14 Your "byte addressing." Fun. 2022-12-06 16:13:24 What was the joke? 2022-12-06 16:13:30 Oh 2022-12-06 16:13:36 Pun on "address" 2022-12-06 16:15:05 Yes. 2022-12-06 16:15:20 I just walked in coming home from work, and it was a fun moment. 2022-12-06 16:16:44 Re: the next word eating it, you're talking about c@ consuming the address it uses? Yeah, the dup is to have a copy still around for the c! to use. 2022-12-06 16:16:57 Toggle is a primitive in my system. 2022-12-06 16:16:58 Got it :) 2022-12-06 16:17:16 Why a primitive if you can make it? 2022-12-06 16:17:16 Which helps a lot, since the assembly can just operate directly on the RAM location. 2022-12-06 16:17:23 Oh 2022-12-06 16:17:24 Faster, more efficient. 2022-12-06 16:17:28 Makes sense 2022-12-06 16:17:34 And it's a very short primitive - it takes less space that way too. 2022-12-06 16:18:38 I think mine may also take a bitmask, so I can toggle individual bits. I may be remembering something else, though. 2022-12-06 16:19:10 ACTION working on his nbody benchmark on polyglot compiler 2022-12-06 16:19:57 What's 1+ tho? 2022-12-06 16:20:00 ` 2022-12-06 16:20:01 100 1+ ( 1-based indexing ) constant ndoors` 2022-12-06 16:21:37 Increments top of stack by one. 2022-12-06 16:21:42 see 1+ spits out asm ^^ 2022-12-06 16:21:47 KipIngram: Thanks 2022-12-06 16:21:50 Also present because 1 + is less efficient. 2022-12-06 16:21:59 In both time and space. 2022-12-06 16:22:01 For PHP in Vim, I made a tiny script that looks up the def on php.net 2022-12-06 16:22:05 Hard to beat an inc instruction. 2022-12-06 16:22:16 Oh, nice. 2022-12-06 16:22:17 Slightly more useful than "see" if it only spits out asm :D 2022-12-06 16:22:30 Guess I could do something sim for gforth manual 2022-12-06 16:22:57 :-) Yeah. For a primitive that's about all see can do, but you're right - if you don't happen to know assembly it's not terribly helpful. 2022-12-06 16:23:56 the joys of explaining xor rbx,rbx to lisp folks 2022-12-06 16:24:04 hehe 2022-12-06 16:24:25 ACTION https://wiki.c2.com/?ForthVsLisp 2022-12-06 16:29:21 Wow - that link references this link, which is a page of Chuck's colorforth: 2022-12-06 16:29:25 https://www.dnd.utwente.nl/~tim/colorforth/Raystm2/mv050314.html 2022-12-06 16:29:37 One sees why Forth gets accused of being unreadable. 2022-12-06 16:29:45 Holy cow. 2022-12-06 16:30:05 I couldn't even START to tell you what's going on there. 2022-12-06 16:30:24 it's an elaborate noc, noc joke? 2022-12-06 16:31:32 Well, I think it's the bootstrap stage of a system. Further down it gets more readable. 2022-12-06 16:31:44 I guess those numbers are basically bits of machine code. 2022-12-06 16:31:54 SBCL backtraces are also pretty unreadable 2022-12-06 16:33:09 croll down 2022-12-06 16:33:40 Yeah, it gets better down there. 2022-12-06 16:33:51 Wonder why he uses blue underscores instead of just spaces? 2022-12-06 16:39:50 It bugs me when people try to say that Forth is "basically an assembler." 2022-12-06 16:40:31 It can DO what assemblers do, and at the very lowest level the words are like instructions for a VM. But I've never seen an assembler as transparently extensible as Forth is. 2022-12-06 16:40:46 Even a good macro facility still is "more visible" that Forth extensions are. 2022-12-06 16:41:15 Forth is a man/machine interface that can operate at any level of abstraction. 2022-12-06 16:41:48 And no other language I've ever seen achieves that as cleanly. 2022-12-06 16:43:18 You wouldn't call it a macro language? 2022-12-06 16:43:53 Or, how is it more than "just" a macro language? :) 2022-12-06 16:44:01 Well, maybe that's a reasonable term. But it's not REALLY "macro like," because macros are just a series of substitutions and expansions. 2022-12-06 16:44:06 ACTION gives up on compiler coding for today 2022-12-06 16:44:09 Forth actually compiles those words and then calls them. 2022-12-06 16:44:21 Hm hm 2022-12-06 16:44:24 it doesn't just expand things out into a monolithic definition. 2022-12-06 16:44:35 Well neither does C macros 2022-12-06 16:44:52 Though in fact Chuck's very earliest work did that, as far as I could tell from that book of his. 2022-12-06 16:44:53 But obviously Forth is more powerful than C pp 2022-12-06 16:45:06 I think he didn't have : definitions fully conceptualized when he wrote that. 2022-12-06 16:45:07 C macros are pretty terrible 2022-12-06 16:45:41 When I first started web dev I did a template engine with on-the-fly macro defs, to reduce html code considerably 2022-12-06 16:45:52 Anyway, maybe I think of macros wrong, but for me it's a system where a shorthand name just gets replaced by its defining text, and the moment it's read and processed. 2022-12-06 16:46:05 KipIngram: You know m4? 2022-12-06 16:46:07 Perhaps recursively. 2022-12-06 16:46:21 No, I don't think so - only "Cortex" M4. 2022-12-06 16:46:36 https://en.wikipedia.org/wiki/M4_(computer_language) 2022-12-06 16:47:25 Oh, interesting. No, I've been unaware of that. 2022-12-06 16:47:43 Maybe I should read a little - might prove useful for something if it's sitting there in most Linux systems. 2022-12-06 16:48:33 I thought about using it in a project, but in the end I needed to include sed in the Makefile ^^ 2022-12-06 16:50:58 olle: m4 kind of sucks :/ 2022-12-06 16:51:13 even the C preprocessor is better xd 2022-12-06 16:51:42 the best preprocessor is forth :D 2022-12-06 16:52:05 : some-word " some text" ; 2022-12-06 17:14:41 this channel needs a forth bot that evaluates random forth code 2022-12-06 17:18:43 vms14: it's in the making. i think. 2022-12-06 17:18:52 Never said m4 was good :) 2022-12-06 17:19:22 m4 is less bad than hand wrangling a sendmail.cf? 2022-12-06 17:24:36 I was looking for preprocessors for C and tried m4, read a book and cried 2022-12-06 17:25:17 it has weird stuff that I'd consider a bug, don't remember exactly what 2022-12-06 17:25:28 olle: who is making the bot? :0 2022-12-06 17:27:19 vms14: another forth program :D 2022-12-06 17:29:37 olle: which forth implementation do you use? 2022-12-06 22:07:04 anyone know of different implementations of blocks (forth file system)? 2022-12-06 22:20:24 define different implementations?