freenode/lisp - IRC Chatlog
Search
18:41:01
schjetne
francogrex: FASL formats aren't terribly stable from version to version, I'd imagine it would be diffecult to get useful information out of them. Disassemble won't cut it?
18:41:09
jlarocco
might be better to get inspiration from a project that doesn't check in .o and binary files ;-)
18:41:44
jlarocco
if you mean implement "objdump in lisp" as dumping .o files like the project you linked to, I don't think it would be too hard
18:48:08
jlarocco
wikipedia has links to the relevant specs: https://en.wikipedia.org/wiki/Executable_and_Linkable_Format
18:50:29
francogrex
jlarocco: thanks it may be better to start from specs than look into C and translate it to lisp it can turn messy
20:16:48
jasom
"(multiple-value-list form) == (multiple-value-call #'list form)" makes me think I can
20:54:21
aeth
Has anyone integrated l1sp.org searching into emacs yet? It's more useful than search engines because you can e.g. search for #
20:58:20
jihuang
I'm curious: How is SICP such a good introduction to programming? What knowledge will the book impart in me in particular (I'm currrently on chapter 1)?
21:29:58
jkaye
jihuang: In my opinion, it's a great book to get you thinking about programming in an analytical way. Also, starting off with something like scheme keeps syntax out of the way and really lets the reader focus on the concepts rather than the language features
21:42:56
axion
I would say hunchentoot is what most use, as it's mature and familiar, but lots of people have been switching to Woo
21:44:55
aeth
White_Flame: Yes, but I don't trust that for things I don't know about because it's wrong on some things I know about.
21:45:38
aeth
e.g. slime isn't the only IDE, there's slimv for vim. And it really oversimplifies the graphics libraries
21:46:52
solyd_
how efficient is byte array comparison in cl? i have a hash-table with :test #'equalp and byte arrays as keys...
21:49:06
Xach
solyd_: if you know a lot about your data, you might be able to use a different data structure that exploits that knowledge. but it's often best not to worry about it until it's clearly too slow to use the built-in stuff.
21:51:31
solyd_
and another question: if i have (let ((x (something-heavy))) (defun foo () (...))), the something-heavy function will be called once during compilation?
21:51:34
White_Flame
we heavily use nested lists as equalp hashtable keys, and it hasn't been a performance issue (granted, compared to the other stuff we choke the CPU with)
22:14:09
specbot
Evaluation and Compilation: http://www.lispworks.com/reference/HyperSpec/Body/03_.htm
22:17:11
jasom
basically, for a conforming program, *if* you compile it, macroexpand happens when you compile it. You can evaluate forms without compiling them though.
22:17:13
jisfon
When people recommend SICP, they say something around the lines of, "Yeah, go with SICP. It'll teach you information that won't be obsolete in the next five-ten years." What do they mean?
22:17:58
jasom
jisfon: sicp teaches a swath of computer science, and only incidentally scheme programming.
22:18:55
jasom
If you were to read a book on discrete math, most of what you learn won't be obsolete in the next five-ten years (as a revolution in discrete math is unlikely at this point).
22:20:24
jasom
The mechanics of any particular programming language are likely to become obsolete. Even common lisp is quite different from LISP 1.5 in many ways
22:21:23
jasom
I've had programming classes in Pascal, Ada, Fortran, C, C++, Java, and ML. I use exactly one of those languages still today.
22:23:52
jasom
I have on my bookshelf a textbook on error-correcting codes written less than a decade after Shannon's paper, and it's mostly still correct for today (the main improvement being codes that treat the input as something other than a stream of 1's and 0's such as turbo codes)
22:31:05
jisfon
So, what are you saying exactly? What does SICP teach that apparently won't become obsolete in the coming decade?
22:31:54
jisfon
Seems like a superior introduction to programming/compsci than most of what is taught at the uni-level nowadays
22:33:37
jasom
Berkeley still uses SICP I think and MIT still has the SICP lectures online for anyone who wants them
22:34:14
jisfon
Like I said, it seems like a superior introduction to programming/compsci than most of what is taught at the uni-level nowadays
22:34:58
jisfon
The book/course also has amazing reception, so I'm not seeing what was wrong with it.
22:35:23
jasom
http://cemerick.com/2009/03/24/why-mit-now-uses-python-instead-of-scheme-for-its-undergraduate-cs-program/
22:38:57
assterror
* still has lispcraft by robert wilensky on his shelf and common lisp by g. l. steele jr '84
22:39:09
jasom
The only issue I see with SICP in Python is that local bindings in python are implicit and syntactically indistinguishable from assignment
22:40:01
jasom
one of the neat things about SICP is that you are halfway through the book before you even learn about assignment
22:40:06
Lokathor
if you do "for x in xrange(10): i = x", you're left with a spare i variable after the block finishes
22:40:46
phf
i think i remember sussman saying something that essentially boiled down to modern programmers are expected to glue libraries together, rather then write code, so python is more appropriate for that need
22:41:43
Lokathor
so i pointed her at SCIP and told her to go slow and brush up on logic skills and such
22:44:08
Lokathor
she has never programmed in her life. she did HTML in middle school for neopets :P
22:45:13
jisfon
so, SICP is better for someone who's autodidact and wants the best foundation in computer science, rather than someone going to uni to become a...well...code monkey (how I interpreted the above points)?
22:46:30
aeth
As I said in #scheme earlier: if you are looking into SICP, you can just watch the lectures online to see what the book is about. https://www.youtube.com/playlist?list=PLE18841CABEA24090
22:48:48
Lokathor
the lectures sum up a lot of the book, but they definitely leave out things from time to time
22:48:57
jisfon
Yeah, I know; I'm just wondering, since using one to complement the other seems a bit tedious, since the book alone is vaunted as being so gosh darn difficult (overall)
22:52:15
Lokathor
if it comes down to videos or book, go with book. but if you're serious about it you should watch the videos too
22:52:29
Lokathor
the same way that you can learn college courses by just buying text books, but you should also show up to class
22:54:34
aeth
Yes, but you can leave a video or a podcast up in the background while playing a game or something. So it doesn't feel like work. So it definitely can help if you want to be time efficient even when you're not being time efficient.
22:56:01
jisfon
So, SICP teaches the theory of programming at its core, rather than specifics of certain particular branches of programming, like most modern-day uni courses, amirite?
22:56:52
aeth
White_Flame: I agree, though. SICP videos are the only videos I've watched at 2x speed and it definitely helps.
22:57:07
jisfon
aeth, White_Flame: very helpful tips, btw; I have never thought to do what you recommended aeth, and have many times done what you proposed, White_Flame (though at only 1.5x)
22:57:53
aeth
jisfon: well it depends on the game, if you play a game that's e.g. a modern FPS that requires constant concentration and voice chat, it doesn't make sense to try to learn something while doing it
22:58:07
aeth
But if it's a slower strategy game or some sort of simulation game, it makes perfect sense.
23:06:30
aeth
some games I've used as background while listening to lectures, etc.: turn based strategy games, card games (or any other game simple enough to ship with Gnome/KDE), Minecraft, city building games, Euro Truck Simulator 2, etc.
23:07:22
aeth
I heard a professor recommend Civilization once, but it is a bit too fast. Paradox Interactive strategy games are a bit better because they're mostly played on pause (in single player, at least).
23:09:39
Lokathor
freeciv has simultaneous actions, though if you queue movements to happen next turn then all queued actions happen before anyone gets control as the turn starts
23:09:53
aeth
Civilization still requires quite a bit of micro, anyway. In e.g. Paradox's EU4 the micro only really kicks in during war.
23:10:11
Lokathor
the "actual" civilization games are all 100% turn based, allowing for hotseat, play by post/email, etc
23:10:49
aeth
Anyway, it doesn't need to be turn based, it just needs to be slow playing, and allowing pause if the lecture gets into something very detailed. Two monitors can help.
23:11:13
Bike
there are even games like defcon with a "slack off at work" mode! so many possibilities
23:11:13
Lokathor
i like civ2, and civ4... 3 and 5 not so much. here's hoping for 6 and we can say it has the star trek effect
23:11:37
aeth
Lokathor: ah right, I was judging 5, I guess 4 is a better game. The only ones I've played are 2, 5, and Freeciv iirc
23:12:39
Lokathor
freeciv is like a blending of 1/2 with minimal unique mechanics (last i checked), but lots and lots of customization options.
23:13:22
aeth
I didn't mean to get off-topic, I was just strictly mentioning some games that you can play to make SICP Lectures (or other Lisp videos) more tolerable during the slow moments.
23:13:58
aeth
It's a study technique, the games themselves are irrelevant. You could probably get the same effect doodling in e.g. an image editor
23:15:11
aeth
As I said, the only two requirements for a multitasking activity are slow and pausable.
23:16:46
aeth
jisfon: #lispcafe if you wish to continue... or I guess #lispgames if you're talking about game design specific elements in the context of potentially e.g. cloning the game in Lisp
23:17:45
aeth
I should have known that I was going to take the conversation off topic, sorry. It's just a study technique for Lisp studying if you have (Lisp) knowledge in audio form you wish to acquire.
23:19:47
aeth
#lispcafe is for off-topic conversations, ##lisp is for conversations that don't involve CL, #lispgames is for Lisp games (all Lisps, including Scheme), #lispweb is for web (obviously) but you might want to ask web questions in here because that channel is kind of dead, and #scheme can probably more directly answer SICP questions in the context of the language (Scheme) used
23:20:11
aeth
Quite a few redirects depending on how the conversation has gotten derailed from Common Lisp in specific.
23:20:54
aeth
Sorry, ##lisp involves all Lisps including CL, but if the conversation in #lisp drifts into niche Lisps, ##lisp is the channel to move to
23:21:30
aeth
There should probably be a bot to list these channels so people don't have to remember them when the conversation goes off topic.
23:22:53
aeth
minion is a bot? Does minion list channels for redirecting people? That sounds like something that should be done by a bot, not people.
23:31:55
dwchandler
aeth: have you ever seen minion do anything except lookup hyperspec stuff, deliver memos, etc?
23:36:06
minion
other channels: #lispcafe for off-topic, ##lisp for any lisp (not just CL), #lispgames for writing games, #lispweb for web dev
23:47:52
aeth
The list looks complete for Lisp in English. http://irc.netsplit.de/channels/?net=freenode&chat=lisp
23:57:24
dwchandler
I won't be offended if someone were to update minion with a more better list. Go for it :)
23:58:22
aeth
dwchandler: Well there probably needs to be 4 lists, like on the wiki (general, implementation, other languages) and then also having a list for non-CL Lisps (Scheme, Clojure, Arc, etc.) for people who are confused.
0:01:09
aeth
I am busy looking at my Lisp code from yesterday. With a surprisingly low line count, I have managed to wrap enough of CL/SDL to have a basic 3D space flight simulator. No collision, no textures, no lighting, no interiors yet. But it's amazing how complete the actual movement feels from just a few matrix operations.
0:02:16
aeth
wc -l */*.lisp says I have so far used 852 lines in my space flight sim. I wonder if I can get the line count lower.
0:02:46
jasom
scymtym: once I adapted esrap to work with the formal grammar, it was quite mechanical. I did a lot of it while watching TV
0:03:41
jasom
and I should say not formal, but sem-iformal since its a parameterized BNF with a few hand-wavy comments, and no documentation for how much backtracking is allowed
0:04:45
jasom
but 98% of the rules were essentially a straight translation from infix/postfix to prefix
0:05:57
jasom
also there were a couple of * and + productions that would accept ɛ which sends esrap into an infinite loop
0:07:46
scymtym
i suggest stealing the test suite at https://github.com/scymtym/parser.yaml/tree/master/test which is in turn stolen from the haskell reference implementation
0:07:48
jasom
and I did count-constraint repetitions with a macro that generated (or foo (and foo foo) (and foo foo foo) ...)
0:11:35
jasom
scymtym: (! (& foo)) is negative lookahead for esrap, right? what did you have to add?
0:15:29
scymtym
i translated the haskell reference implementation which is where the new constructs came from
0:17:12
scymtym
i think the haskell implementation is close to the spec. the few times i had to consult the spec it seemed like a mostly direct translation
0:18:40
scymtym
it has been a while since i worked on it, but here seems to be one example https://github.com/scymtym/parser.yaml/blob/master/src/grammar.lisp#L652
0:20:05
jasom
I considered going with dynamic variables, but I couldn't convince myself it was safe. I may still modify esrap to allow passing arguments to function rules, since it's ~3 lines total that are different
0:23:22
scymtym
where principle = special variables in combination with nested PARSE calls, i.e. a fresh cache
1:37:11
rme
Devon: There are actually two tickets about that (http://trac.clozure.com/ccl/ticket/1101, http://trac.clozure.com/ccl/ticket/613).
3:37:40
resttime
class-direct-slots returns a list of slots of 'my-class so that just returns the initform of the car
4:37:32
slyrus
I finally figured out how to make org-mode do much of what I use my smarkup stuff for, but I end up writing a fair bit of s-expressions containing what otherwise would be in org-mode/latex/etc...
4:38:56
beach
slyrus: Still working hard on it. Right now I am working on compiler optimizations such as value numbering.
4:39:59
beach
I am planning to use it to eliminate superfluous tests by what I call path replication.
5:20:16
akkad
does sbcl support relative paths with load? and if so is sb-posix:chdir not the right way?
5:22:32
resttime
slackware was giving me extremely weird internet issues earlier, did you get my info about closer-mop manage to reach you axion?
5:23:05
resttime
errr or if anyone else could tell me if they saw it, no idea with my internet at the time
5:24:58
resttime
Bike: thats's good thanks, though repeating again functions of interest-> #'slot-definition-init-form - #'class-direct-slots - #'find-class
5:31:05
drmeister
They made changes to the C++ ABI and Clang can't use libraries compiled with gcc 5.2 unless compiler switches are set properly.
5:35:37
drmeister
That's what you get for not having a clear definition of "Symbol" in your language - I guess.
6:06:30
specbot
*default-pathname-defaults*: http://www.lispworks.com/reference/HyperSpec/Body/v_defaul.htm
6:09:15
akkad
|3b| this works much easier :P http://www.lispworks.com/documentation/lw445/LWRM/html/lwref-172.htm
6:14:44
|3b|
maybe if you are using lispworks (or something else that happens to implement something similar), but it doesn't look portable