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
viaken has quit [Ping timeout: 256 seconds]
freemint has joined #picolisp
trui has joined #picolisp
alexshendi has joined #picolisp
orivej has joined #picolisp
trui has quit [Quit: WeeChat 2.1]
orivej has quit [Ping timeout: 260 seconds]
cilz has joined #picolisp
<cilz> good morning guys
<beneroth> Good morning all
<beneroth> hi cilz :)
<beneroth> [off-topic] someone using Drupal ? (web framework): https://www.drupal.org/sa-core-2018-002
<cilz> hello Beneroth
<Regenaxer> Hi cilz, beneroth
<beneroth> Guten Morgen Regenaxer :)
<cilz> Hello Regenaxer
<cilz> beneroth, my only drupal based is offline ;-) and I don't plan to put it back online any time soon!
<cilz> drupal is powerful but too complex for my needs
<beneroth> better do not - else upgrade it to the most recent version.
<beneroth> it's a remote code execution. apparently, it's not absolutely easy to take over your site, but possible with a combination of things. dunno, the details are not explained.
<beneroth> they're too much ashamed probably.
<beneroth> dunno, I've never did much with drupal, but it looked to me that it was too complex to be good.
<cilz> I started with it back around 2005 or 2006
<cilz> It was less complex
<cilz> and quite powerful
<cilz> now it has become resources hungry
<cilz> and you need a powerful host to run it
<cilz> it's oversized for my needs...
<beneroth> well I guess they approached every missing feature and every issue with: lets have another layer :)
<cilz> yep
<cilz> there are tons of modules
<cilz> my last project with it used nearly one hundred modules and now it's impossible to update it!
<cilz> I'm studying the "family" example and wondering if there somewhere some documentation about (panel) found in the (person) function?
<cilz> I can see what it does but don't understand how it works
<beneroth> you should try out node.js. there, a hello world alone consists of hundreds of modules. they make a new module for single functions.
<cilz> :)
<beneroth> it's an epic train wreck. every half to 1 year their main repository, NPM, has some epic problems threatening to compromise all node.js installations (because usually they just copy and execute stuff from NPM... perfect target to distribute malware)
<beneroth> and they don't learn from their mistakes. maybe because they just don't know what they're doing. or don't care. dunno, it's weird.
<beneroth> btw
<Regenaxer> cilz, I'm afraid there is no docs for 'panel'
<beneroth> "Our cybersecurity operations center detected a limited intrusion of malware " .. so you have a cybersecurity unit, but you didn't update your windows machines?
<cilz> Regenaxer, any tips on how it works?
<beneroth> Regenaxer, panel?
<beneroth> context?
<Regenaxer> yeah, it is a quite overloaded function
<Regenaxer> a factorization of what turned out to be in every page
<beneroth> which lib
<beneroth> form.l ?
<Regenaxer> yes
<Regenaxer> Usually, even 'panel' is not used, but the higher-level 'idForm'
<cilz> For example, how would I do what the "select" button in (panel) does?
<Regenaxer> Family is a bit outdated perhaps
<beneroth> panel (Able Txt Del Dlg Var Cls Hook Msg Exe . Prg)
<Regenaxer> I recommend to look at app/
<Regenaxer> This button pops up a search dialog
<Regenaxer> the 'Dlg' argument
<beneroth> interesting. its to build a line/piece of a form, with entries which could be 1 or multiple?
<Regenaxer> In family it is '(choPerson)
<Regenaxer> beneroth: line/piece ?
<beneroth> forget it. my wording is weird.
<beneroth> I need to go anyway :(
<Regenaxer> See you later then : en
<Regenaxer> ;)
<cilz> bye
<beneroth> yeah, in the evening or tomorrow or so :)
<beneroth> have a nice day guys!
<cilz> thanks, you too
<Regenaxer> you too!
<Regenaxer> So 'panel' is a standard setup of components needed on typical DB pages
<Regenaxer> As I said, perhaps it is best to experiment with $ ./pil app/main.l lib/too.l -main -go +
<Regenaxer> It is more complete, and up-to-date
<Regenaxer> (though family is not wrong)
<cilz> ok, will look at it too
<Regenaxer> (menu ,"Customer/Supplier"
<Regenaxer> (idForm ,"Customer/Supplier" '(choCuSu) 'nr '+CuSu T '(may Delete)
<Regenaxer> '((: nr) " -- " (: nm))
<Regenaxer> (<hr>)
<Regenaxer> a typical header
<cilz> ok, thanks
<Regenaxer> 'nr '+CuSu is used for the << -- >> links to step through this class
<cilz> ok
<cilz> I see
<Regenaxer> T and '(may Delete) are to enable the whole form and the delete button
<Regenaxer> And the list '((: nr) " -- " (: nm)) formats the title of the page
<cilz> thanks
<Regenaxer> You can just copy the 'idForm' call an replace the first four arguments
<Regenaxer> :)
<cilz> Also, in family you use <grid> with "--.-.-." instead of say "5" what do those "--.-.-." mean?
<Regenaxer> The length of the string is also the number of columns
<Regenaxer> - and . give the alignment
<Regenaxer> - is "left" and . is "right"
<cilz> Eureka!
<Regenaxer> You can also pass a list of
<Regenaxer> CSS classes
<cilz> ok thanks!
<cilz> is there any doc for that?
<Regenaxer> hmm, seems not ;)
<cilz> ;-)
<Regenaxer> there is doc/form/, but it explains mainly the GUI classes
<Regenaxer> not the HTML functions
<cilz> yes I have it in front of me :)
<Regenaxer> ok
<Regenaxer> As you may know, it is two sources: @lib/xhtml.l -> @lib/form.l
<Regenaxer> @lib/xhtml.l works on its own
<Regenaxer> and @lib/form.l is based on it
<cilz> ok, I will look at them
<Regenaxer> plus @lib/form.js and @lib.css
<cilz> thnaks a lot
<Regenaxer> @lib/form.js can be ignored for now
<cilz> ok
<Regenaxer> it is used automatically, only to speed things up
<Regenaxer> and do some gimmic like Hint popups etc
<Regenaxer> The app works fully without JS
<cilz> that's a good point
<Regenaxer> yeah, I found that important
<cilz> me too!
<Regenaxer> also without CSS and cookies
<cilz> no cookie is a very good point in the upcoming GDPR context...
<Regenaxer> yes
<cilz> and anyway "less is better"...
<Regenaxer> :)
<cilz> Regenaxer, thanks for answering me
<Regenaxer> Welcome as ever! :)
<cilz> :)
mario-go` is now known as mario-goulart
alexshendi has quit [Ping timeout: 248 seconds]
<cilz> off topic, for those french speaking people interested by AI a live conference with AI experts at the "College de France" https://www.aiforhumanity.fr/
cilz has quit [Ping timeout: 276 seconds]
aw- has joined #picolisp
<aw-> hi all
cilz has joined #picolisp
aw- has quit [Ping timeout: 240 seconds]
rob_w has joined #picolisp
mtsd has joined #picolisp
aw- has joined #picolisp
<freemint> Good Morning
<freemint> Hi has anybody a s-expr parser which does not execute read macros?
mtsd has quit [Quit: Leaving]
<Regenaxer> freemint, you could perhaps remove "`" and "~" in a filter
<Regenaxer> perhaps "'" too?
<freemint> (read) reads from StdInput , i am not sure how i can filter the standard input
<Regenaxer> (read) reads from the "current input channel", not necessarily stdin
<Regenaxer> only (in NIL (read)) reads from stdin
<freemint> T
<freemint> I thougth in sets the StdIN
<freemint> (in *Socket (read))
<Regenaxer> yes, but technically it is not stdin, as stdin is a Unix concept
<freemint> I am not sure how to properly sanatize that ofther than writing a tokenizer, then a parser
<Regenaxer> PicoLisp maintains its own channels
<freemint> and this is something i would like not to dp
<Regenaxer> yeah, a stand-alone parser is not so difficult
<Regenaxer> you could pre-process with (read "")
<Regenaxer> to get a list of tokens
<Regenaxer> Then these are easy to analyze
<freemint> does read still do ` then?
<Regenaxer> Not in this mode iirc
<Regenaxer> it only parses numbers and symbols
<freemint> so it treats ` like a symbol?
<Regenaxer> "(" and ")" are returned as symbols too
<freemint> good
<Regenaxer> I think so, don't remember well at the moment
<freemint> i just tried both
<Regenaxer> But read-macros would not make sense here
<freemint> so i just have to write a machinery to parse it
<Regenaxer> yes, recursing on "("
<Regenaxer> You can perhap look at the code in src/io.c for some ideas
<Regenaxer> or ersatz/sys.src in Java
<freemint> i got a problem with adm.l too
<freemint> I am doing (obj ((+User) nm "guest") pw `(passwd "guest") role `(db 'nm +Role "Guest") )
<freemint> But guest looks like:
<freemint> {17} (+User)
<freemint> ca 737088
<freemint> new
<freemint> nm "guest"
<freemint> pw {20}
<Regenaxer> you mean the 'pw'?
<Regenaxer> it is OK, a +Swap object
<freemint> and i define guest as (obj ((+Role) nm "Guest") perm (Join Account Login))
<Regenaxer> good
<freemint> but (db 'nm +Role "Guest") is empty so the +User has no role
<Regenaxer> cause of the read macro, the role is defined before, right?
<Regenaxer> a quote is missing
<freemint> yes
<freemint> '+Role?
<Regenaxer> before +Role
<Regenaxer> yep
<Regenaxer> Otherwise it looks good
<freemint> i really need a better editor then nano
<Regenaxer> I use Vip
<freemint> a little syntax highlighting would realy help
<Regenaxer> Hmm, I don't like highlighting
<Regenaxer> Vip only highlights comments and strings
<Regenaxer> But it knows all about PicoLisp syntax
<Regenaxer> and handles indentation
<Regenaxer> I'm using vip for everything except non-UTF files
<freemint> should i use '(in *Socket ) on the highest level it makes sense or should in '(in *Socket each time i want to write something
<freemint> (in *Socket (loop
<freemint> or (loop (in *Socket
<Regenaxer> 'in' is for reading
<Regenaxer> it does not matter much to do many small ones
<freemint> ok
<Regenaxer> for 'out' you should know that it 'flush'es each time
<Regenaxer> May be desired or not, depends
<freemint> what style would you approve?
<Regenaxer> depends
<freemint> on what?
<Regenaxer> on a socket the data are only sent physically with a 'flush'
<Regenaxer> on a file too, so relevant if other processes wait for the data
<Regenaxer> or a pipe
<Regenaxer> and each call is more overhead, so less is better
<Regenaxer> With "file" I mean a number here, an fd openened before
<Regenaxer> (out "file" behaves different of course, truncates the contents if any
alexshendi has joined #picolisp
orivej has joined #picolisp
<freemint> Regenaxer, It works other than "" -> NIL and (num?) -> (num ? )
<Regenaxer> Hmm, what works?
<Regenaxer> or not?
aw- has quit [Quit: Leaving.]
<tankf33der> i want try vip
<tankf33der> dont feel the power to start
<Regenaxer> Have you used vim/vi ?
<tankf33der> exhausted, too much picolisp in my life :)
<tankf33der> vim only, yea
<Regenaxer> haha, true :)
<freemint> Regenaxer, my code has one bug. namely "" get's returned as NIL and Picolisp has a bug, namely (read "") of num? is num the ? is handled as extra symbol
<freemint> *"bug"
<Regenaxer> "" *is* NIL
<freemint> ah
<Regenaxer> it is the empty string
<freemint> then only picolisp has bug
<Regenaxer> "num the ? is handled as" you mean the unary minus?
<Regenaxer> What bug?
<Regenaxer> the "?" is of course not part of default symbol names
<freemint> Yeah
<Regenaxer> you must call (read "_") to get C-style identifiers
<freemint> ahh
<Regenaxer> and here (read "_?")
<Regenaxer> and other chars
<Regenaxer> depends on what syntax you want
<freemint> the good thing is that i do not need to fix that ... since i decide how the language look that get's parsed
<Regenaxer> yes, you decide
<freemint> *my understanding of picolisp has a bug
<Regenaxer> understanding the 'read' function?
<freemint> yes
<freemint> Also i just learned that (a) and (a NIL) have a very different meaning which obvious in hindsight
<Regenaxer> One drawback is that it accepts only single-char comments
<Regenaxer> yes
<Regenaxer> (a . NIL) would be the same
<Regenaxer> as (a)
<freemint> comments? commets will be sexpr of course
<Regenaxer> I mean the second arg to 'read'
<Regenaxer> (read "_" "#")
<Regenaxer> unix comments
<freemint> (in my language)
<Regenaxer> Some Lisps use ";" or "%"
<Regenaxer> How is a sexpr a comment?
<freemint> (gleich ( 1 2 3) (1 2 (# als näxchstes 3) 3) -> T
<freemint> (the plan for my language)
<Regenaxer> ah, ok. Cool
<Regenaxer> This style of comment is not handled by 'read' anyway
<Regenaxer> only till EOL
<Regenaxer> ie very simple comments only
<freemint> The nice thing is ... my style of comments is handles Multiline comments gracouisly and the comment can be extractedby the parser and f.e. stored with the function it last saw
<Regenaxer> T
<freemint> Yeah but the (++++) = (+ + + +) with read is annoying me a bit
<freemint> not sure how to work around that since (plus 3 (mal 4 5) (hoch 8 8)) kinda sucks
<Regenaxer> all chars not part of the identifier charset are delimiters
<Regenaxer> single-char
<Regenaxer> read cannot know what is intended
<Regenaxer> it only takes care to parse numbers, identifiers and other chars
<Regenaxer> The rest can be easily handled
<Regenaxer> eg "-1" gives ("-" 1)
<Regenaxer> cause - can be unary or binary etc.
<Regenaxer> @lib/json.l is an example how to handle signed numbers
<Regenaxer> 'readJson'
<Regenaxer> must go, afp
viaken has joined #picolisp
<Regenaxer> ret
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
freemint has quit [Ping timeout: 240 seconds]
tankf33der has quit [Quit: Connection closed for inactivity]
Regenaxer has left #picolisp [#picolisp]
freemint has joined #picolisp
Regenaxer has joined #picolisp
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
karswell has quit [Ping timeout: 256 seconds]
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
<freemint> Regenaxer, Is there a reason why you decided for (define function (arguments) ... ] and not for (define (function arguements) ... ]
<Regenaxer> Two reasons. One was that I was used to it (used Portable Standard Lisp from the Rand Corporation at that time)
<Regenaxer> The other is that it is more efficient
<Regenaxer> just set the CDR
<Regenaxer> and you can do also (de *GlobalList a b c), equivalent to (setq *GlobalList '(a b c))
<Regenaxer> So: A lot of advantages :)
<freemint> ok ...
<Regenaxer> BTW, not 'define'
<freemint> I knoww
<Regenaxer> 'de' does not "define" in fact
<Regenaxer> not really
<freemint> Are there other informed design decision (than quote) i should be aware when i wrote my own Picolisp incompatible lisp in Picolisp?
<Regenaxer> Probably yes
<Regenaxer> It depends how your Lisp should be alike
<Regenaxer> Just start, and ask as needed
<freemint> I am going down the moo route a little again
<Regenaxer> moo?
<freemint> Multi user dungen Object Oriented.
<Regenaxer> ah, yes
<freemint> recalled?
<Regenaxer> yep
<Regenaxer> Good project
<freemint> My idea was to attach an own eval function to different classes of things.
<freemint> There would be guest which have an eval shell on which they can register or login or learn more
<Regenaxer> Why not dynamic methods (OOP)?
<freemint> Because i want user to be able to combine commands and built new ones
<Regenaxer> ok
<freemint> I would also give some objects on shell
<freemint> Some objects than have permission (and the necessary bindings) to talk
<freemint> others might query the internet and parse websites
<freemint> I can keep a persistent scope in the database
<Regenaxer> yep
<freemint> An idea would be that bored people could implement idle animations (running from room to room) or have there accounts do things when they are not online
<freemint> afk
freemint has quit [Ping timeout: 240 seconds]
cilz has quit [Ping timeout: 256 seconds]
tankf33der has joined #picolisp
orivej has quit [Ping timeout: 245 seconds]
nonlinear has quit [Remote host closed the connection]
karswell has joined #picolisp
rob_w has quit [Read error: Connection reset by peer]