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
dtornabene has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
dtornabene has quit [Remote host closed the connection]
rick42 has quit [Ping timeout: 256 seconds]
karswell_ has joined #picolisp
karswell has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
mtsd has joined #picolisp
aw- has joined #picolisp
dtornabene has joined #picolisp
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
dtornabene has quit [Remote host closed the connection]
orivej has joined #picolisp
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
<Regenaxer> Oops, wrong key
<sriram_> Hi Regenaxer, I did not get a chance to clarify this yesterday (forgive my asking again, but I still do not understand)
<sriram_> In constructor for undo button in lib/form.l
<sriram_> I mentioned that I saw this (=: home undo This)
<Regenaxer> Hi sriram_!
<sriram_> now (:= ...) is the same as (put This ....)
<sriram_> is it not?
<Regenaxer> ok, yes, saw this question. Sorry I forgot
<Regenaxer> yes, (put This ...
<Regenaxer> unquoted
<Regenaxer> except the last arg
<sriram_> the undo button is created in the form
<sriram_> so the constructor is called right away
<Regenaxer> right
<sriram_> so then it seems like a circular ref to this : (put This home undo This)
<Regenaxer> this button is stored in the form under the 'undo' property
<sriram_> i mean to This
<Regenaxer> no, just the form points to This
<sriram_> oh the first This is the form
<sriram_> and the second This is the button
<Regenaxer> (: home undo) is the button then
<Regenaxer> eg. the redo button does (set> (: home undo)
<sriram_> yes that I was wondering about that as another question :)
<sriram_> set> takes two args
<Regenaxer> These two buttons send messages to each other
<Regenaxer> yes
<sriram_> (set> (:home undo) )
<sriram_> would set the undo button to nil?
<sriram_> NIL
<sriram_> (dm set> (Val Dn) (=: todo Val) )
<Regenaxer> yes, but this is not there, right?
<sriram_> only todoButton has a set> method
<sriram_> and if Val is not supplied, as in (set> (: home undo))
<sriram_> then Val is set to NIL?
<Regenaxer> yes, we have (set> (: home redo))
<Regenaxer> yep
<Regenaxer> omitted args are always NIL
<sriram_> yes...I explained to myself that it worked that way...so that part is clear
<sriram_> its just the (:= home undo This)
<Regenaxer> no
<sriram_> from what you say its like (put (: home undo) This)
<Regenaxer> We must send the set> message here
<Regenaxer> set> sets the contents of that component, the value
<Regenaxer> (set> (: home undo) NIL) would be the equivalent
<sriram_> yes ...(set> (:home redo) ) wil set the Val property of the redo button to NIL
<sriram_> is it not?
<sriram_> because the set> property of the parent todo button will be invoked
<Regenaxer> (put (: home undo) This) is not meaningful
<Regenaxer> (put (: home undo) 'foo This) would
<Regenaxer> (put (: home undo) This) uses the object This as a property key
<sriram_> ah so it is (put (: home) undo This)
<sriram_> where : home refers to the form
<Regenaxer> well, (put (: home) 'undo This)
<Regenaxer> yes
<Regenaxer> (put (: home) 'undo This) is the same as (=: home undo This)
<sriram_> I think thats where I was getting confused
<Regenaxer> :)
<sriram_> The : is described as "Fetches a value any from the properties of a symbol, or from a list, by applying the get algorithm to This and the following arguments"
<sriram_> so : apply get to This
<sriram_> but somehow it thinks that This is the form and not the This later on (i.e the button)
<Regenaxer> yes, (: home undo) is the same as (get This 'home 'und)
<Regenaxer> (get This 'home 'undo)
<sriram_> so we have (put (get This 'home) 'undo This)
<Regenaxer> (=: home undo foo bar 7) is (put (get This 'home 'foo) 'bar 7)
<sriram_> The home property of the button points to the form?\
<Regenaxer> no, (put (get This 'home 'undo 'foo) 'bar 7)
<sriram_> ?
<Regenaxer> *each* gui component has a 'home' property
<sriram_> that points to the form
<sriram_> ok so I understand it now
<Regenaxer> yes
<sriram_> by accessing the form and setting the 'undo property of the form to point back to the button
<sriram_> another double link similar to before
<Regenaxer> So (=: home undo foo bar 7) = (put (get This 'home 'undo 'foo) 'bar 7) = (put This 'home 'undo 'foo 'bar 7)
<sriram_> your last example is interesting
mtsd has quit [Quit: Leaving]
<sriram_> why does (:= home undo foo bar 7) not become (put (get This 'home 'undo 'foo 'bar) 7 )
<Regenaxer> no, this makes no sense
<Regenaxer> 7 would be a key
<Regenaxer> (get Obj 'key)
<Regenaxer> (put Obj 'key 'val)
<sriram_> oh I see..yes
<sriram_> ok good all is clear now :)
<Regenaxer> :)
<sriram_> +PdfPage has an html> method
<sriram_> but I could not see where it is called
<sriram_> (switching to the next question :) )
<Regenaxer> Moment, back later
<sriram_> is it automatically invoked somehow
<sriram_> np
<Regenaxer> ret
<Regenaxer> sorry again!
<Regenaxer> : (who 'html>)
<Regenaxer> -> (http (*Dbg . +PdfPage) jsForm pico)s
<Regenaxer> So it is 'http' or 'jsForm'
<Regenaxer> 'pico' is just the namespace, holds all symbols
<Regenaxer> 'who' could be more clever and ignore namespaces
karswell_ has quit [Read error: Connection reset by peer]
<sriram_> np at all!
<sriram_> (reading up who)
<sriram_> nice...beats my way of doing find . -name "*.l" -exec grep "html>" {} /dev/null \; :)
<sriram_> although i do have a shell alias for that
<Regenaxer> yes, me too
<Regenaxer> or grep -Rlw --include=.l 'html>'
<Regenaxer> I mean grep -Rlw --include='*.l' 'html>'
<Regenaxer> I use this pattern is neveral shell tools
<sriram_> ah i did not know about --include
<Regenaxer> is rather new perhaps
<sriram_> re the html>, when should it be defined?
<Regenaxer> before I also used the above 'find'
<sriram_> yes the grep alone is more efficient i think
<Regenaxer> you can define it for any class of objects which should be able to display themselves in the browser
<sriram_> from what i can see, the draw> method does not actually do any update, although it calls drawPage in a couple of places
<sriram_> it is really svg>, called through html> that is doing the work of displaying the canvas
<sriram_> with the updated properties
<Regenaxer> draw> should not do any SVG
<Regenaxer> it is only for HTML and PDF generation
<sriram_> i think the svg> method is reused for both html and pdf generation
<Regenaxer> right
<sriram_> when called from html> it produces its output via html
<Regenaxer> but not for Canvas drawing
<sriram_> oh interesting...because I was looking at the rectange and how the background color etc are updated
<sriram_> and that happens within svg>
<sriram_> draw>, drawPage, mk.svg, svg> and html> seem to be the methods i should be looking at
<Regenaxer> concerning mouse clicks, only draw> is relevant I think
<sriram_> yes, but i was also looking at how the rectangle color, text, font etc are used
<Regenaxer> (change ,"New box" ... or (change ,"Drag box" ...
<Regenaxer> ok
<sriram_> although i wont be changing them, but still i need to know how to draw a rectangle with those properties
<Regenaxer> BTW, you also got TinyMCE running all right?
<Regenaxer> I think it is needed here
<sriram_> I did...but did not do more with it....because I want to develop on my desktop first
<sriram_> and then view it there...is that not correct
<sriram_> ?
<Regenaxer> yes, good
<sriram_> i looked at ways of doing movable tiles with css and js..but i think the canvas way is best
<Regenaxer> You found the README at the end of @lib/tinymce.l ?
<Regenaxer> yes, right
<sriram_> oh hold on...i think
<sriram_> we are talking of different things
<sriram_> i was talking of the PilAndroid that you showed me the other day
<Regenaxer> yes, I just remembered tinymce
<sriram_> I never knew about TinyMce
<Regenaxer> It is used in pdfPage
<Regenaxer> (de pdfTextField (DX DY)
<Regenaxer> (<tinymce>)
<sriram_> yes I see it now
<Regenaxer> (gui '...
<sriram_> yes...
<Regenaxer> It is needed to generate marked-up text
<Regenaxer> fonts, sizes, colors etc
<sriram_> (loooking at ReadMe now)
<Regenaxer> You saw it probably in the BlitzMenu demo
<sriram_> oh i c...to apply user specified input styles to the generated page
<sriram_> do you think i need it?
<Regenaxer> Only for text
<Regenaxer> Did you see the video in BlitzMenu?
<sriram_> i just want to create a 20x20 grid, and a panel with say 10 letter tiles
<sriram_> and allow to move the letter tiles onto the grid
<sriram_> (yes I did see the video..the intro video)
<sriram_> we are talking about the restaurant menu now ? BlitzMenu?
<Regenaxer> yes
<Regenaxer> I think it shows also text handling
<Regenaxer> not important here then
<sriram_> no...i dont plan to allow much user config of styles
<Regenaxer> ok
<sriram_> just need db to track user scores etc
<sriram_> so in order to do this I will use pdfPage as a starting point
<sriram_> and take away things so I just have the canvas and the ability to click on tiles, drag them etc
<sriram_> thats why I was wondering whether I need svg>, html> etcc
<Regenaxer> T
<Regenaxer> all not needed
<Regenaxer> Thats why I said there is no simpler example
<sriram_> np...the example is good because it shows how the colors, fonts etc are used to update the rectangles
<sriram_> i just need to understand better the overall framework with html> etc being called from http, so that I dont remove something that is needed
<Regenaxer> Hmm, I just see that SVG is indeed used to draw into the canvas
<Regenaxer> forgot the details
<Regenaxer> (de drawPage ()
<Regenaxer> (inc (:: cnt))
<Regenaxer> (csDrawImage (sesId (pack "!mk.svg?" ...
<Regenaxer> Otherwise it would be hard to get the same display in Canvas and later PDF
<sriram_> I think that html>, svg>, mk.svg>, drawPage, draw> are all needed
<sriram_> ?
<Regenaxer> Yes, only html> perhaps not
<Regenaxer> You could (trace 'html> '+PdfPage) to see if it is called
<sriram_> oh nice...this is a very useful strategy
<Regenaxer> I'm not sure if it is needed atm
<sriram_> I could trace all the methods in the file
<sriram_> do some rectangle actions, and see which functions are used
<sriram_> from beginning to end
<Regenaxer> yes, or even (traceAll) but that gets too big perhaps
<sriram_> yes...i think there are not so many methods in lib/pdfPage.l
<sriram_> I could easily trace
<sriram_> only question is where do I put the trace calls
<sriram_> in misc/pdfPage?
<Regenaxer> I would not put into source
<sriram_> so that it is there from beginning?
<Regenaxer> Best in REPL history
<sriram_> because otherwise I miss some calls, when the page is loaded
<sriram_> but I get repl only on connect and by then the canvas is already created
<Regenaxer> (mapc trace '(foo bar (msg> . +Class) mumble ..))
<Regenaxer> ok, then a small file with this line passed on the command lini
<sriram_> yes
<Regenaxer> ./pil misc/pdfPage.l -main d.l -go +
<sriram_> here foo, bar, and mumble are the functions to be traced
<Regenaxer> d.l for debugging
<Regenaxer> yes
<sriram_> and msg> is one of the methods to be debugged
<Regenaxer> For a simple start you can do ./pil misc/pdfPage.l -main -traceAll -go +
<sriram_> ok will try with that. thanks this is wonderful! I should be able to quickly determine
<sriram_> what I need to keep/remove
<Regenaxer> traceAll outputs too much sometimes
<Regenaxer> but good to find the place of a crash :)
<sriram_> yes...i was thinking how i would identify all the methods/functions in a file (with pil)
<sriram_> i know how to do with grep or sed i think
<sriram_> by searching for dm or de
<Regenaxer> 'traceAll' does such identifying of methods/functions
<Regenaxer> Some heuristics
<Regenaxer> like "+" for classes
<Regenaxer> It goes throug all current namespaces
<sriram_> but in addition to identifying it also adds trace
<sriram_> i was just trying to see if i could find in a specific file
<Regenaxer> I would either traceAll or trace interesting things manually
<sriram_> sure I will try with traceAll first
libertas has quit [Quit: Lost terminal]
<sriram_> if too much output I will do the manual way
<Regenaxer> OK
<Regenaxer> There is no "untraceAll", so just terminate the program
<sriram_> thanks (have enough to be going on for now) :)
<sriram_> ok
<Regenaxer> great!
<Regenaxer> I also have some duties and will be away a while
<Regenaxer> afp
alexshendi has quit [Ping timeout: 240 seconds]
aw- has quit [Quit: Leaving.]
<sriram_> traceAll indeed has lots of output shown up on repl...was wondering if there was a way to redirect to file
<sriram_> ( out "xx" (traceAll)) does not work...and did not expect it to
<Regenaxer> ret
<Regenaxer> Trace goes to stderr
<Regenaxer> and (traceAll) itself does not output any trace info
<Regenaxer> you can do ./pil misc/pdfPage.l -main -traceAll -go + 2>logfile
<sriram_> ah..good thanks..
pchrist has quit [Remote host closed the connection]
alexshendi has joined #picolisp
alexshendi has quit [Ping timeout: 248 seconds]
crasch has joined #picolisp
crasch has left #picolisp [#picolisp]
chatbun has joined #picolisp
<chatbun> join #hubzilla
chatbun has left #picolisp [#picolisp]
rgrau has quit [*.net *.split]
rgrau has joined #picolisp
darithorn has joined #picolisp