freenode/#lisp - IRC Chatlog
Search
12:18:21
antoszka
Yeah, there's only a handful across the world. Because other ones are occupied by lispers ;)
12:23:29
antoszka
Not sure. Most lisp jobs I've heard about in the recent years were in Europe: Portugal, Finland, UK, Spain, Berlin, Kiev.
12:29:14
schweers
has lisp been used in space travel recently? I think I once heard a war story about lisp on a probe or something, but that was ages ago, if memory serves
12:32:59
phoe
"Debugging a program running on a $100M piece of hardware that is 100 million miles away is an interesting experience."
14:49:33
phoe
Does LOCAL-TIME provide any kind of precise timestamp difference? All I can see is TIMESTAMP-DIFFERENCE which returns a double-float, where I want an integer - seconds or nanoseconds of difference between the two timestamps.
14:50:13
phoe
Or should I create my own function for that based on subtracting two TIMESTAMP-TO-UNIX values?
14:58:20
dlowe
you'll have to create your own function for that. There's easily enough precision in a float to be precise, though.
15:02:27
phoe
I think I'll just use unix timestamp difference that will give me the difference in seconds.
15:02:33
beach
phoe: Usually, the word "time stamp" means some unique, strictly growing value, and it is usually unrelated to absolute time.
15:03:22
phoe
Oh. LOCAL-TIME uses them as values that relate to absolute time. https://common-lisp.net/project/local-time/manual.html
15:05:58
phoe
http://paste.lisp.org/display/351105 <- that's what I have so far, when it comes to describing my protocol for dates.
15:44:42
schweers
phoe: is putting a ~ at the end of each line in the docstring standard practice? I’ve never seen that before, but it seems to be a nice formatting hint.
15:51:01
beach
I use (format nil "...") and then I use ~@ at the end of lines, so that I can indent the following line for better code layout.
15:53:52
schweers
but as defun, defmacro and friends cannot be redefined, I guess the solution beach uses is quite good
15:55:17
schweers
does anyone know why standard names may not be redefined? is it for performance reasons?
15:58:16
beach
schweers: Code that uses your definition would look like normal Common Lisp code, but the symbols will be different because the package is part of the symbol, so the compiler will not attempt to optimize for those.
15:59:29
schweers
beach: now that I know that is legal I know how that works, although I have to admit that I don’t have that much experience with how the reader treats packages
16:01:08
beach
If the reader sees a symbol without a package prefix, it interns it in the package that is the value of *PACKAGE*.
16:04:45
schweers
beach: that is also not quite true, as the symbol `defun' is not interned into my current package, although it has no package prefix. It is only interned into the current package if it is not interned "anywhere else where it is visible"
16:06:52
schweers
when I implemented my subset of the common lisp reader I skipped the whole package thing
16:07:44
beach
"If a symbol whose name is the same as string is already accessible in package, it is returned."
16:08:45
schweers
sadly common lisp package and symbol semantics are not implementable in elisp. At least I couldn’t find any way
16:09:29
beach
schweers: So what I said was true. It does intern it in the current package. However, "intern in the current package" takes used packages in to account through the definition of "accessible".
16:09:59
schweers
well, you said that it happens when there is no package prefix, which is not true by itself :-P
17:05:31
kencausey
I seem to be missing something basic regarding quicklisp. Once I have install some systems end the day, and come back the next day, what is the method for using the systems again? I'm on sbcl Windows. It doesn't seem that sbcl or asdf are aware of the quicklisp paths although quicklisp is loaded (via quicklisp/setup.lisp).
17:10:11
phoe
schweers: exactly what Bike said, I feed this to FORMAT without arguments so I get my line breaks erased for free
17:10:43
kencausey
And I guess while we are on the subject: Does ql:update-all-dists just update the package list or also update previously loaded packages?
17:11:26
kencausey
And I guess the way quicklisp currently works new versions don't actually appear until Zach (or whoever is doing it these days) manually issues the update (roughly monthly?)
17:11:48
Xach
kencausey: the update updates the package list and fetches the latest versions of whatever you had installed.
17:13:35
Xach
beach and/or jackdaniel -- http://report.quicklisp.org/2017-07-17/failure-report/mcclim.html#mcclim_extensions
17:21:01
Xach
and http://report.quicklisp.org/2017-07-17/failure-report/mcclim.html#mcclim-raster-image
17:25:34
jackdaniel
I'll have to add a test for loading all systems separately for mcclim (and simplify the dependency tree), because these errors are quite regular
17:51:08
phoe
"This generic function implements the behavior of the slot-value function. It is called by slot-value with the class of object as its first argument and the pertinent effective slot definition metaobject as its third argument."
17:52:02
phoe
by the broad definition, an accessor is just a function that retrieves or stores data.
17:52:19
Bike
beach: we have, but i'm observing different behavior from an accessor and from s-v-u-c, so i'm adrift
17:53:01
Bike
no, no, i mean i tried some stuff and calling setf slot-value directly does things that setf accessor does not
17:54:26
beach
That is one thing that should not be possible, unless those other things are defined by the implementation only and not generally available to the application programmer.
17:55:54
Bike
cool. just means there's some obscure bug in sbcl with method redefinition, or something
17:55:57
beach
If everything is MOP defined: The class metaclass, the class of the generic function, the slot metaobject, etc., then the accessor may avoid calling slot-value etc.
17:57:24
nosefouratyou
hey I am trying to fix up logv at the moment and I am getting stuck on this issue: https://github.com/nallen05/logv/blob/master/logv.lisp#L31 https://gist.github.com/nosefouratyou/24d444ebe831612192f75f1c3e67f33a
17:57:52
beach
Bike: I am not talking about custom classes and custom methods. I am talking about custom metaclasses and custom method classes.
17:58:43
beach
If all you have is custom methods on custom classed, but the metaclasses are standard, then the slot accessor may avoid calling slot-value-using-class if it is the only applicable method.
18:00:39
beach
That's fine, and in cases like that, the slot accessor may not be able to avoid calling slot-value-using-class.
18:05:16
nosefouratyou
but I had it running today; I removed in and downloaded it again and now I can't figure out what I did to fix it
18:08:25
Thetabit
I'm sure this is dumb, but I am going thru the Slime manual looking at the commands for debugging, but I don't know how to start the debugger without hitting an error first. How do I get into the debugger and then step into the expressions? Am I approaching debugging with the wrong mindset, eg treating emacs and slime like an IDE where I can set breakpoints?
18:08:28
Bike
i'm pretty sure. from the package definition that's cl:defsetf, and defsetf has a defsetf lambda list, and those don't have that list thing.
18:08:47
Bike
Thetabit: it is a bit unusual to do it like that. but you can insert calls to (break) in your code
18:08:48
nosefouratyou
Thetabit: you can use (break) anywhere in your program to trigger the debugger
18:09:29
kencausey
nosefouratyou: Actually, I don't see logv listed in quicklisp currently, I may have misspoken. Is your quicklisp out of date?
18:10:24
Bike
nosefouratyou: try making it optional. (key &optional (log-env-name *default-log-env*))
18:10:29
Xach
https://sites.google.com/site/sabraonthehill/comparison-of-lisp-logging-libraries has some hints
18:10:39
Xach
>> I do want to mention that I have left out at least two. First, logv, which I could not get to compile.
18:11:50
Bike
logv doesn't show up in system-apropos. maybe you have it otherwise accessible from asdf, like from quicklisp local-projects.
18:54:07
phoe
But it looks like I can compress and decompress arbitrary Lisp uint8 vectors, which is good.
18:55:38
phoe
The best part - I needed to build the .so library for Linux myself because the original LZMA makefile from Igor Pavlov only builds binary executables.
19:30:36
phoe
tetero: working out, as in? It works for me so far for trivial arrays, I have not tested it much yet, it's freshly out of the oven
19:34:39
phoe
the header files for LZMA got parsed automatically and I got all the required C functions, types and sizes automagically
19:35:49
phoe
but I spent whole two hours debugging an issue that size_t was eight bytes where I only allocated four - and boom, heisenbugs, image corruptions, drops to LDB and such fun stuff.
19:39:28
phoe
because I thought that I should allocate four there as size_t wasn't called size_t in the original code but had some quirky typedef that made me assume it's four bytes.
20:29:39
otwieracz
Is this possible to kill a thread (or better, send an interrupt) from slime-list-threads?
20:31:44
Bike
https://trac.common-lisp.net/bordeaux-threads/wiki/ApiDocumentation#interrupt-threadthreadfunction
20:41:02
Baggers
otwieracz: swank has both interrupt-thread & kill-thread but I cant recall on the slime side
20:42:15
Baggers
otwieracz: I guess you would (slime-eval `(swank:kill-thread (some-cl-func-to-get-thread))) but I'm not 100% on that
20:50:55
Baggers
otwieracz: does bt:interrupt-thread work? also is it your thread and do you have an idea of why it might be blocking? Where a blocking call is needed it could be worth looking for a similar function with a timeout
21:15:22
Bike
regl: usually i work with subsystems... i think there are directions in the readme now, though
21:17:23
regl
debugger invoked on a UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread #<THREAD "main thread" RUNNING {10031A63F3}>: COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "cleavir-environment" "compile-time">