freenode/#lisp - IRC Chatlog
Search
20:57:49
Posterdati
please I have a problem quickloading lisp-unit2 --> Symbol "*SYSTEMS-BEING-OPERATED*" not found in the ASDF/OPERATE package
22:07:07
pfdietz
When I read json into CL I first turn it into a tree with cons cells, and then walk that tree building objects. But this is json coming from external sources, not written out by cl-json.
22:29:09
pfdietz
cl-json has a lot of CLOS-ness in it, I think. Maybe that would be useful for doing what you want? jsown is more spartan.
22:55:08
no-defun-allowed
Looks like it's mostly doing type inference, like scymtym said it would be.
23:00:20
no-defun-allowed
Hrm, I should install my SBCL over Ubuntu's SBCL (or just start SLIME with my SBCL, I guess). That seems to go badly when I have dependencies like Maxima which I installed from apt though.
23:17:03
no-defun-allowed
Oh, I tried something like that (but probably too stupidly) and crashed SBCL.
23:17:45
no-defun-allowed
"SB-C::%%ALLOCATE-CLOSURES can not be encapsulated" Should I just ignore these?
23:19:21
karlosz
yeah, you don't want to profile stuff that look like functions but aren't actually functions
23:20:07
karlosz
i don't think instrumentation profiling on the compiler will work until the compiler is divided up into packages
23:39:56
no-defun-allowed
Does the technique described in that paper let you allocate closures on the stack?
23:42:01
LdBeth
*no-defun-allowed*: yes, also ALGOL and Pascal do so by default because they limited the use of nested function
23:43:30
econdudeawesome
Hi all. I've become interested in learning lisp, but the ecosystem seems pretty complex. Any pointers on where to start?
23:46:43
LdBeth
econdudeawesome: the link I post introduce ASDF and Quicklisp, they're the tools you need to install any (modern) CL libraries though
23:47:24
no-defun-allowed
Hrm, you can search for a topic in https://www.cliki.net/ and get a list of libraries that relate to it.
23:49:34
econdudeawesome
I'm a data scientist and have spent time in Python and C. I've always heard about Lisp but never thought about diving in. Seems like Julialang is an attempt to recreate it, figured it is worth the time investment to learn it
23:56:03
karlosz
LdBeth: how is the compiler supposed to know if it won't cause trouble if you don't declare?
23:56:43
karlosz
in common lisp functions can be redefined so you can't infer past function boundraries
23:58:18
aeth
SBCL doesn't infer past file boundaries. It does infer past function boundaries. C-c C-k (file compile) is safer than C-c C-c (form compile) because of this. Sometimes you get issues with C-c C-c in Emacs+SBCL, although it's rare. I've only ever encountered it when a function returns a constant string and you change the length of the string and now it gets a (string 64) instead of a (string 63) that it expected.
0:00:08
aeth
In a sense, the whole file boundary thing is a big issue even outside of languages like CL. I think in the LLVM/GCC world this is the issue of "LTO" or "link time optimization" that is a hard problem to do right.
0:00:58
aeth
karlosz: SBCL can make more inferences about standard CL package functions because it has a package lock on them so they can't be redefined, and it might even have type declarations on them, I'm not sure.
0:04:56
aeth
karlosz: ah, okay, you're probably right, because it would always be problematic even without (safety 0)
0:05:49
emaczen
https://plaster.tymoon.eu/view/1646#1648 -- I think the problem is in #'define-ns-range-type
1:00:54
Jeanne-Kamikaze
Hi, can someone help me getting started? I am trying to run the example on this website: http://wookie.lyonbros.com/ I have installed sbcl, quicklisp and spacemacs with slime. When I load the example into slime, or when I run sbcl --script myfile.lisp, I get an error: 'The name "WOOKIE" does not designate any package'. I have installed the package with (ql:quickload "wookie"), but it seems that sbcl on its own won't find it. What am I missing
1:14:14
_death
you need to quickload it every time the script runs, or you can save an image with it loaded
1:15:51
_death
you can also write a system definition for your project saying it depends on wookie, and quickload that or save an image with that
6:03:04
smokeink
setting file position on a stream of type SB-INT:FORM-TRACKING-STREAM i.e. by doing: (file-position stream 50) give this error: "#<SB-INT:FORM-TRACKING-STREAM for ... {DC08F051}> is not positionable" what's the proper way to set the position for such a stream, or is it impossible?
6:04:49
smokeink
I have some reader macros which set the position back into the stream, depending on the form they encounter when (read)ing
6:07:12
smokeink
they work fine, but sbcl's (load ) fails with that error when reading forms with such dispatching macro characters, because it uses SB-INT:FORM-TRACKING-STREAM instead of a normal stream
6:46:28
smokeink
I'll try repeated calls to (unread-char ) instead of (file-position ); it should work
7:12:17
emaczen
https://plaster.tymoon.eu/view/1646#1648 -- can anyone help with passing C structs via libffi via sb-alien?
7:57:02
pjb
smokeink: file-position only works on file-streams. That's why it's called FILE-position, and not STREAM-position or something…
7:57:55
pjb
smokeink: therefore your macro, to be able to "read" back, can only do it if it has saved the input in case of a non-file-stream.
7:58:07
aeth
I suppose if you need to unread e.g. three times, you could write your own buffer for read/unread. As in, even if the character is no longer in the stream, it can be in *your* buffer.
8:02:00
pjb
aeth: exactly. Have a look at the COM.INFORMATIMAGO.COMMON-LISP.CESARUM.PEEK-STREAM package.