Hacker News new | ask | show | jobs
Show HN: Cognate – Stack oriented programming in English prose (cognate-lang.github.io)
19 points by stavromulabeta 1502 days ago
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.

3 comments

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.

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.
This is cool - always wondered if something like this was possible/desirable. What do you see as the ideal use cases for Cognate?
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.
Wow, really interesting. I love it!