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
inara has quit [Quit: Leaving]
inara has joined #picolisp
styx has quit [Quit: styx]
orivej has joined #picolisp
karswell has quit [Remote host closed the connection]
karswell has joined #picolisp
karswell has quit [Remote host closed the connection]
karswell has joined #picolisp
karswell has quit [Remote host closed the connection]
karswell has joined #picolisp
karswell has quit [Remote host closed the connection]
karswell has joined #picolisp
<tankf33der> Regenaxer: what you think about this variation ?
<tankf33der> ha
<tankf33der> ext is redefined
<tankf33der> Regenaxer: no ext function in main index of functions
<Regenaxer> ret
<Regenaxer> True, though (doc 'ext) works
<tankf33der> just add
<Regenaxer> I never use that index, so it is easily forgotten
<Regenaxer> Added
<Regenaxer> You did not like my solution with 'find'?
<Regenaxer> BTW, I think the 'member' check is not necessary
<Regenaxer> 'stem' returns NIL then
<Regenaxer> Ah, no, right
<Regenaxer> 'member' is needed
<tankf33der> you find didnt work
<tankf33der> i dont remember why
<Regenaxer> hmm, I see
<Regenaxer> let me try
<Regenaxer> Works:
<Regenaxer> (de extension (F)
<Regenaxer> (fully
<Regenaxer> '((C)
<Regenaxer> (and
<Regenaxer> (find >= '("Z" "z" "9") (circ C) '("A" "a" "0")) )
<Regenaxer> (setq F (stem (member "." (chop F)) ".")) )
<Regenaxer> (pack F) ) )
<Regenaxer> But not really better than 'or' with 3 checks
<tankf33der> i see
<tankf33der> so what to commit ? :)
<Regenaxer> The 'find' is useful if there are more ranges than 3 perhaps
<Regenaxer> hmm, so I would use this:
<Regenaxer> (de extension (F)
<Regenaxer> (or
<Regenaxer> (fully
<Regenaxer> '((C)
<Regenaxer> (and
<Regenaxer> (>= "Z" C "A")
<Regenaxer> (>= "z" C "a")
<Regenaxer> (>= "9" C "0") ) )
<Regenaxer> (setq F (stem (member "." (chop F)) ".")) )
<Regenaxer> (pack F) ) )
<Regenaxer> 'or' is more clear
<Regenaxer> and avoids the 'circ'
<Regenaxer> BTW, I would also be careful with using '@@'
<Regenaxer> It is a global and might be used bo called functions
<Regenaxer> (in a more complicates situation)
aw- has joined #picolisp
<tankf33der> i will use yours.
<tankf33der> ok
<Regenaxer> Thanks
<aw-> yunfan: the answer is 'no'
<aw-> Regenaxer: hi
<aw-> i ran into something yesterday and i wasn't sure how to handle it.. maybe i've done it before but I forgot
<Regenaxer> Hi aw-
<Regenaxer> Happens to me all the time ;)
<aw-> 1) read a file into a var, ex: (let File (in "filename" (while (from "some string") (till NIL T))
<aw-> 2) how to use (from "another string") with File var?
<aw-> i need to do it _after_ the entire file is read, not during the (while) loop
<Regenaxer> Hmm, the while makes no sense
<Regenaxer> (till NIL T) reads till EOF
<aw-> ok.. so forget the while
<aw-> let's assume I just read the entire file
<Regenaxer> ok
<aw-> how can i use (from) with it?
<Regenaxer> and with 'from' from some point
<Regenaxer> the above is OK
<Regenaxer> (and (from "str") (till NIL T))
<aw-> ?
<aw-> no
<aw-> you dont understand my question
<aw-> (let File (in "filename" (till NIL T) ... <how do I use (from) with File> ?
<Regenaxer> I don't get it
<aw-> ok
<aw-> (setq File (in "filename" (till NIL T)))
<Regenaxer> You want to read a value for 'File' from "filename"
<aw-> now I have this 'File' thing..
<aw-> how can i parse it?
<Regenaxer> yep
<Regenaxer> (setq File (in "filename" (till))
<Regenaxer> then match or so
<Regenaxer> any list operations
<aw-> how can I parse it with (from)
<aw-> that's my question
<aw-> i know about (till) and match/list operations
<yunfan> aw-: so you solved the problem by ignore it?
<Regenaxer> above you uset from
<aw-> Regenaxer: once i've fully read the file into a variable, how can i re-read it only "from" a string
<Regenaxer> ah
<Regenaxer> there is no read from a string
<Regenaxer> except 'str'
<aw-> i tried (in (out NIL (prin File)) (from "some string") ...
<Regenaxer> Why do you read it all?
<Regenaxer> better parse for what you want
<aw-> yunfan: yes, exactly
<Regenaxer> Reading *all* might be unnecessary overhead
<Regenaxer> (in (out is not good
<Regenaxer> you can use 'pipe'
<Regenaxer> but that's also overhead
<Regenaxer> I don't get what you want to do
<aw-> i just want to use (from)
<aw-> hahaha
<aw-> but it seems it's only for stdin
<Regenaxer> no
<aw-> or whatever input
<Regenaxer> pil does not use stdin
<Regenaxer> except for (in NIL
<Regenaxer> yel
<Regenaxer> yes
<aw-> sorry, i meant input
<tankf33der> aw-: what is inside file ?
<aw-> input stream
<aw-> tankf33der: text
<aw-> ok Regenaxer, let me give you a 'bash' example
<Regenaxer> if you have the list in memory after (till) you can operate on it
<aw-> myvar=`cat filename`
<tankf33der> write it to file show it via pastebin
<aw-> echo $myvar | prog1
<aw-> echo $myvar | prog2
<aw-> i want to do that with PicoLisp
<aw-> prog1 and prog2 are custom parsers
<aw-> (from) is convenient because it, as your docs says, "Skips the current input channel until one of the strings any is found"
<Regenaxer> yes, but if you have s-exprssions there are better ways
<Regenaxer> eg 'seek'
<Regenaxer> 'from' is input streams only
<aw-> ok ok, that's what i wanted to confirm
<aw-> (from) is only for input
<Regenaxer> yes, like (line), (char), (read) and so on
<Regenaxer> I would start with 'match'
<aw-> hmmm 'seek'
<aw-> shouldn't seek be listed with (tail) in the ref docs?
<aw-> seems like a similar function
<aw-> related
<Regenaxer> Well, all list functions are related
<aw-> ahaha
<Regenaxer> I consider 'seek' as a mapping function
<Regenaxer> 'tail' is not
<Regenaxer> More in the class of 'head' or 'member'
<Regenaxer> In my feeling 'tail' or 'head' are more "primitive" than the mapping functions like 'mapcar' and 'filter' etc.
<aw-> i see... ok so again, the ref docs need an additional classification system. I wish there was a page which listed all the mapping functions on the same page so i can quickly scroll through and see which one would be useful
<Regenaxer> Mapping
<Regenaxer> apply pass maps map mapc maplist mapcar mapcon mapcan filter extract seek
<Regenaxer> find pick fully cnt sum maxi mini fish by
<aw-> that's just a list of words
<Regenaxer> T
<aw-> it's painful going through each one that way
<Regenaxer> A database would be good
<Regenaxer> Perhaps with a chatbot based on it
<aw-> no
<aw-> too much overhead
<yunfan> aw-: you act like our goverment :[
<aw-> i want just one html page that lists the mapping functions, and describes them below, with examples
<aw-> yunfan: ??
<yunfan> aw-: i mean solve the problem by ignore it
<aw-> yunfan: i didn't ignore it, i just found a solution that doesn't require it :P
<Regenaxer> The above list of links in ref.html is very usable
<Regenaxer> just ENTER and BACK in w3m :)
<aw-> Regenaxer: i know, it's open 24/7 in my browser, but it's painful
<Regenaxer> l, enter, back, l, enter, back ...
<aw-> god
<yunfan> aw-: so what's your solution
<aw-> yunfan: don't use Oauth2
<Regenaxer> The functions in the ref could be classified by many criteria
<aw-> Regenaxer: here's an example page: https://ruby-doc.org/core-2.2.0/Array.html .. this page lists all the "Array" functions.. all functions which can map/iterate/etc over an array, with examples for each function
<aw-> the current ref is just alphabetical
<Regenaxer> no
<Regenaxer> see above
<Regenaxer> Only mapping funs
<Regenaxer> but you could also group by destructive or not
<Regenaxer> list, numeric, symbolic
<Regenaxer> mixed
<Regenaxer> whatever
<aw-> i'm not referring to the grouping
<yunfan> aw-: but i mean you will need other solution for authenication
<aw-> the grouping is not the problem
<aw-> it's the html page that lists 'task underneath 'tail
<aw-> they are unrelated!
<aw-> under 'tail i should have 'trim and then 'uniq
<Regenaxer> yes, but there is not *one* relation
<aw-> Regenaxer: i agree, that's why i said there should be an "additional" documentation
<aw-> with this type of relation
<Regenaxer> but that is redundant then
<Regenaxer> I think the links must be grouped, not all texts
<aw-> well no, it's like saying the index of a book is redundant with the table of contents
<aw-> only having an index makes it very difficult to discover related/useful functions
<Regenaxer> So what would you recommend?
<aw-> yunfan: no, like i said i just completely dropped the need for doing anything that requires OAuth2
<Regenaxer> Have multiple copies of the same text?
<aw-> Regenaxer: i think i haven't thought that far yet ;) haha sorry
<aw-> but in fact i think the alphabetical ordering is less useful than related ordering
<Regenaxer> np, so I think it boils down to some DB
<aw-> i can't remember a single time where i wanted to read the ref functions in alphabetical order
<Regenaxer> the alphabetical ordering is just for maintaining
<Regenaxer> the indexing can be complex
<Regenaxer> I never read it alphabeticaly
<aw-> right
<aw-> Regenaxer: yes, same here.. i only read the function i want, and then move-on
<Regenaxer> A always always use (doc '...)
<aw-> but now i'm always clicking every function name and reading and clicking and moving around so much to figure out just one thing
<Regenaxer> T
<Regenaxer> I find "see also" most useful
<aw-> yes I find it **very** helpful
<Regenaxer> But too much or too little see alsos is also bad
<aw-> yes exactly
<aw-> if the docs were in a DB, that would be possible to make so many types of help pages
<Regenaxer> yes
<Regenaxer> each entry has attributes searchable
<aw-> and even make it dynamic with a locally running 'doc server' or something
<Regenaxer> nice project
<Regenaxer> We should find a cs student searching for a subject for a paper
<aw-> already the 'Reference lookup' frame in the local docs is very useful
<aw-> i use it all the time
<Regenaxer> This I never use
<aw-> it's fast
<aw-> in firefox
<Regenaxer> Sometimes I even 'grep' in doc/ :)
<Regenaxer> We need a learning doc: "People who looked up 'from' also looked up 'seek'
<aw-> ahaha well.. haha that could be interesting
<aw-> if it was local i wouldn't mind
<aw-> don't want to share my searches with others
<aw-> i'd love to be able to write my own reference tags for certain docs/functions.. then i could easily retrieve them when i forget
<aw-> which happens often hahaha
<aw-> bbl, going for a run
<Regenaxer> :)
freemint has joined #picolisp
freemint has quit [Ping timeout: 240 seconds]
freemint has joined #picolisp
karswell has quit [Read error: Connection reset by peer]
karswell_ has joined #picolisp
<tankf33der> Regenaxer: here ?
<tankf33der> what was the path to bootstrap x64 files ?
<tankf33der> which were already generated for pil64
<Regenaxer> You mean like https://software-lab.de/arm64.linux.tgz ?
<Regenaxer> the *.s files
<tankf33der> but for x64
<tankf33der> yea
<tankf33der> ok
<Regenaxer> They are listed in INSTALL iirc
<tankf33der> ok
styx has joined #picolisp
alexshendi has joined #picolisp
styx has quit [Quit: styx]
grp has joined #picolisp
freemint has quit [Ping timeout: 245 seconds]
freemint has joined #picolisp
freemint has quit [Ping timeout: 255 seconds]
styx has joined #picolisp
andyjpb has joined #picolisp
andyjpb has quit [Client Quit]
grp has quit [Quit: box shutting down...]
styx has quit [Quit: styx]