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
aw- has quit [Quit: Leaving.]
aw- has joined #picolisp
clacke has joined #picolisp
mmvmm has quit [Ping timeout: 256 seconds]
razzy has joined #picolisp
<razzy> Good day i wish to all!
<Regenaxer> Hi razzy!
razzy has quit [Ping timeout: 256 seconds]
razzy has joined #picolisp
<v_m_v> Does anyone have exp. with PicoLisp and Rust? I know that I can use C/C++ but with Rust it also should be possible right?
<Regenaxer> I have no experience with Rust. In which way can it be called from other programs? As shared libraries, command line, or something else?
razzy has quit [Ping timeout: 260 seconds]
razzy has joined #picolisp
<v_m_v> @Regenaxer: dylibs
razzy has quit [Ping timeout: 260 seconds]
razzy has joined #picolisp
<v_m_v> So I can compile it to so files
<Regenaxer> Great
<Regenaxer> So it has a C-interface?
<v_m_v> It looks like ....yes. You can use Ruby's FFI lib ...Node FFI lib..and Python FFI lib for that.
<Regenaxer> It is easy in Pil to call a function with a C signature in a shared library
<v_m_v> It would be so cool to use Rust libs so easy
<aw-> v_m_v:i have one on github
<aw-> Rust and Picolisp
<Regenaxer> Hi aw-! Cool!
<aw-> it's relatively easy to interface with Rust through PicoLisp, and vice-versa
<aw-> however some of Rust's types are architecture dependent, so for example, your results can vary between x86 and arm64
<aw-> (this is from memory, havent messed with Rust+PicoLisp in a year)
<v_m_v> Ok I have tested...it is working. It is the easiest thing with FFI which I have saw in my life.
<aw-> v_m_v: well then you haven't tried Zig yet ;)
<aw-> Zig+PicoLisp is 1000x easier
<aw-> and also 1000x less code
<v_m_v> I have heard about it. The only issue which I have with Zig is lack of package manager :(
<aw-> oh Zig has many other problems too.. like it's not even v1 yet, so still unstable and not production-ready
<aw-> but so far it's quite a pleasure to code in compared to Rust
<aw-> v_m_v: feel free to copy/reuse my code examples however you want, no attribution necessary since it's really just example code. Perhaps I'll update the LICENSE.
<v_m_v> @aw- I've saw that you have used struct with c types. What about Rust types?
<aw-> v_m_v: yes it's just an example, I have one array using Rust type: [u8; 8]
<aw-> in picolisp it's extracted as 8 bytes: (B . 8)
<v_m_v> Amazing. I am working with blockchains each day....Rust security is awesome ..but it is not the best language for data processing. Combined with PicoLisp it woud give me the flexibility.
<aw-> ok great
<aw-> I just published a change to those 2 repos
<aw-> the LICENSE is changed to 0BSD license
<aw-> v_m_v: be careful with FFI and picolisp, if you're doing blockchain stuff you need to make sure the .so file is loaded from an ABSOLUTE path and you might even want to verify the checksum of the file to ensure it hasn't been altered
<aw-> the user running the picolisp app shouldn't have write access to the .so shared lib either
<aw-> and you'll need to validate all the inputs and data passing between the two.. vaidate _very_ carefully
<aw-> validate* very carefully
<aw-> Rust "security" won't protect you from stupidity
<v_m_v> :D I know ... I would be more worried about Rust 3rd party deps then PicoLisp. I am using Pure Rust for blockchain but sometimes I need to build some tools around. Validation/ Admin panels, tests...etc.
<v_m_v> There I need the flexibility... sometimes I would like to test some creazy scenarios or just process ethereum events. With PiL I could just use Rust Ethereum libs and then put all of the eth events into PiL database for later processing.
<aw-> Regenaxer: hi btw ;)
<aw-> v_m_v: also you should be aware, Rust types don't translate perfectly to C types
<Regenaxer> :)
<aw-> that's why in my examples I used c_char and c_long etc
<v_m_v> Now I would have my websockets in PiL ;) :D
<aw-> enjoy
v_m_v has quit [Remote host closed the connection]
v_m_v has joined #picolisp
aw- has quit [Ping timeout: 245 seconds]
razzy has quit [Ping timeout: 260 seconds]
razzy has joined #picolisp
v_m_v has quit [Remote host closed the connection]
v_m_v has joined #picolisp
f8l has quit [Quit: changing locale]
f8l has joined #picolisp
beneroth has quit [Quit: Leaving]
theruran has quit [Quit: Connection closed for inactivity]