beneroth changed the topic of #picolisp to: PicoLisp language | The scalpel of software development | Channel Log: https://libera.irclog.whitequark.org/picolisp | Check www.picolisp.com for more information
ygrek has joined #picolisp
ygrek has quit [*.net *.split]
chexum has quit [*.net *.split]
chexum has joined #picolisp
aw- has joined #picolisp
aw- has left #picolisp [#picolisp]
aw- has joined #picolisp
<abu[7]> Hi aw-!
<abu[7]> I played with your Rust FFI
<abu[7]> It is surprising how simple it is
<aw-> hi abu[7]! Oh yes, very simple. thanks!
<abu[7]> PicoLisp FFI can be used directly
<abu[7]> Rust is more similar to C than I expected
<abu[7]> It crashed for me here though on pil21
<abu[7]> Problem seems to be (native "@" "malloc" 'N 32)
<abu[7]> 'N gives a negative pointer
<abu[7]> 'P works
<aw-> oh that's strange
<aw-> it works fine for me...
<abu[7]> My version (a little updated for pil21) is now http://pb1n.de/?ab3132
<aw-> why negative number?
<abu[7]> Perhaps because I'm on Arm?
<aw-> ahhhh
<aw-> endian
<abu[7]> 'N is a signed long
<abu[7]> yes. perhaps
<aw-> arm64 ?
<abu[7]> T
<aw-> so i don't think it would a signed long issue
<aw-> but you would know better
<abu[7]> I changed to (1 . 8) from 1 0 0 0 0 0 0 0
geri has quit [Remote host closed the connection]
<abu[7]> (1 . 8) works for any endianess
<aw-> right
<abu[7]> Do you use Rust?
<aw-> not anymore not really no haha
<aw-> I just started learning Crystal recently
<aw-> because Rust was too frustrating
<abu[7]> Oh
<abu[7]> I want to play with Veilid
<abu[7]> veilid.com
<abu[7]> The libs are all Rust
<aw-> oh I see! Well if my example code can help, that's good
<aw-> i'm going to push a change shortly
<abu[7]> Yes, very helpful
<abu[7]> I thought we need some dedicated FFI lib
<aw-> sorry it's lacking in documentation
<aw-> but I'm certain you figured it out quickly
<abu[7]> Yes, all very clear and well explained
<abu[7]> Thanks!
<aw-> great
<aw-> err
<aw-> abu[7]: i think there's an error in your code
<abu[7]> yes?
<aw-> (if (=0 (prinl ... (native ..))) ...
<aw-> will always return 0
<abu[7]> prinl returns the last argument
<aw-> oyeah
<aw-> haha sorry!
<abu[7]> Not explicitly mentioned in the refs, but this is a kind of default for all pil functions I would say ;)
<abu[7]> If nothing useful else to return, return the last one
<abu[7]> Makes life easier as we often don't need a local variable then
<aw-> indeed
<abu[7]> I hope I don't need to learn Rust. Just enough to be able to call the libs.
<aw-> abu[7]: haha that was my hope too, but I ended up learning it anyways
<aw-> in my code example I tried to show how to access the different datatypes, (char, string, int, etc...) hopefully it's sufficient for you to work with
<aw-> without needing to learn other parts of the language
<abu[7]> Let's hope so :)
<abu[7]> I'll ask you if I'm lost
<aw-> sure!
<abu[7]> :)
<aw-> hmm
<aw-> I'm looking at Veilid chat code
<aw-> it's in Dart, not Rust
<abu[7]> oh
<aw-> do you have a link to the libs?
<abu[7]> I want to just call the core funs from pil
<aw-> oh yes that's Rust
<abu[7]> I gave up with the Matrix API. Too messy.
<abu[7]> so try Veilid
<abu[7]> looks promising
beneroth_ has quit [Quit: Leaving]
beneroth has joined #picolisp
<beneroth> hey abu[7], aw- :)
<beneroth> abu[7], yeah I found matrix a bloated complicated mess. Looks like they just hacked away on specific software and the protocol was an afterthought. Really expected something different.
<abu[7]> Right
geri has joined #picolisp
chexum has quit [Ping timeout: 260 seconds]
chexum has joined #picolisp
ygrek has joined #picolisp
ygrek has quit [Remote host closed the connection]
bjorkintosh has joined #picolisp