beneroth changed the topic of #picolisp to: PicoLisp language | The scalpel of software development | Channel Log: https://libera.irclog.whitequark.org/picolisp | Check www.picolisp.com for more information
beneroth has joined #picolisp
razzy has joined #picolisp
hunar has joined #picolisp
hunar has quit [Quit: Client closed]
razzy has quit [Ping timeout: 256 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 252 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 256 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 252 seconds]
razzy has joined #picolisp
<razzy> hmm, i want to replace something in quote. (de foo (X) '(print "mine replacable X")) is curry best choice?
<Regenaxer> If you want to *build* a function, 'curry' is the easiest, yes. Just replacing something mighy be easier depending on the case.
hunar has joined #picolisp
<hunar> Hi everyone :) I saw the function permute somewhere, but when I (load "@lib/simul.l") then use it, it says permute -- Undefined
<Regenaxer> It is a separate namespace
<Regenaxer> (simul~permute ...
<Regenaxer> or (symbols '(simul pico)) (permute ...
<hunar> Aaaa :) thanks.. can I import the functions such that I don't need the namespace?
<Regenaxer> For example, chess uses (symbols '(chess simul pico))
<Regenaxer> yes, 'import' is also good
<Regenaxer> src/lib/llvm.l uses import a lot
razzy has quit [Ping timeout: 240 seconds]
razzy has joined #picolisp
<hunar> Aaaaa so that's what symbols do, I see it everywhere in other codes
<hunar> How should I use import , I did (load "@lib/simul.l") (import simul~permute) and it said "permute" -- Import conflict
<Regenaxer> You must already have created a symbol 'permute' in the current namespace (= pico), e.g. because you entered it in the reader
<hunar> Sorry, I didn't understand :/ I started a fresh pil then wrote those
<hunar> hunar@8000:~$ pil
<hunar> : (load "@lib/simul.l") (import simul~permute)
<hunar> "permute" -- Import conflict
<Regenaxer> You are right, it exists already:
<Regenaxer> $ ./pil +
<Regenaxer> : (what "permute")
<Regenaxer> -> (permute)
<Regenaxer> I think because of Pilog
<Regenaxer> : (show 'permute)
<Regenaxer> permute NIL
<Regenaxer> *Dbg (NIL (T 136 "lib/pilog.l" pico))
<Regenaxer> T ((((@X) (@X))) ((@L (@X . @Y)) (delete @X @L @D) (permute @D @Y)))
<Regenaxer> -> permute
<Regenaxer> So this is where the reader got it from
<hunar> Can I rename it? in python I could do from math import sqrt as sqt
<Regenaxer> yes, (def 'myPermute simul~permute)
<hunar> Cool :)
<hunar> So (symbols 'simul) would replace conflicting names without warning
<Regenaxer> No, it does not replace anything. I just changes the reader's search order
<Regenaxer> (symbols 'simul) would be bad btw
<Regenaxer> It cuts off 'pico'
<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
<Regenaxer> So even 'symbols' is no longer known
<Regenaxer> razzy: (in (pack ... passes a *symbol* to 'in'
<razzy> Regenaxer: i do not understand.
<razzy> can i fix it?
razzy has quit [Ping timeout: 256 seconds]
razzy has joined #picolisp
<razzy> solved it. but i do not know why it was not working and why it works now.
<hunar> It cuts off 'pico' Ah now I get the full picture :)
<razzy> eh, premature celebration.
<Regenaxer> razzy: (doc 'in)
razzy has quit [Ping timeout: 252 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 240 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 252 seconds]
razzy has joined #picolisp
cranium has joined #picolisp
razzy has quit [Ping timeout: 256 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 256 seconds]
hunar has quit [Quit: Client closed]
razzy has joined #picolisp
aw- has quit [Quit: Leaving.]
peterhil has quit [Ping timeout: 252 seconds]
razzy has quit [Ping timeout: 250 seconds]
cranium has quit [Quit: Leaving]