Switch to DuckDuckGo Search
   March 12, 2011  
< | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | >

NOTICE: This channel is no longer actively logged.

Toggle Join/Part | bottom
[00:01:01] *** mescalinum has quit IRC
[00:03:18] *** maxorator has quit IRC
[00:03:21] *** jdolan has quit IRC
[00:04:45] *** genesiss has quit IRC
[00:07:15] *** Berzerker has joined ##java
[00:07:33] <Berzerker> how do I show a popup with just a simple message on it, maybe an OK button
[00:07:50] <ernimril> ~~Berzerker javadoc JOptionPane
[00:07:50] <javabot> Berzerker: http://is.gd/jrjgW [JDK: javax.swing.JOptionPane]
[00:08:01] <Berzerker> ah, using JOptionPane huh
[00:08:05] *** eflynn has joined ##java
[00:08:39] <Berzerker> ernimril: what about ShowMessageDialog() ?
[00:08:45] <Berzerker> err, nvm
[00:09:01] *** io2 has quit IRC
[00:10:12] *** Wyzard has joined ##java
[00:10:59] *** fisted has quit IRC
[00:13:24] *** dandre has joined ##java
[00:13:35] <dandre> hallo
[00:14:10] <dandre> i have read several docs about jaf and it could solve my problem
[00:14:19] <Berzerker> ernimril: so when I use JOptionPane.YES_NO_OPTION, how do I execute something only if the person pressed ok?
[00:14:20] *** theseb has quit IRC
[00:14:37] <ernimril> Berzerker: what is the return value?
[00:14:58] <Berzerker> it's a confirmation dialog to reset an int
[00:15:00] <Berzerker> but it's not returning anything
[00:15:04] <Berzerker> it's setting a variable
[00:15:14] <dandre> what I don't have understood is how to use jaf to launch registerd commands for mime or files extension in the system
[00:15:51] <dandre> all what I have seen is launching some class available in the classpath
[00:16:00] <dandre> is there any solution?
[00:16:17] <ernimril> Berzerker: did you ever consider to read the tutorial on JOptionPane? you know the tutorial that the javadocs for it link to
[00:16:26] <Berzerker> ernimril: setting the JOptionPane to a result, then JOptionPane.YES_OPTION, I guess
[00:18:14] *** LouisJB has quit IRC
[00:20:11] *** Niamkik has quit IRC
[00:20:31] *** glcrazy has quit IRC
[00:20:40] *** saml has quit IRC
[00:25:51] *** frangiz has quit IRC
[00:27:17] *** Berzerker has left ##java
[00:28:02] *** Kamaran has quit IRC
[00:30:20] *** Lone_Rifle has joined ##java
[00:30:33] *** m_W has quit IRC
[00:32:52] *** l2trace99 has quit IRC
[00:35:13] *** Seppoz has joined ##java
[00:35:15] *** jcp has quit IRC
[00:36:11] <Seppoz> glasfish provide asyncroncontex, does that only aplly for sending data to the user or also for data from the user? like establishing a connection from the user and send data over it
[00:36:35] *** phantomcircuit has joined ##java
[00:36:35] *** Rayne has quit IRC
[00:37:02] *** jcp has joined ##java
[00:37:12] *** rnigam has quit IRC
[00:38:16] *** gelignite has quit IRC
[00:44:04] *** Mooniac has quit IRC
[00:47:34] *** fisted has joined ##java
[00:48:26] *** djbpython has quit IRC
[00:49:19] *** djbpython has joined ##java
[00:50:11] *** BoF has quit IRC
[00:50:24] <mrapple> so, when opening a file like File f = new File(args[0]); do i need to close the stream eventually?
[00:50:58] *** vdv has quit IRC
[00:51:30] <Lone_Rifle> mrapple: it's good practice to.
[00:52:09] <mrapple> Lone_Rifle: how do i :P
[00:52:18] <mrapple> and if it exists, will that overwrite it?
[00:53:13] <cheeser> new File() doesn't open anything.
[00:53:21] <cheeser> doesn't affect anything on disk.
[00:53:51] <svm_invictvs> THe file doesn't even have to exist, iirc...
[00:53:56] <cheeser> nope
[00:54:06] *** djbpython has quit IRC
[00:54:08] *** Fisiu has joined ##java
[00:54:09] <cheeser> the path can be random text, really
[00:56:39] <svm_invictvs> "File" is kind of a misnomer, imo. It's more like a path...
[00:57:15] <mrapple> i was just using it for f.exists();
[00:58:43] *** fisted_ has joined ##java
[00:59:06] <svm_invictvs> It's basically a wrapper around fstat and similar functions.
[00:59:25] *** cythrawll has quit IRC
[01:00:06] <ernimril> svm_invictvs: sadly it is quite an expensive wrapper with very low functionality
[01:00:16] *** fisted has quit IRC
[01:00:36] <ernimril> svm_invictvs: jdk7 will hopefully add the Path class and nio2 to update the file/fstat/permission handling
[01:00:53] *** gcristian has quit IRC
[01:01:02] *** eflynn has quit IRC
[01:01:05] <ernimril> hmmm, why are a lot of the bugs for jdk/7 not available... :-(
[01:01:31] *** gcristian has joined ##java
[01:01:35] <svm_invictvs> ernimril: oh?
[01:01:46] <svm_invictvs> ernimril: I dont' know too much about its inner-workings
[01:02:14] <ernimril> svm_invictvs: if you only do simple things with File it is usually usable
[01:02:41] <svm_invictvs> ernimril: I very rarely use it directly.
[01:02:46] <svm_invictvs> ernimril: Why's it so expensive?
[01:03:31] <ernimril> svm_invictvs: basically all calls to it do one native call, with no caching
[01:03:59] <ernimril> svm_invictvs: exists() = native call, length() = native call, isReadable() = native call
[01:04:55] <ernimril> svm_invictvs: and using the list*() methods on a large directory will allocate big arrays meaning lots of memory
[01:06:00] <ernimril> svm_invictvs: or silly things like delete() will return a boolean but if it fails you get no information about why you couldn't remove the file
[01:07:00] <svm_invictvs> ernimril: Well, that I agree with.
[01:07:47] *** BSWolf has quit IRC
[01:07:48] *** BSWolf2 has joined ##java
[01:08:21] *** ninja_sense has joined ##java
[01:08:43] *** BSWolf2 is now known as BSWolf
[01:08:44] <svm_invictvs> ernimril: The fact that the interface is kind of sloppy. "OH you ddind't delete that file? Why?"
[01:11:06] *** Lone_Rifle has quit IRC
[01:11:40] *** gelignite has joined ##java
[01:13:31] *** Fuco has quit IRC
[01:19:29] *** jpk has quit IRC
[01:21:14] *** azazul has joined ##java
[01:21:21] *** azazul has left ##java
[01:21:27] *** ExtraSpice has quit IRC
[01:28:04] *** magn3ts has quit IRC
[01:30:10] *** psst has quit IRC
[01:30:22] *** ninja_sense has quit IRC
[01:33:11] *** magn3ts has joined ##java
[01:36:35] *** Cymage has quit IRC
[01:37:32] *** GreYFoXGTi has joined ##java
[01:39:51] *** pertl has quit IRC
[01:40:11] *** pt108 has joined ##java
[01:41:41] *** Cymage has joined ##java
[01:42:20] *** alexhofbauer has quit IRC
[01:45:58] *** tessier_ has joined ##java
[01:46:48] *** whilo has joined ##java
[01:47:05] *** andrew-101 has joined ##java
[01:48:22] <moqq> what's the best way to store/access something long lived in servlet environment (like a caching template manager)
[01:48:32] *** VJTachyon has quit IRC
[01:49:08] *** Fisiu has quit IRC
[01:49:54] *** GreYFoXGTi has quit IRC
[01:50:09] *** GreYFoXGTi has joined ##java
[01:50:25] <whilo> hi, i am trying to query postgresql with preparedstatement like "where parsed_timestamp > ?" but when i try to escape the ? with parantheses i get out of bound errors
[01:50:43] *** shurane_ has quit IRC
[01:50:56] <whilo> the string for the timestamp contains several whitespaces so i have to escape, right?
[01:51:25] *** bitshuffler has joined ##java
[01:51:46] *** Fisiu has joined ##java
[01:53:10] <whilo> more exactly "where parsed_timestamp \"?\"" gives: PSQLException: The index 1 is outside of bounds bla bla. Number of coilumns: 0.
[01:53:17] <whilo> how do i do that right?
[01:58:01] *** Versuchen has quit IRC
[01:58:36] *** DJClean has quit IRC
[01:59:20] *** jdolan has joined ##java
[01:59:41] *** ccidral has quit IRC
[02:00:41] *** bitshuffler has quit IRC
[02:01:22] *** eflynn has joined ##java
[02:04:07] *** cbrock has quit IRC
[02:04:39] *** bitshuffler has joined ##java
[02:08:58] *** pt108 has left ##java
[02:11:56] *** Odd_Bloke is now known as vuliev
[02:12:04] *** vuliev is now known as Odd_Bloke
[02:12:07] *** Luc1fel has quit IRC
[02:12:16] *** Odd_Bloke is now known as MrWilson
[02:12:47] *** MrWilson is now known as Odd_Bloke
[02:13:15] *** Odd_Bloke is now known as FauxFauxFaux
[02:13:32] *** FauxFauxFaux is now known as spoonspoons
[02:13:36] *** spoonspoons is now known as MrWilson
[02:13:39] *** MrWilson is now known as Muz
[02:14:52] *** Rissien has quit IRC
[02:16:10] *** arborist has quit IRC
[02:19:09] *** Fisiu has quit IRC
[02:23:43] *** pipeep has joined ##java
[02:25:55] *** dlam has quit IRC
[02:29:12] *** jesmon has joined ##java
[02:29:20] *** riotz has quit IRC
[02:34:42] *** dwilliamii has quit IRC
[02:39:38] *** xiliax has quit IRC
[02:40:40] *** rjohnson19 has quit IRC
[02:43:00] *** andrew-101 has quit IRC
[02:45:27] *** andrew-101 has joined ##java
[02:48:37] *** eflynn has quit IRC
[02:52:10] *** andrew-101 has quit IRC
[02:52:58] *** msieradzki has quit IRC
[02:57:02] *** wolfman2000 has quit IRC
[03:02:21] *** smerz has quit IRC
[03:03:30] *** Raystorm has quit IRC
[03:07:35] *** subichan has joined ##java
[03:08:54] <subichan> hi guys I was wondering, to declare a static class Pitch in Semantics implementing Comparable, is there any difference between "static class Pitch implements Comparable<Semantics.Pitch>" and "static class Pitch implements Comparable<Pitch>" ?
[03:08:57] *** cbeust has quit IRC
[03:09:33] *** cbeust has joined ##java
[03:09:49] *** pipeep has quit IRC
[03:11:09] *** Sliker has quit IRC
[03:11:41] *** pipeep has joined ##java
[03:22:23] <Planck_> subichan: None at all, they both name the same type.
[03:23:04] <Planck_> Semantics.Pitch is just a bit more explicit about the nesting relationship.
[03:23:30] <subichan> I was surprised that namespace rules were the same for stuff between <>
[03:24:23] <subichan> i'm not very used to generics yet. well thank you man
[03:25:32] <Planck_> Heh, I've got a question of my own (not related to generics though)
[03:26:29] <Planck_> As a learning exercise I'm writing a client/server app and want to carry out actions in the server in response to messages from the client. Is there a "nice" wat to map one into the other? I wasn't entirely happy with previous attempts (though they worked)
[03:27:03] <Planck_> wat->way in the above.
[03:27:11] <cheeser> map what?
[03:27:50] <Planck_> Various types of Message objects into actions in the server
[03:28:29] *** pipeep has quit IRC
[03:28:56] <cheeser> reflection, a Map, an if/ese block
[03:32:08] *** Paradox has joined ##java
[03:32:15] <Planck_> The last time I used if/else; it seemed a bit "ad hoc" :-) I'll give the Map a go, see what it looks like in the end.
[03:33:14] <surial> ~~ Planck_ command pattern
[03:33:14] <javabot> Planck_, what does that even *mean*?
[03:33:15] <Paradox> forgive me for a noob question, but say I have a map. I want to use a for-each, and print out one line per key-val pair, something like this: Key: Value
[03:33:17] <surial> ~~ Planck_ command
[03:33:17] <javabot> Planck_, what does that even *mean*?
[03:33:18] <Paradox> i know how to do the printf
[03:33:23] <surial> I know there's a factoid somewhere.
[03:33:40] <surial> Paradox: iterate over the result of .entrySet().
[03:33:40] <Paradox> but i'm stuck on retrieving the keys as well as the values
[03:34:04] <Paradox> surial, hmm
[03:34:08] <surial> for (val e = map.entrySet()) { System.out.printf("%s: %s\n", e.getKey(), e.getValue());
[03:34:14] <Paradox> ah
[03:34:16] <surial> Just remove the { and that'll work.
[03:34:33] <surial> oh, and, er, delombokify the 'val'.
[03:34:43] <Paradox> yeah
[03:35:05] <Paradox> is getKey and getValue new? just realized i had 1.4.2 doc open instead of newer
[03:35:07] <Paradox> stupid google
[03:35:16] <surial> No.
[03:35:26] <surial> Paradox: e = Map.Entry<A, B>
[03:35:29] <Paradox> ah
[03:35:39] <surial> Wait, I fucked that up. Hold on.
[03:35:43] <surial> for (val e : map.entrySet()) { .... }
[03:35:52] <surial> That's the right syntax.
[03:35:56] <Paradox> yeah
[03:36:00] <Paradox> i interpreted it as scuh
[03:36:01] <Paradox> such
[03:36:18] <Paradox> I'm noob, but i at least know the fundamentals of the language ;)
[03:36:26] *** gelignite has quit IRC
[03:36:52] <Paradox> entrySet returns a set though, so are getKey and getValue part of the set spec?
[03:36:56] <Paradox> i dont see them in javadoc
[03:37:04] <Paradox> or are they inherited
[03:37:31] <surial> Paradox: Okay. So I guess you don't understand the fundamentals. Sigh. This is going to take a while.
[03:37:38] <Paradox> surial, no worries
[03:37:39] <Paradox> if that works
[03:37:41] <Paradox> ill just go with it
[03:38:02] *** t0rc has joined ##java
[03:38:04] <surial> Paradox: First of all, if they are inherited, they are listed in short, so a search through the page will still find them. Secondly, for (Type varName : someIterable) will iterate through each *MEMBER OF THE ITERABLE*.
[03:38:14] <Paradox> ah
[03:38:31] <surial> So you get a set, and thus the foreach syntax will iterate through each member of it. Thus, the 'e' is not the set, it's a member of the set. The members of this set are Map.Entry objects. These have had .getKey() and .getValue() since the day they were written.
[03:38:45] <Paradox> heh, thanks
[03:39:19] <Paradox> and…there it is, found the doc for it, was under nose, just didn't look for it
[03:39:26] *** eidolon has joined ##java
[03:39:29] <surial> Your IDE will be telling you that calling .entrySet() on that thing returns a "Map.Entry<A, B>" with appropriate values for A and B (Probably both String, I don't know what kind of map you're working with).
[03:39:37] <surial> Er, sorry, a Set<Map.Entry<A, B>>.
[03:40:26] <Paradox> Its 2 strings, so nothing complex
[03:40:31] <Planck_> Ah right surial, command pattern is a pretty good fit. Thanks :)
[03:40:41] <surial> Planck_: :)
[03:42:23] <eidolon> hey anyone wicked smaht on Spring 3.0 stuff? trying to get jpa working, have my contexts set, but when i go to access my DAO, I get this error: http://pastebin.stonekeep.com/11589
[03:43:18] *** lolsuper_ has quit IRC
[03:44:30] <surial> eidolon: Well, this shit is why DI is not always such a nice idea. Though to be fair, good lord that's a fucking mess. Worth a bug report.
[03:44:38] <surial> eidolon: Wild shot in the dark: Are anonymous classes involved?
[03:44:57] <eidolon> i don't think so. i'm using a DAO implementation that was donated to me….
[03:45:23] <surial> also, in general an error that follows the pattern "Object of type FOO cannot be assigned to / converted to / etc to FOO" (with both FOOs the exact same type), you're abusing classloaders.
[03:45:30] <eidolon> heh
[03:45:37] <surial> No idea if any of this is going on, just guessing based on the error.
[03:45:39] <eidolon> well that would be -spring- abusing classloaders :)
[03:45:41] *** L-----D has joined ##java
[03:46:36] *** jbwiv has quit IRC
[03:46:41] <surial> Probably step one is to sort this error mess out. The paste is even cut off right in the middle, so I have some trouble believing this is truly all you got.
[03:47:56] <eidolon> that was just a paste grab problem. the line ends: [com.stonekeep.congo.dao.FriendDAO]: no matching editors or conversion strategy found
[04:01:16] *** diminish has quit IRC
[04:02:19] *** topriddy has quit IRC
[04:03:14] *** aidanna has joined ##java
[04:03:44] *** teralaser has quit IRC
[04:04:37] *** Dux has quit IRC
[04:04:40] *** subichan has quit IRC
[04:09:34] *** Cymage has quit IRC
[04:14:44] *** CodeWar has joined ##java
[04:16:22] *** yxz97 has joined ##java
[04:20:31] *** Cymage has joined ##java
[04:22:21] *** boringwall has quit IRC
[04:22:38] <yxz97> Hello
[04:27:11] *** tilerendering has joined ##java
[04:27:42] *** yates has joined ##java
[04:29:51] *** yates has quit IRC
[04:30:30] *** Gott__ has joined ##java
[04:32:36] *** homie has quit IRC
[04:38:17] *** youdonotexist has joined ##java
[04:38:31] *** andrew-101 has joined ##java
[04:40:01] <aidanna> howdy
[04:40:35] *** devkhadka has joined ##java
[04:47:24] *** c_axis has quit IRC
[04:50:18] *** servo has joined ##java
[04:53:40] *** bitshuffler has quit IRC
[04:54:32] <pen16> is it possible to protect your java source from being viewed?
[04:54:54] *** mrapple has quit IRC
[04:54:54] *** me1 has quit IRC
[04:56:41] <pen16> Given that the user has a .jar with .classes in it
[04:57:04] <cbeust> pen16: You can obfuscate it
[04:57:08] *** Matuku has quit IRC
[04:57:09] <pen16> That’s useless
[04:57:38] <pen16> for example, the Minecraft game .. it took them 2 weeks to run a decompiler and reconstruct the entire source
[04:57:45] <pen16> and they replaced all unlabelled variables
[04:58:06] <cbeust> It's not useless, it works very well, Minecraft is a great example of it
[04:58:12] <cbeust> Good luck decompiling the Minecraft source
[04:58:12] <pen16> Minecraft is obfuscated. It does nothing to stop anybody from having source
[04:58:21] <pen16> cbeust: Whattt?
[04:58:28] <pen16> the minecraft source is completely decompiled
[04:58:36] <cbeust> pen16: Nobody can prevent you from having the source, obfuscating will prevent people from making sense of it and modifying it
[04:58:46] <pen16> They made sense of it
[04:59:00] <pen16> They made it back to the original source nearly
[04:59:13] <cbeust> pen16: I really doubt that but happy to get a link
[04:59:24] <CodeWar> pen16, make it GPL
[04:59:27] <pen16> why would you doubt it if you dont know about it?
[04:59:39] <cbeust> pen16: Because I know what obfuscators can do
[04:59:46] <pen16> Obfuscators cannot do anything
[04:59:54] <pen16> you can run a simple decompiler. The end
[05:00:03] <pen16> java code reconstructed
[05:00:07] <cbeust> It's basically turning your source into assembly. You can make sense of assembly, but have fun with that
[05:00:13] <pen16> Wrong
[05:00:34] <cbeust> lol
[05:00:37] <pen16> You’re incorrect
[05:00:56] <pen16> ASM cannot be reconstructed into C/etc
[05:01:00] <CodeWar> seriously why bother so much about hiding source code.. are you embarassed by it?
[05:01:13] <CodeWar> release it as open source if you re mean put a bad license like GPL around it
[05:01:16] <pen16> Java bytecode is not opcodes -- its just a parse tree
[05:01:31] <cbeust> pen16: I just told you obfuscating is like turning into ASM. You're saying ASM can't be reconstructed (and I agree). Ergo, obfuscators work.
[05:01:44] <pen16> No, it’s not like turning it into ASM
[05:01:45] <cbeust> pen16: Bytecode is a parse tree? Seriously? You have a lot to learn.
[05:01:47] <pen16> you don’t understand the basics
[05:01:57] <CodeWar> cbeust, dont encourage him
[05:01:59] <cbeust> I don't understand the basics of the JVM? Haha.
[05:02:16] <pen16> No, you don’t even understand what is contained in the .class files
[05:02:26] <pen16> It’s not compiled
[05:02:28] <cbeust> pen16: You really, really have a lot to learn.
[05:02:33] <pen16> It can be instantly reconstructed into the exact Java code
[05:02:39] <pen16> without variable/function names
[05:02:40] <cbeust> pen16: Not if it's been obfuscated.
[05:02:48] <pen16> Yes, if it’s obfuscated
[05:02:56] <cbeust> <facepalm>
[05:02:57] *** eidolon has quit IRC
[05:03:08] <pen16> The obfuscation loses nothing except var/class names
[05:03:19] <cbeust> pen16: Do you even know how obfusation work? Default packaging and all that?
[05:03:35] <pen16> cbeust first, learn what’s in a .class
[05:03:38] <pen16> Then we can discuss
[05:03:40] <pen16> you need to go back to basics
[05:03:46] <cbeust> pen16: Never mind you just admitted that you don't know how obfuscation works since you think it's just about vars and classes.
[05:04:21] *** xianny has quit IRC
[05:04:44] <pen16> You seem to think that a .class contains compiled code
[05:04:49] <cbeust> pen16: Dude, I've never ever seen you here, you pop up and you want to lecture people about Java basics?
[05:04:57] <pen16> Yes you don’t know the basics
[05:04:59] <cbeust> Do you even know who is here?
[05:05:05] <pen16> You compared .classes to asm
[05:05:11] *** Gott__ has quit IRC
[05:05:39] <pen16> the .class file is just contains pre-parsed tokens
[05:05:43] <pen16> get it?
[05:05:45] <cbeust> You're the one asking if Java source can be hidden and you want to pass as an expert?
[05:05:57] <cbeust> pen16: Incorrect, an AST contains tokens, .class contains bytecodes.
[05:06:10] <pen16> the bytecode is the same as tokens in java
[05:06:18] <pen16> its not optimized
[05:06:22] <pen16> its 1:1 identical with the source
[05:06:25] <pen16> Nothing has been done to it
[05:06:25] <cbeust> pen16: Not even close, do you even know how a stack based VM works?
[05:06:52] <cbeust> .class can be reconstructed close to source code if it hasn't been obfuscated. If it's been obfuscated, good luck with that.
[05:07:08] <pen16> the obfuscation doesn’t have any effect on reconstruction
[05:07:13] <pen16> except loss of var/class names
[05:07:21] <cbeust> Nope, it does a lot more than that
[05:07:31] *** Gott__ has joined ##java
[05:07:33] <cbeust> de-inlining, inlining, putting all the classes in the default packages, etc...
[05:07:36] <pen16> anything “more” it does, is not strong enough for the decompilers
[05:07:40] <cbeust> Please do some homework, happy to chat with you after that
[05:08:10] *** SpaceDoG has quit IRC
[05:08:30] <cbeust> Advanced decompilers will actually generate synthetic methods to group code segments
[05:08:36] <cbeust> to make things even more confusing
[05:08:41] <cbeust> s/decompilers/obfuscators
[05:08:59] <pen16> that has no effect
[05:09:16] <cbeust> Besides contradicting what you just said? Indeed, no effect.
[05:09:18] <pen16> except as an annoyance
[05:09:39] <cbeust> Look, download the minecraft code, knock yourself out, come back here when you're feeling a but more humble.
[05:09:47] <pen16> done
[05:09:51] *** wolfman2000 has joined ##java
[05:09:52] <pen16> sec.
[05:10:08] *** looopy has joined ##java
[05:11:26] <pen16>
[05:11:31] <pen16> there you go, newb
[05:11:45] <cheeser> hrm. lots of attitude here tonight.
[05:12:21] <pen16> file’s up now
[05:14:08] <cbeust> I haven't been called a newb in a while, good times
[05:14:20] <cheeser> yeah. the ignorance of youth.
[05:14:22] <cheeser> 8^)=
[05:14:23] *** SpaceDoG has joined ##java
[05:14:44] <cbeust> Look, in 10mn you managed to 1) pop up here for the first time 2) ask if a Java source can be completely protected and 3) claim that a .class file contains an AST. That's just the immediate stupid things that come to me off the top of my head after two vodka cocktails
[05:14:47] <pen16> he IS a newb, he thinks .classes contain something like ASM
[05:15:06] <cheeser> they contain bytecode
[05:15:07] <Planck_> They are a lot closer to assembly language than to Java source
[05:15:17] <cheeser> agreed
[05:15:20] <pen16> wrong, planck
[05:15:22] <pen16> you’re all newbs
[05:15:24] <cheeser> hahaha.
[05:15:28] <cheeser> you're so cute.
[05:15:32] <Planck_> Heh, yeah
[05:15:33] <pen16> java bytecode is 90% closer to source
[05:15:35] <pen16> 10% closer to asm
[05:15:37] <cbeust> Yes all of us, including moderators and people who've been writing Java code for 14 years.
[05:15:46] <pen16> it only looks like ASM if you view it in a hex editor
[05:15:48] <pen16> but it’s source
[05:15:59] <Planck_> Ever used javap?
[05:16:00] <cheeser> .class files are binary files.
[05:16:07] <pen16> Yeah, so is a .zip
[05:16:11] <pen16> That .zip can contain code in it
[05:16:11] <cheeser> so they're nothing like .java files
[05:16:25] <pen16> you’re basically arguing that a .zipped .c file is ASM
[05:16:31] <cheeser> no, i'm not.
[05:16:31] <pen16> newbs
[05:16:35] <Planck_> pen16: Have you ever used javap?
[05:16:43] <cheeser> your logic skills are beyond laughable.
[05:16:47] <pen16> Planck_ yes
[05:16:52] <cbeust> You're making an incorrect logical jump. Just because you can reconstruct the source code from an unobfuscated .class file doesn't mean a .class file is closer to a source than asm.
[05:17:13] <dk_schrute> ugh
[05:17:18] <pen16> It’s closer to source. It’s not compiled code
[05:17:20] *** dk_schrute is now known as svm_invictvs-
[05:17:22] <CodeWar> to be fair to pen16 minecraft.zip file he provided seems to contain perfectly legible Java code with variable names messed up ... is that honest decompilation or some trickery
[05:17:23] <pen16> the JIT compiles it
[05:17:25] <svm_invictvs-> pen16: Not by much
[05:17:32] *** Sou|cutter has quit IRC
[05:17:33] <pen16> That’s the whole point
[05:17:42] <cbeust> Anyway, who cares about semantic argument pen16, the bottom line is that your initial question shows that you are someone who has a lot to learn about Java and dropping the attitude might get you more constructive answers here.
[05:17:53] <pen16> the .class contains an encrypted/obfuscated form of the source in a bytecode. The Jit compiles it for the particular platform.
[05:17:55] *** eidolon has joined ##java
[05:17:58] <cheeser> how long have you been doing java dev, pen16? is minecraft your first foray?
[05:17:59] *** pr3d4t0r has quit IRC
[05:18:01] <pen16> And that source can be converted back to source easily.
[05:18:06] <cheeser> no.
[05:18:07] <pen16> *back to text
[05:18:08] <Planck_> So you know that the bytecode is a sequence of instruction similar to "aload_0; bipush 100; etc"?
[05:18:23] <cheeser> the class files are binary files. bytes. not chars. nothing like java source.
[05:18:24] <cbeust> pen16: that source was reconstructed after hours of work by humans, I followed the effort, it was awesome, but it took a lot of work
[05:18:24] <pen16> cheeser: stop saying “no”
[05:18:25] <aidanna> just use javap to figure out what you might think it is
[05:18:29] <pen16> read the example I posted earlier
[05:18:31] <cheeser> "nyet"
[05:18:35] <pen16>
[05:18:47] <Planck_> Meh, it's getting repetitive and boring.
[05:18:53] <Planck_> pen15++
[05:18:56] <cbeust> pen16: This means nothing more than someone reconstructing a source from a .o, what are you trying to prove?
[05:19:03] <pen16> cbeust: Hours of work
[05:19:05] <pen16> *wow*
[05:19:08] <svm_invictvs-> pen16: Actually obfuscators are notorious for naming variables after java keywords so that decompile to source and back is usually impossible.
[05:19:09] <pen16> lol...
[05:19:20] <eidolon> wow, the minecraft decompilation discussion is -still- going on?
[05:19:31] <pen16> hours of work is nothing
[05:19:37] <cbeust> eidolon: Yeah we all got trolled, I blame the vodka, I don't know what the others' excuse is
[05:19:39] <svm_invictvs-> Who the fuck cares about minecraft that much to decompile it?
[05:19:42] <Planck_> Discussion? More like uninformed ranting from one person and reasoned explanation from the rest.
[05:19:48] <pen16> reconstructing source from an .exe is years of work
[05:19:55] <Planck_> I blame being bored.
[05:19:58] <svm_invictvs-> cbeust: Besides that, Mrs Lincoln, how was the theatre?
[05:20:02] <eidolon> svm_invictvs: eh. i'm actually pretty into it :) the plugins that the decompilation / addon folks have done are pretty cool :)
[05:20:13] <cbeust> pen16 was asking if there is a way to completely protecting a Java source code and then proceeded to call everyone newbs.
[05:20:14] <eidolon> anyone feel like fixing my spring problems? :)
[05:20:19] <eidolon> as a way of changing gears.
[05:20:32] <pen16> yes apparently the channel is full of newbies
[05:20:35] <svm_invictvs-> You cant' even really prevent C code from being reverse engineered...
[05:20:36] <pen16> I’m not sure where I’ve arrived exactly
[05:20:39] <cheeser> i can see at least one
[05:20:56] <cbeust> pen16: Seriously, when did you start writing Java code?
[05:21:00] <cheeser> not sure why everyone who disagrees with you has to be a newb
[05:21:01] <Planck_> 1950!
[05:21:21] <eidolon> cheeser: newb.
[05:21:26] <cbeust> pen16: Point us to a github project or something, just want to make sure we're not being trolled before taking this discussion further
[05:21:42] <Planck_> Of course we're being trolled.
[05:21:53] <aidanna> it's fun to feed the trolls though
[05:21:59] <CodeWar> yep
[05:22:03] *** rigved has joined ##java
[05:22:05] <cbeust> pen16 is suddenly very quiet, okay I have my anser.
[05:22:21] <Planck_> Why else would someone with a nick of "penis+1" come into a channel and call a few hundred people newbs?
[05:22:28] <cheeser> maybe it's just a lot of links to gather
[05:22:35] <svm_invictvs-> Yeah, cheeser's a real newb
[05:22:38] <Gott__> lol
[05:22:38] <eidolon> anyway - back on the spring problem.
[05:22:49] <eidolon> http://pastebin.stonekeep.com/11589 <— this is happening on my first spring + JPA rollout
[05:22:53] <svm_invictvs-> pen16: dumbass
[05:23:00] <cbeust> eidolon: Yeah even talking about SPring sounds less painful than addressing pen16's problem right now. Go on.
[05:23:04] <cheeser> svm_invictvs-: um. dial it back.
[05:23:19] <eidolon> there's a suspicion that the AOP stuff is requiring my DAO to be set up via an interface. which seems… nutty. since the dao is already an implementation of a generic interface
[05:23:24] <pen16> cbeust, just shut up. Every single thing you say is wrong. You haven’t said a single thing so far that’s even vaguely insightful, intelligent, or correct.
[05:23:24] <pen16> <cbeust> It's not useless, it works very well, Minecraft is a great example of it
[05:23:24] <pen16> <cbeust> Good luck decompiling the Minecraft source
[05:23:33] <cheeser> eidolon: tried reading that. formatting's fucked. my eyes are too tired to try.
[05:23:33] <cheeser> 8^)=
[05:23:47] <cbeust> eidolon: a .action file? SRSLY?
[05:23:48] <eidolon> heh. that's unfortunately how spring generates errors
[05:23:50] <eidolon> that's -one line-
[05:24:00] <Gott__> <pen16> i'm a big doucher
[05:24:02] <eidolon> yes, an action file. remember? struts2. :)
[05:24:10] <cheeser> never used it
[05:24:12] <cbeust> eidolon: I do but I don't want to remember!
[05:24:16] <eidolon> eh. it's not realy relevant.
[05:24:20] <cbeust> I want to forget!
[05:24:24] <cbeust> This calls for more vodka.
[05:25:06] <cbeust> pen16: Go read my blog, come back when you have learned a few things.
[05:25:09] <eidolon> it's really just that i should be injecting in a complete DAO. eclipse is happy with ti (auto-completion works, etc).
[05:25:25] <Gott__> pen16: maybe you should start with mIRC scripts or somethig
[05:25:33] <eidolon> thisis the standalone jetty that it throws this when i try to run a class that is referencing the dao.
[05:26:06] <eidolon> problem is - i barely grok spring. and its' for this reason that i avoid it. it's too abstract for my tiny brain.
[05:26:32] *** CodeWar has left ##java
[05:27:08] <cbeust> eidolon: Spring is the quantum, physics of the 21st century: only a handful of people on the planet can pretend to understand it
[05:27:09] <eidolon> well if nothing else i stopped the conversation.
[05:27:46] <cheeser> nice job, ass!
[05:27:47] <cheeser> 8^)=
[05:28:06] <eidolon> what, you want the debate about java decompiling back? :)
[05:28:24] <pen16> I provided proof
[05:28:24] <cheeser> i'm about to go to bed anyway
[05:28:25] <cheeser> 8^)=
[05:28:50] <pen16> the decompilers have been around since like 1998
[05:29:00] <pen16> and they’re flawless now
[05:29:11] <eidolon> oops, sorry, i reinvoked it.
[05:29:20] <cheeser> nice job, ass!
[05:29:38] <eidolon> :)
[05:30:19] <Planck_> Heh, nothing like flawless. Newb.
[05:31:08] <pen16> Whatever. Send me a .class, i’ll send you back the source
[05:31:14] <pen16> its not a big deal
[05:31:22] <cheeser> no one's debating that classes can be decompiled.
[05:31:33] <cbeust> pen16: Nobody disputed that
[05:31:34] <cheeser> in fact, that's kinda the point. you can't make a .class that *can't* be
[05:31:56] <pen16> Ok, send me an obfuscated .class, I’ll send you back the source
[05:32:00] <pen16> using whatever obfuscator you want
[05:32:16] <cheeser> you're arguing stuff that no one's disputing.
[05:32:20] <cbeust> pen16: Nobody disputed that either, you are completely missing the point of the discussion.
[05:32:23] <pen16> cbeust disputed it earlier
[05:32:27] <Planck_> No, he didn't.
[05:32:28] <cheeser> i doubt that
[05:32:40] <pen16> <cbeust> It's basically turning your source into assembly. You can make sense of assembly, but have fun with that
[05:32:45] <cbeust> Yeah even with heavy amounts of vodka I wouldn't do that.
[05:32:50] <pen16> Assembly is 1-way
[05:32:54] <cheeser> pen16: um.
[05:32:57] *** BeholdMyGlory has quit IRC
[05:33:01] <pen16> The “source” has infinite possible solutions
[05:33:12] <cheeser> i'm guessing 16 comes from your age.
[05:33:20] <pen16> You could reconstruct infinite .c files out of a given binary
[05:33:29] <Planck_> pen16: of course assdembly isn't one way. I was decompiling assembly probably before you learnt to read.
[05:33:30] <cheeser> because your arguments (and style) speak of a youthful ignorance.
[05:33:32] <eidolon> that wouldn't be 'reconstruction'
[05:33:34] <pen16> Depending on the decompilers algorithms. They will all differ
[05:33:36] <eidolon> that would be 'generation'
[05:33:42] <pen16> when you decompile java bytecode, there is only one correct decompilation
[05:33:45] <pen16> *because its source*
[05:33:48] <cheeser> wrong
[05:33:56] <cbeust> pen16: There are plenty of valid decompilations
[05:33:56] <joed> It is best match.
[05:33:57] <eidolon> reconstruction implies, given the limitations of the .o / .class file, retruning to the original source code.
[05:34:10] <eidolon> what the hell is this argument anyway?
[05:34:12] <cbeust> Admittedly only 1 will match exactly the originating source but who cares about that
[05:34:26] * joed trips cbeust
[05:34:28] <cheeser> eidolon: whether or not a .class file is/contains source code.
[05:34:34] *** freeone3000 has joined ##java
[05:34:36] <eidolon> it does not.
[05:34:39] <pen16> The correct decompilation is the original source, with whitespace/tabulation lost (re-indented using an indentation script)
[05:34:39] <eidolon> end of debate.
[05:34:44] <cbeust> eidolon: It's really hard to tell what pen16 is trying to argue any more, we just all know he's very, very mistaken and keeps calling everyone newbs
[05:34:45] <pen16> And with names of things lost
[05:35:03] <pen16> with ASM, it’s not like that. as i said.
[05:35:13] <joed> Really?
[05:35:18] <pen16> Totally different. That’s compiled code.
[05:35:25] <joed> And you actually know asm?
[05:35:26] <pen16> The closest you can come is Hex-Rays
[05:35:32] <eidolon> joed: you're encouraging him.
[05:35:35] <eidolon> it.
[05:35:35] <eidolon> her.
[05:35:38] <eidolon> whatever.
[05:35:40] <cbeust> Oh yeah I remember now, he was saying that .class is not compiled code. Among the other stupid things he said, I lost track.
[05:35:42] <cheeser> pen16: .class files are compiled.
[05:35:54] <Planck_> That's why javac is called a *compiler*
[05:36:03] <cbeust> He was saying that .class is an AST (seriously)
[05:36:10] <joed> Hah
[05:36:26] <pen16> the AST is 1:1 with the stack
[05:36:35] <cheeser> i think you're a bot.
[05:36:42] <cbeust> The AST is 1:1 with the stack? Okay now I know he's just trolling
[05:36:46] <Planck_> Considering you can't even recover generic type information from the class file, you really are an idiot.
[05:36:47] <cbeust> or someone just beginning CS 101
[05:37:06] * cbeust goes back to watching Attack of the Show
[05:37:12] <cheeser> normally i'd ban such arrogant stupidity. but it's late and i'm having fun with his earnestness
[05:37:26] <pen16> Planck_, generic typeinfo recovers perfectly
[05:37:40] <cbeust> Just when you think pen16 cannot display more ignorance
[05:37:51] <eidolon> wait, what? he's really saying the .class file is a direct, statement-for-statement represetnation of the source code? it's just, what, optimized? replaced 'public' with 'p' or something?
[05:37:54] <pen16> *use* the decompilers before trying to argue about them
[05:37:56] <eidolon> is that -really- your assertion?
[05:37:58] <Planck_> Yes, eidolon
[05:38:05] <pen16> eidolon, no
[05:38:05] *** magn3ts has quit IRC
[05:38:20] <eidolon> then if it's not a 1:1 relationship, then i's not source code.
[05:38:23] <cheeser> pen16: you can't claim the result of a decompilation has any bearing on the nature of the .class file.
[05:38:23] <cbeust> I think pen16 is Surial trolling us. I'm on to you, Reinier.
[05:38:23] <eidolon> end of story. can we move on please?
[05:38:25] <joed> pen16: You actually think you have an argument?
[05:38:46] <surial> Who the what now?
[05:38:48] <freeone3000> I assert that a class file is a binary machine-code file for a machine that does not exist, and the JVM is an optimizing emulator for that machine.
[05:38:52] <pen16> the opcodes provided by java, because of the number of operations that are provided (it’s a wide instruction set) happens to allow 1:1 reconstruction
[05:38:58] <pen16> in the bytecode
[05:38:59] <cheeser> ah, yeah. let's do this right!
[05:39:12] <joed> pen16: Idiot.
[05:39:16] <robbyoconnor> cheeser: I think I just got outdone!
[05:39:25] <cheeser> pen16: it allows a really good approximation of the original source code.
[05:39:31] *** L-----D has quit IRC
[05:39:31] <surial> Scrolled up a bit and noticed a comment by pen16 asserting that there's only one way to decompile. cbeust: Stop insulting me.
[05:39:32] <cheeser> it's not necessarily 100%
[05:39:34] <Planck_> I'd like to see pen15's reconstruction of a Scala .class file :-)
[05:39:49] <cbeust> surial: On the contrary, I thought it was a magnificent troll :)
[05:39:54] <eidolon> pen16: which would decompile to what the compiler interpreted the source code to be before storing it in the class file. you'd end up with "something" that might be called source code. but it would bear only a passing resemblence to the 'original' source code. if you recompiled it, you'd end up with a similar class file.
[05:40:03] <cheeser> sadly, it's just astronomic ignorance.
[05:40:07] <eidolon> but saying that the .class file is a direct and 1:1 representation of what the programmer wrote into the source file is idiocy.
[05:40:19] <pen16> It is
[05:40:23] <cheeser> why bother with .class then?
[05:40:27] <surial> cbeust: Oh, I misunderstood. Eh. Nope, not me.
[05:40:28] <cheeser> just run .java directly
[05:40:31] <pen16> because the .class is faster
[05:40:32] <cbeust> idiocy? Glad you're admitting.
[05:40:32] <eidolon> indeed.
[05:40:34] <eidolon> why is it faster?
[05:40:35] <cheeser> pen16: how?
[05:40:41] <eidolon> because 'public' is shortened to 'p' ?
[05:40:42] <freeone3000> cheeser: Cause it's binary!
[05:40:45] <pen16> you don’t have to lex + parse
[05:40:49] <eidolon> why not?
[05:40:49] <cheeser> because?
[05:40:52] <pen16> and create bytecode first
[05:41:01] <pen16> Because it’s already been done, cheeser
[05:41:02] <eidolon> but you just said bytecode == source code
[05:41:03] * robbyoconnor sighs
[05:41:07] <cheeser> pen16: what's been done?
[05:41:15] <joed> Damn you stupid.
[05:41:16] <pen16> conversion to bytecode
[05:41:23] <cheeser> and that bytecode is what?
[05:41:24] * eidolon lets cheeser go all socretean on pen16
[05:41:31] * eidolon popcorns.
[05:41:38] <pen16> that bytecode is then compiled by the JIT on the fly, for the particular machine
[05:41:43] <cheeser> yes
[05:41:48] <cheeser> that part's right at least.
[05:41:54] <eidolon> errr
[05:41:57] <eidolon> that's only partially right
[05:41:58] <eidolon> but okay.
[05:42:08] <cbeust> Wait, did pen16 just say something that's actually relatively close to sensical?
[05:42:09] <robbyoconnor> pen16: are you even human?
[05:42:12] <cheeser> it's *optionally* compiled by the JIT
[05:42:12] <cheeser> 8^)=
[05:42:19] <robbyoconnor> pen16: how old are you?
[05:42:23] <eidolon> cheeser: better. carry on :)
[05:42:27] <cheeser> 16 is my guess.
[05:42:31] <cheeser> eidolon: P^)=
[05:42:34] <robbyoconnor> I'd reckon that too
[05:42:45] <wyvern`> argh. where do I put a .tld file in a jar so it can be autodiscovered?
[05:42:48] <wyvern`> I can't seem to find docs on this
[05:42:50] <eidolon> oh cmon, it's pretty rare i can peg you on a java runtime pedant. gimme a break.
[05:43:06] <cbeust> wyvern: you'll need to configure the resolver, but once it's done, root of the jar file should do it
[05:43:20] <wyvern`> the resolver?
[05:43:24] <cheeser> eidolon: technically the JIT is free to compile all bytecode to native code whenever it wants.
[05:43:26] <cbeust> Enity resolver
[05:43:28] <robbyoconnor> even *I* wouldn't say as many stupid statements in rapid succession!
[05:43:30] <cheeser> hotspot, however, doesn't.
[05:43:32] <cheeser> 8^)=
[05:43:33] <robbyoconnor> and I'm the channel bozo
[05:43:44] <pen16> I think the problem is that people think Java’s bytecode has a small opcode set
[05:43:58] <cheeser> *that's* the problem?
[05:44:01] <Planck_> It's smaller than the x86 opcode set :)
[05:44:02] <eidolon> sure, but the JIT compiler doesn't trigger unless there's specific optimization to be had, particularly in tight loops, etc.
[05:44:13] <wyvern`> cbeust, I'm not using any custom entities. I'm just declaring some EL functions in a .tld
[05:44:13] <pen16> That’s the problem in their understanding, cheeser
[05:44:16] <eidolon> no, i think pen16 that you haven't a clue what the java compiler does.
[05:44:16] <cheeser> eidolon: you're thinking hotspot again.
[05:44:17] *** diegoviola has joined ##java
[05:44:18] *** magn3ts has joined ##java
[05:44:19] <diegoviola> hi
[05:44:22] <pen16> Because the large instruction set is source-like
[05:44:26] <eidolon> cheeser: ah. perhaps.
[05:44:27] <cheeser> pen16: no, i don't think that's it at all.
[05:44:30] <cbeust> wyvern`: Sorry I thought you said .dtd, not .tld. I blame the vodka.
[05:44:34] <wyvern`> hehe
[05:44:40] <eidolon> cbeust: you use that excuse a lot :)
[05:44:48] <robbyoconnor> pen16: if you can do it better, go right ahead. Oracle will sue you for all your pennies.
[05:44:51] <freeone3000> cbeust: META-INF.
[05:44:55] <cbeust> eidolon: I do my best coding when under Stolichnaya influence
[05:44:57] <pen16> cheeser: compare Java’s ops to Lua’s ops
[05:45:05] <freeone3000> robbyoconnor: Only if you read the patents. Not reading the patents is a valid defense.
[05:45:09] <pen16> in java bytecode, you will find ops for a class directly
[05:45:15] <pen16> in Lua’s, you will not
[05:45:15] <joed> freeone3000: What?
[05:45:19] <cheeser> pen16: it's entirely irrelevant
[05:45:20] <surial> I get praised (?) for masterful trolling and yet you're still talking to this clown. Bored?
[05:45:31] <robbyoconnor> He must be
[05:45:33] <pen16> Lua cannot be decompiled easily
[05:45:33] * joed trips surial
[05:45:35] <robbyoconnor> it's friday night
[05:45:38] <cbeust> surial: Waiting for the barbecue to do its magic on the pork
[05:45:41] <surial> Because if yes, I'll toss up some new bullshit for y'all to pick apart.
[05:45:43] <eidolon> surial: we're pretty sure pen16 is you.
[05:45:44] * robbyoconnor trips joed too
[05:45:48] <wyvern`> soo... where to put the taglib descriptor then? META-INF? WEB-INF?
[05:45:49] <freeone3000> ...Isn't lua interperted?
[05:45:50] <eidolon> nice double-keyboard action
[05:45:52] <eidolon> :)
[05:45:52] <pen16> (lua has small opcode set)
[05:46:02] <surial> eidolon: Shame I missed the discussion. I'm kind of intrigued why you and cbeust think so.
[05:46:06] <robbyoconnor> pen16: I can venture a guess that nobody cares
[05:46:16] <cbeust> LUA is the RISC of interpreted languages. Enlightenment!
[05:46:28] <freeone3000> wyvern`: Aha. http://download.oracle.com/javaee/1.4/tutorial/doc/JSPTags6.html . Should still apply.
[05:46:57] <wyvern`> freeone3000, bingo thank you
[05:47:07] <surial> eidolon: Also, evidently I own a home internet connection originating from socal.
[05:47:27] <eidolon> surial: it's the masterful trolling. completely disassociated comments. he argues like a republican. *makes point* *point is entirely ripped apart by people who know better* *makes point again, using a different phrasing* *point is ripped apart again* *sticks to original point and calls everyone newbz*
[05:47:33] <wyvern`> freeone3000, what was I thinking looking in the spec hoping for helpful information :/
[05:47:44] <eidolon> surial: your trolling mastery knows no bounds!
[05:47:54] <surial> Wait, shit, now I'm getting trolled. If you're all convinced I'm trolling you, why are you still engaging with the hypothetical trolling me?
[05:47:58] <robbyoconnor> surial: I love you
[05:48:04] <eidolon> sur
[05:48:06] <eidolon> oops
[05:48:08] <eidolon> surial: newb.
[05:48:14] <surial> eidolon: :P
[05:48:37] <robbyoconnor> surial: I said I love you, I professed my love for you in the open channel and I get no response! you cold hearted bastard!
[05:48:40] <cbeust> surial: Take this as a compliment :)
[05:48:43] <surial> eidolon: What was the original point? That bytecode is just a stored AST tree?
[05:48:53] <cheeser> yeah
[05:49:03] <surial> robbyoconnor: Well, jesus, robby, this relationship has progressed to the phase where I just kind of take it for granted, you know?
[05:49:05] <cheeser> and is 1:1 with the java source
[05:49:09] <surial> robbyoconnor: Maybe we should insult other people for a while.
[05:49:30] <eidolon> that was one of pen16's arguments. that a .class file is an exact representation of the source code. therefore a decompiler will always return you back to the original source code (sans symbols)
[05:49:40] <robbyoconnor> or I should beat you more...I hear that sort of things gets points
[05:49:59] *** phantomcircuit has quit IRC
[05:50:17] <surial> cheeser: Well, frankly, at this point in time I'm not sure what bytecode really buys us. It's still sufficiently close to the surface in some parts / lacking significant features so that all non-java languages compiling to the JVM more or less have to jump through hoops. Nevertheless, bytecode isn't sourcecode, you all know that, and one person in this channel thinks himself above being taught better. So....
[05:50:23] <surial> Why are you still arguing the case?
[05:50:42] <cbeust> For someone who seems to have such a deep understanding, he started off with one of the stupidest questions you can think of: can a Java source be 100% protected. That should tell you all you need to know.
[05:50:51] <surial> Oh, one of those questions.
[05:50:58] <cheeser> surial: because it's late and i'm having fun with it.
[05:50:58] <cheeser> 8^)=
[05:51:06] <cbeust> What Cheeser said
[05:51:14] <cbeust> Barbecue is ready now though and babies are in bed, so party time.
[05:51:17] <robbyoconnor> cheeser: I can say some stupid shit fi you want?
[05:51:21] <joed> surial can you protect my apache code?
[05:51:23] <robbyoconnor> if*
[05:51:26] <robbyoconnor> It's been awhile
[05:51:44] <wyvern`> we could do a CISC v RISC thing
[05:51:49] <surial> Sure it can. Store it on a server, lock that server up, make sure you've updated and keep it secure, then allow net-based submissions of input, and return output. Depending on the app this may make the code and possibly even the algorithm extremely difficult to obtain.
[05:51:51] <wyvern`> or a stack vs register VM
[05:52:02] <surial> joed: Sure. I'd patent it. ZING!
[05:52:08] <joed> surial: What qabout the dutch?
[05:52:13] <cheeser> ~dutch
[05:52:13] <javabot> There are two things I can't stand in this world. People who are intolerant of other people's cultures... and the Dutch.
[05:52:29] <robbyoconnor> surial: patents are public record --I'd still go after it :)
[05:52:32] <robbyoconnor> try and sue me!
[05:52:35] <surial> Jesus. Intolerant people should be shot.
[05:52:53] <surial> See? That's how I'd roll if I was a troll.
[05:52:55] * robbyoconnor beats surial
[05:53:07] <robbyoconnor> get in the kitchen and make me a sandwich
[05:53:13] <joed> No you don't write any code.
[05:53:26] <robbyoconnor> bastard.
[05:53:42] <surial> robbyoconnor: If you're going to segue into a sudo joke, you lose funny points.
[05:55:18] <cheeser> ~be r0bby
[05:55:18] <javabot> FileNotFoundException is a subclass of IOException; Exception won't directly catch that.
[05:55:49] * surial wonders if r0bby was aware of just how much mileage we'd all get out of that when he said it.
[05:55:50] *** Gott__ has quit IRC
[05:56:49] <robbyoconnor> surial: not sure
[05:56:57] <robbyoconnor> but it's got more mileage than me
[05:57:24] <robbyoconnor> i realized how stupid it sounded -- AFTER i said it
[06:04:44] <pen16> http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html
[06:05:26] <pen16> a huge set
[06:06:14] *** symbole has joined ##java
[06:09:51] <Planck_> Haha, you're still persisting
[06:10:28] *** Fanook has joined ##java
[06:12:25] *** Error404NotFound has quit IRC
[06:14:36] *** NWMonster has joined ##java
[06:15:03] *** Dragonai has joined ##java
[06:15:25] *** Cymage has quit IRC
[06:15:43] *** NWMonster has quit IRC
[06:16:45] *** bojo has joined ##java
[06:20:37] *** mrapple has joined ##java
[06:21:10] <mrapple> ok im not sure whats going on... heres what my console puts out We were looking for "-678.0,77.0,1026.0" but the lines were: "-678.0,77.0,1026.0" and "-683.0,73.0,983.0"
[06:21:54] *** drunkvegetarian has joined ##java
[06:22:04] <mrapple> if statemnt: if(String.valueOf(filelineone) == String.valueOf(ourLocation) || String.valueOf(filelinetwo) == String.valueOf(ourLocation))
[06:22:23] <mrapple> log statemnt on failure log.info("We were looking for " + ourLocation + " but the lines were: " + filelineone + " and " + filelinetwo);
[06:24:07] <jesmon> ~~ mrapple javadoc Object#equals()
[06:24:24] <freeone3000> mrapple: That line will never be true. .equals() for Objects.
[06:24:26] *** Error404NotFound has joined ##java
[06:24:43] <mrapple> thank you
[06:24:54] *** eyesUnclouded has joined ##java
[06:30:12] *** jesmon has quit IRC
[06:32:59] *** eyesUnclouded has quit IRC
[06:33:54] *** meoblast001 has quit IRC
[06:33:57] <diegoviola> Java or .NET, which one has the biggest market share?
[06:35:41] <cbeust> diegoviola: We filled our trolling quote earlier today, come back tomorrow
[06:38:00] <diegoviola> cbeust: it wasn't meant to be a trolling question
[06:38:07] <cbeust> diegoviola: Yeah I know
[06:38:48] <cbeust> .net and Java are both good and successful frameworks, for numbers, you'll get more accurate figures by googling
[06:39:27] <diegoviola> ok, sorry about that, i'm interested in learning Java
[06:40:12] <diegoviola> i know ruby, but the market is not big, therefore no enough jobs
[06:40:17] <RogueShadow> diegoviola, I'm learning Java now also, There's lots of good resources for it.
[06:40:21] <cbeust> diegoviola: Yeah Ruby is a tiny niche
[06:40:52] <cbeust> diegoviola: As for learning, we'll be happy to answer your Java questions here
[06:40:52] <diegoviola> i worked with the JVM once (JRuby), the environment feels robust
[06:40:58] <diegoviola> that's what i like
[06:41:06] *** AqD has quit IRC
[06:41:11] <diegoviola> cbeust: ok, thanks for the warm welcome
[06:41:13] <cbeust> JRuby is a nice technical achievement but stuck between a rock and a hard place so with an uncertain future IMO
[06:41:16] <RogueShadow> http://download.oracle.com/javase/tutorial/index.html <-- seems like a great place to learn about the language in general. I've been reading this lately, not done yet. So much there.
[06:41:16] <diegoviola> and sorry about my first question
[06:41:24] <diegoviola> didn't meant to troll really
[06:41:36] <cbeust> diegoviola: I know, I was being snarky, sorry about that
[06:41:43] <diegoviola> cbeust: np
[06:42:09] <symbole> diegoviola: It's a trade off. Ruby might be smaller, but you won't get stuck supporting legacy code. At least not for now.
[06:42:52] <diegoviola> symbole: i see
[06:43:13] <cbeust> symbole: I guess, although Ruby is even older than Java
[06:43:18] *** eidolon has quit IRC
[06:43:50] *** htat has joined ##java
[06:44:40] <symbole> Also, the type of companies that would be willing to give Ruby a try might be the kind of companies you want to work for. Learn whatever you think is fun. :)
[06:45:04] <cbeust> Learn Ruby for fun, learn Java for the money :)
[06:45:07] *** chandan_kumar has joined ##java
[06:45:16] <RogueShadow> Shouldn't be too hard to learn them both. :)
[06:45:17] <looopy> lol i'm currently learning java for money...
[06:45:26] <looopy> BUT it's not so bad...so far
[06:45:30] <looopy> learn scala for fun!
[06:45:40] <looopy> use it for money in 2 more years
[06:46:22] <RogueShadow> Learn Haskell for a change of pace, that will challenge you and grow you. Well, I haven't finished my first tutorial yet.. lol It's fun though.
[06:47:34] *** tilerendering has quit IRC
[06:47:44] <cbeust> Haskell is a good concept language to learn, although I see it more as a mathematic discipling than a programming language
[06:48:05] <RogueShadow> cbeust, I may be mistaken, but I remember you mentioning some eclipse plugins that would be useful. Can you rename them for me? Or suggest some useful one.s
[06:48:10] <cbeust> Learn it to make your head hurt, not to get anything done
[06:48:24] <cbeust> RogueShadow: Eclipse plug-in for what?
[06:48:28] <RogueShadow> It's definitely good brain exercise.
[06:49:26] <RogueShadow> I recall something about a plugin to help with tedious bits of code. boilerplate stuff may have been mentioned.
[06:49:47] <cbeust> RogueShadow: For Java? No plug-in necessary for that
[06:50:24] <RogueShadow> yeah, i better finish reading the eclipse help files anyway :p Lot's of reading to do for now.
[06:50:44] <diegoviola> I've been using vim for years now, for coding PHP and Ruby, do you recommend that I stick with vim for Java as well or is there an IDE you would recommend?
[06:50:48] <cbeust> RogueShadow: It's worth it. The time you spend learning now will be more than recouped once you start coding Java
[06:50:58] <cbeust> ~~ diegoviola ide
[06:50:58] <javabot> diegoviola, ide is Integrated Development Environment, see IDEA, Eclipse or Netbeans. You don't *need* an IDE to use Java, but it helps. Everyone and their brother has an opinion on which is best, but please try them all out and decide for yourself.
[06:51:11] *** b3nny has joined ##java
[06:51:20] <diegoviola> cbeust: thanks
[06:51:28] <joed> Haha
[06:51:28] <cbeust> javabot notwithstanding, my advice: use vi until you're comfortable using javac and know how the classpath works. Once you got that down, learn Eclipse or IDEA.
[06:51:28] <javabot> cbeust, what does that even *mean*?
[06:51:42] <joed> cbeust++
[06:51:44] <cbeust> javabot shut up, I'm talking
[06:51:44] <javabot> cbeust, what does that even *mean*?
[06:51:52] <RogueShadow> LOL
[06:52:18] <joed> diegoviola: It ment that cbeust made a very very smart remark.
[06:52:18] *** L4nce0 has joined ##java
[06:52:26] <RogueShadow> I tried netbeans, and then after hearing some advice tried eclipse, I already found some things i wasn't sure about with netbeans being more than overcome. It's better I think.
[06:52:28] *** Error404NotFound has quit IRC
[06:52:39] *** echosystm has joined ##java
[06:52:41] <looopy> diegoviola: emacs is nice for java
[06:52:43] <echosystm> anyone here used restlet
[06:52:45] <echosystm> ?
[06:52:46] *** ferret_ has quit IRC
[06:52:54] <diegoviola> joed: ?
[06:52:57] *** ferret_ has joined ##java
[06:52:59] <cbeust> NetBeans is pretty much a dead IDE. Try Eclipse, if you don't like it, try IDEA. Or in the reverse order. I'm sure you'll like either Eclipse or IDAE
[06:53:10] <joed> haha
[06:53:11] <echosystm> whats wrong with netbeans?
[06:53:20] *** iman has joined ##java
[06:53:26] <cbeust> echosystm: It's just hardly used anywhere.
[06:53:33] <echosystm> so?
[06:53:40] <diegoviola> cbeust: I will try Eclipse, I've seen there is a vim plugin for it
[06:53:42] <echosystm> i find it way better than eclipse
[06:53:54] <cbeust> So you will end up having to learn Eclipse or IDEA in your professional life, so you might as well start with these
[06:54:01] <joed> echosystm: Then you use it.
[06:54:18] <cbeust> echosystm: I'm not even talking about personal preference, just an objective observation
[06:54:25] <echosystm> there are more people at our company using netbeans than IDEA
[06:54:32] <RogueShadow> echosystm, That's great for you, but as a totally new user for both trying them both out. Eclipse really helped me learn to use it a LOT more. :) Just sayin. And things were easier for me to do.
[06:54:45] <joed> To be quite frank on most of the gigs I do, they dont us the ide anyways.
[06:54:46] <iman> i want to create this xsd document from tag "<element name="reportResponse">" using java (Element) , http://pastebin.com/Kr1exnNr would u please help me to create it,
[06:54:54] <diegoviola> how is Java's future under Oracle? do they have plans to keep Java alive and well?
[06:54:57] <cbeust> echosystm: Good for you, but I'll argue that this is the exception more than the norm. And NetBeans' future is even more uncertain with Oracle at the helm
[06:55:14] <looopy> i just came over from idea, helios is rather nice
[06:55:23] *** ExtraSpice has joined ##java
[06:55:34] <cbeust> diegoviola: Java will be fine, nothing to worry about for 5-10 years
[06:55:46] * joed Hands looopy the idiot hat.
[06:56:01] * looopy hands it back
[06:56:06] <looopy> won't fit
[06:56:10] <L4nce0> hey guys. I am having a hard time finding a clean way of doing this. In essence, I'm pulling from a file a list of items. each line parses to a category, and a datum. say I have 3 different sets of categories. So I need to pair each datum to it's matching category.
[06:56:11] <symbole> iman: What do you want to do again?
[06:56:24] <echosystm> diegoviola: java has no direct competitors - its going to take a long time for one to pop up even if oracle screw up hard
[06:56:38] <surial> L4nce0: A datum? As in a date?
[06:56:38] *** pipeep has joined ##java
[06:56:42] <L4nce0> though it could be any number of categories, any size of datums
[06:56:49] <diegoviola> cbeust: i see
[06:56:51] <diegoviola> echosystm: interesting
[06:57:06] <iman> symbole: i want to create this documnet to Element for create webservices response
[06:57:10] <diegoviola> and if oracle screws up people can fork and maintain it?
[06:57:15] <surial> L4nce0: Sounds trivial: Map.
[06:57:22] <echosystm> theres literally nothing that comes close to rivalling java in the enterprise space
[06:57:24] <L4nce0> (n.) a single quantity that may have any of the set of values specified in its data type.
[06:57:25] <surial> diegoviola: Yes and No.
[06:57:37] <joed> echosystm: ?
[06:57:54] <joed> None of the scala projects?
[06:57:55] <L4nce0> a map? I was thinking a hash table could do that, but didn't want to use one
[06:57:58] <symbole> I'm not familiar with services, but are you trying to convert he XSD into an class representation?
[06:58:05] <surial> diegoviola: All the (relevant) source is open, but Oracle is happily blowing up the preposition that this means java would have a future even if Oracle screws it up by suing google based on some arguably quite ridiculous patents.
[06:58:17] <looopy> more so than JAVA in enterprise we should say the jvm
[06:58:24] <iman> symbole: like http://pastebin.com/Jg9VHdqN
[06:58:26] <surial> diegoviola: Of course, any programming language no matter how seemingly open could in theory be subjected to such a thing, so, mostly, yes.
[06:58:28] <looopy> I think scala can be awesome....
[06:58:31] <echosystm> let me rephrase, theres nothing that rivals the JVM in the enterprise space :P
[06:58:42] *** ninja_sense has joined ##java
[06:58:44] <L4nce0> surial: thanks, this seems it can do it =)
[06:58:47] *** L4nce0 has quit IRC
[06:58:50] <joed> As a jvm, sure.
[06:59:03] <looopy> with that said what originally made scala cool was actors...but akka now stumps scalas version of actors...
[06:59:08] <looopy> and well it works on java as well as scala
[06:59:18] <diegoviola> surial: interesting
[06:59:27] *** yxz97 has quit IRC
[06:59:49] <symbole> iman: Hopefully someone else here can help you.
[06:59:52] <echosystm> with groovy and scala gaining popularity, i'd say the JVM is a very good bet, career wise
[07:00:04] <surial> Ran into a fun WTF on scala last time I worked with it. I still insist scala cannot work at all as a journeyman language. The WTF-to-lines ratio is still ridiculously high.
[07:00:23] <looopy> surial, how so?
[07:00:36] <cbeust> surial: Good luck convincing the Scala community of Scala's complexity
[07:00:47] <surial> To turn 2 lists into a map: val map = (listA zip listB).toMap. Except this doesn't really work, because if you press enter here and type some expression, i.e. to serve as return value for the method, that expression is interpreted as the now no longer "implicit" argument to toMap.
[07:01:00] <surial> The error message you get out of this is bewildering and doesn't at all help you realize what's going on here.
[07:01:21] <surial> An alternative way to do it to avoid this, is: val map = Map((listA zip listB).toArray:_*)
[07:01:24] *** dlam has joined ##java
[07:01:58] <surial> :_* is apparently the "I know the arg is an array, use that as full argument and don't attempt to bundle up the args" operator when calling varags methods. colon-underscore-star? What the fuck?
[07:02:21] <looopy> their community is great...i'm a new programmer and honestly thats what won me over. especially the lift community. lol i will admit those long expressions HURT
[07:02:33] <looopy> they scare the hell out of me...in time though =(
[07:02:43] <cbeust> looopy: The operator overloading madness in Lift is scary
[07:02:45] <surial> And the third way to do it is to insert an arbitrary definitely-not-an-expression parse unit in between, such as val floobargle = "Scala is not going to replace java"
[07:03:01] <cbeust> If you think colon underscore star is scary, don't try Lift.
[07:03:13] <surial> Too late.
[07:03:20] <looopy> :::>_?
[07:03:23] <looopy> lol
[07:03:39] <RogueShadow> A friend of mine half jokingly suggested I look at scala lol. I'm not sure that would have been wise, so I didn't.
[07:03:56] <looopy> RogueShadow: give it a try...
[07:04:10] <cbeust> RogueShadow: I'll give you another suggestion: fantom http://fantom.org/
[07:04:20] <surial> And, as a sidenote, the fact that scala has included foldLeft and foldRight as imported-by-default operators is worrisome; foldLeft and foldRight are 100% not parallellizable. Using scala doesn't magically grant you multi-core powers.
[07:04:21] <RogueShadow> How many of these are there lol
[07:04:28] <surial> RogueShadow: 50. Seriously.
[07:05:09] <looopy> =( make me want to return my scala book now
[07:05:15] <looopy> i "thought" it was cool...
[07:05:17] <cbeust> surial: I even question how often one has to use folds
[07:05:24] *** MikeJansen has quit IRC
[07:05:36] <looopy> it seems more solid than ruby to me...just the syntax
[07:05:48] <looopy> i can't think without brackets, etc
[07:06:15] <surial> I've always thought foldLeft and foldRight as operators was a mistake; scala has this great feature where you can import a method and even rename it (into an operator if you want). This is great. For those who want foldLeft and foldRight as /: and :\, they can import them as such.... and then scala goes and includes that import by default. D'oh. The fact that fold is fundamentally unparallellizable is just icing on the cake.
[07:06:17] <cbeust> looopy: For sure. I like Ruby but its lack of static typing is a deal breaker for me.
[07:06:38] <looopy> it's magic!
[07:06:59] <cbeust> surial: You mean "salt" on the cake, not icing.
[07:07:11] <surial> cbeust: I don't actually think language features are what makes languages big. Java did not introduce any new language features compared to the competition. Smalltalk did.
[07:07:18] <RogueShadow> looopy: can't think without brackets? Seriously go through a good haskell tutorial ;)
[07:07:25] <cbeust> surial: Agreed, it was the right language at the right time.
[07:07:33] <looopy> RogueShadow: ha...erlang
[07:07:38] <looopy> =)
[07:07:41] <cbeust> It leveraged the frustration that people had with C++
[07:07:45] <surial> Java did introduce garbage collection, WORA (well, in theory anyway), and a standard library all with extremely C-like language syntax. That sold.
[07:07:53] *** Error404NotFound has joined ##java
[07:08:07] <symbole> GC has been around since the 60's.
[07:08:15] <cbeust> surial: Don't forget the killer app that I think really made Java the success it is today: applets.
[07:08:43] *** Error404NotFound has quit IRC
[07:09:41] <surial> symbole: .... "all with extremely C-like language syntax". It was a whole sentence.
[07:10:09] *** bojo has quit IRC
[07:10:12] <surial> So, I'm banking on the next java to have mostly the same syntax with the new hotness flavoured in (probably will have closures, most likely not in a form that is amenable to the diehards), but with some set of modularization-all-the-way including a distributed repository system built right into the language, AST-based editing with compiler/tooling plugins instead of DSL structures, and maybe STM or everything parallel by default.
[07:11:26] <RogueShadow> Haskell scares me a bit, but I really like the way it puts things together. Very interesting to me somehow. But I'd rather learn java first, I don't really know any "real" programming languages. I need to know some.
[07:12:06] *** chandan_kumar has quit IRC
[07:12:16] *** t0rc has quit IRC
[07:12:29] <diegoviola> I would learn Haskell after my math has improved a little more.
[07:12:35] <surial> Java is a fine go-to language. use that for all your projects. Hack around and create some fun hobby projects in haskell to widen your horizon and learn something interesting. Then port that knowledge back to java, because at the end of the day, you'll be working in java, or python, or C.
[07:12:50] <cbeust> Yes, learn a few programming languages before tackling Haskell.
[07:13:45] <RogueShadow> For not really knowing anything, EVERYBODY I know and have any respect for seems to think I'll do great. ;)
[07:13:56] <RogueShadow> maybe graalscript wasn't so bad...
[07:14:13] <cbeust> RogueShadow: You seem to have a great attitude to learn new languages, keep it up
[07:14:52] <RogueShadow> I'm just sick of not getting paid for anything I love to do. And getting paid very little for things I hate to do. I love to learn, and to help people out.
[07:15:31] <surial> Dunno about the US market, but senior programmers in europe don't have much trouble finding a job right now.
[07:16:33] <cbeust> surial: Not a problem in the US either from what I can tell, even outside SV.
[07:16:50] <looopy> in the US they require 10 years experience to be a junior programmer *cough*
[07:17:09] <RogueShadow> If it doesn't have to be pro experience, I could wing it.
[07:18:02] <RogueShadow> youtube link allowed? Could show you something I did in that game. Although I guess it wont' matter if you aren't familiar with how the game works.
[07:21:10] *** bojo has joined ##java
[07:21:57] *** dmiles_afk has joined ##java
[07:31:17] *** irn has joined ##java
[07:37:57] *** cbeust has quit IRC
[07:38:02] *** looopy has quit IRC
[07:38:25] *** cbeust has joined ##java
[07:45:06] *** chl5011 has joined ##java
[07:45:23] *** chandan_kumar has joined ##java
[07:45:42] *** push[RAX] has quit IRC
[07:47:59] *** JDuke128 is now known as Pedro
[07:48:38] *** echosystm has quit IRC
[07:49:11] *** Softdroid has joined ##java
[07:52:23] *** push[RAX] has joined ##java
[07:53:49] <Pedro> yo
[07:54:03] <Pedro> hi
[07:54:05] <Pedro> hello
[07:54:43] *** horte has joined ##java
[07:56:20] *** chandan_kumar has quit IRC
[07:59:42] *** Softdroid has quit IRC
[08:00:40] *** Softdroid has joined ##java
[08:01:58] *** chandan_kumar has joined ##java
[08:02:03] *** ormaaj_ has joined ##java
[08:02:15] *** aidanna has quit IRC
[08:03:09] *** ormaaj has quit IRC
[08:05:28] *** surial has quit IRC
[08:06:56] *** ede has joined ##java
[08:07:29] *** Dragonai has quit IRC
[08:10:21] <andrew-101> Can I have a list of callables in java? Such as calling each method in a list called preDraw.
[08:11:03] *** zemanel has quit IRC
[08:11:39] <freeone3000> You mean a List<Callable<?>>?
[08:12:17] *** benoitdo has joined ##java
[08:12:40] <andrew-101> It would like that, is it that easy?
[08:12:46] <andrew-101> would look like *
[08:12:49] <cbeust> It is.
[08:13:14] <andrew-101> Thats a nice change, thanks ^^
[08:14:47] *** benoitdo has quit IRC
[08:15:01] *** benoitdo has joined ##java
[08:18:25] *** webczat has joined ##java
[08:18:45] *** iman has quit IRC
[08:19:16] <webczat> Hey, to read commands that is a single line, when I use nio, do I need to just search for appropriate line terminators in a for loop? buffers have charAt but not find.
[08:19:49] <webczat> And it's probably faster than converting to a string.
[08:20:04] *** yoshx has joined ##java
[08:20:26] *** srji has joined ##java
[08:22:08] *** glcrazy has joined ##java
[08:24:10] *** bojo has quit IRC
[08:24:59] *** bojo has joined ##java
[08:25:38] *** bindaas has quit IRC
[08:31:08] *** symbole has quit IRC
[08:31:14] *** DJClean has joined ##java
[08:33:39] *** angelsl has joined ##java
[08:33:54] <angelsl> what's the fastest way to get a String[] into AbstractCollection<String>?
[08:34:57] *** Niamkik has joined ##java
[08:37:15] *** andrew-101 has left ##java
[08:37:25] *** Naith has joined ##java
[08:37:46] <freeone3000> Arrays.asList().
[08:39:11] <angelsl> that returns a List.
[08:39:37] <angelsl> which being an interface does not inherit AbstractCollection
[08:39:54] <angelsl> what does asList return?
[08:40:26] *** jjido has joined ##java
[08:41:08] <angelsl> hell
[08:42:39] <Bombe> It returns a List.
[08:42:54] <Gracenotes> why does it need to be an AbstractCollection?
[08:42:58] <cbeust> List is a Collection
[08:43:05] <Gracenotes> silly APIs?
[08:44:29] <Gracenotes> the main reason to use abstract classes is to extend them (and, when using subclasses, to get free functionality through procedural abstraction)
[08:45:06] <Gracenotes> the more sane interfaces are in your code, the better.. and Collection is sane :/
[08:45:14] *** irn has quit IRC
[08:47:35] *** Softdroid has quit IRC
[08:47:42] *** Bombstone has quit IRC
[08:48:47] *** Gryphon_ has joined ##java
[08:48:55] *** ninja_sense has quit IRC
[08:49:17] *** yosup has joined ##java
[08:49:25] *** vdv has joined ##java
[08:52:56] *** dmiles_afk has quit IRC
[08:54:01] *** pipeep has quit IRC
[08:55:45] *** chandan_kumar has quit IRC
[08:59:30] *** yoshx has quit IRC
[08:59:56] *** jjido has quit IRC
[09:00:06] *** Bombstone has joined ##java
[09:01:36] *** dmiles_afk has joined ##java
[09:04:58] *** tewecske has joined ##java
[09:05:18] *** tewecske has quit IRC
[09:06:47] *** jjido has joined ##java
[09:08:03] *** TzilTzal has joined ##java
[09:09:42] <webczat> Aren't java servlets too complicated, compared to ... php, for example?
[09:10:46] *** LouisJB has joined ##java
[09:13:13] <cbeust> webczat: They are more complicated but more powerful too
[09:13:34] *** L4nce0 has joined ##java
[09:13:36] <cbeust> Besides, it's not really comparable: PHP is a view technology, a servlet is the engine that displays this view
[09:14:02] <L4nce0> hey guys, what's the best type of map to use for a <string, ArrayList>
[09:14:27] <cbeust> Map<String, ArrayList>>?
[09:14:35] <cbeust> Although Map<String, List> probably better
[09:14:46] <Gracenotes> everything's complex. depends on where you put the complexity.
[09:15:08] <L4nce0> just a plain map?
[09:15:13] *** encKe has quit IRC
[09:15:23] *** chandan_kumar has joined ##java
[09:15:23] <Gracenotes> I don't really like where JSP puts it. its abuse of HTTP aside.
[09:15:30] <cbeust> L4nce0: Not sure what "plain" means here
[09:15:37] *** Bombstone has quit IRC
[09:16:11] <L4nce0> well, going off the map heigharcy, you have a map, then it get abstracted / extended to hash map, tree map linked hash maps, etc
[09:16:36] <cbeust> L4nce0: Correct, Map is an interface, you need to pick an implementation
[09:16:46] <cbeust> HashMap is probably the one you want if you're not sure
[09:16:54] <webczat> cbeust: More powerfull... Not sure, php has databases, shared memory (java probably does not), ssl/tls, sockets, select, and other things.
[09:17:32] <cbeust> webczat: Java has all that and more, such as static typing, JITs, NoSQL, etc...
[09:18:05] *** Varox has joined ##java
[09:18:07] <Gracenotes> if you're talking about performance, the value type doesn't matter. key type isn't too important in many cases. your choice of map implementation should be defined by how you use it, not the types of the things inside.
[09:18:08] <cbeust> PHP doesn't have a lot of flexibility in terms of scaling, both horizontal and vertical.
[09:18:15] <cbeust> PHP is also pretty slow (Facebook converts it to C)
[09:18:22] <webczat> cbeust: Yeah, but to deploy an application, you make a complicated directory structure and you need to tell the servlet container that you modified the application.
[09:18:25] *** devkhadka has quit IRC
[09:18:41] <cbeust> webczat: Deploying servlets in Java is a matter of seconds in a decent environment
[09:18:56] <cbeust> webczat: and if you're using JSP or something similar, it's a matter of refreshing your page in the browser
[09:19:05] <webczat> But you probably need to call the manager, right?
[09:19:14] <webczat> In tomcat.
[09:19:23] <cbeust> webczat: No, for .jsp and similar views, you really just modify the .jsp and refresh
[09:19:48] <cbeust> And there are plenty of other technologies that give you similar flexibilities for more complex view systems (e.g. JRebel)
[09:19:59] <webczat> So what's the difference between jsp and servlets if I don't count the fact that jsp is not a java class?
[09:20:20] <cbeust> A servlet can serve many different flavors of content, JSP is just one of these
[09:20:47] <webczat> I meant things like making java servlet classes vs jsp.
[09:20:49] *** vdv has quit IRC
[09:20:50] <cbeust> Some people use Velocity for example, GWT passes Javascript, etc...
[09:21:21] <cbeust> webczat: Sorry I don't feel like writing a whole tutorial on this in irc, there is plenty of material available on the web
[09:21:38] *** devkhadka has joined ##java
[09:21:44] <webczat> I don't need info how to use it, just the difference.
[09:22:02] <Gracenotes> you won't get the difference without learning how to use it
[09:22:14] <Gracenotes> this entire conversation has been back-and-forth bickering filled with technology talking points :|
[09:22:38] <cbeust> Gracenotes: Hopefully I was on the technology side of the fence :)
[09:22:58] *** CodeWar has joined ##java
[09:24:12] *** Cradam has joined ##java
[09:24:28] <Cradam> hi is a java book from 2002 still relevant?
[09:24:35] <Gracenotes> everything is technology, and it's like apples and oranges. apples are nice in pies, but I'll have some orange in my salad.
[09:24:50] <Cradam> its my dads old one
[09:24:53] <cbeust> Cradam: Depends but probably not
[09:24:55] <Gracenotes> well, depends on the dressing, too.
[09:25:11] <Gracenotes> creamy dressings don't usually go well with mandarin oranges in my experience
[09:25:30] <cbeust> Cradam: Java is backward compatible so it will probably not tell you incorect things, but it will not mention a lot of them as well (especially JDK 1.5)
[09:25:57] <Cradam> its designed for 1.2
[09:26:00] *** diegoviola has quit IRC
[09:26:06] <cbeust> Cradam: Yeah don't bother
[09:26:15] <cbeust> Plenty of more current books available
[09:26:23] <Cradam> if you have money
[09:26:39] <cbeust> ~~ cradam rbi
[09:26:39] <javabot> The user cradam is not on ##java
[09:26:43] <Cradam> which coincidentally i dont
[09:26:46] <cbeust> ~~ Cradam rbi
[09:26:46] <javabot> Cradam, rbi is http://download.oracle.com/javase/tutorial/reallybigindex.html
[09:27:04] <cbeust> Plenty of free material on the web
[09:27:18] <Cradam> really basic something i guess
[09:27:50] <webczat> Can you just put jsp files like php scripts and just refresh the page?
[09:27:57] *** jjido has quit IRC
[09:28:08] <cbeust> webczat: I told you exactly that twice I believe.
[09:28:14] <Cradam> are you sure that site is for java 1.6 it looks likeits from the 90's
[09:28:33] <webczat> ok, but are jsp things good, actually?
[09:28:35] *** Bombstone has joined ##java
[09:28:39] *** jjido has joined ##java
[09:29:05] <webczat> or it's better to usually use servlets?
[09:29:05] <cbeust> webczat: JSP's are okay but close to the metal, they expose the developer to a lot of minutia
[09:29:22] <cbeust> webczat: you haven't understood my attempted explanation of difference between JSP and servlets
[09:29:22] *** htat has quit IRC
[09:29:43] <cbeust> What displays a JSP in HTML form is a servlet (typically)
[09:29:57] <Cradam> java server protocol?
[09:29:58] <cbeust> They are not mutually exclusive
[09:30:04] <cbeust> Java Server Page
[09:30:05] *** aless67 has joined ##java
[09:30:06] <Cradam> ahh
[09:30:13] <aless67> hi
[09:30:40] <Cradam> so similar to microsofts asp
[09:30:43] <cbeust> Cradam: the page is current, it mentions Generics and modern stuff
[09:30:47] <cbeust> Cradam: Yes
[09:31:36] <webczat> What do I need if I use, for example, tomcat, and I develop a servlet, but I want to do it on a computer without tomcat?
[09:31:39] <webczat> And then upload?
[09:31:48] <Cradam> in web design i only know html and css to any extent, am learning js aswell, will expand into php when i feel i am a lot better with js
[09:32:35] <cbeust> webczat: You will need a web server on that other computer, I'm guessing Apache if it's not Tomcat? Or an app server?
[09:33:07] <webczat> Yeah, like let's assume I have it.
[09:35:44] *** sphenxes has joined ##java
[09:39:14] *** cbeust has quit IRC
[09:40:35] *** LouisJB has quit IRC
[09:41:21] *** jjido has quit IRC
[09:42:27] *** lunatik210 has joined ##java
[09:47:36] *** Bombstone has quit IRC
[09:47:41] *** lunatik210 has quit IRC
[09:48:28] *** magn3ts has quit IRC
[09:48:30] *** jjido has joined ##java
[09:50:54] *** horte has quit IRC
[09:52:58] *** jjido has quit IRC
[09:56:00] *** pen has joined ##java
[09:56:55] *** rigved has quit IRC
[10:02:11] <aless67> hey
[10:02:18] <aless67> some of you know argoUML software
[10:02:24] <aless67> ?
[10:04:33] *** CodeWar has quit IRC
[10:08:51] *** maxorator has joined ##java
[10:09:20] *** pen has quit IRC
[10:09:43] *** Kamaran has joined ##java
[10:10:36] *** lunatik210 has joined ##java
[10:10:44] *** om4r has joined ##java
[10:11:24] *** horte has joined ##java
[10:11:25] *** Tashtego has joined ##java
[10:11:47] <om4r> hey, i have a class called "Images" with a string array String[] "imagepath" which is empty, I did "Images imageclass = New Images(GetAppcontext..());", but when i do imageclass.imagepath[0]="test".. I get an FC!
[10:13:27] *** magn3ts has joined ##java
[10:13:38] *** homie has joined ##java
[10:15:47] *** horte has quit IRC
[10:17:20] *** yoshx has joined ##java
[10:21:58] *** ede has quit IRC
[10:22:00] *** pfrog has quit IRC
[10:22:20] *** dlam has quit IRC
[10:25:59] *** Error404NotFound has joined ##java
[10:29:06] *** devkhadka has quit IRC
[10:29:37] <[[thufir]]> webczat: you can always use GAE (google app engine) #gae
[10:29:38] *** RLa has joined ##java
[10:31:52] <Cradam> yeah but it is gae
[10:32:14] <Cradam> lol
[10:38:09] *** webczat has quit IRC
[10:40:07] <shookees> sup ladskys
[10:40:18] *** srji has quit IRC
[10:42:24] *** xiliax has joined ##java
[10:43:51] *** yoshx has quit IRC
[10:49:22] *** frangiz has joined ##java
[10:56:14] *** cyphorious has joined ##java
[10:58:53] *** horte has joined ##java
[10:59:22] *** pipeep has joined ##java
[11:08:35] *** Lone_Rifle has joined ##java
[11:08:44] *** arborist has joined ##java
[11:10:45] *** benoitdo_ has joined ##java
[11:12:10] *** pen16 has quit IRC
[11:13:22] *** Sliker has joined ##java
[11:17:10] *** horte has quit IRC
[11:17:58] *** devkhadka has joined ##java
[11:24:26] *** Lone_Rifle has quit IRC
[11:32:32] *** zhulikas has joined ##java
[11:33:45] *** Fuco has joined ##java
[11:34:35] *** sphenxes has quit IRC
[11:34:36] *** Terabyte has joined ##java
[11:34:37] <Terabyte> hi
[11:35:15] *** benoitdo_ has quit IRC
[11:36:36] *** RLa has quit IRC
[11:36:37] <Terabyte> When you connect to a database and run a statement, you should always escape the parameters you are passing in. How is this done in java? Not sure if it matters but i'm using java.sqlDriverManager.getConnection("jdbc:h2:...") to connect to the database. I mention this because in perl you call quote() on the database handler, just wonder how it's done in java.
[11:38:47] <Cradam> hi how do i compile someone elses code
[11:38:49] *** FrozenKnight has joined ##java
[11:39:10] <Cradam> im usin jcreator
[11:39:34] <aless67> in java EXPR is a primitiv type?
[11:40:16] <Terabyte> more specifically I see the {escape} keyword... but that requires me to specify the characters i need to escape. I don't know what they are (and frankly i don't see why i should need to since i didn't need to for perl).
[11:40:39] *** msieradzki has joined ##java
[11:40:48] *** Fisiu has joined ##java
[11:46:46] <dangertools> Terabyte: PreparedStatement is a good choice
[11:46:55] <dangertools> Cradam: using javac
[11:47:05] <Terabyte> thanks dandre
[11:47:07] <Terabyte> danger*
[11:47:13] *** Tashtego has quit IRC
[11:47:37] <_W_> Terabyte, fundamental rule of programmatic SQL - never do escaping
[11:48:01] <_W_> let that be handled by a tested library that can't be passed parameters without them being proper escaped
[11:48:06] <Terabyte> :)
[11:48:10] <_W_> PreparedStatement handles this in Java
[11:48:22] *** dmiles has joined ##java
[11:50:12] *** pipeep has quit IRC
[11:50:29] *** Soliah has joined ##java
[11:51:07] *** dmiles_afk has quit IRC
[11:53:43] <Terabyte> i see preparestatement(sql) uses indexes to map variables. is there a more maintainable version like column by name? I see an alternative two parameter version that mentions columns, but I don't think this does what I want?
[11:53:51] *** everythingWorks has joined ##java
[11:53:53] <everythingWorks> hi
[11:54:06] <everythingWorks> Does java have something like references or pointeres?
[11:54:12] <everythingWorks> pointers*
[11:54:26] <selckin> all objects variables are pointers
[11:54:28] <everythingWorks> I do need them to have 2 variables being always the same vallue
[11:54:36] <siyb> everythingWorks: every variable storing an object is a reference
[11:54:41] <everythingWorks> means they are pointing to the same memory
[11:54:53] <everythingWorks> how can i solve that then?
[11:55:49] <siyb> Object o = new Object(); Object o1 = o;
[11:56:13] <everythingWorks> now if i do o.aInt = 5;
[11:56:21] <everythingWorks> obj o1.aInt will also be 5 \?
[11:56:29] <selckin> yes
[11:56:33] <Terabyte> one would hope so.
[12:03:15] *** TzilTzal has quit IRC
[12:05:49] *** Naith has quit IRC
[12:06:17] *** dmiles_afk has joined ##java
[12:07:40] *** dmiles has quit IRC
[12:08:16] <aless67> guys
[12:08:20] <aless67> i am using eclipse
[12:08:32] <aless67> how to open an already existing project already in the workspace?
[12:10:09] *** yosup has quit IRC
[12:10:37] *** dmiles_afk has quit IRC
[12:10:41] *** horte has joined ##java
[12:11:45] *** everythingWorks has left ##java
[12:11:47] *** chandan_kumar has quit IRC
[12:13:47] <SeriousWorm> right click -> open project
[12:13:50] <SeriousWorm> RC on the project
[12:14:35] <aless67> i cant right click on eclipse
[12:14:47] <aless67> and in the menu Projet => open projet isn't clickable
[12:14:49] <aless67> wth?
[12:16:11] *** dmiles_afk has joined ##java
[12:16:13] <aless67> and if i try to make new project with the same name "projet already exist"
[12:16:18] <aless67> then why i cant open it ? oO
[12:16:30] <SeriousWorm> right click on the project in the project explorer on the left hand side
[12:16:55] <aless67> there is no left hand
[12:17:00] <aless67> there is right
[12:17:01] <aless67> but no left
[12:17:06] *** gdoko has joined ##java
[12:17:28] *** gelignite has joined ##java
[12:18:52] <Terabyte> how do you turn a string into a clob?
[12:19:12] *** fisted_ is now known as fisted
[12:19:15] <selckin> tried google?
[12:19:19] <Terabyte> yes, sorry just found it
[12:19:27] *** merzo has joined ##java
[12:19:48] <Terabyte> solution setString, and let the database work out it's a clob
[12:20:04] <Terabyte> seems a bit wrong but if it works...
[12:21:01] *** Versuchen has joined ##java
[12:21:27] <aless67> eclipse is so difficult to understand ffs
[12:21:51] <Terabyte> aless67 one momeent
[12:21:52] <selckin> ~idea
[12:21:52] <javabot> selckin, idea is an open source Java IDE that has free and non-free versions. See http://www.jetbrains.com/idea/
[12:22:25] <Terabyte> aless67 try import project
[12:22:27] <Terabyte> File -> Import
[12:22:31] *** Luc1fel has joined ##java
[12:22:33] <aless67> Terabyte, i delete all an remake a new projet (omg) but now whe ni generate javadoc, this is blocked
[12:22:44] <aless67> the console : " Generating /home/aless/Bureau/TP%20S5/POO2/TP2/doc/stylesheet.css..."
[12:22:48] <aless67> and nothing happened
[12:22:50] <aless67> since 1 minute
[12:22:57] <Terabyte> you say an already existing project. you mean an already existing eclipse project or a set of java sources
[12:23:21] <aless67> i already import source in a project
[12:23:27] <Terabyte> so you've fixed that?
[12:23:28] <aless67> dont care of this please i restart all
[12:23:35] <aless67> yes by deleting all in eclipse
[12:23:37] <Terabyte> well say so instead of making me read.
[12:23:39] <aless67> and re-import all
[12:23:45] <aless67> buuuuut
[12:23:48] <aless67> the console : " Generating /home/aless/Bureau/TP%20S5/POO2/TP2/doc/stylesheet.css..."
[12:23:51] <Terabyte> and keep your responses on 1 line.
[12:23:52] <aless67> and nothing happened
[12:24:20] <Terabyte> and use netbeans.
[12:24:20] <aless67> this eclipse is already buging at my first use .. wow
[12:24:27] <aless67> netbeans?
[12:24:33] <selckin> ~pebkac
[12:24:33] <javabot> selckin, pebcak is Problem Exists Between Chair and Keyboard
[12:24:55] <Terabyte> yes. it's better than eclipse. and if you can afford it use idea
[12:24:59] <Terabyte> ~netbeans
[12:24:59] <javabot> Terabyte, netbeans is Oracle's standard Java IDE not aimed at the enterprise and considered one of the 'big 3' IDEs. See http://netbeans.info and/or download this http://is.gd/5nd3P (DZone RefCard). Also ask me about ~ide for alternatives.
[12:25:01] <Terabyte> :3
[12:25:30] <Terabyte> plus netbeans has proper maven integration.
[12:26:42] <aless67> anyway i finally done the javadoc
[12:26:51] <Terabyte> and ask this in #eclipse
[12:26:55] <aless67> why do the javadoc has 1 million .html
[12:27:51] *** sphenxes has joined ##java
[12:27:51] *** webczat has joined ##java
[12:28:16] <webczat> Hey, I discovered that jsp changes aren't reflected on reload of the page.
[12:28:23] *** Shootdown has joined ##java
[12:28:29] <Shootdown> hi
[12:28:39] *** pr3d4t0r has joined ##java
[12:29:42] <Shootdown> is there any way to initialize a int[] array with an interval ? For example, something like int[] a = {1 ... 200}
[12:29:57] <Shootdown> any way?
[12:30:09] <selckin> new int[] { 1,3,2}
[12:30:53] <Shootdown> selckin: no, but i want an interval
[12:30:59] <SeriousWorm> no
[12:31:04] <SeriousWorm> do it in a loop
[12:31:07] <Shootdown> ok
[12:31:09] <Shootdown> thanks
[12:32:47] *** frangiz has quit IRC
[12:35:47] <webczat> How much memory do java program take? Like, do they take a lot?
[12:36:06] <selckin> <-------------> this much
[12:36:46] <webczat> So?
[12:37:47] <webczat> The question is because I heart it takes a lot of memory.
[12:38:03] *** pipeep has joined ##java
[12:38:59] <selckin> it's not a usefull question, define a lot
[12:39:04] <aless67> guys
[12:39:07] *** frangiz has joined ##java
[12:39:19] <aless67> i have abstract class A, and class B extends A
[12:39:30] <aless67> but i have also class C extends A
[12:39:34] <selckin> ~return
[12:39:35] <javabot> Don't press return until you've finished typing your question, it's annoying to see multiple lines for one question, and hard to follow.
[12:39:41] <aless67> in B et C i have method x and y
[12:39:53] <aless67> but i want to put an other method in only B (method z)
[12:39:55] <aless67> but i cant ?
[12:39:57] <aless67> wth?
[12:40:02] <selckin> this is not msn with your 14 year old friends, stop hitting enter
[12:40:15] <aless67> ho sorry, i will ok
[12:40:37] <webczat> selckin: I mean, I heart that java programs eat memory very quickly.
[12:40:48] <webczat> Or at least that they use more memory than they should.
[12:40:58] <selckin> webczat: wrong
[12:42:04] *** horte has quit IRC
[12:43:18] <webczat> For example tomcat takes 80mb at startup, and when I started a first jsp it eaten 10 more.
[12:43:43] *** dmiles_afk has quit IRC
[12:45:14] <selckin> it's allowed and will allocate memory up to the limit you define in Xmx
[12:45:58] <webczat> selckin: It's allowed, but isn't it too much for a jsp? I thought that jsp servlet is loaded at tomcat startup so how it did that?
[12:45:59] <selckin> that doesn't mean the app is actually using that much
[12:46:23] <selckin> you're jumping to incorrect conclusions
[12:46:51] <webczat> So what is this mem for?
[12:47:28] <webczat> And what's the default limit?
[12:48:08] <selckin> default is a % of your total memory i think
[12:48:34] <selckin> and read up on garbage collectors
[12:50:42] *** mescalinum has joined ##java
[12:52:43] *** RLa has joined ##java
[12:54:21] *** Naith has joined ##java
[12:54:27] <Terabyte> having trouble with a classNotFoundException, but I'm sure I've set the classpath. Any ideas? http://www.solong.co.uk/classpathp.png
[12:57:02] <SeriousWorm> try running java with the -cp <classPath> parameter
[12:57:27] <SeriousWorm> and why do you have thousands of notepads :| get notepad2 or edit those inside your IDE
[12:57:31] <SeriousWorm> erm I meant notepad++
[12:57:48] <Terabyte> i have notepad++, but sometimes you just need a little less + :)
[12:57:57] <SeriousWorm> ok :)
[12:58:12] <Terabyte> better question, why is one of those notepad windows called "feckless java.txt"
[12:58:40] <selckin> DO NOT set a system wide classpath variable
[12:58:42] <selckin> omg
[12:58:55] <Terabyte> ;_; I was trying to hit the nail with a sledgehammer.
[12:59:08] <selckin> do not use the classpath variable ever.
[12:59:11] <Terabyte> selckin I also set it for the user...
[12:59:24] <selckin> also they are not updated untill you relogin/reboot
[12:59:30] <Terabyte> ah, that explains a lot
[12:59:36] <selckin> since the env is inheritted from process to process
[12:59:39] <selckin> also it's really stupid
[12:59:50] <selckin> fragile and will break stuff
[13:00:10] <Terabyte> wish i knew how to set the classpath in netbeans
[13:00:25] <selckin> probably some button with add library
[13:00:26] <Terabyte> why classpath netbeans does not result in a first row answer i don't know
[13:00:40] <Terabyte> google*
[13:00:57] <selckin> it's the 2nd hit on "netbeans configure classpath"
[13:01:32] *** gdoko has quit IRC
[13:01:56] *** chl5011 has left ##java
[13:02:12] <Terabyte> that's whre you can drop them, i was hoping for a path I could edit.
[13:02:40] <selckin> http://netbeans.org/kb/docs/java/project-setup.html#projects-classpath
[13:02:49] <selckin> "add jar folder" or whatever surely works
[13:03:07] <Terabyte> i don't have libraries option. i'm using maven D:
[13:03:18] <selckin> then ffs use maven dependency
[13:03:22] *** mescalinum has quit IRC
[13:03:22] <selckin> thats like the whole reason you use mavn
[13:03:35] <Terabyte> oh I thought that was only if you wanted to embedd H2.
[13:03:35] *** tilerendering has joined ##java
[13:04:14] <selckin> yes you want to include the h2 drivers ...
[13:05:57] <Terabyte> oh cool. it works thanks selckin
[13:09:08] *** Varox has quit IRC
[13:09:11] *** Error404NotFound has quit IRC
[13:11:29] *** igorklem has joined ##java
[13:14:55] *** platzhirsch has joined ##java
[13:15:00] *** platzhirsch has left ##java
[13:15:15] <dreamreal> morning
[13:15:23] *** pen has joined ##java
[13:21:58] *** webczat has quit IRC
[13:22:27] *** Soliah has quit IRC
[13:24:06] *** Naith has quit IRC
[13:28:01] *** Shootdown has quit IRC
[13:28:58] *** bindaas has joined ##java
[13:33:35] *** iman has joined ##java
[13:34:05] <iman> are there any open source software like www.dzone.com in java ?
[13:34:25] <dreamreal> you mean aggregators? what part of dzone are you referring to?
[13:35:16] *** nous1024 has joined ##java
[13:35:18] <iman> dreamreal: a site like dzone, but only focus in java
[13:35:25] <dreamreal> java.dzone.com
[13:35:28] <dreamreal> javablogs.com
[13:35:59] <dreamreal> (depending again on which facet you're referring to.) dzone started as javalobby.org, back in... 1998? 1997? so it's always had a heavy java focus.
[13:37:02] *** tuxwet has quit IRC
[13:37:18] *** camcorder has joined ##java
[13:37:19] <camcorder> hi
[13:37:41] *** riotz has joined ##java
[13:37:46] <camcorder> I read an article which says having non-constant variables of class as public is not a good practice
[13:37:55] <dreamreal> good for you!
[13:37:59] <camcorder> but same article says accesors are not good as well
[13:38:06] <dreamreal> heh
[13:38:16] <dreamreal> Maybe it's advocating you not use data at all.
[13:38:19] <camcorder> so what's the best practice to assign values to your variables?
[13:38:27] <iman> dreamreal: i want to create a site like these in persian language, is it open source to isntall ?
[13:38:28] <camcorder> dreamreal, well that also confused me as well
[13:38:28] <dreamreal> assignment is mutation, not access
[13:38:32] <dreamreal> iman: no.
[13:38:41] <dreamreal> camcorder: maybe the article was complete and total BS.
[13:38:55] <camcorder> http://www.javaworld.com/javaworld/jw-09-2003/jw-0905-toolbox.html?page=2
[13:39:03] *** anaconda_ has joined ##java
[13:39:35] <camcorder> dreamreal, well it has some good points though
[13:39:43] *** Hurr|cane has joined ##java
[13:39:44] <dreamreal> heh, it IS total BS
[13:39:55] <dreamreal> ooo, allen holub, too
[13:40:00] <dreamreal> he got you. In 2003.
[13:40:19] *** tuxwet has joined ##java
[13:40:35] *** MikeJansen has joined ##java
[13:41:09] <dreamreal> Honestly, it looks like Holub was drinking heavily from the Bottle of Objects Should Only Do Stuff, Not Expose Stuff.
[13:41:40] <iman> dreamreal: you mean there is only one way that have i to develop a new site like it ?
[13:42:23] <camcorder> dreamreal, data should be inside a database as much as it can be, sounds as some logic though
[13:42:38] <camcorder> logical
[13:43:03] <_W_> I'm trying to imagine how an API with that kind of logic applied would look
[13:43:08] <_W_> don't think I can do it
[13:43:11] *** anaconda_ has quit IRC
[13:43:15] <camcorder> I think now I understand what he meant
[13:43:44] *** Cradam has quit IRC
[13:44:04] <_W_> he goes really off the deep end when he argues that calling swing/awt classes and methods isn't writing UI code
[13:44:22] <_W_> because both AWT and Swing are abstractions for UIs!
[13:44:28] <dreamreal> _W_: basically you'd not GET information, you'd only USE information
[13:44:56] <dreamreal> so instead of getHeight(), you'd do something funky like dimension.draw(image)
[13:44:57] <_W_> I guess you could do it with a ton of visitor pattern applications
[13:45:08] <dreamreal> what dimension would do would ... probably have to get information from the image, but hey
[13:45:19] <RLa> that sounds stupid and leads to unoptimal system design
[13:45:44] <dreamreal> you can't make grandiose, sweeping, ridiculous statements without saying a few things that would lead the unsuspecting down rabbit holes that contain snakes waiting to eat your soul.
[13:45:45] <RLa> as any other technique carried to extremes
[13:45:46] <_W_> oh and he contradicts himself as well, nice
[13:46:38] <_W_> getters are fine as long as they don't return primitives or concrete class types
[13:46:50] <_W_> (why? who knows)
[13:47:49] * dreamreal reminds people: "ALLEN HOLUB."
[13:48:49] * _W_ prefers to argue points, not people
[13:49:03] <dreamreal> _W_: sometimes, arguing about the people explains all the points
[13:49:06] *** bitshuffler has joined ##java
[13:49:11] <RLa> also, wtf is javaworld page doing with my scroll, the page is completely broken in konqueror
[13:49:13] *** noctux has joined ##java
[13:49:19] *** RLa has quit IRC
[13:49:52] *** RLa has joined ##java
[13:49:55] <dreamreal> It's like, you know: "Mono is way better than everything, microsoft isn't evil, they just want everything you own." "Miguel de Icaza." "... oh."
[13:50:08] <_W_> is JavaWorld a joke site?
[13:50:24] <_W_> "Lots of Java developers around me feel the need to learn some more dynamic and extendible language. That is understandable and there is no doubt that learning a dynamic language is inevitable for most Java devs in the next year or two."
[13:50:25] <dreamreal> or: "Java sucks, python's way faster to write, and developer time is more important than anything. That's why I use PHP."
[13:50:29] <_W_> from article on their front page
[13:50:50] *** everythingWorks has joined ##java
[13:50:59] <everythingWorks> are member variables as default public or private?
[13:51:13] <dreamreal> _W_: javaworld hasn't been very relevant for a long, long time. If memory serves, Peter Varhol was their editor. He ran TSS a little over a year ago.
[13:51:14] <_W_> neither, they're default
[13:51:16] <dreamreal> everythingWorks: default.
[13:51:18] <_W_> ~~ everythingWorks default
[13:51:18] <javabot> everythingWorks, what does that even *mean*?
[13:51:23] <_W_> ~~ everythingWorks access modifiers
[13:51:24] <javabot> everythingWorks, access level is one of 'public' ,'private', 'protected', or default a.k.a. package private. They control which code is allowed to access the attribute / call the method. public means: Everybody, 'private' means: Only stuff in this source file. For more info, see ~public, ~private, ~package-private, and ~protected, and this link: http://is.gd/eJYt (sun.com)
[13:52:30] <_W_> haha I think they ARE a joke site dreamreal
[13:52:51] <_W_> probably most people submitting articles (or "blog posts") are just trolling
[13:53:02] <everythingWorks> ~package-private
[13:53:02] <javabot> everythingWorks, package-private is the access level you get when you do not specify public, private, or protected. It is also known as "default access". A package-private member is visible to the enclosing class and classes in the same package. It is not visible to subclasses which are not in the same package as the enclosing class. See "~access level" for more information.
[13:53:07] <dreamreal> they were not, back in the day.
[13:53:30] <_W_> "how to play mp3 with java" "JNI!"
[13:53:41] *** ugoubuntu has joined ##java
[13:53:51] *** everythingWorks has left ##java
[13:54:08] <_W_> ~default is <see>package-private
[13:54:08] <javabot> OK, _W_.
[13:56:10] *** eyesUnclouded has joined ##java
[13:57:05] *** eyesUnclouded has quit IRC
[13:59:15] *** msieradzki has quit IRC
[14:00:09] *** bojo has quit IRC
[14:01:11] *** ugoubuntu has quit IRC
[14:02:25] *** rjohnson19 has joined ##java
[14:05:28] *** drindt has joined ##java
[14:07:17] *** bindaas has quit IRC
[14:09:42] <noctux> has any1 of you an recommendation for a small java-open-source project with a small codebase, where a beginner can read and learn + maybe later even submit a bit of code?
[14:09:51] *** bindaas has joined ##java
[14:10:19] <selckin> find an itch, scratch it
[14:10:42] <noctux> looking around my desktop was no help, as the only real java-applications I use are Libre-office, Eclipse, etc, so only big projects
[14:10:59] <Planck_> How about coding a web app server framework in Java? There aren't too many of those around...
[14:11:00] *** Luc1fel has quit IRC
[14:11:20] <Planck_> Or a Minecraft mod!
[14:11:47] <noctux> Planck_: I don't play minecraft =)
[14:12:15] <Planck_> Ignore me anyway, I'm being silly. Too much JOGL.
[14:12:33] <noctux> and about an web app server, well =) I need to learn a lot before I can do that =)
[14:12:53] *** yoshx has joined ##java
[14:14:17] <noctux> Planck_ I really doubt you are silly :p
[14:17:36] <[[thufir]]> JOGL?
[14:18:03] *** magn3ts has quit IRC
[14:18:06] <noctux> java Gl bindings I think
[14:18:14] <noctux> *GL
[14:21:18] *** pipeep has quit IRC
[14:21:33] <Planck_> Yes, OpenGL for Java. After this little project I might look at jMonkeyEngine, I've heard decent things about it.
[14:22:07] *** magn3ts has joined ##java
[14:23:12] *** wh1t3 has joined ##java
[14:25:45] <Cher> #join subversion
[14:26:36] *** diminish has joined ##java
[14:27:12] *** kvarley has joined ##java
[14:27:41] *** pipeep has joined ##java
[14:27:54] <kvarley> I am developing a JFrame application with a fixed layout, on maximise I want it to change layouts - How can I do this?
[14:30:20] *** Lectus has quit IRC
[14:30:32] <ernimril> kvarley: listen for maximize events
[14:30:49] *** Tashtego has joined ##java
[14:31:26] <kvarley> ernimril: Thanks :)
[14:33:06] <ernimril> kvarley: look for window state and check the extended state
[14:34:23] *** NWMonster has joined ##java
[14:34:30] *** mescalinum has joined ##java
[14:35:05] *** NWMonster has quit IRC
[14:35:26] *** irn has joined ##java
[14:37:58] *** MikeJansen has quit IRC
[14:38:50] *** McMAGIC-- has quit IRC
[14:38:53] <RLa> noctux, you certanly want destop app?
[14:39:04] <noctux> RLa: nope
[14:39:11] *** MikeJansen has joined ##java
[14:39:25] <noctux> I just usually look around if there is sth I frequently use, so that would have been an option
[14:39:33] <noctux> to contribute
[14:39:35] <noctux> =)
[14:39:47] <RLa> actually working on eclipse might be good idea
[14:39:59] <RLa> expecially on plugins
[14:40:27] *** Symbi0nt|GER has joined ##java
[14:40:43] <noctux> RLa: well, plugins might be an Idea... because eclipse as such is a bit too "big" for me to comprehend :p
[14:40:57] *** McMAGIC-- has joined ##java
[14:41:07] *** yoshx has quit IRC
[14:41:14] <RLa> it should be quite modular
[14:42:22] <RLa> tho implementing some features might just mean implementing bunch of interfaces which might be boring
[14:42:31] <Terabyte> is it possible to use enums as bitflags?
[14:42:45] <RLa> Terabyte, see EnumSet etc
[14:42:49] <Terabyte> cool
[14:43:30] <RLa> that's correct way to do something similar to C-like bit-style stuff
[14:43:59] <Terabyte> hmm
[14:44:14] <Terabyte> so i create my enums, and then load it into an enum set?
[14:44:23] <noctux> RLa: well, I think I've found sth, at least it looks interesting, as I use that plugin a lot: http://sourceforge.net/projects/vrapper/files/
[14:44:33] <noctux> RLa: thank you!
[14:45:05] <ernimril> Terabyte: it depends on what you really want to do
[14:45:23] <ernimril> Terabyte: in many cases you can let the actual enums have methods that you call
[14:46:09] <RLa> there was nice enum tutorial but i cannot find it anymore
[14:46:24] <ernimril> ~enums
[14:46:24] <javabot> ernimril, enums is http://java.sun.com/javase/6/docs/technotes/guides/language/enums.html
[14:46:38] <Terabyte> well i'd like to make the call by writing something like call( A & B ) and have call { if O.isSet(A) {} if O.isSet(B){} }
[14:47:06] <ernimril> Terabyte: you can not really do that with enums in java
[14:47:18] <Terabyte> :(
[14:47:24] <ernimril> Terabyte: java enums are objects so "A & B" is not allowed
[14:47:33] <Terabyte> dam
[14:47:44] <ernimril> Terabyte: you can pass an enumset or a varargs of enums or ....
[14:48:09] <Terabyte> or i could just implement the command pattern and issue a queue of commands to be executed..
[14:48:37] <ernimril> Terabyte: well, at least I do not know what you are really trying to do so it is hard to suggest the correct way
[14:48:55] *** everythingWorks has joined ##java
[14:49:09] <Terabyte> heh, i'm trying to control a 'databaseSchema' class which is capable of creating tables, or deleting them. sometimes i want it to do one, the other, or both.
[14:49:16] <everythingWorks> java doesent support default values for parameters? nice.. t_T
[14:49:22] <Terabyte> never used enums so i thought trying them would be a cool thing to do.
[14:49:24] <RLa> A & B should be EnumSet.of(MyEnum.A, MyEnum.B)
[14:49:48] <ernimril> everythingWorks: correct, but you can chain calls, if you really want to
[14:50:09] <dreamreal> everythingWorks: *sigh*
[14:50:12] <everythingWorks> ernimril explain please
[14:50:13] <Terabyte> I will take a look at RLa's remark
[14:50:27] <RLa> look at EnumSet javadoc
[14:50:51] <ernimril> everythingWorks: class Foo{ void foo() {foo(1);} void foo(int i) {...}}"
[14:51:04] <dreamreal> everythingWorks: foo(int a, int b, int c) {} foo(int a, int b) { foo(a,b,1); } foo(int a) { foo(a,2); }
[14:51:32] <everythingWorks> very smart.. :D
[14:51:43] <everythingWorks> But thanks for the help!
[14:51:51] <dreamreal> everythingWorks: java's pretty explicit about how you do things.
[14:51:54] <dreamreal> There's a reason for it.
[14:52:22] <RLa> Terabyte, for O.isSet(A), you use myenumset.contains(MyEnum.A)
[14:52:37] <everythingWorks> dreamreal, yes?
[14:52:37] <Terabyte> cool
[14:52:48] <Terabyte> RLa will take a look, just writing the enum first :D
[14:52:48] <Terabyte> thanks
[14:53:03] <dreamreal> everythingWorks: simplicity, of course. Java doesn't do magic things for you, so you don't end up relying on wishes and unicorn dust.
[14:53:37] <everythingWorks> simplicy?
[14:53:49] <everythingWorks> You think its more simple to create 5 functions pointing to one?
[14:53:51] <RLa> Terabyte, i think if you use static import for enum, you won't even need to write MyEnum.Value
[14:53:55] *** vdv has joined ##java
[14:54:01] <RLa> Terabyte, just Value
[14:54:01] <everythingWorks> Imo thats a crap
[14:54:05] <dreamreal> everythingWorks: sure. You'd rather want someone to know exactly what they're doing.
[14:54:20] <dreamreal> Otherwise, you're relying on hoping the system is set up the way you want.
[14:54:24] *** BSWolf has quit IRC
[14:54:31] <Terabyte> RLa there may be multiple, so i will qualify it, but good to know :)
[14:54:32] <dreamreal> You seem to forget that Java sees failures as catastrophic.
[14:54:39] <everythingWorks> If the parameter is not set it will assume a value?
[14:54:47] <everythingWorks> Wheres the problem on simplicy there
[14:55:06] <dreamreal> everythingWorks: do you know the value being set by default in foo(1), if there are two parameters?
[14:55:10] <dreamreal> Go ahead, tell me
[14:55:19] <dreamreal> I have an actual int in mind, I'll be nice and give you a type
[14:55:27] * dreamreal waits with bated breath
[14:55:35] <dreamreal> still waiting
[14:55:36] <dreamreal> come on
[14:55:38] <ernimril> dreamreal: 42!
[14:55:42] <dreamreal> ernimril: wrong.
[14:55:47] <dreamreal> everythingWorks: come on, TELL ME
[14:55:57] <dreamreal> It's so freaking simple, why aren't you telling me what it is?
[14:55:58] <everythingWorks> ?
[14:56:17] <dreamreal> foo(int a, int b) is the actual method being called. Let's assume b has a default.
[14:56:25] <dreamreal> foo(1) is the source code. What is b?
[14:56:31] <RLa> how would default args look on bytecode?
[14:56:33] <dreamreal> a is 1, clearly.
[14:56:37] <everythingWorks> b is not a default parameter here
[14:56:46] <dreamreal> everythingWorks: assuming Java were to have default parameters.
[14:56:52] <everythingWorks> it would be foo(int a, int b = 5)
[14:56:53] <dreamreal> The signature of the method takes two ints.
[14:57:04] <RLa> if you cannot imagine how, then that might be the reason why there are no default args
[14:57:06] <dreamreal> No, you're assuming you're looking at the method definition.
[14:57:12] <everythingWorks> now what do you think is be at foo(1)/
[14:57:17] <everythingWorks> 5 correct!
[14:57:24] <everythingWorks> b*
[14:57:26] <dreamreal> nope. I didn't give you the source for foo().
[14:57:32] *** Tashtego has quit IRC
[14:57:47] <dreamreal> I gave you the .class. Now tell me what b is in the method call foo(1). And here's another hint: it isn't 42, and it isn't 5.
[14:57:56] <dreamreal> and I'm waiting impatiently.
[14:58:06] <everythingWorks> If im typing any methods name it shows me all definitions for it..
[14:58:25] <everythingWorks> i press strg+space
[14:58:30] <dreamreal> everythingWorks: but defaults wouldn't be exposed in the declaration.
[14:58:31] <everythingWorks> andd there i see its 4 or whatever
[14:58:57] <dreamreal> you'd see the method signature, but default arguments aren't part of the actual signature, if you know anything about how they work in other languages.
[14:59:04] <everythingWorks> dreamreal in definition
[14:59:17] <dreamreal> so you press foo+space, and see foo(int, int)
[14:59:31] <dreamreal> everythingWorks: you are incorrect. Sorry.
[14:59:31] <everythingWorks> no i see foo(int blub, int blub=5)
[14:59:43] <dreamreal> in your magical world, sure. But in reality, that's not how they work.
[14:59:59] <everythingWorks> Well thats what im arguing.. :)
[15:00:11] <dreamreal> then you're arguing for magic. It isn't happening. Move along.
[15:00:28] <everythingWorks> Didnt you ever see default arguments?
[15:00:34] *** DarthJedi has joined ##java
[15:00:36] <dreamreal> of course I have.
[15:00:39] <everythingWorks> C++, c# every modern lang is having them! :D
[15:00:43] * dreamreal snrks
[15:00:56] <dreamreal> well, java's not modern, so perhaps you should be using C# instead?
[15:00:56] <everythingWorks> so i just wondered
[15:01:27] <everythingWorks> :D
[15:02:27] *** DarthJedi has quit IRC
[15:03:35] *** Gatto has joined ##java
[15:04:31] <Terabyte> If I subclass PreparedStatement and call super(), would the behaviour appear the same to an observer?
[15:04:45] <Terabyte> (Prepared Statement from the java.sql package)
[15:07:05] <dreamreal> ~tias
[15:07:05] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[15:07:27] *** rigved has joined ##java
[15:07:28] *** mescalinum has quit IRC
[15:07:31] *** mescalinum1 has joined ##java
[15:08:04] <Terabyte> well i'm sure i heard that you could do something like that, just can't remember if that was the way
[15:08:07] <Terabyte> gonna try it anyway
[15:08:26] *** askhl has quit IRC
[15:09:12] <Terabyte> "No interface expected here" :(
[15:09:20] *** everythingWorks has left ##java
[15:09:31] *** matsebc has quit IRC
[15:09:36] <Terabyte> oh, i have to use implements if i want to extend it :(
[15:10:38] <dreamreal> hee hee
[15:10:47] <Terabyte> god damnit
[15:10:57] <Terabyte> i am not writing super() 100 times for each of the 100 functions present
[15:11:11] <Terabyte> is there another way round this? i just want to extend 1 method
[15:11:35] <dreamreal> You do realize that preparedstatement is an interface, right?
[15:12:00] <Terabyte> oh
[15:12:03] <Terabyte> that's a point...
[15:12:17] <Terabyte> so what did connection.prepareStatement return...
[15:12:23] <dreamreal> an implementation.
[15:12:27] <Terabyte> abstract PerpareStatement.. useful...
[15:12:35] <dreamreal> no, interface.
[15:12:39] <Terabyte> ya
[15:12:41] <dreamreal> abstract and interface are not the same thing.
[15:12:48] <Terabyte> well that's what the IDE is claiming
[15:13:11] <dreamreal> well, if it says you have to implement and not extend, it's an interface. Not an abstract class.
[15:13:19] <Terabyte> hence the query
[15:13:27] <Terabyte> (as in my question, not the query i'm trying to execute ^_^)
[15:13:49] *** bitshuffler has quit IRC
[15:13:50] <dreamreal> well, use the decorator pattern. And have your IDE generate all the delegations.
[15:13:58] <Terabyte> ok
[15:14:31] <Terabyte> or for what it's worth write println() before the prepare statement rather than log in the class.
[15:14:59] <dreamreal> p6spy.
[15:15:26] <Terabyte> heh
[15:17:30] <dreamreal> have you seen it?
[15:18:13] <Terabyte> i'm reading it now
[15:18:29] <Terabyte> looks good, but 10 says that it provides way to much insight.
[15:18:32] *** matsebc has joined ##java
[15:19:35] <Terabyte> (10 says it requires a tonne of configuration to just give me 1 print statement rather than 500 lines of org.class.lah [seriousness level 671] massive.London.GMT 18:20:30:417244ms timestamp Prepared statement called on PrepareStatement object crapyoudontneedtoknow and here's what you wnt "select * from test"
[15:19:39] *** devkhadka has quit IRC
[15:19:42] <dreamreal> 10 what?
[15:19:50] <Terabyte> 10 yen.
[15:19:53] <dreamreal> oh.
[15:19:55] <Terabyte> i don't think that's much.
[15:19:58] <dreamreal> Nah, it's pretty easy to tell you.
[15:20:03] <Terabyte> cool
[15:20:13] <dreamreal> I'm not a betting man, in any event.
[15:20:16] <Terabyte> heh :D
[15:20:33] <Terabyte> i would, i tend to lose bets i havn't read before hand.
[15:20:35] <Terabyte> :P
[15:20:50] <Terabyte> seriously though thanks, i'll take a look
[15:22:33] *** BeholdMyGlory has joined ##java
[15:23:36] *** chandan_kumar has joined ##java
[15:25:29] *** eidolon has joined ##java
[15:25:33] <eidolon> *yawn* mrnin.
[15:25:59] *** om4r has quit IRC
[15:30:28] *** chandan_kumar has quit IRC
[15:34:26] *** BSWolf has joined ##java
[15:34:38] *** TzilTzal has joined ##java
[15:36:32] *** servo has quit IRC
[15:37:09] *** Cymage has joined ##java
[15:37:21] *** Symbi0nt|GER has quit IRC
[15:37:41] *** chandan_kumar has joined ##java
[15:38:44] *** bojo has joined ##java
[15:39:35] *** iman has quit IRC
[15:44:26] *** Pedro has quit IRC
[15:46:36] *** squeakytoy has joined ##java
[15:49:13] *** teralaser has joined ##java
[15:49:21] *** gremmachook has joined ##java
[15:50:18] *** Johannes13 has joined ##java
[15:50:37] * eidolon settles in to do combat with spring again.
[15:53:53] <squeakytoy> I thought of something so mindblowing yesteday, I am ashamed, we haven't done it before. I work with 7 other developers on a pretty large website project, where we have and use images all over the source code. So I asked my self, why don't we auto generate Java references to each image in the project, into one single Java class file - each time Eclipse builds your project
[15:54:42] <squeakytoy> That idea is soo great in so many ways
[15:59:38] *** chandan_kumar has quit IRC
[15:59:40] <eidolon> bah. this really looks like an AOP problem. which is complete black magic to me :(
[16:04:22] *** hdave has joined ##java
[16:06:02] *** hdave has left ##java
[16:06:03] *** cbeust has joined ##java
[16:06:08] *** neoneurone has joined ##java
[16:07:03] *** bitshuffler has joined ##java
[16:08:42] *** BeholdMyGlory has quit IRC
[16:08:49] *** TzilTzal has quit IRC
[16:09:16] *** gremmachook has quit IRC
[16:09:36] *** pen has quit IRC
[16:10:27] *** pantokrator has joined ##java
[16:13:28] <Terabyte> hi, is the method at line 25 in a static context? http://codepad.org/JaUuw40q
[16:13:36] *** servo has joined ##java
[16:13:53] *** rhonabwy has quit IRC
[16:14:10] *** cool123 has joined ##java
[16:14:23] <Terabyte> line 26 is complaining that non-static method getResourceAsStream(..) cannot be referenced from a static context
[16:14:32] <Terabyte> doesn't look like a static context to me...
[16:15:07] <ernimril> Terabyte: what does "ClassLoader.<whatever>" mean?
[16:15:15] <Terabyte> call ClassLoader statically
[16:15:20] <Terabyte> (a method on)
[16:15:33] <ernimril> Terabyte: correct, is getResourceAsStream a static method?
[16:15:39] <Terabyte> yes
[16:15:50] <ernimril> Terabyte: care to guess again?
[16:15:54] <squeakytoy> ernimril: what method has getResourceAsStream?
[16:16:03] <Terabyte> what's wrong with calling a static method from a non static context
[16:16:07] <squeakytoy> i mean Terabyte
[16:16:18] <squeakytoy> Terabyte: what class owns getResourceAsStream?
[16:16:18] <Terabyte> ClassLoader
[16:16:18] <ernimril> Terabyte: it is _not_ a static method
[16:16:42] <Terabyte> oh?
[16:16:48] <Terabyte> i read static somewhere.. one moment
[16:16:58] <squeakytoy> Terabyte: show us the API for getResourceAsStream ^^
[16:17:16] <squeakytoy> Terabyte: tell us who has the method getResourceAsStream
[16:17:57] <Terabyte> squeakytoy java.lang.ClassLoader if that's what you mean
[16:18:14] <Terabyte> but the autocomplete (javadoc) says public static InputStream getSystemResourceAsStream(String name)
[16:18:27] *** BeholdMyGlory has joined ##java
[16:18:44] <squeakytoy> Terabyte: what class has it?
[16:18:51] <Terabyte> what do you mean what class has it?
[16:19:02] <Terabyte> java.lang.ClassLoader??/
[16:19:30] <ernimril> Terabyte: are you looking in the api or are you looking in some kind of ide autocomplete view?
[16:19:40] <ernimril> ~~Terabyte javadoc ClassLoader
[16:19:41] <javabot> Terabyte: http://is.gd/zqWv6K [JDK: java.lang.ClassLoader]
[16:19:52] <Terabyte> netbeans autocomplete view which *should* be correct since it's oracles pet.
[16:19:58] <ernimril> Terabyte: can you please take a look at that page and see what it says?
[16:19:58] *** oso96_2000 is now known as oso[OuT]
[16:20:17] <Terabyte> ok that says it's non static
[16:20:31] *** BoF has joined ##java
[16:20:34] * eidolon ponders talking with cheeser about a bug-bounty on tech problems. "$10 to whomever can fix my spring problem."
[16:20:41] <ernimril> Terabyte: so it seems like your ide has just complicated things for you or that you do not know how to use it...
[16:20:45] <eidolon> (in the bot that is)
[16:21:04] <Terabyte> ernimril i'll go with the former
[16:21:36] *** rtdos has joined ##java
[16:21:38] <squeakytoy> teralaser: What people ususally do is MyClass.getClass().getResourceAsStream
[16:21:59] <Terabyte> ok
[16:22:01] <squeakytoy> class*
[16:22:09] <teralaser> hmprf
[16:22:15] <ernimril> or just getClass() if you have a non-static method
[16:22:16] <Terabyte> he means Terabyte
[16:22:38] <Terabyte> getClass() is good :)
[16:22:39] <Terabyte> cheers
[16:22:55] * Terabyte slaps Netbeans, blames his tools, and acts like a bad workman
[16:23:24] <squeakytoy> Terabyte: are you sure you want to use ClassLoader as well?
[16:24:15] <Terabyte> I don't care what I use, so long as it loads an XML config file from somewhere consistent (a package I control is a good place to start, and so the classloader seems like a good choice to load a resource). but if you have a better solution, i'd love to hear it.
[16:24:27] <Terabyte> http://www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property.html?page=2
[16:24:29] <Terabyte> reading this.
[16:24:40] <Terabyte> top of the page code box has that as the first line.
[16:24:49] <ernimril> Terabyte: on another note: 1) your file starts with a comment that tell you to change it...
[16:24:51] <squeakytoy> Terabyte: If "uk/co/solong/backpack/config/config.xml" is actually a Java package structure, you can create a Java class in the folder "config" called "R.java" or "Resources.java" and then do: Resources.class.getResourceAsStream("config.xml");
[16:25:15] <ernimril> Terabyte: 2) your class has no class comment describing the class
[16:25:27] <Terabyte> ernimril it tells me how to, it doesn't tell me to.
[16:25:31] *** nous1024 has left ##java
[16:25:57] <Terabyte> ernimril the documentation is for me to write up on a train when I have no internet connection :)
[16:26:00] <ernimril> Terabyte: 3) you really want to specify the character set when creating an InputStreamReader
[16:26:13] <Terabyte> cool, will look at it
[16:26:31] <ernimril> Terabyte: 4) you want to use try/finally to close all resources that need closing
[16:26:38] <squeakytoy> Agreed, that could be a good idea, if your XML is in UTF-8 or unicode, or something else
[16:26:41] <squeakytoy> so you get that right
[16:27:01] <Terabyte> oh ok
[16:27:10] <ernimril> Terabyte: 5) I do not think that you want to catch Exception, only catch what you are prepared to handle
[16:27:41] <Terabyte> heh, well i'm not dealing with exceptions, it's a "best effort" thing, just carry on if it breaks. (think UDP)
[16:27:57] *** cyphorious has quit IRC
[16:28:00] <ernimril> Terabyte: 6) readLine may return null (= EOF) so you should test that before checking for a matching value
[16:28:08] *** rtdos has quit IRC
[16:28:25] * Terabyte should hire ernimril as a code reviewer but probably can't afford him, so should just send him a beer for being so kind.
[16:28:42] <squeakytoy> Terabyte: what you *should* do is use JAXB :D
[16:28:52] <squeakytoy> Terabyte: Since you are dealing with XML
[16:29:07] <Terabyte> aye. well, I want to use XPath, not sure if that's what you mean
[16:29:26] <ernimril> Terabyte: 7) if you take user input you want to trim() the strings you read
[16:29:28] <Terabyte> (if jaxb allows me to use xpath)
[16:29:28] <squeakytoy> JAXB is awweesssoommmeeee
[16:29:35] <Terabyte> ernimril ah now that I do know :)
[16:30:14] <squeakytoy> ernimril: you know that most of what you have written, he will actually discover by himself, huh?
[16:30:37] <ernimril> squeakytoy: it does not hurt to try to speed up learning
[16:30:45] <Terabyte> actually i probably won't because of the broad Exception catch :D
[16:31:01] <Terabyte> so I must thank ernimril for doing discovery on my behalf :D
[16:31:12] <Terabyte> (thanks ernimril
[16:31:21] <ernimril> squeakytoy: besides I have been on a conference the whole last week so I have not done any code review for a week, guess Im itching for some of it :-)
[16:32:07] *** X-Scale has joined ##java
[16:32:58] <squeakytoy> ernimril: code review is for unconfident software teams :P
[16:33:04] *** maxorator has quit IRC
[16:33:18] <cbeust> squeakytoy: Nonsense, code reviews are for competent software teams
[16:33:44] <Terabyte> or for making the software teams look competent
[16:33:52] <Terabyte> or for going some way to *
[16:34:13] <cbeust> I've seen the difference between companies that mandate code reviews for every commit (e.g. Google) and companies that don't. The difference in quality is striking.
[16:34:32] <Terabyte> I like when people review my code, makes me feel safer.
[16:34:43] <cbeust> Terabyte: Exactly, that's one of the many advantages.
[16:34:54] <cbeust> I don't think any company should trust me to commit code without someone reviewing.
[16:35:10] <Terabyte> and that's separate from sec review.
[16:36:02] <cbeust> Terabyte: That's a broken code review process, it doesn't invalidate the idea
[16:36:06] <Terabyte> "wada ya mean your using passwords instead of kerberos!"
[16:36:12] <cbeust> Google's turn around for code reviews is about 24 hours
[16:36:20] <Terabyte> cbeust security review :)
[16:36:23] *** chandan_kumar has joined ##java
[16:36:42] <Terabyte> from commit to team looks at it, to report to return.
[16:40:39] <squeakytoy> In the team I am in, we have a full house. We use Git, Hudson, JUnit, static analysis tools, code reviweing and finally internal testing, before it goes to the customer to test the features/requirements
[16:41:10] <squeakytoy> it seems crazy a lot, but its actually quite smooth
[16:41:48] <Terabyte> cool, we have crucible fisheye perforce junit and findbugs
[16:41:57] <Terabyte> though I think we're trying hudson soon
[16:42:35] <Terabyte> not sure what the implications of that are since i havn't checked what hudson is and what it adds/replaces
[16:43:34] <squeakytoy> Hudson automatically builds your code and then you can tell him to run the different tests
[16:44:34] <Terabyte> oh ok, i think we're using electric commander for that... not sure..
[16:44:42] <mescalinum1> can an Annotation be associated with *two* methods? if I want an annotation be associate with a getter+setter how to do it?
[16:45:02] <squeakytoy> We use Hudson as a second life line. A max of 30mins after someone has commited new code, Hudson checks everything out and compiles it (first check: does the code compile) and then it runts JUnit tests to see if any developers has forgotten to run the tests themselves, to see if anything got broken
[16:45:30] *** ferret_ has quit IRC
[16:45:34] <squeakytoy> mescalinum1: what do you mean? You can put multiple annotations on multiple methods
[16:46:56] *** homie has quit IRC
[16:47:03] <mescalinum1> squeakytoy: well, it would have to be a copy (and ideally, having duplicate text in programming languages is never good)
[16:47:32] <squeakytoy> a copy?
[16:48:03] <mescalinum1> squeakytoy: @Ann("foo", "bar") getXXX() { ... } @Ann("foo", "bar") setXXX(Object o) { ... }
[16:48:10] <mescalinum1> squeakytoy: is that what you mean?
[16:48:16] <squeakytoy> Sure why not
[16:48:19] *** pipeep has quit IRC
[16:48:23] <mescalinum1> see that I have to copy paste the same annotation twice?
[16:48:31] <mescalinum1> ok
[16:48:39] <squeakytoy> what does "foo" and "bar" represent?
[16:48:41] <mescalinum1> I was only looking if there was a better way to do it
[16:49:21] *** sebrock has joined ##java
[16:49:38] <mescalinum1> squeakytoy: actually my annotation is just for specifying a property name (String) for each getter/setter of my Configuration class, so I'd be ok with copies of that string :)
[16:49:45] *** Cymage has quit IRC
[16:49:51] *** homie has joined ##java
[16:49:56] <squeakytoy> I still dont understand the usage
[16:50:11] <Terabyte> I think he wants a single annotation for the notion of "getter setter pairs"
[16:50:20] <Terabyte> since there is no notion of that, this can't be done.
[16:50:56] <squeakytoy> so he wants to use annotations to figure out what methods are connected?
[16:51:03] <mescalinum1> squeakytoy: my Configuration object is like a bean. I want to use annotation (over setters/getters) to automatize the mapping of fields to a properties file
[16:51:30] <squeakytoy> what does "foo" and "bar" represent?
[16:51:40] <Terabyte> presumably his getter and setter
[16:51:51] <Terabyte> or a set to be annotated
[16:51:53] <squeakytoy> method names?
[16:51:56] <Terabyte> might be more than 2 methods
[16:52:01] <mescalinum1> so I have two methods (load() save()) which read the annotations, and populate the bean, or dump it to a properties file automaticaly (now I do it manually)
[16:52:14] <squeakytoy> Oh, ok.
[16:52:38] <squeakytoy> So your loader takes in a class, and matches the values to see what set-methods should be called?
[16:52:44] <mescalinum1> squeakytoy: no, sorry, my example was misleading. my annotation is something like this: @ConfigEntry("propertyName.what.ever")
[16:52:47] <mescalinum1> single param
[16:52:51] <mescalinum1> is the property name
[16:53:27] <squeakytoy> What about having two annotations? @Setter("property name"); @Getter("property name");
[16:53:55] <mescalinum1> squeakytoy: so, to make it short, with the annotations I'd define the mapping between bean fields (thru setters and getters) and properties names
[16:53:59] <squeakytoy> mescalinum1: nevermind, having @configentry is better, since you can figure out which method to call via reflection
[16:54:06] <mescalinum1> squeakytoy: yep, two annotations. seems the only way to go
[16:55:00] <mescalinum1> squeakytoy: I was hoping there was some way to read the "nearest" (last) annotation of a given method, so I could use only one annotation
[16:55:01] <squeakytoy> mescalinum1: Well, in your load-logic, cant you iterate over all methods the bean has. Filter out those starting with "set" and then look at their annotation to see which set-method you shold actually call?
[16:55:33] *** Droxx has joined ##java
[16:56:02] *** Ivellina has quit IRC
[16:56:04] <mescalinum1> squeakytoy: yes, that how I was imagining to do it (matching for ^set / ^get), but also simply checking for m.isAnnotationPresent(ConfigEntry.class) would do it
[16:56:32] <squeakytoy> mescalinum1: true, but if you go by annotation is present, you would get a lot of set/getter-methods
[16:56:34] <mescalinum1> hmm no, still I'd have to check for ^(set|get)
[16:56:39] <mescalinum1> or use two types of annotations
[16:57:13] *** pantokrator has quit IRC
[16:57:25] <squeakytoy> mescalinum1: i think the best idea is as i said. Find all "setters" (set-methods) of a Bean. and then find the correct set-method to invoke by checking for the annotation-value
[16:58:09] <mescalinum1> squeakytoy: I don't follow. (the load()/save() action scans all methods one time, and for each method it founds an annotation, does the properties I/O job, so it is linear time complexity)
[16:58:27] *** guidj0s has joined ##java
[16:58:53] <squeakytoy> mescalinum1: ok, so you want to set the data for "surname" in a Person-bean, right?
[16:59:16] <squeakytoy> (at the end, you want to call the setSurname() method, correct?)
[17:01:00] <mescalinum1> ok
[17:01:13] <squeakytoy> mescalinum1: Well in your "load-logic" you know, you are only interested in setting things (you are not interested in getters). So, given a Bean (Person) you loop through all methods of the class. Then you get both getters/setters-method. For each method starting with "set" you know its a setter, meaning, check it's annotation to see if it has @ConfigEntry("surename")
[17:01:30] <squeakytoy> Meaning, you will probably end up with the method called "setSurname", which you can invoke
[17:03:10] <mescalinum1> but I'm only interested in bulk save/load. see it as a bean persistence using properties files as storage
[17:03:19] <mescalinum1> (maybe I'm reinventing the wheel)
[17:03:27] *** Kamaran has quit IRC
[17:03:29] *** benoitdo_ has joined ##java
[17:03:30] <squeakytoy> cant this be used in bulk?
[17:03:37] <squeakytoy> why not?
[17:03:55] *** fuzzygroove has joined ##java
[17:04:08] *** fuzzygroove has left ##java
[17:05:54] <cbeust> squeakytoy: Nice. Yes, it's possible to make this smooth but you need to think the system through.
[17:06:30] <squeakytoy> mescalinum1: pseudo code:http://pastebin.com/1Z79ErG5
[17:06:34] <squeakytoy> cbeust: hm?
[17:06:38] *** maxorator has joined ##java
[17:07:13] <cbeust> squeakytoy: If you're using git, you should take a look at Gerrit for code reviews, it works great
[17:07:36] <squeakytoy> cbeust: ah, yes we are. But it seems like a long learning curve for gerrit
[17:07:59] <cbeust> squeakytoy: Not really, it's a bit painful to install but once you're up and running, it's pretty straightforward
[17:08:10] <cbeust> The fact that it acts as a middleman between committers and the final repo is great
[17:08:17] <squeakytoy> cbeust: from what I have read, it can't merge as well. Only cherry pick
[17:08:42] <cbeust> squeakytoy: Just like git, it will do its best to merge but if it encounters a conflict, you will have to solve it. Nothing news
[17:08:53] <squeakytoy> cbeust: source it can merge? :)
[17:09:07] <cbeust> squeakytoy: It will do fast forwards
[17:09:14] <squeakytoy> yea
[17:09:19] <squeakytoy> per commit, ye
[17:09:26] <cbeust> If it's not a FF, it will ask you to pull, merge and recommit
[17:09:27] <squeakytoy> i can understand that
[17:09:38] <cbeust> But it's part of its flow to have amended changes since that's how code reviews work anyway
[17:09:46] <squeakytoy> im far from a git pro tho, but what you saying seems reasonable
[17:10:33] <cbeust> Most of the time, you amend 2-3 times to incorporate the code review comments and possibly, you will have one more to resolve he conflicts (if there are any)
[17:11:28] *** camcorder has quit IRC
[17:13:06] *** Kamaran has joined ##java
[17:13:11] *** benoitdo_ has quit IRC
[17:14:54] *** jdolan has quit IRC
[17:15:04] *** chandan_kumar has quit IRC
[17:15:31] *** Matuku has joined ##java
[17:16:31] *** guidj0s has quit IRC
[17:19:45] *** Wyzard has quit IRC
[17:19:53] *** rchern-afk has joined ##java
[17:19:53] *** rchern has quit IRC
[17:19:58] *** rchern-afk is now known as rchern
[17:20:30] *** eidolon has quit IRC
[17:22:07] *** Wyzard has joined ##java
[17:31:00] *** cool123 has quit IRC
[17:31:33] *** cool123 has joined ##java
[17:32:32] *** jjido has joined ##java
[17:35:48] *** devkhadka has joined ##java
[17:37:42] *** t0rc has joined ##java
[17:38:35] *** chandan_kumar has joined ##java
[17:38:37] *** horte has joined ##java
[17:40:45] <aless67> re
[17:40:46] *** Gott__ has joined ##java
[17:40:47] <aless67> http://pastebin.com/gwUXL3dk
[17:41:18] <aless67> when i initialize a GRAPH g=new GRAPH(16); the first NODE is initalized, but the 15 others aren't
[17:41:48] <aless67> did i do bad array of NODE ?
[17:43:42] <Fanook> aless67: I think you'll find that every other slot in your array is initalized
[17:44:26] <Fanook> aless67: why do you feel the need to increment i in your loop body AND in the for declaration?
[17:44:31] <aless67> Fanook, when i print g.noeud[1].val it fails
[17:44:44] <aless67> only noeud[0] can be print
[17:44:55] <Fanook> aless67: try printing the node at index 2
[17:45:16] <aless67> still fail
[17:45:23] <aless67> for 1 to 15
[17:45:28] *** odinsbane has joined ##java
[17:45:54] <aless67> mhh no
[17:45:57] <Fanook> regardless, my question still stands. Why are you incrementing i twice per loop iteration
[17:45:58] <aless67> index 2 is ok
[17:46:03] *** keyn has joined ##java
[17:46:07] *** DormantOden has joined ##java
[17:46:23] <aless67> LOOL
[17:46:32] <aless67> ok i see the problem thx ^^
[17:46:39] <DormantOden> hey room =D
[17:48:21] *** neuro_sys is now known as rocket16
[17:48:24] *** rocket16 is now known as neuro_sys
[17:49:42] *** platzhirsch has joined ##java
[17:49:46] *** platzhirsch has left ##java
[17:50:44] *** Xgc has quit IRC
[17:51:22] *** Xgc has joined ##java
[17:53:07] *** mxweas has joined ##java
[17:53:38] *** merzo has quit IRC
[17:54:57] *** devkhadka has quit IRC
[17:55:42] <mescalinum1> squeakytoy: here it is, fully working :) http://pastebin.com/PdiqcQUt
[17:55:50] <mescalinum1> squeakytoy: I understand what you proposed earlier, but it looks to me just as one redundant check (http://pastebin.com/L0vbQmUF lines 44 and 66) isn't it?
[17:56:24] *** cheeseboy has joined ##java
[17:56:56] <cheeseboy> how do i makwe text bigger in a java app without recompiling it?
[17:57:05] <squeakytoy> a text?
[17:57:21] <mescalinum1> stand closer to the screen, cheeseboy
[17:57:22] <mescalinum1> :D
[17:57:37] <mescalinum1> also a magnifying glass would work ^_^
[17:57:45] <cheeseboy> needa sit 6ft away
[17:58:02] <cheeseboy> i sit in my recliner all the way reclined :P
[17:58:35] <squeakytoy> mescalinum1: is storage=String.class nesseary?
[17:58:38] <squeakytoy> c*
[17:58:54] <mescalinum1> squeakytoy: how it is not?
[17:59:10] <squeakytoy> mescalinum1: cant you figure out the datatype by looking at the method signature?
[17:59:30] *** arinel has joined ##java
[17:59:32] <mescalinum1> squeakytoy: oh right
[17:59:34] <squeakytoy> mescalinum1: urgh, and you have two different annotations :-/
[17:59:45] <squeakytoy> mescalinum1: no no, this isnt what I would have done :-)
[17:59:47] <mescalinum1> squeakytoy: indeed, I'm already taking the storage class from the setter's signature :)
[17:59:55] <cheeseboy> so bthere no way to do it?
[18:00:05] *** d1b has quit IRC
[18:00:10] <squeakytoy> cheeser: what text?
[18:00:21] <cheeseboy> squeakytoy, all the text
[18:00:25] <Fanook> cheeseboy: of course there are ways to do it, but it depends on the context
[18:00:29] <squeakytoy> cheeser: what text?
[18:00:39] <squeakytoy> bah
[18:00:41] <cheeseboy> all the text
[18:00:49] <squeakytoy> cheeseboy: no, its not possible, sorry
[18:00:49] <Fanook> what does that mean?
[18:01:07] <cheeseboy> any where theres text i want it bigger
[18:01:17] <Fanook> that's an OS setting
[18:01:29] <cheeseboy> on side pannel in trxt boxes on window bar etc
[18:02:07] <cheeseboy> well its not listening to my os then cause i have text set to gtiant
[18:02:34] <arinel> Hi guys! I've got a .jar full of class files listed here: http://codepad.org/naJKmy4t . I created a project in netbeans with a simple class that does "import org.w3c.XParser". I added the .jar file to the Libraries. Yet, when I hit Build, javac is complaining it couldn't find package org.w3c. I even tried running javac manually and I get the same error. Any ideas?
[18:03:14] <squeakytoy> arinel: you have a jar of jars?
[18:03:28] <squeakytoy> arinel: duh, nvm, read wrong
[18:04:00] <rjohnson19> given that a valid import might be org.w3c.xqparser.XParser
[18:04:05] <squeakytoy> arinel: what javac command did you write?
[18:04:25] <mescalinum1> squeakytoy: this is how the testcase should look (already works with the earlier source code) http://pastebin.com/xvA6mtvn but how would you do it? having two types of annotation is easier on the persistence code (it exactly saves me from checking if method.startsWith("get" / "set"))
[18:05:14] <odinsbane> arinel: netbeans doesn't complain about the import statement?
[18:05:18] <arinel> this is the main class: http://codepad.org/B84plOSZ I ran "javac -cp applet.jar -v test.java" .
[18:05:23] <squeakytoy> mescalinum1: it wont, either you use method.startswith, or you check the annotation
[18:05:30] <arinel> odinsbane: no, it even displays the package in the context help
[18:05:38] <squeakytoy> arinel: whats the name of the jar?
[18:05:42] <arinel> applet.jar
[18:05:58] <arinel> got it from w3c website.
[18:05:59] *** keyn has left ##java
[18:06:05] <squeakytoy> arinel: link?
[18:06:20] <arinel> http://www.w3.org/2010/02/qt-applets/xpath21/applet.jar
[18:06:38] <arinel> I just want to use the XParser class from that jar
[18:07:13] <odinsbane> arinel: what is the exact error you get from javac, it sounds like the org.w3c.xqparser is actually missing a dependency
[18:08:06] *** fuzzygroove has joined ##java
[18:08:37] <squeakytoy> arinel: can you give us test.java as well?
[18:09:19] *** RDove has quit IRC
[18:09:20] <arinel> odinsbane: http://codepad.org/TJu47CpM
[18:09:40] <arinel> squeakytoy: it's in this link http://codepad.org/B84plOSZ
[18:10:26] <arinel> doh
[18:10:37] <arinel> its in the "source file path" not in the "class file path"
[18:10:45] <arinel> how come? I used -cp
[18:12:11] <odinsbane> arinel: what is the xerces.jar, do you need that in your classpath?
[18:12:24] <aless67> i have TEST[] tab;
[18:12:37] <aless67> if i dont know the size of this tab
[18:12:45] <aless67> how can i grow this tap step by step ?
[18:12:47] <arinel> probably, it's using a SAXParser
[18:13:16] <squeakytoy> arinel: hm, doesnt the applet.jar have a directory-structure?
[18:13:50] <arinel> squeakytoy: yes it does. I showed the contents of applet.jar here: http://codepad.org/naJKmy4t
[18:14:10] * squeakytoy thinks
[18:14:25] <odinsbane> arinel: are you running this from cygwin?
[18:14:31] <arinel> odinsbane: yes
[18:14:39] <squeakytoy> arinel: true, but the class-files inside the jar, is not in directories
[18:14:41] <arinel> I have this in netbeans too. same error
[18:14:46] *** Behold has joined ##java
[18:14:55] <odinsbane> arinel: maybe you need the complete path to applet.jar
[18:15:29] <odinsbane> arinel: ie D:\\path\ to\\something\\unpleasant
[18:15:31] <squeakytoy> arinel: i dont think the applet.jar is correct
[18:15:36] <rjohnson19> arinel: import org.w3c.xqparser isn't a vald import, try import org.w3c.xqparser.*;
[18:15:41] <arinel> odinsbane: let me try that. but also, doesn't it look suspicious that javac says "[search path for source files: applet.jar,xerces.jar]". Why is applet.jar searched for source files?
[18:15:50] <arinel> squeakytoy: what do you mean?
[18:15:54] <arinel> odinsbane: will try in a sec
[18:16:10] <arinel> rjohnson19: you're right, but it's irrelevant atm. I'll fix it though.
[18:16:13] <squeakytoy> rjohnson19 solved it
[18:16:19] <squeakytoy> its due to that
[18:16:22] <aless67> guys????
[18:16:23] <squeakytoy> worked with .*;
[18:16:27] <rjohnson19> the error message isn't very good
[18:16:29] <squeakytoy> stupid not seing it :P
[18:16:43] <arinel> oh wow
[18:16:48] <rjohnson19> java was looking for a class org.w3c.xqparser
[18:16:58] <arinel> it work
[18:16:59] <odinsbane> That is odd that netbeans didn't complain about the statement.
[18:17:00] <arinel> works
[18:17:03] <arinel> rjohnson19: thanks!
[18:17:06] <rjohnson19> np
[18:17:29] <aless67> i have MANY ClassA[] tab; but each have different size, and unknow at begin (it is initalize every time the user enter a new ClassA)
[18:17:30] <arinel> it was pointing at org.w3c. <-- I thought it meant the package before the dot, not the class name after the dot :/
[18:17:43] <aless67> how can i grow up the tab every time i need to put new things in?
[18:17:46] <arinel> and it said "could not find package"
[18:17:51] <arinel> bad errmsg imho
[18:18:00] <squeakytoy> aless67: you mean, how do you increase an Array?
[18:18:09] *** BeholdMyGlory has quit IRC
[18:18:15] <aless67> squeakytoy, yes
[18:18:21] <squeakytoy> aless67: what JAva are you using?
[18:18:25] <squeakytoy> versoin
[18:18:45] *** Luc1fel has joined ##java
[18:18:53] <aless67> ClassA[] tab; but i dont know if i need 3 or 200 or 1 million ClassA
[18:19:01] <aless67> squeakytoy, jdk 6 (free)
[18:19:01] <Fanook> aless67: use a List
[18:19:24] <squeakytoy> Yea, I suggest a List as well, unless you know exactly how many you need
[18:19:43] <aless67> is List simple
[18:19:52] <aless67> i dont want to work 10 hour to know how to use it
[18:19:53] * arinel thanks all for the help!
[18:20:06] <squeakytoy> aless67: its not hard
[18:20:28] <squeakytoy> aless67: List<ClassA> myPrettyList = new ArrayList<ClassA>();
[18:20:42] *** Kamaran has quit IRC
[18:20:45] <squeakytoy> aless67: myPrettyList.add( new ClassA() ); or .remove or .size
[18:21:07] <squeakytoy> aless67: http://download.oracle.com/javase/6/docs/api/java/util/ArrayList.html
[18:21:25] <Fanook> ~~ aless67 collections
[18:21:25] <javabot> aless67, The Collections API is available at http://java.sun.com/javase/6/docs/technotes/guides/collections/index.html
[18:21:52] <squeakytoy> Fanook: wont that just confuse him?
[18:22:37] *** Varox has joined ##java
[18:22:41] <Fanook> no, the official docs are written pretty well
[18:23:24] *** zhulikas has quit IRC
[18:24:25] <aless67> Description Resource Path Location TypeThe type List is not generic; it cannot be parameterized with arguments <NODE> NODE.java /TP4/src line 5 Java Problem
[18:24:35] <aless67> i cant use List with class NODE
[18:24:40] <aless67> :(
[18:24:44] <squeakytoy> whats NODE?
[18:24:47] <squeakytoy> a class?
[18:24:47] <aless67> a class
[18:24:54] <Fanook> poorly named, but yes
[18:24:55] <squeakytoy> You sure?
[18:25:03] <aless67> public class NODE {
[18:25:09] <aless67> can i be more? :)
[18:25:17] <squeakytoy> nope :-)
[18:25:25] <aless67> ^^
[18:25:38] <Fanook> pastebin the code for your Node class
[18:26:02] <aless67> http://pastebin.com/pnFFbbV3
[18:26:13] <Fanook> figured as much
[18:26:18] <Fanook> you're using the wrong List class
[18:26:49] <aless67> i am using exactly what squeakytoy wrote
[18:27:05] *** noctux has left ##java
[18:27:20] <Fanook> no, you're using an obsolete gui control instead of the collection
[18:27:41] <aless67> ???
[18:27:54] <Fanook> you should be using java.util.List
[18:28:06] <Fanook> AWT is a gui toolkit
[18:28:22] <squeakytoy> hehe
[18:28:24] <squeakytoy> True
[18:28:24] <aless67> ArrayList cannot be resolved to a type NODE.java /TP4/src line 5 Java Problem
[18:28:31] <aless67> Eclipse put this import alone
[18:28:43] <aless67> i may stop trust eclipse :/
[18:28:45] <squeakytoy> You need to specify it, since there are ususally two Lists
[18:29:08] <Fanook> 10 to 1 Eclipse gave you options when it "auto-imported" and you chose the wrong one
[18:29:27] *** zhulikas has joined ##java
[18:29:38] <squeakytoy> haha Fanook
[18:29:42] <squeakytoy> you're cruel
[18:29:54] <squeakytoy> Its true tho, thats my bet as well
[18:29:59] <aless67> Fanook, eclipse didn't give me a choice
[18:30:00] <Fanook> i've seen this mistake often enough in here
[18:30:13] <aless67> i just seen eclipse put the import
[18:30:19] <aless67> nothing advertise me
[18:30:19] <squeakytoy> Dude, that mistake is happening often in my own workspace
[18:30:38] <aless67> what mistake?
[18:30:51] <squeakytoy> wrong import
[18:31:01] <aless67> i wasn't importing something
[18:31:05] <aless67> Eclipse just import it alone
[18:31:08] <aless67> with no advertise
[18:31:19] <squeakytoy> You didnt use awt instead of lang?
[18:31:33] <aless67> i didn't chose
[18:31:52] <Fanook> then eclipse is being stupider than usual
[18:31:54] <squeakytoy> just change it
[18:32:09] <aless67> i dont blame eclipse, he just put an import without advertising me
[18:32:39] <Fanook> except it never does that
[18:32:53] <aless67> apparently it does..
[18:32:55] <Fanook> at any rate, this isn't a fruitful argument
[18:32:58] <aless67> i have no reason to lie XD
[18:33:07] <arinel> what's the equivalent of 'argv[0]' in java?
[18:33:21] <Fanook> i'm not saying you're lying, just slightly confused about what Eclipse did
[18:33:33] <Fanook> arinel: main has a String[] in its args
[18:33:42] <aless67> but anyway forget it, i still have problem : ArrayList cannot be resolved to a type NODE.java /TP4/src line 5 Java Problem
[18:33:48] <Fanook> so import that type
[18:33:54] <arinel> yes, but it's length is 0.
[18:34:04] <Fanook> then there were no args to the app
[18:34:04] <arinel> I would like to get argv[0], which would be the program name
[18:34:10] <Fanook> it's the class name
[18:34:23] <aless67> XD
[18:34:35] <arinel> I guess I could use the class name
[18:34:36] <arinel> thanks
[18:34:37] <Fanook> technically, you're running the java VM
[18:34:53] <Fanook> but by convention, your main class is the one reported as running
[18:35:01] <aless67> Fanook, no solution for my problem ?
[18:35:17] <Fanook> ~~ aless67 import
[18:35:17] <javabot> aless67, import is http://download.oracle.com/javase/tutorial/java/package/usepkgs.html
[18:35:19] <aless67> otherwise i create a tab[100] and stop block
[18:35:28] <arinel> thanks Fanook
[18:35:33] <aless67> Fanook, : import java.util.List;
[18:35:40] <aless67> isn't that right?
[18:35:43] <Fanook> aless67: you need to stop using an IDE until you understand the concepts it's hiding from you
[18:36:02] <Fanook> aless67: to use List, yes. to use ArrayList? no.
[18:36:15] <aless67> omg...
[18:36:18] <aless67> so annoying
[18:36:29] <Fanook> took the words right out of my mouth
[18:36:35] <aless67> .*
[18:36:46] <aless67> it was so simply that eclipse cant do it
[18:36:49] <aless67> :D
[18:36:53] <Fanook> no comment
[18:36:57] <aless67> im just kidding
[18:37:08] <aless67> thx for help
[18:37:47] *** angelsl has quit IRC
[18:40:04] *** riotz has quit IRC
[18:40:43] *** rgr has joined ##java
[18:41:06] <mescalinum1> hmm I've been working on this project for weeks without problems.... now:
[18:41:07] <mescalinum1> java.lang.StackOverflowError thrown while loading gnu.io.RXTXCommDriver
[18:41:07] <mescalinum1> Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class java.util.Formatter
[18:41:18] *** jjido has quit IRC
[18:41:21] <mescalinum1> what could be the cause?
[18:41:55] <aless67> sudo rm -r *
[18:42:11] <Fanook> stop that
[18:43:05] * mescalinum1 wonders what 'rm -r *' does
[18:43:25] <Fanook> recursive delete of all files
[18:44:29] <aless67> and sudo give u the rights to do this
[18:46:11] *** Guyman has joined ##java
[18:46:12] <siyb> aless67: you should write a book on shellscripting ;)
[18:46:47] <Fanook> those books have been written
[18:47:03] <Guyman> if i create serval enums in in nested class, and they hold "int value", how can i hold serval instances of the same enum , with different "value" parameter?
[18:47:13] <Fanook> you can't
[18:47:18] <aless67> is rm -r * a script :o
[18:47:26] <Fanook> it's a unix command
[18:47:32] <aless67> :)
[18:47:44] <Guyman> fanook: if they would be in an outer class?
[18:47:44] *** horte has quit IRC
[18:48:01] *** jjido has joined ##java
[18:48:14] <Fanook> no, you misunderstand. there can only be one instance of any particular enum value
[18:48:40] <Fanook> if you want to give each value in the enum a different value, you can certainly do that
[18:48:56] <Guyman> how?
[18:49:03] <Guyman> oh no
[18:49:08] <Guyman> i want to give to the same value..
[18:49:18] <Fanook> ~enum
[18:49:18] <javabot> Fanook, enum is http://java.sun.com/j2se/1.5.0/docs/guide/language/enums.html or http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.9 (JLS 3rd Edition 8.9)
[18:49:44] <Fanook> first link, see the Planets example
[18:49:44] <Guyman> then do you have a solution : im getting a commands txt file which contains conditions about files, for example (NAME:*.txt | NAME:*.jpg)&& (GREATER:5000), how would i hold this information?
[18:49:57] <Guyman> i saw that already, i misunderstood you, i know how to do that
[18:50:11] <Guyman> but i thought about having enums of the possible parameters, and give each one the value im given
[18:50:23] <Guyman> and if i have serval "NAME", i wanted to create serval enums with different values
[18:50:42] <Fanook> no, it doesn't work that way. there is only one NAME enum value
[18:51:30] <Guyman> so how can i do something similar?
[18:51:30] *** guidj0s has joined ##java
[18:51:57] <Fanook> use xml or json
[18:52:09] *** RLa has quit IRC
[18:53:02] <Fanook> keep in mind that you're basically trying to write a parser
[18:53:14] <Guyman> dont know xml or json..
[18:54:08] *** surial has joined ##java
[18:56:23] *** fuzzygroove has left ##java
[18:56:35] *** deSilva has quit IRC
[18:56:36] *** alexandernst has quit IRC
[18:56:56] *** dmiles_afk has joined ##java
[18:57:23] *** mxweas has quit IRC
[18:57:38] <squeakytoy> jesus christ
[18:57:42] <squeakytoy> the compiler just said i broke the internet
[18:57:44] *** sebersole has joined ##java
[18:58:25] <TheTrash> How do I set java to default to alsa in Linux? Default seems to be OSS? *eek*
[18:58:41] <aless67> guys
[18:59:00] <aless67> how to have a Object o=1; and int res=(int)o; ?
[18:59:06] <aless67> it fails at compilation
[18:59:32] <TheTrash> But why!
[18:59:40] *** squeakytoy has quit IRC
[18:59:46] <TheTrash> Anyway you can cast it to Integer probably... but you'd better have a darn good reason to do that.
[19:00:37] <siyb> aless67: int -> primitive, Object -> object
[19:00:55] <aless67> zzzzzz
[19:00:58] <aless67> so broing java
[19:01:05] <siyb> you can use the boxtype Integer, but you should make an instanceof check
[19:01:07] <aless67> the teacher wants us to use Object
[19:01:07] *** alexandernst has joined ##java
[19:01:18] <aless67> ff
[19:01:35] <TheTrash> Maybe you should go to cooking school instead? :P
[19:01:42] <siyb> good suggestion
[19:01:56] <siyb> perhaps he complains about having to use pepper then ...
[19:02:02] <siyb> s/pepper/salt/
[19:02:03] <TheTrash> Probably.
[19:02:08] <TheTrash> so boring fish
[19:02:42] *** Behold has quit IRC
[19:03:40] *** cool123 has quit IRC
[19:03:45] <siyb> aless67: are you still working on the graph?
[19:03:58] <aless67> yes
[19:04:05] <aless67> i all node have a member Object
[19:04:09] <aless67> instead of a int
[19:04:12] *** BeholdMyGlory has joined ##java
[19:04:16] <aless67> (to work on other thing)
[19:04:32] <aless67> but now i need to return the less way from source to end
[19:04:51] <siyb> aless67: are you talking about the variable: val?
[19:04:57] <aless67> and in parameter i put a int (corresponding to the number of the node i begin)
[19:05:00] <aless67> yes
[19:05:22] <aless67> but i need do it recursivly, and then i need use val in parameter that is Object
[19:05:24] <siyb> aless67: what do you need to save in val? an integer?
[19:05:30] *** Abhi347 has joined ##java
[19:05:41] <aless67> siyb, now yes, but it can be other think i suppose
[19:06:08] *** srji has joined ##java
[19:06:33] <siyb> aless67: ok, then it would be good practise to define an interface or an abstract class, which has to be implemented by classes whose instances wish to be stored in val
[19:07:25] <aless67> hu... ?
[19:07:30] <aless67> i don't really understand
[19:08:35] <siyb> just create an interface, named something like: GraphNodePayload and change Object val to GraphNodePayload val
[19:09:15] <siyb> each object that wants to be payload needs to implement the GraphNodePayload interface, therefore you always know the type of the payload (or at least the common type=
[19:09:48] <siyb> you can add a method toValue() or use the toString() method to get a readable representation of the value object
[19:10:07] <aless67> i need to use object
[19:10:12] <siyb> you can enforce this method by specifying it in the GraphNodePayload
[19:10:14] <aless67> i cant use a class or other
[19:10:18] <siyb> interface
[19:10:19] <dreamreal> Object is a class
[19:10:23] <dreamreal> so bzzt
[19:10:29] <aless67> a personnal class
[19:10:30] <aless67> rofl
[19:10:35] <aless67> stop play on words please
[19:10:53] <siyb> aless67: every object in java inherits from Object
[19:11:27] <dreamreal> Start making sense
[19:11:28] <aless67> subject: "the value in node is of type Object"
[19:11:43] <aless67> (bad translation anyway)
[19:11:58] <dreamreal> stupid node then. Why use something from 10 years ago?
[19:12:17] <aless67> dreamreal, ask Mr Frey
[19:12:21] <aless67> not me :)
[19:12:28] *** devkhadka has joined ##java
[19:12:30] <siyb> aless67: http://webdocs.cs.ualberta.ca/~zaiane/courses/cmput102/slides/Topic16/sld010.htm
[19:12:42] <dreamreal> get a better teacher then
[19:12:46] <aless67> o my good
[19:12:51] <aless67> :))))
[19:12:54] <aless67> siyb, joke?
[19:13:11] <siyb> aless67: every class in java inherits from Object dude ...
[19:13:26] <aless67> wow you should be my teacher
[19:13:30] <aless67> ...
[19:13:45] <aless67> i need to use a Object value; nothing else
[19:14:14] <siyb> aless67: what's the language of the question?
[19:14:31] <aless67> fr
[19:14:42] *** BigJ has joined ##java
[19:15:06] <dreamreal> hahaha
[19:15:10] <dreamreal> that explains much
[19:15:16] <dreamreal> siyb: lost cause, mate
[19:15:17] <siyb> aless67: ok nevermind, then just continue with your bad programming
[19:15:39] <aless67> ok , nice discrimination, but no problem i will find solutino alone
[19:15:58] <siyb> dreamreal: hehe i am not a francophobe, but i don't understand french, therefore i can't check if he missunderstood the question
[19:16:10] <siyb> aless67: the problem is, that using object is not safe
[19:16:31] <Terabyte> does System.exit exit just the java application that's running or shutdown the whole VM?
[19:16:42] <siyb> you were planning on casting object to integer, how to you know that object is an integer (runtime checks) and what happens if you can't cast it
[19:16:45] <siyb> ?
[19:16:45] <surial> Terabyte: Both.
[19:16:46] <siyb> bad design
[19:16:50] <surial> Terabyte: A whole VM only runs one app.
[19:17:03] <aless67> i wont shitty talk for an hour sorry no time for this
[19:17:17] <surial> siyb: You're arguing against the "But my teacher requires me to do it in this (fucking retarded) way". Don't. It's not good for your health.
[19:17:33] <siyb> surial: i reckon that he missunderstood the question
[19:17:43] <Terabyte> ah ok. so this is a java app so that's ok, but if it was servlet, it would be a bad idea right?
[19:17:45] *** okiwan has joined ##java
[19:17:59] <surial> Terabyte: Yes, very bad idea.
[19:18:00] <siyb> surial: anyhow, you are probably right
[19:18:11] <Terabyte> ok just checking the war stories (no pun intended) didn't apply.
[19:18:18] <siyb> Terabyte: even for a java app it isn't a good idea
[19:18:24] <surial> Terabyte: As that VM will be running only one app: Tomcat. Or Jetty, or whatever.
[19:18:29] <surial> siyb: wrong.
[19:18:44] <siyb> surial: well it kills of all threads as well -> inconsistent state
[19:18:49] <surial> For apps its a fantastic idea. The notion of simply letting all threads wind down and thus getting the shutdown to occur automatically is the bad idea.
[19:19:10] <siyb> surial: i personally prefer shutting down threads cleanly before killing the app (if possible)
[19:19:15] <Terabyte> so what's the best way to shutdown and exit an application such that a few seconds later i can run it again?
[19:19:26] *** Droxx has left ##java
[19:19:28] <surial> siyb: You're arguing from a perfect world scenario. That perfect world simply does not exist, so your pragmatic approach actually leads to worse real-life effects. Apps get shut down by the OS all the time. The appropriate response is not to stick your fingers in your ears and scream.
[19:19:38] *** c_axis has joined ##java
[19:19:51] <siyb> surial: good point, but my argument still stands ;)
[19:19:51] *** Droxx has joined ##java
[19:19:58] *** Droxx has left ##java
[19:20:07] <surial> siyb: You fix it by handling it as best you can. Which means you should ALSO shut down with .exit(X) as your code ought to handle this scenario anyway, and its much more reliable. Your way leads (A) to code that fails spectacularly if someone kills your app from outside, and (B) to an app that simply won't shut down at all when you ask it to.
[19:20:08] *** Droxx has joined ##java
[19:20:11] <surial> siyb: No, your point does not stand.
[19:20:44] <surial> siyb: The notion that you need to handle the 'all threads get killed' is axiomatic: You just have to handle that, period. Thus the fact that .exit() introduces this state is not important at all, as you already need to be able to handle it.
[19:20:47] <Terabyte> so System.exit() will garentee the application closes? (if it closes i'm done with all my resources).
[19:21:23] <surial> Terabyte: Unless a security manager prevents you from doing it. In that case, System.exit() will throw a SecurityException, or, it'll use some other tool to shut down just part of your app. This is hacky but done by nailgun and a few other 'many apps in one VM' tools.
[19:21:31] <Terabyte> that's cool
[19:21:33] <siyb> surial: oh yes it does, i never said my programm wouldn't have to handle unexpected kills, but if you shutdown a programm you might as well infor the running threads and let them finish their workd
[19:21:38] <surial> Out of the box, and in 99.99% of all tools, System.exit() will shut it all down.
[19:21:39] <siyb> s/workd/work/
[19:21:43] <siyb> just my oppinion
[19:21:44] <surial> siyb: Why?
[19:21:49] <surial> siyb: Your opinion is wrong.
[19:21:56] <siyb> surial: because that work could be important
[19:22:00] <surial> siyb: The right (only!) way to handle app shutdown is to use addShutdownHook.
[19:22:07] <Terabyte> siyb but the work could also be long.
[19:22:10] <surial> siyb: Yes, it could be. Which is WHY you should use addShutdownHook.
[19:22:19] <Terabyte> in this case I want it to die right there abruptly
[19:22:24] <siyb> surial: you are over simplifying
[19:22:34] *** squeakytoy has joined ##java
[19:23:20] <siyb> anyway, got to work, we can continue this discussion after monday
[19:23:22] <siyb> ;)
[19:23:33] <ernimril> surial: do you also just pull the plug on the big database systems? sure they will handle it, but a nicer shutdown will usually mean a faster roundtrip (down + up again)
[19:23:45] *** LtHummus has quit IRC
[19:24:55] *** b0ng01 has joined ##java
[19:25:26] <surial> ernimril: No, I use whatever tool I feel like to shut it down. i.e. "kill processID".
[19:25:32] <surial> i.e. the way all other apps on the OS do it.
[19:25:48] *** moai has joined ##java
[19:26:11] *** cool123 has joined ##java
[19:26:38] *** tnks has joined ##java
[19:26:38] <Abhi347> proper and cleaner shutdown is always better than pulling the plug ;)
[19:27:02] <surial> You get two choices here. (A) Your app shuts down correctly, probably, if you kill it from within the app. (B) YOu get all that, *AND* it also shuts down correctly if it gets friendly killed from outside the app, via i.e. "kill" on posix, taskman on windows, or the OS is just told to shut down entirely.
[19:27:46] *** LtHummus has joined ##java
[19:27:48] <surial> Christ. Jesus. Listen what I'm fucking saying, bandwagon jumpers. If you read all this as me advocating that you just yank the plug, your reading comprehension skills are sorely lacking. I'm saying that the appropriate way to NICELY shutdown your app is to use addShutdownHook() and NOT to rely on all threads being notified in some other fashion, i.e. with booleans or some such, that its time to shut down.
[19:28:08] <tnks> does anyone know of a open source project with a public sonar site.
[19:28:32] <tnks> we want to show a live demo of what Sonar can do, but we don't want to show our private Sonar.
[19:28:54] <tnks> and it would be nice to see a project with a reasonable about of real history.
[19:29:13] <tnks> (this is for illustration to students0
[19:29:44] *** Rayne has joined ##java
[19:31:52] <aless67> guys
[19:31:52] *** daark has joined ##java
[19:31:53] *** Rayne has quit IRC
[19:31:55] <aless67> i have some problem
[19:31:59] *** guidj0s has left ##java
[19:32:04] <siyb> tnks: would a simulated sonar sensor work for you?
[19:32:15] <aless67> when i try to get a ArrayList.size() it returns me an error
[19:32:23] <aless67> only whe nthe list is empty
[19:32:31] <aless67> why it doesn't return me 0 ?
[19:32:32] <siyb> code an error please
[19:32:57] <Terabyte> has the Array been initialisedd?
[19:33:11] <Terabyte> with arrayList = new ArrayList()
[19:33:27] <Terabyte> also parameterise arraylist with what it's holding? so ArrayList<Type>
[19:33:51] <Terabyte> also make sure size() is being made on the object not the class.
[19:34:18] <aless67> wait
[19:37:26] <aless67> ArrayList.get(n) is to get the n-uplet of the list right?
[19:38:01] <aless67> List<NODE> arc=new ArrayList<NODE>(); => arc.size(n); this is right?
[19:38:07] <aless67> arc.get(n) sorry
[19:40:17] *** Niamkik has quit IRC
[19:40:26] <siyb> error and code please ...
[19:40:40] <Terabyte> get(n) will return a null pointer exception because there are no elements in the arraylist.
[19:40:46] <Terabyte> size(); will return 0.
[19:40:55] <Terabyte> index out of bounds sorry*
[19:41:07] <aless67> my list is done rofl
[19:41:15] <Terabyte> not according to that code it's not.
[19:41:23] <aless67> what code?
[19:41:28] <aless67> are you mentalist ?
[19:41:36] * aless67 i can seeeeeeee the code
[19:41:37] <Terabyte> the code you pasted in the chanel rather than a pastebin
[19:41:40] <siyb> Terabyte: ignore him
[19:41:42] <aless67> yes 1 hour later
[19:41:58] <aless67> i just ask if the return was right this
[19:42:02] <aless67> no more
[19:42:07] <siyb> Terabyte: apparently he is arrogant and can't follow simple instructions
[19:42:20] <Terabyte> aless67 are you really born in 1967 or is that aless69 trying to be professional?
[19:42:34] <aless67> siyb i am not, u are just answering wrong questions
[19:42:58] <siyb> aless67: Terabyte was providing an answer based on the code you presented to us
[19:42:59] <aless67> Terabyte, try to be professional but copyright.. u know :(
[19:43:23] <siyb> aless67: you did not provide the code as asked (can't follow instructions)
[19:43:37] <Terabyte> aless67 if you are breaching your companies NDA by pasting code then you shouldn't be on this channel at all.
[19:43:37] <aless67> siyb, u give me headache...
[19:43:50] <siyb> Terabyte: it's his homework ;)
[19:43:58] <Terabyte> aless67 if this is for a company I want paying. If this is your own project, I wouldn't worry about copyright as nobody is going to steal broken code.
[19:44:02] *** tilerendering has quit IRC
[19:44:04] <siyb> Terabyte: thank god that he doesn't write productive code
[19:44:24] * aless67 incredible channel
[19:44:26] <Terabyte> siyb more worrying that he might one day do so.
[19:44:37] <Terabyte> more worrying that I do too ^_^
[19:44:49] <aless67> i was just asking if ArrayList.get(n) return the n-uplet object
[19:44:57] <Terabyte> only if it has something in it.
[19:44:58] <siyb> aless67: read the javadoc
[19:44:59] <aless67> and u both go in unknown way
[19:45:13] <aless67> siyb, where do you think i find .get() ?
[19:45:17] <SeriousWorm> aless67: the channel really is incredible, if you are polite, courteous and patient. and use google. and read javadocs. and basic tutorials.
[19:45:44] <ernimril> ~~aless67 aolbonics
[19:45:45] <javabot> aless67, aolbonics is using unnecessary abbreviations such as 'u', 'r', 'ur', 'thx', etc. Using this kind of abbreviation is annoying and pointless. You have a full keyboard and presumably a full brain. Please use both. If you want intelligent answers, the least you can do is speak intelligently.
[19:45:48] <siyb> aless67: man, this conversation is so going up on the dau wall of fame ...
[19:46:10] <aless67> siyb, i just keep u alone talkin
[19:46:17] <aless67> dont have time for that i already told u
[19:46:49] <Terabyte> aless67 maybe you should make time. you might learn something
[19:46:59] <siyb> aless67: then i suggest that you learn how to communicate your problems properly, that saves a lot of time
[19:47:33] * aless67 the problem is every mistake i make in english, all are making a debate about it
[19:47:44] * aless67 and then blame me
[19:47:53] <Terabyte> that's not the problem. the problem is we tell you to paste your code and you don't do it
[19:48:11] <siyb> aless67: all i asked for was the code causing the exception and the exception, you still didn't do that
[19:48:34] <aless67> irc is tiresome zz
[19:48:40] <siyb> so you are causing the delay yourself my friend
[19:48:43] <siyb> aless67: no, you are
[19:48:49] <siyb> ./ignore
[19:48:55] <aless67> im not talking about you
[19:48:56] <Abhi347> y we r having arguments here, i guess this channel was for code solving
[19:49:00] <aless67> but about the global irc chatter
[19:49:31] <Terabyte> i'd solve a problem if there was code present
[19:49:43] <aless67> if i were better in english there should be less problem
[19:49:56] <Terabyte> no if you pasted your code which is in a universal language there would be less of a problem
[19:50:04] <siyb> well i has enough, i am helping myself preventing a stroke now ;)
[19:50:16] <siyb> Terabyte: don't bother, he doesn't get it
[19:50:21] <aless67> Terabyte, i ask if ArrayList.get(n) return n-uplet omg
[19:50:24] <aless67> what realtion with my code?
[19:50:28] <aless67> its incredible
[19:50:29] <Terabyte> aless67 www.codepad.org
[19:50:30] *** IceD^ has joined ##java
[19:50:31] <IceD^> hello
[19:50:31] <aless67> 4 times i repeat it
[19:50:32] *** bitshuffler_ has joined ##java
[19:50:34] *** realtime has joined ##java
[19:50:47] <Terabyte> and for the third time, if the arraylist contains something, yes.
[19:50:56] <IceD^> how to get list of local vars (in code)
[19:51:07] <aless67> Terabyte, you are a big joke.
[19:51:26] <Terabyte> aless67 and you sir are a natural born comedian.
[19:51:28] *** jjido has quit IRC
[19:51:40] <Terabyte> that is to say you enter an irc room ask a question and people burst out laughing
[19:51:40] <aless67> if someone ask me in C langage "tab[i] return i-uplet of tab?" "no because nothing in your tab"
[19:51:47] <aless67> i quote you
[19:51:58] <aless67> need laugh sometime while programming...
[19:52:00] <Terabyte> i didn't say no, i said "only". which is the correct answer
[19:52:08] <aless67> you said no
[19:52:08] *** fr0gprince_ has quit IRC
[19:52:14] <aless67> jsut read many lines before
[19:52:21] *** fr0gprince_ has joined ##java
[19:53:02] * aless67 Terabyte> get(n) will return a null pointer exception because there are no elements in the arraylist just to confort you in the fail
[19:53:19] <Terabyte> which i corrected 2 moments later with "array index out of bounds"
[19:53:29] <aless67> still fail
[19:53:48] <Terabyte> and that was based on the context of the code you had provided which was an empty array.
[19:53:56] <Terabyte> which is correct, and not as fail as your question.
[19:54:07] <siyb> Terabyte: just leave him be
[19:54:14] <aless67> if i come back tomorow with an other question ,u will stil ltake the same code?
[19:54:16] <aless67> :')
[19:54:17] *** bitshuffler has quit IRC
[19:54:24] <siyb> Terabyte: he can sit here until tomorrow evening for all that i care
[19:54:27] <Terabyte> don't know why he's being let be. I've been kicked for less than this
[19:54:55] <aless67> im stil lthere answering you cause u still do the same
[19:54:56] <siyb> Terabyte: apparently, opers on the chan are amused by idiotic behaviour ;)
[19:55:02] <aless67> if i'm kicked, you are too
[19:55:18] *** zemanel has joined ##java
[19:55:49] <cheeser> what's all this now?
[19:56:18] <siyb> cheeser: do yourself a favour and refrain from reading the backlog
[19:56:19] <Terabyte> aless67 asks a question, gets an answer, and complains that it's stupid, and the person who provided is a joke. rinse and repeat
[19:56:39] <cheeser> sounds like a douchebag we had last night.
[19:56:55] <aless67> Terabyte, you still dig your death bed, funny
[19:57:44] <cheeser> aless67: if you have a java question, ask it. if you're just gonna trash on people, stfu.
[19:58:01] <Terabyte> I am reading all of his reponses in this voice: http://www.youtube.com/watch?v=mY5qJHZCz2I
[19:58:16] *** BoF has quit IRC
[19:58:35] *** riotz has joined ##java
[19:58:36] <aless67> cheeser are you god? if yes, u should say the same to Terabyte
[19:58:44] <aless67> stop do the fail hero
[19:58:45] <cheeser> ~~ aless67 aolbonics
[19:58:45] <javabot> aless67, aolbonics is using unnecessary abbreviations such as 'u', 'r', 'ur', 'thx', etc. Using this kind of abbreviation is annoying and pointless. You have a full keyboard and presumably a full brain. Please use both. If you want intelligent answers, the least you can do is speak intelligently.
[19:58:56] <cheeser> aless67: do you see that @ by my nick?
[19:59:04] <Terabyte> aless67 because I gave an answer to your question?
[19:59:07] *** cschneid has quit IRC
[19:59:24] * aless67 hide
[19:59:24] <cheeser> it means, when i ask something, it's more than just a suggestion.
[19:59:39] <aless67> ok boss!
[19:59:41] *** cschneid has joined ##java
[19:59:46] <aless67> i return work on java
[20:02:00] *** rafadc has joined ##java
[20:04:52] *** alex88 has joined ##java
[20:06:46] *** Chetic has quit IRC
[20:07:18] <alex88> hi, i'm using this code http://pastebin.com/p5TD79up to start a imagemagick code, but it seems it never exits, but the same cmd in command prompt exits in 5 seconds..
[20:08:03] <ernimril> alex88: Runtime.exec is not a shell
[20:08:13] <alex88> ernimril: what should i use?
[20:08:16] <ernimril> alex88: | only has meaning to a shell
[20:08:40] <ernimril> alex88: either you have to run a shell in your command or you have to do the pipe manually in java (using two different processes)
[20:09:55] *** rgr has quit IRC
[20:09:58] <alex88> ernimril: and what about making a bat script that accepts arguments and run those programs?
[20:10:35] <ernimril> alex88: that might work, I do not use bat files (since I do not run windows)
[20:10:42] *** [[thufir]] has quit IRC
[20:12:35] *** lunatik210 has quit IRC
[20:13:27] *** meoblast001 has joined ##java
[20:13:28] <meoblast001> hi
[20:13:30] *** youdonotexist_ has joined ##java
[20:13:35] *** hex` has joined ##java
[20:13:37] <meoblast001> i'm having a bit of a strange issue... i'm sure it's something simple i'm overlooking
[20:13:53] <meoblast001> i get "Could not find the main class: Main. Program will exit." when i run "java Main" in the directory of my Main.class
[20:13:58] <meoblast001> one second while i post the source for it
[20:14:31] <meoblast001> http://pastebin.com/fF4e7ZEA
[20:16:43] *** youdonotexist has quit IRC
[20:16:43] *** youdonotexist_ is now known as youdonotexist
[20:17:08] <rjohnson19> meoblast001: your class is com.mysticgalaxies.dontwant.Main, not just Main.
[20:17:43] <meoblast001> ah, ok, thanks
[20:18:12] <meoblast001> rjohnson19: should i run that from the root of my build tree?
[20:18:45] <rjohnson19> meoblast001: yes, if you enter java com.mysticgalaxies.dontwant.Main, java will look for com/mysticgalaxies/dontwant/Main.class
[20:19:46] <meoblast001> ok, thanks :)
[20:21:46] *** gelignite has quit IRC
[20:22:39] *** Varox has quit IRC
[20:22:49] <rjohnson19> no problem
[20:26:14] *** rigved has quit IRC
[20:28:52] *** kubaplas has joined ##java
[20:29:40] *** Luc1fel has quit IRC
[20:30:38] *** Rubarb has joined ##java
[20:31:34] <L4nce0> hey, when I have eclipse auto generate a method, how can I set it's template to throw not implemented error?
[20:31:51] *** Rubarb has left ##java
[20:32:17] <ernimril> L4nce0: try #eclipse
[20:32:27] <ernimril> L4nce0: or look somewhere in its preferences
[20:33:06] *** fr0gprince__ has joined ##java
[20:33:11] *** Ivellina has joined ##java
[20:33:31] <arinel> does anyone know a good way to build a string filled with N spaces?
[20:34:06] *** fr0gprince_ has quit IRC
[20:34:25] *** daark has quit IRC
[20:34:31] <arinel> I'm looking at String.format() right now, but it doesn't support %*s
[20:34:38] <alex88> ernimril: and using it on linux? sorry i was away, thank you for the help
[20:35:44] <rjohnson19> arinel: StringUtils in commons-lang has useful methods for that, among other things
[20:36:05] <Kryigerofe> Hello. I'm wondering what the added value of Java Web Start is, compared to just linking to the .jar directly. It just seems to introduce some compatibility problems in some operating systems.
[20:36:40] *** GreYFoXGTi has quit IRC
[20:36:45] <arinel> rjohnson19: thanks! I'd prefer not to add any more dependencies though
[20:36:52] *** mxweas has joined ##java
[20:36:54] *** BoF has joined ##java
[20:36:57] *** GreYFoXGTi has joined ##java
[20:37:07] <arinel> I'll try a chararray or smth
[20:38:20] <rjohnson19> ok
[20:39:31] *** zemanel has quit IRC
[20:39:37] *** echo_mirage has joined ##java
[20:40:12] *** Nikelandjelo has joined ##java
[20:40:35] *** Fisiu has quit IRC
[20:42:48] <squeakytoy> Kryigerofe: Does it add compatibility problems?
[20:43:11] *** Fly80 has joined ##java
[20:43:45] <squeakytoy> Kryigerofe: the benefits are that the application is automatically installed on the client computer, they can use it offline and you can automatically push updates to the clients
[20:43:55] <Abhi347> do anyone hav an ebook of Joseph O'Neil on Core java (I've googled it already)
[20:44:02] *** bearded_oneder has joined ##java
[20:44:14] <squeakytoy> Abhi347: you asking for warez?
[20:44:55] <Abhi347> nope O'Neil is the author
[20:44:55] <cheeser> amazon.com has it
[20:45:10] <squeakytoy> as in kindle?
[20:45:13] <Abhi347> but it ask credit card, wich i dont hav
[20:45:25] <squeakytoy> Abhi347: you got kindle?
[20:45:27] <cheeser> so what are we supposed to do about it?
[20:45:31] <Abhi347> nope
[20:45:44] <squeakytoy> Abhi347: looks like you are screwed :P
[20:45:46] <cheeser> you're asking us ato give you a copy?
[20:46:06] <squeakytoy> Abhi347: ive got it, you want a copy?
[20:46:14] <cheeser> we don't do warez here
[20:46:14] * pr3d4t0r eyes squeakytoy
[20:46:18] <Abhi347> yep
[20:46:19] *** ChanServ sets mode: +o pr3d4t0r
[20:46:23] <Abhi347> wats warez?
[20:46:23] <squeakytoy> its a setup!
[20:46:29] <cheeser> pirated copies of stuff
[20:46:31] <squeakytoy> ban him! :D
[20:46:41] <Abhi347> heh
[20:47:14] <Abhi347> ok np if u dont do :)
[20:47:20] *** Abhi347 was kicked by pr3d4t0r (This isn't Rapidshare or Usenet - take your question elsewhere. Come back when you have programming questions.)
[20:47:30] <cheeser> and can type
[20:47:32] <squeakytoy> How do you share ebooks nowdays?
[20:47:35] *** ojacobson_ has joined ##java
[20:47:40] *** Abhi347 has joined ##java
[20:47:41] <squeakytoy> arent ebooks like watermarked?
[20:47:42] <cheeser> i buy them from amazon mostly
[20:47:45] <pr3d4t0r> Now let's see if he's smart enough to figure out what I just told him.
[20:47:58] <Abhi347> err sorry wat did i do wrong, cant i ask question
[20:48:03] *** ojacobson_ has quit IRC
[20:48:10] <cheeser> sure. just don't ask for pirated stuff here.
[20:48:16] <cheeser> i though we made that lcear.
[20:48:24] <squeakytoy> Abhi347: I think this channel does not support pirating
[20:48:26] <pr3d4t0r> Abhi347: YOu can't ask for warez (pirated stuff) here, and you need to speak whatever language you want without aolbonics. It's "you", not "u".
[20:48:39] <cheeser> ~aolbonics
[20:48:39] <javabot> aolbonics is using unnecessary abbreviations such as 'u', 'r', 'ur', 'thx', etc. Using this kind of abbreviation is annoying and pointless. You have a full keyboard and presumably a full brain. Please use both. If you want intelligent answers, the least you can do is speak intelligently.
[20:48:43] <Abhi347> yeah i got that already, why kick after that
[20:48:46] *** Fly80 has quit IRC
[20:48:52] <Kryigerofe> squeakytoy: OK. And if they download and run the .jar it's also automatically downloaded and run. The only difference I see is that they need to download it again every time they click on the link.
[20:48:56] <pr3d4t0r> squeakytoy: See? He didn't get it :)
[20:49:01] *** Nikelandjelo has quit IRC
[20:49:05] *** ChanServ sets mode: -o pr3d4t0r
[20:49:10] <pr3d4t0r> cheeser!!!
[20:49:17] *** cocoloa has joined ##java
[20:49:19] <pr3d4t0r> cheeser: :*
[20:49:28] <squeakytoy> Kryigerofe: Well, users can run programs with a single click from a site
[20:49:37] <cheeser> pr3d4t0r: i'll be at TSSJS next week. P^)=
[20:49:41] *** no_mind has joined ##java
[20:49:48] <pr3d4t0r> cheeser: I won't :(
[20:49:53] <pr3d4t0r> cheeser: Are you speaking?
[20:50:00] <cheeser> on friday
[20:50:07] <pr3d4t0r> cheeser: Awesome!
[20:50:10] <no_mind> is there a way to find the file mime type other than using MimeTypeMap ?
[20:50:16] <squeakytoy> cheeser: You doing a presentation?
[20:50:16] <Abhi347> Cheeser i didn't mind the kick, so you can return the op to him hehe
[20:50:20] <Kryigerofe> When I try it, it asks me to "open" or "download" the .jnlp file like any file (so it's two clicks, like with .jars).
[20:50:21] <pr3d4t0r> cheeser: I'll see you in NY in May or so, though :) I'll be there for biznis.
[20:50:55] <squeakytoy> no_mind: First link on Google said multiple ways
[20:51:04] <squeakytoy> no_mind: http://www.rgagnon.com/javadetails/java-0487.html
[20:51:18] <pr3d4t0r> cheeser: Grizzly? Glassfish? What's the topic of your presentation?
[20:51:21] <cheeser> squeakytoy: http://javasymposium.techtarget.com/html/architecture.html#JLeeWebSockets
[20:51:34] <pr3d4t0r> cheeser: Ah :)
[20:51:47] <squeakytoy> cheeser: ive never heard of the term "websocket" before :-/
[20:51:54] <cheeser> an enhancement of what i presented in oslo
[20:52:12] <cheeser> squeakytoy: surprising. you'll hear lots more of it in the years to come
[20:52:14] <pr3d4t0r> cheeser: I was going to do enterprise Hadoop + Mule integration :) Now that's on for JavaZone, Java2Days, and GeeCON. I don't think I'll speak at any of the US conferences this year.
[20:52:37] <cheeser> gonna try to do some grizzly/comet/websockets stuff for J1
[20:52:48] <cheeser> maybe "implementing custom protocols with grizzly 2.0" or some such
[20:52:50] <pr3d4t0r> cheeser: That sounds cool.
[20:52:59] <pr3d4t0r> cheeser: What about JavaZone? Coming this year?
[20:53:05] <cheeser> dunno
[20:53:06] *** echo_mirage has quit IRC
[20:53:07] <cheeser> i'd like to.
[20:53:20] <no_mind> squeakytoy, the first link on my side of google always pointed to Mimetypmap
[20:53:28] <squeakytoy> no_mind: hm
[20:53:50] *** jjido has joined ##java
[20:54:15] <pr3d4t0r> cheeser: This country never ceases to amaze me. Today I ordered a glass of carrot juice during lunch. They serve it with a side of coffee cream (!!!) that you put in it. It's rather good, actually.
[20:54:29] <pr3d4t0r> cheeser: I did try it after the WTF moment.
[20:55:01] <pr3d4t0r> cheeser: Do any of the usual suspects, other than Werner, speak at JavaOne Moscow? I should've submitted an abstract :(
[20:55:18] *** rgr has joined ##java
[20:55:18] <squeakytoy> cheeser: Hmm, neat idea with websockets. Unfortuanly, nothing I can use until the next 5 years :-/
[20:55:40] <tjsnell> I bailed on TSSJS
[20:56:22] <squeakytoy> All these HTML5 stuff is nice, and becoming buzzwords. However, the sad reality is that its nothing a commercial website can use until 4-5 years imo
[20:57:34] *** echo_mirage has joined ##java
[20:58:10] <squeakytoy> damn you internet explorer
[20:58:16] <squeakytoy> now im becoming sad again
[20:58:19] <cheeser> pr3d4t0r: i dunno anything about the moscow even
[20:58:31] <cheeser> i'm sure the high profile guys like jerome present.
[20:58:45] <pr3d4t0r> cheeser: Apparently is the largest JavaOne conference on this side of the world.
[20:59:09] *** mescalinum1 is now known as mescalinum
[20:59:15] <pr3d4t0r> cheeser: And, of course, I will be in San Francisco when it happens :(
[20:59:36] *** jdolan has joined ##java
[20:59:43] *** fahadsadah has quit IRC
[21:00:08] <cheeser> heh
[21:02:35] *** vi0 has joined ##java
[21:03:35] <squeakytoy> anyone seen resident evil afterlife?
[21:03:56] <pr3d4t0r> . . .
[21:04:10] *** fahadsadah has joined ##java
[21:04:44] <squeakytoy> pr3d4t0r: its only 7 dollars to rent. Ill do the popcorn while you set up the living room?
[21:04:52] <squeakytoy> we'll have a blast
[21:04:57] <squeakytoy> :-)
[21:05:03] *** ojacobson sets mode: +b *!*cm100@*.cust.blixtvik.se
[21:05:03] *** squeakytoy was kicked by ojacobson (30 *blam*)
[21:05:30] *** ojacobson sets mode: -b *!*cm100@*.cust.blixtvik.se
[21:06:44] *** bojo has quit IRC
[21:06:47] *** jjido has quit IRC
[21:07:45] *** rgr has quit IRC
[21:08:59] *** Nikelandjelo has joined ##java
[21:09:02] *** flodin has left ##java
[21:09:24] *** mistik1 has quit IRC
[21:09:30] *** mistik1 has joined ##java
[21:12:01] *** squeakytoy has joined ##java
[21:12:19] *** vi0 has quit IRC
[21:13:13] <squeakytoy> A guy asks for warez in this channel and got a kick, I asked if anyone seen Resident Evil: Afterlife, since i am thinking of renting it, and I got a kick/ban. This is the very essence of IRC.
[21:13:57] <ernimril> ~offtopic
[21:13:57] <javabot> Anytime you start a statement with something like "this is kind of off topic," do us all a favor and stop. ask it somewhere else or just go to google.com and search there.
[21:13:59] *** rafadc has quit IRC
[21:14:45] *** BoF has quit IRC
[21:15:32] *** jpk has joined ##java
[21:16:43] <squeakytoy> I'll keep that in mind.
[21:17:26] *** cool123 has quit IRC
[21:17:32] *** theNatd has joined ##java
[21:17:53] *** devkhadka has quit IRC
[21:17:53] *** cool123 has joined ##java
[21:18:55] <L4nce0> I'm trying to gauge the execution time ( on a ms machine, no Linux commands =/) of a multi threaded application. Though I forgot how to make main wait for threads to finish
[21:19:19] <ojacobson> join
[21:19:25] <ernimril> L4nce0: for(Thread t : threadsToWaitFor()) t.join();
[21:19:27] *** jjido has joined ##java
[21:19:29] <ojacobson> you join threads, you waitFor subprocesses
[21:19:41] <L4nce0> ah yes, that's perfect, thanks!
[21:19:47] <ojacobson> or if you're using an executor, you shut it down and wait for it to terminate (there are methods for this on ExecutorService and friends)
[21:19:59] <ernimril> L4nce0: you might want to limit the waiting time though
[21:20:49] <L4nce0> Well, what do you all think. it's a web crawler application. I have each website as a thread. I was thinking of making each sub page parsing a thread too ( more for practice). I think the thread creation and overhead will slow it down
[21:21:00] <ojacobson> task, use a thread pool
[21:21:05] <ojacobson> (ExecutorService or so)
[21:21:10] *** theNatd has left ##java
[21:21:40] <ernimril> L4nce0: or use nio for skipping most threads needed for io
[21:21:42] <ojacobson> The download work will be heavily IO-bound, so throwing threads at it may help (up to a point); parsing will be compute-bound, almost certainly, or memory-access-bound, so more threads will only make it take longer after a very low number
[21:21:54] <ojacobson> an NIO downloader is a more elegant alternative to a threaded downloader
[21:21:57] *** theNatd has joined ##java
[21:22:08] <ernimril> ~L4nce0 rabbit
[21:22:08] <javabot> ernimril, what does that even *mean*?
[21:22:13] <ernimril> hmmm
[21:22:22] <ernimril> ~~L4nce0 rabbit
[21:22:22] <javabot> L4nce0, rabbit is a web proxy used to speed up slow connections. For more information see: http://www.khelekore.org/rabbit/
[21:22:28] *** gdoko has joined ##java
[21:22:35] <ernimril> L4nce0: if you want to do http in non-blocking ways
[21:22:58] <L4nce0> I <3 IRC awesome, yeah IO is my biggest hitch right now
[21:23:44] <ernimril> L4nce0: look at the sample WGet implementation
[21:24:57] *** moai has quit IRC
[21:25:04] *** RobotCow has joined ##java
[21:26:37] *** jjido has quit IRC
[21:27:32] *** jjido has joined ##java
[21:28:16] *** Droxx has quit IRC
[21:30:19] *** rgr has joined ##java
[21:30:58] *** alex88 has quit IRC
[21:34:10] *** cool123 has quit IRC
[21:38:50] *** EvilPenguin has joined ##java
[21:39:55] *** Droxx has joined ##java
[21:39:58] *** gdoko has quit IRC
[21:45:10] *** queequeg1 has joined ##java
[21:46:41] *** theNatd has left ##java
[21:48:49] *** chandan_kumar has quit IRC
[21:49:33] *** ExtraSpice has quit IRC
[21:53:13] *** irn has quit IRC
[21:53:21] *** Kamaran has joined ##java
[21:53:50] *** Bombstone has joined ##java
[21:54:15] *** cool123 has joined ##java
[21:54:36] *** sebersole_ has joined ##java
[21:55:03] *** sebrock has quit IRC
[21:56:47] *** queequeg1 has left ##java
[21:58:21] *** sebersole has quit IRC
[21:59:12] *** rgr has quit IRC
[22:01:12] <bearded_oneder> I normally try to refrain from OT posts, but since chan is quiet and this is too good to resist ...
[22:01:33] <bearded_oneder> ... One of the reasons why many people powered governments choose representation over direct democracy and electoral colleges over raw popular vote is http://www.youtube.com/watch?v=ScgFIKXKFkc .
[22:03:25] *** frangiz has quit IRC
[22:04:21] *** LouisJB has joined ##java
[22:04:29] *** pen has joined ##java
[22:06:18] *** Johannes13 has quit IRC
[22:08:40] <TheTrash> bearded_oneder: eheheh
[22:08:47] <TheTrash> Sad part is, she's probably sincere.
[22:09:20] *** pen has quit IRC
[22:10:16] <bearded_oneder> indeed.
[22:10:25] *** cool123 has quit IRC
[22:12:13] <cbeust> bearded_oneder: Representation doesn't seem to work too well if Wisconsin is any indication
[22:14:45] <Bombstone> ~rbi
[22:14:45] <javabot> Bombstone, rbi is http://download.oracle.com/javase/tutorial/reallybigindex.html
[22:16:25] <bearded_oneder> cbeust: right, especially when fleeing and parliamentary trickery are considered acceptable legislative tactics. humans have yet to devise a perfect political system, immune to corruption, bias, and human foible.
[22:17:52] <Guyman> how would i split the following: "_txt _jpg_NOT" to "_txt" and "_jpg_NOT" , meaning i want everything that is between the _ to the space after it
[22:17:56] <Guyman> between the first _
[22:18:19] <cbeust> bearded_oneder: yeah the fleeing was extreme, hopefully it won't set a precedent. Filibusters are not too far from this tactics as well. But I agree you can't play the democracy game only when you're in the majority
[22:18:21] <Guyman> what regex would i need?
[22:19:07] *** kalio has joined ##java
[22:19:19] <cbeust> For regexps, you can experiment iwth this http://gskinner.com/RegExr/
[22:19:36] <kalio> why does this return "15.1" instead of "15.10"? http://pastie.org/1664512
[22:21:54] <Guyman> cbeust: thanks :)
[22:22:05] *** srji has quit IRC
[22:25:49] *** Cymage has joined ##java
[22:26:19] <Guyman> cbeust: though i dont understand how would split behave ?
[22:26:40] *** askhl has joined ##java
[22:26:42] <Guyman> cbeust: i mean, if ill get to mark the words i want, i dont understand what would split return with this regex
[22:27:37] *** zhulikas has quit IRC
[22:28:22] *** pen has joined ##java
[22:28:40] *** CodeWar has joined ##java
[22:29:06] <bearded_oneder> Guyman: 1. did you want to specifically split to {"_txt", "_jpg", "_NOT"} or to {"_txt","_jpg_NOT"}?; 2. do you have a series of Strings that will split on the "_" delimiter?; 3. Will you always be looking to get the substring preceding the second "_"?; 4. Or will you always be looking to extract or exclude the same identical substring -- e.g., "_txt"?
[22:30:49] <Guyman> bearded_oneder, 1. {"txt","jpg_NOT"} is wanted. 2. i didnt understand the question. 3. always want the substring after the first "_" untill the word ends. 4. not the same every time, though always _something(_optional)
[22:31:23] <Guyman> oh and another thing i had to mention
[22:31:35] <Guyman> there's a word before those expressions:
[22:32:31] <Guyman> unkownLength_word1 Unkown2_word2_word3, ill want to get: {"word1_maybeAnother",word2_word3"}
[22:32:39] <Guyman> err
[22:32:46] <Guyman> {"word1_word3",word2_word3"}
[22:32:55] <Guyman> UGH!!
[22:33:07] <Guyman> {"word1","word2_word3"}
[22:34:04] <Guyman> though i do also want the words that i dropped here, the ones that come before the first "_". actually i want the array to contain the cells which in each pair of cells the first one is the first word before the first "_", and the second cell is the rest
[22:34:14] *** arinel has quit IRC
[22:34:34] *** benoitdo has quit IRC
[22:36:06] <bearded_oneder> Guyman: hmm, in your FIRST example, the substring after the first "_" is "txt _jpg_NOT". the pattern of your second examples do not match the pattern of your FIRST example. your specifications aren't very clear :-S .
[22:36:42] <Guyman> bearded_oneder, youre right i got confused, conside my very last example
[22:36:45] <Guyman> consider*
[22:37:51] <Guyman> for {"hello1_hello2","hey1_hey2_hey3"} result = a[0] = "hello1", a[1] = "hello2" , a[2] = "hey1", a[3] = "hey2_hey3"
[22:38:12] <Guyman> there will be at most 2 "_"
[22:38:35] <Guyman> i mean, in one connected expression - at most 2 "_"
[22:39:30] *** riotz has quit IRC
[22:44:13] *** aless67 has quit IRC
[22:44:17] *** horte has joined ##java
[22:44:40] *** null-pointer has joined ##java
[22:45:05] <Guyman> can't figure it out
[22:46:51] <Guyman> help :(
[22:47:45] *** hyppias has joined ##java
[22:48:55] <hyppias> how do I get NB generate a META-INF/services/xxx file for a class?
[22:49:19] *** hyppias has quit IRC
[22:49:27] <bearded_oneder> Guyman: typing out a juvenile algorithm from the top of my head.
[22:49:56] *** hyppias has joined ##java
[22:51:53] <Guyman> ..
[22:52:06] *** hyppias has quit IRC
[22:53:05] *** hyppias has joined ##java
[22:53:24] <hyppias> how do I get NB generate a META-INF/services/xxx file for a class?
[22:54:15] *** jjido has quit IRC
[22:55:13] <Guyman> ugh
[22:55:15] *** riotz_ has joined ##java
[22:55:27] <Guyman> bearded_oneder is it that complicated?
[22:55:41] <hyppias> how do I get NB generate a META-INF/services/xxx file for a class?
[22:56:15] *** riotz_ is now known as riotz
[22:56:51] <bearded_oneder> Guyman: a simple (juvenile) algorithm to implement with minimal overhead would be to - traverse your array of Strings; use String.indexOf() and String.substring() to extract first part; add() it to an ArrayList Object; use String.indexOf() and String.substring() to extract the second part; add() it to an ArrayList Object.
[22:57:39] <Guyman> alright
[22:57:39] <freeone3000> Pattern.split() with a max-result-length of 2, List.addAll(), and Arrays.asList() could also work.
[22:57:43] <Guyman> sounds good
[22:57:52] <Guyman> pattern split?
[22:57:56] <Guyman> with what regex?
[23:01:08] *** jjido has joined ##java
[23:02:46] *** zemanel has joined ##java
[23:04:22] *** phantomcircuit has joined ##java
[23:05:18] *** Prezioso has joined ##java
[23:05:39] *** doglino has joined ##java
[23:05:51] <doglino> i'm on linux , I have java but every time I try install a program it said does not find Java
[23:06:03] <cheeser> fix your PATH setting
[23:06:18] <cheeser> ##<your distro> can tell you how
[23:06:37] <doglino> ok
[23:06:41] <doglino> thanks
[23:07:00] *** doglino has left ##java
[23:08:50] *** drindt has quit IRC
[23:13:14] *** horte has quit IRC
[23:13:53] *** benoitdo has joined ##java
[23:15:03] *** kvarley has quit IRC
[23:15:46] *** Gott__ has quit IRC
[23:15:52] *** Maggi has joined ##java
[23:17:29] *** Somelauw has joined ##java
[23:17:57] <Somelauw> Is there some way to make sure 3.9999999999999 gets printed as 4?
[23:18:23] *** fedel has joined ##java
[23:18:46] <Somelauw> And all other annoying roundoff errors.
[23:20:58] <fedel> People..if I have some like this: Object myobject = model.getObject(); Can I get the Attributes of its object?
[23:21:08] *** cbeust has quit IRC
[23:25:39] <Maggi> Hello, I'm injecting a request parameter into a managed bean (to check if it had been set, etc.). I'm then calling a method (belonging to the same bean) upon submitting a form, and I want to access the request parameter again.
[23:26:26] *** cocoloa has quit IRC
[23:26:33] <Maggi> But it's not set as it's a new request. Any suggestions or ideas on how to handle this?
[23:27:04] <Bombstone> Somelauw, yes, look at Math.round(double)
[23:27:04] *** benoitdo has quit IRC
[23:27:05] *** bearded_oneder has quit IRC
[23:27:47] *** glcrazy has quit IRC
[23:28:28] *** eidolon has joined ##java
[23:28:47] *** barq has joined ##java
[23:28:51] <Maggi> I've tried setting the field manually again by using inputHidden but the field is null (guess I can't try to inject and set manually at the same time).
[23:29:29] *** rodion has joined ##java
[23:30:10] *** X-Scale has quit IRC
[23:34:41] *** sd1074_2 has joined ##java
[23:35:55] *** CodeWar has quit IRC
[23:36:41] <Somelauw> MAth.round gives an int back, doesn't it?
[23:36:46] *** jjido has quit IRC
[23:36:57] <Somelauw> I want it to still return a float.
[23:37:27] <Somelauw> So that 5.099999999999999999999 should be equal to 5.1
[23:37:48] *** frivol has joined ##java
[23:39:35] *** symbole has joined ##java
[23:39:49] *** ramenmeal has joined ##java
[23:42:24] <cheeser> you can assign the int to a float variable if you want
[23:44:05] <eidolon> hey cheeser, any chance i could get you to look at the spring wonkiness i'm working on? did a post to the spring forums, but i suspect it won't get any traction...
[23:44:05] <Somelauw> I don't want to chop of the fractional part. I just want less decimals. It is probably easy to write it myself, but I am wondering if there is a builtin solution.
[23:44:27] <cheeser> my rate is higher than $10 P^)=
[23:44:32] <cheeser> but i can try
[23:44:38] <eidolon> i'll pay it.
[23:44:42] <eidolon> if you can get this working.
[23:44:50] <cheeser> Somelauw: you can't force a float's precision
[23:45:18] <eidolon> cheeser: http://forum.springsource.org/showthread.php?t=105206
[23:45:21] <Maggi> any ideas, anybody?
[23:46:57] <eidolon> there's been some noise that one way to fix this is to change my DAO to an interface, and let spring wire that up - (and i'm handwaving here) - but that would mean i'd need to write an interface for -every- DAO that implements the generic implementation. which.. seems idiotic :)
[23:46:58] <cheeser> Maggi: i'd suggest ##jsf. and sometime during the work week
[23:48:02] <Maggi> cheeser: Thanks, will try there.
[23:48:06] *** nix8n82 has joined ##java
[23:49:22] *** [[thufir]] has joined ##java
[23:49:27] <cheeser> eidolon: what does FriendDAO look like?
[23:49:36] <cheeser> what does the injection point look like?
[23:50:02] <eidolon> sec. it's skeletal. since it extends GenericDAO, there's othing in it.
[23:50:12] <eidolon> public class FriendDAO extends GenericDAOImpl<Friend,Integer> {
[23:50:13] <eidolon> }
[23:50:13] <eidolon> that's it
[23:52:01] <cheeser> what does the code at the injection point look like and how is FriendDAO defined in the xml?
[23:52:06] <cheeser> oh, i see it.
[23:52:29] <cheeser> oh, and constructor injection? ewwwwww.
[23:52:53] <eidolon> heh
[23:52:58] <eidolon> yeah, i've found folks dont' seem to like that
[23:53:06] <eidolon> they prefer properties. i'm not sure why.
[23:53:32] <cheeser> constructor injection is "bad" because it exposes internals too much
[23:53:45] <cheeser> though if you DI everywhere it's not all that problematic.
[23:53:52] * eidolon nods
[23:54:35] <cheeser> i just hate having to change the ctor signature whenever i change a dep
[23:55:11] <eidolon> yea
[23:55:18] <eidolon> that's been a little irritating admittedly.
[23:55:27] <cheeser> so does it complain about the first 10 arguments?
[23:55:28] <eidolon> this whole JPA shift is designed to make the app more maintainable.
[23:55:38] <cheeser> looks like it only barfs on the 11th
[23:55:44] <eidolon> here's the entire crash
[23:55:45] <eidolon> http://pastebin.stonekeep.com/11589
[23:55:46] <cheeser> 11! on a constructor!
[23:55:56] <eidolon> yeah, that's my bad on the constructor
[23:56:00] <eidolon> webactions got way out of hand
[23:56:02] <eidolon> i'm sort of ashamed.
[23:56:14] <eidolon> freidnddao is the onl one set up to use JPA
[23:56:17] <eidolon> the otehrs are pojos
[23:57:17] <cheeser> well, here's one thought: when you define the bean for FriendDao, you don't give it a name.
[23:57:26] *** Kamaran has quit IRC
[23:57:30] <cheeser> i don't know if spring will use the class name as the ID if you don't give it one.
[23:57:44] <eidolon> but i don't set names on any of my bean setups. just the classname
[23:57:48] <cheeser> ok.
[23:57:51] <eidolon> but
[23:57:56] <cheeser> as long as it's consistenett
[23:57:57] <eidolon> none of the other classes are JPA enabled like this
[23:58:05] <cheeser> JPA isn't the issue i don't think.
[23:58:11] * eidolon nods
[23:58:21] <eidolon> my understanding it hat this is some emergent behaviour from AOP
[23:58:27] <eidolon> because AOP tends to proxy everything
[23:59:47] <cheeser> what does that action's java code look like?
[23:59:56] <cheeser> right
[23:59:59] <Terabyte> is an issue with the Swingworker class offtopic round here?
[23:59:59] <eidolon> the -action-?

   March 12, 2011  
< | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | >