It's really trivial for everyone. To start with you only need three classes of characters: parentheses, whitespace, and everything else defines a symbol.
I bought the dragon book long ago. I got about halfway through and it was still on parsing! What a waste. That's not a problem for s-expressions.
That makes me think you might've forgotten what it's like to be a beginner. Imagine teaching a high school student and that every other word you're using doesn't make complete sense to them yet.
That makes me think you might've forgotten what it's like to be a beginner.
Let's put things in perspective: the parser bit of putting together your own lisp is by far the easiest task of all.
Complaining that parsing lisp is hard to a beginner but everything else is accessible makes no sense at all. I mean, a parser for s-expressions requires what? Five or six terminal tokens and three or four non-terminal tokens? That's less than 50loc.
Assuming the developer is competent in their language of choice should rule out anyone who can't write a Lisp parser in their language of choice.
I didn’t write a s-expr parser for the minischeme interpreter I like to play around with but I did use re2c/lemon to generate a parser. Then I got Unicode working…
Couldn’t even imagine what it would take to hand write a lexer that does Unicode properly, even the scheme string and char functions call into generated functions (and a library for utf8 strings) since that stuff is complex.
Also don’t know what tribe 3 is, one of those things the cool kids talk about?
imagine thinking the difference between parsing a string and using a pre-parsed datastructure was "trivial for everyone" because you could count off how many classes of character were involved
one major difference is that you don't have to write the parser at all the other way
Comments
It's really trivial for everyone. To start with you only need three classes of characters: parentheses, whitespace, and everything else defines a symbol.
I bought the dragon book long ago. I got about halfway through and it was still on parsing! What a waste. That's not a problem for s-expressions.
That makes me think you might've forgotten what it's like to be a beginner. Imagine teaching a high school student and that every other word you're using doesn't make complete sense to them yet.
Let's put things in perspective: the parser bit of putting together your own lisp is by far the easiest task of all.
Complaining that parsing lisp is hard to a beginner but everything else is accessible makes no sense at all. I mean, a parser for s-expressions requires what? Five or six terminal tokens and three or four non-terminal tokens? That's less than 50loc.
Assuming the developer is competent in their language of choice should rule out anyone who can't write a Lisp parser in their language of choice.
If you're not undertaking this to learn how to write a Lisp, which includes writing a parser, what's the point? Get this tribe 3 shit out of here...
I didn’t write a s-expr parser for the minischeme interpreter I like to play around with but I did use re2c/lemon to generate a parser. Then I got Unicode working…
Couldn’t even imagine what it would take to hand write a lexer that does Unicode properly, even the scheme string and char functions call into generated functions (and a library for utf8 strings) since that stuff is complex.
Also don’t know what tribe 3 is, one of those things the cool kids talk about?
imagine thinking the difference between parsing a string and using a pre-parsed datastructure was "trivial for everyone" because you could count off how many classes of character were involved
one major difference is that you don't have to write the parser at all the other way