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
karswell has quit [Ping timeout: 260 seconds]
alexshendi has quit [Read error: Connection reset by peer]
aw- has joined #picolisp
aw- has quit [Client Quit]
linus` has joined #picolisp
linus`__ has quit [Read error: Connection reset by peer]
aw- has joined #picolisp
rob_w has joined #picolisp
<beneroth> Regenaxer, did you ever do android contact synchronisation using pilBox?
<Regenaxer> The Android Contacts App data?
<Regenaxer> In any case, not. I don't synchronize anything with any outside cloud
<Regenaxer> I export the contact data into a "contacts.vcf" file in Termux
<Regenaxer> Then replicate the whole Termux environment
<Regenaxer> My mail client is 'mutt' in Termux, so no PGP/GPG problems :)
<Regenaxer> No HTML mails
mtsd has joined #picolisp
<beneroth> I mean for client systems, not necessarily your personal use
<beneroth> A conctacts.vcf download might be good enough, though it's then not synchronising afaik.
<Regenaxer> Yep
<Regenaxer> I never did anything with contacts progammatically
<beneroth> ok
<Regenaxer> What kind of application do you think of?
<beneroth> CRM
<Regenaxer> yes, but what Android app?
<Regenaxer> What should the app do?
<beneroth> synchronise the contacts in the CRM (pil web app) with the android contacts. not touching the other contacts on the phone.
<beneroth> just an idea. no definitive requirement yet.
<Regenaxer> A contact DB in PilBox?
<beneroth> would maybe be a better option (surely from security/surveillance angle)
<beneroth> another option would maybe be an interface (webdav?) on the server, instead of using a pilBox app. that would probably then also allow compatibility to iPhones etc.
<beneroth> these are the options, right?
<Regenaxer> I don't really understand the purpose
<Regenaxer> hmm, ok
<Regenaxer> I see
<Regenaxer> synchronise the contacts in the CRM
<beneroth> 1. Have a business contact with phone number on pil web app 2. copy/synchronise this data somehow on the phone 3. call the guy
<beneroth> 4. change some contact data on the phone 5. communicate that change to the pil web app
<beneroth> aye
<Regenaxer> I never thought much about the contacts in Android, as I use them only for WhatsApp
<beneroth> problem of most synchronisation software afaik is, that in facts one contact in android are technically stored as multiple contacts (and displayed as 1 in android), e.g. WhatsApp contact, other messenger contact, phone contact, phone contact stored on SIM card
<Regenaxer> yeah
<beneroth> in the business environment there will be existing contact data lying around in many different formats in many different software, which probably should be imported into any new central CRM
<beneroth> and surely there are also some employees which just want work with their iPhones, old windows phones, what not
<beneroth> ok, thanks :)
<Regenaxer> Hmm, I have no real idea ;)
<beneroth> so you agree, it should be possible to connect to this android contact interface via pilBox, or using a server interface this mainstream contact software supports. though better might be a dedicated pilBox app, so the data is not leaked and separated from prviate contacts on the phone etc.
<beneroth> but we don't have any experience on this topic around yet
<Regenaxer> yes, should surely be possible
<Regenaxer> We would need to look up the Android Contacts toolbox and call it
<Regenaxer> and just call stuff that's available there ;)
<beneroth> ah, good to know
<beneroth> ok
<beneroth> will not look into it now, but surely in the next months eventually
<Regenaxer> ok, just ask then
<beneroth> sure, thanks :)
<Regenaxer> :)
linus` has quit [Quit: leaving]
<beneroth> [it security] lol that was fast: HTML injection in Signal Messenger Desktop App: https://ivan.barreraoro.com.ar/signal-desktop-html-tag-injection/advisory/
<aw-> haha HTML email
<Regenaxer> Me too. Always off by default here
<aw-> i switched to Alpine just last week, i think Nistur is on emacs/gnus ?
<Regenaxer> I have to hit M to view them in external browser if absolutely necessary
<Regenaxer> Most of all I hate mails which are HTML-*only*
<aw-> yeah just delete them haha
<Nistur> aw-: yes
<Nistur> also
<Nistur> hello
<Nistur> I'm still here, still alive :P
<beneroth> hey aw-, Nistur :D
<Regenaxer> Hi Nistur!
<Nistur> I haven't forgotten about you lot, just been too busy to do anything fun :'(
<beneroth> btw. HTML injection is also the basic issue with the recent fuss about S/MIME and PGP insecurity
<Nistur> I saw thatt
<Nistur> some of the reporting was fear mongering
<Nistur> suggesting that PGP was broken
<beneroth> yeah
<beneroth> well email security is completely flawed anyway
<Regenaxer> and main stream media don't understand at all what they write
<beneroth> (header data is never encrypted. including subject. metadata is enough for USA to kill people)
<Regenaxer> T
<Regenaxer> We must use Briar instant messenger
<beneroth> haven't looked at it yet. how does it solve the scaling problem?
<Regenaxer> It uses Tor
<beneroth> ah right
<beneroth> ah right I did look at it and mention it here haha
<Regenaxer> better than nothing
<aw-> beneroth: yes i was referring to the PGP thing actually
<beneroth> aw-, alright :)
<beneroth> Regenaxer, right, I think I actually was the first who mentioned briar here. I forget to easy xD
<beneroth> (passwords are secure with me)
<aw-> theres Orbot for Android
<aw-> can put anything over Tor
<beneroth> well, how much can we trust Android
<beneroth> but yeah, better than not having Orbot :)
<aw-> beneroth: LineageOS here
<Regenaxer> We should get PilOS running on mobile devices
<aw-> actually it's funny, my phone has the exact same CPU as my desktop computer
<aw-> welcome to 2018
<beneroth> they will still get you with silent SMS, the baseband will answer without asking the OS for permission :(
<beneroth> aw-, :D
<aw-> beneroth: no SIM card
<beneroth> than its no phone
<aw-> also removed all cell/baseband apps
<Regenaxer> same here, my SIM card is in a 15-year old phone
<aw-> what is a phone?
<aw-> a device used to make phone calls
<beneroth> T
<aw-> name me one person who makes phone calls with their "smartphone"
<beneroth> me
<beneroth> (haven't replaced with feature phone yet)
<aw-> Regenaxer: same.. SIM in my 2011 galakei
<Regenaxer> :)
<aw-> beneroth: i like the idea of not having a SIM in my "phone", batt lasts 4 days on one charge
<Regenaxer> I use mine since 2002
<beneroth> I find 4 days is not much, when I remember my old nokia feature phone 10 years ago.
<Regenaxer> second battery still
<beneroth> we get used to sinking standards pretty quickly, too :(
<beneroth> I still have my first battery in my 2011 phone
<aw-> indeed
<aw-> i gotta run
<aw-> bbl
<beneroth> see ya!
<beneroth> have a good run!
<Regenaxer> cu!
aw- has quit [Quit: Leaving.]
<beneroth> Regenaxer, (apply onOff (list Var)) vs. (set Var (not (val Var)))
<Regenaxer> onOff does not evaluate the args, so it won't work this way
<Regenaxer> (onOff (NIL)) should be fine
<Regenaxer> eg as (de f () (onOff (NIL)))
<Regenaxer> Self-modifying function
<Regenaxer> For example, see in @lib/form.l
<Regenaxer> (de alternating ()
<Regenaxer> (onOff "rowF") )
<beneroth> nah its not about self-modifying, but about having a Var instead of Symbol. Quoted vs Evaluated
<beneroth> I went with (set Var (not (val Var)))
<Regenaxer> right
<Regenaxer> But why not (onOff Var) then? Why complicated with 'apply'?
<Regenaxer> (for the records: 'apply' is not applicable here as it works only withe evaluating functions)
<beneroth> (de foo (Var) (onOff Var)) (foo 'Bar) -> doesn't work
<beneroth> I wont to pass an unevaluated argument to onOff
<Regenaxer> exactly
<beneroth> a/wont/want
<beneroth> s/a/s
<beneroth> argh
<Regenaxer> onOff is for direct usage
<beneroth> yeah. how to do indirect usage, beside (set Var (not (val Var))) ?
<Regenaxer> Here (set ..) is the best (only?) way
<beneroth> ok :)
<beneroth> that was the question :)
<Regenaxer> Good :)
<beneroth> thanks for the review :) sorry for the bad wording
<Regenaxer> No problem. It is fair to expect an evaluating function here
<Regenaxer> we have (set 'X) <-> (off X) and (set 'X T) <-> (off X)
<beneroth> use case is a function which takes a flag variable and does multiple checks (looks at settings) if its toggled or not.
<beneroth> rather rare use case :)
<beneroth> aye!
<Regenaxer> oops, I mean (set 'X T) <-> (on X)
<Regenaxer> but you knew
<beneroth> yeah :)
<beneroth> Regenaxer, mapping functions: when a local function is to be used within the anonymous function in a map (e.g. filter, mapcar, etc), it's better to declare the local function outside the mapping, I guess? like (let foo '(() ...) (filter '(() ... (foo) ... ) List) instead of (filter '(() (let foo '(() ...) ... (foo) ...)) List) ?
<Regenaxer> Not at all, it would be just overhead
<Regenaxer> anonymous inline is fine
<beneroth> hm. right. on second thought, I can see that it doesn't make any difference.
<Regenaxer> hmm
<Regenaxer> Why the 'let' at all? Did I misunderstand?
<Regenaxer> you need (foo) repeatedly?
<beneroth> only within the mapped function
<Regenaxer> Then a global function is better
<beneroth> but multiple times within the mapped function
<Regenaxer> yes, but 'let' in each iteration takes a little
<Regenaxer> yeah
<Regenaxer> Not a big difference
<beneroth> so a let outside of the iteration would be better? that is the question ^^
<Regenaxer> yes
<Regenaxer> I thought no 'let' at all
<Regenaxer> just (de foo ... globally
<Regenaxer> but this depends
<beneroth> yeah the function is not needed anywhere else, so I don't want to intern it globally
<Regenaxer> Then you can make it local as (de "foo" ...
<Regenaxer> A let makes sense if the function changes all the time
<Regenaxer> Like 'gui' in 'form'
<beneroth> T
<beneroth> that is another use case
<Regenaxer> there we have (let gui ...
<Regenaxer> yeah
<beneroth> well here it is for a function used multiple times within the iteration, but nowhere else. a transient symbol would still be scoped globally, just not reachable, no?
<Regenaxer> The convention for globally visible but locally intended functions is (de _foo ..
<Regenaxer> Yes, so not *scoped* at all
<beneroth> my point is kinda I want it not to occupy cells when I don't use it anymore :)
<Regenaxer> Scope means "visibility"
<beneroth> hm. T. ok, what's the term for "not garbage collected" ? :D
<Regenaxer> The (let ..) takes more cells
<beneroth> good point!
<Regenaxer> "not garbage collected" ... hmm, persistent?
<beneroth> ok.. so.. a transient symbol is still persistent, right?
<Regenaxer> Only as long as all references from code exist
<Regenaxer> not from the symbol itself as in 'foo'
<Regenaxer> as 'foo' in interned and thus persistent
<beneroth> a (let) is not persistent when leaving the (let), though additional (cells) overhead might occur because the previous definition is backed up
<Regenaxer> "persistent" is not good, I use it for DB symbols ...
<beneroth> T
<Regenaxer> not because of back up
<Regenaxer> (let foo '(()) takes 5 cells
<Regenaxer> well, the 'let' takes 2 cells
<Regenaxer> 'foo' takes also 2
<Regenaxer> one for the symbol and one in the namespace
<beneroth> well ok, but without the (let) there must be a (de) or (setq) or such, so I guess it doesn't make a difference really?
<Regenaxer> or 2 in the namespace if not a leaf node
<Regenaxer> average 1.5 cells
<Regenaxer> no
<Regenaxer> (let foo '(() )
<Regenaxer> ah
<Regenaxer> here 'foo' is also interned btw
<beneroth> T
<Regenaxer> So it always takes 2 cells more for the let
<beneroth> I mean (let foo '(())) vs. (de "_foo" ())
<Regenaxer> The (let foo remains in the code
<beneroth> T
<Regenaxer> the de expression is gone
<beneroth> though in my case it's a one-shot scripts anyway ^^
<Regenaxer> hehe, we are trying to save each cell! Good attitude! :)
<Regenaxer> ah, ok
<Regenaxer> then the code is gone anyway
<beneroth> yep! a bit over the point, but good to be aware of what really happens
<Regenaxer> Then the 'let' outside the mapping is fine
<beneroth> aye! then (let) vs. (de "foo") is not much difference, is it?
<Regenaxer> right
<Regenaxer> (let foo interns the symbol
<Regenaxer> (let "foo" would not
<Regenaxer> but then (de "foo" ..) is faster
<beneroth> (de "foo") is better for code which should only be visible locally, but belongs to a piece which might be executed multiple times during the lifetime of its process
<beneroth> ah
<beneroth> so on my pretty edge case, (let) would probably save few cells, but (de) would run faster? ha!
<Regenaxer> Even better (though slower) is probably a little namespace
<Regenaxer> I think saving cells is not the big issue anyway, as iit is a once-through code
<beneroth> as it's a one-shot script and memory not the problem, I should better optimize for speed than space in this particular special case
<beneroth> T
<beneroth> so (de "foo") then :D
<Regenaxer> For speed definitely (de "foo" is best
<Regenaxer> yes
* beneroth learned some more. the discussion was worth it :)
<Regenaxer> yes, interesting
<beneroth> I just find it great that with picolisp we can actually have such discussions. in most stacks this would be completely pointless, as to many variables interfere to be able to say anything accurate at all
<beneroth> not that it does matter much here, this was an academic thing, but still ...
<Regenaxer> yeah, indeed
<sriram> In trying to understand pdfPage, I saw code like (<layout> (csslist) (div @ (pdfPage ..)) (div @ (pdfCanvas ...)))
<sriram> so <layout> was creating the page with two divs.
<Regenaxer> Unfortunately <layout> is not documented
<sriram> since I dont need the panel I was trying to remove the second div, but it did not work
<sriram> so it became clear I need to understand <layout>
<Regenaxer> The idea is that it arranges divs either right or below the current one
<sriram> but first, I was wondering what the @ in div @ ....means
<Regenaxer> It passes css styles bound in '@'
<Regenaxer> most notably position info
<sriram> (ah I was wondering if the stacking was achieved by css or by <layout>)
<Regenaxer> it is on-the-fly css
<sriram> (where do the css styles get bound to @, which function?)
<sriram> maybe <layout> does it?
<Regenaxer> it happens in (prog1
<Regenaxer> yes
<Regenaxer> (prog1 (if ...) (eval))
<sriram> ah yes...i see the comment @ --> '@'
<Regenaxer> There is a comment # -> '@'
<Regenaxer> yess :)
<sriram> i mean # -> '@'
<sriram> ok good...so I just need to understand <layout> then, it seems :)
<Regenaxer> <layout> code is rather involved
<Regenaxer> I would recommend to look at examples
<Regenaxer> and experiment with it
<Regenaxer> I do so too usually
<sriram> ok..sure...I was looking at it more from a code reading experiment because it uses recur and recurse, but will do as you
<sriram> suggest
<Regenaxer> first of all, if you call it as
<Regenaxer> (<layout> T
<Regenaxer> then all coordinates are in percentages
<Regenaxer> Just
<Regenaxer> (<layout>
<Regenaxer> is in pixels
<sriram> (one question though...doesnt the binding of @ inside <layout> affect any if statements inside it?
<Regenaxer> I think it is OK
<sriram> (ah thats what was puzzling me : (let P (and (=T (car "Lst")) (++ "Lst")))
<Regenaxer> yeah, exactly
<Regenaxer> it checks for the T
<sriram> (i knew P would be bound to T if that succeeded but did not see wht car of "Lst" would be T
<Regenaxer> As I said, the code is quite hard stuff
<Regenaxer> I short example, from PilBox:
<Regenaxer> (<layout> T
<Regenaxer> ((15 15 "display: table-cell; text-align: center;")
<Regenaxer> (<div> @
<Regenaxer> (<img>
<Regenaxer> ...
<Regenaxer> ((70 15 "center")
<Regenaxer> (<div> @
<Regenaxer> ...
<Regenaxer> ((0 0 'main)
<Regenaxer> ...
<Regenaxer> So this makes a 15% by 15% div on top left
<Regenaxer> it has the <img>
<Regenaxer> then 70 by 15 in the center
<Regenaxer> *below* is the main area
<Regenaxer> So the point is the nesting level
<sriram> yes
<Regenaxer> indentation
<sriram> as you say the use case is more easy to visualize what the code does
<Regenaxer> yeah
<Regenaxer> Simply going right *or* down each time
<Regenaxer> So you can easily make various layouts
<sriram> so if at same level, going right
<sriram> otherwise going down
<Regenaxer> no, same level goes down
<sriram> sort of like <grid>
<Regenaxer> yes, same philosophy
<Regenaxer> The above has ((15 15 and ((0 0 on the same level, ie main is below the first
<Regenaxer> ((70 15 is to the right of ((15 15
<sriram> (trying to look at pilBox code)
<Regenaxer> ok
<sriram> (because I cannot see where parens end above)
<Regenaxer> ok, and indentation might also not work in irc
<Regenaxer> I'm looking at projects/gen/run/App.l
<Regenaxer> in PilBox
<Regenaxer> ie the standard app
<sriram> ok..
<sriram> 1 sec
<sriram> hmm no projects folder
<sriram> (maybe must download pilBox
<Regenaxer> yes, the tgz
<Regenaxer> The full path in the TGZ is PilBox/projects/gen/run/App.l
<sriram> ah in business now :)
<sriram> looking at App.l
<Regenaxer> in business?
<sriram> i mean that able to proceed now :)
<Regenaxer> ah
<Regenaxer> misc/pdfPage.l is simpler
<Regenaxer> (<layout>
<Regenaxer> ((620 NIL "margin: 6px")
<Regenaxer> (<div> @
<Regenaxer> (pdfCanvas 'myPage) )
<Regenaxer> ((NIL 60 "margin: 12px")
<Regenaxer> (<div> @
<Regenaxer> a big left one
<Regenaxer> and a smaller right one
<Regenaxer> NIL means to take up the rest
<Regenaxer> 0 would be 100%
<sriram> so <layout> has one element ( (pdfCanvas) (pdfPanel) )
<sriram> so one column only
<Regenaxer> rather one line only
<sriram> ah yes
<sriram> one row
<Regenaxer> 620 is DX
<Regenaxer> yes
<sriram> within a row, it is left to right
<Regenaxer> yes
<sriram> width of canvas should be 620, height should be full page
<Regenaxer> The one in PilBox has a row 15x15, 70x15, 15x15 on top
<sriram> because no T, it is in pixels
<Regenaxer> exactly
<sriram> and the T is specified on a per-element basis?
<Regenaxer> In PilBox it is percent
<Regenaxer> no, for the whole layout
<sriram> does layout have to apply to whole page
<sriram> can we have two layouts one after another
<Regenaxer> <layout> keeps track of the summed-up coordinates
<Regenaxer> yes, PilBox nests them
<Regenaxer> The App.l has 3 <layout>s nested
<sriram> i mean subsequent, rather than one layout inside another
<Regenaxer> in 'menu'
<sriram> (nested)
<Regenaxer> no, because the recursion adds up the coordinates
<sriram> ok...but the inner layout can do differently if one wished..change from pixels to percentage if needed
<sriram> i dont think it makes sense to go the other way
<Regenaxer> I think the results are unpredictable then
<Regenaxer> even so it is tough
<Regenaxer> CSS is a mess
<beneroth> T xD
<Regenaxer> You never know where it refers to :)
<Regenaxer> the coordinates
<sriram> yes...one of the questions I was dealing with is how to make the canvas scale as the windows scale
<Regenaxer> Best with a percentage
<Regenaxer> As I said, I always end up experimenting :)
<sriram> but would the drawn rectangles scale too? not sure, must try
<sriram> :)
<sriram> so I think I understand <layout> well enough now
<Regenaxer> Hmm, the drawings are always in pixels I think
<Regenaxer> ok :)
<sriram> what I dont understand is I removed the pdfPanel because I dont need it (just need the canvas)
<sriram> (removed from layout, I mean, but now when I click on the canvas i cant make rectangle..so trying to find
<sriram> through traceAll...what happens when panel is present
<sriram> and i click on canvas
<sriram> but tons of output...
<Regenaxer> yeah
<sriram> so maybe just trace on the draw> etc may be better
<Regenaxer> The canvas may depend on the panel
<Regenaxer> They interact
<Regenaxer> Perhaps for the canvas itself start from one of the simpler demos
<Regenaxer> and just take the editing stuff from pdfPage
<sriram> yes I thought I could strip out pdfPage till only drawing stuff remains
<sriram> drawing rectangles
<Regenaxer> yes, and the arguments for the clickings
<sriram> you mean the mouse locations?
<Regenaxer> yes
<Regenaxer> drawCanvas arguments
<Regenaxer> and (dm draw> (Dly F X Y X2 Y2)
<sriram> yes... there is the pdfWin class too...the rectangle itself
<Regenaxer> These are the text windows, right?
<sriram> those are the drawn rectangles from what I could see
<Regenaxer> yes, and then they are filled with marked-up text from TinyMCE
<sriram> oh wait...the comment says Text or Image window
<Regenaxer> ah, yes
<sriram> (thats the rectangle?)
<Regenaxer> or images
<Regenaxer> or tint (colors)
<Regenaxer> Sorry, telephone
<sriram> yes...all these things I will specify statically
<sriram> (np :) )
orivej has joined #picolisp
orivej has quit [Ping timeout: 265 seconds]
orivej has joined #picolisp
mtsd has quit [Quit: Leaving]
<Regenaxer> ok
<sriram> able to do events such as click, drag...and by looking at the output of wc -l >logfile>
<sriram> wc -l <logfile> before and after, i can see the relevant portion of traceAll
<Regenaxer> great
<sriram> so now i am able to read the code, sort of, but piecing the underlying logic is harder
<sriram> for example, why must csDef "page" be invoked during the drag
<Regenaxer> hmm, I don't remember
<sriram> by the the change function is similar to <layout> perhaps? in its usefulness and widespread use...
<Regenaxer> it is a move
<Regenaxer> F is zero
<Regenaxer> cvs.csMv? -1 : 0 in drawCanvas call
<Regenaxer> I think csDef is needed because the whole background changes or so
<sriram> line 271 i think
<Regenaxer> case 17: // (csDef Key DX DY Lst), (csDef Key)
<sriram> (when (=0 F) (setq *CsMvX X *CsMvY Y) (csDef "page")
<Regenaxer> (when (=0 F) in pdfPage.l
<sriram> line 270
<Regenaxer> yes, I know
<Regenaxer> F is zero
<sriram> yes, because drag
<Regenaxer> from cvs.csMv? -1 : 0 in drawCanvas call
<sriram> (oh...looking that up)
<Regenaxer> I dont remember what cvs.pre is for exactly
<sriram> where is the cvs.csMv? -1 : 0 (in .js file?)
<Regenaxer> yes
<Regenaxer> I looked in lib/canvas.l and then lib/canvas.js
<sriram> by the way what are the drawCanvas calls -1 NIL NIL NIL NIL NIL NIL
<Regenaxer> iirc csDef defines a pre-rendered background
<sriram> that happens frequently
<sriram> (ah ok....not sure if that includes the grid dots)
<Regenaxer> I find another example which uses csDef a lot
<sriram> ok
<Regenaxer> not only backgrounds
<Regenaxer> any images can be pre-rendered
<Regenaxer> like sprites
<Regenaxer> And later drawn like (csDraw "page" 0 0)
<Regenaxer> ie a sprite named "page"
<sriram> the Lst in this case refers to pixels?
<Regenaxer> Which Lst?
<sriram> i see that csDrawDots only generates X Y positions
<sriram> i mean (csDef Key DX DY Lst)
<sriram> (reading up pre-rendering)
<Regenaxer> Lst is a list of drawing expressions
<sriram> yes...if just X Y it seems to be a pixel
<Regenaxer> I find such example:
<Regenaxer> (csDef "lines" 1200 800
<Regenaxer> (make
<Regenaxer> (do 100
<Regenaxer> (csStrokeLine
<Regenaxer> (rand 10 1190)
<Regenaxer> (rand 10 790)
<Regenaxer> (rand 10 1190)
<Regenaxer> (rand 10 790) ) ) ) )
<Regenaxer> (csDef "hello" 36 18
<Regenaxer> (make
<Regenaxer> (csStrokeRect 0 0 36 18)
<Regenaxer> (csFillText "hello" 6 12) ) )
<Regenaxer> (csDef "world" 40 18
<Regenaxer> (make
<Regenaxer> (csStrokeRect 0 0 40 18)
<Regenaxer> (csFillText "world" 6 12) ) ) )
<Regenaxer> and then using them:
<Regenaxer> (csDraw "lines" *PosX *PosY)
<Regenaxer> (csDraw "hello" (rand 1 560) (rand 1 420))
<Regenaxer> (csDraw "world" (rand 1 560) (rand 1 420))
jibanes has quit [Ping timeout: 255 seconds]
<Regenaxer> So csDef is to speed things up
<Regenaxer> Constant parts of the image, like sprites
<sriram> yes i found the reading about pre-rendering
<sriram> very useful for understanding the above
<sriram> attaching link if anyone else is interested or scans archives later
<Regenaxer> great
<Regenaxer> I can give you this example
<Regenaxer> moment
<sriram> so csDef basically draws to another canvas called "lines" in above example
<sriram> and that canvas is used by other draw calls, to draw on top
<Regenaxer> It does very fast animations
<Regenaxer> yes, exactly
<Regenaxer> a sub-canvas then
<Regenaxer> very powerful and fast
<sriram> yes
<sriram> (csDef "lines" 1200 800 ..)
<sriram> here 1200 x 800 is sub-canvas size?
<Regenaxer> yes
<Regenaxer> buf.width and buf.height
<sriram> ok...and this must be less than the size of the overall canvas
<Regenaxer> line 70 in canvas.js
<Regenaxer> I think it is clipped if larger
<sriram> oh but in the pastebin, canvas size is only 600 x 400
<sriram> ah
<sriram> (<canvas> "$work" 600 400)
<Regenaxer> It scrolls beneath
jibanes has joined #picolisp
<Regenaxer> Did you run it?
<sriram> so clipped or scrolling
<Regenaxer> Pressing the Run button
<sriram> oh sorry did not realize can be run
<Regenaxer> then the random lines are scrolled beneath
<Regenaxer> ok
<sriram> one sec..running
<sriram> (must be blind :( dont see run button...looking)
rob_w has quit [Remote host closed the connection]
<sriram> i mean i must be blind :)
<Regenaxer> bottom-right
<Regenaxer> Is the button hidden somehow?
<Regenaxer> When it runs, it flashes hello and world very fast in various places, while the lines scroll slowly beneath
<sriram> wondering if my browser
<Regenaxer> hmm
<sriram> one sec will see if i can open on my laptop
<sriram> reconnecting from there
<Regenaxer> It is the button at the end of the code:
<Regenaxer> (gui '(+OnClick +Button)
<Regenaxer> "return drawCanvas('$work', 40)"
<Regenaxer> "Run" ) ) ) ) )
sriram__ has joined #picolisp
<sriram__> Hi..trying on this browser
<Regenaxer> I started it here: https://7fach.info/8080
<Regenaxer> temporarily
<Regenaxer> Does this link work?
<Regenaxer> Run button?
<sriram> yes it does
<sriram> and the run button is not seen even in other browser
<Regenaxer> Probably slower
<Regenaxer> due to the distance to Canada
<sriram> there is a "text" panel...then there is a "Raw paste " panel
<sriram> then add... then the links to firefox, chrome etc..but no Run button
<Regenaxer> also not on 7fach.info?
<Regenaxer> Strange!
<sriram> no, on 7fach, the run button is there
<sriram> just next to the canvas
<Regenaxer> I connected with Chrome on my tablet
<Regenaxer> ah, ok
<sriram> but on paste bin..I see text window, then the Raw Paste Data
<Regenaxer> yes, bottom
<sriram> then an advt, then some links to chrome etc
<Regenaxer> ah, wrong start then
<Regenaxer> I did
<Regenaxer> $ ./pil misc/preRender.l +
<Regenaxer> preRender.l is the pastebin
<sriram> no your https://7fach.info/8080 is perfectly fine...I see the Run button
<sriram> just dont see it in the pastebin
<Regenaxer> in the code?
<Regenaxer> it is in line 44
<sriram> well the code has a bunch of buttons on top right (raw, download, etc)
<Regenaxer> The pastebin links
<sriram> (i think we are talking about different things :) )
<Regenaxer> yes, indeed :)
<sriram> I am just puzzled why I dont see a "Run" button in the pastebin window
<sriram> similar to jsfiddle etc
<Regenaxer> You mean so that pastebin runs the code? That would be nice! :)
<sriram> ah!!! so it is not there
<sriram> thats what I too thought
<sriram> because it is lisp
<beneroth> yeah pastebin is for arbitrary text
<Regenaxer> Can pastebin run anything?
<sriram> then I was wondering maybe you got it setup for PL similar to jsfiddle
<sriram> no I dont think so...I didnt expect it too
<Regenaxer> I don't know jsfiddle
<sriram> but got confused when you asked me to Run the code
<sriram> :)
<Regenaxer> ok :)
<sriram> jsfiddle allows to paste html, css, and js files
<sriram> I use to test output of picolisp
<beneroth> https://ideone.com/ supports picolisp (probably not all of it)
<sriram> ah nice
<beneroth> just use a real repl :)
<sriram> yes, is better :0
<sriram> :)
<Regenaxer> yep :)
<beneroth> implementing a web repl is quite hard stuff, security wise
<beneroth> if stuff on server, you must sandbox it. prohibit certain functions (e.g. I/O)
<Regenaxer> I usually view the source in pastebin in "Raw" mode in w3m
<sriram> i remember that question being asked in the archives before
<sriram> web repl
<beneroth> if its JS in the browser, you have to check the code for XSS attack
<Regenaxer> then just save it to a file with 'S'
<sriram> so good...the csDef was a useful branch (for me)
<Regenaxer> For me too, I had completely forgotten that it exists ;)
<beneroth> incomplete js implementation of picolisp :)
<beneroth> hmm
<beneroth> Regenaxer, what's your opinion on the trend that browser replaces OS ? I would guess you are more likely an opponent, but arguably your way of working profited a lot from it :)
<Regenaxer> both yes
<Regenaxer> I find browsers too complex to rely on them
<beneroth> My personal opinion is currently that it's adding turtles, another layer trying to emulate things we have another, much better tested layer for already
<beneroth> yeah, this
<Regenaxer> But to give software to users they are the easiest
<beneroth> also easiest to give them malware
<Regenaxer> T
libertas has quit [Remote host closed the connection]
<sriram> In that pastebin example, what does (csDraw "lines" *PosX *PosY) do?
<sriram> ctx.clearRect(cmd[2], cmd[3], buf.width, buf.height); ctx.drawImage(buf, cmd[2], cmd[3]);
<Regenaxer> It draws the "sprite", in this case the background of lines
<sriram> so basically ctx.clear(*PosX *PosY, buf.width, buf.height_
<sriram> then ctx.drawImage(buf, *PosX, *PosY)
<Regenaxer> yep
<Regenaxer> csDef defines images, and csDraw draws them rapidly
<sriram> for example when Dly < 0 (what does that correspond to btw)...i understand somehow it refers to initialization
<Regenaxer> The position is slightly modified each time,
<Regenaxer> (dec '*PosX *MovX)
<sriram> the three sprites are created
<sriram> and from then on they are drawn at different origins?
<sriram> *PosX and *PosY refers to their top-left coordinates perhaps (or maybe bottom right)
<sriram> ah i see...at initialization: (javascript NIL "onload=drawCanvas('$work', -9)")
<Regenaxer> yes
<sriram> and later on "return drawCanvas('$work', 40)"
<sriram> so that the code can tell if it is initially or on button click
<Regenaxer> a negative Dly is only in the beginning
<sriram> by looking at Dly
<Regenaxer> init
<Regenaxer> exactly! :)
<Regenaxer> the JS code also checks like if (dly == 0)
<Regenaxer> else if (dly > 0)
<sriram> dly==0 has special meaning? (< 0 => on load)
<sriram> I think this was very good progress for one day...I have troubled you enough for today also :)
<Regenaxer> I think for requestAnimationFrame()
<Regenaxer> no problem :)
<Regenaxer> I'm re-learning it too :)
<sriram> only to stop here...i must check my understanding on one point
<Regenaxer> Seems to be 4 years ago
<sriram> csDraw "canvas" X Y draws the sub-canvas in canvas at the origin X, Y location in main canvas?
<Regenaxer> ok, Masako calls, must go too ;)
<sriram> ah ok...sure
<sriram> bye...thanks a lot ! :)
<Regenaxer> yes, it places the image there
<sriram> ok great...thanks...gnite :)
<Regenaxer> the first arg is just a property name
<Regenaxer> :)
<sriram> yes...it refers to the sub-canvas
<Regenaxer> Have a nice afternoon!
<sriram> oh just 5pm there
<sriram> still morning here :)
<Regenaxer> right
<sriram> thought was supper time for you...have a nice evenig
<Regenaxer> Yes, but indeed supper
<Regenaxer> I try to eat before 18:00
<Regenaxer> Sleeping better if stomach is not so full
<sriram> yes....i sit down to my tea then :)
<Regenaxer> good :)
<sriram> i am poor sleeper in any case :)
<Regenaxer> oh
<sriram> maybe will try your way
<Regenaxer> yes, it helps
<sriram> but then i just feel hungry at 10
<Regenaxer> and no tea too late ;)
<Regenaxer> It is a matter of getting used to
<sriram> that is more important...( i meant generic tea :) )
<Regenaxer> ok
<sriram> (not actual tea..you are right if i drink "tea" then i cannot sleep for sure)
<Regenaxer> :)
<Regenaxer> ok, bbl
<sriram> bye
<Regenaxer> afp :)
pchrist has quit [Quit: leaving]
pchrist has joined #picolisp
sriram__ has quit [Quit: Page closed]
<Regenaxer> ret
<sriram> (dont want to pounce on you as soon as you return :), but had jotted down some questions...)
<Regenaxer> np :)
<sriram> i think i understand the pastebin example quite well now..but i dont see how it can work as far as *PosX, *PosY go
<sriram> (zero *PosX *PosY)
<sriram> (one *MovX *MovY)
<sriram> and later, at init time, (when (member (dec '*PosX *MovX) '(0 -600))
<sriram> that means PosX = -1
<Regenaxer> It checks for the boundaries
<sriram> and which is not a member of '(0 600) so *MoveX will not change
<Regenaxer> *MovX is one or minus one
<sriram> yes agreed...
<Regenaxer> it is negated
<sriram> but in this case, the first time, *PosX = -1, *MovX = 0 (unchanged)
<sriram> so how does the call (csDraw "lines" *PosX *PosY)
<sriram> work?
<Regenaxer> initially *MovX is 1
<Regenaxer> (one *MovX *MovY)
<sriram> sorry *PosX = -1, *MovX = 1 (unchanged)
<sriram> but how does the call (csDraw "lines" *PosX *PosY)
<sriram> work? essentially ( csDraw "lines" -1 -1)
<Regenaxer> hmm, yes, *PosX = -1
<sriram> which is an invalid offset? or
<sriram> just causes clipping...if the later, then all is ok :)
<sriram> latter
<Regenaxer> the offet is not a problem, it is clipped anyway
<Regenaxer> yes
<sriram> ok...and eventually *PosX becomes -600...and *MovX gets reversed
<Regenaxer> right
<sriram> and so on. I believe the update is done every 40 ms? "return drawCanvas('$work', 40)"
<Regenaxer> So the *PosX calc is all right
<Regenaxer> yes, 40 ms
<sriram> yes it is ...I was not sure if was ok to give negative args to the canvas drawing..but realize now that it just clips what is not visible
<Regenaxer> The negataive PosX is even necessary, as the image is bigger than the canvas
<Regenaxer> ok
<sriram> the other question I had was the html> method for PdfPage...when are such methods needed on a class?
<Regenaxer> it is used in @lib/http.l
<sriram> (oh, i thought even if *PosX > 0, clipping would work to throw away invisible portions?)
<Regenaxer> (apply try L 'html> (extern (ht:Pack @X T)))
<Regenaxer> It always clips
tankf33der has quit [Quit: Connection closed for inactivity]
<Regenaxer> The canvas just shows a part of the image
<Regenaxer> So html> can be defined for +Entity classes
<sriram> (so why is negative *PosX "necessary"...if 0 for example, the portions of image outside 800, 600 will be clipped anyway)
<Regenaxer> DX is 1200, so it is placed between -600 and 0
<Regenaxer> as the canvas also has 600
<Regenaxer> html> is called by the menu application
<Regenaxer> (out (pack Path Nm ".html") (html> 'menuPage Path))
<sriram> (reading pdfPage)
<Regenaxer> The menu source is not published, just for the idea
<sriram> np...ah that restaurant Menu you mean
<Regenaxer> Like in lib/http.l the html> method is a kind of hook to generate HTML from an object (here a +PdfPage)
<Regenaxer> yes
<sriram> ok...seems this method calls svg>, so svg> is the one that does all the work
<sriram> and is called either to generate html, or when pdf is to be generated
<Regenaxer> yes, in fact not exactly HTML, but SVG
<Regenaxer> not for PDF
<Regenaxer> This is generated with 'svgPdf'
<sriram> oh...may have been led astray by PdfFileButton calling svg>
<Regenaxer> from @lib/svg.l
<Regenaxer> yes, pdfFileButton is the place
<sriram> (url (svgPdf (tmp (: home page ttl) ".pdf") (svg> (: home page) "pt") ) ) ) )
<Regenaxer> It boils down to "rsvg-convert"
<sriram> here the svg> method of : home page i.e PdfPage is called
<Regenaxer> yes
<Regenaxer> html> is not used here
<sriram> so I assumed that svg> is commonly used in both cases
<Regenaxer> But eg. the web page of the restaurant program does
<Regenaxer> right
<sriram> (ah i meant svg> is the common function...used by html> as well as svgPdf)
<Regenaxer> all via SVG, to have the same output
<sriram> yes
<Regenaxer> a portable format :)
<sriram> yes...id like to say wow :) amazing how it all fits in place..
<sriram> as i am understanding it more
<Regenaxer> Glad to hear that :)
<beneroth> sriram, welcome to picolisp :)
<sriram> i should have said wow! :)
<beneroth> even with some experience you will still be repeatedly surprised how well the pieces fit - once one has grokked their function
<beneroth> :)
<Regenaxer> sriram is an *old* pil user
<sriram> beneroth> thanks...about two years now...and still toddler in Pil years
<beneroth> argh sorry ^^
<Regenaxer> We did in fact a project together a few years ago
<beneroth> wow cool! great
<beneroth> so he just proved my point? :D
<Regenaxer> And once met in München (Christmas)
<beneroth> oh nice
<beneroth> sriram, let me know when you come to south germany or switzerland next time :)
<Regenaxer> yes, you are right (as always)
<beneroth> I'm not always right. I just talk a lot, so it's likely I get some parts right sometimes ;)
<sriram> certainly...and vice versa..when you visit Canada...as I keep asking Regenaxer to do :)
<Regenaxer> hehe
<Regenaxer> yeah
<beneroth> sriram, deal!
<Regenaxer> Now as my daughter's boyfriend is Canadian :)
<Regenaxer> However seldom in Canada
<sriram> yes...my hopes are up indeed...that you will come now because of that
<Regenaxer> Currently they are both in Portugal
<beneroth> apparently Canadians are attracted to your offspring Regenaxer, both to spiritual and flesh ones
<Regenaxer> and normally live in Darmstadt (near Frankfurt)
<Regenaxer> beneroth, yep :)
<sriram> beneroth> The Pil attraction is very much there in my case :)...but i find that I have to keep at it and use it constantly to remember
<sriram> not sure if this is more or less than other languages, or its because of the differences with other languages
<beneroth> both I think
<beneroth> I'm still regularly amazed that the hope, that some change to a already "finished" application will not be too hard, turns out to be correct :)
<beneroth> (if this sentence is understandable... omg)
<sriram> normally I would cheer for the hockey result...but in present company, not... :)
<beneroth> Regenaxer, congrats ;)
<Regenaxer> for Ice hockey?
<beneroth> well if its something positive, the whole country was of course part of it! but if its negative, its just the particular directly involved people ;)
<Regenaxer> always :)
<Regenaxer> "success has many fathers" in German
<beneroth> Regenaxer, yeah. but I should congratulate you to the picolisp stack once more ;)
<beneroth> T
<beneroth> and mothers
<sriram> :) thats true
<Regenaxer> ah, ok, thanks! :)
<sriram> yes...i will add my voice to that as well!
<Regenaxer> :)
<sriram> and also for introducing to other (better) ways of doing things...Penti for instance
<sriram> and for making an emacs user learn more vi :)
<Regenaxer> haha, ok :)
<beneroth> 1. T 2. hm...
<beneroth> learning both vi and emacs is good, agreed.
<sriram> yes...i am not a diehard either way..each has their place
* beneroth prefers emacs with paredit for lisping. he likes vi for editing files - better for it than all other editors.
<beneroth> T
<beneroth> sriram, picolisp habits make you also program better in other languages (the old lisp saying)
<beneroth> at least so I observed on myself
<Regenaxer> I never managed to learn emacs. Used it for a few months only, and only viper mode
<beneroth> sriram, not necessarily the language constructs, but the habit of YAGNI and KISS which is so deeply part of Regenaxers work.
<beneroth> results in truly better maintainability
<beneroth> and better stability :)
<sriram> yes...(i have observed a little (infancy) in myself too...but yes, language constructs not so easy to transfer to say c++)
<sriram> YAGNI?
<beneroth> You Aint Gonna Need It
<sriram> ah thanks
<sriram> (google and beneoth :) )
<beneroth> leave away what you don't need NOW
<beneroth> yeah I got it from the c2 Wiki :)
<Regenaxer> Rooted in extreme programming
<beneroth> yeah c2 Wiki is the original first wiki on the web, home to extreme programming (previous iteration of the current agile fashion) and home to the concept of "design patterns"
alexshendi has joined #picolisp
<Regenaxer> I would not use the term, as "extreme" makes sense only to measurable values
<Regenaxer> extreme temperature
<beneroth> hm. I've never asked myself if Regenaxer is doing XP. good point. hm.
<Regenaxer> So I would rather say no
<Regenaxer> extreme programming sounds like 1000 lines per minute
<beneroth> "The methodology takes its name from the idea that the beneficial elements of traditional software engineering practices are taken to "extreme" levels."
<beneroth> so.. no real meaning, just buzzword marketing ;)
<Regenaxer> yeah :)
<Regenaxer> T
<sriram> I also stayed away from this movement because of that
<sriram> feeling
<beneroth> "it advocates frequent "releases" in short development cycles"
<Regenaxer> well, this is true for pil
<beneroth> "programming in pairs or doing extensive code review, unit testing of all code, avoiding programming of features until they are actually needed, a flat management structure, code simplicity and clarity, expecting changes in the customer's requirements "
<Regenaxer> almost a release per day
<Regenaxer> or every few days
<beneroth> this is also true, insofar when multiple picolispers are involved
<sriram> (do you use git internally for revision control, if i may ask)
<beneroth> I do
<Regenaxer> All that applies, just the name ...
<beneroth> Regenaxer has his own system
<sriram> oh...i use git and love it...was wondering what pil uses
<beneroth> he uses some bash and picolisp scripts, but locally works similar to git kinda (versioned backup)
<sriram> i remember asking that one time long ago
<Regenaxer> pil does not use git directly
<sriram> yes..diff based
<beneroth> I use git.
<sriram> i think?
<Regenaxer> sriram, right
<beneroth> kinda. not based on the tool "diff"
<beneroth> afaik
<Regenaxer> incremental snapshots
<Regenaxer> calls 'diff' too
<beneroth> ah right. right
<Regenaxer> between local files, and files in the snapshots
<beneroth> so based on 'diff', but not 'patch'
<Regenaxer> T
<Regenaxer> "programming in pairs" is also what we did many years
<Regenaxer> With Josef, but also with Srini
<Regenaxer> and recently with Vid
<beneroth> yeah 'pair programming' is good methodology
<Regenaxer> beneroth, btw, Vid showed up again
<sriram> (one thing that used to amaze me was how fast he would find the bug if in some internal lib..and how quick it was to deploy the fix)
<beneroth> Regenaxer, yeah?
<Regenaxer> We talked in WhatsApp, will continue the project
<beneroth> sriram, its nice that picolisp has not the "too many turtles" problem usually.. just the VM layer and the picolisp layer. and/or third party stuff. easy to go through.
<beneroth> Regenaxer, good :)
<Regenaxer> oh, some duties
<Regenaxer> sorry
<beneroth> Regenaxer, even if it goes slowly, introducing SAP instead would have probably not been quicker. and extremely more expensive :D
<sriram> beneroth yes> however for myself...i find myself trying to learn the different aspects (DB, GUI, Pilog, OS)
<Regenaxer> I will stop for today
<beneroth> cu Regenaxer !
<sriram> so even if no layers, lots of features
<beneroth> T
<Regenaxer> beneroth, exactly
<sriram> thanks, bye :)
<Regenaxer> bye, I let the client running anyway, look tomorrow :)
<beneroth> sriram, it needs some "kneeling-in" to get into a new subarea of picolisp universe. quite a hustle. but when the AHA enlightenments moments ("got it!") its pretty worth it
<sriram> yes....thats what I feel exactly..even on small achievements
<sriram> or understanding some pil code from rosetta
<beneroth> also most stuff can be learned quickly when one has overcome the fear and actually goes into it. I managed to learn most of pilog in like 2 nights when I had to :D
<beneroth> T
<sriram> oh thats wonderful!
<sriram> yes, thats why i am delving slow and deep into this pdfPage
<sriram> even if it takes time, learning lots on the way...with lots of help too :)
<beneroth> the biggest obstacle I find is previously learned concepts, resulting in wrong (and, in hindsight, irrational) assumptions
<sriram> yes..misunderstanding of when to apply quote also hinders me in writing...especially when inside form at second layer etc
<sriram> i mean to add '
<beneroth> I mean stuff which is true for other tech stacks but not necessarily make any sense with picolisp. because picolisp is just took such a different route - or, often, just took a step back and went more abstract (and simpler) then other implementations
<sriram> ahh...i did not find that much I think..because I mostly use c and c++ like languages
<beneroth> (the other implementations than added needlessly additional limits and requirements, which make sense when one sees their history, but actually not when looking at the bigger picture)
<beneroth> ok
<sriram> not counting scripting languages
<sriram> i experimented with some flavors of lisp before
<sriram> and also prolog
<beneroth> yeah C/C++ background helps a lot for learning software stuff in general, I found, because one can picture the underlying instructions
<sriram> but nothing kept drawing me back like pil.
<beneroth> my first language was C++, helped me a lot
<beneroth> hehe
<beneroth> good :D
<sriram> :) started with Pascal or perhaps Basic almost 30 years ago.
<sriram> but luckily reached c not too much later
<beneroth> ah, you're a veteran :) not a youngling like me
<sriram> i am a toddler...a pil toddler...:)
<beneroth> toddling never ends truly
<sriram> but the road is very enjoyable
<beneroth> yeah. I regularly program in picolisp and C# and SQL currently. pil is much more fun :)
<sriram> with surprises, and rewards. like no language i have encountered
<beneroth> T
<sriram> yes indeed..
<beneroth> and mostly good surprises! :D
<sriram> true...there have been some not so pleasant ones...and when i delved into..almost always my misunderstanding..so still good
<beneroth> same
<sriram> when i say not so pleasant, i mean unexpected
<sriram> so still valuable....eventually i hope to write this with the same ease i dash off
<sriram> a sed/awk/bash/perl/ script
<sriram> but long way to go yet
<sriram> nice talking with you...must get back to my pdfPage
<sriram> :)
<beneroth> thanks, I thank you :)
<sriram> bye now :)
sriram has quit [Quit: Page closed]
orivej has quit [Ping timeout: 265 seconds]
reed has joined #picolisp
<reed> Hi All. I'm trying to better understand how "task" works. If I have a joystick connected via usb, can I use task to monitor "/dev/input/js0"?
orivej has joined #picolisp
<beneroth> hi reed, welcome :)
<beneroth> this is certainly possible. see the reference for *Run, e.g. listening to a file pointer
<reed> HI Beneroth, I have been reading *Run and task documentation quite a bit and I still can't quite figure out how to get it to work
<beneroth> you could use (open "/dev/input/js0") to get a file pointer to work with
<reed> If I just wanted to print out the binary input, would prg be (pr (rd @))
<reed> Something like (setq js-fd (open "dev/input/js0")) followed by (task js-fd (pr (rd js-fd)))?
<beneroth> (pr) "prints" in "encoded format", meaning PLIO (picolisp IO binary format). that's not human-readable, but a binary format for communication between picolisp processes.
<reed> I see
<beneroth> try first to do it without task
<beneroth> make it work in the repl, and then you can move it into a task to have it run automatically in the background
<reed> Would I do that with "wait"?
<beneroth> (wait) is a bit comparable to (sleep) in other languages, but it also checks all installed tasks and executes the picolisp IPC (if you have multiple picolisp processes started by the same picolisp parent process)
<beneroth> maybe better (hear) ?
<beneroth> ah no
<beneroth> nonono
<beneroth> (hear) is only meant to be connected to pil processes
<beneroth> maybe something like (in "/dev/input/js0" (and (rd 1) (bin @))
<beneroth> (rd 1) - read one raw byte in big endian format
<beneroth> (rd -1) for reading one raw (not plio encoded) in little endian
<beneroth> (in "/dev/random" (and (rd 1) (bin @)))
<beneroth> -> "101100
<beneroth> (bin @) - print a number as a binary string. @ is given here as argument, its the result of the previous execution, stored there because we're in (and)
<beneroth> I hope this helps you a bit
<beneroth> I haven't much experience with (task)
<reed> Thanks, that's doing something!
<beneroth> what is your timezone? in about 8 to 10 hours Regenaxer will be active here again, he is the author of picolisp and will gladly help you :)
<reed> Pacific Standard Time
<beneroth> yeah not so much activity here during your main time. Regenaxer is in Germany. though the whole community is spread out all over the globe.
<beneroth> mailing list thread about serial communication
<reed> Thanks, this has definitely put me in the right direction
alexshendi has quit [Read error: Connection reset by peer]
<beneroth> so, I'm away now, too. good night o/
reed has quit [Quit: Page closed]