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/>
mingus has quit [Ping timeout: 246 seconds]
mingus1 is now known as mingus
<cpli> i understand how to use the C library. in their code TeMPOraL does the same with an identical out-argument and using similar code does not work on any of our three laptops: https://github.com/TeMPOraL/cl-sqlite/blob/master/sqlite.lisp#L91-L98
<ixelp> cl-sqlite/sqlite.lisp at master · TeMPOraL/cl-sqlite · GitHub
Gleefre has quit [Ping timeout: 260 seconds]
Lord_Nightmare has quit [Quit: ZNC - http://znc.in]
Noisytoot has quit [Quit: ZNC 1.8.2 - https://znc.in]
Noisytoot has joined #commonlisp
Lord_Nightmare has joined #commonlisp
nij- has joined #commonlisp
<nij-> While serializing my data to READably printably format, I need to hack #'print-object for vectors for the result to be more portable. Currently, wihtout any change sbcl prints vectors into #(a b c). However, that doesn't work for all lisp implementations. Instead, I want it to be printed as (vector a b c). However, my attempt makes the repl hangs.. as I think vectors printing is so fundamental for the repl.
<nij-> Here's my attempt: https://bpa.st/AL7KO
<ixelp> View paste AL7KO
<nij-> Any suggestions?
<hayley> I believe specialising a method for a generic function in the CL package, and on a class in the CL package like that is undefined behaviour.
<hayley> clhs 11.1.2.1.2 #19
<nij-> hmm
occ has joined #commonlisp
Noisytoot has quit [Ping timeout: 246 seconds]
igemnace has quit [Quit: WeeChat 3.8]
<yitzi> nij-: You could make a custom pprint-dispatch table that has a dispatch entry for vector and only bind it to *pprint-dispatch* when you need it.
<yitzi> Provided you are using pretty printing.
brettgilio has joined #commonlisp
Noisytoot has joined #commonlisp
phantomics has quit [Ping timeout: 276 seconds]
deadmarshal_ has joined #commonlisp
igemnace has joined #commonlisp
phantomics has joined #commonlisp
igemnace has quit [Remote host closed the connection]
<nij-> Thanks hayley yitzi I will give it a try.
<nij-> Before that I'd like to try a dirty trick - modifying the serialized document directly with regex.
<nij-> My attempt (cl-ppcre:regex-replace-all "#((" "#((1 2 3))" "(vec (") failed..
<nij-> ; Evaluation aborted on #<CL-PPCRE:PPCRE-SYNTAX-ERROR "Opening paren has no matching closing paren." {703AA4C5B3}>
<nij-> How could it be? "#((" should be read as a string.
<hayley> That is a regular expression.
<hayley> Try "#\\(\\("
X-Scale has quit [Quit: Client closed]
<nij-> Ah yeah.. thanks!
tibfulv has quit [Read error: Connection reset by peer]
tibfulv has joined #commonlisp
kagev has quit [Ping timeout: 268 seconds]
X-Scale has joined #commonlisp
kagev has joined #commonlisp
random-nick has quit [Ping timeout: 248 seconds]
clos-encounters has quit [Quit: issued !quit command]
X-Scale has quit [Quit: Client closed]
Spawns_Carpeting has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
Spawns_Carpeting has joined #commonlisp
jeosol has joined #commonlisp
<jeosol> ober: thanks for your message. It's a corporate laptop I think brew install is disabled, it seems, from what they said.
<jeosol> but it could be possible to build from binaries.
<jeosol> pjb: ok, so just like we do on a fresh linux, get an old binary, and then use that to build a more recent SBCL version
Lord_of_Life has quit [Ping timeout: 268 seconds]
Lord_of_Life has joined #commonlisp
igemnace has joined #commonlisp
<pjb> jeosol: right. You can also get a new binary, on the sbcl download page, there are recent binaries for the main OSes.
<jeosol> pjb: thanks, that's my suggested so far, I'll see if I get their laptop I can do it for. I have done the old binary, then new sbcl on my fresh linux boxes in the past
<jeosol> pjb: btw, I was commenting on your beautiful CL array code you shared other day - nice code, not sure you saw  my comment. Learnt a thing or two from it.
mingus1 has joined #commonlisp
mingus has quit [Ping timeout: 252 seconds]
mingus1 is now known as mingus
tyson2 has quit [Read error: Connection reset by peer]
tibfulv_ has joined #commonlisp
tibfulv has quit [Ping timeout: 276 seconds]
tibfulv_ is now known as tibfulv
<cpli> okay, i could write a c wrapper which simply `malloc`s a pointer and returns it with ownership that i then wrap again in common lisp
<ixelp> cl-sqlite/sqlite.lisp at master · TeMPOraL/cl-sqlite · GitHub
<cpli> this is stopping me from writing this project in common lisp.
<Bike> with-foreign-object allocates an object with dynamic extent. just like in C, returning such an object will not work.
<Bike> if you want indefinite extent, you can use foreign-alloc, which is analogous to malloc.
<Bike> the sqlite code uses with-foreign-object for the pointer, but then dereferences the pointer, and presumably that object is created/whatever by sqlite3-open and outlasts the pointer
<Bike> i don't know anything about evdev (or sqlite for that matter) so i can't give any specific advice, but i think it was already suggested you think about how you would do this in C and then translate it. foreign-alloc is like malloc. with-foreign-object is like declaring a local variable with automatic storage duration.
occ has quit [Ping timeout: 260 seconds]
jeosol has quit [Quit: Client closed]
occ has joined #commonlisp
<cpli> Bike, yes the bytes allocated by `cffi:with-foreign-object` may be scoped, but the allocation on libevdev's behalf is not, the entire issue revolves around passing a double pointer to a struct (wherein we only need to allocate a buffer large enough for libevdev to write the new allocation to) and then successfully dereference that scoped allocation to get our "out argument" to return from `make-uinput`
<cpli> [..] to write the *pointer to* the new allocation [..]
jon_atack has joined #commonlisp
jonatack has quit [Ping timeout: 246 seconds]
<cpli> since we've been failing to do so, could someone help us and transliterate this from c to cl? https://0x0.st/H-SR.c
<aeth> ugh
<aeth> I'm like "Oh, I do that all of the time, how hard can this be?"
<aeth> Then I click
<cpli> aeth q-q i just wanna replace kmonad/kanata with something that is **actually** a lisp
<cpli> both of those "keyboard remapping"-programs have lisp-like config
<cpli> aeth, what happened after click..
<aeth> then I saw: struct uinput *uinput_create(struct libevdev* evdev) {
<ElKowar> aeth same man, it's 5 AM, these guys have been talking about this for two days now, and now theyve been trying to fix this for the entire night, I just wanna sleep TwT
<cpli> aeth, what sounds problematic here? (i genuinely don't know what the implication is..) is it the styleguide i'm using?
chip_x has joined #commonlisp
chip_x has quit [Remote host closed the connection]
chip_x has joined #commonlisp
<ElKowar> Context: im laying in bed next to cpli at his computer
<aeth> cpli: so you want to FFI with a struct?
<ixelp> ~cpli/clayboard: src/evdev.lisp - sourcehut git
<cpli> and it's been going alright, i.e. evdev holds a `(:pointer (:struct evdev))` which works, but uinput specifically is giving us issues
<buffet> aeth: we are struggling to make the "out pointer" part work. there is no way to "address of", since ref and area and deref all deref; using pointer pointer evdev, passing that, then derefing also doesn't seem to work; we found cl-sqlite which just passed (:pointer sqlite-statement), and it just adds the level of indirection or smth, completely unclear how that works
chipxxx has joined #commonlisp
<aeth> yeah, this is way more complicated than I expected... maybe ask borodust
<aeth> he does a lot of FFI
<ixelp> borodust (borodust) / Repositories · GitHub
chip_x has quit [Ping timeout: 248 seconds]
<aeth> WHOIS says idle almost 15 days, though
occ has quit [Ping timeout: 255 seconds]
<buffet> ah alright, thank you anyways!
030AAJARY has joined #commonlisp
chipxxx has quit [Ping timeout: 260 seconds]
occ has joined #commonlisp
chipxxx has joined #commonlisp
030AAJARY has quit [Ping timeout: 246 seconds]
nij- has quit [Ping timeout: 246 seconds]
son0p has quit [Ping timeout: 248 seconds]
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
notzmv has quit [Ping timeout: 264 seconds]
elderK has joined #commonlisp
shka has joined #commonlisp
Lumine has joined #commonlisp
Josh_2 has joined #commonlisp
rgherdt has joined #commonlisp
<Josh_2> I go look at common lisp subreddit. What an atrocity
<Josh_2> Talk about an eye sore
<Josh_2> Couldn't you know maybe theme it about lisp
<hayley> That's on you for using the new Reddit layout.
<Josh_2> I did not choose the stupid theme
<Josh_2> or the logo :joy: Imagine thinking "hmm yes I run CL subreddit, how about I use uki flag instead of idk lisp alien mascot"
<Josh_2> real big brain move
<aeth> new.reddit.com for those who use the old reddit and are confused by seeing the default style subreddit
<aeth> I wasn't even aware new reddit has some style now
<hayley> r/lispmemes trivia: there was a very short-lived HyperSpec CSS theme, which lasted a few hours from memory.
rgherdt_ has joined #commonlisp
<Josh_2> https://imgur.com/mSiLIZA.png certified reddit moment
<ixelp> Common Lisp
<Josh_2> I go on reddit once in a blue moon.
<Josh_2> Could just theme the subreddit appropriately
<Shinmera> you sure complain a lot for someone that never visits
rgherdt has quit [Ping timeout: 264 seconds]
<Josh_2> This is first time complaining
<Shinmera> yeah, and your griping has been going on for a bit.
<Josh_2> Good
<Josh_2> Theme it appropriately
<Shinmera> ain't my nor anybody else's forum here
<Shinmera> now shut up
aartaka has joined #commonlisp
<Josh_2> The chances that the mods of the subreddit aren't in here? About 0. Most of the CL community is moderated by the same few people
<Josh_2> IRC is basically the only exception
Josh_2 was kicked from #commonlisp by Shinmera [shut up.]
<Shinmera> Now that's done with we can resume more useful business, thank you.
LW has joined #commonlisp
son0p has joined #commonlisp
<beach> Shinmera: Which of the three syllables in the name of your game is emphasized?
pve has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
igemnace has quit [Remote host closed the connection]
* beach will read the answer later.
aartaka has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
<Shinmera> beach: I've never fully decided on a canonical pronunciation, so whichever way suits you best.
notzmv has joined #commonlisp
LW has quit [Ping timeout: 250 seconds]
MajorBiscuit has joined #commonlisp
Cymew has joined #commonlisp
LW has joined #commonlisp
occ has quit [Ping timeout: 246 seconds]
pranavats has joined #commonlisp
jon_atack has quit [Ping timeout: 268 seconds]
occ has joined #commonlisp
<phoe> might even be four syllables if we are treating the lone "n" Japanese-style
<pve> how do they say "n"?
<|3b|> still N, just a syllable on its own
* |3b| would expect another syllable for the D too (probably 'do', though my intuition for japanese is very rusty)
<pve> cool, learned something new today... so is "nippon" not pronounced nip-pon? :)
<|3b|> ni-p-po-n
<jackdaniel> after discussing reddit themes we are into pronounciation, smooth!
* jackdaniel has enough irc for today
smlckz has quit [Ping timeout: 248 seconds]
<hayley> Hey, p is often a separate syllable in Common Lisp. See e.g. digit-char-p
smlckz has joined #commonlisp
smlckz has quit [Changing host]
smlckz has joined #commonlisp
LW has quit [Quit: WeeChat 3.6]
scymtym has quit [Ping timeout: 276 seconds]
Brucio-61 has quit [Ping timeout: 260 seconds]
nij- has joined #commonlisp
Brucio-61 has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 265 seconds]
scymtym has joined #commonlisp
jmdaemon has quit [Ping timeout: 255 seconds]
MajorBiscuit has joined #commonlisp
nij- has quit [Ping timeout: 246 seconds]
<beach> Shinmera: Got it.
MajorBiscuit has quit [Ping timeout: 265 seconds]
occ has quit [Read error: Connection reset by peer]
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
rgherdt has joined #commonlisp
MajorBiscuit has joined #commonlisp
rgherdt_ has quit [Ping timeout: 265 seconds]
rgherdt has quit [Ping timeout: 256 seconds]
aartaka has quit [Ping timeout: 264 seconds]
aartaka has joined #commonlisp
X-Scale has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 246 seconds]
X-Scale has quit [Quit: Client closed]
X-Scale has joined #commonlisp
bsteger has joined #commonlisp
X-Scale has quit [Quit: Client closed]
MajorBiscuit has joined #commonlisp
Gleefre has joined #commonlisp
X-Scale has joined #commonlisp
glaucon has joined #commonlisp
cage has joined #commonlisp
dcb has quit [Quit: MSN Messenger 3.8]
glaucon has quit [Quit: WeeChat 3.5]
aartaka has quit [Ping timeout: 246 seconds]
aartaka has joined #commonlisp
Lumine has quit [Quit: brb]
Guest2961 has joined #commonlisp
Guest2961 has quit [Client Quit]
Noisytoot has quit [Ping timeout: 276 seconds]
Noisytoot has joined #commonlisp
random-nick has joined #commonlisp
Noisytoot has quit [Ping timeout: 276 seconds]
jon_atack has joined #commonlisp
Noisytoot has joined #commonlisp
nij- has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
attila_lendvai has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
contrapunctus has left #commonlisp [#commonlisp]
Gleefre has joined #commonlisp
contrapunctus has joined #commonlisp
* bitblit1 has silently joined the room
tevo has quit [Read error: Connection reset by peer]
tevo has joined #commonlisp
nij- has quit [Ping timeout: 248 seconds]
Gleefre has quit [Remote host closed the connection]
Noisytoot has quit [Ping timeout: 276 seconds]
occ has joined #commonlisp
Noisytoot has joined #commonlisp
cage has quit [Remote host closed the connection]
splatt990 has joined #commonlisp
Noisytoot has quit [Quit: ZNC 1.8.2 - https://znc.in]
Noisytoot has joined #commonlisp
Noisytoot has quit [Excess Flood]
Noisytoot has joined #commonlisp
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
Noisytoot has quit [Ping timeout: 255 seconds]
<Bike> cpli: cffi does not have addressof; instead you only deal with addresses. when you with-foreign-object or foreign-alloc an :int, the variable bound is not "an int", it's a pointer to storage for an int. so e.g., { int x; x = 7; return x; } is translated as (with-foreign-object (x int) (setf (mem-ref x :int) 7) (mem-ref x :int))
Noisytoot has joined #commonlisp
X-Scale has quit [Quit: Client closed]
<Bike> cpli: so for your code here, you'd (with-foreign-object (uinput (:pointer libevdev-uinput)) ...), then in that body do (libevdev-uinput-create-from-device ... uinput), and end with (mem-ref uinput '(:pointer libevdev-uinput))
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 246 seconds]
jmdaemon has joined #commonlisp
MajorBiscuit has quit [Quit: WeeChat 3.6]
jmdaemon has quit [Ping timeout: 250 seconds]
<buffet> Bike: we just figured it out! thanks!
pranavats has left #commonlisp [Error from remote client]
<Bike> no problem
pranavats has joined #commonlisp
avocadoist has quit [Remote host closed the connection]
avocadoist has joined #commonlisp
kevingal has joined #commonlisp
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
jon_atack has quit [Ping timeout: 246 seconds]
jmdaemon has joined #commonlisp
cdegroot has quit [Ping timeout: 255 seconds]
cdegroot has joined #commonlisp
jon_atack has joined #commonlisp
jeosol has joined #commonlisp
jmdaemon has quit [Ping timeout: 248 seconds]
<cpli> thank you, Bike!
tyson2 has joined #commonlisp
skin has joined #commonlisp
inline__ has joined #commonlisp
Inline has quit [Ping timeout: 268 seconds]
cdegroot has quit [Ping timeout: 250 seconds]
cdegroot has joined #commonlisp
jmdaemon has joined #commonlisp
cognemo has joined #commonlisp
Gleefre has joined #commonlisp
X-Scale has joined #commonlisp
jonatack has joined #commonlisp
jon_atack has quit [Ping timeout: 256 seconds]
Cymew has quit [Ping timeout: 264 seconds]
jmdaemon has quit [Ping timeout: 248 seconds]
jmdaemon has joined #commonlisp
X-Scale has quit [Ping timeout: 260 seconds]
jmdaemon has quit [Ping timeout: 248 seconds]
X-Scale has joined #commonlisp
Oladon has joined #commonlisp
morganw has joined #commonlisp
Lycurgus has joined #commonlisp
Lycurgus has quit [Quit: Exeunt: personae.ai-integration.biz]
<char[m]> is iterate still maintained?
Gleefre has quit [Remote host closed the connection]
<Demosthenex> char[m]: did you find a problem with it?
jmdaemon has joined #commonlisp
<char[m]> Demosthenex: Yeah. the error reporting for code used in the iterate (but not related to iterate) is not reported for the correct location. For example in the body have (undefined-function). For iterate the orange underline is on the iterate:iterate, for loop the orange underline is under (undefined-function).
<Demosthenex> orange underline? you mean in emacs or similar?
<yitzi> iterate uses code walking, does it even have to ability to report source code references like that?
kevingal has quit [Ping timeout: 255 seconds]
<Demosthenex> could be old cached values in slime/swank
<char[m]> Demosthenex: Yeah sly's error reporting in emacs. I don't think it is cached because it happens even for new code I write. yitzi Error reporting should have accurate location data as long as iterate is outputting the original source lists. It should be able to do that since the body forms shouldn't need to be modified.
inline__ has quit [Remote host closed the connection]
inline__ has joined #commonlisp
<yitzi> I seriously doubt that. As I recall only SBCL and CLASP support with-current-source-form and I don't see any usage of that in the iterate code.
<Bike> if it's an undefined function warning, it's being signaled by the implementation rather than by the iterate macroexpander, so w-c-s-f shouldn't come into it, i would guess
<Bike> if it is being signaled by iterate that would be another problem
<char[m]> Bike: Exactly I'm talking about problems reported by the implementation; nothing to do with wcsf.
<scymtym> it seems like iterate reconstitutes every walked form out of fresh conses, even if the reconstituted form is EQUAL to the original form. that explains why the implementation loses the source information
perrierjouet has quit [Ping timeout: 264 seconds]
Gleefre has joined #commonlisp
perrierjouet has joined #commonlisp
inline__ has quit [Remote host closed the connection]
Inline has joined #commonlisp
<char[m]> scymtym: That is what I was thinking. I feel like it should be more frowned upon, especially if it is not needed for the macro to work.
Oladon has quit [Quit: Leaving.]
amoroso has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
amoroso has quit [Quit: Client closed]
tyson2 has quit [Remote host closed the connection]
attila_lendvai has quit [Ping timeout: 255 seconds]
Gleefre has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
lxi_ has quit [Ping timeout: 265 seconds]
LW has joined #commonlisp
X-Scale has quit [Quit: Client closed]
tyson2 has quit [Remote host closed the connection]
bsteger has quit [Quit: Leaving]
pve has quit [Quit: leaving]
scymtym has quit [Ping timeout: 246 seconds]
Brucio-61 has quit [Ping timeout: 260 seconds]
Brucio-61 has joined #commonlisp
shka has quit [Ping timeout: 250 seconds]
aartaka has joined #commonlisp
notzmv has quit [Ping timeout: 265 seconds]
tyson2 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
scymtym has joined #commonlisp
LW has quit [Quit: WeeChat 3.6]
skin has quit [Ping timeout: 276 seconds]
X-Scale has joined #commonlisp
morganw has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
Gleefre has quit [Ping timeout: 260 seconds]
nij- has joined #commonlisp
Gleefre has joined #commonlisp
azimut has joined #commonlisp
X-Scale has quit [Quit: Client closed]
aartaka has quit [Ping timeout: 255 seconds]
Gleefre has quit [Remote host closed the connection]
jon_atack has joined #commonlisp