freenode/#lisp - IRC Chatlog
Search
16:03:34
ZigPaw
drmeister: Looks sleek. How to get my hands on jupyter lab with sbcl kernel? Is there a tutorial/howto somewhere?
16:11:28
drmeister
I am submitting a pull request to Fredrick with our changes to cl-jupyter that add hooks for jupyter widgets, Tab completion and Shift-Tab completion today.
16:11:59
drmeister
So soon you should be able to get it from the URL above and from github.com/clasp-developers/cl-jupyter-widgets
16:49:50
p_l
or that someone set it a bomb (likely a broken foreign library scribbled over something)
18:58:31
phoe
drmeister: the API is trivial (pun indented) enough for you to be able to make the switch painlessly.
20:04:48
drmeister
What does it take to get quicklisp/asdf to find a system in the ~/quicklisp/local-projects/cl-jupyter-widgets/ directory?
20:05:37
drmeister
I'm rearranging things and I always just put the directory like foo in ~/quicklisp/local-projects/foo and define a ~/quicklisp/local-projects/foo/foo.asd file.
20:06:20
drmeister
Half an hour later I'm burning daylight and this stupid thing won't recognize the system file.
20:10:33
drmeister
If any kind soul could take a look at this and tell me what obvious thing I'm missing - I'd greatly appreciate it.
20:10:42
rpg
drmeister: Can you pass :verbose to quickload and see if that provides any more assistance?
20:12:32
rpg
drmeister: If all of the files are in source, then the :pathname option should be given to the system, rather than put in :components.
20:13:59
rpg
Just to confirm: the asd file is in ~/quicklisp/local-projects/cl-jupyter-widgets/ and lisp files are under ~/quicklisp/local-projects/cl-jupyter-widgets/src/
20:15:00
drmeister
~/quicklisp/local-projects/cl-jupyter-widgets/cl-jupyter-widgets.asd and ~/quicklisp/local-projects/cl-jupyter-widgets/src/* <--- all source files.
20:15:06
rpg
OK, my fix is likely necessary, but not sufficient... ASDF wouldn't have found the source files, but that's a later problem than it not being able to find the defsystem.
20:17:58
random9899
drmeister: and in my quicklisp there were no output-translation from local-projects to .cache/common lisp either....
20:18:50
rpg
drmeister: Have you restarted lisp after installing this system? The reason I ask is that I believe that ASDF eagerly searches for system definitions. But.... I thought it offered a continue restart that would re-initialize. I'm afraid I don't know much about how the Quicklisp wrapper for ASDF works.
20:18:55
drmeister
random9899: Hmmm, I'll be surprised - I have many local-projects directories because clasp has many updated asdf/quicklisp systems that contain implementation specific changes. They all "just work".
20:20:23
skidd0
newbie question: I'm trying to play with a quicklisp package in slime. I've compiled the (ql:quickload "package") and then tried to compile an example (defun ...) but the slime repl says that non of the example's functions are defined (the functions that should be compiled from the "package"). Am I doing this wrong?
20:22:58
drmeister
If I do this first... (asdf:load-asd "/Users/meister/quicklisp/local-projects/cl-jupyter-widgets/cl-jupyter-widgets.asd")
20:23:37
rpg
drmeister: I'm pretty sure that means that the problem is in quicklisp's search, and not in ASDF's search.
20:25:59
random9899
skidd0: do (in-package :croatoan) in a fresh repl and then copy-paste your example again
20:26:34
rpg
drmeister: I think you could also try quicklisp-client::write-asdf-manifest-file "/tmp/manifest.txt" and see what system files QL knows of.
20:26:37
random9899
you load it, then switch to that package in order to be able to use it's symbols
20:26:58
random9899
otherwise if you do your example from top-level then you have to change most of the symbols to croatoan::blah
20:27:41
White_Flame
if you do (use-package :croatoan), then that will import all public symbols into CL-USER for you to use, too
20:27:58
random9899
cause not every symbol comes from croatoan some are just cl, it might also use other packages so other namespaces maybe involved
20:30:19
rpg
drmeister: If these tests reveal that QL isn't finding your system definition, I'd suggest you poke into the guts of Quicklisp-client:LIST-LOCAL-PROJECTS Try tracing ENSURE-SYSTEM-INDEX inside that. That will show what directories QL is looking in. I'm afraid that's all I can come up with.
20:30:55
rpg
I *think* this is a QL bug (or, I suppose it could be a clasp bug) rather than an ASDF bug, but if you find otherwise, feel free to contact me. I'm going out for a while...
20:31:33
skidd0
so the order is (ql:quickload :croatoan) then (in-package :croatoan) then (defun ..ex..)?
20:32:10
random9899
skidd0: or (ql:quickload :croatoan) then (use-package :croatoan) then your (defun....)
20:32:44
random9899
skidd0: right it might say that cause not every system is a package, some systems are just compositions of packages
20:33:21
drmeister
random9899: Thank you - I will. This isn't a completely naive system. I've been using quicklisp successfully for years. It's just today - while I try to separate out some code that should be different systems that I ran into this problem of quicklisp not finding things that I thought it should find
20:35:08
drmeister
I cleared my caches, loaded ~/quicklisp/setup.lisp and then invoked (quicklisp-client:list-local-projects)
20:36:11
skidd0
but, i also did not see a new croatoan terminal thing. I'll look into that myself though. Thank you!
20:36:49
drmeister
Hmmm, it lists this... #P"/Users/meister/quicklisp/local-projects/cl-jupyter-widgets/nglview/nglview.asd"
20:36:55
rpg
drmeister: There's no listing for cl-jupyter-widgets.asd in that list of local projects, so that search is failing.
20:36:57
Xach
drmeister: in some cases the automagic scanning can't work, but (ql:register-local-projects) can. Are you able to load it after you do (ql:register-local-prjects)?
20:37:52
drmeister
Xach: I am - sorry to be a bit slow - I'm following some trains of my own thought first.
20:38:40
drmeister
I'm separating several asdf systems that were all in the same directory hierarchy. I think I better move out all of the directories that contain .asd files and then try again.
20:39:20
Xach
drmeister: you may of course do what you like, but it will take more time than if you try what I ask
20:39:43
skidd0
https://stackoverflow.com/questions/20276738/reading-a-character-without-requiring-the-enter-button-pressed
20:40:14
skidd0
and the simplest path forward, as indicated in a response to that SO Q, is to use a curses package
20:42:43
drmeister
But this is after I renamed cl-jupyter-widgets/nglview/nglview.asd to cl-jupyter-widgets/nglview/nglview.asd.backup
20:42:59
Xach
drmeister: yes, just like how if you throw salt over your shoulder you will not have bad luck
20:44:01
drmeister
What did (ql:register-local-projects) do? Did it save any state in the quicklisp directories?
20:44:09
Xach
drmeister: automagic scanning works by comparing top-level timestamps of an index file and the top-level directory. it does not detect "deep" changes.
20:44:27
Xach
drmeister: register-local-projects forces a full check of all subdirectories regarless of index file state.
20:44:55
drmeister
Ok. So if I run into trouble like this again - would you recommend invoking (ql:register-local-projects) ?
20:46:56
skidd0
okay i'm back again.. so I compiled the (defun test1 ...), it worked. but! when I (test1) in the repl, it's undefined
20:52:28
Inumedia
Hi, I'm trying to understand a two-line segment from example code that isn't quite making sense to me (coming from C-Style world), https://pastebin.com/cJR50ZpK could someone explain what the :key does and how the second line modifies b?
20:56:30
drmeister
Xach: What is your opinion on ~/quicklisp/local-projects/cl-jupyter-widgets.asd or ~/quicklisp/local-projects/src/cl-jupyter-widgets.asd where all of the source files are under ~/quicklisp/local-projects/src/* ?
21:05:47
skidd0
random9899: my issue was that calling (test1) wasn't in the package. calling (de.anvi.croatoan:test1) works
21:06:21
skidd0
the debugger says that TEST1 is not external, but I can [continue] use symbol anyway, and it'll work
21:08:55
skidd0
i'm running into an issue now that the SLIME repl doesn't like that the terminal/screen croaton makes uses colors. Iguess slime's repl's "terminal" in emacs doesn't use color
21:09:22
skidd0
but, running sbcl in it's own normal terminal then loading the test1 file and evaluating it works
21:12:27
random9899
skidd0: if it's external you can use <package>:test1 otherwise you have to use <package>::test1
21:16:03
MichaelRaskin
Well, every time you use setf/setq you might want to ask yourself if it should be setq or let/let*
21:18:47
MichaelRaskin
setf is a macro that can be taught to set more interesting locations, like (setf (elt l 3) 0)
21:19:29
_death
it's more like (set 'bla value), except that since lexical variables were introduced it's not
21:19:41
MichaelRaskin
And Common Lisp set… well, read the Hyperspec page of it. When you feel you are ready to read it once again, read it again. If you want to use it — well, maybe it does fit your use case.
21:21:18
MichaelRaskin
By the way, let*/let can create a dynamic-extent binding for a special variable
21:22:00
random9899
so what's the difference betweeen declare special and declare dynamic-extent in a let/let* then ?
21:23:09
random9899
wait, dynamic-extent in a lexical scope will make it's stack in-place rewritable ?
21:37:12
aeth
(setf (elt l 3) 0) is understating what setf can do. You can define your own setf in three ways. defun (setf foo), defsetf foo, and define-setf-expander. And defsetf is elaborate. You can take in multiple values, e.g. (setf (foo 42) (values 1 2 3 4))
21:42:03
aeth
I use it for array stuff. You can make fairly elaborate accessors (reader/writer pairs). The reader (the function) returns multiple values. The setf sets when given multiple values. So you can say (setf (array-row-of-4 foo 42) (array-of-4 bar)) and that will set (foo 42 i) where i is 0 through 3 with the first four elements of bar.
21:42:45
aeth
(It doesn't actually have to be a row of length 4 or an array of length 4... They'll just take/set the first four.)
21:50:04
aeth
Unfortunately, it doesn't seem to work with &rest so you can't have an arbitrary number of values
21:59:07
aeth
I'm not sure. Putting in a printf in the middle, it always is (#:new1 #:new2) no matter how many values are fed in. At least in SBCL. And in CCL (#:G25710 #:G25711)
23:53:48
ricky____
hello, all. can anyone tell me why this let form returns NIL? `(defparameter instruction-map (let (ht (make-hash-table)) ht))`
23:54:05
beardio
is it possible to sort a list '(a n b h l k e)...I know sort on a list of integer with the predicate #'<, I am trying to figure out how for characters
23:57:41
White_Flame
you defined 2 bindings, ht, and the local variable make-hash-table. You need another set of parens
23:58:34
White_Flame
there's no defined sort order for symbols, because they include a package by default, too
0:00:55
aeth
Both are ways to get nil bindings, it's just that the order you put them in made it look like you were doing a non-nil binding
2:33:27
aeth
Is there a way to detect if I'm no longer using any symbols from a package that I am importing from? Yes, there's no way to detect this perfectly because you can basically do whatever, but I'm sure I probably am importing from some packages unnecessarily.
2:34:15
aeth
e.g. if I only was using a package for some constants or deftypes that then got moved to another package