freenode/#lisp - IRC Chatlog
Search
16:11:48
trn
I'm likely going to use a 6180 panel like that, because the newer the machines got, the less lights they had, and the more you were expected to look at an operator console.
16:13:49
trn
Probably, the later DPS series of machines looked more like standard racks and the half-sized ones looked like freezers :(
16:15:57
trn
On the 6180 and others I've seen and read the more interesting panels were on the inside of the cabinet doors
16:15:59
trn
https://i.pinimg.com/736x/68/0b/91/680b91e3907ce97558f3b3cc9c888243--evolution-s.jpg etc
16:29:18
trn
It's sort of interesting to me that Honeywell absolutely refused to the idea of a bus in their larger system, and the whole 'bus' was sort of a dirty word - they even abused the 'multiplexer' terminology to avoid 'bus' because they did everything point to point for latency and performance reasons.
16:30:40
trn
Yeah, it's sort of crazy, so attaching 8 CPU's to 8 IOM's needs 64 ports dedicated to that.
16:32:02
trn
The virtual machines 'wiring' code makes this all so much easier than setting these machines up in real life, I'd imagine :)
16:32:53
beach
trn: I need to go help my (admittedly small) family. We just came home from a week at ELS and there is much work to catch up on.
16:33:30
trn
I'll come back and bother you all later - on my todo list is to get the original ITS maclisp ELIZA and SHRDLU code working on multics :)
18:32:58
makomo
i'm looking at the postmodern library for postgresql. can someone tell me the rationale for the global *database* variable instead of having a database parameter in every function?
18:33:57
makomo
well, i know that global variables in lisp aren't the same thing as in other languages
18:34:57
makomo
one thing that isn't clear to me yet is, how does multithreading interact with dynamic scope?
18:34:58
jackdaniel
it may get tedious to carry all contextual varibles to each call of every function (even if function itself doesn't use database at all)
18:35:42
makomo
for example, one thread wants to call the api with one database object, another with another database object
18:35:47
jackdaniel
usually (because there are no threads in CL standard), dynamic bindings are shallow, that means they are not "inherited" from the parent thread (global values are taken)
18:36:15
jackdaniel
I'd recommend reading bordeaux-threads documentation which gives some examples how to do that (and that's basically what implementations do)
18:37:18
gonzojive
Anybody else share a desire for the following SLIME auto completion behavior? "cl-cor:m-co" <tab> -> "cl-coroutine:make-coroutine"
18:37:57
jackdaniel
one important note: when you create threads *always* wrap them in handler-case, even if you do not plan to handle errors
18:37:58
makomo
jackdaniel: i see. but the threads have their own completely separate dynamic environements? the binding for *database* in one thread isn't the same thing as the binding for *database* in another?
18:38:45
jackdaniel
(defvar *foo* 3) (let ((*foo* 8)) (print *foo*) (bt:make-thread (lambda () (print *foo*)))))
18:39:10
jackdaniel
Bike: because otherwise, if you don't catch error somewhere, your thread simply crashes
18:39:48
jackdaniel
this behavior happens at least on sbcl and ecl, but I would be suprised if ccl handles it gracefully
18:40:54
isoraqathedh
How do I invoke a restart on errors emitted by SBCL? e.g. for sb-int:stream-decoding-error, I want to invoke input-replacement, but there's no symbol named that in either sb-int, sb-ext or sb-impl.
18:40:57
makomo
jackdaniel: and rebinding *foo* to something else within the second thread will have no effect on the binding of *foo* in the first thread, correct? so the threads have separate own dynamic environments
18:41:07
jackdaniel
or you are sure that there are no unwind-protect in your code (in with-lock-held)
18:41:33
Bike
isoraqathedh: well you have to find the symbol. i couldn't tell you what it is, though
18:42:09
jackdaniel
but once again, there is no mention of threads in cl standard. different techniques are discussed for instance in a book Lisp in Small Pieces
18:42:40
isoraqathedh
It really is a little bit difficult to search for restart names. The default SLIME outputs only show the name of the package, not the package it's in.
18:42:59
jackdaniel
and that's all help I can provide right now, it is our last night in Marbella and we plan to have a delightful dinner :-) laters
19:17:27
doanyway
is there something similar to a study path for game programmer for common lisp ? I am still working through pcl
19:32:00
doanyway
jackdaniel: not for games but what books should I progress through to get proficient at common lisp
19:33:31
jackdaniel
sweat and tears ;) you won't make a mistake if you study paip (which was recently released to download for free)
19:37:47
doanyway
White_Flame: I finished land of lisp - pcl has been more helpful for my understanding
20:03:16
webchat296_
Hello SBCL question. What I have to do make sure when I execute the saved lisp image it gives me a REPL after executing the toplevel lambda? Currently it executes the toplevel and quits. (sb-ext:save-lisp-and-die "./sayhello" :toplevel #'(lambda () (format t "hello")) :executable t)
20:03:40
webchat296_
SBCL question. What I have to do make sure when I execute the saved lisp image it gives me a REPL after executing the toplevel lambda? Currently it executes the toplevel and quits.
20:10:00
webchat296_
does any quicklisp library provide this functionality? i.e. i save an image by calling a function with something like :repl t
20:12:04
Bike
there are some libraries that provide uniform interfaces to dumping images. there's asdf/image forone. i don't know much about them.
20:13:01
Bike
but also, if all you'redoing is executing something before going back to the normal repl, you could just pass --eval options to the executable
20:17:40
webchat296_
i have some data that i don't want to reload all the time. it lives in the image. something like this:
20:18:50
webchat296_
so what i want is, after i run the saved image .. i have access to *foo* in a repl and i keep on playing with the data
20:19:41
jasom
I can't be the only one to wish that unwind-protect was of the form (unwind-protect cleanup-form &body protected-forms) right?
20:25:35
makomo
i think i might have interested yet another guy for lisp. examples are the key it seems. :-)
20:42:23
jasom
webchat296_: yeah, sorry I didn't read the entire scrollback, you just omit :toplevel and it will do what you want
20:43:02
webchat296_
jasom: i saved an image with :executable nil then did the following in the shell
20:45:23
jasom
webchat296_: my mistake, just leave out the :toplevel (lambda ...) and it will give you a repl by default
20:49:11
webchat296_
jasom: cool it worked! guess i have to look into asdf/image as Bike mentioned to set hooks after image restore
20:52:02
jasom
webchat296_: I don't think the uiop image functions give you access to the default toplevel, but I may be wrong
21:04:28
jasom
webchat296_: internally uiop replaces the toplevel function with one that calls its own hooks
21:06:50
jasom
If you only want to use sbcl, then you can set *image-entry-point* to be sb-impl::toplevel-init and it should work, but that's specific to sbcl
21:09:02
Bike
webchat296_: "[save lisp and die] corrupts the current Lisp image enough that the current process needs to be killed afterwards." says the sbcl manual.
21:12:49
jasom
webchat296_: note that using sb-impl::toplevel-init as the entry point is a hack, you may want to ask on sbcl if there is a better way to save an image that can run some hooks and then enter the REPL.
21:13:56
jasom
If this is just a quick-and-dirty environment you're using for a few days and will throw away, maybe don't spend time on finding the Right Way, but otherwise it may be worth digging deeper
21:14:10
aeth
Data you don't want to reload all of the time? If you make really-big-data in a macro, you can do this (I use it with shaders) to create what effectively becomes a compile time constant: (defmethod make-load-form ((object shader) &optional environment) (make-load-form-saving-slots object :environment environment))
21:14:38
aeth
Then the functions I create with define-shader are trivial functions that just return the constant shader object, with a constant shader source string, etc.
21:17:11
aeth
Oh, in case I was unclear, I have a macro define-shader that creates the shader object... in the macro. So it goes roughly like this: `(defun ,name () ,(make-instance 'shader ...)) where all of the slots are created by functions run at the macro time, not at runtime.
21:18:13
jasom
webchat296_: that looks like it will do what you want and you can just use the sb-ext:save-lisp-and-die without a :toplevel
21:21:04
webchat296_
jasom: cool. now my goal is to fork the process and do the image-dumping in the child. then the parent lives on and i get to save snapshots.
21:41:48
simplegauss
i think i have found a rather strange optimization bug in sbcl, can anyone explain why this happens and/or how to get around it and if it really is a bug? code: https://pastebin.com/z3pb4nA9 . the problem is that it appears if i have a macro that expands to a lambda function, it is optimized differently than if it is handwritten, which is very confusing to me. More confusingly, if I add a layer of "flet" (please see code) to the macro,
21:41:48
simplegauss
the optimization kicks in properly again, despite the fact i'm just copying the same code twice (again, this is confusing in text but clear in the short example)
21:53:10
pfdietz2
This has been fixed in the SBCL repo I believe. Build SBCL from current source and see if it fixes it.
21:57:02
simplegauss
pfdietz2: great! now the scary question: is there a guide to building SBCL on windows? it seems to even be a few versions back on the website
21:58:29
simplegauss
pfdietz2: and from an academic point of view, do you know why such a thing happened? it seems it should have been impossible in any reasonable implementation of macroexpansion
22:06:03
jasom
webchat296_: FYI forking on sbcl is only supported if you haven't created any threads
22:20:45
webchat296_
jasom: is that so? ah .. then do I have to kill all "non-main" threads before doing the fork?
22:23:19
jasom
webchat296_: I think that will work. The issue is that sbcl in the child process doesn't know the fork has happend, and threading plus fork() isn't really well defined to begin with, so if the GC is invoked off of the main thread, Bad Things happen.
22:27:26
webchat296_
jasom: what did you mean when you said "the child process doesn't know the fork has happend" ?
22:29:15
jasom
webchat296_: obviously sb-posix:fork could be changed to do all the work that it required for this to work correctly, but it would be non-portable since posix doesn't define what happens to pthreads on fork
22:32:28
jasom
webchat296_: I think there is a single-threaded slime option, but you lose some features
22:34:26
fe[nl]ix
jasom: what do you mean by "posix doesn't define what happens to pthreads on fork" ?
22:35:26
p_l
though if you have full control over threads in your application, you can actually do a safe fork() with threads
22:35:47
jasom
sorry, it's actually safe so long as you only call async-signal-safe operations until exec is called
22:36:09
jasom
A process shall be created with a single thread. If a multi-threaded process calls fork(), the new process shall contain a replica of the calling thread and its entire address space, possibly including the states of mutexes and other resources. Consequently, to avoid errors, the child process may only execute async-signal-safe operations until such time as one of the exec functions is called. [THR] [Option
22:36:11
jasom
Start] Fork handlers may be established by means of the pthread_atfork() function in order to maintain application invariants across fork() calls
22:37:16
p_l
I believe the problem is getting all threads to sane state in usual programs (read C-derived)
22:40:22
jasom
fe[nl]ix: ah, there are no threads in the child process, so as long as you don't cons, it won't invoke the GC?
22:41:18
jasom
ACTION was using spawn for something, but the lack of a chdir in spawn was making things difficult
22:41:57
fe[nl]ix
so what's safe is to fork, and the child only accesses memory that was allocated outside the GC heap, e.g. stack / C heap / mmap'd memory
22:44:34
jasom
fe[nl]ix: well I can handle windows in it's own file if I have a unix one that works widely without people having to install a non-lisp library or have cc in their path
22:46:18
fe[nl]ix
and rebuild a new SBCL binary with openssl and libfixposix statically linked whenever there's a release or a security update
22:48:29
fe[nl]ix
I would distribute those binaries, and people can use them instead of the official ones
23:28:29
gonzojive
Straw poll: which SLIME completion algorithm do you use? I have been using slime c-p-c, but I'm curious about fuzzy completion
0:43:24
simplegauss
pfdietz: i just compiled the latest sbcl and tested my code, the optimization bug is still there
2:17:34
sea
Hey, is there a way to write an array to disk (format f "~S" ...) along with its type? When I read the array back in, the element-type is gone
2:35:01
beach
sea: No, there is not predefined printed representation for specialized array. You would have to invent your own.
2:37:21
Kevslinger
Indeed. We left Marbella Wednesday morning, and arrive in Philadelphia Wednesday late afternoon.
2:39:20
Kevslinger
The day we left, Philly was very warm. During ELS, it snowed in Philly. This morning, it was very cold, then in the afternoon it was beautifully warm, and now tonigh it is cold again. This weekend is projected to be wonderful, though, so I am looking forward to that.
2:45:51
Colleen
Weather in Philadelphia: Clear at 6°C (feels like 4°C), 48% humidity, 2km/h wind, 1029hPa pressure.
2:53:44
Kevslinger
That is truly unbelievable. The humidity of Pennsylvania is one of my least favorite parts about it. Couldn't imagine even more water in the air