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
rob_w has quit [Read error: Connection reset by peer]
ygrek has quit [Remote host closed the connection]
_whitelogger has joined #picolisp
<geri``> you tryna write rust support into picolisp? abu[7]
<abu[7]> No fixed idea yet how to proceed
<geri``> what are the options?
<abu[7]> I'd just like to call veilid-core from pil
<abu[7]> There is a ffi project, but seems dead
<abu[7]> I don't want to learn Rust atm
<geri``> learning's good for the brain ;)
<abu[7]> Indeed
<abu[7]> Solace-10/libveilid-core was active one year ago, last posts in Discord last May :(
<geri``> 🤧
<geri``> always sad to see projects die
<geri``> gotta go for now, have fun
<abu[7]> o/
geri`` has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
ygrek has joined #picolisp
ygrek has quit [Remote host closed the connection]
<aw-> abu[7]: i wouldn't recommend trying to learn Rust. It's kind of a shitty language.
<abu[7]> Yeah, that's my impression too
ygrek has joined #picolisp
geri has joined #picolisp
<geri> script: https://0x0.st/XD6Q.bin, outputs of swaymsg: https://0x0.st/XD61.json
<geri> still hurts a little, maybe you got ideas how to make it better
<geri> first time i actually felt like i had to use as@ to not die of complexity :D
<abu[7]> Instead of 'as@', perhaps 'and' would suffice (or even be better as it stops on NIL)?
<abu[7]> Otherwise use nothing (ie. simply nest the call in Lisp style)
<geri> nesting the call is horrible
<geri> here at least
<abu[7]> I like it usually more
<geri> (not (and ...)) works instead of as@
<abu[7]> is more clear
<geri> im usually okay with nesting, but here i just cant manage it xd
<abu[7]> I understand
<abu[7]> depends
<abu[7]> the visual order reverses
<geri> yeah
<geri> using (not (and ...)) saves like 4-5 lines
<geri> i could also just invert the whole function and save another line
<abu[7]> (not (and is (nand
ygrek has quit [Remote host closed the connection]
<geri> or that i guess :D
<geri> 28 lines now
<abu[7]> :)
<geri> honestly nand is nicer here cause short circuiting
<abu[7]> Instead of '(unless *Dbg' I'd use `*Dbg
<abu[7]> Avoids reading the rest
<geri> ik itd be slightly faster, but this one looks so much better...
<abu[7]> ok
<abu[7]> Also, it is different here
<geri> m?
<abu[7]> would need `(not *Dbg)
<geri> ye
<geri> probably a somewhat non-standard way of doing this
<geri> kinda emulating what python does with __name__ == "__main__"
<abu[7]> I think it is good
<geri> i like it too :D
<abu[7]> :)
<geri> i like how there's so much code and real logic is like 3 lines
<geri> well, i can delete jq from my system now at least, very nice
<abu[7]> T
<geri> honestly pil is the best lisp for scripting imo
<geri> other ones typically take too long to start up to be usable
<abu[7]> yeah
<geri> i have 473 lines of picolisp code in my config repo
<geri> :D
<abu[7]> 👍☺
<geri> i could maybe write a little dsl to extract data from read json...
<geri> we'll see later
<bjorkintosh> geri: scripting what?
<geri> anything
<bjorkintosh> *nix?
<geri> yes
<geri> very bad, but took like 10 minutes to write
<geri> how can i do string io with readJson?
<geri> prinl + pipe i guess
<geri> yup
<geri> aight, bed soon
<geri> have fun
ygrek has joined #picolisp
geri has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
ygrek has quit [Remote host closed the connection]
lagash has joined #picolisp
lagash has quit [Remote host closed the connection]
lagash has joined #picolisp
<abu[7]> Yes, 'pipe' is a way
<abu[7]> But better is 'input'
<abu[7]> (let S (chop "{\"a\": {\"x\": 1, \"y\": 2}}") (input (++ S) (readJson)))
<abu[7]> Good night :)
ygrek has joined #picolisp
ygrek has quit [Remote host closed the connection]
ygrek has joined #picolisp
ygrek has quit [Remote host closed the connection]
ygrek has joined #picolisp
ygrek has quit [Remote host closed the connection]
neuroevolutus has joined #picolisp
neuroevolutus has quit [Ping timeout: 256 seconds]