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
andyjpb has quit [Ping timeout: 268 seconds]
alexshendi has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
orivej has quit [Ping timeout: 240 seconds]
karswell has joined #picolisp
<aw-> hi all
<beneroth> hi aw- :)
<aw-> hey beneroth, up early?
<beneroth> 8 AM here :)
<Regenaxer> Hi aw-, beneroth
rob_w has joined #picolisp
<beneroth> Hi Regenaxer !
<aw-> cool
<beneroth> need to go, selling my brain for some money
<beneroth> have a nice day!
<beneroth> cu!
orivej has joined #picolisp
pchrist has quit [Quit: leaving]
pchrist has joined #picolisp
<Nistur> You can get money for that? I may have to do that, it's not doing me any good otherwise :)
rob_w has quit [Quit: Leaving]
<aw-> haha
karswell has quit [Read error: Connection reset by peer]
karswell has joined #picolisp
karswell has quit [Read error: Connection reset by peer]
karswell has joined #picolisp
karswell has quit [Ping timeout: 260 seconds]
karswell has joined #picolisp
karswell has quit [Read error: Connection reset by peer]
karswell has joined #picolisp
karswell has quit [Read error: Connection reset by peer]
libertas has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 260 seconds]
libertas has joined #picolisp
andyjpb has joined #picolisp
orivej has joined #picolisp
mtsd has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Ping timeout: 256 seconds]
mtsd has quit [Quit: Leaving]
refrijerator has joined #picolisp
<refrijerator> Hi all, I think I had read a HackerNews story a while ago (or maybe it was somewhere else), where somebody said he was writing an introduction to programming using picoLisp. Anyone know if this project really exists?
<Regenaxer> Hi refrijerator
<Regenaxer> Sorry, have not heard of such a project
<tankf33der> refrijerator: fake rumor
<refrijerator> I can't find the link right where I read it right now. Maybe it is still an incomplete work.
<refrijerator> In any case. Would you have an idea of how to go about teaching picoLisp to someone who is, say a junior Unix system admin with very little previous exposure to programming? Should one learn another programming language first and only learn picoLisp later? I mean, the two books on picoLisp are great, but not introductory material.
<Regenaxer> If he is a Unix admin, he knows some bash already. So next could well be PicoLisp
<Regenaxer> Such a course could start with some short practical stand-alone scripts
<Regenaxer> aka #!/usr/bin/picolisp instead of #!/bin/bash
<refrijerator> Ok, thanks for the suggestion. Perhaps it can be done, starting with the picoLisp reference, then.
<aw-> refrijerator: don't bother teaching another language, it will waste many years of valuable time for that dev until they finally end up back to Lisp and wonder why they wasted so many years on a non-lisp language
<aw-> the only good thing I got from learning other bad languages was the knowledge of what constitutes a bad language. I'm not sure how useful that is ;)
<refrijerator> Yes, that is also part of the question in this case. Which other language to teach first? It would be another lisp, for which such an introductory book exists.
orivej has joined #picolisp
<Regenaxer> Teaching two Lisps will be very confusing to the student
<Regenaxer> They are all quite different
<aw-> indeed
sriram_ has joined #picolisp
<sriram_> Hi..was wondering about the significance of "4" in pdfPage.l. For example, to check if cursor X,Y is on horiz line of a rectangle : (and (>= (+ (: x2) 4) X (- (: x) 4)) ....)
<Regenaxer> Ah, sriram_!
<sriram_> (have completed the emacs work i wanted..now ctrl-alt-r on a symbol in picolisp file opens up the documnetation in a browser, while ctrl-alt-t opens the function definition using ctags)
<Regenaxer> refrijerator asked if someone planned lessons in PicoLisp
<Regenaxer> Did you not plan such a thing?
<sriram_> Hi Regenaxer!
<sriram_> plan lessons? as in learning sessions with you?
<Regenaxer> Yes, I faintly remember
<Regenaxer> using embedded systems?
<Regenaxer> Give evining courses
<Regenaxer> evening
<sriram_> ah I see what you mean...yes exactly...I was planning to do so
<Regenaxer> refrijerator asked about such
<sriram_> I thought you meant lessons for learning Pil itself
<Regenaxer> well, that too
<Regenaxer> I thought so
<sriram_> yes that was part of my idea....but first I have to become proficient in PIl myself :)
<Regenaxer> :)
<Regenaxer> I think the 4 is to be able to click also very small areas
<sriram_> so I started trying to do so by writng a scrabble-like game so that i understand Pil DB and Pil gui
<sriram_> oh i see...if the rectangle is very small
<refrijerator> hello sriram_, have you publicly written about this intention of yours? Like on HackerNews or somewhere else?
<sriram_> no ...I have not..only discussed with Alex...and some basic work to make sure the site name I wanted was not taken
<refrijerator> ok, because I think I read something of the sort, but now I am starting to doubt if I am imagining things
<sriram_> only place I may have discussed is perhaps mail archive of Picolisp and even that likely not
<Regenaxer> yeah, perhaps only here in irc
<sriram_> (Regenaxer, if you remember, you helped me with serial line processing when I was working on that idea)
<Regenaxer> hmm, well possible ;)
<sriram_> :) i even wanted to setup up the course distribution etc thru pil...but as I said, I found that I needed to be much more proficient with it...so thats what I am engaged in..
<refrijerator> thanks goodbye for now
refrijerator has quit [Quit: Page closed]
<sriram_> Regenaxer, regarding the 4, it seems that if I click close to a rectangle, about 4 pixels away, the rectangle will be selected.
<sriram_> will test that out
<Regenaxer> yes
<sriram_> yes, verified with gimp...
<Regenaxer> great
<sriram_> trying to see now how the cursor changes when on a rectangle or not
<sriram_> maybe csCursor
<Regenaxer> yes
<Regenaxer> goes down to @lib/canvas.js
<sriram_> was wondering how the ruler is intended for use...i see that it converts pixels to physical units....
<Regenaxer> right
<Regenaxer> And to give some orientation on the page
<sriram_> orientation?
<Regenaxer> Find out where you are e.g. when zoomed in
<sriram_> ah ...i see..which quadrant etc
<Regenaxer> T
<sriram_> code is so compact...handles moving of ruler lines, cursor change when on ruler lines versus rectangle..etc..v. nice
<Regenaxer> glad to hear that :)
<sriram_> :)
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #picolisp
<sriram_> I understand that the draw> method of pdfPage is called by drawCanvas...but when does the html> method get called?
<sriram_> I mean draw method of +PdfPage
<Regenaxer> html> is not used in this example
<Regenaxer> But other applications use it to display the result in a browser
<sriram_> oh i did not realize....the html> method is defined for +PdfPage : (dm html> () (prinl "<?xml version=\"1.0\" encoding=\"utf-8\"?>") (svg> This "px") )
<sriram_> and is not used?
<sriram_> so I dont have to bother with svg> either, which is good, as it is quite complex
<Regenaxer> Both are used in some situations
<sriram_> oh i c..since they are in the library lib/pdfPage.l...but in this application, draw> alone is used
<Regenaxer> you mean the misc/pdfPage.l application?
<sriram_> yes
<Regenaxer> right
<Regenaxer> For example, the menu program does:
<Regenaxer> (gui '(+Rid +Able +Button) '(and (: home obj tmpl) (<> *Name "menu")) ,"Publi
<Regenaxer> '(ask ,"Publish Menu?"
<Regenaxer> (with (: home top 1 obj)
<Regenaxer> (load> 'menuPage (blob (: tmpl) 'lay))
<Regenaxer> (let (Path (pack "my/" *Name "/") Nm (fold (: nm)))
<Regenaxer> (call 'mkdir "-p" (pack "my/" *Name))
<Regenaxer> (svgPdf (pack Path Nm ".pdf") (svg> 'menuPage "pt"))
<Regenaxer> (out (pack Path Nm ".html") (html> 'menuPage Path)) ) ) ) )
<sriram_> so it allows generation of a pdf from menu designed
<Regenaxer> yes, and at the same time a HTML page
<Regenaxer> The user can link or include this page into his restaurant's home page
<sriram_> ah..that is convenient...i dont understand how the html method can simple call svg>, as the latter calls functions like window, rect etc defined in ps.l
<sriram_> ^simple^simply^
<Regenaxer> not in ps.l but svg.l
<sriram_> oh ...then my ctags file is not quite correct....i.e it cannot distinguish overloaded tags
<sriram_> (do you use a ctags file?)
<sriram_> (to press a key when on a symbol in a vi/vim/vip editor session and jump to the definition of it)
<Regenaxer> ctags is not needed
<Regenaxer> it handles it internally by itself
<Regenaxer> both vim and vip
<Regenaxer> So it seems you 'load'ed @lib/ps.l
<Regenaxer> there is also 'rect'
<sriram_> was trying to get same in emacs...through ctags....
<sriram_> yes window, rect etc
<sriram_> when i "clicked" on my symbol in emacs it took me to ps.l
<Regenaxer> right, ps.l and svg.l have roughly the same functions and behavior
<Regenaxer> I see
<Regenaxer> From within the repl?
<Regenaxer> : (em 'rect)
<sriram_> yes..somehow vim and vip magically will know to go to svg.l and not vip.l
<Regenaxer> not ps.l you mean?
<Regenaxer> Yes, because they directly use the debug properties stored with each symbol
<sriram_> (no...i have my emacs editor session, where i just opened pdfPage.l..and then when i press a special key sequence it takes me to the "definition" of that symbol
<sriram_> yes..not ps.l
<Regenaxer> ok, I see
<Regenaxer> then it cannot know which 'rect' is meant
<sriram_> i was basing it on hsarvells work, with modifications to suit my usage, but i already noted that it does not work with overloaded methods
<sriram_> e.g pdfPage.l has +PdfPage svg> and +PdfWin svg> and that gives trouble too
<sriram_> it is useful for non oop symbols like <layout>, <grid> etc
<sriram_> taking to their definitions very conveniently
<sriram_> so in my case....misc/pdfPage, the html> method is not used. the svg> method is likely used by the "PDF" button
<Regenaxer> ok
<Regenaxer> here for example (vi 'html> '+PdfPage) works fine
<sriram_> I will try deleting everything that is not reachable from draw> in lib/pdfPage.l (creating a new file of course) and can use that as my "minimal application" to draw rectangles on canvas
<Regenaxer> Better to use the life version, not static ctags files
<sriram_> yes you are correct....i was hoping to do within emacs
<Regenaxer> (em ..) does not work?
<sriram_> but i think better to use vi as more integrated with pil
<Regenaxer> I'm not sure how much 'em' is up to date
<sriram_> yes..thats why since you use it more extensively with pil, i think vi/vip/vim is better
<sriram_> so you recommend starting up the repl, and editing files from within repl?
<sriram_> or rather from command line...vi 'html> '+PdfPage
<Regenaxer> I do this from within the running application
<Regenaxer> $ ./pil misc/pdfPage.l -main -go +
<Regenaxer> :
<sriram_> I have done ./pil misc/pdfPage.l -main -go+
<sriram_> and then on connect I get the :
<Regenaxer> ok
<Regenaxer> exactly
<sriram_> so then I edit the file at the :
<Regenaxer> yes
<sriram_> but when session times out, the vi is also lost?
<Regenaxer> yes, but it won't time out unless you close the browser
<Regenaxer> and JS enabled
<sriram_> ok..I will try it this way (yes JS enabled)
<Regenaxer> sends <ping> every 2 mins or so
<Regenaxer> ok
<sriram_> i think this is better anyway for db symbols etc...as you showed using edit etc...so I will try to get into that mode....though I resisted for long :)
<Regenaxer> :)
<Regenaxer> BTW, if you include @lib/vip.l in the above command line, you get vip instead of vim
<sriram_> ah good to know....but i still like regexp....i must learn how to manage without ^, $, [...] etc and just use @ matching
<Regenaxer> ^ and $ work
<Regenaxer> but not [...]
<sriram_> oh good..because I use them a lot, sometimes \(..\) and \1 for substitution
<Regenaxer> ok, this is also not in vip
<sriram_> (have to go now to pick up my car from mechanic)
<Regenaxer> cause I never substitute from the command
<Regenaxer> good, see you!
<sriram_> (will try vip and ask you if i hit any blocks)
<sriram_> thanks!
<sriram_> see you
<Regenaxer> good :)
sriram_ has quit [Ping timeout: 260 seconds]
orivej has quit [Ping timeout: 256 seconds]
alexshendi has joined #picolisp
mtsd has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
mtsd has quit [Quit: Leaving]
orivej has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
f8l has quit [Remote host closed the connection]
f8l has joined #picolisp
f8l has quit [Read error: Connection reset by peer]
f8l has joined #picolisp