2016/06/19

08:15

I believe I know what is wrong with my merge sort. I am swapping the output with the lowest sorted value then I skip over it. I must not do that.

08:36

The merge sort with the stack that I have is a bit complex, it can really just be done with a single pivot that splits the left and right sides.

08:57

Pivots would be even more complex.

09:16

Actually my merge may have not worked due to && and not ||. The merge was only performed if both sides had values. This would work if values were shifted over however.

09:20

So right now I have a working double memory merge sort, I can later turn it into a single memory merge sort at the cost of speed. Potentially if allocating the second array fails, I can fall back to using insertion to sort it.

09:49

I believe for the built-in sorting algorithm that Arrays and Collections will use will just be a value based in place merge sort or similar. I can still have minimal duplicated code by using a special interface.

09:54

Technically, the IndexedSort could use this ValueSort since an interface method takes care of the comparison. The value sorter will just have a set and get of a specific index so that it can sort it properly along with a standard comparison by extending IndexedComparator.

11:14

Now that I have a sorting algorithm, I can sort the JAR entries.

12:32

So with binary searching, I now have the following times:

So basically no real difference to being up to a second slower. However, the slight loss in speed will benefit later runs.

12:39

Along with process setup, I will need to implement a launcher that uses the LUI initially. Then develop the means of communication the LUI uses to the host system.

15:36

I do wonder if I should remove the class path so to speak and just stick with class units.

18:37

Appears the entry name reader is incorrect.

18:40

The file name was being read from the wrong structure.

19:39

Byte code instructions that have to be replaced with static methods would be anything relating to arrays. Another consideration is that changing instructions will need jump target and exception handler rewriting for adjusted instructions (such as replacing arraylength with invokestatic.

22:17

The moon is full.

22:26

I can either have verification done myself (recommended) then I do not have to worry about illegal accesses being performed. When it comes to translated classes, I can really just place them in a single package in a kind of modified UTF-8 form of sorts. It would essentially be UTF-8 on top of UTF-8. That would be a bit complex however, I just need something that can replace the special characters which change the meaning of a class. Identifiers cannot have ., ;, [, /. I really just need to escape these with a special sequence.

23:02

As an example, the given array [[[[[[J mangles to L__squirreljme#0/?(?(?(?(?(?(J;. This should make it to easy to determine that it is an array which was requested. Also when I suppose it comes to stuff such as anewarray, I can create a virtual class just for creating an array of a given class.