Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Fucking Java!

Name: kinghajj !kiNgHAJjDw 2009-08-18 20:35

Here's a Base64-encoded tarball with two versions of the same Java program, which solves XKCD #287 (NP-Complete) by backtracking. If you diff them, they are--for all intents and purposes--the same. The "new" version was after I imported the files into NetBeans and ran the code formatter; the "old" version is my original. The old one runs fine, but the new one fails with a StackOverflowError. Can /prog/ spot what's different about the new version that makes it fail?

"Java Anomaly.tar.gz.b64"
http://pastebin.com/m5e996d07

Name: Anonymous 2009-08-18 20:35

NO EXCEPTIONS

Name: Anonymous 2009-08-18 20:36

Null Pointer Exception.

Name: Anonymous 2009-08-18 20:38

Name: Anonymous 2009-08-18 20:52

XKCD #287
I found the problem.

Name: Anonymous 2009-08-18 21:47

Ah, it appears that overloading the Sequence.equals() method was the problem, which was a symptom of a larger problem with how I implemented Sequence.hashCode(). Again, thanks for nothing, /prog/.

Name: Anonymous 2009-08-18 21:58

Again, thanks for nothing, /prog/.
Maybe next time you'll start a thread worth replying to instead of outsourcing your problems to us.

Name: Anonymous 2009-08-18 22:57

Name: Anonymous 2011-11-24 11:51

>>11
nice dubs bro

Name: Anonymous 2011-11-24 13:06

>>10

Thanks, bro!

Don't change these.
Name: Email:
Entire Thread Thread List