ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: | Check also for more information
orivej has joined #picolisp
<razzy> i think printer does not. only (read) knows. but by statistics i should be wrong
<Regenaxer> Good morning jcowan, razzy
<Regenaxer> Both 'read' and 'print' (and also 'rd', 'pr' etc.) know it because they look up the symbol in the namespaces
<Regenaxer> They *need* to know
<jcowan> thanks
<Regenaxer> :)
rob_w has joined #picolisp
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
<razzy> oj, i shoot myself in the foot so hard
<razzy> by not understanding namespaces
<Regenaxer> What was the misunderstanding?
<razzy> obvious when you think about it :]
<razzy> i did not think about it
<Regenaxer> ok :)
<razzy> my current thoughts: if i want "root" namespace with less functions than pico has, i need to make copy of pico , delete links from there, and than make (symbols 'my-space 'less-of-pico)
<Regenaxer> Perhaps not copy, just 'import' what you want
<razzy> btw, i tracked down my mistake. by thinking that my-space:(all) gives all symbols from my-space.
<razzy> and than 5h of pointless work followed
<Regenaxer> :)
<razzy> import can work only from inside namespace, yes?
<Regenaxer> Yes, imports into current namespace
<Regenaxer> It is just a frontend to 'intern'
<razzy> i do not get how it could be frontend.
<Regenaxer> (pp 'import) or (vi 'import)
<Regenaxer> Basically (intern Sym T)
<Regenaxer> 'intern' (or its internal code) are the only way to get a symbol into a namespace
<razzy> reading it
beneroth has joined #picolisp
<Regenaxer> and 'zap' is the only way to get it out
<beneroth> hi all
<Regenaxer> Hi beneroth
<razzy> hm, Regenaxer i do not understand why i have undentified symbol on last line
<razzy> i am expecting all sorts of problems, because i could be missing many subsymbols of (symbols)
freemint has joined #picolisp
<Regenaxer> (symbols 'ml 'myroot) does not have 'pico' in the search
<razzy> yes, that is my point
<Regenaxer> 'read' creates a new symbol if it does not find it
<Regenaxer> You must import 'pico' too
<razzy> without pico it will not work?
<Regenaxer> What works?
<razzy> even if i imported big chunk of pico?
<Regenaxer> That's fine too
<Regenaxer> but other symbols in 'pico' are not found
<Regenaxer> (symbols 'ml 'myroot) then 'pico~set' looks for 'pico', does not find, and thus creates a new symbol 'pico'
<Regenaxer> You don't need to import 'import' btw
<Regenaxer> in (import pico~import pico~symbols)
<Regenaxer> also, (import foo bar ...) is enough
<Regenaxer> pico~foo is only needed if 'foo' is overshadowed or not in the direct search order
<razzy> thx, i have better idea
<Regenaxer> E.g. 'bar' is a symbol in pico, but not in the search order
<Regenaxer> Then bar~foo is needed to access 'foo' in 'bar'
<Regenaxer> but 'bar' must be accessible
<Regenaxer> You can also chain
<Regenaxer> pico~bar~foo~mySymbol
<razzy> so import cannot look into namespaces that are not in its tree
<Regenaxer> nothing to do with intern
<Regenaxer> it is 'read'
<razzy> yop
<Regenaxer> foo~bar first reads 'foo'
<razzy> so no function can look into "traversal" namespaces that are not in the tree of namespaces i am in
<Regenaxer> No function cares
<Regenaxer> (import foo) is read *first*
<Regenaxer> then all symbols are there
<razzy> ok
<Regenaxer> import and foo in this case
<Regenaxer> "functions" handle what they get
<Regenaxer> Keep in mind, REPL!
<Regenaxer> Read first, then evaluate
<Regenaxer> "functions" dont care, and cannot care
<Regenaxer> All is finished after reading
<Regenaxer> No symbol is changed
<Regenaxer> It is only *which* symbol is found by the given name
<Regenaxer> There may be a symbol 'foo' in every namespace
<Regenaxer> also a symbol 'foo' may be in several namespaces
<Regenaxer> (== 'foo~bar 'mumble~bar)
<Regenaxer> *may* be
<Regenaxer> but there may be two different symbols with the name 'bar'
<Regenaxer> it all depends what you do
<Regenaxer> With 'import' you have one symbol in two namespaces
<Regenaxer> It is all trivial if you just keep in mind what Lisp does
<Regenaxer> First read, then eval
<Regenaxer> What the reader sees is what you get in eval
<Regenaxer> A symbol is nothing more than a pointer to a data structure in memory
<Regenaxer> If it has a name in that structure, 'read' can find it
<Regenaxer> And it is found by searching the list of namespaces
<Regenaxer> if not in the list of trees, a new symbol is created
<razzy> there could be function that takes "traversal-namespace~symbol" as traversal symbol, looks around all namespaces, and return value. yes?
<Regenaxer> Hmm, I don't understand.
<Regenaxer> Not 'intern'?
<razzy> not that it would be much usefull
<Regenaxer> What is a "traversal-symbol"?
<Regenaxer> and "return value"? What value?
<razzy> sorry, transient symbol
<Regenaxer> ah
<Regenaxer> yes, (intern "car") does that
<Regenaxer> takes a transient and finds an internal with the same name
<Regenaxer> So not only useful, but essential
<Regenaxer> It is the core of reading symbols
<Regenaxer> internally the 'internEXYZ_FE' routine
<Regenaxer> src64/sym.l
<Regenaxer> Ah, I know what you mean "looks around all namespaces"
<Regenaxer> the point is *all*
<Regenaxer> Such a function does not exist, as there is no complete list of all namespaces
<Regenaxer> There may be many namespaces lying around, embedded in other namespaces perhaps
<Regenaxer> PicoLisp does not keep track of them
<Regenaxer> and yes, not useful perhaps
<beneroth> Regenaxer, remind me to write a FAQ-like essay about the different steps of REPL... I guess it would even need some illustrations (of pointer/cell/tree structures)....
<beneroth> we should have a document to link to instead of you having to chew through the same essentials so often...
<Regenaxer> Great idea! :)
<Regenaxer> indeed
<Regenaxer> Obviously it is difficult to explain
<beneroth> people should study some C and pointer logic first or not bother to fiddle in VM internals...
<beneroth> T
<beneroth> though most of the difficulty comes from wrong assumptions/imaginations. yes the stuff is complex, but its complexity coming from many simple parts combined, it's not magic. it's mechanic. it can be taken apart and understand.
<Regenaxer> T, and cause people grow up with other mental models
<Regenaxer> programming models
<Regenaxer> less dynamic
<beneroth> it's a reason. but not an excuse.
<Regenaxer> T :)
<beneroth> well I'm one of those people, or do you see C/C++ as dynamic? :P
<Regenaxer> Not is this sense, it is static in this sense
<beneroth> my employee comes from Haskell, he tends to underuse static stuff, doing instead multiple layers of functions where I feel less layers would be more picolispy
<Regenaxer> haha, understand
<beneroth> the nice thing of lisp is that it allows so well to mix the great OOP model (in Alan Kay sense) useful for granulation, and the functional programming model (I see it basically as pipelining, like the linux shell concept) which allows for flexibility and clear data/process flows.
<beneroth> as always: use the right tool, and which tool is right has to be asked from the task.
<beneroth> no silver bullets, no golden hammers.
<Regenaxer> yep
andyjpb has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
<razzy> sometimes you are soo good with hammer, you could drive screws.
rob_w has quit [Quit: Leaving]
<jcowan> I have done that on a few occasions for lack of the proper screwdriver (in wood, not anything else, obvs)
<beneroth> yeah, in software it's unfortunately not so rare that people do this without any thought about the involved materials...
* jcowan nods
<jcowan> Woodpecker, civilization, etc.
<jcowan> Another config failure. To a first approximation, all problems are config problems. Granted, Cygwin isn't a first-class platform for most systems, but still.
* jcowan grabs gprolog and sees what happens.
<beneroth> well software is a kind of electronics configuration, now? :)
<beneroth> s/now/no
<jcowan> No.
<jcowan> "Cash registers don't really compute, they just grind their gears. But then again, they don't really grind their gears either, they just obey the laws of physics." —Anon., from before cash registers were replaced by POS terminals
<jcowan> Well, at least gprolog built smoothly
<beneroth> I currently agree with the perspective of some people who believe that the Universe is nothing else than computation. Not that this view changes anything.
<beneroth> see also:
bitmapper has joined #picolisp
<jcowan> Well, that raises the question of whether things can be representations of themselves, as with the painting of the artist.
<jcowan> The artist on the canvas isn't really an artist, he's just the representative of a real artist (the one who painted the canvas or not, it doesn't matter)
<jcowan> His clothes aren't real clothes, his brush is not a real brush, his palette is not a real palette.
<jcowan> And the paints on his palette are not ... No, wait, they really are paint!
<Regenaxer> How about Quining? See doc/quine in pil
<jcowan> It's easier for people to dismiss that, because it's abstract after all, though it does lead to the "heterological" paradox
<jcowan> but the paint, you can't get away from the paint so easily
<beneroth> you talk about one of the famous first surreal paintings, "c'est ne pas une pipe"
<beneroth> surreal = above real
<beneroth> Regenaxer, nice assocation with quining, Regenaxer :D
<Regenaxer> :)
<beneroth> "The famous pipe. How people reproached me for it! And yet, could you stuff my pipe? No, it's just a representation, is it not? So if I had written on my picture "This is a pipe", I'd have been lying!"
<beneroth> is the code the algorithm? no, the code is just one representation of the algorithm
<beneroth> textual description another one
<beneroth> a flow diagram another one
<Regenaxer> levels of meaning
<beneroth> that is connected, but I think here we don't talk about levels (layers) of meaning, but of multiple representations of a single meaning
<beneroth> multiple views on the same 'thing'
<beneroth> like.. you and me probably have not exact the precise same dictionary of "english words" mapped to "exact meanings" in our heads, but the mappings/understanding of english words in our heads in similar enough (overlap enough) so we can communicate using them
<beneroth> but you might associate other detailed feelings, memories, thoughts and smells and whatnot with any individual word than I do.
<beneroth> if this babbling of me is understandable in any way xD
<beneroth> s/me/mine
<beneroth> hm
<beneroth> now its levels of meanings
<Regenaxer> sure
<beneroth> lol
<beneroth> I just had an idea
<beneroth> quantum physics, the famous duality of light as particle and as wave
<beneroth> particle = OOP ? wave = functional?
<beneroth> :P
<beneroth> (OOP more in mainstream usage than Alain Kay definition, his OOP is kinda quite functional in essence...)
<Regenaxer> I don't see an analogy here
<beneroth> ok. never mind.
<Regenaxer> ok, in fact I never cared much about such formalisms
<beneroth> I just thought, the idea of mass, of particles, is an idea of static "things".
<Regenaxer> hmm, yeah
<beneroth> while wave if very obviously connected to math functions, to input -> transform/map -> output
<Regenaxer> I was never really fanatic about functional programming
<Regenaxer> oop is just convenient :)
<beneroth> you're fanatic on rationalism and simpleness
<Regenaxer> So I mix it all
<Regenaxer> right!
<beneroth> apart from that you are as non-fanatic as it goes
<Regenaxer> pragmatism
<beneroth> T
<beneroth> that is anti-absolutism. but humans love absolutism. no absolutism = no absolute truth, no security, no final structure.
<beneroth> freedom is scary.
<Regenaxer> for too many
<beneroth> it means you have to take decisions
<beneroth> decisions can be wrong.
<beneroth> so..maybe its fear of mistakes, in essence
<beneroth> but making no decision is also an decision.
<Regenaxer> and then, what to do when you are free ...?
<beneroth> nothing is true, everything is allowed.
<beneroth> only the law of cause and effect rules.
<beneroth> do what thou will, but you will have to handle the consequences somehow
<Regenaxer> there is no free will
<beneroth> maybe. but even if there isn't, we have to pretend there is one.
<Regenaxer> yeah, we keep at least te illusion
<beneroth> we have no free will on that, for sure
<Regenaxer> the will to will?
<beneroth> haha, yes
<beneroth> well
<beneroth> it makes no difference if you will not. you still will
<Regenaxer> T
<beneroth> e.g. people believing in horoscopes... or some other form of pre-determination.. trying to get a glimpse of the predetermined plan... what use is it? if there is plan, than getting a glimpse will not make a difference, because it will happen according to "the plan"
<beneroth> but if the glimpse can make a difference, then the plan is not really predetermined, is it?
<beneroth> like random generators
<beneroth> they have a fixed plan
<beneroth> but its so many variables that it doesn't matter for all practical purposes
<Regenaxer> The universe splits, and all variations come true
<beneroth> so we pragmatically decide to be happy in the meanwhile, ok? :D
<Regenaxer> yes, and try to get into the lucky branch of the split
<beneroth> of course you must set limits. you can train yourself (modify your own cost-function within your mind) to be happy independent of any outside stimulation. then if you really manage this, you end up as a cave hermit, ultimately letting yourself eating by bugs because you're to happy to care :D
<beneroth> lesser versions of the same thing would be getting addicted to some stimulant, I guess.
<beneroth> short-cutting your "get-happy"-function
<beneroth> and of course the path goes into the other extreme too
<beneroth> balance is needed. pragmatic balance.
<beneroth> Regenaxer, there is no second-lowest value in picolisp, is there? NIL is the lowest value. so second lowest value would be?
<beneroth> the biggest bignum possible on the host the application is running (limited by RAM and swap) with a minus?
<beneroth> :D
<Regenaxer> yes, negative bignum
<beneroth> haha, thanks
<Regenaxer> good question
<beneroth> Morris just came up with this question. he tries to do some kind of range query
<Regenaxer> ah
<Regenaxer> So (> NIL ... should do
<Regenaxer> (> 0 X NIL)
<beneroth> T
<Regenaxer> or whatever instead of 0 for the upper ceiling
<beneroth> obviously
<Regenaxer> (> T X NIL) covers all "finite" values then
<beneroth> xD
<beneroth> nice
<beneroth> have a nice evening, I go meet my gf. cu :)
<beneroth> bbl
<Regenaxer> Have a nice time!
<beneroth> thanks!
<beneroth> you too :)
<Regenaxer> :)
bitmapper has quit [Remote host closed the connection]
orivej has joined #picolisp
bitmapper has joined #picolisp