2025-03-06 00:37:57 ForthBot: LOAD "test.fth" 2025-03-06 00:37:57 mot definis : 2025-03-06 00:39:48 ForthBot: : FACTLOOP DUP 0 = IF DROP 1 EXIT THEN DUP 1 = IF DROP 1 EXIT THEN 1 SWAP 1 DO I * LOOP ; 2025-03-06 00:39:56 cleobuline hey 2025-03-06 00:40:04 my :D has colors 2025-03-06 00:40:06 https://i.imgur.com/0J5AsCr.png 2025-03-06 00:41:32 nice :) 2025-03-06 00:42:23 ForthBot: :D 2025-03-06 00:42:24 :D 2025-03-06 00:43:39 ForthBot: 500 FACTLOOP . 2025-03-06 00:43:39 2025-03-06 00:43:48 :( 2025-03-06 00:46:54 vms14: and the cat ? 2025-03-06 00:47:03 what cat 2025-03-06 00:47:12 ah 2025-03-06 00:47:13 ForthBot: CAT 2025-03-06 00:47:13 /_/ 2025-03-06 00:47:23 I should implement it 2025-03-06 00:47:27 ForthBot: SEE CAT 2025-03-06 00:47:27 : 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-06 00:47:36 :0 2025-03-06 00:47:54 I'll steal some cat 2025-03-06 00:48:19 :) 2025-03-06 01:15:45 ForthBot: WORDS 2025-03-06 01:15:45 DP HELLO DOUBLE FACT POW FIBONACCI COUNTDOWN TUCK 2DROP SUM_SQUARE CUBE SUM_CUBES RECUNACCI CAT :D TRIPLE POW2 TEST-CASE FACTLOOP 2025-03-06 01:16:27 ForthBot: 0 20 SUM_SQUARE 0 20 SUM_CUBES .S 2025-03-06 01:16:27 Stack: 44100 44100 2025-03-06 01:25:42 ForthBot: SEE SUM_SQUARE SEE SUM_CUBES 2025-03-06 01:25:43 : SUM_SQUARE 1 + 0 DO I + LOOP DUP * ; 2025-03-06 01:57:47 ForthBot: CAT 2025-03-06 01:57:48 /_/ 2025-03-06 01:57:53 Meow! 2025-03-06 01:58:00 Nyah! 2025-03-06 02:14:59 cleobuline I have a cat 2025-03-06 02:15:03 :D 2025-03-06 02:15:04 https://i.imgur.com/3JnoRKW.png 2025-03-06 02:16:40 the code for nyan 2025-03-06 02:16:41 https://i.imgur.com/eqPqZWr.png 2025-03-06 02:17:06 the face is scary though 2025-03-06 02:17:30 oh and I broke the _______ xd 2025-03-06 02:18:16 it seem to be a wolf your cat vms14 2025-03-06 02:18:57 :) 2025-03-06 02:19:15 Aw, I thought maybe it was a real picture of your cat, vms14. 2025-03-06 02:21:47 now it's fixed 2025-03-06 02:21:49 https://i.imgur.com/r6SGWdb.png 2025-03-06 02:22:18 yeah the face is weird :/ 2025-03-06 02:23:29 :) 2025-03-06 02:25:07 https://pastebin.com/raw/r8qEdWgD 2025-03-06 04:04:33 now it is cooler 2025-03-06 04:04:34 https://imgur.com/cqC4Dx4 2025-03-06 04:30:56 ForthBot: : test ( n ... 2n ) DUP + ; 2025-03-06 04:35:14 ForthBot: 2 test . 2025-03-06 04:35:15 4 2025-03-06 04:38:04 ForthBot: LOAD "test.fth" 2025-03-06 09:59:01 Not seen siraben around for a while 2025-03-06 15:57:26 ForthBot: WORDS 2025-03-06 15:57:27 DP test HELLO DOUBLE FACT POW FIBONACCI COUNTDOWN TUCK 2DROP SUM_SQUARE CUBE SUM_CUBES RECUNACCI CAT :D TRIPLE POW2 TEST-CASE FACTLOOP 2025-03-06 15:57:51 ForthBot: SEE TEST-CASE 2025-03-06 15:57:51 : TEST-CASE CASE 1 OF ." UN " CR ENDOF 2 OF ." DEUX " CR ENDOF 3 OF ." TROIS " CR ENDOF ." Others " CR ENDCASE ; 2025-03-06 16:03:10 https://i.ibb.co/Mkzy1WY8/image.png 2025-03-06 16:25:19 Yep I can smell blood in the water today lads 2025-03-06 16:28:01 oxyde de fer 2025-03-06 16:30:54 iron oxyd 2025-03-06 17:27:12 user51 is your forth going forth? 2025-03-06 17:35:37 vms14: Can't code much currently, nothing for now. 2025-03-06 17:36:33 I think that making your own language, no matter the kind of language or its design, is a very rewarding process 2025-03-06 17:37:09 and if you can make the language exactly as you wanted, I guess there is no better language than that 2025-03-06 17:37:57 you can choose to simplify things in order to learn and have something working, like focusing on what you want to see 2025-03-06 17:39:07 the fact that you are writing in c is also cool, it will have reasonable performance and it will be able to use any c library 2025-03-06 17:39:30 which means that you can interact with the system, web services, databases, etc 2025-03-06 17:39:39 and even compile it with emscripten 2025-03-06 17:40:36 that gives you a language that can do a lot of things 2025-03-06 17:41:15 but c is not good for prototyping 2025-03-06 17:41:18 Honestly one of the bigger issues is that I can see different way sof writing it. 2025-03-06 17:41:42 yeah you might have to try several and see which one you like most 2025-03-06 17:42:08 in my case for example sticking to a real forth system does not make sense 2025-03-06 17:42:28 I'm using perl and js to implement it which come with a gc 2025-03-06 17:42:52 and sticking to a real forth will not allow me to take advantage of what they offer 2025-03-06 17:43:06 funny thing, after you make a language exactly as you think you want, you discover it isn't what you actually want 2025-03-06 17:43:07 in c you can stick to a real forth somehow 2025-03-06 17:43:26 I feel like C is fine for prototyping, especially for Forth 2025-03-06 17:43:50 compared to scripting languages is not 2025-03-06 17:44:16 it's better to make a prototype in a language that gives you more abstractions and then port it to c once the design is good 2025-03-06 17:44:20 depends on what you're doing 2025-03-06 17:44:22 but more work I guess 2025-03-06 17:44:56 for example to make a linked list in most other languages you just type: [] 2025-03-06 17:45:07 and it has push pop etc 2025-03-06 17:45:16 in c you do it yourself 2025-03-06 17:45:18 My personal issue with one thing being theoretically better is that I make plenty -- heck, more than plenty -- a shameful amount of logic errors. 2025-03-06 17:45:20 JS and Python don't have linked lists; [] gives you an array 2025-03-06 17:45:30 I mean you can implement linked lists in them 2025-03-06 17:45:35 but they aren't a built-in feature 2025-03-06 17:45:37 same with Perl 2025-03-06 17:46:55 So the language doesn't matter if I write the wrong code :) 2025-03-06 17:47:10 it matters how much time did you spend writing the wrong code 2025-03-06 17:47:25 because at the end you have to write wrong code to realize it wasn't good 2025-03-06 17:48:37 I don't think it takes significantly more time or code to implement Forth in C than in JS 2025-03-06 17:49:49 a real forth does not want to be implemented in js 2025-03-06 17:50:53 you will be emulating a vm first or stuff like that 2025-03-06 17:51:19 user51 get a simple core and expand in the direction you want 2025-03-06 17:51:30 that's the cool thing about making it actually 2025-03-06 17:51:40 rpn and the stack simplify a lot of stuff 2025-03-06 17:51:49 after that you can do whatever pleases you 2025-03-06 17:52:04 like drawing nyan cats 2025-03-06 17:52:15 But I'd prefer focusing on QOL issues first, like error handling. Things like KEY can be a touch tricky in the terminal, something about cooked or raw, can't remember. 2025-03-06 17:52:37 in my case I just took the rpn and the stack, everything else I have taken it from lisp 2025-03-06 17:55:21 also the first thing you need to be aware of is that this language is yours and you do not have to comply to anyone 2025-03-06 17:55:52 you decide everything and do not have to give explanations to anyone 2025-03-06 17:56:40 unless you want to follow a standard 2025-03-06 17:57:32 I dunno about standards, but it seems reasonable to me that if my program has 'forth' in it, it should probably run 'forth' code you might find on say github. 2025-03-06 17:58:03 yeah that would be cool 2025-03-06 17:58:51 I'm happy with my abomination though 2025-03-06 17:59:02 and I guess a real forth is not what I wanted anyways 2025-03-06 18:00:04 in some way I do enjoy the raw memory access and how I can make my own data structures and accessors by just messing with the memory 2025-03-06 18:00:08 I'm a bit unsure what kind of threading I used, it should be DTC but instead of ENTER I simply checked if the xt offset is greater than a predefined offset for the builtin words. 2025-03-06 18:00:26 but on the other hand as long as I have lists and hash tables I can do a lot 2025-03-06 18:01:38 vms14: indirect threaded code is perfectly happy to be implemented in pretty much any language 2025-03-06 18:01:41 I'd be interested in a stringly-threaded forth as well, which can have its own complications. That might work great in perl, tho. 2025-03-06 18:02:03 a stringly-threaded forth would be easier in Perl than in C for sure 2025-03-06 18:02:47 strings would be slow 2025-03-06 18:03:05 and they look like a bad hack 2025-03-06 18:03:09 a lazy hack 2025-03-06 18:04:13 just use pointers to functions and that's it 2025-03-06 18:04:43 at the end you could just use a giant switch case 2025-03-06 18:04:55 and some bytecode format 2025-03-06 18:08:37 I'm not sure you can really call that 'threaded' ;) 2025-03-06 18:09:41 if you mean the switch case, it would be called "bytecode interpreter" 2025-03-06 18:10:52 Have you seen https://github.com/rswier/c4/blob/master/c4.c ? An implementation of a subset of C 2025-03-06 18:10:53 I want to add some string format word that interpolates stuff from the stack 2025-03-06 18:12:58 The bytecode interpreter starts at line 475 2025-03-06 18:13:04 If you're feeling hacky, you can stringify stuff with snprintf and sscanf, that's similar to storing and loading to some degree. 2025-03-06 18:19:22 I wonder if use temp vars or just word definitions to alter the behavior of format 2025-03-06 18:20:38 newline :separator. => That would set a temp var to the value "\n", then format would use that to join elements of a list: (1 2 3) "~a" format => "1\n2\n3" 2025-03-06 18:21:01 but for example I could define a word named iterator that format could use to iterate a list 2025-03-06 18:21:46 if I redefine it format will use that new definition 2025-03-06 18:22:31 since I have lexical scope I can have children definitions in a word that will only exist there, so that could be used to create those words and when format is executed in his scope will use that 2025-03-06 18:23:00 in forth it could be done anywas 2025-03-06 18:23:11 anyways* 2025-03-06 19:02:44 Okay I've got go-ahead to start recruting for a $200k/year plus benefits Forth role 2025-03-06 19:02:47 If only right 2025-03-06 19:02:57 haha 2025-03-06 22:13:17 crc: *ListenerAndBuffering has a typo half way "wil do this" 2025-03-06 22:13:50 Thanks; I'll correct this 2025-03-06 22:14:01 No problem 2025-03-06 23:06:47 *Numbers typo line c "Number in *Konilo are signed..." 2025-03-06 23:11:19 There was a critical error LED that someone missed at work because it was flashing between green and red 2025-03-06 23:11:25 And they were colour blind 2025-03-06 23:19:13 What does the + mean as a prefix for words in the konilo manual?