You are not logged in.

#26 2009-06-14 22:41:42

Ghost1227
Forum Fellow
From: Omaha, NE, USA
Registered: 2008-04-21
Posts: 1,422
Website

Re: punt: An s-expression-based programming/scripting language

And our first bug is fixed!


.:[My Blog] || [My GitHub]:.

Offline

#27 2009-06-15 06:28:00

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: punt: An s-expression-based programming/scripting language

Hmm, why not use a Makefile rather than a custom script called make?

Offline

#28 2009-06-15 13:37:37

Ghost1227
Forum Fellow
From: Omaha, NE, USA
Registered: 2008-04-21
Posts: 1,422
Website

Re: punt: An s-expression-based programming/scripting language

I'll be fixing that little programming snafu barrucadu...


.:[My Blog] || [My GitHub]:.

Offline

#29 2009-06-15 21:31:24

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: punt: An s-expression-based programming/scripting language

Barrucadu wrote:

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

#30 2009-06-16 00:14:59

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: punt: An s-expression-based programming/scripting language

(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

#31 2009-06-16 00:18:15

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: punt: An s-expression-based programming/scripting language

Peasantoid wrote:

(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 StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#32 2009-06-16 00:24:03

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: punt: An s-expression-based programming/scripting language

Xyne wrote:

A real dev would have called that a feature and renamed the language "juggalo"...

"juggalo... it juggles pointers like a clown on speed!"

lol

Rewriting shouldn't be too hard, given that most of the real effort was in the tokenizer/parser/lexer/whatever. smile

Offline

#33 2009-06-16 21:55:33

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: punt: An s-expression-based programming/scripting language

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. wink

Offline

#34 2009-06-18 19:16:41

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: punt: An s-expression-based programming/scripting language

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

#35 2009-06-22 19:59:17

XFire
Member
From: UK
Registered: 2008-05-11
Posts: 192

Re: punt: An s-expression-based programming/scripting language

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

#36 2009-06-22 23:23:03

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: punt: An s-expression-based programming/scripting language

XFire wrote:

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

#37 2009-06-30 19:21:39

XFire
Member
From: UK
Registered: 2008-05-11
Posts: 192

Re: punt: An s-expression-based programming/scripting language

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

#38 2009-06-30 21:59:39

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: punt: An s-expression-based programming/scripting language

XFire wrote:

Have you developed any more punt?

Yep. Mostly basic stuff; see this link if you want to help us out. wink
(Please, please write something for us.)

XFire wrote:

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. hmm

XFire wrote:

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.

XFire wrote:

Furthermore, did you see the Lemon parser as an alternative to yacc/bison?

Say what now?

Offline

#39 2009-07-01 06:35:47

XFire
Member
From: UK
Registered: 2008-05-11
Posts: 192

Re: punt: An s-expression-based programming/scripting language

OK, thanks smile

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

#40 2009-08-21 17:17:42

XFire
Member
From: UK
Registered: 2008-05-11
Posts: 192

Re: punt: An s-expression-based programming/scripting language

Bumpity bump-bump.

Any news?


There is a difference between bleeding [edge] and haemorrhaging. - Allan

Offline

#41 2009-08-21 19:58:30

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: punt: An s-expression-based programming/scripting language

Eh, not really. I've been too busy fooling around with uzbl to write any modules. tongue Dunno what happened to the other contributors.

Offline

Board footer

Powered by FluxBB