HNHacker News
TopNewBestAskShowJobs

KenoFischer

4,368 karma · joined December 2, 2012

Julia Core Developer Co-Founder at Julia Computing

Reach me at keno@juliacomputing.com

submissionscomments
KenoFischer··on Julia 1.0
The documentation should be equivalent, modulo a small couple additions made in the past couple of days.
KenoFischer··on Julia v1.0 has been released
Thank you! People are always too closely watching our GitHub ;).
KenoFischer··on Julia v1.0 has been released
We'll have a proper release blog post up in the morning.
KenoFischer··on Ryū: Fast Float-To-String Conversion
I'd say probably yes. Changes are suitable for 1.x if they are not generally breaking for user code. This change probably wouldn't be considered breaking, but we'd have to look at it at the time.
KenoFischer··on Ryū: Fast Float-To-String Conversion
Yes, I think preliminary tests showed that it was faster than Grisu (which is what we're using in Base currently). It also seems significantly simpler (Grisu is generally fairly simple but has a custom BigInt implementation to handle some corner cases, which makes things complicated). Not a good time right now to swap the float print algorithm, but a good project for post-1.0.

I don't see an issue about it at the moment. I guess we just expect Jacob to PR it at some point. IIRC he also wrote the Grisu implementation that's in Base.

KenoFischer··on Ryū: Fast Float-To-String Conversion
Jacob Quinn has a translation to Julia here: https://github.com/quinnj/Ryu.jl
KenoFischer··on Xv6, a simple Unix-like teaching operating system
There's also OS/161, which was written for Harvard's CS161 course and is used by a bunch of other places also: http://os161.eecs.harvard.edu/
KenoFischer··on The Spiral Language
If you're interested in advanced layout transformations in Julia, I talked about this a bit here: https://www.youtube.com/watch?v=uecdcADM3hY&t=1658s

As for your in place map example, here's how that's written in julia: https://github.com/JuliaGPU/CuArrays.jl/blob/98e32e055e96fe7...

Of course you may say that's cheating because it shifts the problem to the much more general broadcast machinery, but the implementation of that is not particularly tricky either. https://github.com/JuliaGPU/CuArrays.jl/blob/23c4c737a31aff9...

This code works with any multi-dimensional array, independent of layout considerations, though you may of course want to specialize based on layout for performance. Note also that this the code is slightly more general than the one in your example, because it handles arrays that do not have efficient linear indexing.

KenoFischer··on Writing Iterators in Julia 0.7
Alternatively, you may see this as a sign that we've thought carefully about which APIs are stable enough to be part of the long term stability guarantees of 1.0, and which APIs are not, making it more likely that we'll able to maintain those guarantees longer.

Also, there nothing really special about code that used to be in base, but is now in stdlib other than historical accident. It so happened that we used to ship a git client as part of the language, but the HTTP client was a separate package, despite the latter probably being a lot more useful to users. Packages can and do have their own stability guarantees. With the language itself maturing, I imagine package authors will start taking advantage of this more.

KenoFischer··on Papers from the Lost Culture of Array Languages (2011)
They're equally fast:

    julia> @btime fact_prod(10000)
    7.833 μs (0 allocations: 0 bytes)

    julia> @btime fact_loop(10000)
    7.908 μs (0 allocations: 0 bytes)
KenoFischer··on Swift for TensorFlow
I think they're making that grammatical choice deliberately because they're modifying the language to better support TensorFlow integration, as opposed to just providing bindings for it.
KenoFischer··on Swift for TensorFlow
Watching the talk, I thought the problem statement was exactly right. Of course our answer is a bit different, but I'm glad people are coming around to seeing ML as a programming language problem. We talked about this a bit in a blog post a few months ago: https://julialang.org/blog/2017/12/ml&pl.
KenoFischer··on Project Gutenberg blocks access from Germany
I thought so too reading the first couple of pages of the decision, but in the judicial conclusion section, the jurisdictional issue is squarely resolved on the "targets German users" issue, which the court bases on 1) Partial translation of the website 2) The availability of German language works 3) The "anyone anywhere" language on the website 4) A disclaimer that people should check their local laws (implying in the opinion of the court that they knew non-US persons were accessing their material and intentionally targeting their offering to such people).

So yeah, while the language issue is only part of the judicial reasoning, is is indeed mentioned three times in the judicial conclusions. The court does not however appear to adopt plaintiff's theory on jurisdiction because some of the volunteers were German.

As such, I'm inclined to think that while the focus on the language issue is perhaps a bit overstated in their statement, it is definitely grounded in the opinion of the court.

As an aside though, I'm not convinced the court spent too much time considering the jurisdictional arguments here, which I think are probably the most important part of this case. Most of the analysis is concerned with whether the publisher plausibly alleged they own the copyright. I assume that is because that is usually the primary point of contention in copyright cases.

