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
ubLIX has quit [Quit: ubLIX]
alexshendi has quit [Read error: No route to host]
alexshendi has joined #picolisp
_whitelogger has joined #picolisp
alexshendi has quit [Ping timeout: 252 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
razzy has joined #picolisp
<razzy> what is protected symbol? cannot find reference.
<Regenaxer> Some symbols are protected, like T or NIL. You should not 'set' a value
<Regenaxer> Not explicitly documented
<Regenaxer> see src64/globl.l
<Regenaxer> src64/glob.l
<razzy> some symbols in libraries?
<Regenaxer> ?
<razzy> alpha in (game) simul.l ?
<Regenaxer> No, only those in src64/glob.l
<Regenaxer> 7 of them
<razzy> ah, my bad, thx
<Regenaxer> Every other symbol can be set freely
<Regenaxer> even these "protected" symbols can be set if you really want to
<razzy> not really want to, thx
<Regenaxer> So they are not very protected. As ever it is up to you
<Regenaxer> yeah, sure
<Regenaxer> not a good idea
<razzy> i miss-read the error
<Regenaxer> ok
Dragon-Warrior has joined #picolisp
<Dragon-Warrior> This line returns NIL (let T()(=T())) but this returns T (let ()T(=T())) why? Should not both return the same result?
<Dragon-Warrior> Apart from let can one globally redefine T or NIL?
<Regenaxer> (let T()(=T())) returns NIL because 'T' is bound to NIL
<Regenaxer> (=T ..) evaluates
<Regenaxer> '=T' compares the evaluated second argument with the symbol 'T' using pointer equality
<Dragon-Warrior> Okay, i thought =T was comparing the T with it's new value of NIL. Instead of the old one.
<Regenaxer> hmm
<Regenaxer> (let NIL T binds NIL
<Regenaxer> (=T NIL) evaluates NIL giving T, which is =T
<Dragon-Warrior> Yes, was confused why the opposite didn't work now i know. Thanks!
<Regenaxer> welcome :)
Dragon-Warrior has quit [Remote host closed the connection]
<razzy> i do not understand why my sort does not work and code is not lisp which is hard for me. https://ptpb.pw/AC9i/text, thanks for help
Dragon-Warrior has joined #picolisp
<Regenaxer> If you pass a function to 'sort', it must be a comparison
<Regenaxer> (sort ... '((X Y) (> (length X) (leng ...
<razzy> ouch. thx
<Regenaxer> better use 'by'
<Regenaxer> (by length sort Lst
<Regenaxer> )
<razzy> in my mind it should not work :D
<Regenaxer> Why?
<razzy> because i would not imagine that powerfull function with by :]
<Regenaxer> Which one is powerful? 'length' or 'by'?
<Regenaxer> ok, understand
<Regenaxer> Yeah 'by' is really cool, and usually faster than with comparison
<Regenaxer> despite it builds a list internally
Dragon-Warrior has quit [Quit: ERC (IRC client for Emacs 26.1)]
<Regenaxer> But the comparison is called less often (eg. 'length')
<razzy> i solved my issue, it was my pleasure :]
<razzy> thx
<Regenaxer> :)
<Regenaxer> brb
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
razzy has quit [Ping timeout: 245 seconds]
_whitelogger has joined #picolisp
<beneroth> Hi all
<beneroth> GitHub becomes worse, allows now deletion of issues: https://twitter.com/github/status/1060233780114288640
xkapastel has joined #picolisp
<tankf33der> beneroth: yea
<tankf33der> and you can drive inside git too
razzy has joined #picolisp
<beneroth> oh, THAT is nice! thanks tankf33der !
<beneroth> I will probably start using that, at least once I work with more than 1 developer again. nice!
<tankf33der> full list:
<viaken> (inc tankf33der)
<beneroth> viaken is a Google+-User? :P
<viaken> Not heavily, but yes. Why do you ask?
<beneroth> I don't know where else +1 would be a thing
<viaken> Ah! Actually, a few of the other IRC channels I'm in have a bot that keeps score. You can "beneroth++ for asking questions" and it will record it. (inc) seemed the picolisp equivalent.
<beneroth> ah nice
<beneroth> to be precise: (inc 'beneroth) (destructive, notice the quote) would be beneroth++. (inc beneroth) (no quote) would be beneroth + 1 (not changing beneroth)
<viaken> Ah, right. It's obviously been too long since I've actually used picolisp. :)
<rick42> hello peeps!
<rick42> mutually exclusive statements:
<rick42> 1. git-bug is a distributed bug tracker embedded in git.
<rick42> :)
<rick42> 2. To install: go get ...
freemint has joined #picolisp
<beneroth> not exactly, rick42. TOR is also distributed and decentralised (something can be distributed and centralised btw)
<beneroth> but you still need some hardcoded list of initial tor nodes.
<beneroth> (discovery is the problem)
<freemint> beneroth: It is discovery or trust. You could try to find peers by brute force but assuming you start in china how do you know you do not talk with the great firewall?
<beneroth> afaik TOR has a network of people in China distributing lists "secret" TOR entry nodes
<beneroth> it's an arms race.
<rick42> hi beneroth, hi freemint
<freemint> Is there a way to stop function written in ASM without losing process data?
<rick42> beneroth: was referring to "this is embedded in git" and then "now, install this go program" lol :)
<freemint> (like without using the data of the process)
* rick42 is enjoying reading tankf33der's git-addon list
<rick42> $ git blame-someone-else 'Steve Mao <maochenyan@gmail.com>' 2efb4e3a061a2e8aaa58033e9c13c3e0e5fcde4b
<rick42> lol
<rick42> Steve Mao is now the author of 2efb4e3. You're officially an asshole.
<beneroth> aye, I had to chuckle too :)
<beneroth> rick42, yeah, I got the irony ;-)
<rick42> :)
<beneroth> freemint, I would guess there might be a kernel call to stop the execution of a process, freezing it so you can inspect the process in /proc ? just a guess.
<beneroth> freemint, also, what does this have to do with ASM at all?
<beneroth> I gotta go :)
<beneroth> bbl
<beneroth> have a nice weekend folks!
<freemint> if it were interpreted then it would be easier to cancel
<rick42> u2!!!
<freemint> Bye
<freemint> i accidently killed the process
<freemint> hours of wokr gone :(
<freemint> and is just wanted to diff two lists :(
<Regenaxer> You still edit your sourcen in-heap only?
<freemint> I was filterinf
<Regenaxer> hours?
<freemint> i was processing a long list (> 200MB) of dns stuff so i can find a small subset which has a certan properties + exploration of that dataset
<Regenaxer> I see
<razzy> when you have more powerfull language, people use it for bigger jobs
<freemint> any ideas how to intergrate backups in to the work flow?
<freemint> (length Brave) -> 902441 and that is already aggressevly pre-selected
<Regenaxer> To keep data, do (out "saved" (println ...)) T
<Regenaxer> 'T' is to suppress print
<freemint> lets suppose i have entries like (("timestamp" . "1541170211") ("name" . "0-onetechnologie.net") ("type" . "mx") ("value" . "10 mx1.hostinger.fr")) is there a nicer way to get the name property than cdadr?
<Regenaxer> If you use internal symbols for the keys, you can use 'get'
<Regenaxer> (get L 'value)
<Regenaxer> (; L value)
<Regenaxer> or (; L name) in this case
<freemint> (; name or (; "name"
<Regenaxer> "name" only works if you are sure you have the *same* symbol
<Regenaxer> ==
<freemint> but my daf
<freemint> Regenaxer my data looks like "name"
<Regenaxer> Then == cannot be used, eg 'get' or 'asoq'
<Regenaxer> You can use 'assoc'
<Regenaxer> (cdr (assoc "name" Lst))
<freemint> ok then cdadr is simpler
<Regenaxer> But if the form is known, 'cdadr' is fine
<Regenaxer> yes
<Regenaxer> and faster
<freemint> i ran in to the c*r limit several times
<freemint> i whished we had longer cddadadaddr s
<Regenaxer> yeah
<Regenaxer> I would use 'nth' then
<Regenaxer> though cddadadaddr would be faster ;)
<razzy> me plays chess for days now
<freemint> and already managed to beat the stupidly simple chess engine?
<Regenaxer> Great razzy! I'm glad to hear that :)
<razzy> picochess? yes :] but i had to look under the hood :]
<Regenaxer> I'm too quickly frustrated as I have no chance
<freemint> razzy how does looking under the hood help?
<razzy> you find a weakness and exploit it :]
<freemint> and that weakspot was?
<razzy> it considers hard depth
<razzy> and than cost function
<razzy> so you must play just one step ahead, always :]
<razzy> i am playing with picochess on my side. using it for analysis
<razzy> and i think picochess undervalue pawn before promotion
<razzy> and undervalue mobility of pieces
<Regenaxer> I see
<Regenaxer> You tune the cost function?
<razzy> picolisp not undervalue it by much i think
<razzy> i use depth 8 and it is max my CPUs can take :]
<razzy> so i will be tuning alphabeta search :]
<razzy> *picochess
<Regenaxer> Wow, depth 8 must take very long
<razzy> i had "obvious" exchanges taking 7 turns and could not trust picolisp with evaluation :]
<razzy> *picochess
<razzy> i value picochess because it can say that oponnent canot have material gain in *Depth moves
<Regenaxer> T
<razzy> with high propability
<razzy> depth+1 could be huge loss
<razzy> and also i think picochess overvalue middle
<razzy> in certain cases
<freemint> Does anybody see a mistake in (setq Temp (by '((X) (pack (reverse (chop (cdadr X))))) group Brave)) i takes longer than i think it sgouls
<freemint> forget that
<freemint> does by use = or ==
<Regenaxer> I think you can omit the 'pack', it is a bit expensive
<Regenaxer> also 'flip' is faster than 'reverse'
<Regenaxer> 'flip' is destructive but safe here as the list is fresh from 'chop'
<Regenaxer> 'by' does not do any comparison
<freemint> *group
<Regenaxer> Ah, yes, 'group' uses '='
<freemint> mhh i need parallelism now checking the head of 226717 domains is something that takes to long by hand
<freemint> *sequential
<Regenaxer> yep
<freemint> for that i would go with thell?
<freemint> or is having counter in file easier
<Regenaxer> I suggested a pipe
<Regenaxer> Each process fetches the next domain from the pipe when ready
<Regenaxer> until EOF
<Regenaxer> $ mkfifo p
<freemint> ahh that is cool
<freemint> i dump once everything in to the pipe and the create childs/processes?
<Regenaxer> yes
<Regenaxer> the writing side (parent) will block until it can be written
<Regenaxer> Needs some experimentation
<freemint> :(
<Regenaxer> Just try
<freemint> does caching make trouble with pipes?
<Regenaxer> Which caching?
<freemint> the caching in does when reading files?
<Regenaxer> With experimenting I mean to make sure that no 2 processes fetch the same item from the pipe
<Regenaxer> No cache involved here
<Regenaxer> A cache is a serial kernel structure
<Regenaxer> But sometimes tricky when what blocks
<Regenaxer> Reading and writing ends
<Regenaxer> First play around with pipes only, no other logic
<Regenaxer> To make sure the setup works
<Regenaxer> For example, if it is better if the parent opens also the reading side of the pipe and inherits it to the children
<Regenaxer> or if better each child does its own (open)
<Regenaxer> I'm not sure atm
<Regenaxer> Experiment, or read up about Unix pipes
<Regenaxer> Experimenting is easier ;)
<Regenaxer> Once it works, this load-distribution via pipes will be very useful also for other use cases
<Regenaxer> You should write about it :)
<freemint> it does not work at all
<Regenaxer> How did you do it?
<freemint> cat stuff >> pipe
<freemint> (in "pipe" (prinl (line T)))
<freemint> let me try some more
<Regenaxer> ok
<freemint> after i close the pipe and reopen it is empty ...
<Regenaxer> yes, may well be
<freemint> mhh works as expected with different processes
<Regenaxer> I tried too
<Regenaxer> one process (out "p" (loop (pr (inc 0)) (wait 1000)))
<Regenaxer> 2 other processes: (in "p" (while (rd) (msg @)))
<freemint> You subscribe to pipe once you open it. Data which was put in before you opened it is not avaiable.
<Regenaxer> They read different items it seems
<Regenaxer> hmm, no
<freemint> but you got to decide how many processes you want per each batch you put in to the pipe you can not add processes once you filled it
<freemint> what no?
<Regenaxer> Above was a little wrong
<Regenaxer> Now it works here
<Regenaxer> With this:
<Regenaxer> (in "p" (while (rd) (msg @)))
<Regenaxer> (out "p" (loop (pr (msg (inc (0)))) (wait 1000)))
<Regenaxer> The out is in one process
<Regenaxer> Then I started 2 processes doing the 'in'
<Regenaxer> Just start as many 'in' processes as you like
<freemint> why msg?
<Regenaxer> To see what the processes are sending and receiving
<Regenaxer> I see numbers in the reveivers
<Regenaxer> different in both
<Regenaxer> So it works perfectly, distributing to the processes
<freemint> ah msg was write to fd 1 or something
<Regenaxer> to 2 (stderr)
<Regenaxer> I always use 'msg' for such tests
<Regenaxer> doesn't interfer with I/O
<freemint> good idea
<Regenaxer> Did you try the above 2 lines?
<Regenaxer> Open 3 terminals
<Regenaxer> with three pil's
<Regenaxer> Then you see what is sent by one process and what is received by the 2 others
alexshendi has joined #picolisp
alexshendi2 has joined #picolisp
<freemint> that wokrs fine
alexshendi has quit [Ping timeout: 252 seconds]
<Regenaxer> Great!
alexshendi2 has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
alexshendi has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
<freemint> works well but i did not dare to go for 1000 processes
<Regenaxer> yeah, not too many
<freemint> 100 seemed ok
<freemint> i wonder what the admins on the other end think
<Regenaxer> :)
<freemint> who the hell is "picolisp"
<Regenaxer> They'll block you
<freemint> for 200000 http requests as fast i can ? nah
<freemint> never would they do that
<freemint> i save them millions of http request by doing that
<freemint> and i also save their (non paying) customers arse
<Regenaxer> good
<freemint> (they are shutting down there free hosting, so i am "working" "with" the archive team to have it added to archive.org
shpx has joined #picolisp
shpx has quit [Read error: Connection reset by peer]
<beneroth> ah, nice good cause freemint !
<beneroth> sounds like a cool project
<beneroth> gn8
<freemint> gn8
orivej_ has quit [Ping timeout: 246 seconds]
andyjpb has joined #picolisp