libera/#commonlisp - IRC Chatlog
Search
15:19:31
beach
I just love those TYPE-ERROR messages: "The value NIL is not of type CONS". Er, yes, I know that.
15:57:32
jmercouris
Is there some sort of succinct way to write "try this function until no condition is raised"?
15:58:44
beach
jmercouris: You mean you try it on different arguments each time? Otherwise, I would expect the same result each time.
15:59:53
jmercouris
basically I want to call: `iolib:with-open-socket` until the socket is actually openable
16:00:11
jmercouris
the socket is not managed by me in Lisp, it is another process that will open the socket
16:00:47
jmercouris
timeouts are a good idea, for now I just want to avoid sending data to the socket until I know it is ready
16:01:06
bike
does iolib not have a 'wait until this socket is openable' kind of function? seems like something it would have. you know, actual polling
16:02:43
beach
jmercouris: Otherwise you can use IGNORE-ERRORS, and check in a loop whether an error was signaled.
16:04:08
fe[nl]ix
the socket API doesn't have a way to poll for when the remote side becomes available
16:04:36
fe[nl]ix
and after you issue a connect() and you get an error, the socket must be closed and cannot be used for further operations
16:05:58
jmercouris
I had a feeling you were right, I've been grepping around in iolib, and yeah, nothing
16:56:02
beach
jmercouris: A loop isn't hard. Something like (loop for result = (ignore-errors <call>) while (null result) finally (return result))
16:59:10
jmercouris
I don't really care for the result actually, I just want to know the socket is ready
16:59:25
jmercouris
this is what I've got in the end: `(loop for probe = (ignore-errors (send-message-interface interface "0")) until (equalp "0" probe))`
16:59:48
jmercouris
send-message-interface attempts to open a socket, send some code, and if it returns "0", we're OK!
17:09:51
green_
yitzi: I don't know much about arch, but it looks like your package is x86_64 only. One of the problems with upgrading sbcl in Fedora is that it appears to be broken on ppc64. Does arch support ppc64, and if so -- what version of sbcl is in there?
17:12:40
green_
It's more about sbcl and ppc64 arch. Does arch support ppc64? If so, what version of sbcl is in there? I'm having trouble upgrading sbcl in Fedora because it doesn't pass the CI tests.
17:13:39
yitzi
The main Arch dist is x86 only. There is a separate arm dist. Looks they have sbcl for aarch64 and armv7h
17:14:50
green_
In Fedora, we try to keep version affinity across all architectures (x86, arm, power, z). I'll bring this up the sbcl people again.
17:24:02
yitzi
green_: I had to replace the "ocicl-oras" calls with just "oras". Might need to make the binary pathname configurable or just "oras" all the time.
17:25:04
green_
I renamed it so it wouldn't conflict with verions people might have on their systems already. Maybe a simlink is the way to go. I'll think about it.
22:09:19
Mondenkind
(and band problems and to a lesser extent boolean blindness are ... a thing in cl. I don't have a solution though I like cps in some cases. E.G. the low-level interface to my hash table is (lookup table key on-success on-failure), where on-success is a continuation that gets passed the value and a further continuation to update it, and on-failure just gets the update continuation. This isn't
22:09:21
Mondenkind
perfectly safe, since you could escape the update function, or do concurrent updates to the table from within the continuations, but imo it's better than other approaches I've seen on most counts)
2:28:52
prokhor
does anybody have an idea on how to train transformer based models in cl? sth like pytorch would be nice... maybe a ffi?