<freemint>
Regenaxer, i got a database file with two symbols [created by (new T)] in it. Which contain the result of days of computation but i forgot where they started
<Regenaxer>
Started in which sense?
<freemint>
i do not know their name
<freemint>
{???}
<Regenaxer>
If there is no index and no reference from other objects, they are practically lost. (dbgc) will 'zap' them
<Regenaxer>
You can do a brute force search
<Regenaxer>
with 'seq'
<Regenaxer>
e.g. (for (This (seq *DB) This (seq This)) (and (= xxx (: foo)) (show This)))
<Regenaxer>
or (for (This (db: +MyCls) This (seq This)) ...
<freemint>
What does the code do?
<Regenaxer>
It runs ;)
<freemint>
whatshouls i replca xxx with?
<Regenaxer>
I don't know
<Regenaxer>
"brute force search"
<freemint>
i solved it with (let A *DB (do 100 (prinl (length (getl A)) A) (setq A (seq A)))) since i put every result in a huge property list
<Regenaxer>
ok
<Regenaxer>
'for' is a little cleaner
<Regenaxer>
you can also stop on a condition (in 'do' too)
orivej has joined #picolisp
<freemint>
T
<freemint>
but i got my data back
<freemint>
and it confirmed my hypothesis
<Regenaxer>
good
<freemint>
I used the DB to spread out work to 8 cores
<Regenaxer>
nice
<freemint>
First i filled one DB symbol with the tasks then i manually locked, pop, commited in each child to get the task and lock put Res task result commit
<freemint>
no magic but it was kinda bothersome ot do the locking and i think there has to be an more elegant way
<Regenaxer>
Is explicit locking needed? Each process should run on its own set of data
<freemint>
But they need to fetch tasks of the same queue?
<Regenaxer>
only in the end, dbSync + (commit 'upd)
<freemint>
right i used dbSync
<Regenaxer>
The to-do tasks I would not put into the DB
<Regenaxer>
the parent should keep the PIDs of children, then (tell Pid ...)
<Regenaxer>
no need to share the todo in the DB
<Regenaxer>
I would do (let Pids like in misc/stress.l
<Regenaxer>
Perhaps even no DB at all is needed
<Regenaxer>
all is smaller than RAM I suppose
<freemint>
One reason to keep the queue in the database is that it is more persistent and i only loose *Core results on machine rebbot
<Regenaxer>
Didn't you experiment with 'later' before?
<Regenaxer>
ok
<freemint>
yes
<Regenaxer>
did not work out?
<freemint>
also running later task over 2,5 days seemed risky
<Regenaxer>
someone kills it?
<Regenaxer>
So Queue in the DB is also fine, I'm just not sure whether the waiting in (dbSync)s is harmful
<freemint>
i could not get the choping to work without everyone waiting for the slowest process in collection of 8
<Regenaxer>
Seems only very short, just to pop the queue
<freemint>
Yeah i took care of that
<Regenaxer>
ok, so it looks good
<freemint>
the next upgrade would be a web server who hands out tasks that way i can let it run on multiple machines
<Regenaxer>
cool
<freemint>
but as there is no need for that ...
<Regenaxer>
:)
<freemint>
before i used an genetic algorith to find the optimal configuration in ~32000 combinations, now i bruteforced forced all of the and your genetic alg found the best one :)
<freemint>
although the recombination did more Harm the good
<Regenaxer>
:)
<freemint>
it is very hard to do a recombination where the childs are atleast as fit as the parents
<freemint>
(for my problem)
<Regenaxer>
recombination? I would think the selection would be difficult
freemint has quit [Ping timeout: 252 seconds]
ubLIX has joined #picolisp
freemint has joined #picolisp
_whitelogger has joined #picolisp
freeemint has joined #picolisp
freemint has quit [Ping timeout: 264 seconds]
freeemint has left #picolisp [#picolisp]
freemint has joined #picolisp
freemint has quit [Remote host closed the connection]
freemint has joined #picolisp
_whitelogger has joined #picolisp
ubLIX has quit [Ping timeout: 250 seconds]
ubLIX has joined #picolisp
ubLX has joined #picolisp
ubLIX has quit [Ping timeout: 258 seconds]
freemint has quit [Ping timeout: 252 seconds]
freemint has joined #picolisp
freemint has quit [Ping timeout: 250 seconds]
freemint has joined #picolisp
ubLX has quit [Ping timeout: 268 seconds]
Nistur_ has left #picolisp [#picolisp]
Nistur has joined #picolisp
alexshendi has joined #picolisp
alexshendi2 has joined #picolisp
alexshendi has quit [Ping timeout: 252 seconds]
alexshendi2 has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
xkapastel has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
rcs_ has joined #picolisp
rcs_ has quit [Quit: Leaving]
rcs_ has joined #picolisp
freemint has quit [Ping timeout: 268 seconds]
freemint has joined #picolisp
rcs_ has quit [Ping timeout: 250 seconds]
freeemint has joined #picolisp
freemint has quit [Ping timeout: 240 seconds]
freeemint has quit [Read error: Connection reset by peer]
freemint has joined #picolisp
freeemint has joined #picolisp
freemint has quit [Read error: Connection reset by peer]
rcs_ has joined #picolisp
freeemint has quit [Read error: Connection reset by peer]
freemint has joined #picolisp
rcs_ has quit [Quit: Leaving]
freemint has quit [Ping timeout: 250 seconds]
rcs_ has joined #picolisp
<Regenaxer>
Hi rcs_!
<Regenaxer>
I change now
<Regenaxer>
Done! You should change it to something else
<Regenaxer>
afp
razzy has joined #picolisp
rcs_ has quit [Ping timeout: 245 seconds]
<Regenaxer>
ret
<razzy>
i know something similiar was explained here, but i cannot find it. how can i get size of list on disk. i can (heap) but it is not precise. (bytes X) and (size X) have weird conversion. http://ix.io/1Fzz list C actually takes about 3600MB.
<Regenaxer>
No, 'size' is fine
<Regenaxer>
"on disk" means PLIO format, e.g. in DB
<razzy>
i meant in RAM
<Regenaxer>
ah, yes, in RAM. 'size'
<Regenaxer>
number of cells
<Regenaxer>
so times 16
<Regenaxer>
You can easily count manually
<razzy>
yes, times 16 thx
<Regenaxer>
Just count all '(' and all atoms
<Regenaxer>
eg (a (b c) d) is 5
<Regenaxer>
The first '(' is *not* counted
<razzy>
i forgot the coeficient
<Regenaxer>
ok
<razzy>
noted now
<razzy>
i still have problem using (run) or (eval) after (setq) http://ix.io/1FzN . i do not know why is it a problem.
<Regenaxer>
You ignored all my proposal
<Regenaxer>
s
<Regenaxer>
Your 'setq' problem has nothing to do with run or eval
<Regenaxer>
It is simply wrong, as 'setq' does *not* eval its first arg
<Regenaxer>
(setq (foo bar) ... will *always* replace 'foo'
<Regenaxer>
Why do I waste my time answering you if you ignore it all?
<razzy>
i use http://ix.io/1FzO and i am happy with it. your additon was noted. but i do not see the need for it. what i was missing was explanation of setq. which i got now, thx.
<Regenaxer>
Your code is nonsense
<Regenaxer>
even if you are happy
<Regenaxer>
I posted a "more correct" version yesterday
<razzy>
i also plan on using (use) more often.
<Regenaxer>
'Prg' is a misnomer, it denotes a list of exe`s for 'run'
<Regenaxer>
and 'Tim' should better be a transient to avoid a clash
<Regenaxer>
Sigh, so here once more:
<Regenaxer>
(de usect ("Var" . "Prg")
<Regenaxer>
(let A (usec)
<Regenaxer>
(prog1
<Regenaxer>
(run "Prg")
<Regenaxer>
(set "Var" (- (usec) A)) ) ) )
<Regenaxer>
and call (size ...) *without* quotes then