alexshendi has quit [Read error: Connection reset by peer]
aw- has joined #picolisp
<aw->
rick42: haha thanks, i'll be happy to write more if there's interest to cover certain topics
<aw->
oh man, is bene at 34C3? i'd love to go there.. maybe next year
orivej has joined #picolisp
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #picolisp
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
<aw->
hi all
<aw->
Regenaxer: if I (load "mylib.l") which contains something like: [de my-fun () ... ] ... is it "safe" to do test for my-fun with: (when my-fun ....) ?
<Regenaxer>
Hi aw-
<Regenaxer>
yes, you can test the value
<aw->
ok good
<aw->
because if i just run (my-fun) and it's not loaded, then it produces an error
<Regenaxer>
if you want to avoid loading multiple times, you can just write `my-fun
<aw->
same as eval?
<Regenaxer>
I mean to read NIL
<Regenaxer>
In the system you find often `*Dbg
<aw->
oh, it's running without debug loaded
<Regenaxer>
ie a read-macro returining NIL or not
<aw->
hmmm
<Regenaxer>
and NIL terminates (read)
<Regenaxer>
Or do you want to do (unless my-fun (load "my-lib.l?)) ?
<Regenaxer>
any method is fine
<Regenaxer>
Usually I don't worry and just load all always
<Regenaxer>
as it is so fast
<aw->
no
<aw->
i want to avoid doing (my-fun) if "my-lib.l" wasn't loaded
<Regenaxer>
Ok, yes
<Regenaxer>
or catch the error
<aw->
(when my-fun (my-fun)) # essentially
<Regenaxer>
(catch '("undefined") (my-fun))
<Regenaxer>
But yes, 'when' is more efficient here than 'catch'
<Regenaxer>
'catch' would be good if there may be many such functions
<aw->
right right
<Regenaxer>
btw, must be "Undefined" (upper case)
<aw->
ok thanks!
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #picolisp
<tankfeeder>
code for advent is rolling, several days left
<Regenaxer>
Which advent? For the orthodox Christmas on 9th of January?
<aw->
but it doesn't work when i copy it into mine
<Regenaxer>
Must be something in the setup
<aw->
must be..
<Regenaxer>
It does not echo then?
<Regenaxer>
looks like raw mode
<Regenaxer>
Probably because you call (key) before?
<aw->
ah
<aw->
yes
<aw->
i got it just as you typed it
<Regenaxer>
:)
<aw->
damnit
<Regenaxer>
You can call (raw NIL)
<aw->
yeah i confirmed with (raw)
<aw->
it output T
<aw->
ahhh i knew it was something weird going on
<aw->
thanks!
<Regenaxer>
:)
<Regenaxer>
And with (raw NIL) you can reset it after (key) or before (read)
orivej has quit [Remote host closed the connection]
<aw->
yes i set it after (key) to ensure it doesn't hit me again
<Regenaxer>
ok
rgrau has joined #picolisp
orivej has joined #picolisp
orivej has quit [Ping timeout: 268 seconds]
<aw->
Regenaxer: recently i was thinking about the pil documentation..
<aw->
(function ref)
<aw->
a few things: i'm wondering if we could generate a listing of each function with a simple 1-line description
<aw->
probably require a different set of docs for that
<aw->
ex: Mapping section, list of every function under 'Mapping' (sorted alphabetically), with 1-line underneath the function name
<aw->
when I look at the list of keywords: apply by cnt extract filter... it doesn't say enough, so i'm forced to click on each one, which leads me to the full description of the function
<aw->
makes it difficult to quickly scan everything that's available
<aw->
not sure if that makes sense
<aw->
what i'm thinking is something along the lines of like: mapping.html, which lists all the mapping functions and their description / usage
<aw->
that would probably be best for quickly scanning all the mapping functions (as you've categorized them)
<Regenaxer>
true
<Regenaxer>
But looks like a lot of work
<aw->
you use a script to generate the docs, right?
<Regenaxer>
make, and also to maintain
<Regenaxer>
no
<Regenaxer>
Written in Vip manually
<aw->
ohhhhh
<Regenaxer>
Extracting an meaningful line automatically sounds difficult
<aw->
well i guess we found a project for beneroth ;)