01:37
karswell has quit [Read error: Connection reset by peer]
01:38
karswell has joined #picolisp
01:43
alexshendi has quit [Read error: Connection reset by peer]
03:27
aw- has joined #picolisp
05:51
alexshendi has joined #picolisp
06:53
alexshendi has quit [Ping timeout: 248 seconds]
08:13
<
clacke[m] >
is that Hintjens code gen stuff?
08:20
<
cess11 >
clacke[m]: yeah.
08:28
<
cess11 >
seems a bit clunky and sort of PHP:ish from the tutorial.
08:44
<
cess11 >
a scripting-templating system for generating code and markup
08:52
<
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.
08:52
alexshendi has joined #picolisp
09:03
orivej has quit [Ping timeout: 272 seconds]
10:45
<
aw- >
Regenaxer: here?
10:51
<
aw- >
i'm trying to do something but i think i need a hint
10:51
<
aw- >
(case Myvar ...)
10:52
<
aw- >
how can i replace ... with a list of conditions?
10:52
<
aw- >
i tried something like (mapcar '((N) ("cond1" '(action1)) ("cond2" '(action2)))
10:53
<
aw- >
something like that..
10:54
<
Regenaxer >
Yes, this looks correct
10:54
<
Regenaxer >
Is there a problem?
10:59
<
aw- >
(case Myvar (mapcar '((N)) (N '(action1)) (list "cond1" "cond2"))
11:01
<
Regenaxer >
The body is not evaluated
11:01
<
Regenaxer >
like all flow functions
11:01
<
Regenaxer >
You need something like (run (cdr (assoc (mapcar ...
11:01
<
Regenaxer >
But then direct evaluation is better
11:02
<
aw- >
(case Myvar `(mapcar .. ?
11:02
<
Regenaxer >
Why build a list with mapcar first just to search through it and throw away?
11:02
<
Regenaxer >
yes, a read-macro is fine
11:02
<
Regenaxer >
depends
11:03
<
Regenaxer >
Why not use 'cond' directly?
11:04
<
Regenaxer >
(cond ((= 1 MyVar) (action1)) ((= "abc" MyVar) ...
11:05
<
aw- >
the conditions are in a list
11:05
<
Regenaxer >
Which problem?
11:05
<
aw- >
they aren't defined directly
11:05
<
aw- >
i read them from external source
11:05
<
Regenaxer >
(cond ((member MyVar ...) ... ?
11:06
<
Regenaxer >
member, assoc etc.
11:06
<
aw- >
ohh interesting
11:06
<
aw- >
that's a different approach
11:07
viaken has quit [Ping timeout: 260 seconds]
11:10
<
aw- >
i'll do it with assoc
11:34
alexshendi has quit [Ping timeout: 248 seconds]
11:40
<
aw- >
this language is too powerful
11:52
<
Regenaxer >
yess :)
12:26
groovy2shoes has quit [Ping timeout: 240 seconds]
13:16
alexshendi has joined #picolisp
14:45
aw- has quit [Quit: Leaving.]
16:05
groovy2shoes has joined #picolisp
17:10
orivej has joined #picolisp
17:42
<
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 :)
17:42
<
rick42 >
Regenaxer has probably written one heh
17:43
<
Regenaxer >
yes, wrote one once, but always only use TAB-separated CSV which is trivial to parse (split (line) "\t")
17:46
<
Regenaxer >
The one I have is complex, with GUI and texts in German
17:46
<
Regenaxer >
I can give you if you like to dig into it ;)
17:47
<
rick42 >
can i turn in into a command line thingy (no gui) without too much trouble?
17:48
<
rick42 >
but of course i'll take anything as is :)
17:48
<
rick42 >
with great thanks
17:48
<
Regenaxer >
There
*cannot* be much trouble, as it is in pil ;)
17:48
<
Regenaxer >
let me pastebin
17:49
<
Regenaxer >
hmm,
*very* long, 173 lines
17:49
<
Regenaxer >
I don't remember well
17:50
<
Regenaxer >
you can throw out a lot of it
17:51
<
Regenaxer >
hmm, tough, it uses the database to remember the preferrences
17:51
<
Regenaxer >
in 'bulk'
17:51
<
rick42 >
np. i can use anything as an example, and as a basis to learn more pil!!!
17:51
<
rick42 >
many thanks!
17:52
<
Regenaxer >
and it immediately shows what it imported
17:52
<
Regenaxer >
So very confusing, hope it at least gives a hint
17:52
<
rick42 >
and to learn some German :D
17:53
<
Regenaxer >
hehe, yes
17:54
<
Regenaxer >
The import itself starts in line 88, (in (list "/usr/bin/iconv"
17:54
<
Regenaxer >
and goes until 120
17:55
<
rick42 >
Regenaxer: how does one start this? to see it in runtime
17:55
<
rick42 >
must -- Undefined
17:55
<
rick42 >
i'm missing some deps
17:55
<
Regenaxer >
it is the GUI
17:55
<
Regenaxer >
@lib/adm.l, @lib/form.l etc
17:55
<
rick42 >
wow i'm must have forgotten a lot
17:56
<
Regenaxer >
just use line 88 - 120
17:56
<
Regenaxer >
after that are validity checks, and import into the database
17:56
Regenaxer has left #picolisp [#picolisp]
17:57
Regenaxer has joined #picolisp
17:57
<
Regenaxer >
and before is setup of the parameters
17:57
<
Regenaxer >
charset, delimiters etc.
17:59
<
Regenaxer >
Everything (bulk ...) in line 88-120 is a config item, stored in DB, but modified in the GUI in the preceding lines
18:01
<
rick42 >
ok thanks, Regenaxer. i'm going to go slow with this, read and consult the ref, re-learn and learn new things
18:01
<
Regenaxer >
For example, (bulk 'impFld) is from the values in
18:01
<
Regenaxer >
(de *ImpFld
18:01
<
Regenaxer >
("{Tab}" . "^I")
18:01
<
Regenaxer >
("{Leer}" . " ")
18:01
<
Regenaxer >
("Komma (,)" . ",")
18:01
<
Regenaxer >
("Semikolon (;)" . ";")
18:01
<
Regenaxer >
("Doppelpunkt (:)" . ":") )
18:04
<
tankfeeder >
i have a csv parser too
18:04
<
tankfeeder >
i think
18:04
<
rick42 >
cool tankfeeder
18:05
<
rick42 >
i'm not ashamed of stealing (uhem borrowing :)
18:06
<
tankfeeder >
^^^ ini parser
18:06
<
tankfeeder >
let me know if works on your environment
18:06
<
Regenaxer >
cool tankfeeder, much simpler
18:09
<
rick42 >
ini one look cool too
18:31
alexshendi has quit [Read error: Connection reset by peer]
18:50
alexshendi has joined #picolisp
19:18
<
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.
19:21
<
cess11 >
Usually I hack something up when need arises, from old snippets and new circumstances.
19:56
<
rick42 >
cess11: thanks!
19:57
<
rick42 >
"pil tinies" :)
20:26
<
rick42 >
Huh. I never knew this, or forgot:
20:26
<
rick42 >
: (== NIL "")
22:05
orivej has quit [Ping timeout: 256 seconds]