gildarts3 has quit [Remote host closed the connection]
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
<Regenaxer>
beneroth, this is a simple test btw for the above namespace printing issue:
<Regenaxer>
(local) foo
<Regenaxer>
(local) foo
<Regenaxer>
(symbols 'a 'pico)
<Regenaxer>
(msg '(foo pico-foo))
<beneroth>
T
<beneroth>
tough you mistakenly typed a - instead of a tilde ~
<beneroth>
aaand my issue is equal to my earlier example, not this one ;-)
<beneroth>
but nevermind
<beneroth>
my problem is can't (yet?) guarantee the search order being the same when the code was written and when its read. or that the search order does not change (introduction of new namespace).
<beneroth>
it's not an urgent problem for me. I will look into it.
<Regenaxer>
oh, right! Sorry, I did the test differently initially
<Regenaxer>
This one is better:
<Regenaxer>
(local) foo
<Regenaxer>
(symbols 'a 'pico)
<Regenaxer>
(zero foo)
<Regenaxer>
(local) foo
<Regenaxer>
(one foo)
<Regenaxer>
(let L '(foo pico~foo)
<Regenaxer>
(println L (mapcar val L)) )
<Regenaxer>
(bye)
<Regenaxer>
Prints (foo pico~foo) (1 0)
<Regenaxer>
The search order is very critical
<Regenaxer>
I have code meanwhile very thorougly crafted with (symbols '(...))
<Regenaxer>
But it allows to switch different applications to co-exist in one process
<Regenaxer>
I PilBox
orivej has quit [Ping timeout: 240 seconds]
<beneroth>
Regenaxer, yes, I see the use case and advantages
grp has joined #picolisp
<beneroth>
my usage would be to thematically split the code into modules, for programmer usability, but "modules" (so namespaces for this setup) in use may change over the live of an application all the time.
<beneroth>
maybe better to be solved with a simple prefix - at least for when the stuff is to be used mixed, not in separated transient scopes.
<Regenaxer>
A short complete example is software-lab.de/radio.zip
<Regenaxer>
Not sure. It took me some time to make me some rules
<Regenaxer>
ie in the lib (symbols 'lib1 'pico)
<beneroth>
what about adding another new namespace to such an existing app, how to do it without having to adapt code using any namespaced symbols?
<Regenaxer>
and in the app (symbols '(pico lib1 lib2 ..))
<beneroth>
I see
<Regenaxer>
I switch the order as needed, also within a source file
<Regenaxer>
And a lot of (local) calls uf course
<Regenaxer>
of
<beneroth>
your system is implement-wise (in the VM) simpler but conceptual-wise much more powerful and harder to use than common namespace-mechanics :)
<Regenaxer>
Maybe, I did not look at others
<Regenaxer>
Pils system is basically what Forth does
<beneroth>
therefore I tell you, so you can comprehend why we have a hard time with it :P
<Regenaxer>
'only' and 'also' words in Fort
<Regenaxer>
h
<beneroth>
I don't say you just change anything. at least not without having a actual proposal, which I don't have :)
<beneroth>
s/just/should
<beneroth>
you are a wonderful purist :)
<Regenaxer>
I think there is no better way. We are not dealing with definitions here, but symbols. Other systems don't do that
<beneroth>
that's true and a big aspect
<Regenaxer>
Not for purity, there is logically no other possibility
<beneroth>
by purity I mean you keep the logic in it :P
<Regenaxer>
ok
<beneroth>
not so much logic in common systems :P
<beneroth>
remember your oracle friends
<beneroth>
most stuff is like javascript: rushed design on one weekend, and then extended to make up for the initial basic logic flaws by adding additional logical flaws :)
<razzy>
nice :]
<beneroth>
the point is: thx Regenaxer. I will give it another try and report back to you.
<beneroth>
razzy, my wording?
<razzy>
beneroth: yes, your wording
<Regenaxer>
;)
<beneroth>
thx
<beneroth>
Regenaxer, sorry for being difficult :)
<Regenaxer>
Not difficult at all! Very helpful!
<beneroth>
Good!
<Regenaxer>
:)
<beneroth>
Regenaxer, style question: I have a bunch of pil scripts which contain (in "somepath/file" ...) expressions. now it happens that those scripts might get called as initially intended, but they might also be called in a environment where the filepath in the (in ...) requires an additional directory. now what: custom variant of (in), e.g. (my-in "somepath/somefile" ...) which does checks and adapts the path when necesary? or using (redef) ? could the (redef)
<beneroth>
be limited to the scope of the (script) ?
<beneroth>
oh I'm late
<beneroth>
I always come up with great questions when I'm late
<beneroth>
need to go. bbl :D
<Regenaxer>
sorry
<Regenaxer>
I would do (chdir "..." (load
<Regenaxer>
or (chdir .. (in ...
orivej has joined #picolisp
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
ubLIX has joined #picolisp
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
grp has quit [Quit: box shutting down...]
alexshendi has joined #picolisp
rob_w has quit [Read error: Connection reset by peer]
Evidlo16 has joined #picolisp
<beneroth>
Regenaxer, the point is, for some calls of these scripts no modification of the paths used within the scripts are necessary, and in some calls the paths used within the script within the (in)-call should be modified, but even in the cases when the (in)-path must be modified must the running directory not be changed (because of other paths)
<beneroth>
hmm. right now this sounds to me as calling for a parameter (or global) for the script which gets used as (in (pack *ContextDependentPrefix "somepath/somefile) ..) within the script. not changing (in) or running dir..
<beneroth>
yeah I guess that is the correct solution. will sleep over it and check out tomorrow :)
Evidlo16 has quit [Remote host closed the connection]