ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Picolisp latest found at http://www.software-lab.de/down.html | check also http://www.picolisp.com for more information
aw- has joined #picolisp
aw- has quit [Quit: Leaving.]
orivej has quit [Ping timeout: 240 seconds]
inara has quit [Ping timeout: 256 seconds]
inara has joined #picolisp
<yunfan> hi, why trace not work at my machine like the document said?
<yunfan> i follow the official documents on trace, and use the example of fact function, it works as normal, but dont show trace steps
<Regenaxer> Hi yunfan, 'trace' is enablen only in debug mode, ie. when you started with '+' at the end of the command line
<Regenaxer> Same with single-stepping with 'debug'
rob_w has joined #picolisp
mtsd has joined #picolisp
aw- has joined #picolisp
<t4nkf33der> morning
<t4nkf33der> Regenaxer: here ?
<aw-> hi
<Regenaxer> Hi t4nkf33der, aw-
<aw-> something a bit strange with PilBox
<aw-> it kind of acts like a web browser.. if I press on the Gear icon 4 times, it will have arrows at the bottom
<aw-> to go back and forth
<Regenaxer> yes
<aw-> why?
<Regenaxer> Navigation
<aw-> but isn't Gears for "Settings" ?
<aw-> why navigation? shouldn't settings just be a section you go to, without having back/forward?
<Regenaxer> right
<Regenaxer> yes, but then go back to where you were before
<Regenaxer> Do you have the latest version? I changed the mechanics a little
<t4nkf33der> Regenaxer: question: is it ok how i get array from native via R to Pubkey ? :/
<aw-> yes i updated today
<Regenaxer> ok
<t4nkf33der> its ok and works as expected.
<Regenaxer> aw, I suppress back when in an App which defined a 'start'
<Regenaxer> because it sets up an env like DB
<aw-> i see..
<aw-> that's probably fine then
<Regenaxer> yes, I think it is safer
<aw-> but the navigation for those two top buttons is not very "app-like"
<Regenaxer> you can always leave the app by pressing the gear twice
<Regenaxer> well, yes, but convenient
<Regenaxer> and very necessary for the apps I have
<Regenaxer> My users are used to use this navigation
<aw-> ok! I will try with my own apps, for now i still only use REPL haha
<Regenaxer> And it *is* in fact a browser anyway, Android WebView
<Regenaxer> ok
<Regenaxer> you can try the 5 demo apps
<Regenaxer> install them all and navigate between them
<aw-> yes i haven't tried a demo app since you first released it
<Regenaxer> The Radio for example opens a DB
<Regenaxer> ok
<Regenaxer> sorry t4nkf33derri
<Regenaxer> sorry t4nkf33der!
<Regenaxer> checking
t4nkf33der is now known as tankf33der
<Regenaxer> that's better :)
<Regenaxer> easier to type "ta" then "t4"
<Regenaxer> I need to check the native syntax each time ... does it work?
<Regenaxer> '(R (32 B . 32)) should be good, allocates 32 bytes
<Regenaxer> returns in R
<Regenaxer> I believe your code is fine, can't be wrong if it works, and the buffers are big enough
<Regenaxer> aw-, I'd recommend to download all demo apps again in case you have them, as they also changed
<tankf33der> Regenaxer: pl
<tankf33der> Regenaxer: ok
orivej has joined #picolisp
<tankf33der> another question:
<tankf33der> can i set variable inside native ?
<Regenaxer> hmm, why do you use R and "R"?
<Regenaxer> ("R" is a return value, right?
<Regenaxer> so R is not set
<tankf33der> "P"
<Regenaxer> Typical is (use R ... (native ... (R ...
<tankf33der> no return of R
<Regenaxer> oops, yes, "P"
<Regenaxer> does not make sense to me
<tankf33der> "P" is numbers after native, but P1 still zeroes after crypto_x25519_public_key call
<Regenaxer> R is ignored
<Regenaxer> you want to pass the value of the "P" argument in?
<tankf33der> yeap
<tankf33der> never did before. first time.
<Regenaxer> then (list "P" (32 B . 32))
<Regenaxer> ok
<tankf33der> ah, list "P"
<Regenaxer> And what is 'R' for?
<tankf33der> old code
<Regenaxer> ah, ok
<Regenaxer> good then
<aw-> Regenaxer: ok thanks
<Regenaxer> :)
<tankf33der> works, but P1 is not ok
<Regenaxer> I think "P" must be a symbol
<Regenaxer> ie the var
<Regenaxer> ... a variable in the CAR (to receive the returned structure data
<tankf33der> (crypto_x25519_public_key
<tankf33der> (203
<tankf33der> 'P1
<tankf33der> P1 -> 'P1 helped.
<tankf33der> ok
<Regenaxer> The 'need' is not necessary, 'native' builds up the proper return structures
<tankf33der> yes, works.
<Regenaxer> ok
<Regenaxer> So just (P (32 B . 32)) is enough, right?
<Regenaxer> then return the value of P
<Regenaxer> What is the second buffer (cons NIL (32) S) for?
<tankf33der> this is latest working version i wanted.
<Regenaxer> Can be '(NIL (32) S) I think
<tankf33der> ^^^ no, failed.
<Regenaxer> right, S is evaluated
<Regenaxer> good
<tankf33der> good.
<tankf33der> issue closed.
<Regenaxer> So you pass in a symbol in "P"
<tankf33der> yeap
<Regenaxer> ok, but why do you not return the value normally
<Regenaxer> (use P (native ... (P ...) ) P)
<tankf33der> i dont know, just something new.
<Regenaxer> ok, good
<Regenaxer> not wrong at all
<Regenaxer> Normally a simple return value is easier to use
<tankf33der> eh
<Regenaxer> no need to define a variable in the caller
<Regenaxer> minor issue
mtsd has quit [Ping timeout: 260 seconds]
orivej_ has joined #picolisp
orivej has quit [Read error: Connection reset by peer]
orivej_ has quit [Ping timeout: 248 seconds]
aw- has quit [Quit: Leaving.]
rob_w has quit [Quit: Leaving]
orivej has joined #picolisp
rob_w has joined #picolisp
gr8 has joined #picolisp
<gr8> Regenaxer, would you think that porting Pilos to new architectures could be simpler than with OS's that are written in C? Assuming that Pilos would grow in features and overall complexity
<gr8> or porting a C compiler to other architectures (not sure what would be an appropriate comparison)
<Regenaxer> Yes, but only is the implementer feels more comfortable in Lisp than in C
<Regenaxer> The Lisp lang per se is not better than C to write drives etc.
<gr8> maybe because abstractions are simpler in Lisp? So that everything can be written against an abstract architecture, and then only a small part needs to be ported
<Regenaxer> true
<gr8> I mean, is that actually an advantage of this system? I'm a noob for everything low-level :D It's just what I thought. Does it compare well to other portability-focused OS's like NetBSD?
<gr8> I think the language might play a significant difference for this, but might be wrong
<gr8> *significant role
<Regenaxer> Hmm, yes, for me is is also the case. I prefer Lisp here anyway
<gr8> but then you are biased ;)
<Regenaxer> right
gko has quit [Quit: ZNC - http://znc.in]
gko has joined #picolisp
orivej has quit [Ping timeout: 248 seconds]
freemint has joined #picolisp
<freemint> Hi
<Regenaxer> Hi freemint
<freemint> Yeah i am still alive
<freemint> Hi Regenaxer
<freemint> Has anything changed since late december?
<Regenaxer> Yes, the year
<freemint> so i have not missed much
<Regenaxer> T
<freemint> Is a "slow but more complex math library doing, exp, ln, root, sin, to arbitrary precision" worth being written?
<freemint> (wert geschrieben zu werden)
<freemint> ?
<freemint> (in picolisp first)
<Regenaxer> I'm not sure where a lib with higher precision than 56 bits could be useful
<Regenaxer> about 15 digits
<freemint> Like i was thinking (with the knowledge from my math classes and the (potential) help of people at the GMP mailing list) to write one
<freemint> So you'd prefer a fine but faster one?
<freemint> *finite
<freemint> *limited but faster one
<Regenaxer> nono, speed is not the problem
<Regenaxer> The question is *where* 15 digits precision are a limit
<Regenaxer> internally it is 80 bits btw
<Regenaxer> intermediate results
<freemint> are you efering to the curret floating point version?
<freemint> (80 bits only on x86)
<Regenaxer> yes, IEEE standard
<Regenaxer> no
<Regenaxer> everywhere
<Regenaxer> 10-byte numbers
<Regenaxer> mantissa 64 bits then iirc
<freemint> then i am wrong
<Regenaxer> 16 bits exponent
<Regenaxer> Anyway, standard double precision is 56/64 bits
<Regenaxer> on the language level
<freemint> Is there a way to load picolisp assembly to execute?
<Regenaxer> How do you mean that?
<freemint> Most internal functions (in 64 bit) are function pointers to code generated from ~picolisp "vm" assembly~.
<Regenaxer> correct
<Regenaxer> You can build shared libs, like the ones in the distro 'ext' and 'ht'
<freemint> is it possible to generate new functions at runtime which are expressed as picolisp assembly?
<Regenaxer> yes, and then call 'as' to build them
<Regenaxer> In the distro is this for inline C
<Regenaxer> compiled on the fly
<Regenaxer> (load "@lib/native.l")
gr8 has quit [Ping timeout: 265 seconds]
<freemint> but it is not possible in a (setq sin (build (generate-code))) kind of way
<Regenaxer> it is possible
<Regenaxer> see what "@lib/native.l" does, and use assembly instead of C
<Regenaxer> Usage examples are misc/crc.l and misc/fibo.l
<freemint> ok
<freemint> i will have a look
<freemint> why is picolisp vm assembly not in sex-pr?
<freemint> (i think i asked you once but i forogot
<Regenaxer> yes, I think so too
<Regenaxer> s-exprs make no sense
<Regenaxer> asm statements are not functions, ie. they have no value
<Regenaxer> And it *is* s-expr in the sense what (read) is used to parse the sources
<freemint> h
<freemint> ah
<Regenaxer> It is s-exprs with much more atoms than lists in it
<Regenaxer> (code 'foo ...) ld A ...
<freemint> where can i learn more about code
<freemint> 'code
<Regenaxer> @src64/lib/asm.l
<Regenaxer> (section 'code 'text)
orivej has joined #picolisp
<Regenaxer> Basically, the function 'code' *is* the assembler
<freemint> Is 'optimize a placeholder
<Regenaxer> yes
<Regenaxer> stub
<Regenaxer> see in arch/
<freemint> areat this level of abstractions still low hanging fruits for optimization?
<Regenaxer> IIRC quite tricky
<Regenaxer> Eliminates a lot of stuff
<freemint> Regenaxer:the use of 'de in asm.l irritates me
<Regenaxer> branches to branches
<Regenaxer> The Arm64 version optimizes a lot. Picks different instructions if suitable
<freemint> (de *Conditions (T jmp . jmp) (z jz . jnz) makes me think *Conditions is a function with two evalueated aruements
<Regenaxer> 'de' has nothing at all to do with functions
<Regenaxer> it is *not* "defun"
<freemint> i justnotied reading the doc
<freemint> any how thanks for your time. my gf is hugging me to death
<freemint> she just approved this message
<Regenaxer> good! :)
<Regenaxer> I'm also multitasking
<Regenaxer> busy cleaning up my wife's sushi course
<freemint> It do not know if that is reason of concern but she write python, wenigstens etwas ;D ...
<freemint> *writes
<freemint> aber ich versuche sie zu bekehren ...
<Regenaxer> Gut! :)
<freemint> Gut e Nacht! :)
gr8 has joined #picolisp
<Regenaxer> bye!
freemint has quit [Quit: Page closed]
gr81 has joined #picolisp
gr8 has quit [Ping timeout: 255 seconds]
gr81 has quit [Quit: Leaving]
karswell_ has joined #picolisp
karswell_ is now known as karswell