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-> ok i guess i commented
razzy has quit [Ping timeout: 240 seconds]
razzy has joined #picolisp
teddydd has quit [Ping timeout: 265 seconds]
razzy has quit [Ping timeout: 252 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 265 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 240 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 240 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 265 seconds]
razzy has joined #picolisp
<Regenaxer> Thanks aw-! Your mail is precisely what I mean
<Regenaxer> Nice Rust article!
<aw-> thanks Regenaxer
<aw-> i'm not particularly a fan on Rust, but i'd much rather code in that than in C if I need to do write (native) glue code
<Regenaxer> I see, yes, but a good example
<aw-> i wrote a similar one in Zig as well
<aw-> but haven't published it yet
<aw-> The Zig example took me about 5 minutes to write, compared to Rust took me a few hours :\
<Regenaxer> cool :)
rob_w has joined #picolisp
teddydd has joined #picolisp
<beneroth> good post aw-, thank you
<beneroth> Regenaxer, thanks for your reply, I see :)
<Regenaxer> :)
<beneroth> [OT] btw. some German/Swiss patent trolls claim to own the rights to dynamic websites for the years 2000-2020, and so far German courts agreed (vs. Microsoft): https://www.golem.de/news/softwarepatent-uraltpatent-koennte-microsoft-millionen-kosten-2112-161547.html
<beneroth> it's a joke, but one which could turn sour
<beneroth> though Microsoft didn't try to invalidate the patent on the grounds that software patents are explicitly forbidden in Europe, because they don't want to invalidate their own patents in that area. Strictly speaking these patents should never been granted, but the patent offices don't consider this (why should they, they earn money this way)
<beneroth> you should patent some picolisp ideas, then Oracle will buy you for billions :-/
<Regenaxer> hehe
razzy has quit [Ping timeout: 252 seconds]
razzy has joined #picolisp
<Regenaxer> aw-, ZigBee の Zig?
<aw-> no
<aw-> Zig-lang
<Regenaxer> oh, don't know
<aw-> still in beta/alpha mode
<Regenaxer> ok
Svjatoslav has quit [Quit: ZNC - https://znc.in]
razzy has quit [Ping timeout: 265 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 240 seconds]
razzy has joined #picolisp
Hunar has joined #picolisp
razzy has quit [Ping timeout: 265 seconds]
razzy has joined #picolisp
<Hunar> Hello :)    when using clang.l there are times that I have to write arguments like this    '(-1.0 -1.0)    but some are much more complex and tedious,    I want to instead write this    `(thing)   when clang.l creates the functions and it should return   '(-1.0 -1.0)   but I cant figure out how,  the closest I could do was using
<Hunar> (cons 'quote '(-1.0 -1.0) )   but that results in    '(-10000 -10000)   since (scl 4) ..  it works fine for symbols but I need a literal number with decimals
<Regenaxer> (cons 'quote ...) is easier handled with 'lit'
<Regenaxer> it also avoids unnecessary quoting
<Hunar> Basically, I want to turn this call which is between   (clang "library" '()        and           )             from this               (fun NIL fun '(-1.0 -1.0))       to      (fun NIL fun `(thing))
<Regenaxer> A FEXPR
<Regenaxer> Sorry, a little later
<Regenaxer> must go
<Hunar> Ok :)
<Regenaxer> Think about not "turning into" but "calling directly"
<Regenaxer> bbl
<Hunar> Wait, I'm dumb.. It doesn't matter if its -1.0 or -10000   they are equivalent :(
<Hunar> But still, I found out (lit ) :)  makes my life a little bit easier
<Regenaxer> ok :)
<Regenaxer> Still I don't fully understand the 'fun' situation
<Regenaxer> btw, '(-1.0 -1.0) does *not* to be quoted
<Regenaxer> cause the CAR is an number
<Hunar> You're right, but for some reason I was confused that the result didn't have a quote in front of it:/  I literally us unquoted number-only lists all the time
<Regenaxer> Yeah, so (cons 'quote '(-1.0 -1.0)) is in principle the same as (lit (-1.0 -1.0)), but returns the unquotes list because it is autoquoting
Hunar has quit [Ping timeout: 256 seconds]
payphone has quit [Remote host closed the connection]
payphone has joined #picolisp
<razzy> can i eval whole buffer in vip?
<Regenaxer> yes, :l
<razzy> :D thank you, i missed it :D
<Regenaxer> :)
rob_w has quit [Remote host closed the connection]
aw- has quit [Ping timeout: 252 seconds]
Hunar has joined #picolisp
<Hunar> Binding is really boring , tedious, and repetitive :/ I'll definitely try to make a library that automates it (maybe one year from now), its indeed possible .. quick statistics: the main header raylib.h has 485 functions, I did 184 (38%) and out of those only tested and verified 30 ones, so 301 left which are all the ones that need glue code for
<Hunar> structs that are passed and returned by value .. I've put the examples that are currently working :) https://github.com/hunar1997/raylib-pil   .. I think I can complete this project before 2022
<Regenaxer> I really hate github! "View code" does not work in a text browser :(
<Regenaxer> Lots of functions indeed!
<Hunar> I like github :) I like to see colorful difference viewer between git commits on the browser anywhere I go.. but I almost never used a text-based browser :/
<Regenaxer> yes, you need colors ;)
<Regenaxer> I want plain text
<Regenaxer> I use w3m for everything
<Regenaxer> Only if absolutely necessary I switch to a graphical browser
<Hunar> :D colors are like an addiction for me, I wasn't like this when I started programming
<Regenaxer> The problem with github however is not text
<Regenaxer> it is that it needs JS
<Regenaxer> the link does not work otherwise
<Hunar> One question, there was a function that returned a char *   I used 'S for the result specification.. but the source code had a warning (WARNING: memory must be freed!) is it something I have to worry about or native takes care of it?      char *TextReplace(char *text, const char *replace, const char *by);
<Hunar> I could have ignored these functions since I can do all of those from pil, but did it anyways :/
<Regenaxer> I understand "memory must be freed" as that the caller has to free the memory
<Regenaxer> So you cannot use 'S
<Regenaxer> Use 'P
<Hunar> But 'S worked, how to turn 'P back into a string?
<Regenaxer> then (struct Ptr 'S) and then (%@ "free" NIL P)
<Hunar> Ah,
<Hunar> More work :) thanks
<Regenaxer> yeah ;)
Hunar has quit [Quit: Client closed]
<razzy> Regenaxer: I use program called git. git clone URL. i think there is many UI for git in emacs :]
<Regenaxer> You need an UI to call git?
<razzy> Regenaxer: no, you can from command line
<Regenaxer> Yes, I know the git command
<razzy> Regenaxer: i want to get property of external symbol. should i use (get)? i did not found (get>)
<Regenaxer> Yes, just 'get' or ':' or ';' is normally enough. 'get>' *methods* are seldom needed, as getting needs no side effects
<razzy> Regenaxer: thank you for reassurance.
<razzy> weird, I cannot evaluate properly commented lisp expressions # (setq A '{2})
<razzy> in vip
<Regenaxer> In Vip REPL you should do mainly Vip stuff
<Regenaxer> We talked about this before
<Regenaxer> it runs *in* the environment of Vip
<Regenaxer> 'A' may be bound in Vip
<Regenaxer> At least it *may* give problems
<Regenaxer> But I think (setq A '{2}) shoul n work neverthless
<Regenaxer> *What* does not work?
<razzy> i will try with clean vip
<Regenaxer> *What* does not work?
<Regenaxer> : (setq A 7)
<Regenaxer> -> 7
<Regenaxer> : A
<Regenaxer> -> 7
<razzy> Regenaxer: I have clean pil -vi + . i cannot evaluate http://ix.io/3HpQ
<razzy> i evaluate code without comments
<Regenaxer> What do you mean with "cannot evaluate"?
<razzy> ctrl+e
<razzy> does not evaluate if code is commented
<Regenaxer> ah, with comments it is not considered code :)
<Regenaxer> I thought you mean the vip repl
<Regenaxer> : (setq Norrrgegegede 2)
<Regenaxer> : Norrrgegegede
<Regenaxer> -> 2
<Regenaxer> -> 2
<Regenaxer> Yes, comments dont work
<Regenaxer> Vip marks up each character, depending on its meaning
<Regenaxer> same in strings
<Regenaxer> -> 2
<Regenaxer> : Norrrgegegede
<Regenaxer> : (setq Norrrgegegede 2)
<Regenaxer> oops
<Regenaxer> "(setq Norrrgegegede 2)"
<Regenaxer> won't work
<razzy> i see, i will manage.
<Regenaxer> 👍
memories1 has joined #picolisp
memories1 is now known as memories
<Regenaxer> Paren matching with "%" also does not work in comments or strings
<razzy> so far i like vip customizations.
<Regenaxer> Which customizations?
<Regenaxer> You changed something?
<razzy> just viprc. nothing big yet.
<Regenaxer> good
<razzy> vip feels good. i like to work with it.
<Regenaxer> Great :)
<razzy> Regenaxer: I do not understand why "^E" means ctrl+e. instead of ctrl+E
<Regenaxer> This does not matter in fact
<Regenaxer> : (char (- (char "E") 64))
<Regenaxer> -> "^E"
<Regenaxer> or
<Regenaxer> $: (char (& (hex "3F") (char "E")))
<Regenaxer> -> "^E"
<razzy> I want four sets of control -> e, shift+e, ctrl+e, ctrl+shift+e . I will try reading chars from keyboard
<Regenaxer> There is no character ctrl+shift+e
<Regenaxer> These are keycodes, not characters
<razzy> sorry, that what i meant
<Regenaxer> Look at ASCII or Unicode tables
tooDumbToFleng has joined #picolisp
<razzy> hmm, so, only (key) responses i can use, yes?
<Regenaxer> yes. In a TTY in general there are no key codes
<Regenaxer> they are only in event records of gui systems
<razzy> i see. good to know. I have shortage of keys now
<Regenaxer> yes, always :)
aw- has joined #picolisp
tooDumbToFleng has quit [Quit: -a- Connection Timed Out]
tooDumbToFleng has joined #picolisp
tooDumbToFleng has quit [Quit: -a- IRC for Android 2.1.59]