<holycow>
i have google eq/eql/equal/equalp and tried various permutations to test my understanding
<holycow>
i am not precisely certain why remove is not able to remove the constructed object from a list
lucasta has quit [Quit: Leaving]
<yitzi>
Unless you specify the package to INTERN it will use the package at execution time which is in *PACKAGE*
waleee has quit [Ping timeout: 245 seconds]
bilegeek has joined #commonlisp
mesuutt has quit [Ping timeout: 268 seconds]
<yitzi>
And I presume that btn-b is an object not a symbol, so REMOVE is comparing based on EQ for objects. In other words `(eq ob 'ob) => nil`
<holycow>
okay so
<holycow>
btn-b is a clog object yes but i wasn't paying attention to the word objevct
<holycow>
i thought in cl we have symbols numbers and strings
<holycow>
how is an object different?
<yitzi>
for the example above `(eq ob (symbol-value 'ob)) => t`
<yitzi>
symbols have values, function values, etc.
<holycow>
and objects?
<yitzi>
symbol value would have been more accurate
yitzi has quit [Remote host closed the connection]
mesuutt has joined #commonlisp
amb007 has joined #commonlisp
mesuutt has quit [Ping timeout: 245 seconds]
amb007 has quit [Ping timeout: 260 seconds]
random-nick has quit [Ping timeout: 245 seconds]
<holycow>
oh, i posted this in the wrong, chan, appologies
X-Scale has quit [Quit: Client closed]
X-Scale has joined #commonlisp
<zlqrvx>
Hi, quick question: I am writing some wrappers with cffi and am getting DIVISION-BY-ZERO errors in sbcl (it works fine in ccl); example: https://bpa.st/XPTQ. What am I doing wrong?
Patternmaster has quit [Ping timeout: 255 seconds]
decweb has joined #commonlisp
Patternmaster has joined #commonlisp
ronald has joined #commonlisp
decweb has quit [Ping timeout: 252 seconds]
pfdietz has joined #commonlisp
istewart has joined #commonlisp
mesuutt has joined #commonlisp
istewart has quit [Ping timeout: 268 seconds]
amb007 has joined #commonlisp
mesuutt has quit [Ping timeout: 260 seconds]
amb007 has quit [Ping timeout: 240 seconds]
X-Scale has quit [Quit: Client closed]
Pixel_Outlaw has joined #commonlisp
brokkoli_origin has quit [Ping timeout: 252 seconds]
brokkoli_origin has joined #commonlisp
mesuutt has joined #commonlisp
mesuutt has quit [Ping timeout: 245 seconds]
Noisytoot has quit [Excess Flood]
pranavats has joined #commonlisp
Noisytoot has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
X-Scale has joined #commonlisp
Noisytoot has quit [Ping timeout: 264 seconds]
mesuutt has joined #commonlisp
Noisytoot has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
mesuutt has quit [Ping timeout: 256 seconds]
pranavats has joined #commonlisp
iNomad has quit [Ping timeout: 240 seconds]
iNomad has joined #commonlisp
iNomad has quit [Ping timeout: 268 seconds]
msv has joined #commonlisp
Noisytoot has quit [Remote host closed the connection]
Noisytoot has joined #commonlisp
mesuutt has joined #commonlisp
mesuutt has quit [Ping timeout: 240 seconds]
puke is now known as Guest3535
puke has joined #commonlisp
Guest3535 has quit [Killed (copper.libera.chat (Nickname regained by services))]
puke has quit [Max SendQ exceeded]
puke has joined #commonlisp
amb007 has joined #commonlisp
<Shinmera>
nothing. C libraries are used to having float traps muted, and so it's not unusual for them to just do garbage float ops that SBCL will trap
<Shinmera>
in such a case you have to surround your code with float-features:with-float-traps-masked T
pve has joined #commonlisp
X-Scale has quit [Quit: Client closed]
Pixel_Outlaw has quit [Remote host closed the connection]
mesuutt has joined #commonlisp
mesuutt has quit [Ping timeout: 245 seconds]
wacki has joined #commonlisp
alcor has joined #commonlisp
bitmapper has quit [Quit: Connection closed for inactivity]
rtypo has joined #commonlisp
rgherdt has joined #commonlisp
tok has joined #commonlisp
dino_tutter has joined #commonlisp
amb007 has quit [Ping timeout: 268 seconds]
mesuutt has joined #commonlisp
mesuutt has quit [Ping timeout: 255 seconds]
amb007 has joined #commonlisp
X-Scale has joined #commonlisp
poplin has quit [Ping timeout: 255 seconds]
poplin has joined #commonlisp
cage has joined #commonlisp
bilegeek has quit [Quit: Leaving]
Inline has joined #commonlisp
<cage>
Hi! I am having issues distributing binary of my application because the software depends on osicat and this library generate a dynamic library that is loaded by the lisp image at runtime (the path of the library file seems to be hardcoded in the saved image), this makes very uncomfortable for distributing the software i have found a solution here: https://stackoverflow.com/questions/55183247/how-to-dump-an-executab
<cage>
le-sbcl-image-that-uses-osicat
<ixelp>
linker - How to dump an executable SBCL image that uses osicat - Stack Overflow
<cage>
but unfortunately it does not works for me
<cage>
i modified the asdf file of my project as suggested by the answer on SO but the image keep looking for library in $HOME/.cage/common-lip/...libosicat.so
<ixelp>
tinmop/tinmop.asd at static-exe - cage/tinmop - Codeberg.org
<cage>
my other option would be getting rid of osicat entirely, but i would prefer not to go that way
mesuutt has joined #commonlisp
mesuutt has quit [Ping timeout: 256 seconds]
mesuutt has joined #commonlisp
jiny has joined #commonlisp
waleee has joined #commonlisp
<zlqrvx>
thanks Shinmera that fixed my problem!
<Shinmera>
I avoid osicat and other libfixposix libraries exactly because they're a pain to deploy
mesuutt has quit [Ping timeout: 245 seconds]
<cage>
Shinmera: my only other choice is to use sb-posix but it lacks a few functions :(
<Shinmera>
cffi also exists
<cage>
I am slowly re-wrapping the missing function from sb-posix with cffi, i hope i will succeed :)
X-Scale has quit [Quit: Client closed]
decweb has joined #commonlisp
poplin has quit [Read error: Connection reset by peer]
poplin has joined #commonlisp
X-Scale has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 245 seconds]
Lord_of_Life_ is now known as Lord_of_Life
wacki has quit [Ping timeout: 272 seconds]
wacki has joined #commonlisp
decweb has quit [Ping timeout: 260 seconds]
dino_tutter has quit [Ping timeout: 255 seconds]
jrx has joined #commonlisp
admich1 has joined #commonlisp
Inline has quit [Quit: Leaving]
green_ has joined #commonlisp
waleee has quit [Ping timeout: 252 seconds]
decweb has joined #commonlisp
nij- has joined #commonlisp
<nij->
gilberth - Thanks for novaspec (happy user)! Can't find a place to raise "issue". So in case you are open to it - glyphs like "ff" may prevent being searched correctly, while the user input is "ff". e.g. https://novaspec.org/cl/f_make-array
<ixelp>
make-array | Common Lisp Nova Spec
<gilberth>
nij-: Thanks. Those ligature shouldn't be there in the first place. I have code that tries to get rid of those. Or at least I believe so. I would need to have a look and figure out how those slipped through.
<gilberth>
In fact, I wonder how TeX put them there in the first place. TeX is run with fake metrics lacking a ligature table on purpose. *sigh*.
jrx has quit [Read error: Connection reset by peer]
decweb has quit [Ping timeout: 245 seconds]
wacki has quit [Read error: Connection reset by peer]
wacki has joined #commonlisp
wacki has quit [Read error: Connection reset by peer]
jrx has joined #commonlisp
<jrx>
t
jrx has quit [Remote host closed the connection]
mesuutt has joined #commonlisp
mesuutt has quit [Ping timeout: 245 seconds]
<nij->
gilberth > In dpANS tex source, one example is `\param{displaced-index-offset}`. \param traces back to
<gilberth>
I'll fix that. I work from the DVI anyway and somehow (1) TeX managed to put ligatures there and (2) my code looking for ligature isn't as effective as I thought it was.
<gilberth>
The most dirty fix would be to remove ligatures at the very last minute before emitting the HTML.
<nij->
Can create a whitelist of characters that could occur in the textContent of each dom element in your result? Dunno, just a thought.
wacki has joined #commonlisp
<nij->
Oh ok.. that's considered too dirty :/
<gilberth>
I'm busy with noffi atm. I have code there that is supposed to tell me about the repertoire used. I also need to get the various TeX encodings rights with each font using a different character set. Not each, but there are a few. And then those TTF files use a slightly different character set still. Tedious business.
<gilberth>
I should release my routine to render DVIs using HTML/CSS. I didn't feel like doing that with MathJAX or so. I can also render using CLIM, if I wish. So much to do.
<nij->
You could just add issue atm, and come back to it later if you want.
mgl_ has joined #commonlisp
<gilberth>
Well, I have plans. Like some annotation support. Or like also offering other documents like the MOP. And I want to have a toc pane on the left if room is there. And I want to have better support for \term{...}. Some solution that won't make you flip back and forth from the glossary that does not involve popups.
<nij->
It's amazing already :) Thanks!
mgl_ has quit [Ping timeout: 260 seconds]
<nij->
Btw, noffi seems like the right way to do stuff (I was reading)! Why hasn't people done that before.
<gilberth>
People told me again and again that it is not possible. That's why. Pointing to struct packing and the like.
<beach>
nij-: I assume that "Why hasn't people done that before" was a rhetorical question.
<nij->
Does it "contain" a C runtime (i.e. a C compiler that lasts until the end of the life of the lisp) or something?
<gilberth>
nij-: Oh, how did you find that document? That was not meant for the general public.
<nij->
Hmmm google :/
<nij->
Oops.. Sorry.
<gilberth>
nij-: Sorry? For what? I put it there in the public, didn't I?
<nij->
For spreading it even more :/
<gilberth>
There isn't really a C runtime. I just invoke the functions you ask me to invoke or peek and poke the foreign data that you ask me to peek or poke at.
<nij->
You launch a C compiler every time? #_XYZ is read and evaled?
<gilberth>
Nope, I don't.
<gilberth>
I bring my own C preprocessor, C parser and kind of like C compiler.
<gilberth>
I invoke the host C compiler only to figure out the include path.
<nij->
Oh I see, and you compile at, say, #_{#include <math.h>}
<gilberth>
It parses the declarations and remembers those, yes.
<nij->
Yeah.. examples seem very neat.
<nij->
Why did people say it impossible?
ocra8 has joined #commonlisp
<gilberth>
I believe because they feared all the #pragma pack.
<gilberth>
To be fair, getting the C parser to cope real header files was some work. Mostly due to GCC's incredible and broken beyond all hope __attribute___ thingies. And C is not context-free to begin with.
Lord_of_Life has joined #commonlisp
<beach>
nij-: People think lots of things are impossible that really aren't.
<nij->
Yeah..
<nij->
I just wanted to know what the pain point was. Sadly I know too little C to understand the pain point.
<nij->
(Didn't know of #pragma or __attribute__. I will come back to this issue.)
<gilberth>
The pain is that indeed real world header are invoking all kind of C extensions. The other is poor documentation. GCC's documentation isn't really detailed on the syntax accepted e.g. While Microsoft's documentation is pretty good, I must say. Apple has no documentation at all. Or at least what is there is a joke.
<nij->
I guessed to this point too, yeah. How does the usual ffi method overcome this though?
<gilberth>
They make the user parse the header files. You usually write bindings by hand copying what you find in header files. Or you use some tool for that.
<gilberth>
This doesn't work with C macros though. When you look at my examples you'd recognize that I say e.g. (#_BlackPixel ...). That's a #define not a function. Or all those (#_GTK_BLAH ...)
<nij->
I see. So basically, noffi attempts to automate the "hand copying process"?
<nij->
And that's hard because there are too many undocumented situations.
<gilberth>
Not quite. noffi works more like a C compiler. Different approach.
thuna` has joined #commonlisp
<gilberth>
E.g. BlackPixel(a,b) as a C macro turns to ((&((_XPrivDisplay)(a))->screens[b])->black_pixel). I then then take that, parse it as a C expression and generate Lisp code which then does the same. You can actually embed C code within Lisp this way. Expressions only sofar, but I'll also will support statements in the future. When I'm there I can also expand "static inline" C functions which are the new #define's.
<nij->
Basically (guessing again).. you're writing a C->CL compiler?
<gilberth>
Hence this is less about "bindings" and more about mixing C and Lisp. My goal was that when you find some snippet of C code addressing libacme you can copy that example to Lisp without needing to figure out details like what is a macro and what not, what calling conventions are used, whether something happens to be a 'float' or a 'double' and whether that depends on your architecture, etc.
<gilberth>
nij-: Yes. One that addresses the host C ABI.
<ixelp>
GitHub - vsedach/Vacietis: C to Common Lisp compiler
<nij->
(besides the syntax difference..)
admich1 has quit [Ping timeout: 272 seconds]
<gilberth>
"The loaded C code has the same function calling convention as regular CL code and uses the same numerical representations." ;<-- that's the difference.
<gilberth>
This won't you make invoking foreign functions.
<gilberth>
* make you
decweb has joined #commonlisp
iNomad has joined #commonlisp
mesuutt has joined #commonlisp
mesuutt has quit [Ping timeout: 252 seconds]
<beach>
gilberth: It looks to me like Noffi could revolutionize the creation of Common Lisp bindings for existing C libraries. Is that a correct assessment?
edgar-rfx has joined #commonlisp
<gilberth>
beach: It could as you don't need to write [fragile] bindings anymore. But whether people will eventually accept my approach, I don't know. Initial reactions reach from "this is impossible, think of the #pragma" to "Uh?! Underscores?! How disgusting.". We'll see. This is still wip and not as efficient as it should be, I focused on getting it to work first.
<gilberth>
And my code is incredible messy too! Shock therapy in an attempt to overcome my release-phobia.
edgar-rft has quit [Ping timeout: 256 seconds]
<paulapatience>
As a happy user of Noffi, what I can day is it feels like magic
<paulapatience>
s/day/say/
admich1 has joined #commonlisp
<beach>
gilberth: I see. It is true that many people are unwilling to change the way they do things.
edgar-rfx is now known as edgar-rft
<_death>
how does noffi compare to autowrap? I guess it doesn't require c2ffi/clang to generate bindings the way autowrap does
thuna` has quit [Remote host closed the connection]
josrr has joined #commonlisp
<Shinmera>
I'm probably too stuck in "I need to get things out the door in a deliverable way"-mode to check out noffi any time soon
<gilberth>
noffi does it all on its own. And so there are no surprising missing pieces like facing that something is a macro or not being able to pass struct's by value. And there is no dependency on third party tools that might change or disappear with time. Oh, and when it uses clang I suppose it can't read Microsoft's header files.
josrr has quit [Client Quit]
josrr has joined #commonlisp
<scymtym>
it would also be important to note which external tools (c preprocess, c compiler, patched gcc with xml output, etc.) are required by the respective approaches at which times (compile time, load time, runtime), i think
<scymtym>
sorry, i guess that aspect has been mentioned already
<gilberth>
noffi uses the host C compiler only to figure out the include path. Provide it the path by other means and all it would need is the header files.
<gilberth>
I considered using libclang but what it gives you is incomplete. It is only meant for xref purposes to be used by editors and the like. It's useless. Besides: Will it still be around in 20 years? I mean how many patched GCCs are out there for dumping an AST? None survived because RMS didn't want that GCC can be helpful in making FFIs for political issues.
admich1 has quit [Ping timeout: 245 seconds]
<_death>
I wouldn't be surprised if clang will still be around.. worse software has been around for much longer ;)
<Shinmera>
the issue with clang/llvm more is it changing to a degree where it's unrecognisable
admich1 has joined #commonlisp
<gilberth>
Is libclang so important to them that they would keep it stable. And again: It's not meant to give you the real AST with all the information you would need.
<gilberth>
I'm happy with doing it myself. This way I also can parse Microsoft's headers and won't need to rely on msys/mingw to have hopefully correct headers.
<_death>
Shinmera: this is true, and I don't like llvm for this and other reasons.. but once the bindings are generated there's no need for an external tool anymore
<Shinmera>
provided you never want to update whatever you're binding to, sure
<gilberth>
As Shinmera said.
<gilberth>
Besides what is named e.g. a "REAL" might be a float here and a double there. Headers might depend on the ABI or host used. Packing might differ, aligment, etc, etc. It's best to just include the header that comes with our version of a lib you link against.
<_death>
sure, change propagation can lead to pain
wacki has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
danza has joined #commonlisp
wacki has joined #commonlisp
<_death>
sometimes it just makes sense to write a C module that exposes a small and stable interface.. there are many useful libraries with a large and elaborate interface, but sometimes you can work around the issue this way for your particular use case.. the big stuff usually requires a lot of lisp to create something looking sane and relatively seamless to a lisp programmer
mesuutt has joined #commonlisp
<gilberth>
I'd rather write that part in Lisp instead of in C. Besides when I write it in C I have the issue that there is an additional library, namely those C stubs, that I must make sure my user has.
mesuutt has quit [Ping timeout: 260 seconds]
X-Scale has quit [Quit: Client closed]
<_death>
yeah.. I used that approach with some C++ libraries though.. exposing a simple C interface