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
groovy2shoes has quit [Quit: moritura te saluto]
roundsf` has joined #picolisp
roundsf has quit [Ping timeout: 246 seconds]
aw- has joined #picolisp
orivej has quit [Ping timeout: 272 seconds]
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
<Regenaxer> tough again ;)
<tankfeeder> i did it
<m_mans> Hi all
<beneroth> Good morning all
mtsd_ has joined #picolisp
<tankfeeder> second part of day 18
<tankfeeder> Regenaxer: will it be two (co) ?
<mtsd_> Good morning
mtsd_ is now known as mtsd
<m_mans> I suppose there is no difference between normal entities and those marked as 'deleted' (by 'lose>) for 'dbgc ?
<beneroth> as long as there are references to that external symbol, it is not garbage collected
<beneroth> so T
<beneroth> you can see the implementation in @lib/too.l
<m_mans> ok
<aw-> hi all
<beneroth> hi aw- !
<aw-> i can't figure out the difference between (bytes), (length) and (size) - for a string
<beneroth> (length) - number of characters
<beneroth> (size) - size (in bytes) in RAM
<beneroth> (bytes) - size this string would require when encoded in binary format (I think plio)
<beneroth> : (length "Ähnlichkeit")
<beneroth> -> 11
<beneroth> : (size "Ähnlichkeit")
<beneroth> -> 12
<beneroth> : (bytes "Ähnlichkeit")
<beneroth> -> 13
<beneroth> (first character is a german umlaut)
akkad has quit [Ping timeout: 240 seconds]
<tankfeeder> Regenaxer: any hints how to implement task from pastebin link?
miskatonic has joined #picolisp
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
mtsd has quit [Ping timeout: 240 seconds]
mtsd has joined #picolisp
<Regenaxer> Hi all! Sorry for the sluggish responses (telcon)
<Regenaxer> The pastebin is a horror - why are the lines so long? Not wrapping
<Regenaxer> neither in w3m nor in firefox
<tankfeeder> maybe resend by email ?
<beneroth> that would allow wrapping ;) or copy from stupid website to texteditor
<Regenaxer> What is the question?
<beneroth> Regenaxer, were my answers above correct?
<Regenaxer> length/size, yes, perfect I think
<tankfeeder> i need to run two instances:
<tankfeeder> or parent -> child
<tankfeeder> or parend -> child1 and child2
<tankfeeder> .
<Regenaxer> or coroutines?
<Regenaxer> I think best is one parent, and direct children
<Regenaxer> for ipc
<tankfeeder> they need communicates each other, wait each other and continue execute in his environment
<Regenaxer> hmm, then perhaps coroutines is easier
<Regenaxer> if performance is not an issue
<Regenaxer> (yield ..)
<tankfeeder> they need his own copy for variables: I and R
<tankfeeder> and need timeout to detect deadloop
<tankfeeder> to stop both.
<Regenaxer> hmm, sounds tricky
<tankfeeder> as always.
<Regenaxer> :)
<tankfeeder> Finally, both programs try to rcv a fourth time, but no data is waiting for either of them, and they reach a deadlock. When this happens, both programs terminate.
<tankfeeder> sounds like timeout function
<Regenaxer> Well, not time but data is exhausted
<Regenaxer> Each process could be a coroutine
<Regenaxer> sending data with 'yield'
<tankfeeder> ok
<Regenaxer> At the moment it looks like the clearest way to me
<tankfeeder> ok
<Regenaxer> I don't really understand the task though
<tankfeeder> task:
<tankfeeder> Once both of your programs have terminated (regardless of what caused them to do so), how many times did program 1 send a value?
<tankfeeder> can coroutines handle timeouts not to wait forever?
<tankfeeder> Regenaxer: ^^^ ?
<beneroth> tankfeeder, (abort)
<beneroth> I don't know how well they mix with coroutines though
<tankfeeder> ha
<Regenaxer> Sorry, tels again
<Regenaxer> If any of the coroutines says (bye), all stops :)
akkad has joined #picolisp
<Regenaxer> Timeouts will not go well with coroutines, because if *one* coroutine sleeps thenn *all* sleep
<Regenaxer> So control is passed with 'yield' between them
<aw-> beneroth: thank you sir
<beneroth> your welcome, maestro
<tankfeeder> if no timeouts then no coroutines.
<tankfeeder> maybe pipe-task
<tankfeeder> and udp to send-receive
<beneroth> tankfeeder, use (tell) not udp
<tankfeeder> ok
<beneroth> picolisp parent process which does nothing beside (wait) (which also runs the message passing between child processes), and two child processes
<Regenaxer> tankfeeder, why "time"?
<beneroth> (tell 'Pid '(prog (prinl "hi") (prinl (version))))
<Regenaxer> it is a logical sequence of events, right? Not "time" in seconds?
<tankfeeder> not time
<Regenaxer> yeah
<Regenaxer> "simulated" time
<Regenaxer> ticks or whatever
<Regenaxer> So if one yield returns NIL, things stop?
<Regenaxer> beneroth, more correct would be (tell Pid prog '(prinl "hi") '(prinl (version)))
<Regenaxer> or (tell Pid 'prinl "hi") (tell Pid 'prinl '(version))
<Regenaxer> for the local version it would be (tell Pid 'prinl (version))
<Regenaxer> oops, the first is (tell Pid 'prog '(prinl
<tankfeeder> snd X sends the value of X to the other program. These values wait in a queue until that program is ready to receive them. Each program has its own message queue, so a program can never receive a message it sent.
<tankfeeder> maybe implement via db
<tankfeeder> like here:
<tankfeeder> rcv X receives the next value and stores it in register X. If no values are in the queue, the program waits for a value to be sent to it. Programs do not continue to the next instruction until they have received a value. Values are received in the order they are sent.
<Regenaxer> ok, still I believe that coroutines are the most straightforward
<tankfeeder> eh
<Regenaxer> A coroutine alwads waits in 'yield' until some other coroutine calls it
<Regenaxer> all with 'yield'
orivej has joined #picolisp
<aw-> beneroth: you here?
<Regenaxer> A database looks like quite some overhead here
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #picolisp
rob_w has joined #picolisp
aw- has quit [Quit: Leaving.]
<beneroth> back
mtsd has quit [Quit: leaving]
<tankfeeder> there is demo flow
<tankfeeder> send, send, receive, receive
<tankfeeder> two co cant work
<Regenaxer> Coroutines are quasi-parallel, just as processes also are. On a single CPU processes also run one after the other
<tankfeeder> so this is not issue then?
<Regenaxer> I think so
<tankfeeder> damn
<Regenaxer> ? :)
<tankfeeder> i cant start
<Regenaxer> What happened?
<tankfeeder> [co-co.l:11] !? (yield N "1")
<tankfeeder> "1" -- Reentrant coroutine
<tankfeeder> ?
<Regenaxer> "1" is the current coroutine?
<tankfeeder> this is wrong code
<tankfeeder> i just need a sceleton to extend
<Regenaxer> (co ID (yield ID) ... calls itself, so it says "reentrant"
<Regenaxer> (yield <val> ID) is needed too btw
<Regenaxer> no, ok, understand
<Regenaxer> but (yield N "1") is the problem if in "1"
<tankfeeder> aaa
<rick42> hola
<Regenaxer> Hi rick42!
<rick42> Hi, Regenaxer! :)
<rick42> Regenaxer: i've been using http://ix.io lately for "pastebin" functionality. seems to be ok so far
<rick42> has CLI \o/
<rick42> well with curl
<Regenaxer> Sounds good
<rick42> :)
<Regenaxer> What's wrong with pastebin?
<beneroth> you were not happy with the line wrapping earlier :P
<beneroth> ahoy rick42
<rick42> beneroth: hi!
<rick42> yes beneroth guessed it
<rick42> i like the services that offer to paste something and when you go to retrieve it, it's just the text/content, no cruft around the content
<beneroth> like, a static text file on your own webserver? :P
<rick42> :D
<rick42> yeah, for lasting things. for quick, transient things, these services are super convenient
<Regenaxer> The line wrapping is not pasteibin's fault I believe, but of the one who formatted the text
<rick42> ah
<Regenaxer> Yes, "no cruft", so I always immediatel switch to "raw" to see the code
<Regenaxer> But the above case was no code, but html I think
<rick42> machine gened no doubt
<Regenaxer> looks like
<rick42> Regenaxer: sorry that i was bothered by the ML poster's video with the flashing lights. it was really bothersome (the lights). i still don't know why it was necessary
<rick42> i was really hoping that they would still make vids but with the flashing lights :)
<rick42> without*
<Regenaxer> yeah
<viaken> rick42: Thanks. I've been using http://sprunge.us. This should save a few keystrokes.
<rick42> viaken: np. i use sprunge too!
<rick42> viaken: sprunge was down for me a bit one day last week. so i switched to the other one. now i have both. :) please lmk if you know of others and i will add them to my "stable" :)
akkad is now known as ober
<beneroth> (stealing chrome data from previously logged in user)
<beneroth> (physical access required)
<beneroth> (security issue maybe, no technical bug)
<rick42> geez
<tankfeeder> Regenaxer: sleep?
<beneroth> tankfeeder, (wait) ?
ober has quit [Excess Flood]
akkad has joined #picolisp
akkad has quit [Excess Flood]
akkad has joined #picolisp
ChanServ has quit [shutting down]
ChanServ has joined #picolisp