freenode/#lisp - IRC Chatlog
Search
16:07:54
dim
also changed a build+walk into a build-time for a recursive data structure with “chapter numbering”, which is nice
16:19:45
beach
It would be illegal, because the book has a copyright which makes it illegal to copy it.
16:20:56
pjb
listpr: you will have to wait 70 years after the death of the authors. Next time, be more careful who you elect to make your laws!
16:21:05
beach
I am sorry to tell you that this is the case, especially since we are on freenode, but that's the law in most countries who signed the Berne Convention.
16:24:40
pjb
Big companies are also against software patents. It's a burden for them too to have to build patents portfolio to avoid lawsuits…
16:25:58
beach
They ought to be against software patents. It is not that clear to me that most of them actually are. I often find that companies do not act in their own best interest.
16:31:20
Shinmera
PAIP is pretty expensive due to it not being in print anymore, but I don't regret spending the money on it that I did
16:33:02
beach
I don't regret buying it either (I bought it when it was still in print). But I can understand people who (need to) have different priorities in their budgets.
16:33:33
Xach
It can occasionally be found used on ebay for a fraction of the normal used cost. (I realize this only works if you have easy access to ebay and cheap shipping.)
16:34:24
_death
Norvig mentioned to me some years ago that he planned on making it freely available, so somebody may want to inquire him on the matter
16:37:15
Shinmera
That doesn't go that far back, unfortunately, but they've been pretty close during my lifetime.
16:38:35
beach
_death: Norvig might not be at liberty to do that. I am pretty sure it would require some negotiations with the publisher.
16:38:57
Shinmera
Oh, this site allows you to go back really far: https://tradingeconomics.com/switzerland/currency (click "historical" and then "max")
16:47:46
beach
jasom: In fact, it is not very much about AI at all, other than the example domains that have been chosen. It is more about general techniques for programming in Common Lisp.
16:48:12
Shinmera
Well, I would say it is very much about AI, but perhaps not in the way that we like to think of AI.
16:48:19
jasom
ACTION is surprised that a book can be going for high prices used and not be in print (assuming someone has the rights to publish it). It's not that expensive to print a book, so unless Norvig is guaranteed unreasonably high royalties, they're leaving money on the table.
16:48:29
Shinmera
It would perhaps be more appropriate to say that it's about general problem solving techniques.
16:49:11
jasom
It's from an era when AI was more about teaching machines to solve problems through first principles rather than probabalistic techniques
16:51:17
Shinmera
ETH's library is so immense it's practically guaranteed they have a copy, but I never checked, heh
16:51:56
Shinmera
Eidgenössische Technische Hochschule (Federal Institute of Technology). Switzerland's top university.
16:53:29
jasom
hah, my neighbor also speaks swiss german which is frustrating because I know enough german to barely get by in germany which means I understand less than 10% of the words he speaks
16:53:45
shrdlu68
Wasn't the only lisp book I found, also found a seemingly little-known gem of computational semantics written by Wilks and Charniark, and other fun stuff.
16:54:42
Shinmera
jasom: So he talks Swiss German with you? That's kinda rude. A lot of people will switch to German if they know the other doesn't speak Swiss.
16:57:05
jasom
thought it's been long enough since I've been to germany or austria that german is rapidly moving into that category too
16:57:50
jasom
haha "I know all of those words, just not well enough to understand how they fit together"
16:58:10
beach
ACTION vanishes because his (admittedly small) family is announcing that dinner is ready.
16:58:43
jasom
Shinmera: read beach's papers if you get a chance, he has most of then up on the web and they are quit accessible with just a bit of extra reading
16:59:27
jasom
beach apparently hasn't learned the fine art of sounding more erudite by obfuscating your language that many other PhDs seem to use...
17:00:02
jasom
And also having exactly one less diagram than would be needed to easily communicate your point.
17:01:33
jasom
one of my former profs had a great article on how to insult CS researchers. https://www.cs.purdue.edu/homes/dec/essay.criticize.html
17:08:01
jasom
I took a class taught by him after spending two summers working on ATM (the protocol, not the bank machine) switches; his shelf looks like this: https://www.cs.purdue.edu/homes/dec/books.html ... there may have been some culture clash there.
17:25:15
dim
PAIP also introduces a notion of Data Driven Programming that has nothing to do whatsoever to https://en.wikipedia.org/wiki/Data-driven_programming ; are there other public references to the idea?
17:30:22
dim
“This style of programming is called date-driven programming, because the data (the list of rewrites associated with a category) drives what the program does next. It is a natural and easy-to-use style in Lisp, leading to concise ans extensible programs, because it is always possible to add a new piece of data with a new association without having to modify the original program.” PAIP, p. 41
17:31:12
dim
I would like to compare that to proper database modeling, so public references of the same idea (not the one in the wikipedia page with the same name) would be good. Ideas?
17:43:02
didi
How would you write a ZIP function that continues until it consumes the largest list? e.g. (zip '(1 2) '(3)) => '((1 3) (2))
17:43:03
_death
dim: the wikipedia article is pretty bad, but I wouldn't say the two notions have "nothing to do whatsoever" with each other
17:45:17
dim
table-driven is more like what I had in mind apparently, from a couple refs on the top of a google search, thx
17:47:13
jasom
didi: if it were fixed arity it's easy enough: (loop for a on l1 b on l2 while (or a b) ...)
17:48:40
dim
didi: create an extended list/array of the right size first? make-array ... then replace?
17:49:38
jasom
didi: non-fixed arity (loop for lists = args then (mapcar #'cdr lists) while (member-if-not #'not lists) ...)
17:50:46
jasom
didi: untested, but possibly complete: (loop for lists = args then (mapcar #'cdr lists) while (member-if-not #'not lists) collect (mapcar #'car (remove nil lists))
17:53:55
jasom
the fact that it worked on the first try without me even opening it in emacs to write it makes me think it's not too bad
17:54:49
jasom
I'm open to suggestions for "contains at least one non-nil" tests that are less cute than (member-if-not #'not ...)
17:56:05
jasom
line by line: "set lists to all of the lists, then the cdr of all of the lists" "while there is no item in the list for which #'not returns false" collect the car of all non-nil lists
17:58:43
jasom
until (every #'null lists) might also be a clear test; open to suggestions for which is better
17:59:57
jasom
A well written loop should read quite closesly to how you would explain what the code does, and I think this follows that rule.
18:11:46
mfiano
(some #'identity '(nil nil nil "contains at least 1 non-NIL" 1 2 3)) => "contains at least 1 non-NIL"
18:15:03
jasom
http://paste.lisp.org/display/355759#3 ; "set lists to args then the cdr of each arg" "while lists contains some non-nil items" "collect the car of all non-nil items"
18:16:35
jasom
didi: yeah, and performence is likely not a concern since you're not going to be zipping up hundreds of lists (I hope)
18:17:57
jasom
and it's reasonable to assume that the lists will be similar in size, so just one test for the majority of iterations
18:56:00
didi
I've read PCL's chapter on conditions and restarts many times, but I think this is the first time I will actually use the feature.
19:45:37
phoe_
you can (STRING-TO-OCTETS string :EXTERNAL-FORMAT :UTF-8) and this will produce a sequence of bytes for you that you can then dump into a file.
21:17:08
jmercouris
hello everyone, I'm having a strange error using clos: https://pastebin.com/EVfTeSbP
21:17:31
jmercouris
it says unknown initialization option :X, but I have defeined :initarg X in my class
21:18:35
green_
question: I am creating a stand-alone lisp app with buildapp (which dumps an sbcl image). The application needs the contents of a file at runtime. I would like to load that file into a variable at compile time so it will be built into the image, and I don't have to read it at runtime. I've tried variations of eval-when, but just get mystery errors.. any pointers on how to accomplish this?
21:19:39
Bike
(defvar *file*) (eval-when (:compile-toplevel) (setf *file* (read-in-contents))) sorta thing
21:32:29
Shinmera
green_: shouldn't just regular defvar work too? I mean, the sources of your application are LOADed before the image is dumped.
21:42:25
green_
Shinmera, oh, you mean (defvar *FILECONTENTS* (read-file-contents)) ? I ... guess........... hmm.. yes?
21:44:39
Shinmera
Well, when else would the variable receive its value except at its latest at load time