ec_ has joined #commonlisp
bilegeek has quit [Quit: Leaving]
yewscion has joined #commonlisp
ec_ has quit [Ping timeout: 252 seconds]
waleee has quit [Ping timeout: 244 seconds]
taiju has quit [Ping timeout: 244 seconds]
taiju has joined #commonlisp
taiju has quit [Read error: Connection reset by peer]
taiju has joined #commonlisp
knusbaum has joined #commonlisp
knusbaum has quit [Remote host closed the connection]
taiju has quit [Ping timeout: 244 seconds]
taiju has joined #commonlisp
NotThatRPG has quit [Quit: Textual IRC Client: www.textualapp.com]
yitzi has quit [Quit: Leaving]
karlosz has joined #commonlisp
<pjb> phoe: (mapcar (let ((s 0)) (lambda (i) (incf s i))) (iota 10)) #| --> (0 1 3 6 10 15 21 28 36 45) |#
rbtEngrDude has joined #commonlisp
<moon-child> pjb: that's the same as edgar-rft's solution
<moon-child> (actually, I would have expected the former to perform better, but sbcl seems to generate the same code for both)
taiju has quit [Quit: Quit]
taiju has joined #commonlisp
<pjb> moon-child: Yes, I noticed later.
<pjb> a closure is a closure.
<pjb> If you look at the code of the minimal-compiler, (or just compiler), it would be obvious why the same is generated.
yewscion has quit [Ping timeout: 264 seconds]
aeth_ has joined #commonlisp
akoana has joined #commonlisp
aeth has quit [Killed (NickServ (GHOST command used by aeth_))]
aeth_ is now known as aeth
zacts has joined #commonlisp
ircseeker has joined #commonlisp
karlosz has quit [Quit: karlosz]
karlosz has joined #commonlisp
taiju has quit [Ping timeout: 252 seconds]
taiju has joined #commonlisp
rbtEngrDude has quit [Ping timeout: 264 seconds]
tyson2 has quit [Remote host closed the connection]
dsk has joined #commonlisp
ec_ has joined #commonlisp
taiju has quit [Read error: Connection reset by peer]
taiju has joined #commonlisp
karlosz has quit [Quit: karlosz]
knusbaum has joined #commonlisp
derelict has quit [Ping timeout: 272 seconds]
knusbaum has quit [Ping timeout: 244 seconds]
<beach> Good morning everyone!
<Josh_2> Good morning beach
rbtEngrDude has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life_ has joined #commonlisp
igemnace has quit [Quit: WeeChat 3.1]
Lord_of_Life_ is now known as Lord_of_Life
domovod has joined #commonlisp
ec_ has quit [Ping timeout: 252 seconds]
zacts has quit [Quit: gtg]
Josh_2 has quit [Ping timeout: 265 seconds]
rbtEngrDude has quit [Quit: Lost terminal]
nsrahmad has joined #commonlisp
Bike has quit [Quit: leaving]
Alfr has joined #commonlisp
jemoka has joined #commonlisp
akoana has quit [Quit: leaving]
Alfr has quit [Quit: Leaving]
nsrahmad has left #commonlisp [#commonlisp]
Alfr has joined #commonlisp
ircseeker has quit [Ping timeout: 264 seconds]
kami_ has joined #commonlisp
<kami_> Good morning
<beach> Hello kami_.
<kami_> I'm trying to create a struct with function pointers for a foreign lib with cffi
<kami_> But seem to mess up: https://pastebin.com/M3i27bAP
srhm has quit [Quit: Konversation terminated!]
<beach> What prevents you from using Common Lisp for all your code?
<kami_> I'm creating a server where people have the option to provide their own functions as hooks into the standard processing of some resources
domovod has quit [Quit: WeeChat 3.1]
<moon-child> kami_: I expect you need to define the allocator_std_type structure before you can use it
<kami_> moon-child: thanks. I'm bad at communicating things properly. The headers were grovelled with c2ffi, I'll paste the definition
ad-absurdum has joined #commonlisp
<kami_> moon-child: I added the struct definition: https://pastebin.com/Xf3PLqFp
contrapunctus has left #commonlisp [#commonlisp]
unyu has quit [Quit: WeeChat 3.1]
contrapunctus has joined #commonlisp
ad-absurdum has quit [Quit: Leaving]
unyu has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
GreaseMonkey has joined #commonlisp
contrapunctus has joined #commonlisp
<beach> By popular demand, I have been working on creating an index of SICL-related documents. This is what I have so far: http://metamodular.com/SICL and I continue working on it, adding one or two new items per day until it is done.
Alfr has quit [Quit: Leaving]
pve has joined #commonlisp
knusbaum has joined #commonlisp
shka has joined #commonlisp
knusbaum has quit [Ping timeout: 244 seconds]
shka has quit [Read error: Connection reset by peer]
shka has joined #commonlisp
frgo has joined #commonlisp
jdz has joined #commonlisp
taiju has quit [Ping timeout: 264 seconds]
taiju has joined #commonlisp
waleee has joined #commonlisp
waleee has quit [Ping timeout: 264 seconds]
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
tfb has joined #commonlisp
taiju has quit [Read error: Connection reset by peer]
srji has quit [Quit: leaving]
taiju has joined #commonlisp
srji has joined #commonlisp
amk has quit [Remote host closed the connection]
knusbaum has joined #commonlisp
robin has quit [Ping timeout: 268 seconds]
knusbaum has quit [Remote host closed the connection]
amk has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
Oladon has joined #commonlisp
Inline has quit [Quit: Leaving]
v88m has quit [Read error: Connection reset by peer]
v88m has joined #commonlisp
Inline has joined #commonlisp
dsk has quit [Ping timeout: 268 seconds]
contrapunctus has joined #commonlisp
v88m has quit [Ping timeout: 264 seconds]
cage has joined #commonlisp
attila_lendvai has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
selwyn has joined #commonlisp
Inline has quit [Quit: Leaving]
pve_ has joined #commonlisp
<srji> is there any kind of tutorial/guidelines on how to start developing a lisp app?
pve has quit [Ping timeout: 268 seconds]
Inline has joined #commonlisp
pve_ has quit [Ping timeout: 268 seconds]
dsk has joined #commonlisp
pve has joined #commonlisp
<srji> nevermind i found it
theothornhill has joined #commonlisp
akoana has joined #commonlisp
<phoe> MichaelRaskin: thanks, that's the one
<Inline> no dispatch function defined for #\{
<Inline> is that normal when i load a file containing a dispatch function for it ?
contrapunctus has left #commonlisp [#commonlisp]
tyson2 has joined #commonlisp
contrapunctus has joined #commonlisp
<tfb> Inline: that's not very idiomatic code but it should work
<Inline> it doesn't
<Inline> first off all the *bla* variables are not set as in the file
<Inline> i don't know why the toplevel behaves like a seperate thread
<Inline> i even used (eval-when (:execute :load-toplevel :compile-toplevel)...
<Inline> i mean wrapped around all that code
<Inline> when i do stuff interactively i see changes otherwise when i load from files then not
<tfb> I'm not sure what you're doing to break it, but it should be fine (there are other problems like the in-package which makes no sense) but it does work
random-nick has joined #commonlisp
<tfb> Inline: (I've just tried it in two separate implementations)
azimut_ has quit [Ping timeout: 252 seconds]
theothornhill has quit [Ping timeout: 256 seconds]
theothornhill has joined #commonlisp
<phoe> I think I just found a use case for (multiple-value-call #'values ...)
azimut has joined #commonlisp
<tfb> Inline: but note *readtable* (and *package*) is bound by load so you need to set the readtable later. *print-pretty* etc *isn't* so bound however so if you're not seeing changes in those, you're doing something odd
<tfb> phoe: (multiple-value-call #'values (round 2.0) (round 3.2))
theothornhill has quit [Read error: Connection reset by peer]
theothornhill has joined #commonlisp
<phoe> tfb: exactly
<phoe> though I guess the name multiple-value-values is a bit confusing
<tfb> phoe: multiple-value-call is kind of concatenate for values (ish)
<phoe> yes
theothornhill has quit [Ping timeout: 264 seconds]
killsushi has joined #commonlisp
theothornhill has joined #commonlisp
yewscion has joined #commonlisp
derelict has joined #commonlisp
yitzi has joined #commonlisp
yitzi has quit [Remote host closed the connection]
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
yitzi has joined #commonlisp
theothornhill has quit [Ping timeout: 252 seconds]
selwyn_ has joined #commonlisp
pve_ has joined #commonlisp
srji_ has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
yitzi has quit [*.net *.split]
dsk has quit [*.net *.split]
pve has quit [*.net *.split]
derelict has quit [*.net *.split]
cage has quit [*.net *.split]
Inline has quit [*.net *.split]
tyson2 has quit [*.net *.split]
taiju has quit [*.net *.split]
srji has quit [*.net *.split]
selwyn has quit [*.net *.split]
yewscion has quit [*.net *.split]
yitzi has joined #commonlisp
akoana has quit [Quit: leaving]
knusbaum has joined #commonlisp
contrapunctus has joined #commonlisp
cage has joined #commonlisp
derelict has joined #commonlisp
knusbaum has quit [Remote host closed the connection]
<phoe> is there a format control for turning 1 into "1st"?
<phoe> ~R gives full English words from what I see
dsk has joined #commonlisp
taiju has joined #commonlisp
kayprish has joined #commonlisp
kayprish has quit [Client Quit]
kevingal has joined #commonlisp
selwyn_ has quit [Read error: Connection reset by peer]
Josh_2 has joined #commonlisp
<Josh_2> Helloo
ircseeker has joined #commonlisp
ircseeker has quit [Excess Flood]
eta has quit [Ping timeout: 252 seconds]
skyl4rk has quit [Ping timeout: 252 seconds]
skyl4rk has joined #commonlisp
eta has joined #commonlisp
cage has quit [Remote host closed the connection]
cage has joined #commonlisp
waleee has joined #commonlisp
Inline has joined #commonlisp
dsk has quit [Ping timeout: 264 seconds]
whosit has joined #commonlisp
killsushi has quit [Ping timeout: 264 seconds]
waleee has quit [Ping timeout: 268 seconds]
waleee has joined #commonlisp
kevingal has quit [Remote host closed the connection]
zacts has joined #commonlisp
zacts has quit [Client Quit]
<pjb> beach: thank you for the index!
tyson2 has joined #commonlisp
<beach> Pleasure. Still being worked on.
theothornhill has joined #commonlisp
theothornhill has quit [Ping timeout: 264 seconds]
mariari has quit [Quit: WeeChat 3.1]
mariari has joined #commonlisp
theothornhill has joined #commonlisp
zacts has joined #commonlisp
theothornhill has quit [Ping timeout: 268 seconds]
v88m has joined #commonlisp
fengshaun has quit [Quit: bibi!]
killsushi has joined #commonlisp
theothornhill has joined #commonlisp
domovod has joined #commonlisp
dsk has joined #commonlisp
selwyn has joined #commonlisp
waleee has quit [Ping timeout: 265 seconds]
derelict has quit [Quit: WeeChat 3.1]
waleee has joined #commonlisp
djuber has joined #commonlisp
derelict has joined #commonlisp
terpri has joined #commonlisp
killsushi has quit [Quit: Leaving]
killsushi has joined #commonlisp
waleee has quit [Ping timeout: 265 seconds]
waleee has joined #commonlisp
dsk has quit [Ping timeout: 272 seconds]
waleee has quit [Ping timeout: 264 seconds]
zacts has quit [Quit: gtg]
<jcowan> beach: Yes, thanks indeed.
<jcowan> phoe: You can write a very short function to do "1st"-style formatting for you: take the number mod 10, then convert the number to a string. if the modulo result is {1,2,3}, append {st,nd,rd}, otherwise append "th'.
<tfb> jcowan: 11th
<tfb> need to handle the teens specially
<jcowan> and 12th and 13th, yes. So it may be simpler to work with mod 100 and a vector of strings.
<tfb> jcowan: oh, yes I had not thought of 111th
<jcowan> Unless, like Bilbo, you say "eleventy-first"
ShawnB has joined #commonlisp
ShawnB has left #commonlisp [Leaving...]
<pjb> (format nil "~{~D~:*~[th~;st~;nd~;rd~:;th~]~^, ~}" (iota 10)) #| --> "0th, 1st, 2nd, 3rd, 4th, 5th, 6th, 7th, 8th, 9th" |#
<pjb> (format nil "~:{~D~[th~;st~;nd~;rd~:;th~], ~}" (mapcar (lambda (n) (list n (if (< 10 n 20) 5 (mod n 10)))) (iota 35))) #| --> "0th, 1st, 2nd, 3rd, 4th, 5th, 6th, 7th, 8th, 9th, 10th, 11th, 12th, 13th, 14th, 15th, 16th, 17th, 18th, 19th, 20th, 21st, 22nd, 23rd, 24th, 25th, 26th, 27th, 28th, 29th, 30th, 31st, 32nd, 33rd, 34th, " |#
srhm has joined #commonlisp
Alfr has joined #commonlisp
waleee has joined #commonlisp
trokotech has left #commonlisp [ERC (IRC client for Emacs 28.0.50)]
mindCrime_ has joined #commonlisp
waleee has quit [Ping timeout: 244 seconds]
kevingal has joined #commonlisp
waleee has joined #commonlisp
shka has quit [Quit: Konversation terminated!]
theothornhill has quit [Ping timeout: 244 seconds]
<jmercouris> slime command to get documentation for object represented by symbol?
<jmercouris> e.g. (defvar xyz "the tomato symbol")
<jmercouris> if I see xyz in the codebase, put cursor up to it, I want "the tomato symbol"
<jmercouris> I could M-.
<MichaelRaskin> Wait, you want variable initial content, or documentation?
<jmercouris> the documentation
<jmercouris> so for example, for a function, or a slot, etc
<MichaelRaskin> So (defvar xyz "T" "the tomato symbol")
<jmercouris> ah sorry, I forgot to provide a value above
<jmercouris> yes
<jmercouris> (defvar xyz t "the tomato symbol")
<jmercouris> I just want "the tomato symbol"
<pjb> (defvar xyz t "the tomato symbol") (documentation xyz 'variable) ; implementation specific.
shka has joined #commonlisp
<jmercouris> pjb: sure I know that one
<jmercouris> not part of slime?
<jmercouris> no quick and easy? like hover show documentation or something?
<pjb> M-x slime-documentation
<pjb> Add a key binding.
<jmercouris> I see
<jmercouris> I kept trying 'slime-documentation-lookup'
<jmercouris> no wonder I wasn't finding it
<jmercouris> thanks pjb
<pjb> doesn't seem to work much…
<_death> C-c C-d C-d .. also check https://github.com/mmontone/slime-doc-contribs/
domovod has quit [Quit: WeeChat 3.1]
waleee has quit [Ping timeout: 272 seconds]
<jmercouris> well, for me it checks the CLHS
<jmercouris> I installed that one extension by our favorite developer of all time
<jmercouris> I feel like saying it is voldemort
pve_ has quit [Quit: leaving]
waleee has joined #commonlisp
<_death> clhs would be C-c C-d C-h
knusbaum has joined #commonlisp
<jmercouris> I have no idea, I use hydras
<jmercouris> in any case, 'slime-documentation-look up, looks up the CLHS for me
selwyn has quit [Read error: Connection reset by peer]
knusbaum has quit [Ping timeout: 244 seconds]
waleee has quit [Ping timeout: 272 seconds]
waleee has joined #commonlisp
tfb has quit []
waleee has quit [Ping timeout: 264 seconds]
waleee has joined #commonlisp
zacts has joined #commonlisp
zacts has quit [Client Quit]
mindCrime_ has quit [Ping timeout: 245 seconds]
mindCrime_ has joined #commonlisp
mindCrime_ has quit [Ping timeout: 245 seconds]
mindCrime_ has joined #commonlisp
yewscion has joined #commonlisp
waleee has quit [Ping timeout: 268 seconds]
waleee has joined #commonlisp
waleee has quit [Ping timeout: 272 seconds]
<drmeister> Does anyone remember what bordeaux threads :initial-bindings argument looks like? The updated documentation doesn't describe it.
<drmeister> It's an alist
cage has quit [Quit: rcirc on GNU Emacs 27.1]
shka has quit [Ping timeout: 252 seconds]
waleee has joined #commonlisp
Lycurgus has joined #commonlisp
<phoe> AFAIK it's an alist whose CARs are symbols and CDRs are values
knusbaum has joined #commonlisp
djuber has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
djuber has joined #commonlisp
knusbaum has quit [Remote host closed the connection]
contrapunctus has left #commonlisp [#commonlisp]
<drmeister> I kind of remember the Bordeaux threads documentation being more complete. It looks like it was spruced up, which I appreciate - but it's not very complete. (grumble grumble)
mindCrime_ has quit [Ping timeout: 252 seconds]
<drmeister> How does one kill a thread? I remember that it was difficult (impossible?) to implement destroy-thread because signals and C++ exception handling don't talk to each other properly.
<drmeister> Do implementations put something in to poll if a signal has been sent to a thread? I'm off my threaded programming game.
<MichaelRaskin> Signal? As in POSIX signal? Aren't they per-process anyway?
<drmeister> And I freakin' implemented clasp's Bordeaux threads support - I should be answering the questions.
<drmeister> Unix signal.
<drmeister> Maybe that's a POSIX signal. I always have to look things up.
<MichaelRaskin> Unix/POSIX signals are surely same thing
<MichaelRaskin> But if you use what POSIX considers threads inside the same process, you cannot send a signal to a thread, it is handled by a process
<drmeister> Ok - one less thing to deal with. What I do know is that a signal handler can set a global flag and a thread can poll that flag and then decide what to do with it.
<MichaelRaskin> Oh wait, sorry
<MichaelRaskin> There is tkill, too
<MichaelRaskin> That sends to threads
<MichaelRaskin> (but this is Linux-only)
<drmeister> In Bordeaux threads there's destroy-thread. https://sionescu.github.io/bordeaux-threads/threads/destroy-thread/
<MichaelRaskin> pthread_cancel could be an option
mindCrime_ has joined #commonlisp
<MichaelRaskin> but this waits for a cancellation point
<yitzi> drmeister: Answered your bordeaux-threads question over in chat. I'll restate: those docs are for v2 and the v1 docs appear gone. Here is an archived copy. https://web.archive.org/web/20190921043635/http://trac.common-lisp.net/bordeaux-threads/wiki/ApiDocumentation
<drmeister> MichaelRaskin: Thanks - I'm flailing a bit trying to figure out how this stuff is supposed to work and looking at my implementation to figure out what I did when I better understood how this works. I see what I did now. I implemented the underlying code of destroy-thread so that it registers an interrupt with the thread you want to destroy and when that checks its list of pending interrupts it unwinds the stack and shuts
<drmeister> down the thread.
<drmeister> yitzi: Ah - so I'm not going crazy. I thought I remembered the documentation being more complete.
<drmeister> And there's a v2 for bordeaux threads - that's welcome - I guess. It would be nice to keep a link to the old documentation in the meantime while the new documentation is populated with "TODO"
<yitzi> Yeah, it's kind of irritating. I just downloaded a copy on my machine cause I am always needing them.
<drmeister> But I can't complain I guess - free software and all that.
mindCrime_ has quit [Ping timeout: 252 seconds]
<yitzi> True enough.
<drmeister> Atomics - huh.
yewscion has quit [Remote host closed the connection]
yewscion has joined #commonlisp
<drmeister> Ok, thanks MichaelRaskin - sorry to sound a little clueless. It's been a few years since I implemented clasp's low level multithreading code and I was a little thrown off by the change in the state of the BT documentation.
mindCrime_ has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
contrapunctus has joined #commonlisp
mindCrime_ has quit [Ping timeout: 245 seconds]
<drmeister> My widgets always look like dog food.
<drmeister> But they work!
<yitzi> Its usually just layout and tweaking.
<drmeister> The jupyterlab notebook makes a decent dashboard.
Alfr is now known as Guest6608
Guest6608 has quit [Killed (sodium.libera.chat (Nickname regained by services))]
Alfr has joined #commonlisp
<yitzi> nice
GreaseMonkey has quit [Ping timeout: 264 seconds]
yewscion has quit [Ping timeout: 264 seconds]
mindCrime_ has joined #commonlisp
yewscion has joined #commonlisp
yewscion has quit [Ping timeout: 245 seconds]
attila_lendvai has quit [Ping timeout: 264 seconds]
mindCrime_ has quit [Ping timeout: 272 seconds]
eta has quit [Remote host closed the connection]
zacts has joined #commonlisp
zacts has quit [Client Quit]
<pjb> drmeister: I use (list-threads) and (kill-thread) ;-) in https://github.com/informatimago/lisp/blob/master/tools/thread.lisp