Re:TwinLisp
by omouse on Saturday August 02, 2008 @10:42AM
(#264987)
But you must admit that making a Lisp dialect is a good learning exercise heh. I don't see newbs learning Perl, Python, C++, Java, etc. by writing their own dialect or interpreter for them.
Just "defmacro" and get back to solving your real problem.
Re:TwinLisp
by jrockway on Saturday August 02, 2008 @12:34PM
(#265039)
Learning isn't a real problem?
If you are just doing something for fun/learning, there is no need to release it to the world. I've written lots of programming languages, but I don't expect anyone to use them.
I don't see newbs learning Perl, Python, C++, Java, etc. by writing their own dialect or interpreter for them.
Re:TwinLisp
by omouse on Monday August 04, 2008 @07:11PM
(#266895)
Exactly. The Internet is big enough that you can ignore the millions of learning projects that exist. It's not like we're running out of space or anything ;-)
Re:TwinLisp
by tokipin on Saturday August 02, 2008 @12:03PM
(#265027)
CL is pretty ugly. Scheme isn't so hot either. it's the reason i stayed away from lisp in general for a good half year until Arc came out. it's like these languages had a chance to be pretty due to lisp's streamlined syntax... but they ruined it by using excessively verbose names and abusing the parentheses
Re:TwinLisp
by jrockway on Saturday August 02, 2008 @01:39PM
(#265088)
For every excessively verbose identifier in CL, I can give you another that's excessively short. I won't defend any of CL's design, it's horrible. But it's not a major problem for actually using the language, you can rename whatever function you want, or have your editor type it for you.
As for the parentheses, I don't see any excess.
(let (foo bar) ...)
and
(let ((foo 0)(bar 1)) ...)
are both useful. I would hate to have to write:
(let (foo nil bar nil) ...)
just because you're afraid of a few parentheses. It is easy to type and easy to read. (foo nil bar nil) is, IMHO, nearly unreadable.
Edited to add: Another reason I like the ((var binding)...) syntax is because it keeps the core language as unambiguious as possible. If I want to have an Arc-like binding operator, I can just write one and use that:
(my-let (foo 1 bar 2 baz 3) (+ foo bar baz)) ; ==> 6
Re:TwinLisp
by tokipin on Saturday August 02, 2008 @06:27PM
(#265244)
Arc's is:
(let foo 0 ...)
(and what rkts wrote, due to Arc autodestructuring things.) the multi-bind is with
certainly things can be renamed, but personally i feel that if you don't go the extra mile for your users, someone else will, and you probably don't deserve success
Having said all that, however, I have written my own interpreter in C for my own Lispy language, which I continue to develop (and use a lot for real tasks).
Re:TwinLisp
by rkts on Saturday August 02, 2008 @12:59PM
(#265057)
You don't have to program directly in an AST to do metaprogramming. It's a trade-off: some people feel it's important to make metaprogramming as easy as possible, while others feel it's more important to have readable syntax.
Every Lisp dialect has some high-level syntax, e.g. quote, CL reader macros, and Arc ssyntax. These obscure the relationship between code and the underlying AST, but the designers felt that the gain in readability was worth it.
How much syntax should there be? A hard question, but I think it would be good for Lisp to move in the "more" direction. Readability is one of the big problems I have with Lisp, and macros, while certainly useful, make up only a small fraction of my code.
Re:TwinLisp
by dehowell on Saturday August 02, 2008 @11:17AM
(#265002)
I'm so pissed that I upvoted you, now that I've seen your contributions to other threads. But hey, you managed to finally make a comment that didn't call someone gay or disparage gay people... maybe some positive reinforcement will help you grow up. Good job!
But yes, I can't for the life of me understand why someone would want to use TwinLisp.
Re:TwinLisp
by logjam on Saturday August 02, 2008 @04:45AM
(#264885)
"TwinLisp is a language with C/Java - like syntax, but with internals and abilities of a Common Lisp"
Um...C/Java syntax <i>and</i> the abilities of Common Lisp....and the webpage says s-expressions aren't needed to build macros....ummm...ok, could the author show us a few TwinLisp macros?
The point of Lisp is that you don't need to invent your own language. Just "defmacro" and get back to solving your real problem.
Just "defmacro" and get back to solving your real problem.
Learning isn't a real problem?
If you are just doing something for fun/learning, there is no need to release it to the world. I've written lots of programming languages, but I don't expect anyone to use them.
I don't see newbs learning Perl, Python, C++, Java, etc. by writing their own dialect or interpreter for them.
This language is more like C++ or Java than Lisp.
There's no need to keep it from the world either.
As for the parentheses, I don't see any excess.
and are both useful. I would hate to have to write: just because you're afraid of a few parentheses. It is easy to type and easy to read. (foo nil bar nil) is, IMHO, nearly unreadable.Edited to add: Another reason I like the ((var binding)...) syntax is because it keeps the core language as unambiguious as possible. If I want to have an Arc-like binding operator, I can just write one and use that:
certainly things can be renamed, but personally i feel that if you don't go the extra mile for your users, someone else will, and you probably don't deserve success
Even simple stuff like doing, e.g.,
can really help.Having said all that, however, I have written my own interpreter in C for my own Lispy language, which I continue to develop (and use a lot for real tasks).
And actually, SBCL is nearly as fast as C in many cases. So there's really no reason to not use CL, unless of course you don't like CL.
Every Lisp dialect has some high-level syntax, e.g. quote, CL reader macros, and Arc ssyntax. These obscure the relationship between code and the underlying AST, but the designers felt that the gain in readability was worth it.
How much syntax should there be? A hard question, but I think it would be good for Lisp to move in the "more" direction. Readability is one of the big problems I have with Lisp, and macros, while certainly useful, make up only a small fraction of my code.
But yes, I can't for the life of me understand why someone would want to use TwinLisp.
Um...C/Java syntax <i>and</i> the abilities of Common Lisp....and the webpage says s-expressions aren't needed to build macros....ummm...ok, could the author show us a few TwinLisp macros?
mac &infinite-loop (body) {
`do () { $@body }}
S-expressions are permissible, so maybe it would be best to stick to those until you wrap your head around this crazy infix notation.
Perhaps we could see a macro example just slightly more complex.