<Regenaxer>
Hi sriram! Well, 'var:' returns the value, not the place
<Regenaxer>
So you either 'put' the value into the correct class
<Regenaxer>
Or you define the value itself as a 'set'table place, ie. a pair or a symbol
<Regenaxer>
Ah, I see! (var TotTiles 0) looks good
<Regenaxer>
it is a pair
<Regenaxer>
(test> '+Tile) is the problem
<Regenaxer>
you are expected to send 'test>' to an instance of the class (object)
<sriram>
oh...so then I have to have an instance of the class ( i thought a class is an object and an object is a class...or maybe i misunderstood)
<sriram>
that there is no diff between object and class...
<Regenaxer>
The ref says "searching the property lists of its class(es) and superclasses"
<Regenaxer>
yes
<Regenaxer>
but the search starts above
<Regenaxer>
inheritance
<sriram>
ah ok....so if it was inherited ....it may have worked to do this in a derived class
<sriram>
but for now...i have to create an object of it..
<Regenaxer>
If you know the class explicitly, you don't need 'var'
<Regenaxer>
you can 'put' directly
pierpal has joined #picolisp
<Regenaxer>
yes, derived class is also good
<sriram>
oh i see....(put '+Tile TotTiles 0)
<sriram>
or something like that :)
<Regenaxer>
yeah
<Regenaxer>
But inheritance might be more useful
<sriram>
would that be the same as a class variable then..i.e available in all objects of that class if i set via put
<Regenaxer>
yes
<sriram>
ok great...i will try via inheritance then as it is probably cleaner
<sriram>
but good to know of the put option
<Regenaxer>
yes
<Regenaxer>
So 'var' is actually nothing special. It is 'var:' which handles the inheritance at runtime
<sriram>
thanks again...by the way....i paused the svg drawing for some time as it was working close to what i wanted...setting up the oo infrastructure for the letter tiles ....
<Regenaxer>
Great!
<sriram>
so i can experiment with moving tiles around later
<sriram>
thanks again....off for a bit ...to continue :)
<Regenaxer>
:)
<sriram>
by the way..what did you mean above by "define the value itself as a 'set'table place, ie. a pair or a symbol" ...just for my understanding
<sriram>
(confused between (var TotTiles 0) and (var TotTiles . 0). The former seems to add a level of parens around 0 for the value
<Regenaxer>
yes
<Regenaxer>
my misunderstanding, you did it right
pierpal has quit [Ping timeout: 260 seconds]
<Regenaxer>
(var TotTiles 0) is the same as (var TotTiles . (0))
<Regenaxer>
I did not look closely ;)
<sriram>
(:) i just tried both and settled on one version...i think (var TotTiles . 0) is more convenient as a counter on second thought
<sriram>
the example in the mailing list uses ., while the ref uses the other way...so i tried both...
<Regenaxer>
not as a countir
<Regenaxer>
counter
<sriram>
i mean its a simple value (number) rather than a list
<Regenaxer>
... . 0) is just atomic, so you cannot (inc (var: TotFiles)) with side effect
<Regenaxer>
yes
<sriram>
so i can say (set (get '+Tile 'TotTiles) 5)
<Regenaxer>
so inc will just return the new value
<Regenaxer>
no
<Regenaxer>
then you need (var TotTiles 0)
<Regenaxer>
giving a value (0) which can be modified via 'var:'
<sriram>
oh i see...a simple value has no "place" so is not settable
<sriram>
i see now
<Regenaxer>
yeah
<sriram>
or even gettable
<Regenaxer>
get works
<sriram>
get works but returns the value
<sriram>
but not the place
<Regenaxer>
T
<Regenaxer>
you can use 'prop' then to get a "place'
<Regenaxer>
for any property
<sriram>
so if i understand correctly now....the . version is for when the variable is not expected to be modified
<Regenaxer>
but without inheritance of course
<Regenaxer>
yes
<sriram>
(prop (get '+Tile +TotTiles)) perhaps
<Regenaxer>
Same as (put '+Tile 0)
<Regenaxer>
no, (prop '+Title 'TotFiles)
<sriram>
(put '+Tile 'TotTiles 0)
<sriram>
ah same as get
<Regenaxer>
best if you play it through on the repl
<sriram>
ok...good! yes...i will experiment a bit...did not know about prop
<Regenaxer>
put, get, prop and related funs
<sriram>
yes
<Regenaxer>
prop returns the whole property, not just the value
<Regenaxer>
(val . key)
<Regenaxer>
So you can 'set', 'inc', 'push' etc
<Regenaxer>
'set' is not useful, as 'put' is easier ;)
<sriram>
oh...yes..perhaps the best way....get is only when you dont want to modify the returned value i guess..
<Regenaxer>
exactly
<sriram>
maybe can do put directly without going through intermediate prop...will experiment a bit...thanks a lot!
<Regenaxer>
ok
pierpal has joined #picolisp
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #picolisp
pierpal has quit [Ping timeout: 264 seconds]
Fwirt[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
pierpal has joined #picolisp
jibanes has quit [Ping timeout: 256 seconds]
jibanes has joined #picolisp
pierpal has quit [Ping timeout: 264 seconds]
pierpal has joined #picolisp
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #picolisp
pierpal has quit [Read error: Connection reset by peer]
freemint has joined #picolisp
<Regenaxer>
Ja, bin grad gekommen, hab geduscht, und muss gleich wieder weg
<Regenaxer>
oop
pierpal has joined #picolisp
<beneroth>
^^
<beneroth>
Schönen Abend Regenaxer :)
<beneroth>
*Schoenen Abend
<Regenaxer>
Hi beneroth!
<freemint>
Schönen Abend
<Regenaxer>
Sorry, must go
<beneroth>
cu :)
<beneroth>
Hi freemint !
<Regenaxer>
afp
<freemint>
Hi beneroth
<freemint>
What are you working on nowadays?
<beneroth>
changes to an picolisp app (customized app for a client)
<beneroth>
and you?
<freemint>
physics exam
<freemint>
after that linear algebra after that analysis
<beneroth>
much to memorize :/
pierpal has quit [Ping timeout: 248 seconds]
orivej has joined #picolisp
karswell has joined #picolisp
pierpal has joined #picolisp
<freemint>
beneroth did you work on the versioned db?
<freemint>
if so what is the progress on that end
<freemint>
if not what modifications are necessary to app.l
<beneroth>
yeah, this is an ongoing process
<freemint>
did you decide to version content too? or just schemas
<beneroth>
its a whole additional layer of additional classes and functions
<beneroth>
content can be versioned too (can be enabled/disabled)
<beneroth>
necessary e.g. to undo a deletion of a complete entity (and its content)
<beneroth>
also quite handy for getting a edit history (and could also be used to implement undo/redo of content changes)
<beneroth>
but the whole thing is still very volatile. huge parts are not implemented yet. and the implemented parts stille evolve and change while I test it with real applications and improve it.
<beneroth>
actually this is the first time I try to use the schema modification mechanics on a life productive application.
<beneroth>
the data structures to allow it are in place for a while now, but so far I only used it with simple test examples
pierpal has quit [Read error: Connection reset by peer]
<beneroth>
so at the moment I'm reluctant to publish anything, as must code is still changing and the whole concept evolving
<beneroth>
once it reaches a stable form I will publish it :)
<beneroth>
s/must/most
<beneroth>
I need to go. Schönen Abend, freemint !
<beneroth>
cu
beneroth has quit [Quit: Verlassend]
<freemint>
good bye
pierpal has joined #picolisp
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #picolisp
pierpal has quit [Ping timeout: 256 seconds]
pierpal has joined #picolisp
pierpal has quit [Ping timeout: 248 seconds]
pierpal has joined #picolisp
pierpal has quit [Ping timeout: 256 seconds]
pierpal has joined #picolisp
pierpal has quit [Read error: Connection reset by peer]