jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
yaneko has quit [Quit: parting]
luna-is-here has joined #commonlisp
yaneko has joined #commonlisp
gnoo has quit [Ping timeout: 244 seconds]
puke has joined #commonlisp
ndanilov has quit [Read error: Connection timed out]
saulosilva has joined #commonlisp
ndanilov has joined #commonlisp
beach` has joined #commonlisp
beach has quit [Ping timeout: 265 seconds]
vardhan__ has joined #commonlisp
BierLiebHaber has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
BierLiebHaber has joined #commonlisp
saulosilva has quit [Quit: Client closed]
dim has quit [Ping timeout: 252 seconds]
dim has joined #commonlisp
m5zs7k has quit [Ping timeout: 265 seconds]
m5zs7k has joined #commonlisp
chum-cha has joined #commonlisp
Oladon has joined #commonlisp
istewart has joined #commonlisp
rkazak has quit [Ping timeout: 264 seconds]
kevingal has quit [Ping timeout: 246 seconds]
hineios234 has joined #commonlisp
hineios23 has quit [Ping timeout: 244 seconds]
hineios234 is now known as hineios23
hineios23 has quit [Ping timeout: 276 seconds]
hineios23 has joined #commonlisp
rkazak has joined #commonlisp
ndanilov has quit [Remote host closed the connection]
cammy has joined #commonlisp
rkazak has quit [Ping timeout: 252 seconds]
yewscion has joined #commonlisp
random-nick has quit [Ping timeout: 252 seconds]
chum-cha has quit [Ping timeout: 252 seconds]
Inline has joined #commonlisp
bjorkintosh has quit [Ping timeout: 260 seconds]
rkazak has joined #commonlisp
istewart has quit [Quit: Konversation terminated!]
bjorkintosh has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
gdr3941 has joined #commonlisp
gdr3941` has joined #commonlisp
nkatte has quit [Quit: nkatte]
nkatte has joined #commonlisp
ndanilov has joined #commonlisp
gdr3941 has quit [Ping timeout: 248 seconds]
gdr3941` has quit [Quit: done]
nkatte has quit [Quit: nkatte]
rkazak has joined #commonlisp
decweb has quit [Ping timeout: 248 seconds]
yewscion has quit [Ping timeout: 265 seconds]
soweli_iki has joined #commonlisp
soweli_iki has quit [Changing host]
soweli_iki has joined #commonlisp
gorignak has quit [Quit: quit]
rkazak has quit [Ping timeout: 248 seconds]
rainthree has quit [Ping timeout: 265 seconds]
beach` is now known as beach
rkazak has joined #commonlisp
livoreno has joined #commonlisp
ndanilov has quit [Remote host closed the connection]
rkazak has quit [Ping timeout: 252 seconds]
cammy has quit [Ping timeout: 248 seconds]
<jmercouris> If I have multiple threads and call (gensym "ID") on them simultaneously, can I have a collision?
<beach> My guess would be that, in the worst case, you would get two different symbols with the same name.
<jmercouris> OK, this may be happening to me then
<beach> But that shouldn't be a problem.
<jmercouris> Well, yes, but no
<beach> They are still different symbols. The name shouldn't matter.
<jmercouris> I am converting these symbols into strings
<jmercouris> and using them as identifiers for FFI
<beach> *sigh*
<jmercouris> so on another host language, they need to be unique strings
<jmercouris> I have not confirmed that this is happening, I even made the creation of gensym protected via a mutex
<jmercouris> so, *probably* there are not name collisions
<beach> That's not what GENSYM is meant for, though.
<jmercouris> sure, but that's what I'm using it for :-
<beach> You might as well just generate the strings directly with a counter.
<beach> It is silly to allocate a symbol and then throw it away.
<jmercouris> that was the previous implementation, I didn't change it to gensym I don't think
<jmercouris> I'm not sure who changed it to gensym, probably just trying to be clever
<beach> I wouldn't call that "clever".
<jmercouris> I was using "clever" in the sarcastic sense here
<beach> I see.
bitspook has joined #commonlisp
Josh_2 has joined #commonlisp
rkazak has joined #commonlisp
rkazak2 has joined #commonlisp
rkazak has quit [Ping timeout: 246 seconds]
gnoo has joined #commonlisp
JoshYoshi has joined #commonlisp
ndanilov has joined #commonlisp
Josh_2 has quit [Ping timeout: 265 seconds]
<aeth> jmercouris: the way to do it is, within one thread, walk through whatever you generated that contains gensyms, build a hash table, have a new incrementing counter, and if the gensym is in the hash table, use the existing ID and if it is not in the hash table, take from the counter and increment the counter
<aeth> but feel free to work in gensyms until that point
<aeth> Even if it were single threaded, this is probably a good step because you probably want 0-based or 1-based with no gaps in your target, while your gensyms could easily be in the thousands and have gaps.
<beach> That doesn't sound right at all.
rkazak2 has quit [Ping timeout: 272 seconds]
pve has joined #commonlisp
rkazak has joined #commonlisp
<jackdaniel> (let ((c 0)) (defun next-lcl () (format nil "lcl~a" (atomic-incf c))))
<beach> Yes.
<aeth> I suppose it depends on if you do anything else with the gensym in the meantime. If you don't, then, yes, it's a wasted intermediate step
rkazak has quit [Ping timeout: 246 seconds]
crumbles- has quit [Quit: ZNC - https://znc.in]
bendersteed has joined #commonlisp
bitspook has quit [Ping timeout: 265 seconds]
crumbles has joined #commonlisp
chomwitt has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
alternateved has joined #commonlisp
amb007 has joined #commonlisp
<jackdaniel> or, if you want to avoid (expensive) atomic access, then you may provide to each thread an unique prefix and a counter as initial bindings
<jackdaniel> then (defun next-lcl () (format nil "~a~a" *thread-unique-prefix* (incf *thread-local-counter*)))
<jackdaniel> the counter can be global too, because it is monotonically increasing, so there want be collissions if you have unique prefix in each thread
<jackdaniel> won't *
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
mgl has joined #commonlisp
rainthree has joined #commonlisp
rkazak has joined #commonlisp
shka has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
mala has quit [Read error: Connection reset by peer]
mala has joined #commonlisp
alendvai__ has joined #commonlisp
ndanilov has quit [Remote host closed the connection]
rainthree has quit [Ping timeout: 244 seconds]
rkazak has joined #commonlisp
attila_lendvai_ has joined #commonlisp
alendvai__ has quit [Read error: Connection reset by peer]
bendersteed has quit [Quit: bendersteed]
kpg has quit [Read error: Connection reset by peer]
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
rkazak has quit [Ping timeout: 252 seconds]
dtman34 has quit [Ping timeout: 260 seconds]
Pixel_Outlaw has quit [Quit: Leaving]
edgar-rft_ has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
edgar-rft` has quit [Ping timeout: 260 seconds]
Guest62 has joined #commonlisp
Guest62 has quit [Write error: Broken pipe]
rainthree has joined #commonlisp
dtman34 has joined #commonlisp
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 264 seconds]
rainthree has quit [Ping timeout: 260 seconds]
rkazak has joined #commonlisp
dino_tutter has joined #commonlisp
rkazak has quit [Ping timeout: 272 seconds]
kpg has joined #commonlisp
rainthree has joined #commonlisp
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 260 seconds]
Inline_ has joined #commonlisp
Inline has quit [Ping timeout: 246 seconds]
random-nick has joined #commonlisp
shawnw has quit [Remote host closed the connection]
shawnw has joined #commonlisp
rkazak has joined #commonlisp
patrix4 has joined #commonlisp
patrix has quit [Ping timeout: 252 seconds]
patrix4 is now known as patrix
semz has quit [Ping timeout: 252 seconds]
chomwitt has quit [Ping timeout: 265 seconds]
rkazak has quit [Ping timeout: 244 seconds]
semz has joined #commonlisp
mwnaylor has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
rkazak has joined #commonlisp
anonpreet has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
anonpreet has quit [Quit: Leaving]
kpg has quit [Read error: Connection reset by peer]
rkazak has quit [Ping timeout: 248 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
rainthree has quit [Quit: Leaving]
rainthree3 has joined #commonlisp
rkazak has joined #commonlisp
olnw has quit [Quit: ZNC - https://znc.in]
decweb has joined #commonlisp
JuanDaugherty has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
nkatte has joined #commonlisp
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 260 seconds]
Th30n has quit [Remote host closed the connection]
chomwitt has joined #commonlisp
mishoo has joined #commonlisp
rkazak has joined #commonlisp
varjag has joined #commonlisp
wacki has joined #commonlisp
cage has joined #commonlisp
cage has quit [Excess Flood]
cage has joined #commonlisp
rkazak has quit [Ping timeout: 272 seconds]
rkazak has joined #commonlisp
Demosthe1ex has joined #commonlisp
uhuh has joined #commonlisp
varjag has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.3)]
rkazak has quit [Ping timeout: 265 seconds]
Demosthenex has quit [Ping timeout: 265 seconds]
rainthree3 has quit [Ping timeout: 245 seconds]
Demosthenex has joined #commonlisp
Demosthe1ex has quit [Ping timeout: 252 seconds]
Demosthe1ex has joined #commonlisp
kpg has joined #commonlisp
Demosthenex has quit [Ping timeout: 248 seconds]
uhuh has quit [Remote host closed the connection]
rainthree3 has joined #commonlisp
Demosthenex has joined #commonlisp
rkazak has joined #commonlisp
Demosthe1ex has quit [Ping timeout: 252 seconds]
chomwitt has quit [Ping timeout: 248 seconds]
jonatack has quit [Ping timeout: 245 seconds]
kevingal has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
JoshYoshi has quit [Ping timeout: 252 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
chomwitt has joined #commonlisp
saulosilva has joined #commonlisp
wizard has quit [Ping timeout: 265 seconds]
kpg has quit [Read error: Connection reset by peer]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
saulosilva has quit [Quit: Client closed]
kevingal has quit [Ping timeout: 265 seconds]
rkazak has joined #commonlisp
zxcvz has joined #commonlisp
uhuh has joined #commonlisp
vardhan__ has quit [Remote host closed the connection]
Everything has joined #commonlisp
vardhan__ has joined #commonlisp
mgl has quit [Ping timeout: 264 seconds]
uhuh has quit [Remote host closed the connection]
rkazak has quit [Ping timeout: 252 seconds]
Everythi1g has joined #commonlisp
Everything has quit [Quit: leaving]
Everythi1g has quit [Client Quit]
Everything has joined #commonlisp
bitspook has joined #commonlisp
wizard has joined #commonlisp
varjag has joined #commonlisp
rkazak has joined #commonlisp
dtman34 has quit [Ping timeout: 252 seconds]
tisanae has joined #commonlisp
tisanae has quit [Client Quit]
mala has quit [Ping timeout: 265 seconds]
skin has joined #commonlisp
skin has quit [Client Quit]
skin has joined #commonlisp
rkazak has quit [Ping timeout: 246 seconds]
kevingal has joined #commonlisp
JoshYoshi has joined #commonlisp
<JoshYoshi> Spent way too long trying to figure out how to convert a sexp into a string without symbols being looked up, not sure if thats the right word
<JoshYoshi> but binding *package* to a package with no symbols did the trick
ndanilov has joined #commonlisp
vardhan__ has quit [Ping timeout: 248 seconds]
kpg has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
livoreno has quit [Quit: Connection closed for inactivity]
rkazak has joined #commonlisp
<phoe> (let ((*package* (find-package :keyword))) ...)
<phoe> this way all symbols will be printed with fully qualified names
robin_ has joined #commonlisp
kpg has quit [Read error: Connection reset by peer]
robin has quit [Read error: Connection reset by peer]
kpg has joined #commonlisp
rkazak has quit [Ping timeout: 252 seconds]
robin_ has quit [Read error: Connection reset by peer]
<JoshYoshi> Even better!
robin has joined #commonlisp
robin has quit [Remote host closed the connection]
robin has joined #commonlisp
Demosthe1ex has joined #commonlisp
kpg has quit [Read error: Connection reset by peer]
robin has quit [Read error: Connection reset by peer]
robin_ has joined #commonlisp
Demosthenex has quit [Ping timeout: 248 seconds]
kpg has joined #commonlisp
robin_ has quit [Read error: Connection reset by peer]
robin_ has joined #commonlisp
Demosthenex has joined #commonlisp
wacki has quit [Read error: Connection reset by peer]
rkazak has joined #commonlisp
amb007 has quit [Ping timeout: 244 seconds]
varjag has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
Demosthe1ex has quit [Ping timeout: 246 seconds]
Demosthe1ex has joined #commonlisp
wacki has joined #commonlisp
Demosthenex has quit [Ping timeout: 248 seconds]
kpg has quit [Read error: Connection reset by peer]
varjag has joined #commonlisp
kpg has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
josrr has joined #commonlisp
shka has quit [Quit: Konversation terminated!]
contrapunctus has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
rainthree3 has quit [Ping timeout: 260 seconds]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 248 seconds]
Lord_of_Life_ is now known as Lord_of_Life
rkazak has joined #commonlisp
<yottabyte> I used list* in my code before but I don't remember what it is when compared to list. I tried to M-. and it took me to a file, but it's empty. what is the best way to see the definition of functions in emacs?
<yottabyte> it's hard to even search online "list* common lisp"...
Demosthe1ex is now known as Demosthenex
<beach> ,(list* 1 2 3 '(4 5 6))
<ixelp> => (1 2 3 4 5 6)
rkazak has quit [Ping timeout: 252 seconds]
<beach> ,(list 1 2 3 '(4 5 6))
<ixelp> => (1 2 3 (4 5 6))
saulosilva has joined #commonlisp
ndanilov has quit [Ping timeout: 252 seconds]
<ixelp> CLHS: Function LIST, LIST*
<reb> yottabyte: The NovaSpec page is here: https://novaspec.org/cl/f_list
<ixelp> list, list* | Common Lisp Nova Spec
<reb> Searching on one of the ANSI standard web pages may be better than a Google search.
JuanDaugherty has quit [Quit: JuanDaugherty]
<reb> However, the first Google result for common lisp "list*" is good.
rkazak has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<yottabyte> thank you!
<jackdaniel> something something with-standard-io-syntax
<jackdaniel> JoshYoshi: ^ this binds various variables so that the printed output is "standard"
<aeth> list* is somewhere between append and cons, depending on which is easier for you to think about. So like an (append (list 1 2 3) '(4 5 6))
<aeth> or like a super-cons
<aeth> (cons 1 (cons 2 (cons 3 '(4 5 6))
<yottabyte> reb: so there's no way to look it up in emacs?
<ixelp> PSA: How to browse the HyperSpec in Emacs : lisp
<phoe> see the texinfo comment
<yottabyte> and that's what M-. does?
rkazak has quit [Ping timeout: 252 seconds]
<kagevf> yottabyte: M-. jumps to source ... the hyperspec can be setup to browse from emacs either online or locally if you download it
<JoshYoshi> jackdaniel: thanks!
<JoshYoshi> list* is great, I use it all the time
<JoshYoshi> In emacs its uh C-c-d h to look up in hyperspec
<yacin> man i always forget about list*
<JoshYoshi> If you go to clhs looking for list* you can hit the ^ arrow and you will be able to see a lot of related functions (most of the time)
kevingal has quit [Ping timeout: 265 seconds]
saulosilva has quit [Quit: Client closed]
kevingal has joined #commonlisp
varjag has quit [Ping timeout: 248 seconds]
rkazak has joined #commonlisp
kevingal has quit [Ping timeout: 260 seconds]
mishoo has quit [Ping timeout: 252 seconds]
rkazak has quit [Ping timeout: 248 seconds]
mgl has joined #commonlisp
zxcvz has quit [Quit: zxcvz]
supercode has joined #commonlisp
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
rkazak has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 29.4]
dtman34 has joined #commonlisp
varjag has joined #commonlisp
mgl has quit [Ping timeout: 248 seconds]
josrr has quit [Remote host closed the connection]
rkazak has quit [Ping timeout: 252 seconds]
bitspook has quit [Ping timeout: 248 seconds]
rkazak has joined #commonlisp
dtman34 has quit [Ping timeout: 246 seconds]
skin has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 252 seconds]
bjorkintosh has quit [Remote host closed the connection]
bjorkintosh has joined #commonlisp
dtman34 has joined #commonlisp
robin__ has joined #commonlisp
shka has joined #commonlisp
Everything has quit [Quit: leaving]
scymtym has quit [Read error: Connection reset by peer]
wacki has quit [Quit: Leaving.]
scymtym has joined #commonlisp
robin_ has quit [Ping timeout: 244 seconds]
amb007 has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
livoreno has joined #commonlisp
kevingal has joined #commonlisp
alternateved has quit [Remote host closed the connection]
rkazak has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
droideqa has joined #commonlisp
dino_tutter has quit [Ping timeout: 252 seconds]
varjag has quit [Ping timeout: 252 seconds]
rkazak has quit [Ping timeout: 265 seconds]
spdegabrielle has joined #commonlisp
chomwitt has quit [Ping timeout: 260 seconds]
shka has quit [Quit: Konversation terminated!]
pve has quit [Quit: leaving]