Claude Marinier
2014-04-29 17:24:59 UTC
Bonjour,
I was inspired by reading "The joy of Joy" and other things about
concatenative languages. Conca is an interpreter for a language like Joy
and Cat. It is still young and is missing file output. It can do a few
things. Here is a quick example.
C:\Util\conca>conca
conca 0.5, built on 2014-04-23
define built-in words
define parser and evaluator
language. I could not think of a good reason to deviate from the postfix
syntax to handle definitions. Is there a technical reason Cat and Joy use
something else?
- Joy
square == dup *
- Cat
define square { dup * }
I am not sure how to deal with errors. Currently, Conca prints a message
and skips the rest of the line. Should errors in a script be treated
differently? So many choices to make. This is more complicted than I first
thought. :-)
You can get a Win32 binary distribution here. It includes a Fibonacci
definition script and a test script.
http://sourceforge.net/projects/conca/
I will read and consider comments. If there is interest, I may develop it
further.
Merci.
P.S. Has interest in concatenative languages wanned in recent years?
I was inspired by reading "The joy of Joy" and other things about
concatenative languages. Conca is an interpreter for a language like Joy
and Cat. It is still young and is missing file output. It can do a few
things. Here is a quick example.
C:\Util\conca>conca
conca 0.5, built on 2014-04-23
define built-in words
define parser and evaluator
[dup *] "sq" define
12 sq .
14412 sq .
[1 2 3 4 5 6 7 8 9] [sq] map .
[ 1 4 9 16 25 36 49 64 81 ]"fibonacci.conca" load
18 fibonacci .
[ 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 ]18 fibonacci .
quit
You will notice that Conca definitions are postfix like the rest of thelanguage. I could not think of a good reason to deviate from the postfix
syntax to handle definitions. Is there a technical reason Cat and Joy use
something else?
- Joy
square == dup *
- Cat
define square { dup * }
I am not sure how to deal with errors. Currently, Conca prints a message
and skips the rest of the line. Should errors in a script be treated
differently? So many choices to make. This is more complicted than I first
thought. :-)
You can get a Win32 binary distribution here. It includes a Fibonacci
definition script and a test script.
http://sourceforge.net/projects/conca/
I will read and consider comments. If there is interest, I may develop it
further.
Merci.
P.S. Has interest in concatenative languages wanned in recent years?
--
Claude Marinier
Claude Marinier