freenode/lisp - IRC Chatlog
Search
4:28:59
cer0
yeah ): ik, i'm starting with land of lisp, but my progress it's a little bit slow with that one.
4:29:40
minion
cer0: look at PCL: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
4:31:50
beach
I do research in programming-language implementation, and Common Lisp is both my target and my tool.
4:32:27
minion
cer0: SICL: SICL is a (perhaps futile) attempt to re-implement Common Lisp from scratch, hopefully using improved programming and bootstrapping techniques. See https://github.com/robert-strandh/SICL
4:42:17
cer0
beach: that's cool, really cool. sorry i didn't recognized you, you seem to be really important among the lisp community ( :
4:44:46
cer0
well, writing a re-implementation of cl must not be a easy task, and seems a lot of people found it useful
4:46:22
cer0
I barely wrote a lisp once, ahah, like, the last year i tried, but, my C skills are so bad. I was following this... buildyourownlisp.com
4:48:51
beach
After my Masters degree, I worked in industry for a few years, and I noticed how insufficient the level of knowledge was in the developers. In fact, insufficiently low for the task at hand. So I quit and did a PhD. The rest is the "traditional" career path.
4:50:38
beach
So, I looked at the first page of buildyourownlisp.com, and I am still amused by the fact that it is often assumed that you need a lower-level language in order to build a Lisp system.
4:53:54
no-defun-allowed
Legend has it #c said the code was terrible, and it manages to screw up evaluation and scoping in terrible ways.
4:54:56
no-defun-allowed
It uses something...sort of like fexprs in place of macros, but it wouldn't work with lexical scoping as there is no environment passed through.
4:55:22
no-defun-allowed
Oh, and LIST doesn't evaluate its arguments, leaving CAR and CDR to do that!
4:56:05
no-defun-allowed
The introduction says these changes are merely "different", and we're all old grimpy farts for complaining.
4:57:02
no-defun-allowed
We researched in #lispcafe, from memory someone that did a PhD in computer graphics, and works in game development.
4:58:32
no-defun-allowed
*grumpy rather. My phone felt like autocorrecting this morning, but not now.
4:59:32
no-defun-allowed
One should be terrified by a book that introduces macros before variables and functions.
5:00:30
no-defun-allowed
Well, he may be in computer graphics, and hopefully not while using C for it.
5:01:55
no-defun-allowed
(See http://buildyourownlisp.com/chapter15_standard_library#conditional_functions for CAR evaluating the CAR of its argument.)
5:04:13
cer0
tbh when i started with python and encountered Fibonacci recursive function my brain couldn't handle it, but now, i'm really comfortable with recursion (:
5:04:31
no-defun-allowed
If I could suggest one thing, it's to hold off writing an implementation of a (small) Lisp before writing some non-trivial code in it, because then you'll have an intuition for what's going on when you write the implementation and test it.
5:05:24
beach
cer0: Great! Recursion is not used much in Common Lisp, and certainly not for linear structures. It is mainly used for things like trees, where the depth is limited, and the alternative would make the code incomprehensible.
5:06:52
cer0
no-defun-allowed: thanks for the tip, i didn't knew it wasn't a good material for starting with cl or lisp in general.
5:07:27
no-defun-allowed
I wrote a crappy compiler about two months in, because I was convinced Lisp implementations didn't compile as they don't dump images like batch compilers.
5:08:55
cer0
like, 4 years someone told me about lisp, and i tried to find a book or something to find out what it was, i guess i installed clisp, but that was it, my english reading skills weren't really good at that time, so, i ended up not reading the book, but i always feel like i wanted to learn lisp.
5:09:56
beach
It is a common thing to confuse on the one hand interactive/batch and on the other hand interpreted/compiled.
5:13:42
beach
That's what was so strange about working in industry. There are all those professional developers who have completely insufficient knowledge about basic software techniques.
5:16:10
no-defun-allowed
I would contradict what I said about getting a feel for the language if I suggested you read a compiler book now.
5:16:18
minion
cer0: please look at LiSP: "Lisp in Small Pieces". This book covers Lisp, Scheme and other related dialects, their interpretation, semantics and compilation. To sum it up in a few figures: 500 pages, 11 chapters, 11 interpreters and 2 compilers. <http://pagesperso-systeme.lip6.fr/Christian.Queinnec/WWW/LiSP.html>
5:17:49
beach
cer0: But when you get around to it, it's a great book. And the English translation is an improvement on the French original :)
5:18:31
beach
Though apparently, the author then wrote a new version of the book (also in French), that has not been translated into English.
5:18:52
no-defun-allowed
Now I work with two compilers: one compiling a Lisp-1 to an abstract machine I made, and the SICL compiler which I will use to compile Common Lisp to the Java virtual machine.
5:22:04
no-defun-allowed
Compiler hacking is quite fun, but it makes a lot more sense when you know what you would need to host the language, and how to build that from the features your target provides if you don't control that.
5:24:13
cer0
Well, It's getting late, see you around beach , no-defun-allowed , thanks for the information. I'll stay away from that buildyourownlisp page. (:
5:28:26
no-defun-allowed
Also, to be honest, I think it's silly the title insists it's "your" Lisp when the code you write is mostly copied verbatim from the book, and the rest are from fairly close-ended questions.
5:31:23
no-defun-allowed
But I find it too easy to complain, so I'll just say that the last two chapters of SICP and all of LiSP is a much better resource. My abstract machine is quite similar to that of chapter 5 of SICP.
7:41:30
MichaelRaskin
«answering a few questions with enumerated options» is exactly how choose your own adventure goes, it is a book with forks that re-converge anyway
7:42:56
no-defun-allowed
I would have to check how the "choose your own adventure" books I read when I was younger go, but there is basically one option for each question.
7:44:25
MichaelRaskin
OK, maybe the references I have seen, with forks and merges, were references to the best of class options
7:45:06
no-defun-allowed
And it's intended to be read linearly, so I still don't get it. But I'd rather not discuss it, because it depresses me that the book may have seen some success.
8:17:12
beach
daphnis: If FOO is a special variable, it is badly named. It should have earmuffs on it.
8:19:42
MichaelRaskin
You could macrolet something right around the loop, then let a macro check the presence of this macrolet and decide before expansion, not in runtime
8:20:56
MichaelRaskin
Or you could just save the external value into a different name using «with», and use the same name for the loop variable as you use outside