Andrei Zhabinski
Andrei Zhabinski
Just wanted to post an updated on this. I tried the suggested method, but it turns out due to `@checknull` any call to `get_method_id` on a non-existing method throws an...
I tried `JNI.GetMethodID`, `JNI.GetStaticMethodID` and even `JNI.GetFieldID` and `JNI.GetStaticFieldID`, but none of them worked. `JNI.FromReflectedMethod` works fine so far. The code I used: Generate object (copy from above) ```julia #...
JavaCall automatically converts Julia arrays to Java arrays and vice versa, but they don't share memory. What you pass to the Java method is actually a copy, that's why the...
If you have a lot of code already working with `byte[]`, you can create a no-copy wrapper for it instead of `ArrayList`. Something like: ``` class ArrayWrapper { private byte[];...
Hmm, I now have doubts regarding type stability of this solution as well. Although I never use `nothing`, Julia still fails to infer types: ``` julia> it = PrefetchIterator(1:10) Iterators.PrefetchIterator(1:10)...
``` function start(f::Peek) s = start(f.it) d = done(f.it, s) # this is a simple way to make this function type stable d && throw(ArgumentError("argument to Peek must contain at...
Here's a version that is both - type stable and allows wrapping empty iterators (I renamed `Peek` into `PeekIter` because it conflicted with the name of a function `peek` used...
> PS: last && return val, (s, val, false) and return done(f.it, s) && !last were not typos, your changes to done and next break the iterator: Oops, my tests...
I've made a separate PR for `PeekIter`. At the same time, I feel like I can improve `mergesorted` to accept any number of iterators to merge, so please don't accept...
> At the same time, I feel like I can improve mergesorted to accept any number of iterators to merge Done (though tests will fail for now since this PR...