2022-02-16 05:28:07 anyone have the backlog of this channel? I was not logged in for sometime 24 hours ago. 2022-02-16 05:28:23 I am not sure if anyone had any suggestions on the security before veltas chimed in. 2022-02-16 05:31:25 check topic joe9 2022-02-16 05:31:27 there are logs there 2022-02-16 06:26:54 RIP person who wrote eqn (the equation macro package for nroff etc that inspired TeX) 2022-02-16 06:27:06 "Lorinda Cherry" 2022-02-16 06:27:29 Oh they wrote dc as well, actually more relevant to channel 2022-02-16 06:28:15 dc is a dumbed down forh :P 2022-02-16 06:28:44 I wonder if it's easier to fit dc in MBR 2022-02-16 06:29:01 I think dc lets you write programs, not sure 2022-02-16 06:29:27 I like eqn, from the couple of times I've used it 2022-02-16 09:50:06 veltas: RIP as in, they passed? 2022-02-16 10:13:44 lagash: Yes, it stands for 'rest in peace' 2022-02-16 10:14:39 Just mentioned it because we've gabbed about troff macros packages in here 2022-02-16 11:27:35 Huh I guess it's not really a 'macro package', it's more like a preprocessor, but it's all the same really. Amazing how any of this stuff worked without horrid syntax conflicts 2022-02-16 17:01:27 guys do you use forth currently for something? even for script-like stuff? 2022-02-16 17:11:31 bare-metal stuff, and occasionally for "exotic" things in normal linux userspace 2022-02-16 17:12:05 writing a properly optimizing forth for userspace linux right now, mostly as a compile target for a different lang 2022-02-16 17:43:34 remexre: any forth tutorial to understand compiling words? 2022-02-16 17:44:27 if you're doing an ITC or DTC design, I'd recommend Moving Forth 2022-02-16 17:44:28 I don't understand what the , does and the inmediate and >does i understand it defines the behavior of the runtime 2022-02-16 17:44:50 no, I just want to understand forth in order to see if I'll like it 2022-02-16 17:44:54 ah 2022-02-16 17:44:56 1sec 2022-02-16 17:45:17 try http://galileo.phys.virginia.edu/classes/551.jvn.fall01/primer.htm ? 2022-02-16 17:45:50 thanks remexre 2022-02-16 17:45:59 it's written against win32forth, but i don't think anything (maybe some of the floating-point stuff?) is specific to it 2022-02-16 17:46:35 I think it's probably I'll end loving forth, so I want to see 2022-02-16 17:47:29 I love common lisp because it lets me blend the problem into the language and seems forth also does that 2022-02-16 17:48:07 plus forth is so easy to implement that you're likely to create an usable custom forth that does whatever you want 2022-02-16 17:48:36 which means you could implement using any device platform library and language and take stuff from there 2022-02-16 17:49:28 and if you go to bootstrap you can easily make multiple ports of that forth 2022-02-16 17:50:19 which means you'll have the "same" language for doing whatever you need and will always be the right choice for the task 2022-02-16 17:50:40 why do you like forth? 2022-02-16 17:52:46 mostly because C is awful tbh :P like, a forth implementation I wrote myself is infinitely more likely to let me do what I want without exploding on me 2022-02-16 17:53:12 especially "weird stuff" like coroutines, funclets, etc 2022-02-16 17:53:57 funclets? 2022-02-16 17:55:40 a bunch of little bits of code that can all serve as "function entrypoints" but you can freely goto between in their implementation 2022-02-16 17:56:33 you implement them by using the return stack? 2022-02-16 17:56:34 this is a subset of tail-call if you have that 2022-02-16 17:57:06 how should I represent words in a language other than asm 2022-02-16 17:57:27 my forths has a primitive, (BRANCH) (also called (BR) by other people I think?) that sets the forth IP to a constant; I just use that 2022-02-16 17:57:39 I mean words are primitives which are native code or lists of words, but they're really memory address and lists of memory address 2022-02-16 17:57:55 so they're kind of an asm label 2022-02-16 17:58:27 how should I emulate this behavior in order to implement later the return stack using those adresses 2022-02-16 17:58:34 I have no idea 2022-02-16 17:58:39 possibly something like https://git.sr.ht/~remexre/rtf/tree/trunk/item/bs/word.h#L15 2022-02-16 17:59:15 also about a repl with a transpiler in C, should I compile and load dynamically with dlopen or recompile everything? 2022-02-16 18:01:19 like compiling forth to C? 2022-02-16 18:02:48 remexre: yes, something like words are just blocks of code that when called write c code that ends in a .c file 2022-02-16 18:04:08 like... why do that 2022-02-16 18:04:31 that sounds like you're putting the compile vs execute boundary in a weird place 2022-02-16 18:05:22 cause it would let you provide new words that are "native code" (target code in this case) in runtime, but I have no idea about incremental compilers or alike 2022-02-16 18:07:06 actually a repl would only be for dev purposes and if you want to make executable then it gets transpiled, but providing a repl for a transpiler, forces you to compile stuff in the targe language and execute it, or make a whole new interpreted version 2022-02-16 18:07:40 if you do want to understand JIT compilers (both the JVM/V8 flavor and the CL:COMPILE flavor), IMO https://dl.acm.org/doi/pdf/10.1145/1706299.1706313 is a good thing to read to "get a flavor for it," just ignore the verification parts that don't sound relevant to "how does this actually work" 2022-02-16 18:08:21 but what I'm doing is accumulating chunks of an IR when COMPILE, gets called 2022-02-16 18:08:50 (and other compiler-only magic used for IF THEN ELSE RECUR etc) 2022-02-16 18:09:15 and executing ; triggers actual compilation 2022-02-16 18:09:39 to a big rwx memory region 2022-02-16 18:10:15 but I always generate position-independent code, so I can fairly easily either just jmp to it (well, B since I'm on aarch64, but same difference) or put it in an ELF file 2022-02-16 18:10:33 I would highly highly highly recomment implementing a DTC forth system before you try something like this though 2022-02-16 18:10:39 makes me subscribe to read that page 2022-02-16 18:10:51 ugh, 1sec 2022-02-16 18:11:46 try https://cdn.remexre.xyz/files/52d2ed3238f6d3c4fb6715a97329bb64b2247e6c.pdf 2022-02-16 18:12:10 thanks :D 2022-02-16 18:13:56 I'd say sec3-5 are the useful ones for "how does a jit actually work" 2022-02-16 18:19:58 vms14: regarding does, etc. check out f83. 2022-02-16 18:20:10 it makes things a little more simpler. 2022-02-16 18:20:19 Dr. Ting wrote a book about it too. 2022-02-16 18:23:10 joe9: http://forth.org/OffeteStore/1003_InsideF83.pdf this one? 2022-02-16 18:27:37 remexre: I'll share your pdf 2022-02-16 19:12:29 joe9: I'm trying it f83 with dosbox 2022-02-16 19:12:38 the book is good. 2022-02-16 19:13:25 https://github.com/ForthHub/F83/blob/master/f83.com took that and just typed "dosbox f38.com" and it works :D 2022-02-16 19:13:57 I have pforth, but now I can follow the book and everything should work 2022-02-16 19:14:13 thanks for the recommendation 2022-02-16 19:44:15 joe9: why do you like forth? 2022-02-16 19:47:36 and why in f83 ." text " says ok but does not print anything nor touches the stack? 2022-02-16 20:19:44 ooh, I'm looking at dx forth 2022-02-16 20:20:00 trying the spiral demo in dosbox 2022-02-16 20:20:55 are there games written using dx forth 2022-02-16 20:20:59 ?