You are not logged in.
Hmm, why not use a Makefile rather than a custom script called make?
Offline
Hmm, why not use a Makefile rather than a custom script called make?
Because, in my opinion, this is simpler. The custom script allows me(/us) to tune the build process however we like. I actually used a Makefile at first (before publicly releasing punt), but it just didn't feel right.
Offline
(You must've seen this coming.)
One user was having a problem where certain essential structs started containing gibberish. I tested this on my other computer — a PPC machine — and realized something: my code is a huge pile of ass-suck. It's sloppy and juggles pointers like a clown on speed. This is a bad thing.
I'm rewriting it.
Offline
(You must've seen this coming.)
my code is a huge pile of ass-suck. It's sloppy and juggles pointers like a clown on speed. This is a bad thing.
A real dev would have called that a feature and renamed the language "juggalo"...
"juggalo... it juggles pointers like a clown on speed!"
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
A real dev would have called that a feature and renamed the language "juggalo"...
"juggalo... it juggles pointers like a clown on speed!"
Rewriting shouldn't be too hard, given that most of the real effort was in the tokenizer/parser/lexer/whatever.
Offline
After a lengthy discussion with vkumar over IRC (#punt), I've started work on the second incarnation of punt. This one will be... well... better.
Offline
And punt.2 now seems to be stable! Currently there are no modules, but it does have more built-in functions (it's stupid to shove everything in modules).
If you can spare the time, please give it a try — the last incarnation seemed to have trouble with 32-bit, although preliminary tests on a ppc32 machine indicate it works.
Offline
Hi! Where your python based languages similar to punt, or were they completely something different? I'm interested in language design, and have rolled one out in Lua; I was wondering if you have any tips, as you seem to have a good idea, and yacc/bison are quite intimidating.
There is a difference between bleeding [edge] and haemorrhaging. - Allan
Offline
Hi! Where your python based languages similar to punt, or were they completely something different? I'm interested in language design, and have rolled one out in Lua; I was wondering if you have any tips, as you seem to have a good idea, and yacc/bison are quite intimidating.
The Python ones were of widely varying similarities to punt. The first was sort of like it, but completely bastardized the idea of s-expressions; the second was kind of PHP-like; the third went back to s-expressions, but had an absolutely hideous runtime system. I also implemented a stack-based one in C++; it vaguely resembled Forth (although much more high-level).
As for tips:
* Make the core interpreter as small as possible. Don't include anything that can be implemented elsewhere.
* The parser should be small and fast, preferably iterative. Don't use yacc or bison.
* Don't be afraid to do a complete rewrite. It gets rid of old bugs and has the advantage of helping you learn from your mistakes.
* It's best not to write it in a high-level language (Python, Perl, Lua, Ruby, PHP, or even C++). If you're just getting a feel for language design, this is okay, but don't use it in a production version. (Hint: C.)
* First-class functions are good.
* Make the syntax as rigid as possible. Don't write in any exceptions or special cases, because your language will probably become unmaintainable bloat.
* Test constantly. Don't write a huge chunk of code all at once and then expect it to work.
Last edited by Peasantoid (2009-06-22 23:24:04)
Offline
Have you developed any more punt? Also would it be possible to see the programs you developed in python?
For your own parser, do you take each line, evaluate it and the follow through the statement? Furthermore, did you see the Lemon parser as an alternative to yacc/bison?
There is a difference between bleeding [edge] and haemorrhaging. - Allan
Offline
Have you developed any more punt?
Yep. Mostly basic stuff; see this link if you want to help us out.
(Please, please write something for us.)
Also would it be possible to see the programs you developed in python?
Eh... they really suck. Actually, 'really suck' does not do them justice as to how mind-bogglingly sucky they are. In other words, no — I'm ashamed of my terrible, terrible code.
For your own parser, do you take each line, evaluate it and the follow through the statement?
The parser isn't line-based. It's a { for(i = 0; i < strlen(str); i++) { ... } } sort of thing. Take a look at tokenizer.c to see how it works.
punt assembles the *entire* file into a list of tokens, then runs it through the engine.
Furthermore, did you see the Lemon parser as an alternative to yacc/bison?
Say what now?
Offline
OK, thanks
I have looked at the code, it just doesn't make a lot of sense; I haven't quite gotten around to fully understanding all of C's complexities. Here is lemon http://www.hwaci.com/sw/lemon/ parser.
There is a difference between bleeding [edge] and haemorrhaging. - Allan
Offline
Bumpity bump-bump.
Any news?
There is a difference between bleeding [edge] and haemorrhaging. - Allan
Offline
Eh, not really. I've been too busy fooling around with uzbl to write any modules. Dunno what happened to the other contributors.
Offline