2025-01-28 12:04:29 I'm trying to stick more to a forth like this time, even without memory 2025-01-28 12:04:52 it "pretends" to be a forth 2025-01-28 12:05:24 for example now has the compiling state flag and immediate words have dual behavior 2025-01-28 12:05:48 I got rid of all the lispy features, environments, lexical scope, evaluating lists, etc 2025-01-28 12:06:04 now colon definitions are like in forth 2025-01-28 12:06:17 : oh 1 2 3 ; : oh oh ; 2025-01-28 12:06:29 it overrides and calls the first oh 2025-01-28 12:07:02 vms14 have you looked up how indirect threading works? 2025-01-28 12:07:06 if also works like in forth and can be nested. but I'm not too proud of it 2025-01-28 12:07:17 veltas not really 2025-01-28 12:07:19 Because you could implement ITC in javascript/perl/etc 2025-01-28 12:07:28 And then it's a really classic Forth :P 2025-01-28 12:07:32 but I wonder if it's what I'm doing 2025-01-28 12:07:58 Well the ITC dictionary structure might be similar to what you're doing 2025-01-28 12:08:20 The ITC 'threading' mechanism no, because that really requires machine code or arbitrary jumps 2025-01-28 12:08:20 there are the primitives which are perl subroutines and colon words are a closure that will have a list of all the subroutines it uses and execute them 2025-01-28 12:08:40 Yeah that's basically ITC layout 2025-01-28 12:08:42 for example : oh 1 ; the 1 will be converted into a perl sub that will push that number 2025-01-28 12:09:10 oh becomes a function that when executed just iterates its code list which is a list of subroutines 2025-01-28 12:09:26 I have no memory, but variables work like in forth at least externally 2025-01-28 12:09:38 variable oh 24 oh ! oh @ 2025-01-28 12:10:52 variable creates a hash table with two closures capturing a value { fetch => sub {}, store => sub {} } 2025-01-28 12:10:52 ! and @ just take that hash table as argument and execute either the fetch and store closure 2025-01-28 12:11:03 so you can extend any kind of data type to be used with fetch and store by creating a hash table with two closures 2025-01-28 12:11:18 I have r> and >r, but no return stack 2025-01-28 12:11:36 is an auxiliar stack, do loop +loop work and push the index there so you can nest them and have I j k 2025-01-28 17:40:17 what is the best resource you know about implementing forth? 2025-01-28 17:40:27 or the one you recommend 2025-01-28 17:41:33 I want to try implementing a proper one, even if it's in perl and the memory will be an array xd 2025-01-28 17:47:35 http://www.bradrodriguez.com/papers/moving1.htm 2025-01-28 17:47:45 "MOVING FORTH Part 1: Design Decisions in the Forth Kernel" 2025-01-28 17:51:46 ty GeDaMo 2025-01-28 18:12:50 I learned a lot from the jonesforth tutorial, but it's quite specific to indirect threading and somewhat specific to assembler, so I guess it might not be of much help. It was for me because the Juppy uses indirect threading too.