News for hackers. Stuff that matters.
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by kevingadd on Sunday August 12, 2012 @01:24AM (#4371945)
I had forgotten just how much I hate java namespaces.

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!

Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by kaffeinecoma on Sunday August 12, 2012 @08:39AM (#4372436)
It's nothing compared to the pain of debugging in a language that doesn't have/encourage proper namespaces.

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.

Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by pmr_ on Monday August 13, 2012 @05:58AM (#4375166)
The thing with namespaces is that they also introduce a problem through the various using clauses programming languages provide and how that interacts with common tools like grep. An API that uses a naming-convention that emulates namespaces (e.g. as in Emacs Lisp) removes that problem. This also makes good harder to follow when reading, especially when C++ things like SFINAE are around and suddenly everybody is calling everything fully qualified again to make code look and be unambiguous.

Of course, that can be solved with proper tooling, but some people are just averse to using something more heavyweight than necessary.

Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by rickette on Sunday August 12, 2012 @06:04AM (#4372276)
Does it really matter? Namespaces/packages only serve to:

- 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.

Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by mintplant on Sunday August 12, 2012 @02:09AM (#4371996)
It's really not a problem when IDEs like Eclipse and Netbeans automatically handle imports for you.
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by archangel_one on Sunday August 12, 2012 @04:46AM (#4372194)
It's a problem with a language if it requires heavyweight environments to make aspects of writing code in it acceptable.
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by raverbashing on Sunday August 12, 2012 @05:13AM (#4372228)
This

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)

Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by DrJokepu on Sunday August 12, 2012 @07:03AM (#4372329)
Meh. It's about trade-offs. Some languages are designed to be lightweight and require minimal assistance from the IDE. Some languages are optimised for very large codebases and expect a lot of "ceremony and plumbing" around them. And then there are, of course, millions of shades between the two extremes. Java and C# are in the second group. These are all very useful tools when used for the right purposes.

(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.)

Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by yason on Sunday August 12, 2012 @11:25AM (#4372692)
Java pretty much created the concept of a modern IDE where the editor knows about the libraries and does boilerplate expansion for you. This wasn't generally needed before the age of Java.
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by raverbashing on Sunday August 12, 2012 @11:53AM (#4372767)
Java also invented extreme overengineering of libraries, making it a need to have syntax completion for even trivial tasks

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

Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by Deinumite on Sunday August 12, 2012 @03:11PM (#4373278)
> Probably doing socket programming in C is easier than in Java

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.

Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by rbanffy on Sunday August 12, 2012 @10:23PM (#4374331)
Learning OOP with Smalltalk can actually hurt your career.

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.

Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by michaelcampbell on Sunday August 12, 2012 @02:03PM (#4373103)
Is not smalltalk's "IDE" so, so much more all-knowing than any java one?
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by ZoFreX on Sunday August 12, 2012 @08:53AM (#4372461)
It's not unbearable, I've done a huge amount of Java coding on the command-line. Yes, it's harder, but I strongly believe it's better to move onto Eclipse only after learning how the tools actually work underneath. It makes it far easier to debug weird issues with the IDE, and means you're not SOL if the IDE breaks, or you're on another person's computer - you're just a bit slower, and I'd argue that applies to all tools (custom aliases, bash scripts, vim config) and not just IDEs.
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by Danski on Sunday August 12, 2012 @06:01AM (#4372275)
This may be a problem if your truck breaks down in the desert, your 3g is out of range and you never thought to install an ide beforehand but apart from that when would you find yourself writing java without an ide?
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by qxcv on Sunday August 12, 2012 @07:00AM (#4372325)
When you're using somebody else's computer.
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by markokocic on Sunday August 12, 2012 @08:51AM (#4372455)
When was the last time any professional software developer was forced to do any real development on someone elses computer? In that case it is likely that one will miss his keyboard, desktop shortcuts, shell aliases, browser bookmarks much more than tour ide.
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by dman on Sunday August 12, 2012 @11:50AM (#4372760)
So you have never been asked for help from a junior developer whose development setup is different than yours?
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by markokocic on Sunday August 12, 2012 @02:08PM (#4373120)
Help in this context means discussion, advice, him showing me what he had done, me suggesting quick solution, or talking to him what to type, similar to pair programming. If _I_ had to actually write more than few lines of code, we'd just switch to my computer.
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by ShabbyDoo on Sunday August 12, 2012 @11:45PM (#4374514)
We have a standard IDE set-up for our team and require more junior devs to use it -- a least when starting out. It makes pairing with them easier.
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by reeses on Monday August 13, 2012 @01:13AM (#4374650)
The junior developer who insists on not using an IDE working with Java is precisely the one who needs the most help.
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by pooriaazimi on Sunday August 12, 2012 @08:46AM (#4372446)
Edge case. I develop on my own machine (That said, I absolutely hate the verbosity of Java and love Nods.js exactly for this reason).
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by hnriot on Sunday August 12, 2012 @12:14PM (#4372810)
Is this really a concern? It's like blaming C for needing an editor, what's the big deal about using an IDE for some languages. It makes you more productive and they are not heavyweight by modern laptop standards.

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.

Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by pi18n on Sunday August 12, 2012 @02:05PM (#4373113)
You are assuming the IDE makes everyone more productive. For some people that is absolutely not the case. And the idea that you need to use an IDE for a bunch of boilerplate is abhorrent to them.

It's hard for a Java zealot to understand this position for some reason.

Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by AlisdairO on Sunday August 12, 2012 @05:24PM (#4373695)
It's pretty hard to imagine an IDE not making a Java programmer more productive. The difference is truly astounding.
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by chc on Sunday August 12, 2012 @03:20PM (#4373314)
Is that why Lisps are so poorly thought of? They're designed around the idea of having a whole REPL all the time.
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by rbanffy on Sunday August 12, 2012 @10:26PM (#4374341)
Do you even know what a REPL is?

It's just a way to run code interactively. "A whole REPL" is something that usually fits in 10 lines of code. With comments.

Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by rabbitfang on Sunday August 12, 2012 @04:47AM (#4372196)
That is an unusually long namespace. It says more about the coding style of the programmer that wrote it than it does about Java.
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by rbanffy on Sunday August 12, 2012 @10:15AM (#4372565)
After a while, most Java developers start thinking it's ok to build deep hierarchies of modules.
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by jbooth on Sunday August 12, 2012 @11:27AM (#4372701)
Complaining about java as a language for providing a namespace feature that's basically identical to every other language just shows a want to hate on Java.
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by rbanffy on Sunday August 12, 2012 @06:31PM (#4373842)
It's OK to build hierarchies of modules. It's not OK to make them deeper than needed and violate YAGNI with sparse hierarchies prepared for situations that'll never arise. Not all programmers fall into this trap, but due to IDE support, Java developers are specially vulnerable because, for them, it costs nothing - programs do the job of keeping everything neatly over-organized.

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.

Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by pjmlp on Sunday August 12, 2012 @01:49AM (#4371974)
You find similarly named namespaces, packages, modules in most languages that support modules.

Don't blame the language for what some guys do with them.

Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by strictfp on Sunday August 12, 2012 @05:49AM (#4372264)
If they would remove all the redundant information it would be a lot better.
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by taligent on Sunday August 12, 2012 @02:23AM (#4372015)
import edu.syr.pcpratts.<asterix>;

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;

Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by nradov on Sunday August 12, 2012 @02:46AM (#4372049)
Wildcard imports are a bad idea regardless of whether you're using an IDE or not due to the risk of future name conflicts.
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by jburwell on Sunday August 12, 2012 @10:36AM (#4372599)
This sentiment is dogma from long ago when there was a slight performance improvement for individual imports. Today, there is no such performance advantage. Their risk of a namespace collision, but in practice, it is very rare and very easy to identify when it does. The main reason it remains is mainly due to default IDE configuration.

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.

Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by nradov on Sunday August 12, 2012 @09:26PM (#4374212)
There has never been any runtime performance difference between individual and wildcard imports. Compiled byte code is identical.
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by hythloday on Sunday August 12, 2012 @11:38AM (#4372726)
Name conflicts are a compile error - the worst thing that can happen is that you have to change it back to an explicit include.
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by mateuszf on Sunday August 12, 2012 @03:18AM (#4372084)
They are not a bad idea if you use and IDE and not an editor. IDE lets you find usages of a type instantly. Anyways such conflicts are rare.
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by hnriot on Sunday August 12, 2012 @12:11PM (#4372804)
True iff the code cannot be modified (say for example it's packaged in a jar and is closed source), otherwise this is trivially worked around on the very few times it ever happens.
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by nradov on Sunday August 12, 2012 @09:29PM (#4374219)
This issue is irrelevant for jar files. Compiled byte code contains fully qualified class names, not import statements.
Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by taligent on Sunday August 12, 2012 @03:15AM (#4372081)
My point was more than Java namespaces can be easy to use.

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.

Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by lloeki on Sunday August 12, 2012 @05:11AM (#4372227)
> Pretty much everyone uses X anyway so it's not like Y are ever an issue

This 'its good enough, and everyone does it anyway' attitude leads us to incredibly damaging status quos.

Re:Rootbeer GPU Compiler Lets Almost Any Java Code Run On th... by Karunamon on Sunday August 12, 2012 @11:17AM (#4372670)
Often though, "good enough" really is good enough. You can spend untold man hours trying to get that last little bit of perfection and never really achieve it anyways.