Rootbeer GPU Compiler Lets Almost Any Java Code Run On the GPU
github.com
github.com
Decompressing a 5MP jpg then applying various filters is too lightweight a task to benefit. I thought that would be more or less a perfect GPU task, not so.
Running on OpenCL, the CPU with vector instructions horses a small GPU performance wise for this problem.
This should be a performance nightmare.
import edu.syr.pcpratts.rootbeer.testcases.rootbeertest.serialization.MMult;
This seems like a pretty amazing project if the claims are true, though - I wasn't aware that CUDA was able to express so many of the concepts used to implement Java applications. The performance data in the slides is certainly compelling!
Ruby has Modules, but many, many common libraries do not use them. I had fun recently debugging a project that (through transitive dependencies) relied on two different "progress bar" libraries, both with a class called "Progress", and neither of which was namespaced. Namespaces solve a real problem.
Of course, that can be solved with proper tooling, but some people are just averse to using something more heavyweight than necessary.
- make things unique
- group things logically (which makes the systems design more explicit)
This applies to all programming languages. It's just that there's a convention in the Java community to prefix namespaces with a FQDN, which adds to the length. But you're free to choose another convention if you fancy. Although I wouldn't recommend since it's not a major issue, especially considering IDE support.
Writing Java is unbearable without Eclipse/Netbeans. .NET a little bit less unbearable
If your IDE "works harder" than your compiler, something seems wrong to me (of course we all expect things like syntax highlighting today)
(Also I have written a fair amount of Java in vim and I didn't find it any more frustrating than writing Ruby in vim. And I don't even like Java.)
Probably doing socket programming in C is easier than in Java
(to be fair, it wasn't Java really, it was "OO evangelists" most likely, starting with C++ then going crazy with Java. Too bad they didn't even touch smalltalk
Actually... networked programming is really easy in Java.
You are right though the state of a lot of java libs is hilarious! Smalltalk seems really cool but I've never had a reason to devote time to it.
I learned OOP with Smalltalk/V, wrote some apps with Actor on Windows and, when first confronted with C++ I closed the book in horror and only came back 8 years later.
And even without an IDE, it's hardly that difficult to use namespaces. As has been mentioned here already, they solve a real problem, are necessary, and are much better than not having them.
This just seems like ignorant hating.
It's hard for a Java zealot to understand this position for some reason.
It's just a way to run code interactively. "A whole REPL" is something that usually fits in 10 lines of code. With comments.
I don't hate Java. In fact, along with Python and C, it's one of my favorite (and more used) languages. But I do realize it has a huge potential for being abused in horrible ways.
Don't blame the language for what some guys do with them.
The only reason you see the fully qualified class names is because the IDE does this automatically for you. If there were no IDEs everyone would be using the *s;
On the flip side, wildcard imports make coding much more fluid and concise. How many times have you had to hit ctrl+space two or more times in the same declaration to add import statements for interfaces and classes from the same package? IMHO, explicit imports greatly decrease the usefulness of the static import feature.
Pretty much everyone uses an IDE anyway so it's not like namespaces are ever an issue unless you do come across that rare name clash.
This 'its good enough, and everyone does it anyway' attitude leads us to incredibly damaging status quos.
http://nvidianews.nvidia.com/Releases/NVIDIA-Contributes-CUD...
in other words, with that and the right frontend, you can take Language X, compile to LLVM IR, and run it through the PTX backend to get CUDA.
however, in the grand scheme of things, this probably doesn't make GPU programming significantly easier to your average developer (as you still have to deal with big complicated parallel machines); what it really does is ease integration into various codebases in those different languages.
The headline is misleading; only a small subset of Java can be ported to the GPU. It works great for inner math loops and such, but not for higher level problems. Even if the author managed to find a way to translate more complicated problems (I see object locking in the list of features), they would be better suited to run on a CPU, or refactored to avoid locks.
I'm not sure what the "essentially" means here, but this is the first "big" program I'm aware of that name-checks TDD, and a counter-example to my theory that programs where much of the programmer effort goes into algorithms and data structures are not suited to TDD.
Was the TDD approach "pure"? (Only one feature implemented at a time, with absolutely no design thought given to what language features might need to be implemented in the future.)
I think most of the GPU-based bitcoin farmers are using desktop hardware, but I might be wrong.
One is the tiny ancient GPUs used to drive VGA outputs on servers. Those are hardly even worth talking about; they're only there so that you can hook a monitor up in an emergency.
And then there are real server GPUs, like nVidia Tesla stuff. Those typically don't even have video outputs, but they're on par with modern high-end gaming GPUs, possibly even better at some tasks.
I believe most bitcoin farmers are still using desktop GPUs, but that's largely just because they're running relatively simple kernels, all things considered, and because desktop GPUs are cheaper and easier to source.
Also, AMD tends to be more cores at a lower clock rate than nVidia. For embarrassingly parallel integer operations (like hashing) AMD blows nVidia out of the water.
So I guess you still end up writing your algorithm in OpenCL / Cuda and maybe use the serialization provided by this lib.
Update: (Just read the hpcc_rootbeer.pdf slides.) You write your _parralellized_ implementation of an Algorithm in Java - and it will be executed on the GPU.
If Rootbeer or something similar allows me to program CUDA stuff in Clojure, then I am impressed and excited.
It would be interesting to see how functional languages designed for parallelism perform on gpu.
It would be bad to compromise the freedoms of the users in order to be able to limit the freedoms of more of them.
Any reason why the GPLv3 would be considered unsuitable? How about the LGPLv3?
4. sleeping while inside a monitor.
... Can someone clarify what this is? // In Java, all instances of Object are also a monitor.
// See https://en.wikipedia.org/wiki/Monitor_%28synchronization%29
Foo myMonitor = new Foo()
// To "enter" a monitor, you use 'synchronized'.
synchronized (myMonitor) {
// Inside the monitor, we could do a Thread.sleep.
Thread.sleep(100);
}
This is a very simplistic problem case. However, it is very possible for this to become a bigger problem. Because I can call arbitrary code when "inside" a monitor, it is very possible to call a method that does a sleep incidentally. (e.g. many implementations of IO operations will require some sort of sleep.)Now, this also doesn't solve the issue of needing to consider the parallel architecture when coding the kernel to actually make use of the hardware. Nevertheless, kudos to the guys behind this.
The biggest problem I could see would be when your computer becomes part of a botnet. Your computer could be used for brute fore encryption cracking. Again, this was also possible with just CUDA or OpenCL.