libera/#commonlisp - IRC Chatlog
Search
13:19:33
asarch
Why could you get this error in SBCL?: "The integrity of this image is possibly compromised."
13:25:26
asarch
This is the log when I ran my web app for the first time: https://pastebin.com/8wAKuWGR
13:26:24
Bike
this still doesn't mention what actually happened before the corruption warning, does it?
13:51:19
aeth
asarch: "the integrity of the image" is either a CFFI or (safety 0) or similar bug, probably out of bounds, maybe something like use-after-free... perhaps even a dynamic-extent that escaped the scope. Something dangerous happened, poorly.
13:52:22
aeth
It's basically something that would have resulted in "Segmentation fault" if C or C++, but instead the image continues running, but probably shouldn't because it's probably still broken.
13:54:02
aeth
And if you're one of those people who has an emacs server with SLIME running 24/7 then it's probably really annoying.
13:54:26
aeth
Since one Lisp process could run multiple programs, perhaps even the entire DE (see e.g. stumpwm) and needs restarting
13:54:53
aeth
But if you're running it from the shell, no big deal. Just find the bug with CFFI, (safety 0), dynamic-extent, or similar
13:55:20
aeth
(Really, you shouldn't use (safety 0) at all except perhaps inside a LOCALLY to very, very clearly limit the possible damage)
14:01:36
asarch
I thought it was IRONCLAD: "[2022-08-18 09:01:08 [WARNING]] Warning while processing connection: redefining IRONCLAD:WITH-DECRYPTING-STREAM in DEFMACRO"
14:12:58
aeth
libraries will also e.g. inline at the wrong place so they don't actually get inlined etc etc
14:31:17
asarch
I got another different address: Memory fault at (nil) (pc=0x54033624 [code 0x54033330+0x2F4 ID 0xd00b], fp=0x7f06c795daf0, sp=0x7f06c795dac0) tid 16400
14:32:49
jackdaniel
asarch: grep your projects / dependencies for (safety 0) and learn who is the bad guy
14:36:14
jackdaniel
naive person (like me) would wonder whether the "bin" directory is the directory that contains the source code with dependencies (because it stands for 'binary')
14:39:28
asarch
The project dir from (caveman2:make-project #P"/path/to/myapp/" :author "<Your full name>")
14:58:08
nij-
Suppose I have multiple lisp images working across multiple machines. I want them to cooperate. Sometimes, some big data (50M~50G) must be sent from one to another. What kind method or package would you recommend for that?
15:01:48
mfiano
A friend of mine wrote that at their old job in a cluster of over 10k machines. I'm sure it will scale to "multiple"
17:47:42
gendl
`(mapcar #'(lambda(item) (mapcar #'(lambda(other) (list item other)) '(1 2 3))) '(a b c))`
17:49:05
aeth
ofc it's probably not going to be as fast as something like LOOP... but if you want a fast answer rather than fast code, that should work
17:49:49
aeth
if you build lists with LOOP's collect, you can replace that with LOOP's append (which is the same word as #'append so it's not hard to remember) if you need it flat
17:50:57
aeth
(mapcan #'(lambda (item) (mapcar #'(lambda (other) (list item other)) '(1 2 3))) '(a b c))
17:52:13
aeth
But as far as concise goes, you have to use LOOP, a MAP-family function, or just APPEND it down. There may be other ways and they might even be faster, but they're longer.
17:53:44
gendl
`(mapcan #'(lambda(color) (mapcan #'(lambda(item) (mapcar #'(lambda(other) (list item other color)) '(1 2 3))) '(a b c))) '(red blue green))`
17:56:02
aeth
oh, if you do use #'append in places, you probably should use reduce, not apply, because reduce does things on arbitrary pairs, while apply applies it as a function and thus is subject to the function call length on the implementation (which might be short, even if it's not short on the ones you test it on)
17:58:04
gendl
aeth: thanks, I think I do over-use `apply` and under-use `reduce` -- i need to keep that in mind.
18:00:52
aeth
afaik, apply is normally for things of known length, or for writing compilers/interpreters
18:16:34
nij-
Is there anyway to do "condition forwarding"? I want a client runtime (maybe in another lang) to have full control of a thread in my Lisp Image. The thread should be non-blocking, meaning when there's a condition in a thread, it gets "forwarded" to the client. The client decides what to do next; in the meanwhile, the main thread shouldn't get blocked.
18:17:38
Bike
what would doing next entail, if the main thread is already off doing some other thing?
18:18:53
Bike
conditions are just objects, and you can toss them around and invoke the debugger in whichever thread you like. but without the dynamic context of where the condition was actually signaled, the obvious ways to debug are out
18:23:10
Bike
this isn't to say that you can't arrange something. like you could set up a mailbox so that the out of line debugger can send some action to complete to the main thread. but it's not gonna be like, trivial
18:24:34
Bike
like, example: say the main thread does a cerror, a continutable error. if the debugger is in the same process, the user could choose to move on by invoking the continue restart, or they could do something else like substitute a value
18:24:53
Bike
but with what you're talking about, if i understand correctly, the main thread will just continue on to something else and present the condition to some other thread/process
18:25:17
Bike
and from that thread/process, the usual debugging options of "continue" or "substitute a value" or whatever are nonsensical, because the main thread has already moved on to greener pastures
18:28:02
nij-
I think of that other thread as a process in an OS. It must listen to the OS, but most of the time we as clients/users do not have to care too much about the OS.
18:31:23
Bike
Just, what exactly do you want that other thread to be able to do, if presented with an error condition?
18:32:34
Bike
I mean if the main thread hits a condition, and sends off that condition to the controlling thread, and the main thread continues on to something else, what should the controlling thread be able to order in response to that condition
18:33:48
nij-
Then the controlling thread asks the client what to do, immediately after it is freezed until the answer from the client is received.
18:34:16
yitzi
I'm not clear on which thread the condition was generated in. Is it generated in the main thread or in this "client" thread?
18:35:08
White_Flame
also what is the client thread doing, just monitoring the main thread or does it have its own other work to do?
18:38:58
yitzi
nij-: then in order for the restarts in the main thread to still be applicable it will need to block
18:40:23
yitzi
Also, not that most languages don't even have the concept of a "restart" hence this concept is completely missing from debugging protocols such as the Debugger Adapter Protocol.
18:41:03
Bike
nij-: what i'm trying to tell you is that some of those things do not make sense of a local repl, because the context of the condition will be gone. you cannot substitute a value and continue the computation if the computation has exited.
18:41:14
yitzi
You can hack it in with the stop and continue message in that protocol, but it would a non-standard extension.
20:14:38
jcowan
What does the term "match" mean in the case, ecase, and ccase macros? It is not defined there or in the glossary.
20:15:43
Bike
eql, under the general rule that that's what phrases like "on the basis of its identity" means
21:11:05
edgar-rft
jcowan: I think the "match" is defined a few lines above: "If the test-key is the same as any key for that clause, ..."
21:26:50
kakuhen
Bike: maybe a direct link will help? https://github.com/robert-strandh/Well-Specified-Common-Lisp/issues/9
21:29:00
kakuhen
ah, it looks like the main repository has changed, judging a comment in https://github.com/robert-strandh/Well-Specified-Common-Lisp/issues/8#issuecomment-1195473591
21:51:08
copec
https://youtu.be/tzr7hRXcwkw <- Wish a third person was there, "that's why common lisp has..."
21:59:48
edgar-rft
the CASE page also often talks about matching clauses where a clause being "the same as" is clearly not meant
23:27:25
gin
is there a shortcut for (lambda () t). I need a function that always returns true? Something like #'always-true. Is it there?