Re:Show HN: Cognate – Stack oriented programming in English ...
by stavromulabeta on Monday May 09, 2022 @07:25AM
(#31312835)
Hi everyone,
I just wanted to show off my WIP programming language Cognate, which I thought you might find interesting. It takes inspiration from Factor and Joy, but uses prefix notation. The compiler ignores words starting with lowercase, allowing comments embedded into statements. It is a dynamic, garbage collected language oriented around higher order functions.
Re:Show HN: Cognate – Stack oriented programming in English ...
by mikewarot on Monday May 09, 2022 @06:09PM
(#31320472)
This is an interesting approach. I find myself being sucked into the space between Forth and Lisp. Thanks for showing a working example of a system that uses Case as a color (in the ColorForth sense) for text. The more of these types of systems I see, the more I'm starting to recognize patterns... Def instead of :, swapping the argument orders (prefix/postfix), etc.
It's helpful to me specifically, because I'm trying to tweak a forth like language written in C, and you're giving me a similar framework to compare it against. As a novice C programmer, this is very helpful.
Re:Show HN: Cognate – Stack oriented programming in English ...
by stavromulabeta on Tuesday May 10, 2022 @02:57AM
(#31324308)
I'm glad you're finding Cognate useful. Case is actually a higher order function that builds a closure that performs the pattern match - no compile time execution is involved.
Re:Show HN: Cognate – Stack oriented programming in English ...
by stavromulabeta on Monday May 09, 2022 @12:02PM
(#31315852)
Thanks for your comment! I'm currently focusing on making Cognate small and efficient so I can see it potentially competing with micropython as a scripting language for microcontrollers.
I just wanted to show off my WIP programming language Cognate, which I thought you might find interesting. It takes inspiration from Factor and Joy, but uses prefix notation. The compiler ignores words starting with lowercase, allowing comments embedded into statements. It is a dynamic, garbage collected language oriented around higher order functions.
It's helpful to me specifically, because I'm trying to tweak a forth like language written in C, and you're giving me a similar framework to compare it against. As a novice C programmer, this is very helpful.