Search
Tuesday, 8th of January 2019, 5:48:00 UTC
8:43:55
splittist
re: iteration variables. C# does the same thing (re-uses the iteration variable) in for loops, and used to do this in foreach loops as well - then they changed the latter in C#5. (I think.) I'm not sure whether this reduces or maximizes the surprise...
11:37:05
shka_
any mathematically savvy person on board? I have obstacle on implementing in-place merge sort.
11:46:03
splittist
I'm not in the least mathematical, but happy to play a rubber duck if you want one.
11:46:51
jackdaniel
asking the question could be a better strategy anyway - "asking to ask" may indicate silence or asynchronous nodding only
11:47:51
shka_
ok so i am working on in-place merge sort as the end goal
11:48:00
shka_
currently i am working on in-place merge
11:48:48
shka_
i found acceptable simple algorithm that uses perfect shuffle and inverse perfect shuffle operations
11:49:14
shka_
A simple shuffle-based stable in-place merge algorithm
11:49:16
shka_
Mehmet Emin Dalkilica, Elif Acara, Gorkem Tokatlia *
11:50:13
shka_
so i started working on perfect shuffle, back in the 2014 article was published "In-place permuting and perfect shuffling using involutions"
11:51:10
shka_
and it works almost like i want it to
11:51:17
shka_
here is the source code https://github.com/sirherrbatka/cl-data-structures/blob/master/src/utils/arrays.lisp
11:52:12
shka_
issue is that I have a minor screw up that you can see at line 175
11:52:59
shka_
that is, when making inverse shuffle, i have to swap arrays halfs
11:53:55
shka_
I think that it is not stopper, but I would like to remove those operations
11:55:15
shka_
and I think it is possible, by just changing constructed operations network slightly
11:55:48
splittist
ACTION nods asychronously
11:56:11
shka_
but I can't seem to figure out what exactly i should do
11:56:31
shka_
number theory makes my brain hurt
12:17:22
jackdaniel
and the question to a hypothetical savvy person is?
12:17:55
jackdaniel
what pills to take to limit the brain hurt from math? ;-)
12:57:47
splittist
shka_: you feel that if lines 144-174 were different, the final pass at lines 175ff would not be required?
13:25:01
shka_
I am decomposing index range into cycle there
13:25:17
shka_
i need a break from this though
13:26:05
shka_
i think that i will skip this issue altogether
13:26:17
shka_
and will just implement merge
Tuesday, 8th of January 2019, 17:48:00 UTC