ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Check also http://www.picolisp.com for more information
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.
<Regenaxer> Thx!
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"
<tankf33der> :)
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
<tankf33der> http://ix.io/2eK6
<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.
<tankf33der> yea.
<tankf33der> T
<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> ok
<tankf33der> (get (sort (copy Lst)) (/ (inc N) 2))
<tankf33der> o
<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.
<tankf33der> new
<tankf33der> http://ix.io/2eKb
aw- has quit [Ping timeout: 256 seconds]
aw- has joined #picolisp
<Regenaxer> good
<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> ok
<tankf33der> next
<Regenaxer> A database with files and hashes
<tankf33der> yea
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 ?
<Regenaxer> yep
<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> #else
<tankf33der> typedef unsigned long long XXH64_hash_t;
<tankf33der> #endif
<tankf33der> so
<Regenaxer> ok
<tankf33der> http://ix.io/2eKN
<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)
<tankf33der> yes!
<Regenaxer> So all right
<Regenaxer> Ah, you need unsigned?
<tankf33der> yes!
<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
<tankf33der> ok
orivej has quit [Ping timeout: 256 seconds]
<tankf33der> works.
<Regenaxer> great
<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> http://ix.io/2eLG
<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> yeah
<Regenaxer> You are a recursion expert now
<tankf33der> afk.
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