freenode/#lisp - IRC Chatlog
Search
6:49:14
pjb
(expt -10 1) #| --> -10 |# I guess they test (= 1 1.0) #| --> t |# and perform the integer expt.
6:50:07
White_Flame
it also says it "can" return a complex if it's not an integer, not that it "must"
6:51:18
jackdaniel
while #c(-10 0) indeed always collapses to -10, it is a different story for floats
8:12:33
schweers
I have a question, which may be sbcl specific, or may have no meaningful answer. I have fasl files on disk. Is there a way to inspect which optimization qualities were used to build them?
8:23:53
pjb
schweers: alternatively, recompile it with various optimization and compare the generated bianries.
8:29:10
dim
I guess you could also capture the optimization declaims/proclaims and have them available in the fasl, using defparameter or something?
8:36:32
schjetne
I got an hour in Rome myself, as my flight out of Genoa was cancelled and had to reroute. But I did get home on the same day.
8:44:42
schweers
dim: I normally don’t need this information, it is just for debugging purposes after the fact. I want to know if I accidentally used the wrong settings.
8:52:01
splittist
Having read (well, skimmed) the 'proceedings', I wonder if ELS could take a stand for abandoning double-column article format (especially with CL's appropriately-descriptive-identifier-style.
8:52:45
beach
splittist: That would make it more difficult to be associated with the ACM, I would think.
8:54:28
splittist
What a twisted web. And to think some academics give advice on how society should be ordered... (:
9:01:31
splittist
They could pretend they were writing for the Journal of Computing and Cultural Heritage (not too far from the truth); the ACM allows a single column format for that...
9:06:25
pjb
schweers: note that this requires that you reset *gensym-counter* when you compiled the file! ccl seem to have reproducible builds, but I don't know if that's the case with sbcl (often compiler added a time-stamp…)
9:14:40
jackdaniel
reproducible builds are a nice quality but it is not incorrect to have them not being reproducible
9:22:28
schweers
pjb: I’ve successfuly loaded your code into a fresh image. I’m not sure about your example usage. why do you do this? (load (compile-file "~/o"))
10:20:34
refpga
Hi, is cl-graph appropriate for creating an N-ary tree? Are there any better alternatives?
10:27:01
pjb
minion: memo for schweers: I put the code in ~/o.lisp; (load (compile-file "~/o")) is to load it; the following form is to try it on ~/o.dx64fsl or whatever fasl file it is.
10:42:29
fivo
Why does READ continue to return nil if I run (setf *read-suppress* T) (setf *read-suppress* nil)?
10:54:15
Xach
> If the value of *read-suppress* is true, read, read-preserving-whitespace, read-delimited-list, and read-from-string all return a primary value of nil when they complete successfully
10:54:39
Xach
fivo: after that, the R in REPL returns NIL all the time, so the E can't do any more meaningful work.
10:55:53
fivo
ok I have to get used to that the stuff I modifying also concerns the REPL I am playing around with
11:18:31
Xach
fivo: the bare SBCL repl (but not slime) will catch some things and prevent you from making it unusable
11:18:56
Xach
fivo: but not all things. and there may be ways to recover even if you get things somewhat wedged.
11:21:20
pjb
fivo: hence the use of local bindings! (let ((*read-suppress* t)) (read-from-string text))
11:21:54
Xach
for example, you can enter the debugger with C-c C-c and use : to eval (mapcar (lambda (thread) (setf (sb-thread:symbol-value-in-thread '*read-suppress* thread) nil)) (sb-thread:list-all-threads))
11:26:30
selwyn
is it practical or advisable to do image-based development using modern CL implementations? in particular I wonder whether anyone here does this
11:26:58
selwyn
my main fear is borking the image due to some incorrect CFFI call but perhaps there are other drawbacks to the approach
11:30:37
jackdaniel
since your program evolves as you go (i.e you may modify function and compile function which got inlined somewhere), it may be hard to reproduce problems
11:31:33
jackdaniel
or you may use some macro to compile function you use later, then change this macro definition - then your function can't be recompiled, so your program state is not reproducible
12:03:13
pjb
selwyn: I don't think a lot of people do image based development. However, have a look at Image Based Development http://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/ibcl/index.html
12:04:02
pjb
selwyn: the main problem is that we are using posix system that are file based, and we want to keep the sources in files. So all the modifications made in the image have to be saved to files. (and then, commited to git).
12:04:46
pjb
selwyn: however, there's a cl git library. Perhaps you could use to access to the git repositories directly from the lisp image, and pull and push without going thru the posix file system.
12:05:49
pjb
selwyn: some CL implementations let you save an image without killing lisp. In the others, you can usually fork(2) before saving the image, so you can keep working in the parent.
12:06:10
pjb
selwyn: saving the image often will let you fall back to the last snapshot in case of borking.
12:07:42
pjb
selwyn: using image based development usually has the drawback of non-reproductibility. Since we keep mutating the image, we can make it evolve in ways that are not available to batch compiling and loading of systems (eg. thru asdf). Nowadays, being able to reproduce identical build has become an important feature, to ensure the security and validation of binaries.
12:08:26
pjb
But if we worked on image based development tools, I'm sure these problem could be solved.
12:09:33
schweers
I like that we can have both in lisp: build procedures suitable for batch runs, but also load them into an image to work on them interactively. I don’t see a reason to abandon any one of those qualities.
12:09:33
minion
schweers, memo from pjb: I put the code in ~/o.lisp; (load (compile-file "~/o")) is to load it; the following form is to try it on ~/o.dx64fsl or whatever fasl file it is.
12:10:07
schweers
ah, right. pjb: when I tried your code, it just compiled for ages (seems that emacs didn’t like the excessive output), and didn’t print or return anything meaningful :(
12:10:22
pjb
selwyn: or more precisely, ecl doesn't save lisp images. A new lisp image is built each time you initialize ecl (cl_boot).
12:10:50
pjb
schweers: be careful not to put recursive load or compile calls in sources. They were in comments.
12:20:39
schweers
yeah, but it doesn’t seem to print or return anything useful, which seems weird, looking at the code.
12:23:44
pjb
schweers: if it returns NIL, it means that it found no corresponding combination, therefore it means that the build is not reproducible.
12:25:20
Josh_2
Literal worse time for a game jam xD for me my deadlines are the end of this month and the start of next
12:37:15
selwyn
thanks for the replies everyone. did image-based development used to be more popular than it is now?
12:46:23
makomo
jmercouris: the initform is just that, a form ("expression") used to initialize the slot
12:47:27
jackdaniel
or, if you really want to mimic a reader: what you really want is (defmethod name (object) *global-var*)
12:47:32
jmercouris
I'm doing a lot of objective-c lately and the two things are messing with my mind
12:47:54
jackdaniel
or, if you want to do something silly don't initialize the slot and define slot-unbound method which returns *global-var*
12:48:13
jmercouris
Nope, won't do that, already have a solution in mind that doesn't commit war crimes :D