-- Sam Smith Web Developer and Aspiring Chef~ Large file transfers made easy. www.innorix.com/en/DS
Show HN: Full Stack Lisp – A book in progress about writing Common Lisp apps
61–70 of 110 posts
Re: Show HN: Full Stack Lisp – A book in progress about writing Common Lisp apps
#62Earlier quoted context omitted.
Do you mean reader macros? Those are used to implement new kinds of syntax within Common Lisp's parser, the READ function. Even standard parts of Common Lisp syntax are defined this way, such as quote (') or backquote (`). For more examples, see http://lisper.in/reader-macros/ .
Actually the entirety of Common Lisp's parser except for numbers, symbols, and the consing dot are implemented as read macros.
Re: Show HN: Full Stack Lisp – A book in progress about writing Common Lisp apps
#63Alright, controversial opinions time. (Before you downvote me out of spite, consider if this elaborates on why Lisp is still a much better language. That said, I fully realize this is an angry rant… and yes, I did call you a shit programmer.) Oh, and Common Lisp is one of the best languages for graphics programming around, so if you wade through the rant you'll see how stupid and ignorant it is to claim things haven'…
You obviously know quite a bit. Please make your posts valuable to others by being civil and substantive, especially when others know less than you do. Then we all learn.
I like Common Lisp too, and agree with most of the substantive parts of what you've said, but that is less important than preserving this community. We detached this subthread from https://news.ycombinator.com/item?id=11826768 and marked it off-topic.
Re: Show HN: Full Stack Lisp – A book in progress about writing Common Lisp apps
#64Earlier quoted context omitted.
Actually the entirety of Common Lisp's parser except for numbers, symbols, and the consing dot are implemented as read macros.
It's been a while since I looked at the spec, but I think the dot as used in cons cells is part of the left-parenthesis reader macro.
Re: Show HN: Full Stack Lisp – A book in progress about writing Common Lisp apps
#65Re: Show HN: Full Stack Lisp – A book in progress about writing Common Lisp apps
#66Earlier quoted context omitted.
It's just the language. Everything looks the same.
No, I'm use to reading Lisp. Something else, but I'm not a designer and can't quite put my finger on it.
- Line numbering is a little too close to code
- There seem to be two kind of fonts for code, some render bigger than the other on two different devices
- Texboxes are too narrow and as a result the code wraps around a lot.
Maybe this due to my settings. The result might be different in the PDF.
Re: Show HN: Full Stack Lisp – A book in progress about writing Common Lisp apps
#67or you realize Perl, Ruby, Python give you everything good from Lisp anyway with an environment and packages that can talk to the real world, and that macros and metaprogramming are massively overrated and a danger in almost any hands that touch those features. Ask me how long I spent banging my head against the wall trying to get OpenGL working in CMUCL with Alien. Jesus jumping-jack Christ. I can only hope things h…
So where are the:
- AOT compilers to native code
- REPL environments with GUI debuggers, with fix-and-continue?
- Ability to do systems programming without having to use an external language?
- Macros
Re: Show HN: Full Stack Lisp – A book in progress about writing Common Lisp apps
#68Alright, controversial opinions time. (Before you downvote me out of spite, consider if this elaborates on why Lisp is still a much better language. That said, I fully realize this is an angry rant… and yes, I did call you a shit programmer.) Oh, and Common Lisp is one of the best languages for graphics programming around, so if you wade through the rant you'll see how stupid and ignorant it is to claim things haven'…
Scott is right: you can't comment like this here. Personal attacks and name-calling will get your account banned from HN, so please don't do it again. You obviously know quite a bit. Please make your posts valuable to others by being civil and substantive, especially when others know less than you do. Then we all learn. I like Common Lisp too, and agree with most of the substantive parts of what you've said, but that…
This is another troll who calls others 'retarded' to stir up controversy and have fun with it.
Please remove it.
Re: Show HN: Full Stack Lisp – A book in progress about writing Common Lisp apps
#69Earlier quoted context omitted.
> That's my favorite thing really, being able to treat approaches to writing code in the same way we treat the functionality we make using code. You mean ... programming the programming language? > I can package this up ... Not really; it will clash with someone else's use of λ. Read macros do not "package" particularly well. (Racketlang has a good solution for this: you put a #lang whatever directive at the top of a…
named-readtables has largely solved the packaging issue of read macros.
Re: Show HN: Full Stack Lisp – A book in progress about writing Common Lisp apps
#70Earlier quoted context omitted.
I found them useful when I looked at clojure and saw their shorthand syntax for lambdas where #(* % %) is a lambda that takes one argument and squares it. You can get some tidy things that are similar with regular macros but to make it actually equivalent your need to hook into the reader..and that's what reader macros are for. So within the hour I had something that let me write λ(* _ _) The best bit though, is that…
> That's my favorite thing really, being able to treat approaches to writing code in the same way we treat the functionality we make using code. You mean ... programming the programming language? > I can package this up ... Not really; it will clash with someone else's use of λ. Read macros do not "package" particularly well. (Racketlang has a good solution for this: you put a #lang whatever directive at the top of a…
> Not really; it will clash
Nope, named-readtables fixed the clashing reader-macro issue a good while back.
> You mean ... programming the programming language?
Yes, I do. I said it the way I did out of choice, as the 'programmable programming language' phrase has been bandied around so often that, for some, it has lost impact. Maybe that phrase doesn't inspire the same ahah moment in some as it does for other. Saying the same thing in a different way can be enough for someone to pick up something new. (It feels weird writing this down as it's kind of self evident)
> Do you plan to type "lambda" with args enough times to eventually that hour of your life back
I that hour was spent learning about reader macros, learning something new is of value to me, so there is no 'lost hour' to reclaim. Don't you just code for fun some days, without worrying if it is somehow ultimately useful?
> Note how if we take λ(* _ _) and then just move the parenthesis over the Greek symbol, we get (λ * _ _). This saves almost the same amount of typing
Ah ok, maybe this is where we parted mental ways. I'm not interesting in saving typing, that wasn't the goal. The point was to remove a little visual obstruction from what I was doing. For example (and yes it is a trivial example) (lambda (x) (* x x)) is 20 characters long, of which 8 are of interest (* x x) I liked that the shorthand reduced a little visual noise.
Yes there are many ways to skin this particular cat, but I liked the shorthand. I also like not having the lambda in the first position as it maintained a property of lisp code I generally enjoy, that I can run my eyes over the lefthand side of the forms and quickly get a rough feel of what is going on. Again, this is just a personal feeling, but some days I write code just for me, for fun, so why not make things pleasant for myself.
It's rather odd to get into a discussion about this, when the whole point is that we don't have to pick one golden way and enshrine it in the language. It's just a library, use it or don't, it doesn't matter.
Peace