2024-06-04 10:37:21 Looks like PDP-11 forth was designed with ASR-33 compatibility in mind(?) 2024-06-04 10:38:08 Only uppercase letters, no {|}`~ 2024-06-04 11:12:20 I like the SIN/COS code, lookup table allowing integer degrees, produces result * 10000 2024-06-04 11:13:04 Nice fixed point calculation 2024-06-04 12:45:05 Hm I have a problem in my Forth DSL - some parts should be evaluated at once, other parts after a SQL query happens. :d 2024-06-04 12:45:15 I guess I can split it in two text files. 2024-06-04 12:50:30 Hm I'm getting deja vu 2024-06-04 12:51:54 :O 2024-06-04 12:52:15 [ and ] and immediate? ;) 2024-06-04 12:52:19 Naja 2024-06-04 12:54:48 Naja? 2024-06-04 13:03:25 Yea what'ya gonna do eh :) 2024-06-04 13:03:28 Life is life 2024-06-04 13:08:40 I guess I would suggest trying to make yourself comprehensible 2024-06-04 13:11:57 Part of the DSL translates to SQL query, other part translates to PHP that uses data from that SQL query 2024-06-04 13:12:06 Problem is that DSL is just one text blob right now 2024-06-04 13:12:38 So I basically need to "inject" the execution of that query somewhere... 2024-06-04 17:39:29 So guys, the My4th is frickin' slow :) 2024-06-04 17:39:42 Looking to go from 8MHz clock to 14MHz clock next 2024-06-04 17:41:00 Slow at what? 2024-06-04 17:41:29 If I was doing some playing I'd probably buy 10 of those dirt cheap Risc V chips 2024-06-04 17:44:58 And just stare at them 2024-06-04 17:45:52 Well I'm playing 2048 on it 2024-06-04 17:46:03 And to redraw the screen takes like ~1s 2024-06-04 17:46:15 Is it connected to a terminal? 2024-06-04 17:46:18 Yea 2024-06-04 17:46:24 Over UART 2024-06-04 17:46:25 Sounds like a slow implementation 2024-06-04 17:46:34 Also might be limited by UART speed 2024-06-04 17:46:36 What baud rate? 2024-06-04 17:46:48 Slow. 4800 baud 2024-06-04 17:46:59 It's a 1 bit computer remember 2024-06-04 17:47:14 You want one? :) 2024-06-04 17:47:15 If I understand right 2048 doesn't require much to update on screen at once? 2024-06-04 17:47:22 Correct 2024-06-04 17:47:28 So it's the implementation 2024-06-04 17:47:39 The implementation is super minimal 2024-06-04 17:47:41 A 4800 baud 1-bit 8MHz computer can run it 2024-06-04 17:47:44 It does run it 2024-06-04 17:47:56 It probably redraws whole screen each step? 2024-06-04 17:47:59 Yep 2024-06-04 17:48:19 Immediate graphics, not a good idea for a 1-bit 8MHz computer over 4k serial 2024-06-04 17:48:22 Rosetta Code -> 2048 -> Forth 2024-06-04 17:48:27 Yeah 2024-06-04 17:48:36 It's the same impl but Dennis made it a bit faster 2024-06-04 17:48:39 Immediate graphics is lazy for stuff like that 2024-06-04 17:48:50 Especially on a terminal.... 2024-06-04 17:48:53 Hm 2024-06-04 17:49:24 Forth has all the words you need to do this right 2024-06-04 17:49:51 Like AT-XY etc 2024-06-04 17:50:54 Sounds like there's something to do already with it 2024-06-04 18:11:53 lf94: I guess now I don't have the slowest computer here :) 2024-06-04 18:52:32 For $150 CAD you can join me 2024-06-04 18:52:34 :p 2024-06-04 18:52:39 I've built 5 of these boards 2024-06-04 18:52:48 It was quite a lot of work... 2024-06-04 18:53:17 I've never done something like this before, ordering PCBs, assemblying many devices, and then trying to ship them 2024-06-04 18:53:38 I priced it at $150 just to cover costs basically 2024-06-04 18:53:56 And pay for my own My4th 2024-06-04 18:54:13 and a _bit_ of profit to do other Forth endeavors. I'm not doing it to survive in the slightest. 2024-06-04 18:54:47 (I think I make about $50 CAD a board when I sell) 2024-06-04 18:55:00 So yea. My stock is currently 4. 2024-06-04 18:55:36 I will accept PayPal, Bitcoin or Ethereum 2024-06-04 18:55:43 (not a joke) 2024-06-04 19:08:10 Wait. Mecrisp must be part of vfxforth or something...? 2024-06-04 19:08:13 > Small standalone Lite target ARM/Cortex and MSP430 2024-06-04 19:08:18 Forth 7 cross compiler 2024-06-04 20:58:02 How do you do structured data in forth? Only structs? What about tuples? 2024-06-04 21:00:38 in forth you create your own structures of any size by allocating cells 2024-06-04 21:01:08 the data types are the ones you create 2024-06-04 21:04:24 Hm 2024-06-04 21:04:28 https://www.embedded.com/20th-anniversary-forth-data-structures/ 2024-06-04 21:04:46 there are many examples online of how to build them 2024-06-04 21:08:28 I'm embedding my own forth inside php, so I can kinda design whatever primities i want. Still, a bit stuck on represetnation - logic vs structured data. 2024-06-04 21:09:05 primitives* 2024-06-04 21:09:34 My solution is a conversion from S-expression representation. I think I need to take a step back. :) Redesign a proper Forth DSL. 2024-06-04 21:10:20 You could make use of PHP data structures 2024-06-04 21:10:20 You just need words to interface to them 2024-06-04 21:10:34 Good point 2024-06-04 21:10:57 I kinda do for words that save data 2024-06-04 21:12:09 Hm where do forth save variables? I was hoping a stack was the only environment I needed, but now I'm not sure... 2024-06-04 21:12:28 it's a whole thing with memory layout 2024-06-04 21:12:38 kk 2024-06-04 21:12:58 you don't have to emulate it, obviously 2024-06-04 21:13:05 Maybe I can use ! and @ to save/fetch from a PHP assoc array, as an environment. 2024-06-04 21:13:11 dlowe: right :) 2024-06-04 21:14:27 IIRC, var defines a word with that returns a literal memory location 2024-06-04 21:14:44 so VAR FOO makes a word FOO that returns, say, 1000 2024-06-04 21:15:19 Then FOO @ will put 1000 on the stack, and then @ will dereference it and push that value 2024-06-04 21:23:42 Mhm