06:59
beneroth has joined #picolisp
06:59
razzy has joined #picolisp
07:32
hunar has joined #picolisp
07:39
hunar has quit [Quit: Client closed]
07:57
razzy has quit [Ping timeout: 256 seconds]
08:15
razzy has joined #picolisp
08:22
razzy has quit [Ping timeout: 252 seconds]
08:24
razzy has joined #picolisp
08:30
razzy has quit [Ping timeout: 256 seconds]
08:31
razzy has joined #picolisp
08:44
razzy has quit [Ping timeout: 252 seconds]
08:46
razzy has joined #picolisp
08:55
<
razzy >
hmm, i want to replace something in quote. (de foo (X) '(print "mine replacable X")) is curry best choice?
08:57
<
Regenaxer >
If you want to
*build* a function, 'curry' is the easiest, yes. Just replacing something mighy be easier depending on the case.
09:17
hunar has joined #picolisp
09:19
<
hunar >
Hi everyone :) I saw the function permute somewhere, but when I (load "@lib/simul.l") then use it, it says permute -- Undefined
09:20
<
Regenaxer >
It is a separate namespace
09:20
<
Regenaxer >
(simul~permute ...
09:20
<
Regenaxer >
or (symbols '(simul pico)) (permute ...
09:21
<
hunar >
Aaaa :) thanks.. can I import the functions such that I don't need the namespace?
09:21
<
Regenaxer >
For example, chess uses (symbols '(chess simul pico))
09:22
<
Regenaxer >
yes, 'import' is also good
09:24
<
Regenaxer >
src/lib/llvm.l uses import a lot
09:26
razzy has quit [Ping timeout: 240 seconds]
09:28
razzy has joined #picolisp
09:28
<
hunar >
Aaaaa so that's what symbols do, I see it everywhere in other codes
09:32
<
hunar >
How should I use import , I did (load "@lib/simul.l") (import simul~permute) and it said "permute" -- Import conflict
09:34
<
Regenaxer >
You must already have created a symbol 'permute' in the current namespace (= pico), e.g. because you entered it in the reader
09:36
<
hunar >
Sorry, I didn't understand :/ I started a fresh pil then wrote those
09:36
<
hunar >
hunar@8000:~$ pil
09:36
<
hunar >
: (load "@lib/simul.l") (import simul~permute)
09:36
<
hunar >
"permute" -- Import conflict
09:38
<
Regenaxer >
You are right, it exists already:
09:38
<
Regenaxer >
$ ./pil +
09:38
<
Regenaxer >
: (what "permute")
09:38
<
Regenaxer >
-> (permute)
09:38
<
Regenaxer >
I think because of Pilog
09:39
<
Regenaxer >
: (show 'permute)
09:39
<
Regenaxer >
permute NIL
09:39
<
Regenaxer >
*Dbg (NIL (T 136 "lib/pilog.l" pico))
09:39
<
Regenaxer >
T ((((@X) (@X))) ((@L (@X . @Y)) (delete @X @L @D) (permute @D @Y)))
09:39
<
Regenaxer >
-> permute
09:39
<
Regenaxer >
So this is where the reader got it from
09:39
<
hunar >
Can I rename it? in python I could do from math import sqrt as sqt
09:40
<
Regenaxer >
yes, (def 'myPermute simul~permute)
09:42
<
hunar >
So (symbols 'simul) would replace conflicting names without warning
09:42
<
Regenaxer >
No, it does not replace anything. I just changes the reader's search order
09:43
<
Regenaxer >
(symbols 'simul) would be bad btw
09:43
<
Regenaxer >
It cuts off 'pico'
09:43
<
razzy >
hmm, this works (in '("sh" "-c" "cat .pilrc") (while (read) (print @] and this does not (in (pack "sh " "-c " "cat .pilrc") (while (read) (print @] i do not know why :D
09:43
<
Regenaxer >
So even 'symbols' is no longer known
09:44
<
Regenaxer >
razzy: (in (pack ... passes a
*symbol* to 'in'
09:49
<
razzy >
Regenaxer: i do not understand.
09:51
<
razzy >
can i fix it?
10:00
razzy has quit [Ping timeout: 256 seconds]
10:02
razzy has joined #picolisp
10:08
<
razzy >
solved it. but i do not know why it was not working and why it works now.
10:12
<
hunar >
It cuts off 'pico' Ah now I get the full picture :)
10:27
<
razzy >
eh, premature celebration.
10:30
<
Regenaxer >
razzy: (doc 'in)
10:39
razzy has quit [Ping timeout: 252 seconds]
10:51
razzy has joined #picolisp
10:55
razzy has quit [Ping timeout: 240 seconds]
11:24
razzy has joined #picolisp
11:36
razzy has quit [Ping timeout: 252 seconds]
11:44
razzy has joined #picolisp
11:45
cranium has joined #picolisp
12:54
razzy has quit [Ping timeout: 256 seconds]
13:07
razzy has joined #picolisp
13:12
razzy has quit [Ping timeout: 256 seconds]
13:23
hunar has quit [Quit: Client closed]
14:41
razzy has joined #picolisp
16:41
aw- has quit [Quit: Leaving.]
17:02
peterhil has quit [Ping timeout: 252 seconds]
17:35
razzy has quit [Ping timeout: 250 seconds]
20:00
cranium has quit [Quit: Leaving]