Live data from Hacker News

Kamby – A programming language based on Lisp that doesn't seem like Lisp

kamby.org

11–20 of 53 posts

Re: Kamby – A programming language based on Lisp that doesn't seem like Lisp

#11

Browsing the source code, I came across something completely unexpected. I didn't know you could put code in structs like this sample from kamby/kamby.c struct KaNode *ka_add(struct KaNode *node, struct KaNode **env) { if (node->type == KA_STR && node->next->type == KA_STR) { struct KaNode *output = ka_str(node->str); strcat(output->str, node->next->str); return output; } return ka_num(node->num + node->next->num); }…

That's not a struct. It's a function called ka_add that returns a pointer to a KaNode

Re: Kamby – A programming language based on Lisp that doesn't seem like Lisp

#12
post #10

Did someone just reinvent Rebol/Red?

I wish someone would reinvent Rebol/Red with understandable scoping rules. One of the few reasons I don't use the language is because the scoping/binding rules are just completely inscrutable.

Re: Kamby – A programming language based on Lisp that doesn't seem like Lisp

#13

What is Kamby? A small, embeddable and convenient language for who want to use and understand what is happening behind the scenes. The core is just ~400LOC and binary has just 20kb.

The more I explore the github, the more amazed I am... the same code compiles to WASM too? Thanks!

Re: Kamby – A programming language based on Lisp that doesn't seem like Lisp

#14

What is Kamby? A small, embeddable and convenient language for who want to use and understand what is happening behind the scenes. The core is just ~400LOC and binary has just 20kb.

The more I explore the github, the more amazed I am... the same code compiles to WASM too? Thanks!

yeah! And you can test an run it in official website.

Re: Kamby – A programming language based on Lisp that doesn't seem like Lisp

#16
I think it's great that people create new languages. It's fun and a good learning exercise. For this language I'm very unclear on the scoping rules, and the dynamic environments look quite hard to reason about. I can't imagine ever using the language, but I'm pleased the creator is exploring some off beat ideas.

Re: Kamby – A programming language based on Lisp that doesn't seem like Lisp

#17
post #3

And yet its still filled with unncessary parentheses like an involuntary tic.

Lisp code tends to have fewer delimiting punctuation characters than most algol style current languages. I think people tend to dislike languages that have only the minimum necessary, because it's easy to misread code then and redundancy helps compilers catch mistakes as inconsistent syntax.

But there's always Forth for the the lighter taste in delimiters: https://github.com/TexTerry/forth-examples/blob/master/pasca...

Re: Kamby – A programming language based on Lisp that doesn't seem like Lisp

#18
post #3

And yet its still filled with unncessary parentheses like an involuntary tic.

At a glance it appears to have less punctuation than Python. Slightly more than YAML. Do you want ambiguity? This is how you get ambiguity.

Re: Kamby – A programming language based on Lisp that doesn't seem like Lisp

#20
Hi! This looks super cool. I'm curious at what inspired you to implement variable stacking. At first I was like "whaaaaat", but then I thought, "maybe everything being a stack is useful?" Maybe for like immutable state or something.

Anyway again very inspiring :)

Post reply on HN