ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Check also http://www.picolisp.com for more information
orivej has joined #picolisp
orivej has quit [Ping timeout: 268 seconds]
ubLIX has quit [Quit: ubLIX]
orivej has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
razzy has quit [Ping timeout: 250 seconds]
rob_w has joined #picolisp
xkapastel has quit [Quit: Connection closed for inactivity]
<beneroth> Good morning
<Regenaxer> Hi beneroth
razzy has joined #picolisp
<Nistur> o7
<Nistur> mornin'
<Regenaxer> Hi Nistur
<beneroth> o7 Nistur
freemint has joined #picolisp
<freemint> razzy i've been reading the logs. Yoour queestions got way better how did you manage?
<Regenaxer> Hi freemint
<freemint> Hi Regenaxer
<Regenaxer> BTW, it was a really nice presentation!
<freemint> that means a lot from you
<freemint> i want to give longer once too but no chance yet. I think it might be interesting to start from the cell level onward
<Regenaxer> Yes, that would be great
<freemint> Can you think of a nicer way to do this: ('((X) (list (cons 'quote X) (cons 'quote X))) '((X) (list (cons 'quote X) (cons 'quote X))))
<freemint> (a list expression which is a Fixpoint under eval)
<freemint> or an X with (and (lst? X) (not (num? (car X))) (= X (eval X)))
<Regenaxer> For (cons 'quote ..) there is 'lit'
<Regenaxer> (list (lit X) ...
<freemint> that works
<Regenaxer> 'lit' also tries to be clever, not to do unnecessary quoting of auto-quoting items
<freemint> i was irritated what it does with numbers for a moment
<freemint> (list list) -> (268908) but (eval @) -> (268908) meaning the list starting with a number is kept even when 268908 is a function pointer ... why?
<beneroth> argument gets evaluated before the function (list) is called
<beneroth> so its like (list 268908)
<freemint> that i clear but why does (268908) does not yield a list with nil?
<Regenaxer> yes, there is no concept of a function pointer here
<freemint> *is in function pointer range
<Regenaxer> Lists with a number in the CAR are auto-quoting
<beneroth> its not a function call
<Regenaxer> maybe, but what is that range?
<Regenaxer> T
<beneroth> function calls start with a symbol, a number is not a symbol
<Regenaxer> and even if it is a legal function pointer, it may be just a number which looks like a legal function by chance
<freemint> I thought there was a mechanism that the number is applied if it might be a function pointer determined via fun?
<Regenaxer> No, this is not the case
<Regenaxer> and would result in chaos
<freemint> yeah chaos
<Regenaxer> 'fun?' is just guessing
<Regenaxer> it can only *exclud* non-functions
<Regenaxer> exclude
<freemint> ok i assumed eval uses fun? internally
<Regenaxer> ah, no
<Regenaxer> it does no check at all
<Regenaxer> you can jump to *any* number
<Regenaxer> (def 'a 1) (a)
<Regenaxer> (fun? 1) -> 1
<freemint> couldn't we make a smarter fun? which looks if the code at the number and decides whether it is an number or not?
<freemint> (and checks whether it can be accessed with out segfault)
<Regenaxer> btw, in ersatz 1 *is* a function:
<Regenaxer> $ ersatz/pil +
<Regenaxer> : (def 'a 1) (a)
<Regenaxer> !? (a)
<Regenaxer> a -- Bad message
<freemint> ???
<Regenaxer> : +
<Regenaxer> -> 275
<Regenaxer> : meth
<Regenaxer> -> 1
<freemint> you would not want to use that smartfun in eval though, to slow.
<Regenaxer> Functions are small ints in ersatz
<Regenaxer> yes, it is a bit slow
<Regenaxer> but not much, it just looks at the lowest bits
<Regenaxer> hmm
<Regenaxer> no, not in pil64
<Regenaxer> it can't assume anything
<Regenaxer> in pil32 it did a tag check
<Regenaxer> return (unDig(x)&3) || isNum(cdr(numCell(x)))? Nil : x;
<freemint> also i found a nice programming language web site which has a similar charme as picolisp, quirky asf. The author is german too it seems. websire recooemnded with js https://thebeez.home.xs4all.nl/4tH/
<Regenaxer> this was because a function pointer was always aligned + 2
<Regenaxer> aka Forth?
<DKordic> Yes. In a Forth in C.
<DKordic> s/In a/A/
<Regenaxer> Hi DKordic
<DKordic> Greeting Regenaxer :) .
<Regenaxer> :)
<DKordic> Regenaxer, beneroth: Why "apply" is not a "msg"?
<Regenaxer> A msg is a symbol sent to an object to locate and execute a method
<Regenaxer> apply passes a list of evaluated args to a function
<DKordic> The "apply" Factor of "eval" then?
<DKordic> Or an "eval" "msg"?
<Regenaxer> hmm, completely different things
<Regenaxer> apply is not the same as eval
<Regenaxer> it is about *function* application
<Regenaxer> applying a function to arguments
<DKordic> Yes, I am aware. Could both of them be "msg"s?
<DKordic> FSUBR would be a subclass of FEXPR?
<Regenaxer> (apply fun List) is something like (eval (cons 'fun (mapcar lit List)))
<DKordic> From the point of sharing the code at least.
<Regenaxer> msg is something different, OOP
<Regenaxer> and FSUBR and FEXPR differ in the implementation
<Regenaxer> So all these terms are about different concepts
<DKordic> AFAIU pL has a Static Type System... deleted from the Run-Time.
<beneroth> nothing is deleted fromt he run-time
<beneroth> picolisp type system is static and strong for its basic types number, list, symbol
<Regenaxer> In Lisp the data have a type, not the variables
<beneroth> important point!
<beneroth> T
* DKordic [de cnt? [N] [when (== N (+ 0 N)) N]]
<DKordic> Why can't I obtain the CDR of a "num"?
<beneroth> "user-defined types" are special structured lists or symbols. they stay their basic type, which is strong and unchangeable. but what kind of symbol or list/cons pair you have is kinda like a user-defined type, and so are duck-typed basically.
<DKordic> Do destructive operations on "num"s?
<beneroth> I suspect your intermixing variables and values
<beneroth> variables in picolisp are nothing else than symbols pointing to certain values
<Regenaxer> CDR of a "num" is rather meaningless, why bother?
<DKordic> CDR should be the "rest" of the Digits, right?
<beneroth> == is pointer equality, so (== N (+ 0 N)) is meaningless
<beneroth> DKordic, no, number don't have a cdr
<DKordic> beneroth: Try, it.
<beneroth> ah well, (+ 0 N) is obviously doing nothing
<Regenaxer> what would be the "rest"?
<beneroth> same as (== N N)
<Regenaxer> the next 64 or 32 or whatever bits?
<DKordic> beneroth: Should there be "cdr" for "cons"es and "CDR" for "cell"s?
<beneroth> Regenaxer, I guess he means when the number is stored in multiple cells because if its size
<Regenaxer> you can get them with arithmetics
<Regenaxer> yes, I understood
<Regenaxer> but it is meaningless
<Regenaxer> it is a shift
<Regenaxer> '>>'
<freemint> beneroth: adding 0 is not an identity (+ "56gh" 0) is an sorce of error
<DKordic> Not by "==", that is consing is avoided.
<beneroth> DKordic, just do some practical work with picolisp instead of endlessly theorizing. you will see its merits when you use it for practical purposes. picolisp is practice-oriented.
<Regenaxer> DKordic, yes, but it is rather useless
<Regenaxer> the first CDR is a shift by 60
<Regenaxer> losing the sign
<Regenaxer> the next would be 64
<Regenaxer> What use?
<Regenaxer> beneroth: Exactly!
ubLIX has joined #picolisp
<Regenaxer> DKordic, you can write your 'numCdr' easily in pilasm
<beneroth> if you want a language which is fully-internally-consistent and elegant, than picolisp might come close but not fulfil your desire.
<beneroth> but then maybe go with an original turing machine. small and elegant. and useless for practical work.
<freemint> Regenaxer: in retrospect, how could you change PicoLisp such that attracts less theorizers
<beneroth> you can't
<beneroth> the other end of the spectrum is the node.js/java "there is a library for everything", attracting glue-coders cargo-culters instead of theorizers.
<beneroth> I prefer the theorizers
<DKordic> :3
<beneroth> freemint, important fact of life: you can't make everyone happy. its not possible, really. don't even try, just try to figure out which guys are important to make happy for your plans.
<freemint> beneroth: maybw because you are theorizer? Cargo culter prefer cargo culters too ;)
<beneroth> T, you nailed it :)
<beneroth> but theorizing without practical work is meaningless mental masturbation. so lets do something. I just attempt to work smart instead of hard (well no I do both -.-)
<beneroth> and functional results are ALWAYS better than nice theory!
<beneroth> thats why the cargo-culters win, and everything is full of shit tech :(
<Regenaxer> true
DKordic is now known as Heretic
<beneroth> bbl
<Regenaxer> cu
<freemint> cu
ubLIX has quit [Quit: ubLIX]
xkapastel has joined #picolisp
<freemint> Is there a way to do a catch all with 'fkey?
<freemint> also 'fkey has no 'doc , even thought it is important mechanism
<Regenaxer> ret
<Regenaxer> freemint, what do you mean with fkey?
<Regenaxer> in the context of catch?
<freemint> (de fkey (Key . Prg) (setq "FKey" (cond ((not Key) "FKey") ((not Prg) (delete (assoc Key "FKey") "FKey")) ((assoc Key "FKey") (cons (cons Key Prg) (delete @ "FKey")) ) (T (cons (cons Key Prg) "FKey")) ) ) )
<Regenaxer> Ah, the line editor
<Regenaxer> hmm, I see. What do you want to do?
razzy` has joined #picolisp
razzy has quit [Ping timeout: 246 seconds]
razzy` has quit [Remote host closed the connection]
razzy` has joined #picolisp
rob_w has quit [Quit: Leaving]
<freemint> Regenaxer: i wanted to experiment with my own console app stuff. Maybe an improved repl with shortcuts and list level navigation
<Regenaxer> Then you must hack @lib/led.l
<Regenaxer> (vi 'fkey) -> insMode
<Regenaxer> 'insMode' is where the keys are handled
<freemint> ok
<freemint> my problem is that i have no idea how terminals work and which technology (ncurses) would be right for me
<Regenaxer> For a full use of ncurses you can study @lib/vip.l
<Regenaxer> btw, vip also has a command line
<Regenaxer> or, command window (the bottom one)
<freemint> vip.l is sooo long
<freemint> (by PicoLisp standards)
razzy` has quit [Ping timeout: 268 seconds]
<Regenaxer> true
<Regenaxer> but @lib/form.l is a lot longer
<freemint> but less dense
<Regenaxer> right
razzy` has joined #picolisp
razzy` has quit [Client Quit]
razzy has joined #picolisp
<razzy> freemint: i stopped trying too hard to understand picolisp. i go by lisp feel and hope that somewhere under the hood is some lispy. also i started to prepare my subset of functions :]
<freemint> your own subset?
<razzy> well, i do not understand some of picolisp, so i have my favourite examples and ussage.
<razzy> propably less computationally efficient behaviour
<razzy> but i feel that two thirds of picolisp is experiment going good, rest is avoidable
<beneroth> what languages are your background, razzy ?
<razzy> beneroth: hard to say. i tried really hard *not* to learn microcontroller asm, C, C++, bash
<beneroth> why did you try not to learn? :o
<razzy> because i did not want to catch bad habits :D
<beneroth> what are the bad habits with asm/C/C++/bash??
<beneroth> you need to develop a taste before you can judge
<razzy> i am still trying to learn simple functional lisp
<beneroth> my first language was C/C++ and I believe the in-depth understanding that came with it (for me) was fundamental for my ability to understand software in-depth and to learn other languages.
<razzy> beneroth: in general that is bad advice. i can say that you need to loose the leg before you can judge if it is better without a leg
<razzy> beneroth: asm was good for me.
<razzy> rest i would send to GC :]
<razzy> language you use shape your mind. which makes you vulnerable to some errors. i find it very dangerous
<razzy> i think i tried enough to develop taste for respective languages, and not enough to suffer pernament learning experience
<razzy> number 1 reason of death and other problems are bad habits :] .
alexshendi has joined #picolisp
Viaken[m] has quit [Write error: Connection reset by peer]
<freemint> hi alexshendi
<alexshendi> Hi freemint, how are you?
<freemint> I am fine the recording of froscon is online
<Regenaxer> alexshendi, have you been to froscon too?
<alexshendi> Regenaxer: Sunday only, but yes.
<Regenaxer> Good
Viaken[m] has joined #picolisp
razzy has quit [Ping timeout: 246 seconds]
Viaken[m] has quit [Remote host closed the connection]
joebo1 has left #picolisp [#picolisp]
joebo has joined #picolisp
<joebo> hello! long time
<joebo> I am playing with a new chromebook that has crostini and I'm having trouble building pil64.. it's an arm64 processor
<joebo> here's my error:
<joebo> ./mkAsm arm64 ".linux" .s Linux base "" ../lib/map version.l glob.l main.l gc.l apply.l flow.l sym.l subr.l big.l io.l db.l net.l err.l sys/arm64.linux.code.l
<joebo> on/l open: No such file or directory
<Regenaxer> Hi joebo! Glad to see you
<joebo> any guesses?
<joebo> hi Regenaxer !
<joebo> this year has flown by with work and family and I have had very little time for hobby programming
<joebo> but life is good... as the year comes to a close I'm hoping to squeeze in a little time for fun
<joebo> how are you?
<Regenaxer> Is it really "on/l"? Then it looks like an internallal mismatch in the architecture
<Regenaxer> thanks, fine :)
<joebo> the on/l threw me... I wasn't sure how to debug it
<Regenaxer> Seems that the structure of a symbol is messed up
<Regenaxer> something very low internally
<joebo> hmmm.. I may be in new territory here.. I'm running crostini on a chromebook
<joebo> which is a linux virtual machine as far as I can tell
Viaken[m] has joined #picolisp
<Regenaxer> do you use pre-made *.s files?
<joebo> no, I searched for them briefly as I recalled they were out there, but I couldn't locate them in a quick search
<joebo> should I try that?
<Regenaxer> not sure
<Regenaxer> trying is good
<Regenaxer> software-lab.de/arm64.linux.tgz
<joebo> oddly even make emu doesn't work
<Regenaxer> thus avoiding mkAsm
<joebo> same error
<joebo> ok
<Regenaxer> oh
<Regenaxer> hmm, then really strange
<joebo> it could be my 32-bit build is not working correctly... it built cleanly
<joebo> I didn't run tests though
<Regenaxer> The above tgz works for Debian on arm64
<Regenaxer> yeah, with the tgz you avoid needing pil32 too
<Regenaxer> (*if* they match)
<Regenaxer> But perhaps ChromeOS is more like an Android?
<Regenaxer> If so, you could try the binaries in PilBox
<joebo> ah, ya that's a good thought too
<Regenaxer> PilBox.tgz from the above server
<joebo> I'm trying to build using arm64.linux.tgz ... back in a few
<Regenaxer> ok
<Regenaxer> In PilBox the binary is in PilBox/picoLisp/bin/picolisp
<joebo> great! the prebuilt .s worked fine
<joebo> from arm64.linux.tgz
<Regenaxer> cool!!
<joebo> thank you! I will play with it a bit more later... just took a short break from work
<Regenaxer> good :)
<joebo> I hope to check in more again ... nice chatting as always
<joebo> ttyl
razzy has joined #picolisp
orivej has quit [Ping timeout: 250 seconds]
<beneroth> yay joebo, nice you visit :)
ubLIX has joined #picolisp
freemint has quit [Quit: Page closed]