Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

> it depends on what you're implementing them in, but in a term-rewriting language all you need is the two lines above

Okay, so what do I type those two lines into to implement that? How many lines of code does that involve?

> more recently i implemented a term-rewriting language in i386 assembly, it's about 800 bytes and 400 instructions: http://canonical.org/~kragen/sw/dev3/qfitzah.s but i haven't quite figured out how to handle arithmetic, i/o, and variadic lists

Have you considered having a parameter stack that arithmetic operators pull their arguments from and push their results onto? Oh wait... ;-)



> so what do I type those two lines into to implement that? How many lines of code does that involve?

i just answered that in the comment you are replying to

> Have you considered having a parameter stack

this is a remarkably bad answer to my explanation of how much code i needed to write a self-compiling forth that generates machine code

what is wrong with you

i am sad now




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: