<|3b|>
what's the best way in cffi to define struct types with pointers to eachother, while keeping typed pointers? like (defcstruct a (b (:pointer (:struct b)))) while b has (:pointer (:struct a))
<|3b|>
put an empty (defstruct b) at the beginning as a 'forward declaration'like in C?
danse-nr3 has joined #commonlisp
shka has joined #commonlisp
vats has joined #commonlisp
mgl has joined #commonlisp
Th30n has joined #commonlisp
<|3b|>
i suppose that has the problem of causing a (defstruct c (b (:struct b))) in the middle to silently get the wrong size for that slot
donleo has joined #commonlisp
Th30n has quit [Quit: restarting]
Th30n has joined #commonlisp
danse-nr3 has quit [Quit: Leaving]
Noisytoot has quit [Ping timeout: 248 seconds]
shawnw has quit [Ping timeout: 255 seconds]
Noisytoot has joined #commonlisp
vats has quit [Ping timeout: 276 seconds]
pve has joined #commonlisp
donleo has quit [Remote host closed the connection]
donleo has joined #commonlisp
<kanuba>
I was under the impression ... in (:pointer ...) is not utilized and only for readability.
<kanuba>
Remember reading that in the docs or something
<|3b|>
it isn't, as far as i know, but it still parses it
<kanuba>
equivalent to just :pointer
<|3b|>
it is stored though
<kanuba>
"A foreign pointer to an object of any type, corresponding to void *. You can optionally specify type of pointer (e.g. (:pointer :char)). Although CFFI won’t do anything with that information yet, it is useful for documentation purposes."
<|3b|>
right
Noisytoot has quit [Ping timeout: 276 seconds]
<kanuba>
So doesn't do anything yet except maybe compile-time type checking that the type exists when defining that struct/field iirc
<kanuba>
Maybe just block compile then?
<|3b|>
don't think cffi knows about block compilation there :)
dino_tutter has joined #commonlisp
<kanuba>
Doesn't really need to parse it unless you want the documentation, right? Just use :pointer, and add a comment?
<|3b|>
yeah, writing it as (:pointer #++(:struct b)) works but is ugly :/
<kanuba>
I wouldn't even use the compound form, and just use a comment at eol or ;; on the line above. Now we're getting into style niceties though
<|3b|>
and arguably the error is sort of nice if i had a typo in the name or something, just need some way to tell it the type exists and is a struct
danse-nr3 has joined #commonlisp
ym has joined #commonlisp
Noisytoot has joined #commonlisp
prokhor_ has quit [Ping timeout: 264 seconds]
<kanuba>
looking at it, doesn't seem possible to have best of both worlds, except reimplementing defcstruct in this case to elide type checking until afterwards
<|3b|>
(defcstruct (b :size :not-defined-yet)) almost works, but is also ugly :)
<kanuba>
and i think it would be ugly to have a multi-struct definition form just for that purpose
prokhor has joined #commonlisp
* kanuba
thinks docs should be updated to redefine "won't do anything with that information yet"
vats has joined #commonlisp
gjvc has quit [Quit: leaving]
mulk has quit [Ping timeout: 264 seconds]
mulk has joined #commonlisp
danse-nr3 has quit [Ping timeout: 248 seconds]
danse-nr3 has joined #commonlisp
gjvc has joined #commonlisp
vats has quit [Ping timeout: 276 seconds]
X-Scale has joined #commonlisp
X-Scale has quit [Ping timeout: 256 seconds]
random-nick has joined #commonlisp
herjazz has joined #commonlisp
Lord_of_Life has joined #commonlisp
synchromesh has quit [Read error: Connection reset by peer]
synchromesh has joined #commonlisp
symdrome has joined #commonlisp
danse-nr3 has quit [Quit: Leaving]
puke has quit [Remote host closed the connection]
puke has joined #commonlisp
yitzi has joined #commonlisp
chomwitt has joined #commonlisp
symdrome has quit [Remote host closed the connection]
alip has quit [Ping timeout: 272 seconds]
chomwitt has quit [Ping timeout: 248 seconds]
alip has joined #commonlisp
chomwitt has joined #commonlisp
awlygj has joined #commonlisp
symdrome has joined #commonlisp
chomwitt has quit [Ping timeout: 252 seconds]
chomwitt has joined #commonlisp
pestctrl has joined #commonlisp
pfdietz has joined #commonlisp
smlckz- has joined #commonlisp
smlckz- has quit [Changing host]
smlckz- has joined #commonlisp
wbooze has quit [Remote host closed the connection]
Inline has quit [Quit: Leaving]
chomwitt has quit [Ping timeout: 252 seconds]
chomwitt has joined #commonlisp
Inline has joined #commonlisp
wbooze has joined #commonlisp
vats has joined #commonlisp
chomwitt has quit [Ping timeout: 276 seconds]
chomwitt has joined #commonlisp
rtypo has joined #commonlisp
chomwitt has quit [Ping timeout: 252 seconds]
chomwitt has joined #commonlisp
lucasta has joined #commonlisp
danse-nr3 has joined #commonlisp
anticomputer has quit [Remote host closed the connection]
icebarf has quit [Remote host closed the connection]
icebarf has joined #commonlisp
symdrome has quit [Ping timeout: 252 seconds]
echos has quit [Quit: cheerio]
wheeler has joined #commonlisp
Th30n has quit [Quit: going off]
danse-nr3 has quit [Quit: Leaving]
bjorkintosh has quit [Remote host closed the connection]
bjorkintosh has joined #commonlisp
bjorkintosh has joined #commonlisp
bjorkintosh has quit [Changing host]
seanw has joined #commonlisp
thuna` has joined #commonlisp
msv has quit [Remote host closed the connection]
wheeler has quit [Quit: cheerio]
echos has joined #commonlisp
mgl has quit [Ping timeout: 252 seconds]
synchromesh has quit [Read error: Connection reset by peer]
synchromesh has joined #commonlisp
chomwitt has quit [Ping timeout: 248 seconds]
danse-nr3 has joined #commonlisp
shawnw has joined #commonlisp
Fade has quit [Changing host]
Fade has joined #commonlisp
mgl has joined #commonlisp
cmack has joined #commonlisp
edgar-rft_ has joined #commonlisp
edgar-rft has quit [Ping timeout: 258 seconds]
mgl has quit [Ping timeout: 255 seconds]
danse-nr3 has quit [Ping timeout: 252 seconds]
<mwnaylor>
In this channel, thought I saw that someone had installed a local copy of the hyperspec and set up `slime-apropos' to link to that. Are there any links that describe how to do that?
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
eddof13 has joined #commonlisp
duuqnd has joined #commonlisp
chomwitt has quit [Ping timeout: 248 seconds]
eddof13 has quit [Ping timeout: 252 seconds]
JuanDaugherty has quit [Quit: JuanDaugherty]
King_julian has joined #commonlisp
Alfr has joined #commonlisp
istewart has joined #commonlisp
mgl has quit [Ping timeout: 252 seconds]
<mwnaylor>
Clojure is a bit of both. Definitely OO under the hood, since it compiles to jvm. More functional at face value, but things like protocols seem to span both.
amb007 has quit [Remote host closed the connection]
amb007 has joined #commonlisp
wacki has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
shka has quit [Ping timeout: 276 seconds]
<bjorkintosh>
I don't know much about the jvm, but I thought it was just a stack machine.
<bjorkintosh>
is it OO at the VM level?
<contrapunctus>
That video was less convincing than I hoped it would be...and I say that as a CLOS fan 🥲
<bjorkintosh>
well contrapunctus, you can pick and choose paradigms as you deem necessary! lisp supports them all.
<contrapunctus>
bjorkintosh: Sure, but good luck getting the FP purists to try Common Lisp 😓
<bjorkintosh>
contrapunctus: that's okay. FP purists are a vanishingly small group. most users of software think Power Point is magical.
<bjorkintosh>
they're my target :-) the purists are best reached through journal articles.
akoana has joined #commonlisp
<bjorkintosh>
contrapunctus: besides that, FP purists are likelier to use a language they created just this morning, than something the common lisper might consider.
pfdietz has joined #commonlisp
donleo has quit [Ping timeout: 248 seconds]
dino_tutter has quit [Ping timeout: 276 seconds]
akoana has quit [Quit: leaving]
<aeth>
bjorkintosh: I think Clojure is implemented (at least partially) in Java, not just itself-on-the-JVM?
<aeth>
bjorkintosh: PowerPoint may not be FP, but Excel is close
<bjorkintosh>
aeth: yes indeed. I carefully avoided naming excel for that reason.
<bjorkintosh>
because I assure you most users of excel have no idea they're doing anything involving functional programming.
attila_lendvai has quit [Ping timeout: 276 seconds]
King_julian has quit [Ping timeout: 276 seconds]
rendar_ has joined #commonlisp
rendar has quit [Ping timeout: 248 seconds]
<mwnaylor>
Since when is excel functional programming?
louis77 has quit [Remote host closed the connection]
<mwnaylor>
Extending stumpwm is drawing me more toward common lisp. Good thing I've got years of elisp hacking. Conceptually similar.
<mwnaylor>
I think it's possible to compile Clojure to .NET (dot not), but jvm is the intended target.
<ixelp>
Excel is the Most Functional of Programming Languages w/ Simon Peyton Jones - P3 Adaptive
yitzi has quit [Remote host closed the connection]
<mwnaylor>
Which version of Excel?
<mwnaylor>
I don't recognize let or lambda in excel.
jungy has quit [Ping timeout: 252 seconds]
triffid has quit [Remote host closed the connection]
<bjorkintosh>
mwnaylor: 365
<mwnaylor>
I only have access (no pun intended) to a much older version.
<bjorkintosh>
me too.
<bjorkintosh>
I avoid windows whenever feasible.
<bjorkintosh>
and I get to be ultra smug about it now. :->
<mwnaylor>
To extend excel, have to delve into VBa. 😠
triffid has joined #commonlisp
<mwnaylor>
I've gotten spoiled by being able to extend emacs via elisp. Excel and vba don't come close to that.
<bjorkintosh>
mwnaylor: not necessarily. python works too. or anything that talks to the excel object, really. I've driven excel from tcl
<bjorkintosh>
and it worked quite nicely too.
<mwnaylor>
bjorkintosh: I'm a drone on the shared account on the work computer. I'm lucky to have gotten away with copying the offcial workbook and tweaking it to work better than the original.
<mwnaylor>
I can't add software to the system and have on venue for requesting more applications.
<bjorkintosh>
hmm.
<mwnaylor>
Fortunately, I've got a few powershell scripts to help my workflow.
<bjorkintosh>
mwnaylor: do you by chance have access to powershell? might be able to sneak in wsl2 to that way.
<bjorkintosh>
hell, on win11, wsl2 is already in there.
<mwnaylor>
win10
<mwnaylor>
Does wsl2 require an install?
<bjorkintosh>
yeah I think.
<bjorkintosh>
but it might not be too much trouble.
<bjorkintosh>
it's how I maintained my sanity. I got that installed, got ubuntu running, and I was productive.
<mwnaylor>
The common access user has no admin privileges. Powershell is basically the ceiling for extending the OS.
<bjorkintosh>
hmm. it just might work.
<bjorkintosh>
if you make the case that you're a poweruser, your friendly IT guy might take a moment away from fighting crowdstrike fires to enable a few more things for you.
<bjorkintosh>
this is important. Effusive praise. flattery, will get you Everywhere!
<mwnaylor>
I'm not. I'm just a dumd shit security officer who is required to use some computer applications during course of daily duties.
<mwnaylor>
s/dumd/dumb/
<mwnaylor>
At least that would be the view of the client.