KenoFischer··on Why We Created Julia (2012)
I noticed that today happens to be the 6th anniversary of this blog post being posted to HN, reddit, etc (previous HN discussion at https://news.ycombinator.com/item?id=3606380). I think it's fair to say that that event marked a major turning point in the development of Julia, probably doubling or tripling the contributor base overnight, many of whom (myself included) are still actively involved in the community. It's a little funny to see the blog post talk about 1.0 (that release would eventually be called 0.1), since that's still not out 6 years later (though this time around it is actually soon to be released). The blog post says julia was 90% done at the time - I guess it's true what they say, 10% of the work takes 90% of the time.
KenoFischer··on Julia v0.7.0 Release Notes
Essentially yes.
KenoFischer··on Python 1.0.0 is out (1994)
One nice thing about Julia is that you basically never have to think about the indices. One of the primary reasons for this is that people using julia like array types with all types of strange and wonderful index sets (e.g. skew lattices to slice through a higher-dimensional array which people in medical imaging like apparently). As such, there are easy and convenient abstractions that are independent of the index space and all of the standard libraries and most external packages use these (to be able to deal with non-standard arrays).
KenoFischer··on The Rise of German Board Games
Catan has significantly more adversarial aspects than Monopoly; Cutting off roads that players need, controlling the placement of the robber, choosing who to steal from, denial of trade of resources. I think one of the things that makes Catan so rage-inciting, is that it's quite common to take actions to deny the other players points, even if it has a negative effect on your overall position.
KenoFischer··on Reading privileged memory with a side-channel
I'm really amazed by the simplicity of the meltdown gadget. After the initial blog post I played with a few variants, but always got the zeroed out register in the speculative branch. I guess what people (including me) were looking for here was some other side channel or instruction that did not have this mitigation in place (e.g. I had hoped a cmpxchg would leak whether the target memory address matches the register to compare with). The shl/retry loop makes a lot of sense if you instead assume that the mitigation was implemented improperly and can race subsequent uops. I really can't imagine why this data ever made it to the bypass network to be available to other uops.
KenoFischer··on NVIDIA GeForce driver deployment in datacenters is forbidden now
No, since the linux kernel is GPL, as far as I understand, their must be some part of their driver that is also available in source form to interact with the kernel API. I haven't investigated this at all, but it feels like it may be possible to hook that. It's a terrible amount of work of course, but would be kinda fun to try. Perhaps an easier thing to try would be to run something like QEMU and have it forward activity on the PCIe bus over the network to a host system. Not sure if that's something people have done before.
KenoFischer··on NVIDIA GeForce driver deployment in datacenters is forbidden now
Somebody should write an adapter that hooks into their GPL shim and forwards requests over the network to a machine not in the data center that runs their binary blob. Trying to limit use of certain hardware via stupid legal means just begs for stupid technical solutions.
KenoFischer··on Spacetime Calculus [pdf]
I love this write up, thanks for sharing. This is a very clearly structured overview of most of the basic formalism I remember from undergrad physics. I'll bookmark this as a refresher if I ever decide to do physics again. That said though, I'm not convinced that I would have been able to follow this document if I had not already been familiar with the formalism. Though the assumptions are generally stated, I suspect their implications are not clear to those approaching the subject for the first time.
KenoFischer··on EC2 Bare Metal Instances with Direct Access to Hardware
I have two use cases:

- General performance analysis. For this more counters is generally incrementally better.

- Running https://github.com/mozilla/rr. This requires the retired-branch-counter to be available (and accurate - sometimes virtualization messes that up)

The second one I actually care more about, because I've pretty much stopped trying to debug software when rr is not available, too painful ;). Feel free to email me (email is in my profile) for gory details.

KenoFischer··on EC2 Bare Metal Instances with Direct Access to Hardware
I'm really, really, happy about this. I've been complaining about the lack of cloud servers with exposed performance counters to any cloud vendor that'll listen (though of course nothing ever came of that). Kudos AWS, this is really cool.
KenoFischer··on Cling – An interactive C++ interpreter built on top of LLVM and Clang
It's the same kind of technology, though here they actually always load the interpreter into the process even when not used interactively, to allow things like dynamically loading additional code. They also use it to automatically compute file format layouts from C++ struct definitions, and it provides a C++ equivalent of eval().

One thing that I think is under-appreciated in this kind of thing is that a proper C++ repl is significantly less frustrating than a debugger. GDB's C++ mode is at best a poor emulation of the C++ language. LLDB does better because it reconstructs an actual C++ AST and runs it through clang but there's still a ton of limitation (e.g. you can't call any templates or inline functions from header files).

Interactive C++ is pretty fun, especially for prototyping. The biggest problem I generally run into is that APIs in C++ are not really designed to be used in that way (esp in libraries whose user's don't use these kinds of tools). Libraries in languages with interactive prompts tend to have APIs designed in such a way that you can get the simple thing done with very little code (one call, only the arguments you need, etc), while in C++ it's a lot more common to expect user's to copy/paste a snippet from the doc and adjust all the options they want to change. That works fine in an editor, but is pretty annoying in a prompt. The other thing I often run into is error handling. A lot of C++ libraries' error handling is to just call abort() (at best) or segfault, which again is mostly fine for a compiled problem, but is annoying in an interactive setting. You can work around that of course by catching the error/resetting state, but even then you often leave libraries in the wrong state.

KenoFischer··on Some Insights from a Julia Developer
For values with compiler-visible scoped lifetime, the compiler will automatically promote them to stack variables. There is currently no way to enforce this happening, but it would be perfectly possible to add such an annotation.

Regarding preallocation, you tend to want to avoid dynamic memory allocation in high performance applications anyway, so whether you do that in C++ or in Julia, doesn't really make too much of a difference. It is true this is a little harder to control in GC'ed languages than in languages where you have to do memory management manually, but the effect is about the same. Julia provides tools to figure out where you're using dynamic memory allocation and those tools will certainly improve in the future.

One thing I think is under appreciated from the performance perspective though is how easily julia lets you express data layout transformation to take better advantage of the cache hierarchy. I touched on this a bit in my JuliaCon presentation [1].

[1] https://youtu.be/uecdcADM3hY?t=32m19s

KenoFischer··on Some Insights from a Julia Developer
> although I am certain KenoFischer would

Sure would.

KenoFischer··on Building the Linux kernel with clang
It's about whether you can put stack allocated VLAs into temporary structs:

   keno@anubis:~$ cat test2.c
   void bar(int *);
   int foo(int n) {
       struct {
           int non_terminal_val[n];
           int some_other_member;
       } val;
       bar(val.non_terminal_val);
       return val.some_other_member;
    }
    keno@anubis:~$ gcc -c test2.c
    keno@anubis:~$ clang test2.c
    test2.c:4:13: error: fields must have a constant size: 
    'variable length array in
          structure' extension will never be supported
            int non_terminal_val[n];
                ^
    1 error generated.
KenoFischer··on LLVM 5.0.0 Release
One feature I'm excited about in this release is proper support for non-integral address spaces. Allows us to do significantly more optimization in the presence of GC roots in Julia.
KenoFischer··on Turing.jl: A Fresh Approach to Probabilistic Programming in Julia
While I have absolutely no problem believing that a carefully, tuned special purpose system like Stan readily beats the equivalent julia libraries, I'd caution against making inferences about the speed of any code written in a particular language as a result. Once a certain level of performance is reached, for most applications, the primary performance factor is algorithmic (and I include things like memory layout/cache friendliness in these). As the simplest example, consider matrix multiply. The venerable triple-loop will perform about the same whether it is written in Julia, C, Assembly, Rust, Nim or Fortran (ignoring for the moment compilers with specific matmul pattern recognition). However, depending on your CPU, you're leaving anywhere between 10-100x performance on the table by not using BLAS. Now, BLAS happens to be written in assembly and Fortran, but that's not the point. If you used the same algorithms in Julia code, it would achieve the same performance.

As for the benchmarks you posted, the worst I see Julia performing in that list is on the JSON benchmark. However, again, that's benchmarking a library. Doing high performance text parsing well is a non-trivial problem and JSON.jl isn't a super high performance library. The fact that nobody has sat down and written one yet is more of a reflection of the user community (since JSON is mostly associated with the web stack, JSON-parsing tends to be more incidental for julia users, than languages/libraries that are more focused in that area) than any performance limitation of the language - in fact I think I recently did see somebody working on a higher-performance version, but I don't have the link handy.

To summarize, it is true that some languages (or rather their implementations) are slow, causing an automatic slowdown to projects written therein, but that is generally not the case for julia (or C or Nim or Rust, etc). Once you get to that point, other things matter more, and it is important to distinguish that. In the case of Turing.jl, the linked wiki mentions that one of the primary factors impacting performance is their use of forward AD, when reverse AD would be algorithmically better. It seems understandable, that a newer project would be algorithmically less sophisticated than a more established one. However, that'll get fixed over time and the other benefits will become more and more prominent as a result.

KenoFischer··on Generic GPU Kernels in Julia
The `generic` in the title applies to `kernel` rather than `GPU`. However, since LLVM does have an AMDGPU backend I suspect it's possible to do the same for AMD GPUs as well using the same technique and without changing the frontend code (assuming the AMD driver accepts whatever comes out of the AMDGPU backend). However, I can hardly blame folks for focusing on NVIDIA devices. For better or worse, they're dominating the GPGPU space right now. Just as an example, all the cloud providers have NVIDIA GPUs on offer, but the same is not true for AMD GPUs (though IIRC, Google is planning to offer them in the next generation).
← PreviousPage 12 of 17Next →