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/>
kchanqvq57 has joined #commonlisp
jA_cOp has joined #commonlisp
jA_cOp_ has quit [Ping timeout: 250 seconds]
kchanqvq41 has quit [Ping timeout: 250 seconds]
phantomics_ has quit [Quit: Leaving]
phantomics has joined #commonlisp
equwal has joined #commonlisp
rgherdt has quit [Remote host closed the connection]
Spawns_Carpeting has quit [Quit: ZNC 1.9.1 - https://znc.in]
Spawns_Carpeting has joined #commonlisp
spdegabrielle has joined #commonlisp
admich1 has quit [Ping timeout: 250 seconds]
Ruby has quit [Quit: ZNC - https://znc.in]
Ruby has joined #commonlisp
dra has quit [Ping timeout: 250 seconds]
svm is now known as msv
X-Scale has joined #commonlisp
equwal has quit [Ping timeout: 248 seconds]
Oladon has joined #commonlisp
kchanqvq61 has joined #commonlisp
kchanqvq57 has quit [Ping timeout: 250 seconds]
bpanthi977 has quit [Ping timeout: 258 seconds]
rendar has joined #commonlisp
rendar has quit [Changing host]
rendar has joined #commonlisp
ftzm3 has joined #commonlisp
ftzm has quit [Ping timeout: 248 seconds]
ftzm3 is now known as ftzm
istewart has quit [Read error: Connection reset by peer]
les_ is now known as les
istewart has joined #commonlisp
shawnw_ is now known as shawnw
bpanthi977 has joined #commonlisp
bpanthi977 has quit [Ping timeout: 256 seconds]
bpanthi977 has joined #commonlisp
spdegabrielle has quit [Quit: Connection closed for inactivity]
Pixel_Outlaw has joined #commonlisp
BurntWater has joined #commonlisp
jonatack has quit [Ping timeout: 248 seconds]
samedi has joined #commonlisp
dutchie has quit [Remote host closed the connection]
dutchie has joined #commonlisp
mwnaylor has quit [Ping timeout: 256 seconds]
mwnaylor has joined #commonlisp
samedi has quit [Remote host closed the connection]
mwnaylor has quit [Ping timeout: 256 seconds]
weeks has joined #commonlisp
kchanqvq22 has joined #commonlisp
mwnaylor has joined #commonlisp
kchanqvq61 has quit [Ping timeout: 250 seconds]
admich1 has joined #commonlisp
kchanqvq37 has joined #commonlisp
kchanqvq22 has quit [Ping timeout: 250 seconds]
gorignak has quit [Quit: quit]
kchanqvq79 has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
kchanqvq37 has quit [Ping timeout: 250 seconds]
kchanqvq54 has joined #commonlisp
kchanqvq34 has joined #commonlisp
kchanqvq79 has quit [Ping timeout: 250 seconds]
kchanqvq64 has joined #commonlisp
kchanqvq54 has quit [Ping timeout: 250 seconds]
kchanqvq34 has quit [Ping timeout: 250 seconds]
edgar-rft` has joined #commonlisp
edgar-rft has quit [Ping timeout: 265 seconds]
kchanqvq90 has joined #commonlisp
younder has quit [Ping timeout: 265 seconds]
kchanqvq64 has quit [Ping timeout: 250 seconds]
admich1 has joined #commonlisp
mwnaylor has quit [Read error: Connection reset by peer]
mwnaylor has joined #commonlisp
corvvs has quit [Ping timeout: 250 seconds]
kchanqvq46 has joined #commonlisp
decweb has quit [Quit: Konversation terminated!]
corvvs has joined #commonlisp
decweb has joined #commonlisp
kchanqvq79 has joined #commonlisp
kchanqvq90 has quit [Ping timeout: 250 seconds]
kchanqvq59 has joined #commonlisp
Oladon has quit [Quit: Leaving.]
kchanqvq46 has quit [Ping timeout: 250 seconds]
kchanqvq79 has quit [Ping timeout: 250 seconds]
pve has joined #commonlisp
chomwitt has joined #commonlisp
weeks has quit [Remote host closed the connection]
mwnaylor` has joined #commonlisp
mwnaylor has quit [Ping timeout: 256 seconds]
Pixel_Outlaw has quit [Quit: Leaving]
bpanthi977 has quit [Ping timeout: 256 seconds]
apac has quit [Ping timeout: 252 seconds]
veqq has quit [Remote host closed the connection]
kchanqvq59 has quit [Quit: Client closed]
kchanqvq59 has joined #commonlisp
veqq has joined #commonlisp
istewart has quit [Quit: Konversation terminated!]
veqq has quit [Quit: veqq]
veqq has joined #commonlisp
dra has joined #commonlisp
bpanthi977 has joined #commonlisp
mwnaylor` has quit [Ping timeout: 256 seconds]
bpanthi977 has quit [Ping timeout: 256 seconds]
mwnaylor` has joined #commonlisp
King_julian has quit [Ping timeout: 256 seconds]
varjag has joined #commonlisp
equwal has joined #commonlisp
admich1 has quit [Remote host closed the connection]
admich1 has joined #commonlisp
mwnaylor` has quit [Ping timeout: 256 seconds]
mwnaylor` has joined #commonlisp
equwal has quit [Ping timeout: 256 seconds]
corvvs has quit [Ping timeout: 248 seconds]
corvvs has joined #commonlisp
rgherdt has joined #commonlisp
mwnaylor` has quit [Ping timeout: 256 seconds]
mwnaylor` has joined #commonlisp
shka has quit [Quit: Konversation terminated!]
shka has joined #commonlisp
bpanthi977 has joined #commonlisp
vidak has joined #commonlisp
shka has quit [Quit: Konversation terminated!]
shka has joined #commonlisp
decweb has quit [Quit: Konversation terminated!]
decweb has joined #commonlisp
bpanthi977 has quit [Ping timeout: 256 seconds]
mwnaylor` has quit [Ping timeout: 256 seconds]
vidak has quit [Client Quit]
mwnaylor` has joined #commonlisp
mwnaylor` has quit [Ping timeout: 256 seconds]
X-Scale has quit [Ping timeout: 248 seconds]
mwnaylor` has joined #commonlisp
corvvs has quit [Ping timeout: 256 seconds]
apac has joined #commonlisp
mwnaylor` has quit [Ping timeout: 256 seconds]
mwnaylor` has joined #commonlisp
apa_c has joined #commonlisp
apac has quit [Ping timeout: 265 seconds]
admich1 has quit [Ping timeout: 258 seconds]
mwnaylor` has quit [Ping timeout: 256 seconds]
mwnaylor` has joined #commonlisp
kchanqvq59 has quit [Ping timeout: 250 seconds]
random-nick has joined #commonlisp
bpanthi977 has joined #commonlisp
kchanqvq59 has joined #commonlisp
admich1 has joined #commonlisp
bpanthi977 has quit [Ping timeout: 256 seconds]
kchanqvq59 has quit [Ping timeout: 250 seconds]
shawnw has quit [Ping timeout: 248 seconds]
shawnw has joined #commonlisp
LainIwakura has joined #commonlisp
apac has joined #commonlisp
decweb has quit [Quit: Konversation terminated!]
decweb has joined #commonlisp
apa_c has quit [Ping timeout: 265 seconds]
<pl> jackdaniel: btw, do you know of any code that dynamically exposes a C-callable function from ECL *as a dynamic symbol*, but not in "embedded" code? As in, I want normal ECL startup and load few shared libraries with FFI, but they depend on resolving few dynamic symbols in the binary that loads them
<jackdaniel> I don't understand the question
<jackdaniel> maybe you want CFFI?
<jackdaniel> ECL implements UFFI, and CFFI works from there
<jackdaniel> that is CFFI is implemented on top of ECL's UFFI
kchanqvq59 has joined #commonlisp
LainIwakura has quit [Ping timeout: 250 seconds]
<jackdaniel> or do you want a callback to call it from C?
<ixelp> Foreign Function Interface (ECL Manual)
<pl> jackdaniel: yeah, it's callbacks, but they need to be exposed as dynamic symbols on the resulting binary, can't pass them as function pointer
<pl> because the code I am linking with expects to be able to find certain symbols
mwnaylor` has quit [Ping timeout: 256 seconds]
mwnaylor` has joined #commonlisp
<jackdaniel> (proclaim '(SI::C-EXPORT-FNAME ("foobar" xxx)))
<jackdaniel> (defun xxx () "hell")
<jackdaniel> but that's not a public interface
<xcombelle> hi
<jackdaniel> verify the resulting fasl source with (compile-file "/tmp/foobar.lisp" :c-file "/tmp/cfoobar.c")
<jackdaniel> that will also work with defcallback, but that's under assumption that you compile the file with C compiler
<jackdaniel> (if you bytecompile it, then the callback is created by means of using libffi)
<pl> thanks. I do have options to use embedding approach in worst case, but it would reduce ability to use SLIME et al as nicely
<pl> I am trying to wrap a C library that is written more as framework wrapping few user-provided functions in something that can expose it as HTTP JSON API, and that aspect would be nicer if I can run SLIME :)
<pl> (also LDB/DPB beats C for bit fiddling)
LainIwakura has joined #commonlisp
<jackdaniel> or won't. it won't work with defcallback :)
<jackdaniel> so the only option you have is to export a normal function name and call it per ecl conventions (that is the prototype is cl_object fun(int narg, cl_object arg1, ...)
<pl> hmm, I guess I can build a minimal shared library of sorts that does some extra wrapping
<pl> ultimately what I need is to move between the C world and CL world a 210 byte blob to be bit fiddled with
treflip has joined #commonlisp
olivial has quit [Ping timeout: 265 seconds]
olivial has joined #commonlisp
<TMA> bit fiddling with ldb/dpb and friends is not enough?
<jackdaniel> technically making callbacks respect exported fname would be easy
<TMA> oh, the other way around
<pl> TMA: I have a 210 byte blob which technically 105 16bit "registers" some of which are concatenated into larger values and some are bitfields
<pl> so like at some point there's a 5 register (10 byte) block containing weirdly-encoded "job number", and in a different 16bit register I have 10 different signals represented by single bits
<jackdaniel> https://turtleware.eu/static/paste/02a19ecb-named-callback.patch something in this spirit. that said I don't think that it is a sound idea to use the same declaration
<jackdaniel> because defcallback defines in fact two functions: lisp function and a trampoline with a C-friendly signature
<jackdaniel> the declaration is usually used to name global lisp functions in c world, so it should be used for the former
mwnaylor` has quit [Ping timeout: 256 seconds]
mwnaylor` has joined #commonlisp
<jackdaniel> a better way to do it would be to allow for the third argument as the callback name -- right now it is (lisp-name &optional call-convention) -- to (lisp-name &optional call-convention c-name) ;; the name may be of coure an atom too
<jackdaniel> if you feel that it is important then please fill the ticket, then when I have some time I'll think more about it
<jackdaniel> and if not, then carry on
divlamir has quit [Remote host closed the connection]
divlamir has joined #commonlisp
<pl> this is urgent enough I might "cheat" by making an extra shared object in C that has a function to set function pointers from CL side
kchanqvq59 has quit [Ping timeout: 250 seconds]
<pl> might make it easier to set it so that ECL for deployment, SBCL for development, cause I might need to use that library/framework in the future for other weirder tools :V
<pl> that said, pretty much everything on cheap raspi is faster than PLC
<pl> but hopefully this will mean I will finally get CL into this project area, yay!
Lord_of_Life_ has joined #commonlisp
yitzi has joined #commonlisp
donleo has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 256 seconds]
Lord_of_Life_ is now known as Lord_of_Life
tasty_ has quit [Read error: Connection reset by peer]
tasty has joined #commonlisp
gilberth has quit [Quit: Common Lisp IRC library - http://common-lisp.net/project/cl-irc]
gilberth has joined #commonlisp
treflip has quit [Ping timeout: 258 seconds]
<dutchie> Is there a better way of binding multiple values in LOOP than `(loop for (a b) = (multiple-value-list (thing)))`?
mwnaylor` has quit [Ping timeout: 256 seconds]
mwnaylor` has joined #commonlisp
<jackdaniel> (loop with a with b [terminating clauses] do (multiple-value-setq (a b) (thing)) do {else})
<jackdaniel> for some meager values of better
jonatack has joined #commonlisp
<mange> If you're using sbcl I'm pretty sure (loop for (a b) = (multiple-value-list (thing))) is optimised to avoid the allocation, if that helps.
yitzi has quit [Quit: yitzi]
rgherdt has quit [Ping timeout: 256 seconds]
apa_c has joined #commonlisp
jon_atack has joined #commonlisp
apac has quit [Ping timeout: 256 seconds]
jonatack has quit [Ping timeout: 252 seconds]
yitzi has joined #commonlisp
jonatack has joined #commonlisp
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
LainIwakura has quit [Quit: Client closed]
jon_atack has quit [Ping timeout: 248 seconds]
yottabyte has joined #commonlisp
jonatack has quit [Ping timeout: 256 seconds]
<dutchie> hm that makes me feel better at least. still feels a bit verbose but oh well
King_julian has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
mwnaylor` has quit [Ping timeout: 256 seconds]
mwnaylor` has joined #commonlisp
X-Scale has joined #commonlisp
jonatack has joined #commonlisp
dra has quit [Ping timeout: 265 seconds]
jonatack has quit [Ping timeout: 258 seconds]
mwnaylor` has quit [Ping timeout: 256 seconds]
varjag has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.3)]
mwnaylor` has joined #commonlisp
rgherdt has joined #commonlisp
X-Scale has quit [Ping timeout: 248 seconds]
cage has joined #commonlisp
mwnaylor` has quit [Ping timeout: 256 seconds]
inline has quit [Quit: Leaving]
mwnaylor` has joined #commonlisp
jonatack has joined #commonlisp
jonatack has quit [Ping timeout: 260 seconds]
mwnaylor` has quit [Ping timeout: 256 seconds]
yitzi has quit [Ping timeout: 258 seconds]
mwnaylor` has joined #commonlisp
d-us-vb has joined #commonlisp
King_julian has quit [Read error: Connection reset by peer]
d-us-vb has quit [Read error: Connection reset by peer]
yitzi has joined #commonlisp
mange has quit [Quit: Zzz...]
berkowski has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 30.1]
bpanthi977 has joined #commonlisp
pranav has joined #commonlisp
bpanthi977 has quit [Ping timeout: 256 seconds]
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
jonatack has joined #commonlisp
admich1 has quit [Ping timeout: 258 seconds]
jonatack has quit [Ping timeout: 248 seconds]
kyoji has quit [Quit: ZNC 1.9.1 - https://znc.in]
admich1 has joined #commonlisp
kyoji has joined #commonlisp
yitzi has quit [Remote host closed the connection]
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
jonatack has joined #commonlisp
bpanthi977 has joined #commonlisp
jonatack has quit [Ping timeout: 245 seconds]
triffid has quit [Ping timeout: 272 seconds]
jonatack has joined #commonlisp
yottabyte has quit [Quit: Connection closed for inactivity]
decweb has quit [Quit: Konversation terminated!]
decweb has joined #commonlisp
jonatack has quit [Ping timeout: 252 seconds]
triffid has joined #commonlisp
yottabyte has joined #commonlisp
Sario has quit [Quit: WeeChat 4.7.1]
berkowski has quit [Quit: ERC 5.6.1-git (IRC client for GNU Emacs 31.0.50)]
Lycurgus has joined #commonlisp
bpanthi977 has quit [Ping timeout: 248 seconds]
jonatack has joined #commonlisp