Kamby – A programming language based on Lisp that doesn't seem like Lisp
1–10 of 53 posts
Re: Kamby – A programming language based on Lisp that doesn't seem like Lisp
#2Re: Kamby – A programming language based on Lisp that doesn't seem like Lisp
#3Re: Kamby – A programming language based on Lisp that doesn't seem like Lisp
#4Re: Kamby – A programming language based on Lisp that doesn't seem like Lisp
#5Where are the macros?
https://github.com/henriquegogo/kamby
Still looks awesome; 400LOC is an incredible achievement for grok-ability c:
Re: Kamby – A programming language based on Lisp that doesn't seem like Lisp
#6 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);
}
Is this legal? If so, I'm going to use the heck out of it for my version of STOIC.[Edit] Ok.. thanks for the help.. I'm used to seeing function types declared AFTER the parameters because pascal habits die hard. It looked like a run of the mill structure declaration to me.
Re: Kamby – A programming language based on Lisp that doesn't seem like Lisp
#7Browsing 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); }…
Re: Kamby – A programming language based on Lisp that doesn't seem like Lisp
#8Browsing 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); }…
Re: Kamby – A programming language based on Lisp that doesn't seem like Lisp
#9Browsing 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); }…