aw- has quit [Read error: Connection reset by peer]
aw- has joined #picolisp
orivej has quit [Ping timeout: 264 seconds]
_whitelogger has joined #picolisp
patrixl has quit [Quit: Leaving.]
patrixl has joined #picolisp
_whitelogger has joined #picolisp
rob_w has joined #picolisp
<
tankf33der>
committed.
f8l has quit [Remote host closed the connection]
f8l has joined #picolisp
<
Regenaxer>
I don't understand how to "save large arrays as arrays with five numbers"
stultulo has joined #picolisp
f8l has quit [Ping timeout: 240 seconds]
stultulo is now known as f8l
beneroth__ has quit [Quit: Leaving]
beneroth has joined #picolisp
<
Regenaxer>
Is it OK that 'median' is destructive?
<
Regenaxer>
(cause 'sort' is called directly)
<
Regenaxer>
Looks dangerous
<
tankf33der>
but it works. result is correct.
<
tankf33der>
the only place where it touch list destructive the list already sorted.
<
Regenaxer>
In some cases is is OK, eg. (median (head .d
<
tankf33der>
i think all ok.
<
Regenaxer>
cause 'head' makes a fresh list
<
Regenaxer>
But (format (median S) ...
*may* destroy S
<
Regenaxer>
So (last S) is not sure
<
Regenaxer>
I think it depends on the data, worked by chance
<
Regenaxer>
(sort (copy Lst)) would be safe
<
Regenaxer>
e.g. (println (fivenum ... works because the list is just read
<
Regenaxer>
it is destroyed
<
Regenaxer>
if you pass a variable to fivenum you will see it is changed
<
tankf33der>
(get (sort (copy Lst)) (/ (inc N) 2))
<
tankf33der>
double sort
<
tankf33der>
i dont need it here
<
tankf33der>
(get Lst (/ (inc N) 2))
<
tankf33der>
this one is correct :)
<
tankf33der>
(setq Lst (nth Lst (/ N 2))) and this without sort too
<
tankf33der>
because medial always will get already sorted Lst
<
tankf33der>
my bad.
aw- has quit [Ping timeout: 256 seconds]
aw- has joined #picolisp
<
Regenaxer>
Yeah, not so many sorts needed :)
<
Regenaxer>
But fivenum is still destructive
<
Regenaxer>
So better (sort (copy Lst))
<
Regenaxer>
(or "document" that it is destructive ;)
<
tankf33der>
i leave it as is, will add a note.
<
Regenaxer>
A database with files and hashes
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
orivej has joined #picolisp
rob_w has quit [Remote host closed the connection]
xkapastel has joined #picolisp
<
tankf33der>
Regenaxer: here ?
<
tankf33der>
question about native
<
tankf33der>
this is function:
<
tankf33der>
XXH64_hash_t XXH64 (const void* input, size_t length, XXH64_hash_t seed);
<
tankf33der>
this is definition of XXH64_hash_t:
<
tankf33der>
# include <stdint.h>
<
tankf33der>
/* the following type must have a width of 64-bit */
<
tankf33der>
typedef uint64_t XXH64_hash_t;
<
tankf33der>
typedef unsigned long long XXH64_hash_t;
<
tankf33der>
#endif
<
tankf33der>
I return value as nagative number.
<
tankf33der>
I return value as negative number.
<
Regenaxer>
Isn't N always unsigned?
<
Regenaxer>
ah, no, ok
<
Regenaxer>
(signed 64 bit)
<
Regenaxer>
So all right
<
Regenaxer>
Ah, you need unsigned?
<
tankf33der>
i dont know what to do
<
Regenaxer>
I think we had that before
<
Regenaxer>
there are many ways, but I forgot which was the best one
<
Regenaxer>
Check if negative and add `(** 2 64) ?
<
Regenaxer>
or always add, then & with `(dec (** 2 64))
<
Regenaxer>
hmm, there
*was* a more elegant way
<
tankf33der>
i never did it before.
<
tankf33der>
i do ity.
<
tankf33der>
i do it.
<
tankf33der>
thanks a lot.
<
Regenaxer>
best is Check if negative and add
<
Regenaxer>
the second won't work, as we don't have 2-compl here
orivej has quit [Ping timeout: 256 seconds]
<
tankf33der>
works.
<
CORDIC>
"[de neg [N] (+ 1 (com N))]" => "[de com [N] (- (- 0 N) 1)]"?
cil_z has joined #picolisp
manjaroi3 has joined #picolisp
manjaroi3 has quit [Quit: leaving]
manjaroi3 has joined #picolisp
manjaroi3 has quit [Quit: leaving]
Cil__z has joined #picolisp
cil_z has quit [Quit: cil_z]
Cil__z has quit [Client Quit]
cil_z has joined #picolisp
cil_z has quit [Client Quit]
cil_z has joined #picolisp
<
tankf33der>
file duplicates in /bin on voidlinux :)
<
Regenaxer>
Probably hard links
<
Regenaxer>
old Unix tradition
orivej has joined #picolisp
<
tankf33der>
yea, its ok.
<
tankf33der>
i gonna submit, ok ?
<
Regenaxer>
You are a recursion expert now
stultulo has joined #picolisp
f8l has quit [Ping timeout: 264 seconds]
stultulo is now known as f8l
stultulo has joined #picolisp
f8l has quit [Ping timeout: 250 seconds]
oldf8l has joined #picolisp
oldf8l is now known as f8l
stultulo has quit [Ping timeout: 256 seconds]
stultulo has joined #picolisp
f8l has quit [Ping timeout: 256 seconds]
stultulo is now known as f8l
f8l has quit [Remote host closed the connection]
f8l has joined #picolisp
stultulo has joined #picolisp
f8l has quit [Ping timeout: 240 seconds]
stultulo is now known as f8l
f8l has quit [Ping timeout: 250 seconds]
stultulo has joined #picolisp
stultulo is now known as f8l
cil_z has quit [Ping timeout: 246 seconds]
cil_z has joined #picolisp
cil_z has quit [Ping timeout: 246 seconds]
cil_z has joined #picolisp
cil_z has quit [Ping timeout: 246 seconds]
f8l has quit [Remote host closed the connection]
f8l has joined #picolisp
CORDIC has quit [Ping timeout: 246 seconds]
stultulo has joined #picolisp
f8l has quit [Ping timeout: 240 seconds]
stultulo is now known as f8l
f8l has quit [Remote host closed the connection]
f8l has joined #picolisp