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 [Read error: Connection reset by peer]
karswell has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
aw- has joined #picolisp
alexshendi has joined #picolisp
alexshendi has quit [Ping timeout: 248 seconds]
<clacke[m]> is that Hintjens code gen stuff?
<cess11> clacke[m]: yeah.
<cess11> seems a bit clunky and sort of PHP:ish from the tutorial.
<aw-> ?
<cess11> a scripting-templating system for generating code and markup
<cess11> probably pretty nifty compared to some common web and c/c++/c# stacks and the 'model oriented programming' idea is in theory similar to the pil unified gui-oop approach.
alexshendi has joined #picolisp
<aw-> i see
orivej has quit [Ping timeout: 272 seconds]
<aw-> Regenaxer: here?
<Regenaxer> yep
<aw-> hi
<aw-> i'm trying to do something but i think i need a hint
<aw-> (case Myvar ...)
<aw-> how can i replace ... with a list of conditions?
<aw-> i tried something like (mapcar '((N) ("cond1" '(action1)) ("cond2" '(action2)))
<aw-> something like that..
<Regenaxer> Yes, this looks correct
<Regenaxer> Is there a problem?
<aw-> (case Myvar (mapcar '((N)) (N '(action1)) (list "cond1" "cond2"))
<aw-> doesn't work
<Regenaxer> right
<Regenaxer> The body is not evaluated
<Regenaxer> like all flow functions
<aw-> hmmm
<Regenaxer> You need something like (run (cdr (assoc (mapcar ...
<Regenaxer> But then direct evaluation is better
<aw-> (case Myvar `(mapcar .. ?
<Regenaxer> Why build a list with mapcar first just to search through it and throw away?
<Regenaxer> yes, a read-macro is fine
<Regenaxer> depends
<Regenaxer> Why not use 'cond' directly?
<aw-> hmmm...
<aw-> perhaps
<Regenaxer> (cond ((= 1 MyVar) (action1)) ((= "abc" MyVar) ...
<aw-> same problem
<aw-> the conditions are in a list
<Regenaxer> Which problem?
<aw-> they aren't defined directly
<aw-> i read them from external source
<Regenaxer> (cond ((member MyVar ...) ... ?
<Regenaxer> member, assoc etc.
<aw-> ohh interesting
<aw-> that's a different approach
viaken has quit [Ping timeout: 260 seconds]
<aw-> ok perfect!
<aw-> i'll do it with assoc
<aw-> thank you!
<Regenaxer> :)
alexshendi has quit [Ping timeout: 248 seconds]
<aw-> this language is too powerful
* aw- evil laugh
<Regenaxer> yess :)
groovy2shoes has quit [Ping timeout: 240 seconds]
alexshendi has joined #picolisp
<aw-> nite
aw- has quit [Quit: Leaving.]
groovy2shoes has joined #picolisp
orivej has joined #picolisp
<rick42> sup peeps
<rick42> anybody know a good csv processor based in pil? (i'll take any good, even non-pil-based, csv processor, but thought i'd start with pil :)
<rick42> thanks
<rick42> Regenaxer has probably written one heh
<Regenaxer> yes, wrote one once, but always only use TAB-separated CSV which is trivial to parse (split (line) "\t")
<Regenaxer> The one I have is complex, with GUI and texts in German
<Regenaxer> I can give you if you like to dig into it ;)
<rick42> can i turn in into a command line thingy (no gui) without too much trouble?
<rick42> but of course i'll take anything as is :)
<rick42> with great thanks
<Regenaxer> There *cannot* be much trouble, as it is in pil ;)
<Regenaxer> ok
<rick42> T
<Regenaxer> let me pastebin
<Regenaxer> hmm, *very* long, 173 lines
<rick42> hehehe
<Regenaxer> I don't remember well
<Regenaxer> you can throw out a lot of it
<Regenaxer> hmm, tough, it uses the database to remember the preferrences
<Regenaxer> in 'bulk'
<rick42> np. i can use anything as an example, and as a basis to learn more pil!!!
<rick42> many thanks!
<Regenaxer> and it immediately shows what it imported
<Regenaxer> So very confusing, hope it at least gives a hint
<rick42> and to learn some German :D
<Regenaxer> hehe, yes
<Regenaxer> The import itself starts in line 88, (in (list "/usr/bin/iconv"
<Regenaxer> and goes until 120
<rick42> Regenaxer: how does one start this? to see it in runtime
<rick42> must -- Undefined
<rick42> i'm missing some deps
<Regenaxer> it is the GUI
<Regenaxer> @lib/adm.l, @lib/form.l etc
<rick42> wow i'm must have forgotten a lot
<rick42> ok thanks
<Regenaxer> just use line 88 - 120
<rick42> ok
<Regenaxer> after that are validity checks, and import into the database
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
<Regenaxer> and before is setup of the parameters
<Regenaxer> charset, delimiters etc.
<Regenaxer> Everything (bulk ...) in line 88-120 is a config item, stored in DB, but modified in the GUI in the preceding lines
<rick42> ok thanks, Regenaxer. i'm going to go slow with this, read and consult the ref, re-learn and learn new things
<Regenaxer> For example, (bulk 'impFld) is from the values in
<Regenaxer> (de *ImpFld
<Regenaxer> ("{Tab}" . "^I")
<Regenaxer> ("{Leer}" . " ")
<Regenaxer> ("Komma (,)" . ",")
<Regenaxer> ("Semikolon (;)" . ";")
<Regenaxer> ("Doppelpunkt (:)" . ":") )
<Regenaxer> ok :)
<rick42> ok
<tankfeeder> i have a csv parser too
<tankfeeder> i think
<rick42> cool tankfeeder
<rick42> i'm not ashamed of stealing (uhem borrowing :)
<tankfeeder> ^^^ ini parser
<tankfeeder> let me know if works on your environment
<Regenaxer> cool tankfeeder, much simpler
<rick42> ini one look cool too
alexshendi has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
<cess11> Pil is great for exploring datasets interactively by the REPL. If it is normalized you can just suck it in and start writing messages.
<cess11> Usually I hack something up when need arises, from old snippets and new circumstances.
<rick42> cess11: thanks!
<rick42> "pil tinies" :)
<rick42> Huh. I never knew this, or forgot:
<rick42> : (== NIL "")
<rick42> -> T
orivej has quit [Ping timeout: 256 seconds]