libera/#commonlisp - IRC Chatlog
Search
14:44:20
_death
so I guess interning could be helpful if you want to use EQ to compare things (but then you could also use a hash table of strings)
14:44:49
ludston
e.g. https://github.com/Rudolph-Miller/jonathan/blob/fb83ff094d330b2208b0febc8b25983c6050e378/src/util.lisp#L33
14:46:24
SAL9000
you could intern as a postprocessing step, I guess? json -> (list string) -> (list symbol)
14:49:57
ludston
One of the reasons that common lisp is the best, is you can just redefine some function in someone elses namespace that you disagree with.
14:51:56
SAL9000
That's one of the many double-edged swords/footguns, to be honest. This kind of thing -- while awesome for us -- is probably a major obstacle to large scale/commercial adoption of CL.
14:59:45
ludston
_death: But nowhere near as clean as (progn (in-package :jonathan.utils) (defun make-keyword (str) str)))
15:05:27
ludston
I guess you have to be careful though because it might be a breach of the software license
15:32:48
dieggsy
huh, for some reason i can't use *standard-output* in slynk with allegro's excl:run-shell-command. has anyone run into this before?
15:34:55
dieggsy
er, sly that is. it uninformatively says the stream "can't be used for output". I'm sure it's some weirdness to do with how sly handles output
15:42:08
etimmons
slynk's *standard-output* is a gray stream. Not all implementations can use that type of stream for their external command functions
15:42:21
splittist
dieggsy: I know nothing about excl:run-shell-command, but is it talking about output from the process, which would need a lisp INPUT stream
15:42:46
etimmons
UIOP's {run,launch}-program says that allegro can handle handle streams that are of subtype FILE-STREAM
15:44:45
dieggsy
huh. maybe i can work around it by having it return the stream and use that to print myself....
15:49:38
etimmons
That's similar to how other implementations handle it internally. I know that in cases like this, ECL spawns a new thread that shuffles data from a new stream associated with the program to the stream where you want it to go.
16:11:50
dieggsy
or actually, if i run uiop:run-program in a thread, will it only block that thread?
16:19:30
etimmons
It should, but that really depends on the implementation you're using since it's a thin veneer to give a uniform-ish API over the implementation specific functions
16:40:35
Xach
Hmm, is there anything standard-ish (cltl2 included) to get the name of the function enclosing a macro or compiler-macro at macroexpansion time?
16:43:10
Bike
What do you mean by enclosing? Like, if a macro is being expanded, the name of the function whose body the macro form is in?
16:43:28
Krystof
don't think so. a cltl2-ish environment might have information about block names, but I think even allegro doesn't have a "list-all-blocks-in-this-environment" exported operator
16:52:36
Xach
Krystof: thanks. block names were my first thought but the env object I have is a bit more opaque to me than SBCL's
16:57:07
dieggsy
with slime/sly is there no way to make sure all output is shown in the repl buffer (as opposed to some going to the inferior lisp buffer) ?
16:58:52
scymtym
Xach: the log4cl library must have something like that but i doubt it is even remotely standard-ish
17:02:42
Xach
Allegro would be most useful to me in fact. Time to scrape around the env object a little more.
17:59:04
jackdaniel
(1+ most-positive-fixnum) ways for making repl unusable: (setf *print-right-margin* (1+ most-positive-fixnum))
18:24:33
pjb
jackdaniel: it's a non-negative integer, so (1+ most-positive-fixnum) is perfectly conforming.
20:07:07
Shinmera
the new update argument also allows posting four pictures, and very large gifs or videos.