freenode/lisp - IRC Chatlog
Search
21:32:30
JonSmith
Yeah, but I mean, you read-line on a stream that doesn't have a newline but stays open (assuming like a tcp connection or w/e), it'll block until you get a newline
21:32:31
ealfonso
I'm also getting this: "There is no applicable method for the generic function #<STANDARD-GENERIC-FUNCTION USOCKET:SOCKET-RECEIVE (1)> when called with arguments (#<USOCKET:STREAM-USOCKET {1005A8A253}> NIL 9999)". which is strange since (describe 'usocket:socket-receive) says: "SOCKET-RECEIVE names a generic function: Lambda-list: (USOCKET BUFFER LENGTH &KEY)"
21:33:48
JonSmith
but if your protocol indicates you'll always get a newline you could just readline in a loop and check the time or whatever
21:33:53
ealfonso
JonSmith yeah, so I guess I can't use read-line, and I have to do it manually, which I'm trying via usocket:socket-receive, but for some reason it's complaining with error above
21:34:43
ealfonso
JonSmith I can't check the time because read-line blocks, and I can't guarantee I will get a newline
21:35:50
ealfonso
docs say I can pass nil for buffer and nil for length, and first arg should be a socket: https://common-lisp.net/project/usocket/api-docs.shtml
21:47:47
ealfonso
JonSmith how is this different from read-line? I can't specify a timeout and read-sequence seems to block
21:49:19
JonSmith
unless you can peek the stream and see how many bytes are in it then tailor your read-sequence to that length
21:51:22
ealfonso
looking at (describe 'read-byte), doesn't say much. so it doesn't block? I don't see a way to get a usocket stream's length
21:58:32
JonSmith
in which case you'd just read in a loop until you hit a null and buffer it up yourself however you like
22:01:27
pjb
(com.informatimago.common-lisp.cesarum.list:tree-difference '(if (= a b) yes no) '(if (= a 0) yes nil)) #| --> (= (= = (/= b 0) . =) = (/= no nil) . =) |#
22:12:39
diegs_
fe[nl]ix: i've _think_ got that bit, the error is: (IOLIB/GROVEL::GROVEL-ERROR #<SIMPLE-STRING "External process exited with code ~S.~@
22:12:41
diegs_
..." (len=167) {100399019F}> 1 "g++" ("-m64" "-Wno-write-strings" "-I/home/diego/quicklisp/dists/quicklisp/software/iolib-v0.8.2/src/grovel/" "-o" "/home/diego/.cache/common-lisp/sbcl-1.3.18.62-f6ff1ee2e-linux-x64/home/diego/quicklisp/dists/quicklisp/software/iolib-v0.8.2/src/syscalls/ffi-types-unix"
22:12:43
diegs_
"/home/diego/.cache/common-lisp/sbcl-1.3.18.62-f6ff1ee2e-linux-x64/home/diego/quicklisp/dists/quicklisp/software/iolib-v0.8.2/src/syscalls/ffi-types-unix.c") "" #<SIMPLE-STRING "In file included from /home/diego/.cache/common-li..." (len=364332) {10036A000F}>)
22:12:45
diegs_
source: (ERROR (QUOTE GROVEL-ERROR) :FORMAT-CONTROL FORMAT-CONTROL :FORMAT-ARGUMENTS FORMAT-ARGUMENTS)
22:14:42
fe[nl]ix
diegs_: try loading it with (asdf:load-system :iolib) and paste the error somewhere like paste.lisp.org
22:24:58
fe[nl]ix
is there an actual error message in the REPL ? something coming from the compiler ?
22:25:11
diegs_
fe[nl]ix: https://gist.github.com/therockmandolinist/f1c9fc363b669ce69288e73abdc87f3d
22:26:21
diegs_
fe[nl]ix: and i think i lied and am getting the same error in command line but my terminal is configured weirdly so i can't see all of it
22:27:50
fe[nl]ix
in the meanwhile, you could clone the git repository and put it into local-projects
22:28:17
fe[nl]ix
diegs_: the fix is this commit: https://github.com/sionescu/iolib/commit/c9beaf1ba0ca37ed88b312c844595ba943c19232
22:32:36
ealfonso
(describe 'ADJUST-ARRAY) => ... Adjust ARRAY's dimensions to the given DIMENSIONS and stuff.
22:33:51
Bike
implementation docstrings for standard functions are often kind of crap, since the CLHS is inevitably better
23:17:57
Bike
Well. No. It says "vector" right there. If you want to add to a list you can use push.
23:21:26
Bike
subseq doesn't work on multidimensional arrays either. and i don't know how you go from vector-push-extend to subseq, but hey, if you got whatever you're doing working
0:05:11
pjb
Well, you can use subseq on a multidimensional array if you use a displaced vector in between.
0:06:39
plll
Hi, I'm trying to get set up with any of the HTTP clients on NixOS. All of them seem to rely on libssl. Any way to get around this?
2:17:20
diegs_
I'm pretty new to the whole swank thing -- can I have SBCL run in the background on login (or when i enter a given command) with a swank server at a specified port?
2:18:26
Xach
diegs_: i use screen with a specific config file to start up sbcl, and use a .lisp script to load and set up swank.
2:19:18
Xach
diegs_: however, i only do that when i'm running a server for a long time. i more often swank from within emacs with M-x slime
2:19:58
diegs_
hmm. could i just `sbcl --load swank-config.lisp &` . Also would you mind sharing the .lisp script?
2:20:36
Xach
diegs_: I don't have one handy, it's something like (ql:quickload "my-project") where my-project depends-on swank, and then (swank:create-server 4010 :dont-close t)
2:20:37
diegs_
Xach: and well, i just found ScriptL https://github.com/rpav/ScriptL and while i'm not... exactly sure what the use case is, i thought i'd play around with it. I don't strictly speaking need what i was describing but something similar is mentioned in the README
2:21:18
Xach
diegs_: you can't simply & the process as it normally reads and writes to the terminal. there is a sb-daemonize or something similar that will set it up properly for a background process.
2:38:27
diegs_
Xach: hmm, i'm trying some of what we discussed with the following: https://gist.github.com/therockmandolinist/123591a920b200ec6fa589b36a3db117 but getting "Cannot fork with multiple threads running"
3:32:15
drmeister
I have two undergraduates working on implementing the two or so dozen standard jupyter widgets in Common Lisp.
3:33:02
drmeister
We are going to enhance the cl-jupyter system to support jupyter widgets so that it can be used by all standard Common Lisp's
4:03:44
drmeister
krwq: I hacked into the python code and log traffic between the kernel and the browser. Then I added logging code to my code to generate similar data. Then we compare what's being sent back and forth.
4:04:27
drmeister
Secondly, I can start a swank server from the Jupyter notebook and use slime to inspect everything.
5:57:36
beach
As part of the CST (Concrete Syntax Tree) library, the Earley-based lambda-list parsers now seem to work, but in order to simplify my job, I made them work on ordinary Common Lisp S-expressions and not on CSTs.
5:57:37
beach
The next step is to change that so that they work on CSTs instead. And I just figured that the classes that represent the different parts of the lambda list, such as the lambda-list keywords and the parameters, should just be subclasses of CST, as opposed to containing CSTs.