

Show HN: A new language that merges FORTH and Javascript - mchahn
https://github.com/mark-hahn/fjs/

======
mchahn
I have created a new stack language for node and the browser called FJS. It is
a stack language like FORTH but it uses javascript variables and functions. It
is totally interoperable with Javascript. It can use any JS module and can
create modules to be used by JS.

I'd like to point out one big feature of interest to the Node community. All
stack languages easily and naturally support continuations. FJS takes
advantage of this to remove the need to code for Javascript callbacks and
write code in a pure sync style instead.

I designed it some time ago but just implemented it as a weekend project. It
can already recreate the standard http server node example.

It started as a curiosity but it fell together so well it might have a future.
Having a new language start off with the npm library available is awesome.

~~~
MostAwesomeDude
Out of curiosity, do you have any documentation on reifying and reflecting
continuations in pure concatenative languages? I did some preliminary work in
this direction a bit ago, but found that the pure concatenative languages,
like Joy, don't actually have continuations (delimited or undelimited) with
the flexibility that I'd like, and Factor's continuations aren't pure. Factor
cheats in order to get its stack effects to line up, with a separate
continuation stack.

Additionally, if you've managed to crack this puzzle, I'd love to see some
documentation accompanying FJS, because it is a major omission from the
concatenative literature and nobody seems to actually have anything to read
besides the shift/reset white papers.

~~~
mchahn
I don't know what a pure continuation is so I'll have to do a bit of studying
to find out what I have. I'll let you know when I have an answer. You've
really gotten my curiosity up now.

I don't know how long discussions work on old HN items. If we get cut off I'll
continue the discussion on the FJS github issues page.

