Replies: 9 comments 2 replies
-
|
LOL, I know what you mean ... I'm like a broken record. So many flavors. C3 is out - unhappy with that one (I should probably delete that repo). Same for C5 - I should probably delete that repo too. C4 has alot more built in, including the editor, blocks, and C-like (%d/%c/%x) output formatting, including SEE. and more string functions built-in (in C). It uses 32-bit cells, which limits the fixed-point functionality (number range). I also have a "C4A" version in it's own repo, mostly for Arduino boards, but I haven't put much effort into that one. It has even more built-in primitives than C4, to maximize functionality on the board right out of the box. CF is much more bare-bones, while still supporting 75+ primitives. I think the VM is like ~280 lines of code, which I think is hard to believe - so much functionality in such a small amount of code. It gives me total of freedom, but I have to build what I want from scratch on the Forth side ... not a bad thing, just different. It supports 32- and 64-bit cells, so the fixed point stuff is more open-ended. So ... yeah, kinda ... CF is my end-game. But I still use C4 a good bit at work. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks! As long as there's an easy way to add a C primitive I think it's better to have just a minimal C virtual machine and everything else in Forth. In my case it would most likely be PipeWire API calls on Linux and Bluetooth and USB audio on Arduino. |
Beta Was this translation helpful? Give feedback.
-
|
It should be very easy, assuming you are fluent with C. I'll update the README with notes about how I go about doing it. |
Beta Was this translation helpful? Give feedback.
-
|
Actually, I'm more fluent with Arm assembly than with C, but I know how to interface with C libraries. ;-) |
Beta Was this translation helpful? Give feedback.
-
|
FWIW, I am willing to help out adding some primitives to your fork of the code, if you want. Let me know. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks! I want to try doing it on my own; there aren't that many. The only tricky thing is going to be if I end up needing |
Beta Was this translation helpful? Give feedback.
-
|
Sounds good. FWIW, C4 and CF are more for the PC. For dev boards / Arduino, I would recommend C4A. It has more built into the base EXE, has support for cooperative multi-tasking, already supports littlefs, and has an INO file. |
Beta Was this translation helpful? Give feedback.
-
|
Yeah, maybe I should look at C4 and C4A again ... does C4 also do co-operative multi-tasking? |
Beta Was this translation helpful? Give feedback.
-
|
Let me look at the C4A version first then - I'm still not 100 percent I'll need multi-tasking. The single cores I'm dealing with are fast enough to do audio in a plain old event loop. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Has
cfsupersededc3,c4,c5, etc.? They all seem similar in philosophy - take concepts from Forth, colorForth and Tachyon Forth and build a portable C implementation. Iscfthe "end game?"Beta Was this translation helpful? Give feedback.
All reactions