Hypercubed / f-flat_node

F♭ (pronounced F-flat) is a toy language.
http://hypercubed.github.io/f-flat_node/
25 stars 4 forks source link

Embeddable interpreter? #7

Closed ahribellah closed 4 years ago

ahribellah commented 4 years ago

I am quite interested in Fb due to its array language features, but most uses I can think of for it (for my use cases) would be as an embedded language. I see that you're working on serializing state as a JSON object. Is there any chance that there could eventually be an embeddable interpreter that, for example, takes a string of code and returns a JSON of the stack or something similar?

Hypercubed commented 4 years ago

Well, at this time I'm mostly working on the repl... but if you take a look at the tests you can see how I am running f-flat there. It takes a string and returns the stack. You can them use the stack output as you like or convert to JSON.

ahribellah commented 4 years ago

That sounds a lot like what I had been looking for. I'll take a look into that.

Hypercubed commented 4 years ago

Let me know how it goes.... like I said in the readme this is a toy language... but interested in seeing how other use it.