Switch to DuckDuckGo Search
   February 6, 2009  
< | 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 | >


NOTICE: This channel is no longer actively logged.

Toggle Join/Part | bottom
[00:00:42] <svm_invictvs> Currently it's run hourly using quartz.
[00:00:47] *** Greeny_ has quit IRC
[00:00:56] *** Greeny_ has joined ##java
[00:01:15] <svm_invictvs> But, now it's being changed where it opens up a socket to listen for a connection where it will be told by anothe rprocess that it's to process results.
[00:01:26] <svm_invictvs> Could I just do ahead and do that in a bean?
[00:01:33] *** Seldon75 has quit IRC
[00:02:26] *** psydian has joined ##java
[00:03:52] *** toader has quit IRC
[00:06:47] *** durka42 has joined ##java
[00:07:03] *** mapreduce has joined ##java
[00:08:43] <mapreduce> ~runtime.exec
[00:08:43] <javabot> mapreduce, runtime.exec is A way of running external processes from java, or see http://javafaq.mine.nu/lookup?110 and http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html You may also want to look at http://java.sun.com/javase/6/docs/api/java/lang/ProcessBuilder.html as it is easier to use.
[00:09:10] <mapreduce> The first URL appears to point to a non-existent host.
[00:09:11] *** kapipi has quit IRC
[00:09:48] *** amz has joined ##java
[00:10:20] <mapreduce> I'm finding that my Runtime.exec use works on Linux happily, but hangs at Process.waitFor(); on Windows. I haven't yet created a test case, but I'd like to know if there is anything other than that covered in the second of javabot's URLs that I should look at.
[00:10:35] <svm_invictvs> ok?
[00:10:54] <ernimril> mapreduce: do you read off the out and error streams of the process?
[00:10:58] <mapreduce> Yes.
[00:11:18] <mapreduce> Hmm, one thing to check is that I do that before calling waitFor.
[00:11:58] <mapreduce> I don't, but I tried a couple of things on the Windows machine at the time, which might have included that.
[00:11:59] <ernimril> mapreduce: you need 3 threads (2 if you redirect err to out with ProcessBuilder), 1 to read out, 1 to read err, 1 to waitFor
[00:12:00] <svm_invictvs> Is the process hanging?
[00:12:00] *** kapipi has joined ##java
[00:12:18] *** buntfalke has quit IRC
[00:12:23] <ernimril> mapreduce: do you know of any strace-like tool for windows?
[00:12:34] <mapreduce> The child process never appears to begin, based on a System.out.println at the beginning of it,.
[00:12:39] <mapreduce> ernimril: Yes. strace.
[00:12:39] <svm_invictvs> ProcessViewer, iirc.
[00:13:01] <svm_invictvs> er, no
[00:13:02] <svm_invictvs> I don't rmeember.
[00:13:07] <ernimril> mapreduce: try using it and see what the exec:ed process is doing
[00:13:09] <clever> mapreduce: 'strace' works on winblows?!
[00:13:17] *** vyoman has quit IRC
[00:13:37] <mapreduce> ernimril: I was under the impression that if I wrapped the output and error streams in bufferedreaders I would not need multiple threads. Various online tutorials seem to agree with me on that.
[00:13:38] <svm_invictvs> probalby through cygwin
[00:13:48] <mapreduce> svm_invictvs: Yes, it exists in Cygwin.
[00:13:50] *** DjZemich has quit IRC
[00:14:02] <clever> svm_invictvs: strace uses the ptrace syscall, which is tied closely to the OS
[00:14:11] <svm_invictvs> clever: O RLY?
[00:14:15] <clever> but then then, you would need a cygwin build of java
[00:14:25] <clever> svm_invictvs: ive strace'd strace! :P
[00:14:25] <svm_invictvs> clever: That's for being so infromative.
[00:14:27] <ernimril> mapreduce: Im off to sleep, but we do run exec a lot even on windows, it seems to work (or I would have had to help the windows people debug it)
[00:14:35] <mapreduce> clever: Perhaps I only tried strace against Cygwin binaries, I forget.
[00:14:40] <svm_invictvs> clever: Where whould I fucking be without you?
[00:14:46] <mapreduce> ernimril: I will include multiple threads in what I try tomorrow.
[00:15:02] <mapreduce> Should have installed VNC on the box so I could do it from home..
[00:15:08] *** TryNiX has quit IRC
[00:15:25] *** mattorantimatt has joined ##java
[00:15:39] *** timte has quit IRC
[00:16:22] *** Resistance has quit IRC
[00:17:30] <svm_invictvs> mapreduce: do you use hadoop?
[00:17:44] <mapreduce> No.
[00:19:13] <mapreduce> 'mapreduce' is a constant reminder to do something about an idea I have related to MapReduce. Unfortunately, that idea involves web browsers, and I find writing code for web browsers irritating.
[00:20:04] <mapreduce> ernimril: Thanks for the hints.
[00:20:07] *** mapreduce has left ##java
[00:20:34] *** LostMonarch has quit IRC
[00:20:36] <svm_invictvs> Bye ricky...
[00:20:37] <svm_invictvs> lol
[00:21:56] *** Resistance has joined ##java
[00:22:48] <svm_invictvs> Is there a good beginners' guide for spring somewhere?
[00:22:56] <svm_invictvs> Just so I can figure out what exactly the fuck I'm doing here.
[00:23:32] <svm_invictvs> ~InitializingBean
[00:23:32] <javabot> svm_invictvs, I have no idea what InitializingBean is.
[00:23:45] <svm_invictvs> oh , wicket is in javabot
[00:23:46] <svm_invictvs> not spring
[00:23:57] <cheeser> ~javadoc InitializingBean
[00:23:59] <javabot> cheeser: http://is.gd/iy6g [org.springframework.beans.factory.InitializingBean]
[00:24:02] <cheeser> suckah!
[00:24:21] <cheeser> ~food
[00:24:21] <javabot> 10 poke cheeser, 0xc0c0a
[00:24:29] <Levia> holy..
[00:24:30] <svm_invictvs> ~javadoc InitializingBean
[00:24:31] <javabot> svm_invictvs: http://is.gd/iy6g [org.springframework.beans.factory.InitializingBean]
[00:24:44] <svm_invictvs> What's the opposite of an initializing bean?
[00:25:03] <svm_invictvs> DisposableBean?
[00:26:21] *** The_Birdman has joined ##java
[00:28:05] *** dvayanu has joined ##java
[00:30:30] *** scottyL has joined ##java
[00:31:58] <scottyL> I'm working on Mysaifu for a PDA, and I'm trying to save the console's output to a file using a command line. Searching online has only led me to people saying to use java.io, but I know you can just have the console save the text in the command line as I have done it before (but have since forgotten how to)
[00:32:00] <scottyL> How does one do it?
[00:32:11] <Freelance-Java> hey, svm invictvs: I am new to spring as well
[00:32:16] <svm_invictvs> heya
[00:32:34] <svm_invictvs> scottyL: is it j2me?
[00:32:49] *** shadewind has quit IRC
[00:32:56] <scottyL> svm_invictvs: Nope, Mysaifu works with regular Java
[00:32:57] *** rollins has quit IRC
[00:33:46] <svm_invictvs> scottyL: Where system.out goes is pretty much up to the OS.
[00:33:49] <scottyL> Just like it... it's a lot slower, and doesn't support everything. I'm having a thread error which I can't figure out, and the error message on the Mysaifu JVM just overruns the console
[00:33:49] <Freelance-Java> svm_invictvs: There is a Step by Step tutorial, I think it's distributed with Spring, for Spring MVC
[00:33:55] <svm_invictvs> Freelance-Java: I see that.
[00:34:37] <scottyL> svm_invictvs: Yes, I figured that, but there is a console line liek "java -cp . MyClass > result" which saves everything that happens during the running of the program to a text file
[00:34:53] <Freelance-Java> and Spring as I have found yet, is about Inversion of Control and MVC and Web Flow
[00:34:59] *** Varox has joined ##java
[00:35:06] <svm_invictvs> scottyL: oh, then just copy it out then?
[00:35:52] <Freelance-Java> svm_invictvs: you have your foundation understood about IoC
[00:35:56] <Freelance-Java> right?
[00:36:01] <svm_invictvs> scottyL: Maybe that jvm just doesn't use it?
[00:36:11] <scottyL> svm_invictvs: However you can do it, I just need to be able to see the beginning of the error message when my thread explodes
[00:36:33] <scottyL> svm_invictvs: So, that line is correct?
[00:36:34] <svm_invictvs> Freelance-Java: ioc?
[00:36:45] <svm_invictvs> scottyL: read the docs for that vm, I have no clue.
[00:36:54] <scottyL> For regular jvm
[00:36:55] <scottyL> s
[00:36:58] <Freelance-Java> svm_invictvs: Inversion of Control
[00:37:17] <svm_invictvs> Oh, I see what you mean, yeah, familiar with the concept not hte term.
[00:37:54] <jonaslund> ~ioc
[00:37:54] <javabot> jonaslund, ioc is Inversion of Control
[00:38:05] <Freelance-Java> svm_invictvs: make a sample app with Spring MVC, from that step by step tutorial
[00:38:21] *** repnop has quit IRC
[00:38:38] <Freelance-Java> svm_invictvs: I am using Spring Web Flow with JSF
[00:38:40] *** kwvarga has joined ##java
[00:38:54] *** jiggster has joined ##java
[00:38:56] <Freelance-Java> svm_invictvs: yesterday had it all integrated
[00:39:02] *** poseidon has quit IRC
[00:39:13] <kwvarga> Hello, I am having trouble with an ArrayList<Double> passing between classes. I try to to do For (Double test : dataArrayList) {
[00:39:16] <svm_invictvs> I started reading about IoC
[00:39:35] <Freelance-Java> ok
[00:39:36] <kwvarga> and it crashes saying NumberFormatException
[00:39:39] <svm_invictvs> yeah, I just gotta figure out how to use spring.
[00:40:05] <svm_invictvs> IoC handles all the boilerplate code letting you focus on your domain problem
[00:40:10] <Freelance-Java> yes
[00:40:29] *** kapipi has quit IRC
[00:40:54] <svm_invictvs> Freelance-Java: callbacks..
[00:40:55] <svm_invictvs> lol
[00:41:05] <Freelance-Java> there is a listener entry and dispatcher servlet entry in web.xml and a few others
[00:41:11] *** mikeym has joined ##java
[00:41:17] <Freelance-Java> callbacks, let me see
[00:41:26] <Freelance-Java> sort of
[00:41:58] <Freelance-Java> like you tell in a configuration file, which property of which bean has to be populated with which Java Object
[00:42:08] *** HoaxKey has quit IRC
[00:42:19] <Freelance-Java> A property of a Master bean gets populated with a property of a child bean
[00:42:31] <Freelance-Java> sorry "with a child bean"
[00:42:48] *** kapipi has joined ##java
[00:43:41] *** si|ent has joined ##java
[00:43:54] <Freelance-Java> Martin Fowler gave a very good and easy and worth worth reading of Inversion of Control in his article
[00:43:57] <Freelance-Java> please do read that
[00:44:10] <Freelance-Java> you will have your head a lot clearer about the things in Spring
[00:44:25] <si|ent> hey everyone. we are building an a web application in java, and will be facilitating user uploads via http/https
[00:44:36] *** aksn has quit IRC
[00:44:50] <si|ent> are their any recommended API's for virus scanning content as it stream in... we are using linux/tomcat
[00:45:05] <si|ent> or better yet a hardware appliance to intercept the traffic
[00:46:02] <kwvarga> for (Double t : item.getAllPeriodAmounts()) {
[00:46:03] <kwvarga> java.lang.ClassCastException: java.lang.String
[00:46:17] <kwvarga> item.getAllPeriodAmounts returns an ArrayList<Double>
[00:46:25] <kwvarga> Any ideas?
[00:47:35] *** durka42 has quit IRC
[00:48:18] *** dentoo has joined ##java
[00:50:45] *** dentoo has quit IRC
[00:51:05] *** dentoo has joined ##java
[00:52:21] *** _lokko_ has quit IRC
[00:52:35] *** anair has joined ##java
[00:52:36] <AMcBain> kwvarga: must be something else then ... can you provide a paste of the code around where the error exists and the full exception? (the line number as it corresponds to the paste would be nice)
[00:52:57] *** genesiss has quit IRC
[00:53:06] <giantrobot> im trying to parse a XML config file i just wrote, is there a certain class I should be using, specific to steping through the xml file, for what its worth, the parsed xml data will be populating a combo box and table in my form
[00:53:42] <giantrobot> ~xml
[00:53:43] <javabot> giantrobot, xml is http://www.w3.org/XML - XML stands for "eXtensible Markup Language". It looks a bit like HTML except that you can define whatever tag you want. Used to store hierarchical data of any kind into a standard format. See "xml parsing" for how to write or parse XML.
[00:53:46] <AMcBain> will the XML file always be the "same" meaning can your code assume a lot of stuff about the XML structure? if so:
[00:53:52] <AMcBain> ~~giantrobot mox
[00:53:53] <javabot> giantrobot, mox is an extremely simple XML reader and writer, using POJOs and annotations. http://www.zwitserloot/java-boilerplate/mox
[00:53:53] <dentoo> how can i make a swing panel not usable?, that u could see the buttons and text fields but not to be able to use them
[00:53:58] *** riotz has joined ##java
[00:53:59] <giantrobot> AMcBain, yes
[00:54:04] <AMcBain> Then check out mox
[00:54:04] *** ShadowHntr has quit IRC
[00:54:06] <giantrobot> nice, thx
[00:54:06] *** anair has left ##java
[00:54:26] *** si|ent has quit IRC
[00:54:27] <AMcBain> from what I know of it, it reduces your workload in those cases by quite a bi.t
[00:54:35] *** eduardopl has joined ##java
[00:54:45] <giantrobot> AMcBain, great, thats what im looking for
[01:01:09] *** Ragnor has quit IRC
[01:01:19] *** Ragnor has joined ##java
[01:01:33] *** Soliah has joined ##java
[01:01:50] *** lfaraone has joined ##java
[01:02:23] *** phyburn has quit IRC
[01:03:40] <lfaraone> Hi, I'm trying to grep inheritance with abstract classes, and when I try to execute my code I'm told that my constructor isn't locatable. I thought it'd be inherited by the "extends" keyword, isn't it? I've put my code up at http://pastebin.ca/1328502
[01:05:47] *** rlubke has quit IRC
[01:06:37] <dentoo> how can i make a swing panel not usable?, that u could see the buttons and text fields but not to be able to use them
[01:07:28] *** perry753 has joined ##java
[01:08:45] <AMcBain> dentoo: did you try disabling the panel?
[01:08:53] <dentoo> yea
[01:09:07] <AMcBain> hmm, that should work with Swing ...
[01:09:11] *** FireSlash has joined ##java
[01:09:20] <dentoo> but theres no difference when i disable it it still works
[01:09:41] *** bas-i has joined ##java
[01:09:57] <AMcBain> then you'll have to disable the components directly. though disabling the panel *should* work, it might not do exactly what you want (as it only disables itself, which as no real visible effect)
[01:10:08] <AMcBain> as it may*
[01:10:13] *** spyf0x has joined ##java
[01:10:28] <dentoo> yea must be the only way
[01:10:33] <dentoo> thanx
[01:10:58] *** dvayanu has quit IRC
[01:10:58] *** Dracofodder has quit IRC
[01:10:58] *** ilyak has quit IRC
[01:10:58] *** jonasbjork has quit IRC
[01:10:58] *** RLN has quit IRC
[01:10:58] *** ozzloy has quit IRC
[01:10:58] *** Zharf has quit IRC
[01:11:01] *** Daniel_H has quit IRC
[01:11:09] *** eduardopl has quit IRC
[01:12:06] *** jottinger has joined ##java
[01:12:31] *** StanAccy has quit IRC
[01:12:51] *** Bollinger has quit IRC
[01:13:12] *** jonasbjork has joined ##java
[01:13:16] *** Zharf has joined ##java
[01:13:29] *** kapipi has quit IRC
[01:13:59] *** `House` has joined ##java
[01:14:02] *** ozzloy has joined ##java
[01:14:08] *** kapipi has joined ##java
[01:15:09] <lfaraone> Apparently constructors aren't inherited, is that true?
[01:16:03] *** jerkface03 has quit IRC
[01:16:03] *** wans has quit IRC
[01:16:35] <cheeser> lfaraone: yes
[01:16:41] *** jerkface03 has joined ##java
[01:16:49] *** dvayanu has joined ##java
[01:17:14] *** kapipi has quit IRC
[01:17:17] *** bas-i has quit IRC
[01:17:21] <svm_invictvs> Does Junit provide an easy way to inspect private members of a class?
[01:17:43] <lfaraone> cheeser: Ah, OK.
[01:18:29] <tkr> svm_invictvs: you should have public methods that return the values. those you can test.
[01:18:36] *** gregor_k has quit IRC
[01:18:46] *** kapipi has joined ##java
[01:19:10] <svm_invictvs> tkr: yeah....
[01:19:42] *** odinsbane has joined ##java
[01:20:14] <odinsbane> Can I use the same thread more than once with the .start(), I want to start it after it has finished.
[01:21:13] <svm_invictvs> no
[01:21:18] <svm_invictvs> odinsbane: no
[01:21:26] <svm_invictvs> odinsbane: make a runnable and a new thread
[01:21:40] <odinsbane> sounds good.
[01:21:43] *** Vicfred has joined ##java
[01:21:55] *** aJack7 has joined ##java
[01:22:39] *** Afterlawl has joined ##java
[01:24:08] <pr3d4t0r> Hello.
[01:24:23] <aJack7> I cannot find a java6 api method that transforms a polygon, I know the matrix manipulation behind rotation thus I can write my own, however could someone confirm one doesn't come packed within java. I only see a translate method. I assume if a method doesn't exist in the polygon class lib then it doesn't presently exist?
[01:24:57] <pr3d4t0r> aJack7: See if there's something like that in the Java 2D API.
[01:25:10] <aJack7> I am surprised a transformation method doesn't exist?
[01:25:10] <AMcBain> you just want to rotate it, correct?
[01:25:17] <aJack7> yes, does a method exist?
[01:25:28] *** perry753 has quit IRC
[01:25:43] <aJack7> translate(int deltaX, int deltaY)
[01:25:47] <aJack7> no transform = :(
[01:26:03] <aJack7> it looks like I will have to write one myself
[01:26:14] <odinsbane> ajack7 have you looked at JAMA.
[01:26:16] <tazle> aJack7: wrong
[01:26:32] <aJack7> tazle...., where is a transofmration method?
[01:26:36] *** orgy` has quit IRC
[01:26:54] <AMcBain> tazle: I have the JavaDoc open right now, it does not have one nor does it inherit one. he is correct.
[01:27:02] *** kapipi has quit IRC
[01:27:03] <aJack7> I throught so
[01:27:19] <tazle> AMcBain: Path2D has the method transform
[01:27:22] *** Dracofodder has joined ##java
[01:27:29] <AMcBain> however, there is AfflineTransform
[01:27:36] <AMcBain> tazle: he only asked about Polygon
[01:27:44] <tazle> AMcBain: he said polygon, not Polygon
[01:27:59] <AMcBain> then yes, there are GeneralPaths, etc.
[01:28:49] <tazle> (apparently there is something called Polygon - it seems ancient)
[01:28:54] <AMcBain> ~~aJack7 javadoc GeneralPath.transform(*)
[01:28:55] <javabot> I don't know of any documentation for GeneralPath.transform(*)
[01:28:58] <aJack7> I can manipulate my matrix by a 2 by 2 matrix thus [0, -1; 1, 0] to say rotate my polygon by 90 degrees clockwise (270 degrees anti clockwise) assuming of course my polygon incorporates two coordinates for each point, I was merely confirming my suspicion since I cannot see a transformation method
[01:29:05] <AMcBain> ~~aJack7 javadoc GeneralPath
[01:29:06] <aJack7> many thanks, I see my linear algebra classes were useful lol
[01:29:06] <javabot> aJack7: http://is.gd/iyrQ [java.awt.geom.GeneralPath]
[01:29:24] <AMcBain> check the transform method, which exists ... but Javabot doesn't think so
[01:29:38] <aJack7> I see check this generalpath now
[01:29:41] <aJack7> will*
[01:29:48] *** neuro_damage has joined ##java
[01:29:51] <tazle> aJack7: not GeneralPath - Path2D
[01:30:09] <AMcBain> tazle: there is no Path2D
[01:30:22] <tazle> AMcBain: you are using old javadocs, then
[01:30:35] <aJack7> va/awt/geom/GeneralPath.html ?
[01:30:36] <AMcBain> there was nothing wrong with Java 1.5 :)
[01:30:50] *** nihi|ist has quit IRC
[01:31:00] <tazle> aJack7: preferably java.awt.geom.Path2D
[01:31:06] <jonaslund> visualvm is really cool :)
[01:31:50] *** eduardopl has joined ##java
[01:32:03] <AMcBain> tazle: I don't see how one is better than the other for his pruposes. they both take an AfflineTransform.
[01:32:08] *** jdolan has joined ##java
[01:32:36] <jdolan> hi, any keytool ninjas in the house? i purchased a (wildcard) SSL certificate, and i've downloaded the .crt from the provider.
[01:32:50] <jdolan> i need to import it into my keystore, which currently contains just my self-signed cert.
[01:33:13] <jdolan> i have a very basic and apparently incomplete/incorrect understanding of how this all works.
[01:33:14] <tazle> AMcBain: GeneralPath is limited to floats, and in general there is no reason to use GeneralPath anymore
[01:34:04] *** Bonix has joined ##java
[01:37:13] *** vesz has joined ##java
[01:38:08] *** UK-sHaDoW has quit IRC
[01:40:10] *** monstrfolk has quit IRC
[01:40:52] *** gdoko has quit IRC
[01:40:53] *** Lhet has quit IRC
[01:42:19] *** aceofspades19 has joined ##java
[01:43:21] *** cyth has quit IRC
[01:45:34] <jonaslund> ho-hum
[01:46:05] * jonaslund wonders if the tomcat "bug" he saw isn't possibly a problem with something else
[01:46:10] <odinsbane> if I pass a Double[] A to a function then I change the value of A[0] that doesn't affect the A that I called it with?
[01:47:13] <tazle> odinsbane: yes it does
[01:47:50] <jonaslund> hmh..
[01:47:54] <jonaslund> still jre crashes! :P
[01:48:05] <odinsbane> ok, it doesn't seem to be in my situation, Ill see if it isn't something else.
[01:49:16] *** kater_ has joined ##java
[01:49:34] <AMcBain> odinsbane: under all circumstances, Java passes by value. it just happens that with objects [arrays] (non-primitives), it copies the /reference/ (the 'value' in this case) ...
[01:50:22] *** aJack7 has quit IRC
[01:50:57] *** indeterminaway has quit IRC
[01:52:31] *** Varox has quit IRC
[01:54:55] *** zacs7 has joined ##java
[01:56:27] <odinsbane> Ah hah
[01:56:49] *** kater has quit IRC
[01:56:49] <odinsbane> thanks for the help
[01:56:52] *** odinsbane has quit IRC
[01:58:23] *** eidolon has quit IRC
[01:59:49] *** Afterlawl_ has joined ##java
[02:00:16] <svm_invictvs> Final classes are stupid.
[02:00:29] *** tag has quit IRC
[02:00:41] <whaley> svm_invictvs: why?
[02:01:37] *** mattorantimatt has quit IRC
[02:02:51] <svm_invictvs> whaley: Because, I should be able to extend hte functionality of any class.
[02:03:00] <svm_invictvs> Why should the author of the class care?
[02:03:16] *** scorchsaber has quit IRC
[02:03:29] <svm_invictvs> whaley: I could make a bunch of static utility functions that manipulate the class only through it's public interface, it wouldn't make a difference.
[02:03:38] <svm_invictvs> For instance String.
[02:03:48] <AMcBain> some people believe in choice, and they choose to restrict others :P
[02:03:53] <whaley> svm_invictvs: I for one don't want you extending/modifying String, for example
[02:04:13] <`House`> when you work with a program that can be modified by scripts
[02:04:15] <svm_invictvs> I have a shit load of string utility functions for different replacements...every fucking method is something like....
[02:04:17] <`House`> external scripts
[02:04:20] <`House`> it is useful
[02:04:48] <svm_invictvs> public static String doSomething(String s, int foo, int bar) { }
[02:05:08] <svm_invictvs> When I could just make myown class something like, class EhnancedString extends String {}
[02:05:17] *** FireSlash has quit IRC
[02:05:19] <tazle> some argument might be made for being able to extend final classes in terms of their actual API
[02:05:51] <tazle> however, there really is very little point, so why not just learn to like the static methods
[02:05:51] *** zacs7 has left ##java
[02:09:09] *** _some0ne has joined ##java
[02:10:04] *** em_pleh has joined ##java
[02:10:09] <em_pleh> hello!
[02:10:30] <em_pleh> any BDJ developers here that can help me get my medialocator working?
[02:10:59] <svm_invictvs> tazle, whaley: If every method in String was final it would be roughly equivalent. It guarantees that the class will not exhibit any behvaior the author hadn't intended and that any extension of the class would only add functionality.
[02:12:06] <tazle> svm_invictvs: tru-ish
[02:12:14] *** ScottG489 has quit IRC
[02:13:30] <whaley> svm_invictvs: this assumes inheritence is the optimal solution... which I think in most cases it is not
[02:13:46] <whaley> svm_invictvs: you could just as easily just provide your own string wrapper
[02:14:17] *** pirho has quit IRC
[02:14:25] <whaley> svm_invictvs: or whatever wrapper... since there are several existing string utility classes with with static methods out there anyway
[02:14:30] <svm_invictvs> whaley: In this case it's URI...
[02:14:38] *** Afterlawl has quit IRC
[02:15:04] <svm_invictvs> whaley: I have a shit load of things like, "isFileUri()" "isDirectoryURI" "getFilePart" etc
[02:15:17] <svm_invictvs> "appendFileExtension"
[02:15:53] <whaley> svm_invictvs: yes... and canonical speaking those have nothing to do with the abstraction of URI into a class
[02:15:57] <whaley> *canonically
[02:16:14] *** bitshuffler has quit IRC
[02:16:22] <svm_invictvs> So yeah, why can't I make public class EnhancedURI extends java.net.URI { }
[02:17:04] <svm_invictvs> It also has some functionality specific to my problem domain.
[02:17:15] <whaley> svm_invictvs: because the author doesn't want you to fuck with their defintion of what a uri is... just write your own utility methods and no one will scratch their heads when they come across your api and wonder what the hell an "EnhancedURI" is
[02:17:54] <cheeser> well, we will it just won't extend URI while we're wondering
[02:18:15] <whaley> heh
[02:18:17] <svm_invictvs> Oh yeah, becaues extracting an interface from it and wrapping it, makes it much lcess confusing when they se things like, new UriWrapper(uri).toUri() all over the place.
[02:18:46] <tazle> svm_invictvs: or you might just keep your utility methods static
[02:19:19] *** tissue has joined ##java
[02:19:23] <svm_invictvs> cheeser: eh?
[02:19:25] <tazle> extending classes is mostly a bad idea anyway - unless the class is designed to be extended (i.e. has clean extension points into which you can plug)
[02:19:34] <cheeser> svm_invictvs: oui?
[02:19:36] <whaley> tazle: as has already been stated
[02:19:37] <svm_invictvs> tazle: and most classes don't
[02:20:02] <svm_invictvs> tazle: most classes should have just about every method final except those you're supposed to override.
[02:20:17] <svm_invictvs> and yet,few people bother with it.
[02:20:34] <svm_invictvs> Or they hvae a caveat like, "If you override this you have to call super."
[02:20:42] *** waz has joined ##java
[02:21:00] <tazle> svm_invictvs: you might just as well not provide the to-be-overrided methods in the first place, and just accept the things as objects
[02:21:14] <tazle> svm_invictvs: i.e. compose, not extend
[02:21:20] *** ScottG489 has joined ##java
[02:21:31] <svm_invictvs> Well, if you compose then you usually have an interface.
[02:21:47] <svm_invictvs> I think C++ has a concept like this...
[02:23:14] <svm_invictvs> Final class + no MI makes things a pain in the ass sometimes.
[02:23:19] *** dvayanu has quit IRC
[02:24:01] <whaley> svm_invictvs: I think you are just making it hard on yourself, personally :)
[02:24:21] <svm_invictvs> I'm just a C++ programmer lost in a sea of java
[02:24:23] <whaley> svm_invictvs: then again... I'm of the opinion that subclassing should only be done when there is a DAMN good reason for it
[02:25:16] *** The_Birdman is now known as mrcheeks
[02:25:20] <svm_invictvs> whaley: same here.
[02:25:28] <svm_invictvs> whaley: Which is why MI isn't a bad thing, imo.
[02:25:52] *** meanburrito920_ has joined ##java
[02:25:56] <svm_invictvs> whaley: when used properly MI is a very useful way of doing composition w/o a bunch of boiler plate code.
[02:26:37] <svm_invictvs> whaley: At least according to TCPPL
[02:26:44] <whaley> svm_invictvs: never having done c++, I don't think I want to wrap my head around that :D
[02:27:02] <waz> smart
[02:27:14] <tazle> whaley: I did some C++, and now I crave for templates in Java every now and then
[02:27:17] <whaley> waz: I hear it is like a barrell of monkeys
[02:27:22] <sproingie> C++ also has strange notions like "private inheritance" that make mixin MI a lot safer
[02:27:43] <waz> did c++ for years
[02:27:48] <waz> glad to be out of it :)
[02:27:52] <sproingie> public MI is disastrous in C++ because base class pointers aren't the same
[02:27:58] *** em_pleh has quit IRC
[02:28:00] <sproingie> "i.e. this this is not that this"
[02:28:04] <jottinger> hey waz
[02:28:09] <waz> heya
[02:28:19] <sproingie> thus we end up with COM and IUnknown mostly just to get around this
[02:28:37] <svm_invictvs> tazle: Yeah, same here.
[02:28:57] <svm_invictvs> sproingie: so?
[02:29:11] <sproingie> so, it's just a big mountain of pain is what
[02:29:13] *** Freelance-Java has quit IRC
[02:29:35] <svm_invictvs> sproingie: what were you doing with "this" that made it a pain in the ass?
[02:29:37] *** _stack has joined ##java
[02:29:52] <sproingie> granted there's a lot of fail in comparing identities of two different types in the first place
[02:29:59] <svm_invictvs> yeah...
[02:30:31] <svm_invictvs> I still feel, that after doing so much C++ at my last job there's alot of criticism of hte language that's just pure ignorance.
[02:30:49] <svm_invictvs> Becuase it's people trying to do things wiht it they're not supposed to.
[02:31:13] <tazle> svm_invictvs: like creating length, area and volume literals?
[02:31:18] <waz> made a living, a very good one, coding it for many years
[02:31:53] <sproingie> the whole pass-by-copy business, references that are aliases and rebind things in other scopes ...
[02:32:42] <sproingie> to say nothing of the kind of thing compilers vomit at you when template code fails (tho that's supposed to be getting better)
[02:33:11] *** kbss has quit IRC
[02:33:56] *** hunterp has joined ##java
[02:33:59] <hunterp> anyone want to rant on their workplace?
[02:34:00] <tazle> memory allocation concerns were indeed the thing I most disliked in doing C++
[02:34:32] *** cactaur has joined ##java
[02:35:03] *** t0th_- has joined ##java
[02:35:05] <t0th_-> hello
[02:35:10] <t0th_-> can help with jetty?
[02:35:45] <AMcBain> 0.0 ... you could ask a directed question about jetty and someone might answer you ...
[02:35:55] *** mele- has joined ##java
[02:36:52] <t0th_-> http://189.126.103.68:8280/dumondimoveis/
[02:36:55] <t0th_-> can help?
[02:37:43] <AMcBain> nobody knows what you want, how can they help you?
[02:38:04] <t0th_-> just see
[02:38:07] <t0th_-> i need use jetty
[02:38:45] * AMcBain gives up trying to pull <s>teeth</s> information, and returns to work.
[02:41:03] <svm_invictvs> I wanna catch FileNotFoundException but I have IOException above it and it's giving me a compile error :-P
[02:41:41] *** unlord has joined ##java
[02:42:01] *** woogley has joined ##java
[02:42:03] <unlord> are there any good tools for reverse engineering database metadata in java?
[02:42:20] <unlord> I'd like a tool that I can use to programmatically get table/view information
[02:42:29] <hunterp> unlord: theres programs writtin in java for that
[02:42:38] <hunterp> that have a gui
[02:42:46] <jottinger> it's a feature of the database metadata in JDBC
[02:43:07] *** mmr has joined ##java
[02:43:11] <mmr> hello there
[02:43:15] *** kwvarga has quit IRC
[02:43:41] <mmr> any websphere guru around?
[02:43:49] <AMcBain> ~~mmr ask
[02:43:51] <javabot> The Ask To Ask protocol wastes more bandwidth than any version of the Ask protocol, so just ask your question.
[02:44:06] <unlord> hunterp: which ones do you recommend?
[02:44:37] <unlord> I basically need to be able to connect to a db using JDBC and get all the table and view information (including column metadata)
[02:44:58] <unlord> then I'd like to be able to recreate the same set of tables in another jdbc url
[02:45:31] <unlord> jottinger: the problem with the JDBC metadata is that I'd have to write custom stuff for each db I want to support
[02:45:39] <unlord> I'm hoping that some tool already exists for this
[02:45:45] *** t0th_- has quit IRC
[02:45:59] <jottinger> well, like hunterp said, lots of DB tools do this for you
[02:46:01] <tazle> unlord: for what, exactly?
[02:46:51] *** vesz has quit IRC
[02:47:09] *** potkettle has quit IRC
[02:47:25] <_some0ne> is is possible to use regex in a switch statement's case? instead of case 'a', case 'b', case 'z', is something like case '[a-z]' possible?
[02:47:40] *** dentoo has quit IRC
[02:47:44] <unlord> tazle: I am interested in processing the tables top down (in order of dependencies) recreating them in a second db, I will be materializing all views in a concrete table
[02:47:46] <tazle> _some0ne: no
[02:47:49] <_some0ne> thanks
[02:47:50] <unlord> when I'm done, I need to do some post processing on them
[02:48:06] *** mySQLnoob has joined ##java
[02:48:49] <mySQLnoob> question i know a bean has constructor, getters and setters... question is... do i have to use a constructor? or can i just create my bean without it? is it bad programming?
[02:48:53] *** squi has joined ##java
[02:49:18] *** Torikun has joined ##java
[02:49:36] <r0bby> mySQLnoob: you will have a default ctor created,but create one anyways
[02:49:39] *** Torikun has left ##java
[02:49:46] <r0bby> your IDE can do this VERY painlessly
[02:50:07] *** ofl_ has joined ##java
[02:50:13] <unlord> tazle: I'm looking at apache cayenne
[02:50:44] <mySQLnoob> yeah i know that and im aware by default a constructor is created, i was just wondering hod badly would it look if i leave it without it in terms best programming practices
[02:50:53] <mySQLnoob> how*
[02:50:58] <mmr> i have a 6.1 (fixpack 21) websphere installed in a sun fire t2000 server running solaris. i have several applications deployed in this websphere and all of them are running very slowly (even WAS itself is very slow), still, the machine is mainly idle and with a lot of free memory... any guesses?
[02:53:03] <mySQLnoob> i guess i'll just create it for the sake of it but it's a bit of a waste, thanks
[02:53:10] *** mySQLnoob has quit IRC
[02:53:11] <ojacobson> mySQLnoob: if you'd just write an empty () constructor and no others, don't write a constructor.
[02:53:18] <ojacobson> Code that doesn't exist can't have bugs.
[02:53:24] <unlord> holy crap, this is a log of code
[02:53:46] *** b3nn3tt has quit IRC
[02:55:45] *** jdolan has quit IRC
[02:56:08] *** jdolan has joined ##java
[02:56:56] *** poseidon has joined ##java
[02:57:03] <poseidon> ~swing
[02:57:03] <javabot> poseidon, swing is a windowing toolkit for Java. Tutorials: http://java.sun.com/docs/books/tutorial/uiswing/ and http://www.swingwiki.org/ also check out ##swing
[02:58:37] *** Consty has joined ##java
[02:59:43] <jonaslund> ~web.xml
[02:59:43] <javabot> jonaslund, web.xml is a Web Application Deployment Descriptor, part of the J2EE specification. Its schema can be found at: http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd and a simple one is described at http://www.adp-gmbh.ch/java/web_application/web_xml.html
[02:59:51] <Consty> What has better performance for managing connections? Blocking IO with threads, or Nonblocking IO with one thread using select()?
[03:00:19] <tazle> Consty: how many threads can your system handle?
[03:01:22] <Consty> tazle: That's a good question. I'm not sure.
[03:01:42] *** Rodya has joined ##java
[03:02:52] *** Rodya has left ##java
[03:04:43] <Consty> tazle: I do have a quad core system, but would the best approach be using nonblocking IO with select() + use threads? I've just read information from numerous sources that state one or the other is better than the other.
[03:05:11] <tazle> Consty: why do you expect this channel to be any more unanimous?
[03:05:29] *** mengu has quit IRC
[03:05:41] <Consty> tazle: I wasn't really expecting anything other than a helpful answer.
[03:06:03] <tazle> oh, well that's easy
[03:06:05] <Consty> tazle: Maybe that's asking too much? :/
[03:06:08] <tazle> ~~Consty tias
[03:06:09] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[03:06:21] *** redrebel_ has joined ##java
[03:06:54] *** svm_invictvs has quit IRC
[03:06:56] <Consty> tazle: I see. Not helpful, but thanks anyway.
[03:06:58] <redrebel_> i just went to the javafx web site and there is option to download an SDK for GNU/Linux
[03:07:18] <tazle> Consty: yes it is - there is no other answer, really
[03:07:25] <tazle> Consty: various benchmarks point one way or the other
[03:07:51] *** peace-keeper has joined ##java
[03:08:09] <peace-keeper> if i'm behind a nat, how can i find out my external IP with java?
[03:08:30] <ojacobson> peace-keeper: query a service that will tell you your IP.
[03:08:31] <jottinger> same way you'd find it with anything else
[03:09:53] *** repnop has joined ##java
[03:10:06] <peace-keeper> thx jottinger
[03:11:15] *** Consty has quit IRC
[03:16:43] *** trustin has quit IRC
[03:17:13] *** durka42 has joined ##java
[03:18:48] <jonaslund> ho-hum
[03:18:49] *** Sulis has quit IRC
[03:19:06] *** xim_ has joined ##java
[03:19:35] *** trustin has joined ##java
[03:19:39] *** conan has joined ##java
[03:19:44] <xim_> is matisse the thing that opens in netbeans when i goto new > jframe file and theres a built in editor?
[03:19:45] <xim_> or is matisse something differetn
[03:19:51] <conan> anyone here used bitronix with jpa? pulling my hair out getting jpa to recognise the TM.
[03:20:18] *** poseidon has quit IRC
[03:23:03] *** amnesiac has quit IRC
[03:26:07] *** strategy has quit IRC
[03:27:08] *** strategy has joined ##java
[03:27:37] *** Bonix has quit IRC
[03:28:33] *** warmwaffles has joined ##java
[03:29:08] <warmwaffles> Is their a way to edit the pallete of a png using java
[03:29:39] <AMcBain> certainly
[03:29:43] <joed> Yep.
[03:29:52] <warmwaffles> know of any libraries that do this?
[03:29:55] * AMcBain did it once to create a simple steg program.
[03:30:21] <joed> So this is the ##javas, where amazing failurerers as tomcat got createdz.
[03:30:48] <warmwaffles> tomcat....oh god
[03:31:41] <AMcBain> ? ... I don't see much wrong with it .. but I haven't used it much in a long while.
[03:31:49] *** warmwaffles has left ##java
[03:31:59] <AMcBain> s/it much/it/
[03:36:29] *** trustin has quit IRC
[03:37:23] *** jamescarr has joined ##java
[03:40:37] <jamescarr> Dave Mathews grave digger...
[03:41:14] <jamescarr> "Page turner... when you turn my page... will you turn it shallow, so I can feel the rain. Page Turner..."
[03:41:24] <xim_> paige turner is a porn star
[03:41:49] <ojacobson> joed: we don't talk about tomcat
[03:42:35] <r0bby> xim_: the fact you know this scares me
[03:43:38] <xim_> shes cute too ;p
[03:44:08] *** epoxy has joined ##java
[03:44:15] <joed> ojacobson: I go on saturdays.
[03:44:41] <ojacobson> joed: typewriter?
[03:45:08] <joed> ojacobson: We don't talk about it.
[03:45:15] <joed> ojacobson: First rule.
[03:45:32] *** viperhr has quit IRC
[03:46:45] *** ScottG489 has quit IRC
[03:47:24] *** Vicfred has quit IRC
[03:47:39] *** Seldon75 has joined ##java
[03:47:40] *** redrebel_ is now known as redrebel
[03:47:48] *** javahorn has joined ##java
[03:47:50] <conan> http://rafb.net/p/G3fyPT20.html I've managed to get this to run now without any errors. I'm just trying to commit a single persisted object, but I notice the sql is not getting executed, so I'm guessing it's not using the UserTransaction I created. any ideas?
[03:48:06] * r0bby finds his monkey
[03:48:33] <r0bby> hehehee
[03:48:39] *** Vicfred has joined ##java
[03:48:43] <joed> select ks?
[03:48:48] <joed> What is that?
[03:49:11] <conan> just the alias
[03:49:21] *** Vicfred has quit IRC
[03:49:29] *** pattwo has joined ##java
[03:49:51] <conan> if I use an EntityTransaction it works, although I have to change hte persistence-unit transaction type to not use JTA
[03:50:02] *** LordMetroid has quit IRC
[03:51:09] *** PRINCESS_FLUFF has joined ##java
[03:51:26] <jonaslund> There is something seriously wrong with the socket handling of java under winXP :(
[03:51:48] <jonaslund> or winXP for that matter
[03:52:01] *** modjor has joined ##java
[03:52:03] <jonaslund> <- getting quite strange problems with tomcat,jetty,etc
[03:52:03] *** Apocalisp has quit IRC
[03:52:03] <reverend> s/the socket handling of java under//
[03:52:06] <Seldon75> jonaslund: thats why they invented nio
[03:52:06] *** PRINCESS_FLUFF has quit IRC
[03:52:10] *** Vicfred has joined ##java
[03:52:13] <conan> joed: anyway it's the perist that doesn't seem to execute any sql while using JTA transactions, only seeming to work with EntityTransactions. It's like i haven't bound the transaction to the EntityManager correctly.
[03:52:40] <jonaslund> Seldon75: hmh.. isn't modern jetty versions using nio ?
[03:52:43] <joed> conan: I'd guess you just answered your own question.
[03:52:48] <jonaslund> i mean it's something seriously strange
[03:53:02] <jonaslund> and i don't think it's related to sockets or nio per se
[03:53:06] <joed> conan: Not that I have an answer for you, I tend to avoid JTA.
[03:53:12] <conan> joed: yup, and it's that last bit that I'm missing and not sure how to solve.
[03:53:26] <epoxy> If i want to do a right click menu, what sort of container should it be? (have it implemented with a JFrame so far, but wondering idea)
[03:53:29] <epoxy> just playing around a bit
[03:53:30] <jonaslund> 1: put lots of "load" (hundreds of connections a second) on the servlet container
[03:53:41] *** LongkerDandy has joined ##java
[03:53:45] <jonaslund> 2: after a while jmeter starts showing errors
[03:53:56] <joed> conan: Its a fucked up entity to write test code for, I guess you possibly could though.
[03:54:23] <conan> joed: sorry you lost me?
[03:54:29] <jonaslund> when the errors starts showing up.. if you reload from localhost:8080 you get the "same page" repeadetly in some separate program not involved in the test
[03:54:31] <Seldon75> jonaslund: you're using recent Jetty?
[03:54:34] <jonaslund> REGARDLESS of the url you put in
[03:54:42] <jonaslund> Seldon75: this is with both jetty and tomcat
[03:55:04] <Seldon75> jetty and tomcat have very similar implementations
[03:55:14] <joed> conan: Oh, just saying it is not the neatest of problems to write a test for, I still think it might be doable.
[03:55:31] <jonaslund> hmh
[03:55:42] <jonaslund> lemme try winstone again
[03:59:49] *** kwvarga has joined ##java
[04:00:11] *** jamescarr has quit IRC
[04:00:15] <kwvarga> for (String s : periods) {
[04:00:15] <kwvarga> periodAmount.add(Double.parseDouble(s));
[04:00:49] <jonaslund> arrgh
[04:00:50] <kwvarga> I pass the function an ArrayList<String> periods that is all String values of numbers (ie "4000.00") Any idea why it doesn't work.. doesn't even throws an error.
[04:01:01] *** kochii has quit IRC
[04:01:13] <jonaslund> winstone doesn't exhibit this behaviour
[04:01:23] <jonaslund> but on the other hand it somehow ties up jmeter threads
[04:03:55] <joed> Seldon75: Besides the buggy garbage that causes tomcat to fail 6 times out of 5?
[04:04:45] <Seldon75> joed: hmm, been using Tomcat in production for about 8 years. No complaints here
[04:05:19] <joed> Seldon75: Great.
[04:05:42] <Seldon75> oh, you're talking about Jetty?
[04:05:48] *** javahorn has quit IRC
[04:05:54] *** ScottG489 has joined ##java
[04:06:00] <Seldon75> i've been using that a while, not in prod. but still no complaints
[04:06:52] <Seldon75> how bad can it be? it gets shipped w/ Liferay
[04:07:07] <joed> Hahaha
[04:07:22] <joed> I presume you find Alfresco top-notch as well?
[04:07:36] *** javahorn has joined ##java
[04:07:41] <Seldon75> I'd take LR any day
[04:08:11] <joed> One is a portal, buggy at that, the other a useless CM/CMS implementation.
[04:08:45] <Seldon75> LR is also a CMS
[04:09:39] <Seldon75> and I wouldn't say useless, unless you contend that they're lying about all the major customers they have using it live-facing
[04:09:55] <joed> I'd debate that. But whatever floats your boat, the integration of X does not make it a CMS any more than my filesystems integration with IDEA makes it a Java IDE and mobile filesystem.
[04:10:16] <Seldon75> so what's your ideal CMS?
[04:10:25] <joed> Yet to find that.
[04:10:29] <Seldon75> aah
[04:10:31] <Seldon75> a realist
[04:10:35] <joed> Bricolage was fairly good.
[04:10:55] <conan> joed: finally got it working. the transaction must be started before you create the EntityManager, which seems wierd.
[04:11:26] <joed> Seldon75: I;m to owner of I think 15 out of 19 Critical bugs for the next Af release.
[04:11:30] <joed> the*
[04:11:31] *** strategy has quit IRC
[04:11:45] <joed> Owner as in I reported em,
[04:11:54] <joed> conan: That makes no sense.
[04:12:04] *** strategy has joined ##java
[04:12:05] <conan> I know
[04:12:10] <joed> conan: It sounds like a session was open before.
[04:12:13] <conan> but one way it works, the next it wasn't.
[04:12:38] <Wicked> hmm anyone familiar with apache derby? im having some issues with high memory usage in my program and im pretty sure its caused by derby. my program has been running for around 2 hours and memory usage is at 238.6MB's
[04:13:10] *** aTypical has joined ##java
[04:13:13] <Seldon75> joed: yeah I would never defend Alfresco
[04:13:13] <joed> Wicked: Test-Case/Cause/Conclusion/Description besides it 'Does not seem to work'?
[04:13:24] <conan> it's a simpel unit test, so can't be that, http://rafb.net/p/nTZVvg88.html, ths works if I switch lines 17 and 19 it doesn't.
[04:13:25] <Wicked> ok.
[04:13:58] <Seldon75> Wicked: try JBrobe's memory profiling
[04:14:03] <Seldon75> you can get a free trial licence
[04:14:09] <Seldon75> JProbe*
[04:14:14] <Seldon75> ~jprobe
[04:14:14] <javabot> Seldon75, I have no idea what jprobe is.
[04:14:16] <joed> Seldon75: I picked that as an annoying example of 'Enterprise grade' - Haven't used liferay in a few years.
[04:14:21] <joed> ~yourkit
[04:14:23] <javabot> joed, yourkit is a heap and CPU profiler for Java apps. It's not free, but it's very capable. http://www.yourkit.com/
[04:14:41] <joed> You can get a trial for that too.
[04:15:19] <Seldon75> ~jprobe is JProbe is a Java profiler for memory usage, performance and test coverage http://www.quest.com/jprobe/
[04:15:19] <javabot> Okay, Seldon75.
[04:15:30] *** ScottG489 has quit IRC
[04:15:53] <Wicked> im writing a ircbot. everytime a message is sent matching what i want the sender,channel,message,time, and status is added to the database. im trying to profile the memory usage with netbeans and its showing org.apache.derby.impl.store.raw.data.StoredRecordHeader as having the most survivng generations.
[04:15:59] <Seldon75> we partnered with LR on a major bid and I was very impressed actually
[04:16:00] <Wicked> Seldon75, hmm ok.
[04:16:24] <joed> conan: Well, setUp runs before every test?
[04:17:44] *** zachscrivena has joined ##java
[04:17:45] *** riotz has quit IRC
[04:20:20] <aTypical> Howdy peeps
[04:21:58] *** peace-keeper has quit IRC
[04:21:59] *** Woflborg has quit IRC
[04:24:58] *** kavon has joined ##java
[04:25:29] <kavon> hey, so I'm writing my own alphabetizing method and I'm using the concept of "buckets"
[04:25:48] <kavon> thing is, I need somewhere to store things like a "bucket", any suggestions? An array is a bit clumsy
[04:26:16] <tazle> kavon: why are you writing your own alphabetizing method?
[04:26:16] *** strategy has quit IRC
[04:27:09] <kavon> tazle: learning, and there is no Arrays.sort(String[])
[04:27:11] <jonaslund> Wicked: derby is a in-mem database so it probably tries to cache as much memory as possible
[04:27:24] *** strategy has joined ##java
[04:27:25] <tazle> kavon: why are you using arrays?
[04:27:39] <kavon> tazle: what do you reccomend
[04:27:41] <aTypical> In working with JSPs, do servlets have to go in the /WEB-INF/classes directory?
[04:27:45] <tazle> kavon: a List
[04:27:47] <Wicked> jonaslund, oh hmm. im new to all this stuff....so that may be it.
[04:28:19] <jonaslund> Wicked: if you wanna test if it's really "loosing" memory then just try to allocate say a 100mb byte[] array, if derby isn't "hogging" it the allocation will succeed (assuming you have a max heap of 256)
[04:29:00] <kavon> tazle: ok so I should use List<String> ?
[04:29:16] <Wicked> jonaslund, hmm ok. i have noticed the more entires added to the database the more memory it uses.
[04:29:32] <tazle> kavon: that would be quite close to String[], yes
[04:30:49] <kavon> tazle: so my "buckets" for sorting should be stored in Lists
[04:30:54] <kavon> as Lists*
[04:31:46] <tazle> kavon: no, now we are back to "why are you writing your own alphabetizing code?"
[04:33:07] <kavon> tazle: because I'm new to programming and should probably learn how to write and design algorithms before using something in the libraries which can do it for me like TreeSet
[04:35:08] <joed> Much if not all of programming basics is not 'Let me do CS' it is math and common sense.
[04:35:44] <tazle> kavon: if you wish to learn about algorithms, buy CLR, read through it and then write some of them
[04:36:51] <whaley> tazle: you mean clrs... clr is that bastardized jvm like thingy from ms
[04:36:53] *** _stack has quit IRC
[04:37:44] <joed> whaley: Hey, the CLR is a pretty good development
[04:38:29] <whaley> joed: I wouldn't know... I've written all of about 2,000 of a c# once upon a time
[04:38:36] <joed> kavon: If you want development, buy old good MIT text-books.
[04:38:38] <whaley> *2.000 lines
[04:39:11] *** _some0ne has quit IRC
[04:39:26] <tazle> whaley: hm right - I only have the old version, though
[04:39:50] <whaley> first gig I had was a sys admin in a shop that also just started adopting .NET 1.1... they thought it was the second coming of Christ
[04:40:11] <Pelao> Hi, I am looking to replace several characters in one string with a "*" , i am trying to use the replaceAll method to do this but I cant include more than on regex in the arguement, can someone please tell me how would I go about doing this ?
[04:40:14] <whaley> then again... they also thought Visual Source Safe was ideal for scm
[04:40:22] <whaley> anyway... bed time.
[04:40:50] <AMcBain> VSS is like let's just lose the code now and claim the dog ate it.
[04:40:51] <Fanook> Pelao: use a character class
[04:41:02] <Fanook> ~~ Pelao javadoc Pattern
[04:41:03] <javabot> Pelao: http://is.gd/izkz [java.util.regex.Pattern]
[04:41:28] <AMcBain> hmm. are those links permanent or are they created then have a short expire time?
[04:42:09] <AMcBain> (because with the amount of bot stuff we do here, it doesn't make sense to use a longer service like tiny url)
[04:42:27] <Fanook> looks like they're static. I just clicked one a fair ways back in the history and it worked
[04:42:38] <Pelao> fanook, would you mind if I open a private to ask you more questions regarding how to use that
[04:42:45] <AMcBain> ~javadoc Pattern
[04:42:45] <javabot> AMcBain: http://is.gd/izkz [java.util.regex.Pattern]
[04:42:55] <AMcBain> Fanook: it appears it caches them too.
[04:43:05] *** xjkx has joined ##java
[04:43:06] <Fanook> Pelao: yes. ask your questions here.
[04:43:07] *** kwvarga has quit IRC
[04:43:31] <xjkx> what can i use on linux to view the games programmed in java for cellphones? i don't want to put in the cellphone before testing
[04:43:35] <Pelao> ok , so that thing you sent me, how exactly does it work, like would would be the syntax for it, I am kinda new to java btw
[04:43:42] <AMcBain> Everyone who worked on the Javabot update needs a karma boost :)
[04:44:27] <joed> AMcBain: ojacobson and cheezitz
[04:44:27] <aTypical> ~ AMcBain --
[04:44:28] <javabot> aTypical, I have no idea what AMcBain -- is.
[04:44:45] <Fanook> Pelao: do you understand regex?
[04:44:46] <aTypical> damn. how do I take karma away from you?
[04:44:47] <joed> ~~ aTypical tool
[04:44:48] <javabot> A tool is only as good as its user. Tool.
[04:44:59] <AMcBain> aTypical: ? the javadoc plugin used to spit out long URLs and be fairly annoying.
[04:45:00] <aTypical> ~~ joed assbiter
[04:45:00] <javabot> joed, I have no idea what assbiter is.
[04:45:31] <joed> Another martini before you leave?
[04:45:31] <aTypical> AMcBain, I'm just trying to mess with you.
[04:45:41] <Fanook> ~gcj--
[04:45:41] <aTypical> joed, Bay Breeze
[04:45:42] <javabot> gcj has a karma level of -26, Fanook
[04:45:47] <AMcBain> haha
[04:45:52] <aTypical> Thanks, Fanook. ;-)
[04:45:53] <joed> Hahah
[04:46:02] <Fanook> had to think of one no one would care about :)
[04:46:09] <AMcBain> ~cheeser++
[04:46:09] <javabot> cheeser has a karma level of 607, AMcBain
[04:46:13] <AMcBain> ~ojacobson
[04:46:13] <javabot> AMcBain, I have no idea what ojacobson is.
[04:46:16] <AMcBain> ~ojacobson++
[04:46:16] <javabot> ojacobson has a karma level of 101, AMcBain
[04:46:21] *** mmr has quit IRC
[04:46:26] <AMcBain> anyways ... I have to get back to work.
[04:46:31] <joed> aTypical: I read that as a Gay Breeze in the GCJ, sitting here wondering what would want you to change the Bay
[04:46:36] * ojacobson now has photos of the inside of a Lisp machine.
[04:46:56] <aTypical> joed, you're a strange, strange man.
[04:46:57] *** ofl_ has quit IRC
[04:47:00] <ojacobson> There are probably people in this channel who don't even know what that means.
[04:47:01] <joed> ojacobson: You went to UTAH?
[04:47:06] <ojacobson> joed: no, it came to toronto!
[04:47:16] <joed> ojacobson: What exhibit?
[04:47:17] <ojacobson> Someone actually !@%* shipped it here for us (hacklab.to)
[04:47:19] <AMcBain> ojacobson: http://legoofdoom.blogspot.com/
[04:47:26] <joed> ojacobson: At least you got my joke.
[04:47:29] *** Neg127 has joined ##java
[04:47:29] <ojacobson> joed: :D
[04:47:49] <tazle> ojacobson: why aren't there photos on the site?
[04:48:01] <joed> ojacobson: Can you photo it?
[04:48:13] <joed> ojacobson: Like a flickr stream?
[04:48:28] <ojacobson> joed: they're on a cheapo handicam, I'll have to extract them and upload them to flickr
[04:48:31] <ojacobson> I will though
[04:48:49] <joed> ojacobson: Thanks a bunch man!
[04:49:36] <Pelao> Fanook : I do understand regex but what is the syntax to be used
[04:50:32] <joed> Hahahahaha
[04:50:38] <r0bby> Pelao: WHAT?!
[04:50:40] <Fanook> Pelao: same as pretty much every other regex i've seen. Scroll the docs down to the section labeled "Character classes"
[04:50:41] <joed> Oxymoron 101!
[04:50:49] <r0bby> ~~ Pelao regex
[04:50:50] <javabot> Please see the tutorial at http://java.sun.com/docs/books/tutorial/essential/regex/ -- If you know what you're doing, go to http://javachannel.net/wiki/pmwiki.php/FAQ/Regexp ; otherwise ask me about javadoc Pattern or javadoc String.split(*)
[04:50:52] <r0bby> go read.
[04:50:54] <r0bby> ~next
[04:50:54] <javabot> Another satisfied customer. Next!
[04:51:03] *** ScottG489 has joined ##java
[04:51:07] <aTypical> r0bby!!!
[04:51:08] *** redrebel has quit IRC
[04:51:09] <Pelao> sorry dude I am just taking an indtoructory programming class, im not familiar at all with classes/objects/ methods
[04:51:15] <r0bby> Pelao:
[04:51:16] <aTypical> You ever work with standard jsps?
[04:51:22] <Pelao> Eclipse
[04:51:26] <Pelao> Ill give it another shot
[04:51:30] <r0bby> aTypical: sort of yes
[04:51:40] <r0bby> not extensively
[04:51:44] <aTypical> Pelao, read, read, read, read, read, and when you're done with that... read some more. :-)
[04:52:09] <r0bby> Pelao: and then rent out a monkey andf give him a typewriter
[04:52:28] <aTypical> r0bby, I've decided to start learning that.
[04:53:56] *** Woflborg has joined ##java
[04:55:22] <Pelao> ok so that pattern match thing makes for example X hold the characters s,S,e,E,t,t ? ans then I just use X in the regex part of the replaceAll method ?
[04:55:22] *** kater_ has quit IRC
[04:56:05] *** zacs7 has joined ##java
[04:56:16] *** zacs7 has left ##java
[04:57:00] <Pelao> Sorry I do not know the syntax for it and the website is not completely clear for me
[04:57:23] <r0bby> Pelao: it is
[04:58:40] <r0bby> Pelao: read the regex tutorial.
[04:58:50] <Pelao> ok
[04:58:51] <r0bby> it's quite clear
[04:59:04] <r0bby> when given links, look at _ALL_ of them
[04:59:27] <joed> Pelao: Actually, go get the friedl book at amazon. Mastering Regular Expressions.
[05:01:00] *** Seldon75 has quit IRC
[05:01:20] <joed> Pelao: If you want CS related stuff, get a pdf of a classical CS course. If you want C, get C second edition or something like that, if you want Perl, get the Camel books, and Learning Perl (Schwartz (He was not guilty I think)) If you want patterns GOF, if you want threads, JCIP.
[05:02:06] *** magcius has quit IRC
[05:02:08] <reverend> IF YOU WANT CANDY, GO TO THE CORNER STORE
[05:02:26] <Simucal> joed: C Second Edition?
[05:02:34] <Simucal> joed: talking about k&r?
[05:02:55] *** magcius has joined ##java
[05:03:11] <reverend> no, he's talking about some other C bible called 'C'
[05:06:00] *** magcius has quit IRC
[05:06:26] *** magcius has joined ##java
[05:06:27] <ojacobson> From the Lisp Machine side of the lab: "Oh, there's the problem. It was assembled in Mexico."
[05:08:02] *** magcius has quit IRC
[05:08:26] *** magcius has joined ##java
[05:10:33] *** kwvarga has joined ##java
[05:10:42] <kwvarga> I pass the function an ArrayList<String> periods that is all String values of numbers (ie "4000.00") Any idea why it doesn't work.. doesn't even throws an error.
[05:11:07] *** strategy has quit IRC
[05:11:07] *** LongkerDandy has quit IRC
[05:11:07] *** modjor has quit IRC
[05:11:07] *** spyf0x has quit IRC
[05:11:07] *** Resistance has quit IRC
[05:11:07] *** hoonteke has quit IRC
[05:11:07] *** thecarlhall has quit IRC
[05:11:07] *** Gracenotes has quit IRC
[05:11:07] *** aceofspades19 has quit IRC
[05:11:07] *** keeb has quit IRC
[05:11:08] *** joed has quit IRC
[05:11:10] <kwvarga> for (String s : periods) { periodAmount.add(Double.parseDouble(s)); }
[05:12:30] *** Neg127 has quit IRC
[05:12:41] *** igordcard has quit IRC
[05:13:43] *** LongkerDandy has joined ##java
[05:14:00] *** oohshiny has joined ##java
[05:14:23] *** ata2 has quit IRC
[05:15:58] *** Resistance has joined ##java
[05:16:20] *** spyf0x has joined ##java
[05:16:42] *** magcius has quit IRC
[05:17:03] *** magcius has joined ##java
[05:17:44] <oohshiny> ~jdialog
[05:17:44] <javabot> oohshiny, I have no idea what jdialog is.
[05:18:01] *** dk_schrute is now known as svm_invictvs
[05:18:03] <oohshiny> ~jframe
[05:18:03] <javabot> oohshiny, jframe is an extended version of java.awt.Frame that adds support for the JFC/Swing component architecture. See: http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JFrame.html
[05:18:46] <AMcBain> oohshiny: use "javadoc" if you want JavaDoc links "~javadoc jframe"
[05:19:26] <oohshiny> AMcBain: i've got javadoc, but i'm trying to work out a functional difference between JFrame and JDialog
[05:19:51] *** zacs7 has joined ##java
[05:20:05] <AMcBain> er, one is a dialog designed for "popups" and the other is a frame designed to contain an application?
[05:20:15] <ojacobson> flcikr upload desu~
[05:20:32] <ojacobson> amcbain: lego turing is awesome ok
[05:20:38] <AMcBain> :)
[05:21:21] <ojacobson> ~~ oohshiny javadoc jframe
[05:21:23] <javabot> oohshiny: http://is.gd/izv2 [javax.swing.JFrame]
[05:21:31] *** mrcheeks has quit IRC
[05:21:36] <kavon> hi I have a question about using List
[05:21:55] <kavon> how do I create an empty list? List<Integer> occur = Collections.emptyList(); ?
[05:22:06] *** navetz has joined ##java
[05:22:26] <ojacobson> Collections.<Integer> emptyList() or new ArrayList<Integer> () if you plan on putting stuff into it later (emptyList lists are immutable)
[05:22:29] <AMcBain> kavon: I believe that method will create an empty list that cannot be added to.
[05:22:37] <navetz> can someone tell me how to create a new graphics object?
[05:22:41] <kavon> AMcBain: ya thats the problem I was having
[05:22:54] <AMcBain> navetz: ... what do you need one for?
[05:23:02] <navetz> i cant just do: private Graphics g = new Graphics();
[05:23:07] <AMcBain> not really
[05:23:13] <ojacobson> ~~ navetz tias
[05:23:13] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[05:23:32] <navetz> I did try it, its an abstract class
[05:23:36] <navetz> so I cant do that
[05:23:42] <ojacobson> navetz: Graphics models a set of operations on a surface, not the surface itself
[05:23:54] <ojacobson> you don't create a Graphics yourself, you ask a surface you want to draw on for its Graphics
[05:24:03] <oohshiny> ojacobson: they both implment the same interfaces and inherit from java.awt.Window, apart from modality Dialog and JDialog seem somewhat redundant
[05:24:07] <AMcBain> navetz: you can get a Graphics object from a BufferedImage instance or inside of the paintComponent method of a JPanel, etc.
[05:24:26] *** thunderbolt has joined ##java
[05:24:37] <AMcBain> there they have meaning, as their operations do something to their related surface.
[05:24:43] *** da_shadow has joined ##java
[05:25:32] *** strategy has joined ##java
[05:25:46] <navetz> AMcBain: I see, what I am doing is passing my graphics object, to another object that I want to use for all my drawing.
[05:25:57] *** hoonteke has joined ##java
[05:26:09] <navetz> AMcBain: Can I used BufferedImage to initialize this object?
[05:26:09] *** strategy has quit IRC
[05:26:31] *** Gracenotes has joined ##java
[05:26:36] <AMcBain> sure, but it'll draw everything to that BufferedImage ... so you'll still have to draw it to a JPanel to see it ...
[05:26:41] *** juanez has quit IRC
[05:26:55] *** amz has quit IRC
[05:27:26] <navetz> AMcBain: Gotcha thanks
[05:27:30] *** alek_b has quit IRC
[05:28:56] <ojacobson> Lisp Machine pics for those that wanted 'em (joed, eidolon): http://www.flickr.com/photos/98944018@N00/sets/72157613414203812/
[05:30:29] *** oohshiny has left ##java
[05:37:22] *** kwvarga has quit IRC
[05:37:28] *** javahorn has quit IRC
[05:37:29] <navetz> AMcBain: Okay I am a little bit confused, here is what I am doing::: myDrawBoard = new DrawBoard(this.getGraphics());
[05:37:43] <AMcBain> what is "this"?
[05:37:54] <zacs7> "this is this
[05:37:58] <navetz> this, is my class that extends JPanel
[05:38:21] *** aTypical has quit IRC
[05:38:44] *** mbroeker has joined ##java
[05:38:52] <navetz> in my DrawBoard
[05:39:05] <AMcBain> ah, okay, here's my suggestion: make a method called paint(*) or draw(*) ... and keep an instance of DrawBoard (like you do) but call the paint/draw method on it from inside the paintComponent method of the JPanel and pass it the Graphics object your receive there ... you might have better results.
[05:39:35] *** zacs7 has left ##java
[05:39:46] <AMcBain> (as when Java calls the repaint hierarchy, it will usually result in a wiping of that Graphics object along the way, and what I said above will make sure you redraw what is important when necessary)
[05:41:25] <navetz> AMcBain: well my issue now is that inside my DrawBoard I can't save that Graphics object I pass because I don't know how to create a new one, since it is an abstract class
[05:42:57] *** strategy has joined ##java
[05:43:44] <AMcBain> *sigh* ... just listen. Graphics is abstract because it defines a set of methods that perform operations on a given surface object, such as a BufferedImage or a JPanel. JPanel gives you a Graphics object via paintComponent when it is called. You *don't* store the Graphics object, you pass it around to those who need it, when you need it. A Graphics object doesn't really mean much outside of a painting method, as anything you put there might get wiped the next
[05:43:45] <AMcBain> time repaint() or similar is called ... the paint methods ensure that whatever is painted inside of them is present until the next repaint ...
[05:44:09] *** hiredman has quit IRC
[05:44:17] *** hiredman has joined ##java
[05:45:07] *** mohax has quit IRC
[05:45:30] <AMcBain> I'll make you a test case, even, if you really want ...
[05:45:59] <navetz> AMcBain: that would help, thanks a lot man
[05:46:36] <navetz> AMcBain: all i really want to do is give a reference of my paintComponent to my DrawBoard Object
[05:46:56] <AMcBain> which is why I'm going to write a test case ... because you don't quite get what I'm saying :P
[05:47:20] <navetz> AMcBain: haha alright thank you
[05:48:06] *** magcius has quit IRC
[05:48:31] *** magcius has joined ##java
[05:49:38] *** unstable has joined ##java
[05:49:42] *** quarsaw has joined ##java
[05:50:24] <quarsaw> can someone help me out with an applet question
[05:50:41] <quarsaw> I'm trying ot understand how to add images to an applet
[05:50:46] *** ata2 has joined ##java
[05:50:49] <quarsaw> the security features are killing me
[05:50:53] <Fanook> ~topicsmite quarsaw
[05:50:53] <javabot> And the wrath of /TOPIC descended with terrible fury upon quarsaw. And all the people marvelled, saying, Behold, we too should read the /TOPIC, lest we be stricken. And all the people read the /TOPIC, and went away edified.
[05:51:09] <quarsaw> damn!
[05:51:11] <quarsaw> sorry
[05:51:31] <quarsaw> ok where should I got for applets?
[05:52:25] <Fanook> forums.sun.com
[05:53:11] *** Kwitschibo has quit IRC
[05:55:24] *** linxuz3r has joined ##java
[05:56:10] <linxuz3r> how do i add existing source files on netbeans?
[05:58:18] <r0bby> linxuz3r: #netbeans
[05:58:39] <r0bby> if they're not answering wait, barring that, google
[05:58:42] *** woogley_ has joined ##java
[05:58:56] *** woogley has quit IRC
[05:58:57] *** woogley_ is now known as woogley
[06:02:09] *** aceofspades19 has joined ##java
[06:06:31] <quarsaw> #java is a great place to get directed to other channels
[06:07:48] <pr3d4t0r> quarsaw: Well, we like keetping the local conversation about Java.
[06:07:54] <pr3d4t0r> quarsaw: NetBeans isn't Java.
[06:08:09] <pr3d4t0r> quarsaw: Applets... well, that's policy, as I'm sure you read in the channel wiki.
[06:08:22] <quarsaw> I understand the reasons
[06:08:30] <pr3d4t0r> quarsaw: :)
[06:08:38] <quarsaw> just when you are newb, you think hey I'm trying to do java, lemme try out java
[06:09:17] <quarsaw> although considering how much I hate applets right now, I can understand the ban
[06:09:27] <pr3d4t0r> quarsaw: Heh.
[06:09:39] <pr3d4t0r> ~tell quarsaw about JWS.
[06:09:39] <javabot> quarsaw, JWS is a powerful deployment mechanism that is much better than applets because it removes the browser incompatibility hell and you can run any swing app with a main() method without modification. see http://java.sun.com/javase/6/docs/technotes/guides/javaws/index.html
[06:10:03] <quarsaw> interesting
[06:10:12] <AMcBain> navetz: http://pastebin.stonekeep.com/5621
[06:10:37] <quarsaw> oh Web Start, I've heard of this, superficially
[06:11:01] <navetz> AMcBain: dude thanks a lot man, im gonna look through this and learn
[06:15:07] *** _some0ne has joined ##java
[06:15:16] *** quarsaw has quit IRC
[06:16:08] *** physique has joined ##java
[06:16:11] *** physique has left ##java
[06:16:52] <_some0ne> is there a way to tokenize the string w/o using depracated ways like streamtokenizer or stringtokenizer, such that I would have methods like bool hasNextToken() bool hasNextChar()? Scanner isn't meant for chars, it seems
[06:17:29] *** phix has joined ##java
[06:19:24] <Fanook> _some0ne: String has a method to Split it into substrings
[06:19:24] <pr3d4t0r> ~tell _some0ne about javadoc Scanner
[06:19:25] <javabot> _some0ne: http://is.gd/izIT [java.util.Scanner]
[06:19:34] <pr3d4t0r> ~tell _some0ne about javadoc String
[06:19:35] <javabot> _some0ne: http://is.gd/iaWp [javax.print.DocFlavor.STRING]; http://is.gd/6UoM [java.lang.String]; http://is.gd/iaWp [javax.print.DocFlavor.STRING]
[06:19:44] <Fanook> in fact, the docs for StringTokenizer TELL YOU what to use instead
[06:20:15] <pr3d4t0r> Fanook: Reading the documentation is too hard.
[06:20:28] <pr3d4t0r> Fanook: Why should I bother reading if I can have any of 276 people do my work for me?
[06:20:40] <pr3d4t0r> Fanook: Well, 275 guys and one bot.
[06:20:57] <Fanook> boy did he come to the wrong place then
[06:21:03] <pr3d4t0r> Fanook: Yeah.
[06:21:04] <_some0ne> Fanook: thanks
[06:21:25] <pr3d4t0r> _some0ne: I gave you two or three alternatives to StringTokenizer. Check them out.
[06:21:42] *** vsync has quit IRC
[06:22:15] *** pattwo has quit IRC
[06:22:27] <kavon> What is a T[] paramter look like? It must be some sort of type because I need to use List.toArray(T[]) to turn a List to a String[]
[06:22:50] <pr3d4t0r> kavon: String[]
[06:23:04] *** push[EAX] has joined ##java
[06:23:05] <pr3d4t0r> kavon: That's what the T parameterized type is doing for you :)
[06:23:22] <pr3d4t0r> kavon: The T[] must match the type T for the List itself.
[06:23:24] <AMcBain> navetz: same script, a bit more of a purpose -> http://pastebin.stonekeep.com/5622
[06:23:53] <push[EAX]> using swing, if I have different JFrame classes that I want to browse using a TabbedPane, which container should my JFrame classes implement instead ?
[06:24:00] <push[EAX]> (JFrame doesnt seem to work with tabbed panes)
[06:24:15] <kavon> pr3d4t0r: I get '.class' expected unexpected type required: value found: class
[06:24:20] <kavon> pr3d4t0r: when I put in Stringp[
[06:24:27] <kavon> pr3d4t0r: String[]
[06:24:35] <pr3d4t0r> kavon: What does the List hold?
[06:24:37] <AMcBain> push[EAX]: JFrames are a top-level component. You want a JPanel.
[06:24:43] <kavon> pr3d4t0r: strings
[06:24:59] <AMcBain> If you want an MDI, use JDesktopPane and JInternalFrame together.
[06:24:59] <push[EAX]> AMcBain, ah i see where i went wrong...damn...
[06:25:06] <pr3d4t0r> kavon: So, did you instantiate that with List<String> aList = new SomeList<String>(); ?
[06:25:08] <push[EAX]> those classes are standalone applications that extend JFrame
[06:25:19] <kavon> pr3d4t0r: yes, as an ArrayList<String>()
[06:25:20] <push[EAX]> so all the gui containment is done in the "Jframe object"
[06:25:51] <pr3d4t0r> kavon: Paste the snippet with the problem here: http://eugeneciurana.com/pastebin -- let me look at your listing.
[06:25:58] *** yellow_ has joined ##java
[06:26:09] <pr3d4t0r> kavon: Please show me what you instantiated and what you're trying to get out of the List.
[06:26:14] <linxuz3r> whats a good ide for java?
[06:26:14] *** strategy has quit IRC
[06:26:23] <linxuz3r> that works in many os?
[06:26:34] <yellow_> hey guys is there a good java cms out there ?
[06:26:42] <pr3d4t0r> linxuz3r: IDEA.
[06:26:49] *** Junior has joined ##java
[06:26:52] <pr3d4t0r> yellow_: Communiqué.
[06:26:58] <pr3d4t0r> yellow_: From Day.
[06:27:01] *** strategy has joined ##java
[06:27:12] <ldam> linxuz3r, intellij idea
[06:27:33] <Fanook> ~ide
[06:27:33] <javabot> Fanook, 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:27:38] <Junior> yellou ;)
[06:27:43] <yellow_> pr3d4t0r: link ?
[06:27:54] <pr3d4t0r> ~tell yellow_ about Bart.
[06:27:54] <javabot> Check this out: http://photos1.blogger.com/img/162/6829/1024/Bart.Google.jpg
[06:28:18] <pr3d4t0r> I better leave the channel before I start eviscerating lazy n00bz.
[06:28:22] <pr3d4t0r> Have a good night, peepz.
[06:28:24] <kavon> pr3d4t0r: http://eugeneciurana.com/pastebin/pastebin.php?show=39910
[06:28:30] <pr3d4t0r> kavon: Ah, cool.
[06:28:35] <yellow_> pr3d4t0r: http://www.google.com/search?q=communique+java&btnG=Search&hl=en&sa=2
[06:28:44] *** tranceNRG has quit IRC
[06:28:50] <r0bby> ~google learn to use google
[06:28:51] <javabot> http://letmegooglethatforyou.com/?q=learn+to+use+google
[06:28:54] <r0bby> ^ :)
[06:29:29] <kavon> pr3d4t0r: for some reason a for loop to fill the array back up with whatever is at the same index in the list causes a problem, one of them gets repeated at the end
[06:29:41] <yellow_> r0bby: i did
[06:29:50] <r0bby> use it more :)
[06:30:21] <`House`> in this world everyone forgots very quickly his learning process
[06:30:30] <pr3d4t0r> kavon: It looks fine.
[06:30:32] <yellow_> r0bby: like this http://www.google.com/search?hl=en&q=%22from+day%22+java+cms&btnG=Search ?
[06:30:33] <`House`> oh :(
[06:30:38] <yellow_> :/
[06:30:46] <pr3d4t0r> kavon: Weird.
[06:31:18] <kavon> pr3d4t0r: well toArray() returns an Object[]... is there a way to cast that to a String[] ?
[06:31:32] *** Woflborg has quit IRC
[06:31:41] <Fanook> kavon: did you try just casting it?
[06:31:50] <pr3d4t0r> kavon: Hrm... why are you passing the array to this method?
[06:32:12] <pr3d4t0r> kavon: Oh, never mind. Got it.
[06:32:15] <navetz> AMcBain: Alright I understand what you were doing and that makes sense to me
[06:32:24] <AMcBain> navetz: cool
[06:32:30] <kavon> Fanook: ya: anArray = (String[])theList.toArray(); causes an error
[06:32:35] <phix> Foreign key reference target does not exist
[06:32:39] <phix> wtf
[06:32:42] <kavon> java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String;
[06:32:49] <pr3d4t0r> kavon: It feels like you're doing a lot of unnecessary moving around.
[06:32:52] <phix> any one know how to setup Hibernate collection mapping? and get it to work?
[06:33:08] <pr3d4t0r> kavon: Why, for example, are you copying the array to the ArrayList, then pulling it back out?
[06:33:21] *** alek_b has joined ##java
[06:33:22] <kavon> pr3d4t0r: lists are required for my alphabetizing code
[06:33:37] <navetz> AMcBain: Here is a quick pastebin of something I tried to do http://pastebin.com/m59b5ff41 line 69 and 74 are the lines that are really messing me up, is this method not possible or am I just using the wrong type of obejct (which I obviously am)
[06:33:48] <pr3d4t0r> kavon: Erm... why?
[06:34:05] <pr3d4t0r> kavon: Lists are up to 13 times slower than arrays for the same operation. Just curious.
[06:34:11] <AMcBain> navetz: just model it after what I did.
[06:34:16] *** trustin has joined ##java
[06:34:33] <pr3d4t0r> kavon: Is "alphabetize" a synonym of "sort" in your context?
[06:34:35] <kavon> pr3d4t0r: because I'm using a variation of insert sort, and the way I insert is by appending a string to the end of a list so it is in the order I want
[06:34:38] <phix> ?
[06:34:38] <AMcBain> navetz: you already have a draw() method, just make it take a Graphics object instead of trying to store it locally.
[06:34:39] <kavon> pr3d4t0r: yes
[06:34:39] <phix> well?
[06:35:20] <pr3d4t0r> kavon: Ah, here we go.
[06:35:26] <pr3d4t0r> kavon: You need to cast this.
[06:35:30] <pr3d4t0r> kavon: It's in the documentation.
[06:35:41] <kavon> pr3d4t0r: cast what
[06:35:49] <pr3d4t0r> kavon: From javadoc: Object[] toArray()
[06:35:52] <Fanook> kavon: if you're going to insist on this approach, use the other version of .toArray(), the one that takes an array as an argument. It'll return the correct type of array
[06:36:02] <pr3d4t0r> Fanook: Yup.
[06:36:06] <phix> Fanook: any ideas?
[06:36:07] <kavon> Fanook: ah
[06:36:20] <pr3d4t0r> kavon: Or cast this one.
[06:36:28] <Fanook> kavon: also, http://en.wikipedia.org/wiki/Insertion_sort free pseudocode for an array based implementation
[06:36:28] <pr3d4t0r> kavon: You can do one or the other. Both are valid.
[06:36:56] <pr3d4t0r> kavon: You have Object[] toArray() and <T> T[] toArray(T[] a) here :)
[06:37:22] <kavon> Fanook: problem is that pseudocode doesn't work for alphabetizing
[06:37:22] <Fanook> phix: your foreign key reference target does not appear to exist. I would fix that. That being said, I do not see how this relates to Java
[06:37:36] <Fanook> kavon: bull pocky. You're sorting.
[06:37:56] <pr3d4t0r> kavon: OKi, Fanook seems to understand what you want to do. As far as Java syntax, either use the other toArray(), or cast the first one.
[06:38:00] <`House`> kavon theList.toArray(new String[theList.size()])
[06:38:16] <linxuz3r> can you debug in java?
[06:38:17] <pr3d4t0r> kavon: right = (String []) right.toArray();
[06:38:42] *** eduardopl has quit IRC
[06:38:45] <Fanook> linxuz3r: with the right tools, sure.
[06:38:53] <linxuz3r> what do i need?
[06:38:54] <kavon> Fanook: how would that code handle words with the same first letter, it would have to shift over to the 2nd and what I did was cut it into blocks and sort the blocks of words starting with a etc
[06:39:01] <`House`> kavon theList.toArray(new String[theList.size()]) returns a String[]
[06:39:16] <kavon> house: thanks
[06:39:27] <`House`> np
[06:39:28] <AMcBain> navetz: how is it coming?
[06:39:47] <Fanook> kavon: if only String had a built in method to Compare one string to another...
[06:40:27] <navetz> AMcBain: I think i'm getting it, but i don't really understand why i cant store a referenece of the object locally
[06:40:41] <linxuz3r> Fanook: what tools do i need?
[06:40:54] <Fanook> kavon: you claim to be doing an insertion sort, whereas you seem to want to do a radix sort....backwards. Pick one
[06:41:27] <AMcBain> navetz: you can, but you can't do the line that creates the Graphics object.
[06:41:29] <Fanook> linxuz3r: a debugger. Any IDE comes with one, there is also jdb
[06:41:44] <AMcBain> navetz: Line 69 can be "private Graphics g = null;"
[06:41:46] <kavon> Fanook: well crap if I knew about compareToIgnoreCase I would have saved myself a lot of trouble
[06:41:56] <Fanook> ~reading++
[06:41:56] <javabot> reading has a karma level of 12, Fanook
[06:41:56] <AMcBain> navetz: because you then later assign it in the constructor.
[06:42:15] <Fanook> kavon: this is why you read the docs
[06:43:05] <navetz> AMcBain: I didn't know you could just set it to null :(
[06:43:22] <navetz> AMcBain: my java teacher was pretty bad, we did very little OOP
[06:43:27] <AMcBain> navetz: why not? "g" is just a reference.
[06:43:30] <navetz> AMcBain: thanks a lot for the help
[06:43:34] <AMcBain> np
[06:43:41] <kavon> Fanook: back to the drawing board... I almost don't want to delete the code now that I've found a more efficient and exact way to go about this
[06:43:58] <AMcBain> navetz: also, though you can store it like you're trying, I think my method of passing is a big cleaner.
[06:44:00] <AMcBain> bit*
[06:44:07] <pr3d4t0r> kavon: You need to read a bit more :)
[06:44:08] <ojacobson> it's a lot cleaner
[06:44:21] <ojacobson> the graphics you get during paint calls is only guaranteed to be valid until those calls return
[06:44:25] <Fanook> kavon: make it work, make it clean, make it fast. In that order. If you can do the first two at the same time, it's generally a good idea to do so
[06:44:30] <ojacobson> you should not be holding onto it even in theory any longer than that
[06:44:35] <AMcBain> ojacobson: yup
[06:44:42] <Fanook> s/fast/fast enough
[06:44:42] <navetz> AMcBain: I agree, but then it would not work as a thread
[06:44:51] <AMcBain> navetz: huh?
[06:45:18] <ojacobson> navetz: you're not allowed to manipulate that Graphics from any thread but the EDT anyways, so it's a non-issue
[06:45:22] <ojacobson> code that does so is simply wrong
[06:45:26] <ojacobson> may work sometimes, but wrong
[06:45:49] <kavon> Fanook: my version definitely isn't clean, nor does it work fully because I would need to write different code for sorting deeper into the string, although I could probably get a loop for it all but It would be very messy
[06:45:56] <ojacobson> if you need to draw stuff in the background, draw it to a BufferedImage and copy that to the UI widget when you're done, on the EDT.
[06:46:25] <kavon> Fanook: compareTo allows me to loop it properly
[06:46:54] *** linear` has quit IRC
[06:47:29] *** meanburrito920_ has quit IRC
[06:47:37] <kavon> Fanook: currently all it does it sort by the first two letters of the string
[06:47:41] <navetz> ojacobson,AMcBain : humm okay, ill change it up. Thanks for the tips
[06:47:51] <ojacobson> navetz: hint: SwingWorker.
[06:47:59] <ojacobson> ~~ navetz edt
[06:47:59] <javabot> navetz, edt is Event Dispatch Thread, the thread that drives the awt/swing gui. See http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html for a tutorial on Swing and threads, and note http://java.sun.com/developer/JDCTechTips/2005/tt0727.html#1
[06:48:09] <ojacobson> that's also a useful pair of links re. threading and Swing
[06:48:15] <AMcBain> I'm outdated ... I still use SwingUtilties :P
[06:48:16] <ojacobson> finally,
[06:48:24] <ojacobson> ~~ navetz jcip
[06:48:25] <javabot> navetz, jcip is Java Concurrency In Practice, a book focused on implementing threaded and concurrent applications in Java. http://jcip.net/
[06:48:39] <ojacobson> that's *highly* recommended if you're doing anything non-trivial in threads
[06:48:50] <AMcBain> I want that book :-/
[06:49:03] <navetz> thanks guys
[06:49:23] *** hiwk has joined ##java
[06:49:45] <ojacobson> cheers
[06:50:21] <hiwk> byte foo = 0xF0; // how should I do this?
[06:50:29] <Fanook> cast it
[06:50:31] <hiwk> I don't car that it is signed
[06:50:35] <ojacobson> cast it
[06:50:44] <Fanook> or use the signed decimal representation
[06:50:52] <ojacobson> or use a larger type
[06:51:18] <hiwk> so byte foo = (byte)0xF0; ?
[06:51:24] *** durka42 has quit IRC
[06:51:39] *** _some0ne has quit IRC
[06:51:55] <Fanook> yep
[06:54:38] *** neuro_damage has quit IRC
[06:56:20] *** ahughes has quit IRC
[06:57:10] *** durka42 has joined ##java
[06:58:24] *** sebr has quit IRC
[06:59:26] *** lacqui has joined ##java
[06:59:31] *** alek_b has quit IRC
[06:59:50] *** lacqui has left ##java
[07:04:34] *** waz has quit IRC
[07:05:15] *** jewbaca has joined ##java
[07:06:39] *** foo-nix has joined ##java
[07:07:57] *** Bevin has joined ##java
[07:09:35] <xjkx> what can i use on linux to view the games programmed in java for cellphones? i don't want to put in the cellphone before testing
[07:10:32] <ojacobson> Fanook: did you catch the photos I put up earlier? We had a Lisp Machine open to try to figure out why it's not booting.
[07:10:58] <Fanook> didn't catch the photo, but lisp machines are special
[07:11:03] <jewbaca> xjkx: sun provides an emulator
[07:11:06] <ojacobson> indeedy. http://www.flickr.com/photos/98944018@N00/sets/72157613414203812/
[07:11:41] <jewbaca> http://www.flickr.com/photos/98944018@N00/3256636583/in/set-72157613414203812/
[07:11:48] <jewbaca> anyone else lol?
[07:12:12] <jewbaca> like nerds flossing their ice
[07:12:15] <jewbaca> anywho..
[07:13:26] <Fanook> man, they really packed those chips on there, didn't they. "Heat management? Who needs heat management?"
[07:13:39] <ojacobson> yeah
[07:13:47] <ojacobson> that fan is the full width of the case, and there are three of them
[07:13:55] <ojacobson> it moves a TON of air when they spin up
[07:16:48] <ojacobson> you can run the microcode fairly easily on an emulator in almost any modern microcontroller, which is the hilarious part
[07:16:59] <ojacobson> whole-board-sized CPU then < fingernail-sized chip now
[07:18:02] *** ldam has quit IRC
[07:18:20] *** ata2 has quit IRC
[07:19:10] *** metaperl has joined ##java
[07:19:32] <metaperl> does have a form of string where everything is literal? there are no escapes?
[07:19:56] <jewbaca> no
[07:20:01] <jewbaca> but you can escape the escapes
[07:20:02] <ojacobson> metaperl: if you have a large string with a lot of escapes you may be better off reading it from a ResourceBundle
[07:20:05] <jewbaca> Pattern.quote
[07:20:15] <ojacobson> you should probably do that with any non-trivial string anyways
[07:21:33] <phix> hey!!!!
[07:21:58] <phix> Fanook: it relates to java as it is hibernate
[07:22:21] <phix> Fanook: well the forgein key reference is being inserted first!
[07:22:28] <phix> I dont know what it is complaining about
[07:25:43] <metaperl> jewbaca: why is it Pattern.quote and not java.lang.String.quote ... the API seems to say it works on a string - http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html#quote(java.lang.String)
[07:25:56] <jewbaca> its for regex
[07:26:07] <metaperl> oh
[07:26:25] <metaperl> yes but the API says this - public static String quote(String s)
[07:26:25] *** strategy has quit IRC
[07:26:37] * jewbaca nods
[07:26:46] <metaperl> so it returns a string
[07:26:52] <metaperl> and s (the input arg) is a string
[07:27:00] * jewbaca looks for the gold medal
[07:28:08] <metaperl> lol
[07:28:17] <metaperl> just call me Michael Phelps
[07:28:25] * metaperl looks for the bong
[07:28:33] <jewbaca> :D
[07:30:26] *** jrockway has joined ##java
[07:30:42] *** jrockway has left ##java
[07:33:58] *** mgenov has quit IRC
[07:38:05] *** bindaas has joined ##java
[07:40:15] *** bindaas has quit IRC
[07:42:00] <mikeym> how would I evaluate the contents of a string to see if it contains numbers as to convert it to an integer using the Integer wrapper class?
[07:42:49] *** bindaas has joined ##java
[07:42:55] <mikeym> Integer input = Integer.parseInt(userInput);
[07:42:56] *** perry753 has joined ##java
[07:42:58] <da_shadow> You could try to parse it as an Int, if it fails, it's not an int. But the you couldn't tell if it was meant to be an int, but is just formatted incorrectly or something
[07:43:28] *** strategy has joined ##java
[07:43:29] <metaperl> How can you create a literal multi-line string in Java?
[07:43:30] <mikeym> but if it fails I want the program to ask for user input again until a valid integer number is passed
[07:44:09] <da_shadow> So if the parse call throws an exception, re-ask
[07:44:45] *** illbeatu has joined ##java
[07:45:06] <illbeatu> hrm this tech support/server support job is a 21 hour shift.
[07:45:21] <illbeatu> i wonder if the job poster knows if the job description is asking the candidate to die on the job.
[07:47:02] <jewbaca> lol
[07:47:31] <jewbaca> metaperl: you dont
[07:47:31] *** illbeatu has quit IRC
[07:47:43] <jewbaca> you type in \n
[07:47:53] <jewbaca> we dont have heredocs or antyhing cool like that
[07:47:59] <metaperl> How do I interpolate a number into a string?
[07:48:07] <jewbaca> ~cast
[07:48:07] <javabot> type casting is a way of changing the type of a reference (it NEVER changes an object), or a sloppy way of converting between different primitive types. (Type) expression type-casts the result of expression to Type.
[07:48:22] <metaperl> nothing like printf?
[07:48:22] <jewbaca> eh
[07:48:44] <metaperl> printf "the answer is %d", 25 - 21
[07:48:45] <jewbaca> it used to say check the wrappers if primitves or else look at the end point
[07:48:58] <jewbaca> we have printf
[07:48:58] *** thpar has joined ##java
[07:49:25] <metaperl> found it - http://www.java2s.com/Tutorial/Java/0120__Development/Demonstrateprintf.htm
[07:49:36] <metaperl> i should've googled that instead of string interpolation java
[07:50:19] <jewbaca> we also have String.format
[07:50:44] *** mele- has quit IRC
[07:50:59] <jewbaca> + operator wors to make a int a string too
[07:51:14] <jewbaca> println(""+i)
[07:52:14] <metaperl> oh nice
[07:52:25] <dangertools> metaperl: multiline string literals are also done with +
[07:53:50] *** thunderbolt has quit IRC
[07:53:53] *** bas-i has joined ##java
[07:54:41] *** lacqui_ has joined ##java
[07:55:13] *** lacqui_ is now known as lacqui
[07:55:49] <metaperl> so printf is standard, but sprintf is not?
[07:55:59] <metaperl> I have to go the StringBuilder/Formatter route?
[07:56:06] <ojacobson> ~~ metaperl javadoc String.format
[07:56:07] <javabot> I don't know of any documentation for String.format
[07:56:13] <ojacobson> o_O
[07:56:32] <ojacobson> metaperl: http://java.sun.com/javase/6/docs/api/java/lang/String.html#format(java.lang.String,%20java.lang.Object...)
[07:56:46] <ojacobson> ~~ cheeser javadoc String.format(*)
[07:56:47] <javabot> cheeser: http://is.gd/iA0W [java.lang.String.format(Locale,String,)]; http://is.gd/iA0X [java.lang.String.format(String,)]
[07:56:51] <ojacobson> oh, that's what I did wrong.
[07:57:25] *** resmo has joined ##java
[07:57:39] *** sphenxes has quit IRC
[07:57:59] *** juanez has joined ##java
[07:58:05] *** lacqui_ has joined ##java
[07:58:52] *** linxuz3r has quit IRC
[07:59:14] *** sphenxes has joined ##java
[08:01:36] *** xjkx has quit IRC
[08:05:04] *** Gracenotes is now known as Gracenotes_sleep
[08:06:15] <Ububegin> Has anyone done this to send images from a server to a client.. ----> ImageIO.write(bufferedImage,"jpeg",ImageIO.createImageOutputStream(objectOutPutStream)); If i send 1 image, it works..But sending 2 images, causes a problem
[08:06:31] <Ububegin> ImageIO.write(bufferedImage,"jpeg",ImageIO.createImageOutputStream(objectOutPutStream));
[08:06:45] *** Spike1506 has joined ##java
[08:07:32] *** Malformation has quit IRC
[08:08:11] *** JohnBat26 has quit IRC
[08:08:33] *** epoxy has quit IRC
[08:10:31] *** cactaur has quit IRC
[08:12:57] <AMcBain> Ububegin: define "causes problems"? you don't get image 2 at all or you get part of image 2 ... ?
[08:13:07] *** lacqui has quit IRC
[08:13:24] <Ububegin> AMcBain: I can only receive the 1st image at the client side...
[08:14:16] <Ububegin> I wonder whether the bufferedimage not being serializable has anything to do with this...
[08:14:27] <AMcBain> maybe if you set up a "protocol" or something to send 1 image at a time? "send me images"->"sending image 1" "I got image 1"->"sending image2"
[08:14:56] *** armyriad has joined ##java
[08:15:01] <AMcBain> and, yes, it'll try to serialize it to the best of its ability, tmk, unless it finds things inside of the object which are not transient or serializable ...
[08:15:36] <AMcBain> (but BufferedImages shouldn't have any of the biggies there: Threads/Raw Connections ...)
[08:15:54] <Ububegin> AMcBain: The thing is that, I cant do sending one bufferedimage at a time..(It will involve changing too much of my current code).. I have to send the two in one chost..
[08:16:10] <Ububegin> shot, i mean
[08:16:40] <AMcBain> have you tried flushing the output stream between sending images or wating a (very) small amount of time before sending image 2?
[08:16:42] <jewbaca> maybe a giant byte array with a delemeter
[08:16:58] <jewbaca> or the first bytes are the siize of the first img
[08:17:16] <jewbaca> do you get an exceptions?
[08:17:23] <AMcBain> yeah, it might be easier to send the data of the image instead of BufferedImage iteslf.
[08:18:05] *** hoonteke has left ##java
[08:19:28] <Ububegin> AMcBain, jewbaca : Is there an API for converting the Bufferedimage <->Bytes.... vice versa...
[08:19:59] *** hoerup has joined ##java
[08:20:47] <jewbaca> http://java.sun.com/j2se/1.4.2/docs/api/javax/imageio/ImageIO.html#write(java.awt.image.RenderedImage, java.lang.String, java.io.OutputStream)
[08:20:54] <jewbaca> 1.4
[08:20:55] <jewbaca> gah
[08:21:29] <AMcBain> Ububegin: WritableRaster image.getRaster().getDataBuffer() , maybe?
[08:22:04] <AMcBain> or just serialize the raster directly?
[08:22:23] *** tvparys has joined ##java
[08:22:47] *** thpar has quit IRC
[08:23:06] *** theb has quit IRC
[08:23:43] *** xabbuh has joined ##java
[08:23:52] <Ububegin> AMcBain: actually, in my prev. code, I send the image in bytes , didnt I... ImageIO.createImageOutputStream(objectOutPutStream) by using this
[08:24:13] <AMcBain> possibly, I have no idea how that method works
[08:24:58] <Ububegin> jewbaca: what do u mean by a giant byte array... ( not just the data array, right) But also all the data fields and etc..
[08:25:23] <jewbaca> i mean stuff two imahes in one byte[]
[08:25:28] <jewbaca> images*
[08:26:30] *** strategy has quit IRC
[08:26:49] <Ububegin> jewbaca: hei, can give a short code snippet... thanks.. i dont really understand what you mean
[08:27:00] *** strategy has joined ##java
[08:29:29] <jewbaca> pseduo code: b=byte[img1.size+img2.size];b[0] = img.size;Array.copy(img1, b);Array.copy(img2,b);
[08:29:32] <jewbaca> something like that
[08:29:52] <jewbaca> is not complex, just get the bytes for each image, put them into an array if it nmakes you happy
[08:29:54] *** ldam has joined ##java
[08:29:56] <jewbaca> then send the data
[08:30:17] *** Kwitschibo has joined ##java
[08:32:38] *** thpar has joined ##java
[08:33:08] <Ububegin> jewbaca: :) .. you make it sound like its very ez.... K, dude.. I will try this approach now..
[08:33:45] <jewbaca> :)
[08:34:30] <jewbaca> http://papernapkin.org/pastebin/view/4326/
[08:34:58] <jewbaca> just think of your image as bytes, then write the size of the first image to the byte array first
[08:34:58] <tieTYT3> ~javadoc
[08:34:58] <javabot> tieTYT3, I have no idea what javadoc is.
[08:35:02] <tieTYT3> ~javadoc arraylist
[08:35:03] <javabot> tieTYT3: http://is.gd/iA8x [java.util.ArrayList]
[08:35:18] <jewbaca> so youknow how far into the stream to read to find the second image
[08:35:39] *** ldamwork has joined ##java
[08:37:33] *** rawblem has joined ##java
[08:37:52] *** respecting has joined ##java
[08:38:41] <respecting> hello did myeclipse works on linux ?
[08:39:14] <jewbaca> only you could say, my eclipse works just fine though
[08:39:19] <jewbaca> ;)
[08:39:55] *** ldam has quit IRC
[08:40:20] <respecting> on linux are you sure? because i'm gona install linux right now and i'm gona transfer all my work from windows to linux(i'm developping a J2EE web application on myeclipse under win XP)
[08:40:58] *** jahid has quit IRC
[08:40:59] <jewbaca> i have no clue what myeclipse is
[08:41:00] <jewbaca> sorry
[08:41:16] * jewbaca can't be arsed to google
[08:41:24] <tieTYT3> i just found out that in .NET, instead of updating classes in a backwards compatible way, they just create new ones in a new namespace. For example, they have System.Net.Collections.Generic
[08:41:27] <respecting> http://www.myeclipseide.com/
[08:41:29] <respecting> have a look
[08:41:36] <AMcBain> tieTYT3: yup
[08:41:53] <tieTYT3> tieTYT: what are the pros and cons of this?
[08:42:38] <respecting> tityt3 this is a java channel not a dotnet channel
[08:42:45] <tieTYT3> respecting: you're right
[08:42:50] <jewbaca> know your enemy!
[08:42:52] <AMcBain> respecting: there's always ##java-talk
[08:42:55] <tieTYT3> which is why we can answer that question in terms of java
[08:43:26] <tieTYT3> respecting: watch this: What would java gain/lose if it created new classes instead of made old ones backwards compatible?
[08:43:49] <AMcBain> well, having two separate namespaces (packages) would be a bit confusing, but it would save broken code because we aren't updating the old ones which they are all still free to use.
[08:44:00] <tieTYT3> yeah
[08:44:15] <tieTYT3> one thing that's nice about java is you can just add generics to getters as part of a refactoring
[08:44:29] <tieTYT3> but in .NET, you'd have to change all references to the list everywhere
[08:44:31] *** magentar has joined ##java
[08:44:37] <AMcBain> respecting: why would you pay for eclipse?
[08:44:42] *** tvparys has quit IRC
[08:45:32] *** ramdam has joined ##java
[08:45:54] <AMcBain> well, the one thing I like about Java is the *lack* of overloaded operators for the Collections, as it is much more intuitive to do .add/put(*) and .get(*) than to do the .add + [*] with no visible method for retrieval of items.
[08:46:44] <AMcBain> plus an operation with an operator such as [] doesn't seem (to me) like something that should be able to throw a run-time exception, wereas get(*) can
[08:47:09] *** gein has joined ##java
[08:47:16] <gein> anyone knows a tool for javadoc coverage? I want to find methods and classes that has not yet been javadoc'ed
[08:47:28] <tieTYT3> gein: idea could probably do that
[08:48:01] <gein> tieTYT3: that's a complete IDE?
[08:48:42] <gein> I need either a standalone tool or a plugin to Eclipse (as that's the IDE we're currently using)
[08:49:09] <magentar> i think something like this is already in eclipse
[08:49:19] <magentar> you can activate warnings for non-documented members i think
[08:49:25] <tieTYT3> gein: yes
[08:49:40] <gein> magentar: ah, I'll check it out
[08:52:45] *** mbroeker has quit IRC
[08:53:16] *** dvayanu has joined ##java
[08:53:20] *** Epcylon has quit IRC
[08:53:22] <gein> magentar: yes, Eclipse already had support for it, totally missed it, thanks!
[08:54:28] *** thpar has quit IRC
[08:54:35] *** Bollinger has joined ##java
[08:56:15] *** killuats has joined ##java
[08:57:47] *** ridoo has joined ##java
[08:58:40] *** kab has quit IRC
[08:58:50] *** respecting has quit IRC
[09:00:27] <Ububegin> jewbaca: objectOutputStream.writeObject(bytesOut); ... Is this correct...
[09:00:55] *** da_shadow has left ##java
[09:02:00] *** selckin has joined ##java
[09:03:44] <csaba> I'm trying to do a batch update with Hibernate just as it's described in the documentation: http://www.hibernate.org/hib_docs/reference/en/html/batch.html However, after I clear the session, all the objects that haven't been changed actually are reloaded, and this is very slow. Is there some better way to batch update?
[09:04:09] <csaba> Basically I would like hibernate to do "update mytable set somevalue=? where id in (?,?,?,?,?)"
[09:04:22] <csaba> Instead, what it does is write an update for each item separately
[09:04:50] <csaba> And after 30 updates, I flush and clear, and then it loads all the other records again from the database
[09:07:13] *** gambler has quit IRC
[09:07:38] *** deSilva has joined ##java
[09:07:57] *** gambler has joined ##java
[09:08:24] <W_work> csaba, you have more control if you don't use a table-binding ORM
[09:08:34] <W_work> beyond that I don't have any advice
[09:09:22] *** MarkT- has joined ##java
[09:09:37] *** gdoko has joined ##java
[09:10:38] <MarkT-> Is there a tool to automatically convert a file that was done with csharp to utilizing java syntax instead (I know the libraries are different, but I'd just be interested in a syntax converter for now)
[09:11:21] <csaba> W_work: I can do it by writing my own query, but then I have conflicts with the transaction manager which blocks everything... well I guess I'll just leave it like this until I find something else
[09:11:28] *** shervin_a has joined ##java
[09:11:35] *** woogley has quit IRC
[09:12:11] <W_work> MarkT-, if it exists, it's top hit for some combination of those keywords in google
[09:12:43] <MarkT-> W_work: then should I assume from a lack of success in that regard that no such tool exists?
[09:13:02] <W_work> no, just a failure to put the right keywords into google
[09:13:29] *** jivedude has joined ##java
[09:13:39] * MarkT- grumbles.
[09:14:17] <W_work> actually, the hits I am seeing looks bogus on closer inspection
[09:14:28] *** yaris123456789 has joined ##java
[09:14:32] <yaris123456789> how can i make all the div elements of a page highlight, when you move your mouse over ? sorta like firebug.
[09:14:43] *** skoskav has quit IRC
[09:14:43] <selckin> use firebug
[09:14:45] <W_work> so I guess there's no such thing (the syntaxes aren't too different anyway)
[09:14:51] *** dpy has joined ##java
[09:14:53] <ramdam> selckin, nice
[09:15:05] <W_work> yaris123456789, try #web?
[09:15:20] <yaris123456789> its dead
[09:15:24] <W_work> not our problem
[09:15:28] <ramdam> lol
[09:15:38] <yaris123456789> W_work: gee you think ?
[09:15:40] <MarkT-> that's what I undertood... but they are enough that just trying to rename a .cs file to .java and bring it into a java project will still have a whole crapload of syntax changes to make before it will even compile
[09:15:41] <ramdam> seriously, this is a js problem no?
[09:15:50] <yaris123456789> i think so
[09:15:54] <ramdam> if you want to build a firefox extension
[09:16:00] <ramdam> ok well, go to a js channel
[09:16:03] <yaris123456789> i want to build a serverside
[09:16:04] <W_work> it has nothing to do with Java, anyway
[09:16:12] <ramdam> there is a server side
[09:16:16] <ramdam> look at firebug
[09:16:22] <ramdam> and look for their IE solution
[09:16:23] <yaris123456789> is the code gpl ?
[09:16:29] <yaris123456789> no i need to integrate this with php
[09:16:35] <ramdam> i wouldn't be talking about it if it wan't
[09:16:40] <ramdam> it's not php
[09:16:45] <MarkT-> individually, such changes are no big deal, but collectively, they are a pain in the ass, so I was rather hoping there was a tool to do it automatically
[09:16:46] <ramdam> it's scriptiness
[09:16:55] <ramdam> yaris123456789, i'll give you link
[09:17:06] <yaris123456789> firePHP ?
[09:17:44] <yaris123456789> nono, i need some type of library that will highlight an element when you move your mouse across
[09:17:57] <ramdam> here
[09:17:59] <ramdam> http://getfirebug.com/lite.html
[09:18:06] <W_work> MarkT-, write one. If C# has anything like the compiler hooks Java does, should be a breeze
[09:18:07] <ramdam> look
[09:18:11] <ramdam> take firebug lite
[09:18:19] *** Spike1506 has quit IRC
[09:18:28] <ramdam> it's a js script you need to put into a page, makes firebug work on any browser, especially IE and safari
[09:18:31] <ramdam> and opera
[09:18:32] <MarkT-> I don't have a c# compiler
[09:18:34] <ramdam> look at the source
[09:18:39] <ramdam> die
[09:18:42] <ramdam> motivate yourself
[09:18:45] <ramdam> read more source
[09:18:53] <ramdam> and by then i'm sure you will have figured it out
[09:19:00] <ramdam> seriously, it's JS
[09:20:34] *** deepjoy has joined ##java
[09:21:00] <ramdam> yaris123456789, go here ##javascript
[09:21:17] <yaris123456789> wait i found css method
[09:21:20] <yaris123456789> thanks tho
[09:21:40] <ramdam> yaris123456789, you can also use prototype
[09:21:54] <yaris123456789> whats prototype
[09:22:17] *** CarstenP2 has joined ##java
[09:23:45] *** MarkT- has quit IRC
[09:26:29] *** strategy has quit IRC
[09:27:01] *** strategy has joined ##java
[09:31:14] *** tomisina has joined ##java
[09:31:18] *** tomisina has quit IRC
[09:31:20] *** jkriesten has joined ##java
[09:32:20] <ramdam> yaris123456789, everyone in the javascript channel will tell you
[09:32:41] <yaris123456789> whats the easies one to use
[09:34:30] *** warriorforgod has quit IRC
[09:39:46] <W_work> ~javascript
[09:39:47] <javabot> Javascript has nothing to do with Java, just like sweet breads are neither sweet, nor bread. See ##javascript
[09:41:15] *** perry753 has quit IRC
[09:43:08] <jewbaca> lol
[09:44:01] <W_work> ~lol
[09:44:01] <javabot> http://idisk.mac.com/zacheryjensen-Public/images/vglol.png
[09:45:06] *** ghostknife has joined ##java
[09:45:36] <ghostknife> I have a layout problem I need some advice/help with. How can I show you guys a screenshot to describe what I want? (There are some image pastebins out there, but I can't find one)
[09:46:19] *** kapipi has joined ##java
[09:50:46] <W_work> ~google image pastebin
[09:50:46] <javabot> http://letmegooglethatforyou.com/?q=image+pastebin
[09:50:57] <ghostknife> OK. got it. http://imagebin.ca/view/c67TRFp8.html (please excuse the double screen... I am busy downloading Gimp). Either way. In the left window (the one with the map) there is a little JEditorPane at it's top left, with some translucent buttons in a JPanel in the top/middle-ish. these are two components.
[09:51:24] <ghostknife> W_work: yeah found it... after I called it "image pastebin" i thought... let me try searching for that. yesterday I was searching in a complete other way....
[09:51:45] <ghostknife> either way... I want those buttons to be completely centered on the screen, while keeping the EditorPane in it's same location
[09:52:25] *** agnul has joined ##java
[09:54:19] *** giupo has joined ##java
[09:54:23] <ghostknife> I tried a gridbaglayout, but I can't seem to find constraints that help with that... I might just be missing something small though
[09:55:37] *** giupo has left ##java
[09:58:48] *** kapipi has quit IRC
[10:00:13] *** yaris123456789 has quit IRC
[10:00:40] *** kapipi has joined ##java
[10:00:58] *** magentar has quit IRC
[10:03:34] *** acuster has joined ##java
[10:03:34] *** wans has joined ##java
[10:04:01] * mocas_ good morning!
[10:04:37] <wans> Hi
[10:04:46] <elmomalmo> ello
[10:04:58] <jewbaca> why hello ther
[10:05:43] *** kapipi has quit IRC
[10:05:54] <wans> hey i have a problem with a double[] ill paste the code its a simple sample i get a Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 9
[10:06:21] *** KikiJiki has joined ##java
[10:06:22] <reisi> how to configure the use of native libraries via java -executables parameters?
[10:06:26] <reisi> ~ jni
[10:06:26] <javabot> reisi, jni is the Java Native Interface. See: http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jni.html and http://java.sun.com/docs/books/jni/html/preface.html - but first ask me about JNA!
[10:06:47] <reisi> hmm jna isn't going to help with rxtxcomm
[10:07:01] <wans> http://pastebin.stonekeep.com/5623
[10:07:26] *** juc0 has joined ##java
[10:07:37] <ldamwork> ghostknife, you can make an empty component at the right side with the same width as the editor pane; and then the buttons panel in the middle should be centered :/
[10:07:38] <wans> the file that the method RecogeDatos() reads its commented at the end of the code
[10:07:45] *** acuster has quit IRC
[10:08:25] <reisi> wans: well you are creating a fixed size array on line 7
[10:08:28] <wans> the file has only 8 values
[10:08:45] <ldamwork> wans, are you sure?
[10:08:53] <reisi> wans: from what line is the exception thrown? 23?
[10:08:57] *** ccherrett has joined ##java
[10:09:05] <ghostknife> ldamwork: how do I give it a set width?
[10:09:05] <wans> the file cambios.txt has only 8 values
[10:09:10] <ghostknife> I've tried that... just now a second ago in fact
[10:09:17] <ghostknife> let me paste this mock playground I made
[10:09:33] <wans> reisi 47
[10:09:47] *** bindaas has quit IRC
[10:09:48] <ghostknife> ldamwork: http://rafb.net/p/jAbTyl40.html
[10:09:51] <ghostknife> run it like that
[10:09:58] <ghostknife> it's currently using layout nr 3 (constructor option)
[10:10:02] <wans> but if i switch the array's size to 8 and remove //the line 47 i get the same error
[10:10:17] <reisi> wans: of course.. that's because your double[] cambios has only indexes 0, 1, 2, 3, 4, 5, 6, 7, 8
[10:11:07] <reisi> wans: double[] myArray = new double[10] --> myArray.length == 10, so you can index it 0-9
[10:11:44] <wans> i know
[10:11:48] <reisi> wans: in java, all indexes start from 0, so the last valid index is (length - 1)
[10:11:49] *** kansan is now known as kansan-zzz
[10:11:57] <wans> on most of languages
[10:12:08] <wans> thats what i can understand
[10:12:16] <wans> im getting an error that has no sense
[10:12:24] <wans> check the table at the bottom of the code
[10:12:27] <wans> its commented
[10:12:42] *** giupo has joined ##java
[10:13:01] <reisi> wans: what's the problem? you read 9 values, those nine are in your array at indexed 0-8
[10:13:02] <wans> that table has 9 values, so the array should be declared as a 0-8
[10:13:19] <wans> right, i remove the line 47 and im still getting errors
[10:13:39] *** ayrnieu has quit IRC
[10:13:39] <reisi> wans: what's the error then?
[10:13:52] <wans> Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 8
[10:14:00] <wans> im not getting displayed the last value of the table
[10:14:13] <wans> public double[] cambios = new double[8];
[10:14:27] <wans> for (int i=0; i<cambios.length; i++) {
[10:14:35] <wans> everything its ok, I think
[10:14:41] <reisi> wans: that's because you are trying to read INDEX 8, which would require you to have double[9] array
[10:14:42] *** bashoh has joined ##java
[10:15:07] <reisi> wans: last index you can access in an array of size N is (N-1)
[10:15:20] <reisi> wans: first is always 0
[10:16:03] <wans> i have the 9 values stored from 0 to 8
[10:16:23] <reisi> wans: great
[10:16:25] <wans> so, isnt a value stored at runtime into cambios[0] ?
[10:16:49] <reisi> wans: yes there should be
[10:16:56] <wans> the 9th value should be at cambios[8] then
[10:17:01] <reisi> correct
[10:17:16] <wans> well.. im getting a exception arrayoutofbounds
[10:17:30] <wans> here : System.out.println(c.cambios[8]);
[10:17:49] <wans> at convierte.main(convierte.java:46)
[10:17:54] <reisi> is your line 7 currently new double[8]?
[10:18:01] <wans> right
[10:18:17] <reisi> wans: do you not understand what that new double[8] means?
[10:18:18] <wans> ive switched [9] for a [8] and removed the line 47
[10:18:32] *** bindaas has joined ##java
[10:19:03] *** dvayanu has quit IRC
[10:19:07] *** J0bk has quit IRC
[10:19:13] <reisi> wans: why did you switch the size from 9 -> 8? that's the problem, you cannot read 9 values to an array of length 8
[10:19:31] <wans> :/
[10:19:35] <reisi> ~ arrays
[10:19:35] <javabot> reisi, arrays is http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html
[10:19:39] <wans> what about 0 ?
[10:19:55] <reisi> wans: please read the tutorial on the url above
[10:20:07] <wans> already doing it
[10:21:09] <wans> oops
[10:21:16] <wans> got confused sorry
[10:21:18] <wans> thanks
[10:21:26] <reisi> np
[10:23:27] <ldamwork> ghostknife, this sucks i beleive, but demonstrates it: http://rafb.net/p/uNtve625.html
[10:23:55] <ldamwork> replace label with a panel
[10:23:55] *** KermitTheFragger has joined ##java
[10:24:27] <ghostknife> ldamwork: your label's constraints got cut off... anything special there?
[10:24:31] <ghostknife> I assume not?
[10:25:23] <ghostknife> ldamwork: my golly it works :> thanks.
[10:25:33] <ghostknife> and I don't think it sucks
[10:25:35] <ldamwork> ghostknife, http://rafb.net/p/7HA1si62.html
[10:25:39] *** valcker has joined ##java
[10:25:48] <ghostknife> ldamwork: thanks
[10:25:52] <ldamwork> np
[10:25:55] <ghostknife> ldamwork: I didn't even think of that
[10:26:02] <ldamwork> a little hacky :/
[10:26:13] <ghostknife> ldamwork: I was busy building my own layout manager just before you came and rescued quite the time
[10:26:29] *** strategy has quit IRC
[10:26:31] <ghostknife> ldamwork: a little, but in this case it's also a little acceptable... it's a filler after all
[10:26:47] <ghostknife> ldamwork: would be nice if there was a definite way to do it though
[10:27:00] <ghostknife> ldamwork: one that follows the rules of layouts strictly
[10:27:12] <ldamwork> ghostknife, Alternatively: if the width of the panel is fixed, you can set the padx on the fille of the to the panel width, so you dont have to overrride
[10:27:53] *** strategy has joined ##java
[10:28:08] *** teralaser has joined ##java
[10:28:09] <ghostknife> ldamwork: I thought of that... but the width varies by +-100px often
[10:29:50] *** Resistance has quit IRC
[10:30:33] <ldamwork> ghostknife, you will love this: An undocumented feature, though i'm not sure i would recommend it (not using fille panel): http://rafb.net/p/OVFXMe36.html
[10:31:32] <ghostknife> can you explain that?
[10:31:53] *** Sonderblade has joined ##java
[10:32:30] <ghostknife> ah....
[10:32:34] <ghostknife> clever :>
[10:32:39] <ghostknife> haha
[10:32:39] <reisi> is there any way to check if the JRE is run on Linux or Windows?
[10:32:43] <Sonderblade> Can you use native database functions in JPA queries?
[10:32:51] <ghostknife> that's evil
[10:33:01] *** killuats has quit IRC
[10:33:02] <jewbaca> evil how
[10:33:04] <jewbaca> what is the resuklt
[10:33:18] <jewbaca> you are talking about the -9999 in the insets?
[10:33:42] <Sonderblade> reisi: System.getProperties()
[10:33:44] <jewbaca> im not seeeing anything interesting in the code
[10:33:52] <ldamwork> jewbaca, by using negative insets you can overlap components in a gridbag layout. By using -9999 the component position is calculated as if it was alone in the layout
[10:34:06] <jewbaca> ahh
[10:34:23] <jewbaca> nice
[10:34:54] <jewbaca> i have never had need for that
[10:34:55] <jewbaca> seems odd
[10:35:07] <ldamwork> 'problem' is that ideally -9999 would place your component outside the screen, so it is magically adjusted to screen edge. Not sure if this is a feature or a bug of the layout. Thus i am not sure the solution has merit
[10:35:09] <jewbaca> but i missed the begninning of the converstion :s
[10:36:09] <ldamwork> Same goes for negative values in padding. If all paddings in a GBL has a large negative value, then GBL becomes a 'Percentage' layout where percent is defined by the weight
[10:36:35] <jewbaca> you dont need negative padding for that
[10:36:40] <jewbaca> thats how it works by default
[10:37:33] <ldamwork> jewbaca, nope. the percentage in weight is for the extra space left over by componts. Using negative padding, then the extra space is not included so you get a true percentage layout
[10:37:33] *** LongkerDandy has quit IRC
[10:38:07] <jewbaca> eh, the compnents grow to use the space
[10:38:19] <jewbaca> so its based on the weight
[10:38:25] <jewbaca> without any adjusting to padding
[10:39:13] *** Daniel_H has joined ##java
[10:40:05] <ldamwork> e.g. cmp1=100px, cmp2=200px, width=400px; cmp1weight=1, cmp2weight=3;, then cmp1 becomes 125px and cmp2 275px. If pad is -9999, then cmp1 becomes 100px and cmp2 becomes 300px - a true percentage layout. Try it and see
[10:41:15] <ldamwork> you can of course set preferred size to 0 of these components and accomplish the same; but using negative padding, it becomes a little easier
[10:41:25] *** soa2ii has joined ##java
[10:41:26] *** strategy has quit IRC
[10:41:55] *** beol has joined ##java
[10:43:18] <jewbaca> ldamwork: http://papernapkin.org/pastebin/view/4330/
[10:43:21] <jewbaca> thats what i use
[10:43:32] <jewbaca> i didnt run your test, but i dont doubt it
[10:43:50] <jewbaca> i think maybe im just not understanding what you ar saying
[10:44:01] <jewbaca> because what you are describing seems to be the default to me
[10:44:13] <jewbaca> but i dont use GBL constrinatcs directly anymore anyway
[10:44:17] <jewbaca> wayyyy too much typing
[10:44:20] *** Woflborg has joined ##java
[10:44:36] <ldamwork> jewbaca, yeah. i know, but i am sort of used to it :/
[10:44:42] <jewbaca> add(c , bag.nextX().nextY().fillBoth());
[10:44:52] <jewbaca> try bag for a bit
[10:44:54] <jewbaca> you might like it
[10:45:09] <jewbaca> it extends gbl cons
[10:45:17] <jewbaca> so you can use it anyway you want
[10:46:24] <jewbaca> best part is its call tab completeable
[10:46:28] <jewbaca> \o/
[10:47:56] <ldamwork> looks intrigiung...
[10:47:58] *** Resistance has joined ##java
[10:48:08] <ldamwork> hm. bad typing :/
[10:48:09] <jewbaca> it really is a time saver
[10:48:12] *** bindaas has quit IRC
[10:54:10] *** unlord has quit IRC
[10:54:58] *** mapreduce has joined ##java
[10:54:58] *** asdfqwer has joined ##java
[10:55:06] <asdfqwer> hey javanoids
[10:55:17] <mapreduce> Is it normal that two Java processes can't both open the same dll?
[10:55:24] <mapreduce> The equivalent works fine on Linux.
[10:56:15] <asdfqwer> How might I return a sorted array into a new array?
[10:56:36] <asdfqwer> is it as easy as I just made it sound?
[10:56:37] <W_work> make array copy, sort copy
[10:56:53] <W_work> yes, very simple
[10:57:13] <asdfqwer> is copy a method?
[10:57:22] *** yrjokin has joined ##java
[10:57:24] <W_work> ~~asdfqwer javadoc Arrays
[10:57:26] <javabot> asdfqwer: http://is.gd/iqF5 [java.util.Arrays]
[10:57:26] <asdfqwer> cuz i thought sort only returned a string.
[10:57:40] <mapreduce> asdfqwer: Find me a sort that returns a String.
[10:57:40] <W_work> ~~asdfqwer aolbonics
[10:57:41] <javabot> asdfqwer, aolbonics is using unnecessary abbreviations such as 'u', 'r', 'ur', 'thx', etc. Using this language depicts you as an imbecile in the eyes of the helpful regulars in this channel, and is generally not tolerated. If you want intelligent answers, the least you can do is speak intelligently. Additionally arguing about this rule will get you nowhere except banned. Have a nice day!
[10:57:42] *** gein has left ##java
[10:58:38] <asdfqwer> how could you accuse me of such syntax?!
[10:58:52] <asdfqwer> from a simple 'cuz' ?!
[10:58:55] <giupo> cuz is not english, I guess...
[10:58:58] <ldamwork> jewbaca, interesting: my two statements before becomes: "add( leftTop, bag.fillY());add( middleTop, bag.nextX().fillBoth().inset(0,-9999,0,0));"
[10:58:58] <ldamwork> nifty :)
[10:59:35] <jewbaca> :D
[10:59:54] <W_work> asdfqwer, ok, sorry, "because" is a long and hard word to get right
[10:59:57] *** arpu has quit IRC
[11:00:09] *** strategy has joined ##java
[11:00:13] <asdfqwer> W_work: However, lemme, and wanna both made in into our lexicon.
[11:00:27] *** arpu has joined ##java
[11:00:30] <asdfqwer> well, spellchecker's lexicon
[11:01:21] *** jewbaca has quit IRC
[11:01:31] <ldamwork> jewbaca, Bag deserves some merit, thanks for the tip
[11:02:05] *** soa2ii has quit IRC
[11:03:11] <mitch0> bags are good. your scrolls and pots don't catch fire in them
[11:03:27] <mitch0> oh, it isn't #nethack :)
[11:03:48] <asdfqwer> W_work: Although an aolbonics entry makes your javabot shine
[11:04:01] <mapreduce> Channels often have accepted forms of language, and a general rule is the more dumb the occupants the more it's enforced.
[11:04:08] <mapreduce> From my observations.
[11:04:26] <asdfqwer> it's all a matter of culture
[11:06:02] <asdfqwer> human communication couples syntax with semantics as a matter of convenience, not necessity
[11:06:34] <mapreduce> Syntax makes the expression of semantics simpler.
[11:06:49] * asdfqwer nods
[11:07:08] <asdfqwer> just imagine if we all expressed our ideas in perl
[11:07:22] <yrjokin> I know it is a question of choice but out of the 'rpm'-based distros is there one that lends itself better to beginner programming (I haven't decided if I am going with java or C++ but I will be using python, perl and ruby to learn from)
[11:07:27] <mapreduce> Or Java!
[11:08:00] <asdfqwer> Ya but we express everything as a string.
[11:08:25] <giupo> and cuz is simply incorrect, live with it and be happy ;)
[11:08:50] <asdfqwer> giupo: cuz works phonetically
[11:09:02] <mapreduce> Actually, wiktionary defines cuz.
[11:09:06] <giupo> indeed, but here you are writing.
[11:09:08] <mitch0> yrjokin: I don't think there's much of a difference between the distros in this regard
[11:09:23] <asdfqwer> giupo: except you're reading aloud in your head
[11:09:24] *** ghostknife has quit IRC
[11:09:53] <yrjokin> okay mitch0
[11:09:55] * asdfqwer closes the 'cuz' thread
[11:11:16] <giupo> mapreduce: from wikitionary : "Aspiring writers can use this construction to make a fictional character sound particularly illiterate, but may wish to avoid it otherwise." ;) use at your own risks :D
[11:11:29] <mitch0> :)
[11:11:49] <mapreduce> giupo: It's not a word I'd use, 'cause I don't pronounce cuz the same way as cause.
[11:12:11] <asdfqwer> my ma always be axing me to read me some more books for learning
[11:12:41] <mapreduce> I'm not surprised.
[11:12:44] <benJIman> cause rhymes with pause.
[11:14:19] <mapreduce> So it turns out that two Java processes can't use the same DLL, and that it's on purpose, for security reasons.
[11:14:48] <giupo> mapreduce: do you have any exceptions, or it simply hangs?
[11:14:49] <mapreduce> DLLs are supposed to be shared libraries. That's like disabling a keyboard to stop people typing for security reasons!
[11:15:03] <mapreduce> giupo: I get an exception telling me the DLL is already in use.
[11:15:18] <giupo> from who? the same JVM?
[11:15:28] <mapreduce> No.
[11:15:45] <mapreduce> I have a parent process that launches lots of processes that benchmark JPEG decoders.
[11:16:07] <mapreduce> One decoder is native, so needs a native library. The parent process accidentally loads that library due to the way class loading works.
[11:16:15] <mapreduce> I'm now removing that from the parent process.
[11:16:18] *** genesiss has joined ##java
[11:16:56] <asdfqwer> Is this proper, double[] sorted_arr; sorted_arr = Arrays.copyOf(arr, arr.length); ?
[11:17:01] <giupo> ah, ok: so you jave a JVM that spawns native processes?
[11:17:09] <mapreduce> giupo: See Runtime.exec
[11:17:23] <giupo> yes yes... I would not, but i do know it... :*
[11:17:25] <giupo> :(
[11:17:26] <mapreduce> ~javadoc Arrays.copyOf(*)
[11:17:28] <javabot> mapreduce, too many results found. Please see your private messages for results
[11:17:34] *** J0bk has joined ##java
[11:17:46] <mapreduce> It would be handy if javabot gave the return type too.
[11:18:02] <asdfqwer> mapreduce: length is optional though, correct?
[11:18:16] *** yrjokin has quit IRC
[11:18:37] <mapreduce> What makes you say so?
[11:19:19] *** blankthemuffin has joined ##java
[11:19:43] *** jahid has joined ##java
[11:19:44] <asdfqwer> n/m
[11:19:59] <asdfqwer> should be. :P
[11:20:02] *** Epcylon has joined ##java
[11:20:17] <mapreduce> Then write your own lib that does it the way it should be.
[11:20:19] *** justafish has joined ##java
[11:20:29] <mapreduce> Or find one that exists already. Google Collections might be a good place to look.
[11:21:09] <asdfqwer> mapreduce: Blast, why must there be more sarcastic people than myself.
[11:21:22] <mapreduce> What makes you think that's sarcasm?
[11:21:33] <asdfqwer> I was being.
[11:21:34] <goki-_-> Is it valid to have the text for a param on the line after the actual @param tag? Eclipse seems to think it isn't
[11:21:55] *** kapipi has joined ##java
[11:21:56] <mapreduce> goki-_-: @param thenameoftheparam \n description
[11:22:15] <mapreduce> I expect that thenameoftheparam must be on the same line as @param.
[11:22:40] <asdfqwer> mapreduce: sarcastic statements that call for sarcasm return as anything but serious.
[11:23:32] <mapreduce> Damn, how did my therapist get into ##java?
[11:23:53] <asdfqwer> Google Latitude.
[11:24:00] <W_work> goki-_-, without having done any research, I think the param text must /start/ on the same line
[11:24:05] <goki-_-> mapreduce: I was just wondering if it is absolutely required, because all my descriptions are on the next line, and eclipse is showing 800 warnings ;)
[11:24:17] <mapreduce> goki-_-: Try running javadoc.
[11:24:22] <W_work> goki-_-, one way to find out: run javadoc
[11:24:33] *** ghostknife has joined ##java
[11:24:52] <W_work> ok, I'll take lunch, and leave the channel in mapreduce's capable hands :D
[11:24:55] * mapreduce gets W_work a faster keyboard.
[11:25:05] <ghostknife> ldamwork: I resolved to using the Insets hack. the filler doesn't work when the panel on the left resizes itself
[11:25:24] *** bashoh has quit IRC
[11:25:50] *** push[EAX] has quit IRC
[11:27:01] <ghostknife> ldamwork: oh well.. it does work. if I invalidate() the layout... so nm that... now to decide... I feel safer with the insets though, for some reason
[11:27:35] <ldamwork> ghostknife, yeah. A little simpler. I would put a note in a comment though about why it is so...
[11:29:18] *** B|ackPanther has joined ##java
[11:30:48] *** sphenxes has quit IRC
[11:31:00] *** mbroeker has joined ##java
[11:33:54] *** Junior has quit IRC
[11:37:02] <ghostknife> ldamwork: already did
[11:37:13] <ghostknife> ldamwork: i tend to have multiline comments with these type of things
[11:37:28] <ghostknife> I have an odd problem... probably just misunderstanding this
[11:38:09] <ghostknife> I have a Timer and a TimerTask. Now I schedule the timertask, and at the end of it's run() method I try and schedule it again... this seems to be impossible. why? exception: Exception in thread "Timer-0" java.lang.IllegalStateException: Task already scheduled or cancelled
[11:38:31] <ghostknife> can a task only be run once?!
[11:38:38] <ldamwork> ghostknife, yes
[11:38:44] *** J0bk has quit IRC
[11:38:48] *** Soliah has quit IRC
[11:38:51] <mapreduce> You may freely create a new task.
[11:39:24] <ghostknife> mapreduce: sure, but that is mega object creation/destruction taking place. would have preferred to not do that
[11:39:28] <mapreduce> Perhaps you'd enjoy keeping a Factory<Task> to hand, or a method with Task as a return type.
[11:39:38] <mapreduce> ghostknife: Object creation and destruction is insanely cheap on the JVM.
[11:39:54] <mapreduce> Often cheaper than keeping objects around, due to cache locality.
[11:40:17] <ghostknife> mapreduce: I know that... but would still want to keep it low if simple+possible and it remains "correct"
[11:40:22] *** romanb has joined ##java
[11:40:24] <mapreduce> Then you're wanking.
[11:40:38] <ghostknife> mapreduce: I don't understand the cache locality part?
[11:40:55] <mapreduce> Not all parts of memory take the same amount of time to access.
[11:41:12] <mapreduce> There are registers, caches, normal RAM and virtual memory that can be paged in.
[11:42:00] <ghostknife> ok. so java tries to keep memory for object creation in the faster ones?
[11:42:06] <mapreduce> If you've just created an object, it's going to be in the cache, unless it doesn't fit (caches are 1 or 2 MB). If you're reusing an existing object, it might not already be in the cache, so the system has to read from elsewhere (and maybe put it in the cache).
[11:42:44] <ghostknife> mapreduce: ok. so the already used object was taken out of the cache at some point?
[11:42:50] <ghostknife> I assume they have to be in the cache for it to be used then?
[11:43:01] <mapreduce> They don't, but it's faster when they are.
[11:43:04] <ghostknife> since you say "If you've just created an object, it's going to be in the cache"
[11:43:16] <mapreduce> Hmm, that's not guaranteed, it's just likely.
[11:43:22] <ghostknife> mapreduce: ok
[11:43:35] <mapreduce> Measure performance. I'm measuring performance of JPEG decoders right now.
[11:43:46] <ghostknife> and if the object is used every 300ms, compared to a fresh one every 300ms?
[11:44:00] <ghostknife> mapreduce: that's a good idea. will try that
[11:44:11] <mapreduce> At some point I need to create a ByteBuffer from a byte[]. One benchmark does that before running the code 10000 times, and another does it on each iteration.
[11:44:26] <ghostknife> should be interesting... I once wrote a handy little java code benchmarking utility
[11:44:38] <mapreduce> Surprisingly (to my boss at least) doing it on each iteration is faster for images under 1 megabyte.
[11:45:06] <mapreduce> 1 megabyte uncompressed, that is.
[11:45:12] *** NiSoOo has joined ##java
[11:45:45] <mapreduce> When you've finished benchmarking, start looking at algorithmic complexity more than wanking about reusing an object.
[11:46:04] *** Razec has joined ##java
[11:49:23] *** teralaser has quit IRC
[11:54:03] *** Woflborg has quit IRC
[11:54:29] <asdfqwer> Meanwhile, I'm still befuddled why this won't compile: double[] copy_of_arr = Arrays.copyOf(arr, arr.length);
[11:55:09] *** roots_ has joined ##java
[11:56:00] <asdfqwer> Debugger claims it cannot find symbold method copyOf(double[],int)
[11:56:06] <asdfqwer> symbol*
[11:56:51] <asdfqwer> I've imported java.util.*
[11:57:00] *** Angel-SL has joined ##java
[11:57:19] <roots_> yo need to specifiy Arrays nonetheless
[11:57:21] <giupo> asdfqwer: java -version output?
[11:57:58] *** shadewind has joined ##java
[11:57:59] <giupo> beware all those copyOf methods are available since 1.6 ...
[11:58:03] <mapreduce> asdfqwer: Importing a class does not import its static methods.
[11:58:05] *** teralaser has joined ##java
[11:58:27] <mapreduce> The static methods can be imported via import static the.package.name.ClassName.theMethod;
[11:58:33] <mapreduce> note the 'static'.
[11:59:15] <shadewind> I usually don't use static imports anyway
[11:59:37] <asdfqwer> I'm a nOOb
[11:59:41] *** Junior has joined ##java
[11:59:45] <mapreduce> They are useful when the class name is not relevant in the meaning of the method
[12:00:02] <Junior> .
[12:00:03] <giupo> mapreduce: I think that importing java.util.* and calling Arrays.staticmethod is quite normal, isnt' it?
[12:00:18] <asdfqwer> So I must import the method as a static instance, is that what you're telling me?
[12:00:27] <t3mp3st> anyone know if Array.asList() is implemented in better than O(n) time, where n is len of array?
[12:00:45] <mapreduce> giupo: It is, yes.
[12:00:49] <giupo> asdfqwer: just a personal curiosity: can you tell me the version of your JVM?
[12:01:00] <mapreduce> t3mp3st: Yes, it's O(1).
[12:01:32] <giupo> mapreduce: just wanted to make sure, thank you!
[12:01:39] <t3mp3st> mapreduce: thanks! that's great news :)
[12:01:54] <asdfqwer> java version "1.6.0_10"
[12:01:56] <asdfqwer> Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
[12:01:57] <asdfqwer> Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing)
[12:02:13] <giupo> all right... so there's no JVM version problem...
[12:02:46] <asdfqwer> I mean, is asking for a return value too much to ask?
[12:02:56] <giupo> can we see your code, not pasting it here...
[12:03:01] <asdfqwer> sure.
[12:03:23] <roots_> Arrays.copyOf
[12:03:28] <roots_> you must specify arrays
[12:03:40] <asdfqwer> I am.
[12:03:51] <asdfqwer> http://pastebin.com/m5c224aaa
[12:04:22] *** PRINCESS_FLUFF has joined ##java
[12:04:22] *** nekrozion has quit IRC
[12:05:13] <asdfqwer> Is it ok in Java to return a method value into a declaration?
[12:06:34] <mapreduce> int x = foo(); is ok.
[12:06:39] <mitch0> asdf: are you 100% sure you're using the 1.6 jvm when trying to run your code?
[12:06:50] *** zachscrivena has quit IRC
[12:06:50] <mitch0> (your paste works here fine)
[12:07:06] <mapreduce> What compile error do you get?
[12:07:08] <asdfqwer> mitch0: as sure as my output
[12:07:22] <mapreduce> javac -version might differ from java -version
[12:07:45] <mitch0> how do you build the code?
[12:09:23] <asdfqwer> brb; I'm gonna try to compile on my other machine.
[12:09:28] <asdfqwer> which is not vista.
[12:09:55] <asdfqwer> Debugger claims it cannot find symbold method copyOf(double[],int)
[12:09:57] <mapreduce> Vista is not the issue.
[12:10:01] <mitch0> also, you might want to check out some java coding standards (regarding class/variable naming). your current style is kinda outta place in java land
[12:10:04] <mapreduce> asdfqwer: javac -version
[12:11:10] <asdfqwer> 1.5.0_09
[12:11:53] <mapreduce> asdfqwer: Upgrade that.
[12:11:58] <asdfqwer> k
[12:12:39] <asdfqwer> maybe there is a javac option to resolve this?
[12:13:17] *** Greeny_ has quit IRC
[12:13:27] *** Greeny_ has joined ##java
[12:13:28] <asdfqwer> I haven't set my classpath
[12:13:42] <asdfqwer> this could be the source, no?
[12:16:37] <kercyr> asdfqwer, obviously java 6 is install somewhere... somehow java is resolving to the java 6 version while javac is resolving to the java 5 version... and all that depends on the platform your running.
[12:17:46] *** NiSoOo has quit IRC
[12:18:59] *** teralaser has quit IRC
[12:19:47] *** Hates_ has joined ##java
[12:20:44] <asdfqwer> brb
[12:20:50] *** asdfqwer has quit IRC
[12:23:07] *** dvayanu has joined ##java
[12:23:55] *** KU0N has joined ##java
[12:26:08] *** Razec has quit IRC
[12:27:02] <KU0N> Hello
[12:27:21] *** Malformation has joined ##java
[12:27:31] <KU0N> I need to read the audio of flv files and stream them together (mixing them)
[12:28:02] <KU0N> Any idea what I should use?
[12:28:44] *** sombriks has joined ##java
[12:29:34] *** acuster has joined ##java
[12:29:51] *** Malformation has quit IRC
[12:31:25] *** pschriner has joined ##java
[12:31:28] <reisi> KU0N: first pick up the audio streams inside flv files, combine them to produce multichannel audio?
[12:32:04] <KU0N> reisi, mono audio is ok, but my question is more, is there a lib to read audio from flv files or should I do it manually?
[12:32:10] *** Malformation has joined ##java
[12:32:11] <W_work> KU0N, what has this to do with ##Java? Do you need a Java library to do this?
[12:32:35] <reisi> KU0N: no idea if there's a library for (de)muxing flv files
[12:32:37] <KU0N> W_work: It has to do with java that I have to do in java.
[12:33:19] <W_work> http://osflash.org/open_source_flash_projects might have something
[12:33:23] <KU0N> I don't absolutely have to, but the streaming server is in Java, and I want to avoid native binary if I can.
[12:33:25] <reisi> i do not know if there's even a framework to which you could build your muxers and decoder/encoders to.. could JMF be used?
[12:33:32] <reisi> ~ JMF
[12:33:32] <javabot> reisi, JMF is Java Media Framework. You can find more information at: http://java.sun.com/products/java-media/jmf/index.jsp
[12:33:37] <KU0N> Thanks, I'll look into that.
[12:34:31] <reisi> KU0N: if you ever your job done please publish your source code, it'd be interesting to see something like this done in java
[12:34:38] *** Varox has joined ##java
[12:34:54] <KU0N> reisi, I will, it's an opensource project.
[12:35:06] <KU0N> I'll put it in my blog http://kuon.goyman.com/
[12:35:49] <reisi> i wonder why there's so little decoder/encoder open source stuff with java.. ffmpeg guys are hardcode C -coders but if one would take for example their MPEG4 AVC decoder and rewrite it in java ... perhaps it could perform better?
[12:36:06] <KU0N> http://www.flagstonesoftware.com/transform/ looks nice
[12:36:07] <roots_> nope
[12:36:12] *** ridoo has quit IRC
[12:36:24] <roots_> their stuff even has SIMD asm stuff included
[12:36:29] <roots_> eg saturated weighted adding etc
[12:36:39] <roots_> stuff you need for signal processing
[12:36:54] <roots_> bytewise but you pass in 64 words
[12:37:07] <roots_> also ffmpeg is illegal
[12:37:10] * roots_ calls the cops
[12:37:13] <reisi> heh
[12:37:15] <KU0N> lol
[12:37:21] *** blankthemuffin has quit IRC
[12:37:52] <reisi> roots_: wasn't there still some "academic" clause in all mpeg4 that allows opensource implementations for free?
[12:38:03] <KU0N> I guess, with today's CPU and java implementation, a de/en coder in java would perform well.
[12:38:19] <roots_> yes but ffmpeg comes with codecs that violate international patent and dopyright laws
[12:38:32] *** pirho has joined ##java
[12:38:51] <KU0N> mpeg2 is the most significant one
[12:39:35] <roots_> for vintage porn yes
[12:39:39] <reisi> heh
[12:39:58] <KU0N> for dvd
[12:39:59] <KU0N> :P
[12:40:33] <reisi> roots_: do you have some reference for that?
[12:40:50] <roots_> the ffmpeg stuff ?
[12:40:54] *** indeterminatus has joined ##java
[12:41:01] <roots_> just wikipedia ffmpeg
[12:41:03] <KU0N> Nooo, the porn...
[12:41:12] <roots_> trackback url ey ?
[12:41:12] <reisi> roots_: hmm i guess look in to that
[12:41:57] <reisi> roots_: ILLEGAL_IN_USA != ILLEGAL
[12:42:22] <KU0N> Yea it's legal here as well:)
[12:42:47] <jonaslund> reisi: finland is just another occupied province, get used to it
[12:42:48] <roots_> yes but sometimes even that is a problem
[12:43:19] <roots_> yes, a lot of good coders come from that part of sweden though
[12:43:32] <reisi> jonaslund: i'll move to sweden when cops come and arrest me for wathing dvd's with mplayer :D at least i get snus more easily
[12:43:34] <jonaslund> i wasn't referring to sweden now :)
[12:43:38] <jonaslund> ohwell :)
[12:43:50] <jonaslund> ffmpeg is GPL so it should be outlawed everywhere anyhow
[12:43:55] <KU0N> Here, downloading movies and hacked stuff is legal
[12:44:21] <W_work> god save us from internet lawyers
[12:44:30] <reisi> W_work: :D
[12:44:35] * jonaslund is a nonvoluntary opensource coder :(
[12:44:46] <roots_> W_work: sorry but god doesnt want to be involved with lawyers
[12:44:59] <dvayanu> what is the difference between ? super Foo and ? extends Foo ?
[12:45:18] <roots_> dvayanu: one is upper bound, the other is lower bound
[12:45:35] <mapreduce> Though in the opposite order.
[12:45:53] <mapreduce> roots_: How's the repatriation of Holland coming along?
[12:45:55] <roots_> the key to udnerstanding here is that those bounds are needed to infer types on generic methods
[12:46:21] *** sombriks has quit IRC
[12:46:21] <roots_> mapreduce: the panzers are ready to go right behind the temporarily border
[12:46:21] <mapreduce> Those bounds would be better placed on the class's declaration if that were possible.
[12:46:28] <dvayanu> ? super Foo <- anything that is superclass of Foo will path?
[12:46:36] <dvayanu> pss
[12:46:38] <dvayanu> pass
[12:46:40] <mapreduce> dvayanu: Yes.
[12:46:44] <mapreduce> Including Foo.
[12:46:46] <roots_> and Foo itself
[12:46:51] <dvayanu> ? super Object is noncense than
[12:46:57] <dvayanu> same as Object
[12:46:59] <mapreduce> And including superinterfaces and implemented interfaces.
[12:47:01] *** shadewind has quit IRC
[12:47:03] <reisi> but ? extends Foo doesn't allow Foo?
[12:47:05] <roots_> its not the same
[12:47:17] <mapreduce> ? super Object cannot be satisfied.
[12:47:20] <mapreduce> Object can be.
[12:47:57] <mapreduce> reisi: ? extends Foo allows Foo and any subtypes thereof.
[12:48:04] <roots_> in any case, this stuff was made up when they were faced with designing methods like moveFromHereToThere(Collection a, Collection b)
[12:48:31] <roots_> now when you make that one generic and you have a sink/destination like collection b you want a bound that is no more strict than necessary
[12:48:32] <mapreduce> roots_: Why not <T> moveFromHereToThere(Collection<T> a, Collection<T> b)?
[12:48:33] <dvayanu> ~pastebin
[12:48:33] <javabot> http://rifers.org/paste Paste the final url after you've pasted your stuff there.
[12:49:17] <dvayanu> http://rifers.org/paste/show/8742
[12:49:26] <dvayanu> line 005 doesn't compile
[12:49:26] <reisi> mapreduce: couldn't the latter be Collection<? super T> b?
[12:49:53] <roots_> in a library it should
[12:50:18] <mapreduce> reisi: Yes, it could, but you could achieve that through a mapping method too.
[12:50:19] <roots_> since with just T both have to be exactly T and inheritance is not allowed
[12:50:37] <roots_> mapreduce: you mean an intermediate generic method ?
[12:51:00] <mapreduce> <T, U> fromHereToThere(Collection<T> c, Collection<U> d, Transformation<T, U> transexual)
[12:51:10] *** neuro_damage has joined ##java
[12:51:14] <roots_> sure
[12:51:22] <roots_> genrics are questionable
[12:51:31] <roots_> though
[12:51:42] <mapreduce> Runtime errors > generics?
[12:51:53] <dvayanu> T extends ASGService -> doesn't pass ? extends ASGService
[12:51:56] <neuro_damage> wow I have a friend who has an assignment, that's the weirdest shit I've ever seen ... I'm supposed to give the amount of change without using conditionals and loops ... hrmrmrmrm
[12:52:00] <roots_> nah, but the implementatino could have been different
[12:52:22] <mapreduce> roots_: Wildcards suck, declaration-site variance annotations are better.
[12:52:27] <roots_> dvayanu: ?
[12:52:30] <mapreduce> Erasure sucks if you do anything with reflection.
[12:52:38] <roots_> yeah
[12:52:39] <mapreduce> Other than that, what are you thinking of?
[12:52:57] <roots_> especially the fact that it only works for reference types
[12:53:09] <roots_> unlike in c#
[12:53:14] <dvayanu> roots_ any ideas how to make the paste compile?
[12:53:18] <roots_> where you get one impl. per primtive type
[12:53:20] <mapreduce> That could have been worked around without removing erasure.. but wasn't.
[12:53:33] <mapreduce> roots_: Yep. C# generics have far fewer holes.
[12:53:44] <neuro_damage> how would I round ot the nearest integer with java?
[12:53:55] <mapreduce> neuro_damage: Math.round
[12:54:06] *** vezzoni has joined ##java
[12:54:19] <roots_> to the nearest representable integer :>
[12:54:28] *** teralaser has joined ##java
[12:54:36] <mapreduce> Note that it might give you something that's not an integer, thanks to the way floating point numbers work.
[12:54:49] <mapreduce> Fractional numeric types++
[12:54:59] <neuro_damage> mapreduce: oh ok, I aws thinking ceil and ground but that means conditionals heh thanks again
[12:55:11] <mapreduce> Java: 16777216F + 1 == 16777216F
[12:55:42] <mapreduce> High level my ass.
[12:55:45] <roots_> mapreduce: exactly my point
[12:56:40] <roots_> neuro_damage: but don't worry the relative error is small
[12:56:51] *** mohax has joined ##java
[12:56:52] <reisi> mapreduce: why doesn't that go Float.MIN_VALUE?
[12:57:10] <mapreduce> reisi: Because it's not an overflow?
[12:57:39] *** mohax has quit IRC
[12:57:42] *** lami1984 has joined ##java
[12:57:47] <lami1984> hello
[12:57:49] <reisi> mapreduce: hmm ok, i just assumed that's Float.MAX_VALUE
[12:57:53] <mapreduce> Nope.
[12:58:07] <mapreduce> Float.MAX_VALUE has about 28 more digits than that.
[12:58:08] <roots_> its just that representable numbers are further apart that 1
[12:58:19] <roots_> s/that/than/
[12:58:32] <roots_> again the relative error is neglectable
[12:58:48] <mapreduce> Depends on the use.
[12:59:15] <roots_> you read the java disclaimer i assume ;)
[12:59:27] <mapreduce> Don't use Java?
[12:59:42] <roots_> also the behavior is deterministic
[12:59:42] *** Vicfred has quit IRC
[13:00:33] <mapreduce> Amusingly, on Mono, 16777216F + 1 == 16777216F, but on .NET, 16777216F + 1 = 16777217F.
[13:00:50] *** t0th_- has joined ##java
[13:00:54] *** DjZemich has joined ##java
[13:00:56] <t0th_-> can help with jetty?
[13:00:59] *** jkriesten has quit IRC
[13:01:02] <mapreduce> The language spec doesn't mention IEEE floats - does Java's?
[13:01:07] <t0th_-> http://189.126.103.68:8280/dumondimoveis/index.jsp
[13:01:13] <roots_> mapreduce: with strict keyword yes
[13:01:26] <mapreduce> strictfp
[13:01:31] <roots_> yes
[13:01:57] *** Junior has quit IRC
[13:02:06] <teralaser> "welcome to numerical analysis"
[13:02:11] *** KikiJiki has quit IRC
[13:02:14] <t0th_-> anybody?
[13:02:29] <roots_> looks like in c# the compute is done with double floatprecision
[13:02:45] <mapreduce> roots_: I think it fails for values a little above that though.
[13:02:48] *** sombriks has joined ##java
[13:02:54] <mapreduce> I don't have a Windows installation to hand to test that on.
[13:03:44] <roots_> erm actually i believe 16777216 doesnt go into a 32 float at all
[13:04:19] *** sombriks has quit IRC
[13:04:26] <mapreduce> I think it's the last integer that does before there are gaps.
[13:04:29] <roots_> 17 even
[13:04:36] <roots_> doesnt go into there
[13:04:36] <mapreduce> Ah, you're right there then.
[13:04:40] <dvayanu> ok, another question
[13:04:43] <roots_> so its a printout conversion
[13:04:43] <dvayanu> public class PricingServiceFactory implements ServiceFactory<IPricingService>
[13:04:56] <roots_> which is another pitfall one always traps into even if you know to watch out for
[13:05:02] <dvayanu> shouldn't (Class<ServiceFactory<ASGService>>)PricingServiceFactory.class work?
[13:05:05] *** Junior has joined ##java
[13:05:24] <dvayanu> IPricingService extends ASGService
[13:05:48] <mapreduce> roots_: No, it's not a printout conversion. 16777217F gets printed as 1.6777216E7
[13:06:19] <mapreduce> at least by Scala, which must delegate that to Java.
[13:06:30] <roots_> most likely :)
[13:06:34] <roots_> it could do that in realtime
[13:06:35] <roots_> System.err.println(f2);
[13:06:41] <roots_> oops
[13:06:48] <mapreduce> Secret code, that.
[13:06:53] <mapreduce> You'll have to kill us all now.
[13:06:55] <roots_> its my password
[13:07:05] <roots_> incl. relatives
[13:07:09] <roots_> which i am really sorry about
[13:07:13] <mapreduce> I'll post it on my blog quick.
[13:07:21] *** dAnjou_ has joined ##java
[13:07:30] <roots_> i need to be working
[13:07:34] <roots_> meeting, gotta kick some ass
[13:07:41] <roots_> and hiring etc
[13:07:57] <teralaser> (etc=firing =O )
[13:08:15] <roots_> we're growing, not shrinking
[13:08:37] *** beol has quit IRC
[13:08:39] <teralaser> hm, I guess the problem with 16777216F could also be the decimal->mantissa conversion
[13:08:40] <mapreduce> So, today I will be joined by Roger, who you will be replacing. Roger forgot to write documentation for his last project, which is why he's had to resign.
[13:08:54] <teralaser> to know, one should get mantissa and see what it is.
[13:09:09] <mapreduce> teralaser: Um, the mantissa is 24 bits for floats.
[13:09:21] <jonaslund> uh no
[13:09:22] <jonaslund> 23
[13:09:24] <mapreduce> So 16777216, as 2 to the power 24, is not exactly coincidental.
[13:09:24] <neuro_damage> roots_: if I had the total amount of change for instance 21.03 how would I figure out how many quarters, nickels, dimes etc ... without using loops or conditionals?
[13:09:32] <teralaser> oh
[13:09:41] <jonaslund> floats are 1 bit sign, 8 bit exp and 23 bits of mantissa
[13:09:59] <neuro_damage> roots_: I thought about multiplying the amount by 100 rounding it to the nearest integer and then that would give me the cents
[13:10:12] <roots_> he ?
[13:10:18] <roots_> you give back all your change in cents ?
[13:10:21] <dAnjou_> hi .. my java bot doesn't join channels, although i added a "join #channel \n" after sending user information. can you tell me, where my problem could be or do you need to see the code?
[13:10:22] <roots_> your customers must hate you
[13:10:34] <roots_> try modulo and start with quarters first
[13:10:39] <teralaser> but still, the routine that read '1','6','7','7', etc. must convert it.
[13:11:03] <roots_> since 1.6 we have Math.nextAfter
[13:11:04] *** armyriad has quit IRC
[13:11:10] <roots_> and nextUp
[13:11:21] <dAnjou_> the bot is in the network
[13:11:22] <roots_> not that i need it for my financial coding :)
[13:11:24] <roots_> better not
[13:11:46] <roots_> laters
[13:12:21] *** lesshaste has joined ##java
[13:12:26] *** jkriesten has joined ##java
[13:12:27] *** NiSoOo has joined ##java
[13:12:33] <lesshaste> hi.. how do I specify source level 5.0 when compiling?
[13:13:11] <hoerup> what is the best book about ant ??
[13:13:11] *** DragonLord- has joined ##java
[13:13:31] <ldamwork> what is the best search engine?
[13:13:43] <ldamwork> google or freenode ##java?
[13:14:44] <t0th_-> jetty
[13:14:54] <dvayanu> the best book about ant is probably ant.apache.org
[13:15:14] <jonaslund> jetty is a servlet engine, do you want me to pamper you more today?
[13:15:25] <t0th_-> i need help
[13:15:33] <jonaslund> ldamwork: i'd definetly say #java ;)
[13:15:36] <t0th_-> http://189.126.103.68:8280/dumondimoveis/index.jsp
[13:15:38] <roots_> hi jonaslund btw
[13:15:50] <roots_> 4
[13:15:51] <jonaslund> roots_: hi
[13:15:55] <jonaslund> :)
[13:16:03] <mapreduce> jonaslund: You're right, though the interwebs conflict with themselves on this.
[13:16:27] *** skoskav has joined ##java
[13:16:46] *** Carnage\ has joined ##java
[13:17:13] <ldamwork> jonaslund, true. I asked google the same question, but i didn't get a clear answer
[13:17:48] <roots_> anyone know the interzone ?
[13:17:51] * jonaslund curses at his motherinlaw
[13:18:14] <lesshaste> ok well more importantly.. what are parameterized types and why were they dropped?
[13:18:40] <jonaslund> she works with accounting and has helped me with accounting issues over the past year for my new company
[13:18:59] <mapreduce> lesshaste: Parameterised types are things like Comparable<T>
[13:19:00] <roots_> jonaslund: i know how that feels
[13:19:06] <mapreduce> They were dropped by whom?
[13:19:08] <roots_> accounting that is
[13:19:10] <jonaslund> but i've always felt that she's quite "irresponsible" and not really accurate (by a coders standards)
[13:19:13] <roots_> drop acid not types
[13:19:35] <roots_> you can correct mistakes in accounting
[13:19:41] <jonaslund> now that i've gotten in touch with the people doing the yearly checkups of my books i'm really seeing alot of missed stuff :(
[13:19:43] <lesshaste> mapreduce, I get "Syntax error, parameterized types are only available if source level is 5.0"
[13:19:57] *** sgadolin has joined ##java
[13:20:20] <jonaslund> roots_: ah, so they're just like idiots who think that you always can patch later? :)
[13:20:48] <mapreduce> lesshaste: You are using Eclipse?
[13:20:52] <roots_> you have to patch later :)
[13:21:05] <lesshaste> mapreduce, no.. just javac
[13:21:11] <lesshaste> mapreduce, but it's not my code
[13:21:13] *** waz has joined ##java
[13:21:13] <mapreduce> lesshaste: Hmm, odd.
[13:21:16] <mapreduce> javac -version
[13:21:27] * mapreduce prepares to blame Debian.
[13:21:55] <lesshaste> mapreduce, ahem!
[13:21:58] <lesshaste> Eclipse Java Compiler v_774_R33x, 3.3.1
[13:22:04] * mapreduce blames Debian.
[13:22:10] <mapreduce> Are you using Ubuntu, by any chance?
[13:22:14] <lesshaste> yes
[13:22:37] <mapreduce> I suggest removing the ejc package, and installing a Sun JDK and using that.
[13:23:14] <lesshaste> thanks.. good idea!
[13:23:21] <lesshaste> I had not idea I was using eclipse
[13:23:39] <mapreduce> Eclipse has the retardation necessary to assume that your project, unless you specify otherwise, uses an end-of-life'd version of Java.
[13:23:59] <lesshaste> nice :)
[13:24:21] <cheeser> ojacobson: *grumble* *grumble* 8^)=
[13:24:24] <mapreduce> Ubuntu has the retardation necessary to package its compiler with a binary called javac (or at least, via the alternatives mechanism).
[13:24:30] *** DjZemich has quit IRC
[13:24:44] *** coalado1 has joined ##java
[13:25:10] <mapreduce> lesshaste: It's sad that you had to be a victim of that. I suppose it'd be the same on Windows if MS had won that lawsuit back in the day.
[13:25:35] <coalado1> I'm looking for a nice method to pass data from one tool to another running on the same machine.
[13:25:39] <cheeser> ~debian--
[13:25:39] <javabot> debian has a karma level of -23, cheeser
[13:26:09] <coalado1> I linked a file type to my tool. And if a user doubleclicks on this filetype, a second instance of my tool starts.
[13:26:26] <coalado1> it should not start. it should pass the arguments to the already existing instance
[13:26:27] <roots_> and you only want one instance
[13:26:30] <mapreduce> coalado1: I would have the app listen on a socket.
[13:26:39] <coalado1> mapreduce: that's what it does atm
[13:26:49] <coalado1> but this is not very good.
[13:26:52] <mapreduce> Why?
[13:27:11] <coalado1> because i cannot be sure that the socketport is free
[13:27:23] <coalado1> moreover this socket leads to problems with firewalls
[13:27:32] <roots_> users are scared away yes
[13:27:41] <roots_> lockfiles are ok on local filesystems
[13:27:41] <mapreduce> So make that configurable with the app via a .myapp file.
[13:28:17] *** Gracenotes_sleep has quit IRC
[13:28:21] <coalado1> roots_: a lockfile would work.. but this does not pass arguments to the running instance
[13:28:28] <roots_> you could also use a port range
[13:28:43] *** lami1984 has quit IRC
[13:28:52] *** dAnjou_ has left ##java
[13:28:54] <roots_> or have two executables
[13:28:58] <coalado1> roots the socket approach works..
[13:29:02] *** notk0 has joined ##java
[13:29:06] <roots_> like emacs, emacsclient
[13:29:18] <mapreduce> emacs and emacsclient use sockets for that.
[13:29:22] <coalado1> but there are a lot of users with firewall any security software issues
[13:29:39] <roots_> yes but emacs users have a slightly higher iq than end users
[13:29:41] <lesshaste> mapreduce, all fixed thanks!
[13:29:52] <coalado1> roots_: that's it
[13:30:02] <coalado1> your tool should be 100% idiot-safe
[13:30:05] <wans> ~ActionListener
[13:30:05] <javabot> wans, ActionListener is http://java.sun.com/docs/books/tutorial/uiswing/events/actionlistener.html
[13:30:08] <mapreduce> coalado1: I suggest you provide assistance to those users and continue doing what you're doing.
[13:30:17] <lesshaste> mapreduce, now it says java version "1.6.0_0"
[13:30:17] <lesshaste> IcedTea6 1.3.1 (6b12-0ubuntu6.1)
[13:30:25] <roots_> indeed when you make software for the mass market
[13:30:25] <mapreduce> Hehe.
[13:30:26] <lesshaste> mapreduce, which is also slightly surprising :)
[13:30:39] <mapreduce> lesshaste: sudo update-alternatives --config=java
[13:30:40] <roots_> you need to be defensive
[13:30:40] <notk0> do people like java here?
[13:30:40] <lesshaste> I assume IcedTea is to avoid some copyright problem :)
[13:30:49] <mapreduce> notk0: I like Java here, but not elsewhere.
[13:31:01] <Fanook> ~iced tea
[13:31:02] <javabot> Fanook, icedtea is a project to provide a harness to build the source code from OpenJDK using free software build tools, etc. See http://fedoraproject.org/wiki/Features/IcedTea for more info
[13:31:07] <lesshaste> mapreduce, update-alternatives: unknown option `--config=java'
[13:31:16] <mapreduce> lesshaste: man update-alternatives
[13:31:20] <mapreduce> and find the exact syntax.
[13:31:23] <coalado1> 600000 users atm. We cannot give assistance to everyone. So we have to avoid users that need support...
[13:31:35] <coalado1> The only solution in my mind without sockets
[13:31:36] <notk0> i like the easy of making guis in java using netbeans IDE with no proper knowledge of the widgit tooklkit
[13:31:41] <notk0> but personally i find python easier
[13:31:43] <mapreduce> coalado1: Assistance can be in the form of documentation.
[13:31:52] <notk0> and jython well it cant make so easily guis
[13:31:53] <notk0> withotu writing them
[13:31:57] <lesshaste> mapreduce, ok I see 6 alternatives
[13:32:03] *** ramdam has quit IRC
[13:32:12] <lesshaste> mapreduce, I have *+ 3 /usr/lib/jvm/java-6-openjdk/jre/bin/java
[13:32:13] <mapreduce> lesshaste: Pick the one that looks most like "Sun Java 6 JDK"
[13:32:19] <lesshaste> mapreduce, is my one no good?
[13:32:38] <mapreduce> That one is probably fine.
[13:32:42] <coalado1> is a kind of lockfile, combined with a "transferfile" which is scanned every few seconds for new infos
[13:32:47] <lesshaste> ok I'll stick with it
[13:32:48] <lesshaste> thanks!
[13:32:59] <mapreduce> coalado1: That is a little prone to problems but if it works for you..
[13:32:59] <lesshaste> (sudo update-alternatives --config java)
[13:33:06] *** whaley has quit IRC
[13:35:50] <notk0> anybody here search for developpers or smth
[13:35:59] <notk0> I dont have much ideas on my own
[13:36:01] <notk0> well i have
[13:36:03] <notk0> but I am lazy
[13:36:49] <coalado1> so you are asking if anyone is looking for lazy devs?
[13:37:10] <notk0> well
[13:37:15] <mapreduce> We would be, but we already have a lot.
[13:37:17] <notk0> i wont be that lazy
[13:37:24] <notk0> if i will liek the prioject
[13:37:37] <notk0> but I am no java guru
[13:37:48] <mapreduce> You're selling yourself brilliantly.
[13:38:10] <notk0> why?
[13:38:11] <mapreduce> Skills: No Java guru, no C# guru, no PHP guru
[13:38:24] <notk0> i didnt mean I am looking for a job
[13:38:26] <mapreduce> Interests: Asking for work on IRC
[13:38:30] <notk0> aka: getting paid
[13:38:42] <notk0> I am no brainfuckl guru also
[13:38:51] <notk0> i just know +++[+++<<<>>><]
[13:38:53] <coalado1> NotADJ: i have something to do
[13:39:04] <notk0> anybody here
[13:39:08] <roots_> we are hiring too
[13:39:08] <notk0> has some project
[13:39:09] <notk0> ..
[13:39:15] <notk0> hiring?
[13:39:15] <roots_> but not on irc :)
[13:39:16] <coalado1> <<jdownloader
[13:39:27] <notk0> what does it do? something like
[13:39:31] <notk0> downlaod manageR?
[13:39:33] <coalado1> notk0: i need a Speedmeter class.
[13:39:48] <notk0> speedmeter?
[13:40:07] <notk0> no such word found on gogole
[13:40:08] <coalado1> that sums up bytes and calculates an average over the last *** seconds
[13:40:30] <notk0> sums up what bytes?
[13:40:33] <notk0> oh
[13:40:36] <notk0> downlaoded bytes?
[13:40:44] <notk0> so it displays the speed?
[13:40:48] <notk0> downloading speed?
[13:40:51] <coalado1> speedmeter.addBytes(int bytes) <<<
[13:41:05] <KU0N> I did this the other day for iphone speed test, took me like 1 minutes or so.
[13:41:16] <coalado1> you add downloaded bytes. and the class calculates the speed
[13:41:18] <mapreduce> KU0N: You're so slow, you should be sacked.
[13:41:18] *** whaley has joined ##java
[13:41:23] <KU0N> So, with all respect, I feel a joke here.
[13:41:29] *** javahorn has joined ##java
[13:41:29] <mapreduce> Instead you should discuss it on IRC for 1 hour.
[13:41:30] <coalado1> depending on bytes and the time between now and the last addbytes call
[13:41:46] *** Junior has quit IRC
[13:41:47] <notk0> I never worked in java with packets before
[13:42:09] *** vesz has joined ##java
[13:42:18] <mapreduce> coalado1: I don't mean to spoil your plans for world domination, but if you ever reach 2 gigabytes of data, you're going to get incorrect results!
[13:42:22] <whaley> ~~ KU0N server joke
[13:42:26] <javabot> The joke of the day is at /server joke, KU0N. It's usually pretty funny.
[13:42:34] *** bas-i has quit IRC
[13:42:36] <notk0> !help
[13:42:40] <notk0> .hwelp
[13:42:42] <notk0> .help
[13:42:46] <notk0> <.<
[13:42:52] <notk0> Is javabot written in Jqvq?
[13:42:54] <notk0> Jqvq?
[13:42:56] <notk0> java?*
[13:43:05] <mapreduce> notk0: Alt-F4 is the standard way of getting help around here.
[13:43:13] <whaley> notk0: yesk itz? is!@
[13:43:21] <notk0> you know it can be written in ruby and comilet to bytecode
[13:43:23] <notk0> or in python
[13:43:29] <notk0> *compiled
[13:43:35] <mapreduce> Jqvq is a far better name.
[13:43:43] *** bas-i has joined ##java
[13:43:47] <whaley> ~~ notk0 source
[13:43:47] <javabot> you can find my source at my project site http://kenai.com/projects/javabot
[13:43:48] <notk0> it was typoo
[13:43:59] <mapreduce> Typhoo, the brand of teabags.
[13:44:04] <whaley> notk0: you seem to be making a bit of those....
[13:44:08] *** skoskav has quit IRC
[13:44:20] *** roots_ has quit IRC
[13:44:31] <notk0> a bit of what?
[13:44:35] <go|dfish> ~. also gets you help.
[13:44:35] <javabot> go|dfish, I have no idea what . also gets you help is.
[13:44:44] <whaley> notk0: "typoos"
[13:44:48] <mapreduce> From a bot that thinks it's eliza.
[13:44:50] <notk0> I see
[13:46:27] *** shadowrider has joined ##java
[13:46:46] <mapreduce> notk0: Just a question - how did you decide on Java?
[13:47:37] <notk0> decide to use java?
[13:47:53] <mapreduce> Yes.
[13:47:54] <notk0> I didnt java decided for me
[13:47:57] <mapreduce> How?
[13:47:59] <notk0> more exactly the univercity
[13:48:02] <mapreduce> Ah.
[13:48:06] <notk0> C is second year
[13:48:17] <mapreduce> That's entirely the wrong way around.
[13:48:21] <notk0> why?
[13:48:33] <mapreduce> Because C is a good grounding for Java, and Java is a terrible grounding for C.
[13:48:42] <shadowrider> Hello, I am starting to create a domain specific "Form builder" for a business application. It will probably be web-based, anyone have some hints on documentation about desinging and implementing interface building tools?
[13:48:47] <coalado1> mapreduce: that's normal
[13:48:54] <notk0> well C is harder IMHO
[13:48:56] <mapreduce> coalado1: That doesn't make it correct.
[13:48:58] <notk0> unless you code bad
[13:49:04] <coalado1> we had jave at first, too
[13:49:25] <mapreduce> C is far easier than Java, though you can cause more serious problems with C.
[13:49:40] <notk0> hm well with libraries yes
[13:49:51] <notk0> but I didnt even udnerstood how the STDIN works
[13:49:52] <MacGyverNL> mapreduce: That's in fact a normal course in education these days. *We* even started of with Visual Basic .NET, then moved to Java >.<
[13:49:55] <notk0> if i looked at the soruce
[13:49:57] <MacGyverNL> I'm tainted for life.
[13:49:59] <mapreduce> Even without libraries you can make segmentation faults happen.
[13:49:59] <notk0> it goes down to asm
[13:50:20] <notk0> Java is easeir than C IMHO
[13:50:30] <notk0> C is faster and more powerfull
[13:50:54] <coalado1> notk0: why is java easier?
[13:50:58] <waz> asm is even faster and more powerful
[13:50:58] <mapreduce> MacGyverNL: That's a downgrade, VB.NET has excellent features, though an annoying syntax and amateurish user base.
[13:51:02] <coalado1> and why is c more powerfull?
[13:51:21] <notk0> java is a virtual machine ints itnerpreted
[13:51:21] <deebo> both can be just as good, c is harder due to manual resource management
[13:51:31] <notk0> you can make an OS in java without making the machine in C
[13:51:33] <mapreduce> Somehow in going from VB to VB.NET, they managed to reverse the screwups.
[13:51:46] <KermitTheFragger> if the definition of powerful is control, then assembly is the most powerful language :)
[13:52:05] <coalado1> notk0: just because you have more "possibilities" in c. it is not more powerfull
[13:52:07] <notk0> you can use inline ASM in C
[13:52:28] <deebo> KermitTheFragger: no its not, still protected modes that only the kernel can access, so the most powerful language is injecting electical impulses to the cpu socket
[13:52:39] <mapreduce> Power in programming languages is probably best looked at in how difficult it is to express things the language wasn't expressly designed for.
[13:52:46] <MacGyverNL> mapreduce: I have a personal opinion about VB .NET which is not suitable for this channel. If I'm working in .NET at all I prefer C#. Point was, I don't think VB .NET is a good precursor to Java any more than Java is a good educational precursor to C.
[13:52:48] <KermitTheFragger> deebo: i see a emerging market :)
[13:52:56] <mapreduce> So if JavaFX looks like rubbish when you use it for non-graphical stuff then JavaFX is not powerful.
[13:53:13] <notk0> coalado1 well java has its advatages true that they arent directly comparable but you can do more with C than java
[13:53:30] <MacGyverNL> notk0: No you can't. They're both Turing complete.
[13:53:35] <coalado1> notk0: ok.. for example.. programming mocrocontrollers
[13:53:36] <mapreduce> MacGyverNL: I agree. I am only looking at technical facts of VB.NET - I've never used it.
[13:54:12] <notk0> coalado1 java just runs on a java virtual machine so it still needs a compiled native executable to run java code
[13:54:15] <mapreduce> notk0: C doesn't have generics. Java wins.
[13:54:20] <MacGyverNL> Well, it's true that VB .NET is a big step up from the old VB's.
[13:54:26] <MacGyverNL> But I still don't like the language.
[13:55:29] <notk0> its a silly fight anyway
[13:55:31] <MacGyverNL> But, seeing as how it's .NET anyway, it doesn't really matter if you use C# or VB .NET.
[13:55:39] <mapreduce> It's feature-equivalent to C#, except that C# has the 'unsafe' subset for low-level work. But having to write "List Of String" instead of List<String> is a bit silly.
[13:55:44] <cheeser> try ##dotnet, MacGyverNL
[13:56:08] <jottinger> coalado1: note that I'm using Java to program microcontrollers....
[13:56:22] <mapreduce> For reference, ##vb.net and ##csharp exist. Dunno about ##dotnet.
[13:56:39] *** durka42 has quit IRC
[13:56:51] <cheeser> mapreduce: i don't really care one way or another
[13:56:52] <cheeser> 8^)=
[13:57:12] <notk0> that reminds me of how silyl is that C# are payed more than Vb.net ones i read some while ago
[13:57:13] <mapreduce> MacGyverNL: Are you also logged in with the nick mac|guyver?
[13:57:18] <MacGyverNL> No.
[13:57:55] <MacGyverNL> cheeser: This started as an example of using VB .NET as a bad precursor to Java. This was as far off-topic as I was going to take that, so don't worry.
[13:58:03] *** LostMonarch has joined ##java
[13:58:31] <notk0> I have a question does anybody know the syntax of AWT and write their GUIS?
[13:58:45] <mapreduce> notk0: Swing, not AWT.
[13:58:47] <MacGyverNL> Is it still true that anything that Java logging API can do, Log4J can do, and more?
[13:58:53] <notk0> sorry
[13:58:55] <mapreduce> And it doesn't have syntax; it's a library.
[13:59:01] <jottinger> MacGyverNL: errrr
[13:59:09] <notk0> well you still need to learn all the fucntions and stuff
[13:59:09] <jottinger> log4j has some additional contexts, yes
[13:59:18] <jottinger> but log4j is pretty much shit
[13:59:29] <notk0> un;ess you use a GUI builder and dont have any idea about it
[13:59:44] <MacGyverNL> jottinger: You do understand that now that you've said that, I want more info/
[13:59:47] <mapreduce> notk0: I use it, and I expect lots of people here do, or have done.
[13:59:51] <mitch0> log4j is kinda broken now. they're rewriting the whole bunch afaik
[14:00:14] <mitch0> slf4j is the current hype I guess
[14:00:45] <mitch0> erm, I guess the acronym is something else
[14:00:57] <W_work> you still have to put five different logging jars into production on any system that use more than a few libraries
[14:00:58] <mapreduce> If you're indecisive, make an interface called Logger and have that injected.
[14:00:59] <jottinger> MacGyverNL: sure. But all the evidence you need is its author. :)
[14:01:06] <notk0> mapreduce: but you can use the netbeans gui builder or eclipses without having any knowlege of swing whatsoever
[14:01:08] <notk0> bascially..
[14:01:10] <mapreduce> Then you can change the backing in a flash.
[14:01:13] <whaley> mitch0: no, that is it
[14:01:22] <mapreduce> notk0: I don't prefer to have no knowledge.
[14:01:24] <jottinger> He was so impressed by his own work on log4j that he wrote commons-logging. And once he screwed that up, he went to slf4j.
[14:01:27] <mapreduce> I like learning
[14:01:37] <mapreduce> notk0: Also, when I began, those builders didn't exist.
[14:01:44] <notk0> but some knowledge is relatively useless
[14:01:50] *** riotz has joined ##java
[14:01:58] <jottinger> meanwhile, every modern JVM has java.util.logging, which has none of the dependency hell, and all you're missing is execution contexts - which few use in log4j anyway.
[14:02:09] <mitch0> jottinger: slf4j is wrote by the log4j ppl? I didn't know that
[14:02:13] <mapreduce> Knowledge about a library you use is useful at least as long as you use the library.
[14:02:27] <mitch0> s/wrote/written
[14:02:30] <jottinger> mitch0: as was commons-logging
[14:02:39] <mitch0> heh, strange
[14:02:42] *** rgravener has joined ##java
[14:02:54] *** mohax has joined ##java
[14:02:56] <MacGyverNL> jottinger: In other words, use JUL.
[14:03:04] <jottinger> no. Use what you like.
[14:03:10] <mitch0> I remember reading some pretty harsh words about commons-logging on the slf4j site :)
[14:03:12] <MacGyverNL> Well, I don't like either yet.
[14:03:14] <jottinger> I like JUL, because I don't like dependencies.
[14:03:28] <jottinger> mitch0: ceki gulcu is the driving force behind all three.
[14:03:36] <t0th_-> http://189.126.103.68:8280/dumondimoveis/index.jsp
[14:03:37] <W_work> I prefer not to dump strings into a flat file
[14:03:38] <jottinger> I think he's happy with slf4j because it's not configured the same way.
[14:03:48] <t0th_-> reverenciem-me
[14:04:22] <MacGyverNL> I'm wondering though, is there an easy way in JUL to identify the thread that sent the message? I've read about Log4j's substitution mechanism, but haven't come across a similar thing in JUL yet.
[14:04:23] <W_work> whether by log4j, java.util.logging, commons logging, or whatever, the concept is flawed
[14:04:29] *** Afterlawl has joined ##java
[14:04:36] <coalado1> jottinger: i read about this. I know that there are controllers that can be programmed using java.
[14:04:55] <coalado1> but i didn't know that there are people who uses this controller
[14:05:05] <mapreduce> Why program it if it isn't used?
[14:05:30] *** shadowrider has left ##java
[14:05:34] <coalado1> jottinger: does it work well? what's the advantage of using java on microcontrollers?
[14:05:38] <jottinger> coalado1: There are multiple controllers; what's more, most of the microcontroller manufacturers say not to use java for realtime. And they're largely right.
[14:05:55] <jottinger> coalado1: testing and integration becomes VERY easy.
[14:06:08] <jottinger> flexibility in the system if the system's modular.
[14:06:37] <coalado1> jottinger: can you advice controllers?
[14:06:42] <jottinger> the thing about java and realtime focuses on GC time and costs. GC time is something that can be manageable; you do, however, have to know Java. (That eliminates most of the people in ##java...)
[14:06:43] *** bindaas has joined ##java
[14:07:00] <mitch0> :)
[14:07:30] <jottinger> You can also find JVMs that have deterministic GC. That said, they tend to be *expensive* which means it's not appropriate for a lot of situations.
[14:08:14] <jottinger> coalado1: I've only used the javelin; it's okay, but J2ME. I prefer to use a PC as a controller with a hardware device hanging off of it being controlled.
[14:08:23] <jottinger> ^^ what we're doing and making work
[14:08:47] <notk0> did people know that some companies prefer to licence windows and pay less for network administrator than use linux for free (or cheaper lot cheaper) but pay lot more for network administrators
[14:08:51] <notk0> ?
[14:09:18] <jottinger> notk0: really? I wonder how microsoft stays in business!
[14:09:31] <notk0> i read it somewere sometime ago
[14:09:39] <MacGyverNL> Surely you jest!
[14:09:50] <mapreduce> notk0: Perhaps they'd need less administrators if they used an operating system that didn't need as much manual management.
[14:09:57] <MacGyverNL> jottinger: Since you use the Logging Api, can you direct me at a resource which would answer my last question?
[14:09:59] <jottinger> notk0: so... people are more expensive that hardware?
[14:10:11] <jottinger> MacGyverNL: I use a proxy in front of JUL
[14:10:11] <MacGyverNL> i.e., is there an easy way in JUL to identify the thread that sent the message? I've read about Log4j's substitution mechanism, but haven't come across a similar thing in JUL yet.
[14:10:15] <notk0> maybe
[14:10:23] <jottinger> I don't know that JUL has such an identification
[14:10:30] <MacGyverNL> Right, now I know what to google for.
[14:10:36] *** mapreduce has left ##java
[14:10:43] <jottinger> remember when I said that Log4J had contexts? That's what the thread identification stuff is.
[14:10:54] <W_work> how are log handlers called? If it's in the same thread as the logger.whatever() call, can't you just check the stack trace?
[14:11:07] <jottinger> MacGyverNL: I basically write a log proxy that does things like add varargs and an easier construction
[14:11:17] <jottinger> once you start using that, well... there you are!
[14:11:21] *** t3mp3st has quit IRC
[14:11:31] <jottinger> (I also write logs into a javaspace, but hey)
[14:12:18] *** NiSoOo has quit IRC
[14:12:30] <mitch0> these new methodologies are funny...
[14:12:40] <mitch0> "deploying mid-sprint with scrum "
[14:12:45] <MacGyverNL> Why do new things always have to carry lots of baggage... I'll compare some options, thanks.
[14:13:14] * mitch0 & (coffee)
[14:13:29] <waz> running javaspace on your robots? :)
[14:13:30] *** tmTim has joined ##java
[14:14:39] *** Afterlawl_ has quit IRC
[14:15:01] <jottinger> waz: no
[14:15:10] <jottinger> connecting to javaspaces *from* my robots :)
[14:17:49] <notk0> i must go
[14:17:49] <notk0> bye bye everybody
[14:17:51] <notk0> see you later aligators
[14:17:59] *** notk0 has left ##java
[14:18:13] *** shadewind has joined ##java
[14:18:22] *** bitshuffler has joined ##java
[14:19:55] *** Woflborg has joined ##java
[14:20:29] <waz> phew, had skynet fears there for a moment
[14:20:59] <jottinger> well, spaces are peers, so I *could*... and it'd be a good way to extend heap
[14:23:00] *** phyburn has joined ##java
[14:23:36] *** ScottG489 has quit IRC
[14:24:19] *** KU0N has quit IRC
[14:24:20] *** wans has quit IRC
[14:25:35] *** durka42 has joined ##java
[14:26:30] *** shadewind has quit IRC
[14:26:36] *** sombriks has joined ##java
[14:27:17] *** sgadolin has quit IRC
[14:27:29] *** t3mp3st has joined ##java
[14:29:14] *** durka42 has quit IRC
[14:29:36] *** gregor_k has joined ##java
[14:30:13] *** NiSoOo has joined ##java
[14:30:21] *** sphenxes has joined ##java
[14:31:54] *** shadewind has joined ##java
[14:32:19] *** gergap has joined ##java
[14:32:20] *** thecarlhall has joined ##java
[14:32:23] <gergap> hi
[14:32:54] *** thecarlhall has quit IRC
[14:33:11] *** dpy has quit IRC
[14:33:27] <gergap> does javac have any kind of release switch to make an optimized version that runs faster (like gcc -O2) ?
[14:33:36] <shadewind> no
[14:33:53] <shadewind> it optimizes it as much as possible by default
[14:34:01] <shadewind> the real optimization comes when it's run
[14:34:05] *** thecarlhall has joined ##java
[14:34:06] <shadewind> through JIT
[14:34:06] <reisi> does javac actually do any optimization?
[14:34:16] <waz> google hotspot
[14:34:17] <shadewind> reisi: of course it does
[14:34:20] <waz> ~google hotspot
[14:34:20] <thecarlhall> reisi: yep
[14:34:20] <javabot> http://letmegooglethatforyou.com/?q=hotspot
[14:34:37] <gergap> what effect has -g:none. Does this reduce only the size?
[14:34:57] *** t3mp3st has quit IRC
[14:35:00] *** StanAccy has joined ##java
[14:35:11] <cheeser> ~vm options
[14:35:11] <javabot> cheeser, jvm arguments is http://java.sun.com/docs/hotspot/VMOptions.html
[14:35:19] <shadewind> gergap: I believe so
[14:35:28] <gergap> thx
[14:36:33] <reisi> shadewind: thecarlhall: of course.. nowdays when someone says java + optimization i instantly think "method inline" but of course there are lot less modifying things like assigment filtering (SSA?)
[14:37:21] <shadewind> it probably does lots of things I don't need to care about :)
[14:38:35] *** TranceControl has joined ##java
[14:38:48] <reisi> shadewind: i've always been very interested in what kind of things for example gcc or g++ do, even though most of those, at least their safe implementation is way beyond my head and understanding
[14:39:54] <shadewind> yeah, it is quite interesting
[14:40:00] *** Riceri has joined ##java
[14:41:02] <Riceri> I am thinking on writing a server and client uses TLS and runs on both linux and windows. How hard is that in Java?
[14:41:27] <reisi> Riceri: i'd start with looking up how hard is Apache MINA + TLS
[14:41:42] *** Sonderblade has quit IRC
[14:42:08] <reisi> Riceri: they have an ftp + httpd implementations on MINA which could be nice reference..
[14:42:49] <Riceri> ok
[14:43:05] <cheeser> ~~ Riceri grizzly
[14:43:05] <javabot> Riceri, grizzly is a framework to build scalable and robust server applications using nio. Grizzly is used in GlassFish and SJSAS PE 8.1. For more information see https://grizzly.dev.java.net/ or see Jean-Francois Arcand's blog: http://weblogs.java.net/blog/jfarcand/archive/2005/06/grizzly_an_http.html
[14:43:07] *** harurenu has joined ##java
[14:43:07] *** javahorn has quit IRC
[14:43:50] *** javahorn has joined ##java
[14:43:52] *** Csow has joined ##java
[14:43:59] <Riceri> hmm so there is no support for TLS in java without "addons"?
[14:44:58] <Riceri> My goal is to build a simple but secure backup solution
[14:45:13] <reisi> Riceri: how about rsync + ssh?
[14:45:18] <cheeser> ~~ Riceri javadoc SSLENgine
[14:45:19] <javabot> Riceri: http://is.gd/iCa3 [javax.net.ssl.SSLEngine]
[14:45:24] <shadewind> Riceri: yes there is
[14:45:30] *** Carnage\ has quit IRC
[14:45:52] *** Carnage\ has joined ##java
[14:45:54] <waz> hrmm, not sure I'd use Java for that
[14:45:56] <Riceri> reisi: i can't store diffrent versions of the same file with rsync
[14:46:17] <reisi> Riceri: you can move the older as backup, can't you?
[14:46:24] <Riceri> i have been looking at C++ but it would be nice to have the same code on both linux and windows client/server
[14:46:31] <cheeser> man rsync can tell you, reisi
[14:46:56] *** ghostknife has quit IRC
[14:46:59] *** deepjoy has quit IRC
[14:47:02] *** ghostknife has joined ##java
[14:47:07] <Riceri> reisi: yea, but it is kinda limited i think
[14:47:19] <waz> Riceri: tons of competition out there right now in that market
[14:47:25] <reisi> cheeser: yes, i'm aware, but do not need it, just throwing a hint at Riceri
[14:47:28] <mitch0> riceri: you could have the same code on linux/windows in c++, too
[14:47:29] *** jottinger has quit IRC
[14:47:34] *** UT2K3 has joined ##java
[14:48:00] <Riceri> waz: i can't find one where the client can select what shall be backuped and so on
[14:48:14] <waz> haha
[14:48:28] <waz> I can't think of any that don't allow you to select what will be backed up
[14:48:43] <Riceri> waz: atm i run bacula but it have problems with cumputers who is behind a firewall
[14:48:48] <reisi> Riceri: i'd build a framework _on_ rsync and ssh.. that way you do not have to code all the encryption, diffrential file copying..
[14:49:04] <waz> of course most of my important data now lives on the cloud mirrored to my machines
[14:49:16] *** nvictor has joined ##java
[14:49:22] <cheeser> mozy.com++
[14:49:26] <Csow> hi there need help here http://pastebin.ca/1328984
[14:49:35] <Riceri> reisi: ok, what i aim for to is not to code the TLS part of it
[14:49:46] <cheeser> Csow: use a pastebin that doesn't suck, please.
[14:49:58] <Csow> which one is better
[14:50:04] <cheeser> pastebin.ca is horribly slow for everyone not in that guy's mom's basement.
[14:50:06] <cheeser> ~pastebin
[14:50:06] <javabot> http://rifers.org/paste Paste the final url after you've pasted your stuff there.
[14:50:15] <cheeser> that link *still* hasn't loaded.
[14:50:27] *** sgadolin has joined ##java
[14:50:41] <reisi> Csow: smells like homework :D
[14:50:46] <Riceri> i shall read those links i have got, thanks for the help
[14:51:08] <Csow> yes it is
[14:51:25] <cheeser> ~~ Csow npe
[14:51:25] <javabot> NullPointerExceptions are easy to spot and deal with. For some tips on dealing with them, please see http://is.gd/ha7A
[14:51:40] <waz> pastie.org
[14:53:21] *** nvictor has left ##java
[14:54:13] <Csow> http://rifers.org/paste/show/8744
[14:55:08] *** ramdam has joined ##java
[14:55:12] *** W_work has quit IRC
[14:55:29] <ldamwork> Csow, which is line 63?
[14:55:31] *** jottinger has joined ##java
[14:55:39] <mitch0> csow: your reserved array is full of nulls
[14:56:01] *** W_work has joined ##java
[14:56:05] <mitch0> so you're doing an "if (null.equals("" + r) ... "
[14:56:10] <sgadolin> hey, what would be the way to compare different classes derived from Number, like Integer with Double, method compareTo compares same instances.
[14:56:23] <Csow> actually should be line 54
[14:56:46] *** Riceri has quit IRC
[14:56:57] <sgadolin> same classes, integer with integer ...
[14:57:08] <ldamwork> Csow, line 54 is a comment line
[14:57:43] *** acuster is now known as avc_wrok
[14:57:43] <Csow> let me paste again
[14:57:46] *** avc_wrok is now known as avc_work
[14:58:20] <mitch0> csow: your implementation has serious issues, and the NPE is the least of them...
[14:58:48] <Csow> it should be line 69
[14:59:13] <W_work> sgadolin, convert to a common format (eg floatValue() ) then compare
[14:59:24] *** ghostknife has quit IRC
[14:59:49] *** ghostknife has joined ##java
[14:59:56] <jottinger> convert to strings!
[15:00:27] *** vesz has quit IRC
[15:00:36] <mitch0> jottinger: you should get home :)
[15:00:37] <sgadolin> W_work: yes, i do that, but it is pretty harmful, is there any better solution, i need to make a number of instanceof's
[15:01:05] <sgadolin> in case of using common formats
[15:01:07] <W_work> what?
[15:01:09] *** _stack has joined ##java
[15:01:12] <ldamwork> convert to atheism!
[15:01:22] <jottinger> mitch0: I just got to work!
[15:01:32] <W_work> sgadolin, A) how is it harmful? B) What do you mean "harmful"? C) Why do you think you need to use instanceof?
[15:01:34] *** delskorch has quit IRC
[15:02:16] *** NiSoOo has quit IRC
[15:03:08] <mitch0> jottinger: then consider a few days off :)
[15:03:17] *** igordcard has joined ##java
[15:03:32] *** stipet has joined ##java
[15:03:53] <Csow> guys any hint to what i need change the problem is line 69
[15:04:02] <W_work> sgadolin: int compareAsDouble(final Number a, final Number b){return Double.compare(a.doubleValue(),b.doubleValue());}
[15:04:03] <sgadolin> my arguments are Number a1, Number a2. Befor I do a conversation I need to check what is the type of each, and return result
[15:04:08] <jottinger> mitch0: wish I could. Actually, string representation works for generic number comparison. :)
[15:04:27] *** stipet has left ##java
[15:04:28] <cheeser> Csow: you've been given several hints on how to fix NPEs
[15:04:29] <sgadolin> W_work: they can also be Long
[15:04:29] <jottinger> you just want to make sure they're formatted properly.
[15:04:32] <W_work> sgadolin, is that a requirement imposed on you, or do you just not see how you can do the comparison without checking types?
[15:04:38] <ldamwork> Csow, reserver[row] is null. Note java do not have 2d arrays, but arrays of arrays
[15:04:42] <jottinger> you can also convert to BigDecimals and use them.
[15:04:46] <W_work> so? Long is a subclass of Number
[15:04:56] *** ghostknife has quit IRC
[15:05:04] <ldamwork> ~~ Csow npe
[15:05:05] <javabot> NullPointerExceptions are easy to spot and deal with. For some tips on dealing with them, please see http://is.gd/ha7A
[15:05:09] *** ghostknife has joined ##java
[15:05:18] <mitch0> jottinger: yeah, 1 vs 1.0? :)
[15:05:36] *** ayrnieu has joined ##java
[15:05:46] *** indeterminatus has quit IRC
[15:05:53] <jottinger> mitch0: sure. Like I said, you'd want to format them properly.
[15:06:08] <jottinger> But another solution is to use BigDecimal as the common format.
[15:06:30] <mitch0> csow: as a quick fix, remove line 60
[15:07:03] <mitch0> csow: as a better fix, delete the whole thing and start at the whiteboard...
[15:07:19] *** Gracenotes_sleep has joined ##java
[15:07:35] <jottinger> mitch0: you'd also want to format before the decimal, too: 100 would show up as being "less than" 20, lexically speaking. So you'd need to pad 20 to "020"
[15:07:57] *** blahjake has joined ##java
[15:08:21] *** deebo has quit IRC
[15:08:27] *** deebo has joined ##java
[15:08:45] *** Gracenotes_sleep is now known as Gracenotes
[15:09:53] <ojacobson> cheeser: morning to you too
[15:09:57] <cheeser> 8^)=
[15:10:04] <ojacobson> sorry about the log marker
[15:10:09] <cheeser> ojacobson: did you file an isse with that?
[15:10:11] <ojacobson> I mistook my own fail for javabot fail
[15:10:11] <cheeser> issue
[15:10:13] <ojacobson> no
[15:10:14] <ojacobson> it's not a bug
[15:10:17] <cheeser> no?
[15:10:20] <ojacobson> I asked about String.format, not String.format(*)
[15:10:24] <ojacobson> The former has never worked
[15:10:26] <cheeser> all i saw was that one line
[15:10:35] <cheeser> ~javadoc String.format,
[15:10:35] <javabot> I don't know of any documentation for String.format,
[15:10:39] <cheeser> ~javadoc String.format
[15:10:39] <javabot> I don't know of any documentation for String.format
[15:10:43] <ojacobson> When I ~~ cheeser'd I did it right
[15:10:55] *** NielsD has quit IRC
[15:10:57] <cheeser> i'm missing something I guess.
[15:11:05] <cheeser> all i saw was that one line.
[15:11:17] <ojacobson> RIght before I poked you, I tried to javadoc someone else who was complaining that sprintf wasn't in the stdlib
[15:11:25] *** MigoMipo has joined ##java
[15:11:29] <ojacobson> only, forgot the (*) and got the "doesn't exist" response
[15:11:35] <ojacobson> *I forgot
[15:12:16] *** mattorantimatt has joined ##java
[15:12:29] <cheeser> this is wrong, though: java.lang.String.format(Locale,String,)
[15:12:35] <cheeser> ~javadoc String.format(*)
[15:12:35] <javabot> cheeser: http://is.gd/iA0W [java.lang.String.format(Locale,String,)]; http://is.gd/iA0X [java.lang.String.format(String,)]
[15:12:40] <cheeser> not the trailing ,
[15:12:43] <cheeser> *note*
[15:12:45] <ojacobson> oh, huh
[15:12:56] <ojacobson> It doesn't handle ...s all that well, I take it :)
[15:12:57] <cheeser> not a biggie but still annoying
[15:13:13] <cheeser> i'll have to look into that.
[15:13:13] *** botAnna has joined ##java
[15:14:15] <botAnna> hi, how I can to save to disk a file from File f; object? I google it but No I can do it
[15:14:18] *** DjZemich has joined ##java
[15:14:25] <cheeser> ~~ botAnna io
[15:14:26] <javabot> botAnna, io is http://java.sun.com/tutorial/essential/io
[15:14:30] *** unstable has left ##java
[15:14:36] *** deebo has quit IRC
[15:14:41] *** deebo has joined ##java
[15:15:32] <ojacobson> surreal diction is surreal
[15:15:50] *** jdolan_ has joined ##java
[15:16:38] *** fulat2k has joined ##java
[15:16:42] *** hoerup has quit IRC
[15:16:43] *** scottyL has quit IRC
[15:17:24] *** Vantaa has joined ##java
[15:18:01] <botAnna> thank you
[15:19:26] *** riotz has quit IRC
[15:20:54] <fulat2k> hi folks, i'm using displaytag's external paging via the PaginatedList interface. is it possible to get displaytag to search/filter records using the same method?
[15:23:57] *** push[EAX] has joined ##java
[15:24:50] *** botAnna has quit IRC
[15:25:17] *** lesshaste has quit IRC
[15:26:44] *** durka42 has joined ##java
[15:27:08] *** javahorn has quit IRC
[15:27:35] *** NiSoOo has joined ##java
[15:27:53] *** mitch0 has quit IRC
[15:31:09] *** alek_b has joined ##java
[15:31:58] *** javahorn has joined ##java
[15:34:08] *** Zemich has joined ##java
[15:34:59] *** alek_b has quit IRC
[15:35:46] *** sphenxes has quit IRC
[15:37:00] *** mitch0 has joined ##java
[15:39:00] *** deepjoy has joined ##java
[15:41:58] *** LordMetroid has joined ##Java
[15:41:59] *** Csow has quit IRC
[15:44:15] *** mitch0 has quit IRC
[15:47:25] *** alcane has quit IRC
[15:49:36] *** ldamwork has quit IRC
[15:50:20] *** fulat2k has left ##java
[15:51:04] *** DjZemich has quit IRC
[15:51:34] *** sgadolin has quit IRC
[15:54:08] *** teralaser has quit IRC
[15:54:34] *** push[EAX] has quit IRC
[15:54:48] *** monkeycid has joined ##java
[15:56:21] *** TheCastor has quit IRC
[15:56:25] *** jamil_1 has joined ##java
[15:57:31] *** eidolon has joined ##java
[15:58:10] *** Resistance has quit IRC
[15:58:52] *** sombriks has quit IRC
[16:02:17] *** avc_work is now known as acuster
[16:02:34] *** wokawaka has joined ##java
[16:03:28] *** [TechGuy] has joined ##java
[16:03:33] <wokawaka> hey, on most music players you have some sort of bar chart which portrays the music being played, the bars move up and down at the pace of the music.. what is this called and how do you extract this data from a .mp3 in java? thanks =)
[16:03:41] *** Meddi has joined ##java
[16:04:19] *** Razec has joined ##java
[16:05:03] <Meddi> Hi there. I've got a panel with a GridBagLayout. I add another panel to it but instead of being displayed at row 0 column 0, it is displayed in the middle of the JPanel. How can I make it appear at the upper left position ?
[16:07:20] *** rosh_ has joined ##java
[16:07:49] <goki-_-> Here's a probably very obvious generics question - can you specify a Comparator that will compare any type that is Comparable to itself?
[16:09:57] <coalado1> why not?
[16:10:10] <goki-_-> Well, what would it look like I mean?
[16:10:47] <goki-_-> Actually I may not have phrased it well - what I mean is, you can have "public class NaturalComparator<T extends Comparable<? super T>> implements Comparator<T>"
[16:11:23] *** navetz has quit IRC
[16:11:30] <coalado1> http://jdownloader.org/pastebin/41ab1b1d6bf108f388dfb5cd282fb76c like this?
[16:11:31] <goki-_-> But can you get rid of the T somehow, so you can have a single instance of NaturalComparator that will compare anything type X where X extends Comparable<? super X>
[16:11:53] <goki-_-> That uses raw Comparable though
[16:12:08] <coalado1> and? erhaps I don't understand your problem
[16:12:15] <dmlloyd> public class NaturalComparator<T> implements Comparator<T>
[16:12:20] *** sircco has joined ##java
[16:12:53] <goki-_-> dmlloyd: Yup, but then NC will be asked to compare things that don't implement Comparable at all
[16:13:21] <goki-_-> coalado1: No I think you understood, but I don't want to use raw types like Comparable - it gives warnings
[16:13:36] <coalado1> ah ok
[16:13:39] *** indeterminatus has joined ##java
[16:13:48] *** ldamwork has joined ##java
[16:14:20] <dmlloyd> I think you'll have to use a type parameter or else the compare method won't have the right parameter type
[16:14:32] <goki-_-> yup
[16:14:51] <goki-_-> I think wildcards aren't quite enough
[16:15:10] <dmlloyd> now if they had done it like: interface Comparator<T> { <S extends T> int compare(S left, S right); } or something like that... :)
[16:15:35] <goki-_-> Yes that would have been perfect
[16:15:48] <goki-_-> but since they didn't, you can't wildcard it in now :(
[16:16:09] <goki-_-> Just wanted to check.
[16:16:27] *** sircco has quit IRC
[16:16:35] <dmlloyd> another option would be to have a static method to construct it: <T extends Comparable<? super T>> Comparator<T> construct() { return new NaturalComparator<T>(); }
[16:16:39] *** Razec has quit IRC
[16:16:44] <dmlloyd> that might solve... whatever it is you're trying to solve :)
[16:17:03] <dmlloyd> also, see:
[16:17:04] *** teralaser has joined ##java
[16:17:45] <dmlloyd> ~~ goki-_- javadoc Collections.reverseOrder()
[16:17:46] <javabot> goki-_-: http://is.gd/iCVB [java.util.Collections.reverseOrder()]
[16:17:47] <cheeser> ojacobson: ohhhhh. i know what the problem is with that trailing ',' it's how the stripped down signature is being generated.
[16:17:56] <dmlloyd> that is an example of interacting with natural order
[16:18:08] <goki-_-> dmlloyd: Yup that works, I was just trying to avoid making a new comparator for every type :)
[16:18:44] *** durka42 has quit IRC
[16:19:13] <goki-_-> dmlloyd: Yup that is what I'm doing, except going forwards ;) But the idea of having a static factory method is good, since it lets Java do the type for you
[16:19:53] <goki-_-> I'll have to copy that ;) It feels a bit weird making a comparator that just uses natural order, but it means I can write over stuff that always takes a Comparator, rather than having two forms, one for natural order and one for a comparators
[16:19:56] <dmlloyd> goki-_-: yeah, then you can use a singleton instance of a raw Comparator
[16:20:14] <dmlloyd> yeah, I agree that's a superior way to do it
[16:20:32] <goki-_-> over=other, oops :)
[16:20:53] <goki-_-> Cool, well I can get back to that now, I was worried I must be missing something :)
[16:21:46] *** ramdam has quit IRC
[16:23:21] *** _delirium has joined ##java
[16:23:32] <_delirium> with Callable is there a way to set the thread name?
[16:23:49] *** shadewind has quit IRC
[16:25:31] <cheeser> set the ThreadFactory on your ExecutorService
[16:28:10] *** gergap has quit IRC
[16:28:37] <dmlloyd> you mean you want to just set the thread name for the duration of your task?
[16:29:27] <goki-_-> It's odd, I hadn't really thought before that if you have a stateless object, you can cast it to any parametric type safely. That's hideous.
[16:29:41] <goki-_-> I need to go back and do that to some other classes.
[16:29:59] *** waz has quit IRC
[16:30:08] *** wans has joined ##java
[16:30:17] *** SwanR has quit IRC
[16:30:19] <dmlloyd> :)
[16:30:41] *** mitch0 has joined ##java
[16:31:40] *** fez has quit IRC
[16:31:49] <_delirium> also how do I retun Void from a call() for Callable<Void> ?
[16:34:02] *** orgy` has joined ##java
[16:34:04] *** Quibus has joined ##java
[16:34:08] <Quibus> hi all
[16:34:57] <Quibus> Can someone tell me how I prevent a JComboBox from firing an ActionEvent when I set the selected item programmatically (using setSelectedItem)? I'd like it to fire only when the user changes the selection, not when I'm setting it up to have the proper initial selection.
[16:35:04] *** deSilva has quit IRC
[16:36:01] <Stephmw> Quibus: remove the listener, set selected, readd listener?
[16:36:13] *** M[]ssad has joined ##java
[16:36:24] <Stephmw> s/listener/action/ as needed
[16:37:41] <Quibus> stephmw... .that would work, but it's not what would be comfortable
[16:38:34] <Quibus> I'm reusing a set of controls for different items. So, when the item changes, I need to set the controls to the values for that item, after which the user can manipulate them
[16:39:47] *** elmomalmo has quit IRC
[16:40:02] *** Csow has joined ##java
[16:40:08] <Quibus> I don't think I'd want to remove the listeners for all controls, set the proper selections and add them again when the user changes the item selection
[16:41:24] *** ayrnieu has quit IRC
[16:41:36] *** ayrnieu has joined ##java
[16:42:49] *** bindaas has quit IRC
[16:46:37] *** quarsaw has joined ##java
[16:47:00] *** ramdam has joined ##java
[16:47:31] *** phix has quit IRC
[16:47:36] *** vesz has joined ##java
[16:47:40] <Meddi> Guys suppose I add an item to a panel with GridBagLayout, ie, a JLabel. The item is added ok, but it's aligned at the center of the chosen gridx/gridy. Is there a way to align it at the left/right of the specified position ??
[16:49:12] <quarsaw> I do that the long way, by creating a subpanel and putting the label in the subpanel
[16:49:27] <quarsaw> and then maybe yousing borderlayout.west
[16:49:32] <quarsaw> for the subpanel
[16:49:44] <quarsaw> but there must be a better way
[16:49:48] <Meddi> I created a subpanel but the subpanel needs to be gridbaglayout too :\
[16:49:54] <quarsaw> ah
[16:50:11] <Meddi> i am trying to see if there is anything in the GridBagConstraints class but nothing :(
[16:50:11] *** Hates_ has quit IRC
[16:50:12] <quarsaw> well maybe pus somethign with some blank space located on the same gridy
[16:50:22] <quarsaw> but to the left or right of it
[16:50:36] <quarsaw> like a label with spaces " "
[16:50:54] <quarsaw> and you can add an anchor attribute
[16:51:06] <quarsaw> maybe that alone will work
[16:52:14] <quarsaw> http://java.sun.com/docs/books/tutorial/uiswing/layout/gridbag.html
[16:52:20] <quarsaw> check out the anchor section
[16:52:54] *** nijm has joined ##java
[16:53:13] <Meddi> ok let me try thanks
[16:53:15] *** Cheshire has joined ##java
[16:53:18] <Cheshire> hi
[16:53:21] <selckin> ~miglayout
[16:53:21] <javabot> selckin, miglayout is "The Java Layout Manager". See http://www.miglayout.com/
[16:53:25] <selckin> beats all
[16:53:42] <Cheshire> you see this stuff http://java.sun.com/javase/6/docs/index.html , tools & tool APIs like javac, javap etc
[16:53:44] *** deepjoy has left ##java
[16:53:56] <Cheshire> where do you get the implementations of them?
[16:55:10] <Quibus> see you later
[16:55:13] *** Quibus has left ##java
[16:56:22] *** Angel-SL has quit IRC
[16:56:33] *** provolone has quit IRC
[16:57:48] <Cheshire> is java closed source?
[16:58:14] <cheeser> no
[16:58:16] <cheeser> ~openjdk
[16:58:16] <javabot> cheeser, openjdk is http://openjdk.dev.java.net and #openjdk on irc.oftc.net
[16:58:23] *** Varox has quit IRC
[16:58:30] <cheeser> released under the GPL a couple of years ago
[16:58:39] <Cheshire> thanks cheeser
[16:59:55] <nijm> I'm having trouble getting a DOM object from a DocumentBuilder. It DOM it returns from parser.getDocumentElement() is null even though the file is there. The docs don't say why it would return null. Any ideas?
[17:00:04] <nijm> *The DOM
[17:00:08] <cheeser> ~show us
[17:00:08] <javabot> Paste the code (and any errors) in the pastebin where we can see it. See ~pastebin for options. Also see ~testcase for good examples as to how to help us help you quickly diagnose and solve problems.
[17:00:15] *** wokawaka has quit IRC
[17:01:22] *** xabbuh has quit IRC
[17:01:24] *** Woflborg has quit IRC
[17:01:26] *** shervin_a has quit IRC
[17:01:33] <nijm> regarding the null DOM: http://pastebin.com/decb8e11
[17:01:33] *** giupo has quit IRC
[17:01:59] <cheeser> and doc is null?
[17:02:02] <cheeser> what's parser?
[17:02:17] <wans> ~hi
[17:02:17] <javabot> http://i38.tinypic.com/25aopzn.jpg
[17:03:00] *** gdoko has quit IRC
[17:03:05] *** Afterlawl has quit IRC
[17:03:07] <nijm> cheeser: Actually, no... I've got that wrong
[17:03:12] <nijm> cheeser: hold on a sec
[17:04:18] <Teckla> Any suggestions on FTP client solutions for Java?
[17:05:02] <cheeser> ~google java ftp
[17:05:03] <javabot> http://letmegooglethatforyou.com/?q=java+ftp
[17:05:11] *** Yustme has joined ##java
[17:05:38] <nijm> cheeser: http://pastebin.com/d345c7627 is the code... http://pastebin.com/d476991cf is the xml file
[17:05:56] <cheeser> and the problem line?
[17:06:03] <cheeser> 8?
[17:06:13] <nijm> cheeser: 20
[17:06:42] <Teckla> cheeser: I Googled it first, of course. However, I trust the judgment and experience of the people here more than I trust old articles on the subject found on the web.
[17:06:52] <nijm> cheeser: sorry, it doesn't create a null DOM, but the call to get one of the nodes returns a null pointer exception
[17:06:57] *** dmead has joined ##java
[17:07:02] <dmead> hey channel
[17:07:04] *** jbwiv has joined ##java
[17:07:09] <dmead> is there a jvm for arm?
[17:07:13] *** mitch0 has quit IRC
[17:07:23] <cheeser> nijm: <Alarm> doesn't have siblings. it has children.
[17:08:10] <nijm> cheeser: I get the sibling of name, which is message (a child of alarm)
[17:08:13] <cheeser> <name> rather.
[17:08:22] <cheeser> hrm.
[17:08:47] <cheeser> hook up a debugger. make sure it's what you think it is.
[17:09:12] <cheeser> ~javadoc Node
[17:09:14] <javabot> cheeser: http://is.gd/iDjD [javax.xml.soap.Node]; http://is.gd/iDjE [org.w3c.dom.Node]; http://is.gd/iDjF [javax.xml.soap.Node]
[17:09:37] *** MacFlecknoe_ has joined ##java
[17:09:40] <nijm> cheeser: The reason I got confused and said that root was null, was because debugger says that root.docElement is null
[17:10:00] <nijm> thats the eclipse debugger
[17:10:07] *** _stack has quit IRC
[17:11:35] <Teckla> Hmmm...the Java library has some rudimentary FTP support built-in...interesting...
[17:11:51] <nijm> cheeser: the file is definitely there, I used to same class to save to xml file
[17:12:04] *** TheCastor has joined ##java
[17:12:50] <cheeser> a missing file is not the problem at this point
[17:13:10] <Teckla> sun.net.ftp...hmmm...
[17:13:11] *** sombriks has joined ##java
[17:13:13] <nDuff> dmead, for varying values of "JVM", sure. Are you looking for something for embedded work, or a larger/J2SE environment?
[17:13:54] *** Carnage\ has quit IRC
[17:13:56] *** jahid has quit IRC
[17:13:58] <Teckla> Ah ha! This supports FTP: http://commons.apache.org/net/
[17:14:16] <Teckla> Awesome.
[17:14:28] * Teckla <3 Apache.
[17:14:33] <dmead> nDuff, i'm looking for a jvm where i can write swing and serials drivers
[17:14:39] <dmead> and that supports arm-9
[17:14:48] *** zophy has quit IRC
[17:14:57] *** speciesUnknown has joined ##java
[17:15:08] *** zophy has joined ##java
[17:15:08] <speciesUnknown> hi guys
[17:15:29] <speciesUnknown> i just want to draw a colored circle on my JPanel. whats the easiest way of doing this?
[17:15:35] <speciesUnknown> using standard java libs.
[17:15:52] <Teckla> speciesUnknown: Override paintComponent() and draw it there.
[17:16:49] *** trustin has quit IRC
[17:18:01] <Teckla> But don't forget to call super.paintComponent(); first. :)
[17:18:20] *** bas-i has quit IRC
[17:18:35] <AMcBain> Teckla: that's not a requirement, but it generally makes everything work better (as intended) if you do :)
[17:19:25] *** kab has joined ##java
[17:20:29] *** TranceControl has quit IRC
[17:21:42] *** pschriner has quit IRC
[17:21:52] *** illbeatu has joined ##java
[17:22:20] *** acuster has quit IRC
[17:22:38] <nDuff> dmead, openjdk is supported on Debian's armel target (ARMv4t+)
[17:23:27] <nDuff> dmead, ...little-endian, as the name implies.
[17:24:08] *** Cheshire has left ##java
[17:25:53] *** rlubke has joined ##java
[17:26:17] *** J0bk has joined ##java
[17:28:26] *** w0lfshad3 has joined ##java
[17:29:24] *** igordcard has quit IRC
[17:29:34] <w0lfshad3> anyone knows a good distribution of Eclipse for Java developers bundled with best functionality plug-ins for download?
[17:30:01] <cheeser> ~igb
[17:30:02] <javabot> Is google broken?
[17:30:50] *** sphenxes has joined ##java
[17:30:53] <w0lfshad3> i googled, there's only easyeclipse distributions, and plain eclipse, they are light
[17:31:06] *** Varox has joined ##java
[17:31:55] <reisi> w0lfshad3: can't you just download like jee distribution, then download plugins you need, package it for yourself, if you really need a package
[17:33:07] *** zophy has quit IRC
[17:33:10] <w0lfshad3> well, i am looking for a recomandation of a good package, i just stumbled into member distros
[17:33:13] <coalado1> there are no "best plugins"
[17:33:24] *** Orbixx has joined ##java
[17:33:26] <coalado1> Subclipse, for example is very good...
[17:33:32] <coalado1> but useless of you do not use SVN
[17:34:10] <Orbixx> Can anybody explain why "double i = 1.1 + 0.3; System.out.print(i);" outputs 1.4000000000000001?
[17:34:11] <w0lfshad3> ussually there's a vanilla setup which fixes lacks of features, then there's a strawberry shake which adds everything that's not out of line, then there's an tropical cocktail which bundles everything
[17:34:18] <w0lfshad3> i'm looking for the "strawberry" package
[17:34:51] *** Csow has quit IRC
[17:34:59] <w0lfshad3> coalado1, thanks, i'll look it up
[17:35:00] *** Stef1 has joined ##java
[17:35:12] <coalado1> ....
[17:35:17] <coalado1> subclipse is just a plugin
[17:35:18] <reisi> w0lfshad3: wouldn't it just be total waste of bandwidth if eclipse foundation offered some all-in-all package that weighted even more than the "vanillas" (~170MB)
[17:35:44] <reisi> w0lfshad3: i recommend you stop wasting your time finding your strawberry and build it yourself
[17:36:10] <coalado1> ^^ that's it..
[17:36:17] <coalado1> learn to cook ;-P
[17:37:15] *** MigoMipo has quit IRC
[17:37:19] <w0lfshad3> probably, i noticed my cooking is almost the best meal i ever had
[17:37:35] <Stef1> Hi, I read somewhere that resources are cached automatically by the class loader, so I don't need to cache? for example loading of sound as java does it already for me?
[17:37:35] <w0lfshad3> sure takes time to prepare it though
[17:37:55] <reisi> w0lfshad3: all-in-all packages would have the obvious downside of being always outdated, as different plugings get bugfixes totally out of sync with eclipse releases
[17:39:03] *** cambazz has left ##java
[17:39:34] <Stef1> i'm talking about the class loader
[17:39:38] <w0lfshad3> well then it would be nice to have a distro packed with an updater that checks for newer versions
[17:39:46] <w0lfshad3> well so far my experience has been that EasyEclipse Server Distribution is best ATM for me
[17:40:11] *** Nexus6 has quit IRC
[17:40:28] *** ofl_ has joined ##java
[17:40:53] *** yclian has joined ##java
[17:41:06] <illbeatu> eclipse is kind of gay.
[17:41:30] *** KermitTheFragger has quit IRC
[17:42:16] <MacFlecknoe_> illbeatu: code using vi for a while and see how gay it seems
[17:42:58] <Gracenotes> illbeatu: no u
[17:43:18] * pr3d4t0r eyes Gracenotes.
[17:43:28] <whaley> ~~ illbeatu evil
[17:43:29] <javabot> only morons use the word "evil" to refer programming practices, IDEs, etc.
[17:43:33] <whaley> s/evil/gay
[17:43:46] <M[]ssad> ~gay
[17:43:46] <javabot> I have no idea what gay is, but it sounds off-topic.
[17:43:47] *** bas-i has joined ##java
[17:43:50] <M[]ssad> :D
[17:43:56] <pr3d4t0r> ~tell M[]ssad about Kim.
[17:43:56] <javabot> M[]ssad, is this for you? http://www.youtube.com/user/kimmilinlein
[17:44:15] <M[]ssad> heh...no i won't see that
[17:44:55] *** adi112358 has joined ##java
[17:45:18] <dvayanu> anyone an idea on this compile error?
[17:45:19] <dvayanu> http://rifers.org/paste/show/8745
[17:46:08] *** Zemich has quit IRC
[17:46:08] <dvayanu> type parameters of <T,F>T cannot be determined; no unique maximal instance exists for type variable T with upper bounds T,net.anotheria.asg.service.ASGService
[17:46:40] *** FMJaguar has joined ##java
[17:47:07] <dmlloyd> this is a mess :)
[17:47:15] <nijm> What's the kimmilinlein jazz about? She said she used to be a guy, is (s)he joking?
[17:47:37] *** CarstenP2 has left ##java
[17:47:39] <dmlloyd> what?
[17:48:08] <dmlloyd> dvayanu: the line numbers don't line up. But the fact that you're using @SuppressWarnings("unchecked") on such a big method is a huge red flag
[17:48:39] <dmlloyd> dvayanu: the line "T instance = (T) instances.get(name);" should be: "T instance = pattern.cast(instances.getName());"
[17:48:40] <dvayanu> just to remove warning :-) i'll update without @supress
[17:48:55] <dmlloyd> dvayanu: when you update, put the error message on the bottom so that the line #s match up
[17:48:58] <tmTim> I'm new to Java and am having an issue. I am trying to understand some client/server applications which are built seperately as far as I can tell and the server portion has no "main" method. How is this? I don't know enough about the Java system to see where it's main method is called from. This server is a darkstar server app so I am guessing it's because it uses some other code I can't see
[17:49:06] <tmTim> <-- big time noob here
[17:49:09] *** topriddy has joined ##java
[17:49:33] <dvayanu> http://rifers.org/paste/show/8746
[17:49:35] <tmTim> maybe there are different rules when it comes to building server apps
[17:49:38] <topriddy> Hello all, trying to do public key encryption in java. where di i start
[17:49:44] <dvayanu> dmlloyd: and it compiles in eclipse but not in ant
[17:50:34] <dmlloyd> tmTim: usually a java server app runs in what's called a "container" which is a java program that runs other programs in special ways
[17:50:56] *** illbeatu has quit IRC
[17:50:57] <tmTim> ok so if I read up on "containers" I may understand this more
[17:51:22] <dvayanu> ok, pattern.cast removes some of the exceptions :-)
[17:51:33] <dmlloyd> dvayanu: a couple problems
[17:51:35] <reverend> tmTim: why not just ask the people that wrote the code for support
[17:51:54] <tmTim> I just don't want to bother them just yet :)
[17:52:10] <tmTim> I think i'll figure it out from here now that I know what to look for, I appreciate it
[17:52:11] <whaley> tmTim: a java application server would have been started in such a manner (this is the container that dmlloyd just mentioned) ... java webapps (like the one you are looking at) just need to be built using the servlet specification
[17:52:13] <dmlloyd> dvayanu: when you call a method that has type parameters, you have to tell it what the type for each parameter is. Though in this case I don't see why you even have "F"
[17:52:15] *** J0bk has quit IRC
[17:52:21] <reverend> why? you pay them to help you
[17:52:25] <whaley> ~~ tmTim servlets
[17:52:25] <javabot> servlets are a mechanism for programmatically building HTTP handlers in Java. See http://java.sun.com/products/servlet/ for more info, including API specs and other documentation.
[17:52:44] <dmlloyd> dvayanu: you should probably drop the "F" parameter and just use "ServiceFactory<T>" instead
[17:52:56] <tmTim> yeah I have to run the server and then this jar will be in the delpoyment folder
[17:53:01] <tmTim> so it is a servlet I guess
[17:53:09] <reverend> doubtful if it's a jar
[17:53:13] *** coalado1 has left ##java
[17:53:20] <dvayanu> dmlloyd: hmm, maybe, can try :-)
[17:53:23] <tmTim> I'm just trying to understand java from the big picture point of view
[17:53:34] <speciesUnknown> im trying to find the class that you draw 2d shapes into. i used it before ages ago, but i cant seem to find it. the java docs are no help.
[17:53:42] <tmTim> the examples is a jar with some classes in it that goes ini deployment folder
[17:53:43] <speciesUnknown> there is a component that you use to draw 2d stuff...
[17:53:47] <tmTim> which I am trying to replicate
[17:53:49] <Stef1> Graphics
[17:54:21] <speciesUnknown> its abstract.
[17:54:29] *** jchauncey has joined ##java
[17:54:34] <dmlloyd> does anyone know of a case where the compiler would magically insert calls to "StringBuilder.append()"? I can't account for this weird stack trace
[17:54:35] <Stef1> and Graphics2D for advanced painting, you get Graphics from overwriting paintcomponent in a swing object
[17:54:44] <speciesUnknown> graphics2d is also abstract.
[17:54:56] <speciesUnknown> wait, in java that means its an interface, right?
[17:55:13] <whaley> tmTim: typically webapps get distributed in a package ending in .war, not .jar (although a .war is just a .jar with a specific layout)
[17:55:25] <whaley> tmTim: so I'm not sure what your .jar might actually be
[17:55:50] <Stef1> speciesUnknown: yes abstract classes can be seen as interfaces
[17:56:03] <speciesUnknown> sorry, ive come from the cold and windy world of c++
[17:56:04] <tmTim> whaley: it's just the examples for darkstar, I am trying add some network ability to a little pong game if figured i'd try to learn that . I can't get my head around it yet
[17:56:05] *** cyth has joined ##java
[17:56:18] <cheeser> no. abstract classes are not interfaces.
[17:56:22] <tmTim> whaley: it's a very simple application for darkstar server that lets a client connect
[17:56:35] <Stef1> there is the java keyword interface
[17:56:40] <cheeser> and can be "seen as interfaces" as much as any class can
[17:56:57] <speciesUnknown> thats confusing. what kind of class is Graphics2D?
[17:56:59] <speciesUnknown> and how do i use it
[17:57:05] *** _delirium has left ##java
[17:57:12] <cheeser> ~javadoc Graphics2D
[17:57:12] <javabot> cheeser: http://is.gd/iDGI [java.awt.Graphics2D]
[17:57:12] <dvayanu> dmlloyd: you mean removing all declarations of F
[17:57:15] <Drone> See dmlloyd's post at http://rifers.org/paste/show/8747
[17:57:17] <topriddy> javabot: Tell me about encryption
[17:57:18] <javabot> topriddy, I have no idea what Tell me about encryption is.
[17:57:28] <topriddy> ~~encryption
[17:57:28] <javabot> The syntax is: tell nick about factoid - you missed out the 'about', topriddy
[17:57:48] <dmlloyd> dvayanu: yeah
[17:58:08] <dmlloyd> http://rifers.org/paste/show/8747 <- can anyone make sense of that stack trace?
[17:58:13] <w0lfshad3> we got a setup where daily data is transphered from db2/oracle dbs into sybase iq using ODI, how much time you think one could build a similar system using only Java/dbs w/o ODI and Sybase IQ?
[17:58:23] <Stef1> speciesUnknown: You'll want to create a Swing JFrame to paint on.
[17:58:44] <Stef1> You can't directly paint to the screen
[17:59:03] <speciesUnknown> i know that.
[17:59:08] <speciesUnknown> i ahve a jframe, so how do i draw in it?
[17:59:17] <Stef1> overwrite paintComponent
[17:59:19] *** Orbixx has quit IRC
[17:59:32] <speciesUnknown> how?
[17:59:41] <dmlloyd> guess I'll have to bust out javap to figure out wtf is going on
[17:59:41] <cheeser> ~java2d
[17:59:41] <javabot> see http://java.sun.com/products/java-media/2D/ and for a tutorial see http://java.sun.com/docs/books/tutorial/2d/
[17:59:46] <cheeser> speciesUnknown: read that
[18:00:33] <dvayanu> dmlloyd: adder.toString() ?
[18:00:50] <dmlloyd> dvayanu: it's not on the stack trace
[18:01:17] <dvayanu> right
[18:01:17] <dmlloyd> I'll add the javap output
[18:02:05] *** LordMetroid has quit IRC
[18:02:06] <Drone> See dmlloyd's post at http://rifers.org/paste/show/8748
[18:02:06] <dvayanu> btw, removing F didnt help,same error
[18:02:09] <speciesUnknown> those docs dont really help, they dont tell you how to actually "get started"
[18:02:15] <dmlloyd> I'm baffled
[18:02:29] <speciesUnknown> i remember i extended a class, graphics2D i think, and painted shapes into it.
[18:02:41] <speciesUnknown> what class actually does this stuff?
[18:03:06] <dvayanu> dmlloyd: http://rifers.org/paste/show/8749
[18:03:44] *** speciesUnknown has left ##java
[18:04:15] <dmlloyd> http://rifers.org/paste/show/8748 <- the method is never called in the bytecode, and yet it's in the stack trace
[18:06:06] <dmlloyd> dvayanu: now it's just because there's no parameter to create() that specifies what T is. easy fix; just change: return create(...) to this: return this.<T>create(...)
[18:06:11] *** n3llyb0y has joined ##java
[18:06:17] <ldamwork> dmlloyd, sure you are looking at the right version of the bytecode, compared to your current source?
[18:06:29] <dmlloyd> ldamwork: I'm pretty sure I am
[18:06:30] <ldamwork> dmlloyd, do a clean?
[18:06:39] <dmlloyd> I'll have IDEA clean it all out to be sure
[18:06:46] <dmlloyd> in fact, I'll clean it by hand
[18:07:59] *** topriddy has quit IRC
[18:08:00] <dmlloyd> ldamwork: nope, same output, same stack trace, same bytecode :|
[18:08:07] *** igordcard has joined ##java
[18:08:19] <dmlloyd> I guess it must have something to do with it being a proxy... but... what
[18:08:32] <dmlloyd> some kind of JVM optimization?
[18:09:03] <dmlloyd> maybe the proxy isn't initialized all the way and it screws up some internal consistency check
[18:09:05] *** Sulis has joined ##java
[18:09:31] <dvayanu> dmllord: i have a problem with this in a static method...
[18:10:45] <dvayanu> besides, eclipse compiles and runs it, ant doesnt...
[18:11:44] *** Zhig has joined ##java
[18:12:13] <dvayanu> gotta, go, thanx for help anyway
[18:12:55] *** svm_invictvs has quit IRC
[18:13:27] *** dvayanu has quit IRC
[18:13:29] *** dk_schrute has joined ##java
[18:13:33] <Teckla> Ok, naive question time... ClassLoader.loadClass() loads classes... is there a way to... unload them?
[18:14:34] *** rashed2020_ has joined ##java
[18:15:02] *** yclian has quit IRC
[18:17:10] *** javahorn has quit IRC
[18:18:07] *** javahorn has joined ##java
[18:19:15] <cheeser> Teckla: when the classloader goes away, all class defs also are removed.
[18:19:16] *** TooAngel has joined ##java
[18:19:20] <rashed2020_> Guys, what exactly is a unicodeblock?
[18:19:22] <cheeser> but that's at GC
[18:19:24] <rashed2020_> What does it print out?
[18:19:47] *** TooAngel has left ##java
[18:20:25] <Teckla> cheeser: Ah, thank you good sir
[18:20:41] *** _acid__ has joined ##java
[18:20:59] <cheeser> sure
[18:21:13] *** romanb has quit IRC
[18:22:38] *** shadewind has joined ##java
[18:25:55] <dmlloyd> hm, weird. (1) calling toString() on any proxy instance seems to cause an NPE
[18:26:16] <dmlloyd> (2) something is causing an implicit toString()... or so it seems
[18:27:42] <Stef1> Can servlets run on a local computer without tomcat?
[18:27:55] <dmlloyd> a servlet is useless without a servlet container
[18:28:05] <dmlloyd> that said, there's lighter-weight containers than tomcat
[18:28:12] <dmlloyd> jetty is supposed to be pretty good
[18:28:52] <Stef1> ok, thanks
[18:29:28] *** Alterscapes has joined ##java
[18:29:32] *** Bevin has quit IRC
[18:31:12] <Alterscapes> Quick question: I'm using JavaBeans' XMLEncoder / XMLDecoder to serialize a JavaBeans-compliant object to XML. The object contains a string of HTML. I'd like to convince XMLEncoder not to convert < to &lt;, etc.. is there any sneaky way to do this? Maybe specify that I want it as <--CDATA ...>? Javadoc suggests not, but I figure it's worth asking.
[18:31:38] *** benny`work has joined ##java
[18:31:42] <cheeser> you might try xstream
[18:32:16] *** b3nn3tt has joined ##java
[18:32:26] *** Woflborg has joined ##java
[18:32:56] *** agnul has quit IRC
[18:33:09] <wans> cheeser i need more info on how about to use the <PARAM> tag on applets
[18:33:18] <wans> ~<PARAM>
[18:33:18] <javabot> wans, I have no idea what <PARAM> is.
[18:33:21] <cheeser> wans: i'm sorry to hear that.
[18:33:26] <cheeser> ~~ wans applets
[18:33:27] <javabot> Check the topic, read http://javachannel.net/wiki/pmwiki.php/FAQ/Applets - Basically, we don't support them here. Try the sun forums at http://tinyurl.com/2q2hog
[18:33:51] <Alterscapes> cheeser, thank you for the pointer. I'll give it a look!
[18:34:04] <cheeser> Alterscapes: sure
[18:34:39] <Teckla> Is it possible to have a .jar actually sitting in a byte[] and load that jar into the system class loader?
[18:34:47] <Teckla> (I'm not sure my question even makes sense)
[18:35:02] <dmlloyd> in a byte[] - yes; into the system class loader - I'm not sure
[18:35:21] <dmlloyd> you could definitely have a classloader just for that byte[]
[18:35:27] <Teckla> i.e., I might have teckla.jar, but it's not on disk, the bytes of teckla.jar are actually in a byte[], and I want to load that jar.
[18:35:57] <Teckla> dmlloyd: Would I possibly need to write my own ClassLoader?
[18:36:02] <cheeser> URLClassLoader
[18:36:22] <dmlloyd> yeah I'd use URLClassLoader, and just set up a URL scheme that reads from your byte[]
[18:36:41] *** rashed2020_ has left ##java
[18:36:57] *** orgy` has quit IRC
[18:37:18] <Teckla> Ok, thanks for the advice
[18:38:25] *** amnesiac has joined ##java
[18:38:42] *** Johnny_vd_Laar has joined ##java
[18:40:28] *** Deji_Languages has joined ##java
[18:40:45] *** topriddy has joined ##java
[18:41:56] *** Deji_Languages has left ##java
[18:43:17] *** Deji_Languages has joined ##java
[18:43:59] *** Deji_Languages has left ##java
[18:44:47] *** heyqule has joined ##java
[18:45:44] *** alek_b has joined ##java
[18:45:58] *** tissue has quit IRC
[18:46:34] *** alek_b has quit IRC
[18:46:56] *** Resistance has joined ##java
[18:47:08] *** w0lfshad3 has quit IRC
[18:47:12] *** alek_b has joined ##java
[18:47:44] <jamil_1> How can I merge Two Binary Search Trees ?
[18:48:23] <cheeser> are they balanced?
[18:49:01] *** valcker has quit IRC
[18:49:25] *** beol has joined ##java
[18:51:30] *** javahorn has quit IRC
[18:54:14] *** yakman_ has joined ##java
[18:54:17] *** yakman_ has left ##java
[18:55:42] *** LordMetroid has joined ##Java
[18:56:45] <jamil_1> cheeser: Yeah
[18:59:24] *** topriddy has quit IRC
[18:59:28] *** svm_invictvs has joined ##java
[18:59:42] <svm_invictvs> HOla
[19:01:31] <r0bby> Hai :)
[19:02:05] <[TechGuy]> hula
[19:02:39] <teralaser> are we to grow Orchids in here too ?
[19:02:53] <svm_invictvs> What's a good test to for something that's multithreaded?
[19:03:11] <svm_invictvs> Spawn a shit load of threads, run it, see if it fails?
[19:03:29] * r0bby throws stuff at svm_invictvs
[19:03:37] *** justafish has quit IRC
[19:05:39] <svm_invictvs> r0bby: So I'm getting a compile error when I'm trying to open a file, I'm catching FileNotFoundException....
[19:07:20] *** buntfalke has joined ##java
[19:07:37] <jonaslund> svm_invictvs: try using jmeter ?
[19:07:51] <svm_invictvs> jonaslund: I'm giving r0bby shit.
[19:08:10] <svm_invictvs> ~be r0bby
[19:08:10] <javabot> FileNotFoundException is a subclass of IOException; Exception won't directly catch that.
[19:08:29] <jonaslund> oh
[19:08:44] <svm_invictvs> jonaslund: becusae he threw stuff at me.
[19:08:57] * jonaslund got lost somewhere
[19:09:05] *** gdoko has joined ##java
[19:09:26] *** tranceNRG has joined ##java
[19:09:49] <svm_invictvs> Ugh
[19:09:55] <svm_invictvs> I'm overriding finalize()
[19:09:58] <svm_invictvs> I feel dirty
[19:10:15] *** gdoko has quit IRC
[19:10:28] <jonaslund> whyso ?
[19:10:29] <dmlloyd> nothing wrong with finalize
[19:11:01] <svm_invictvs> I don't know, didn't we have a huge argument about it and the consensus was that it's usually a BadThing(tm) to override it?
[19:11:11] <svm_invictvs> If you're relyingon it, it can be a code smell. I guess.
[19:11:55] <jonaslund> if you're using something that's no java gc'd,etc then you'd be silly avoiding it
[19:11:56] *** pandora-- has joined ##java
[19:12:11] <jonaslund> however if you're doing pure java the only reason i see would be because of softrefs
[19:12:32] <jonaslund> if you can call softrefs,etc pure
[19:14:32] *** sombriks has quit IRC
[19:14:38] <svm_invictvs> jonaslund: weak, soft, phantom
[19:14:41] <svm_invictvs> all the same :-P
[19:14:51] <svm_invictvs> I kid
[19:15:50] <svm_invictvs> overriding finalize makes garbage collection a non-trivial task, though.
[19:16:13] <jonaslund> for the objects in that chain yes
[19:16:25] <svm_invictvs> hm.
[19:16:38] <svm_invictvs> I wouldn't even be writing this class if hadoop didn't have this stupid bug in it.
[19:16:48] <jonaslund> fix hadoop ?
[19:17:00] <svm_invictvs> I should submit a patch, yes.
[19:18:42] *** jmpf has joined ##java
[19:18:54] *** waz has joined ##java
[19:19:48] *** timte has joined ##java
[19:21:23] <jmpf> I just ran across a problem w/ http://pastie.org/381848; this works until I have a utf8 character and then it craps out; w/out converting it what would be the appropriate solution?
[19:21:42] *** mhanlon has joined ##java
[19:22:37] *** teralaser has quit IRC
[19:23:11] *** jamil_1 has quit IRC
[19:25:55] <svm_invictvs> ~javadoc WeakHashMap
[19:25:55] <javabot> svm_invictvs: http://is.gd/iEos [java.util.WeakHashMap]
[19:26:37] <jonaslund> svm_invictvs: you use hive or pig with hadoop ?
[19:26:45] <svm_invictvs> no
[19:26:52] <svm_invictvs> Just mapreduce
[19:28:57] <jonaslund> what kind of stuff are you doing with it ?
[19:29:00] *** nijm has quit IRC
[19:29:15] <svm_invictvs> Right now?
[19:29:35] *** nijm has joined ##java
[19:29:38] <svm_invictvs> Chewing through log files trying to figure out what makes users click on ads.
[19:29:58] <svm_invictvs> Recommendations
[19:30:05] <svm_invictvs> Actually
[19:30:10] <svm_invictvs> i don't know how much I'm supposed to talk about.
[19:30:45] * [TechGuy] calls the cops
[19:30:53] <svm_invictvs> lol
[19:31:10] <svm_invictvs> jonaslund: All our site metrics are done with hadoop
[19:33:21] *** waz has quit IRC
[19:34:23] <jonaslund> svm_invictvs: what company is it ?
[19:35:21] <jottinger> you shouldn't use hadoop! Use gigaspaces instead!
[19:35:53] *** Gracenotes has quit IRC
[19:38:02] *** Gracenotes has joined ##java
[19:38:08] <svm_invictvs> jottinger: ok...
[19:38:21] <svm_invictvs> jottinger: Come in at give your pitch to my boss.
[19:38:46] <jottinger> heh
[19:38:58] <jottinger> too much work, and I don't get a commission from GS :)
[19:39:59] *** mattorantimatt has quit IRC
[19:40:27] *** waz has joined ##java
[19:45:30] *** thorat has joined ##java
[19:45:41] *** TryNiX has joined ##java
[19:45:45] *** UT2K3 has quit IRC
[19:46:14] <TryNiX> with a bandwidth of 1000 kbit/second, and propagation time of 5ms , what connection would you expect this to be
[19:46:25] <TryNiX> or ping time 10ms
[19:46:29] <r0bby> ~~ TryNiX homework
[19:46:30] <javabot> Homework is meant to be done by YOU so that YOU learn something. Stop cheating. We didn't like doing our own, why should we bother with yours? Besides, we'd rather you failed so we have less competition. Have a nice day!
[19:46:44] <TryNiX> with love =p
[19:46:56] <TryNiX> Actually it is not a homework...
[19:47:04] <r0bby> is it for school?
[19:47:11] <TryNiX> nope its for me
[19:47:15] *** Ivellina has joined ##java
[19:48:09] <TryNiX> for school was to find the propagation time and bandwidth, report done. for me is to guess what networks have such values
[19:48:35] <r0bby> this is still school.
[19:48:42] <r0bby> but really, nice try -- go google.
[19:48:49] <r0bby> this isn't even REMOTELY java related
[19:49:16] <lfaraone> If I'm extending an ArrayList class, is it possible to add a method to the new class that iterates over the list and does some operation to it?
[19:49:18] <TryNiX> I thought everything is java related now -_-
[19:49:18] *** Alterscapes has quit IRC
[19:49:24] <TryNiX> even sex
[19:49:47] <lfaraone> TryNiX: Well, only if you have some HotCoffee first.
[19:50:33] <r0bby> lfaraone: sure, just add a method.
[19:51:07] <r0bby> you're not restricted from adding methods you know right?
[19:51:17] *** joed has joined ##java
[19:51:22] <r0bby> joed! :)
[19:51:53] *** mistik1 has quit IRC
[19:52:02] <r0bby> lfaraone: before you go and re-invent the wheel: did you look at commons-collections/google-collections to see if they did what you want?
[19:52:09] <lfaraone> r0bby: Yeah, I can just add the method to the class. What I don't get is, do I just use "for (i : this) { // do something; }"
[19:53:24] *** gleesond has joined ##java
[19:53:25] <lfaraone> r0bby: I need to redefine the toString method for the class to iterate over the arraylist, so no, I don't think I can find something like that.
[19:53:40] <r0bby> why?
[19:53:53] <zeel> Hi, I can't recall what library allows us to create xml files from objects.
[19:53:56] *** TryNiX has quit IRC
[19:54:16] <lfaraone> zeel: http://www.rgagnon.com/javadetails/java-0470.html
[19:54:27] <lfaraone> zeel: or anything else listed at http://www.google.com/search?q=xml%20object%20export%20java :)
[19:54:31] *** Blaay has joined ##java
[19:54:42] <r0bby> ~~ zeel xstream
[19:54:42] <javabot> XStream is a simple library to serialize objects to XML and back again. It can be found at http://xstream.codehaus.org
[19:54:48] <zeel> Ah thanks, I remember now :)
[19:54:57] <r0bby> ~google++
[19:54:57] <javabot> google has a karma level of 104, r0bby
[19:54:57] <gleesond> I was wondering about the vector class. is there a way to insert data at the front of the vector?
[19:55:09] <jottinger> what does the API say?
[19:55:10] <r0bby> 1) dont use vector
[19:55:32] <r0bby> ~~ gleesond javadoc List.add(int,T)
[19:55:33] <javabot> I don't know of any documentation for List.add(int,T)
[19:55:45] <gleesond> well it's not really my choice to use vector or not
[19:55:56] <jottinger> ~javadoc List.add(T, int)
[19:55:57] <javabot> I don't know of any documentation for List.add(T, int)
[19:56:01] <jottinger> well, phooey
[19:56:01] <gleesond> I'm programming in already existing code
[19:56:16] <r0bby> http://java.sun.com/javase/6/docs/api/java/util/List.html#add(int,%20E)
[19:56:22] <joed> Heh
[19:56:34] <r0bby> gleesond: perhaps read the api?
[19:56:35] <jottinger> vector has add(int index, T obj)
[19:56:43] <jottinger> so like I said first, WHAT DOES THE API SAY?
[19:56:44] * joed programmings jottinger in existing codez
[19:56:57] <gleesond> I didn't come into this channel to be razzed about RTFM
[19:57:06] <jottinger> gleesond: all the more reason for you to RTFM, eh?
[19:57:10] <r0bby> gleesond: no you came here because you were lazy
[19:57:22] <gleesond> I came in here for help
[19:57:35] <gleesond> was I impolite?
[19:57:37] <r0bby> which you could have VERY wekll gotten by reading the api...
[19:57:49] <r0bby> gleesond: you were told how to get help
[19:57:52] <jottinger> gleesond: yes, you were
[19:57:52] <ernimril> gleesond: yes, not bothering to check the api is impolite
[19:57:54] *** Gracenotes has quit IRC
[19:58:05] <gleesond> whatever
[19:58:07] <r0bby> gleesond: 1) not trying == wasting our time
[19:58:09] *** gleesond has left ##java
[19:58:16] <jottinger> and you got pointed to not only where you could find it yourself, but to the method itself
[19:58:17] <r0bby> dumbasses
[19:58:17] <jottinger> asshat.
[19:58:22] *** Gracenotes has joined ##java
[19:59:04] <r0bby> he was all kinds of stupid
[19:59:17] <r0bby> "BOOHOO i'm lazy and can't be bothered to RTFM"
[19:59:21] *** durka42 has joined ##java
[20:00:01] *** heyqule has quit IRC
[20:01:08] *** osmosis has joined ##java
[20:01:23] *** Johnny_vd_Laar has quit IRC
[20:02:49] *** EspenG has quit IRC
[20:03:05] *** EspenG has joined ##java
[20:03:05] *** delskorch has joined ##java
[20:03:43] <Meddi> hey guys, ive got a panel called "mainPanel" with a GridBagLayout. I add a scrollPanel to it at the positions gridy = gridx = 0 but the scrollPanel appears in the middle of "mainPanel" . Is there a way to make it appear at the upper left position?
[20:04:16] *** vix85 has joined ##java
[20:04:42] *** litb has joined ##java
[20:04:44] <litb> hello all :p
[20:04:51] <litb> "object is to class as enum is to ..." ?
[20:05:03] <quarsaw> Meddi anchor it to FIRST_LINE_START
[20:05:05] <litb> my bet is "object is to class as enum is to class-file" . what do you think of it?
[20:05:07] <cheeser> ah, homework.
[20:05:13] <litb> nope :p
[20:05:14] <cheeser> litb: i think it's wrong
[20:05:18] <Meddi> quarsaw i did try :\ not working
[20:05:26] <quarsaw> hrm
[20:05:27] <litb> cheeser: the question ?
[20:05:36] <cheeser> your answer
[20:05:41] <litb> cheeser: http://stackoverflow.com/questions/521407/object-is-to-class-as-enum-is-to
[20:05:49] <litb> cheeser: do you even think there is a valid answer?
[20:06:08] <cheeser> not really
[20:06:20] <Zhig> How does the compiler knows to throw an error when an overriden "bridge" method is explicitly called? i.e. public void intrf(String s) { } public void intrf(Object s) { /* bridge method */ }, obj.intrf(new Object());
[20:06:26] *** ffgeek200b has joined ##java
[20:06:34] <cheeser> Zhig: what?
[20:06:41] <litb> cheeser: i mean, we need something from which an enum is an instance of :p i think class files is that
[20:06:49] <ffgeek200b> I'm getting this error: Invalid maximum heap size: -Xmx:500m but I have 2.5 GB of free memory, what am I doing wrong?
[20:07:01] <litb> cheeser: what is wrong with my interpretion?
[20:07:26] <ernimril> ffgeek200b: s/://
[20:07:39] <cheeser> an enum is a definition as much as a class is.
[20:07:50] <ffgeek200b> ernimril, woops, thanks!
[20:08:04] <cheeser> or if you want to use enum to refer to an enum instance/value, then i'd say "... is to enum definition"
[20:08:08] *** ryuho has quit IRC
[20:08:14] <Zhig> cheeser: If the code explicitly calls upon a "bridge method" generated by the compiler, it throws an error. I was wondering how the compiler pin points the bridge method? Is there a flag attached to any synthetically generated bridge method in the bytecode?
[20:08:36] *** Mike-N-Go has joined ##java
[20:08:37] <cheeser> Zhig: i have no idea what you're talking about.
[20:09:14] <Zhig> cheeser: My apologies, I am not very adequate in articulating my points. Allow me to demonstrate this with an example.
[20:09:32] <ffgeek200b> sucks being the only programmer, sometimes the only thing I need is someone else's eyeballs
[20:10:02] *** juc0 has quit IRC
[20:10:27] *** Mike-N-Go has quit IRC
[20:11:00] *** Mike-N-Go has joined ##java
[20:12:13] <Zhig> cheeser: interface SomeInf<S> { public void intrf(S s); }, class Con implements SomeInf<Con> { public void intrf(Con s) { }}. After type erasure performed by the compiler, the code would look like: interface SomeInf{ public void intrf(Object s); }, class Con implements SomeInf<Con> { public void intrf(Con s) { } /* bridge method -> */ public void intrf(Object s) { intrf( (Con) s ) } }
[20:13:11] <Zhig> cheeser: Now if I create Con object and call the bridge method directly, the compiler throws an error. i.e. Con c = new Con(); c.intrf(new Object());
[20:13:54] <Zhig> I am trying to figure out whether the compiler appends some sort of flag in the bytecode to the bridge method that prevents it from being called explicitly.
[20:14:15] <joed> Wouldd you like to buy the Brooklyn bridge?
[20:14:20] <cheeser> Zhig: you should use a pastebin...
[20:14:49] <cheeser> but i have no idea.
[20:14:55] <cheeser> you could look at the bytecode and see.
[20:17:21] *** bitshuffler has quit IRC
[20:18:58] *** topriddy has joined ##java
[20:19:19] *** Mike-N-Go has quit IRC
[20:23:13] *** gdoko has joined ##java
[20:23:23] *** delskorch has quit IRC
[20:23:58] *** kansan-zzz is now known as kansan
[20:25:48] <Zhig> cheeser: Uhh, 2: checkcast #2; //class Con. "checkcast" (not to be confused with the instanceof instruction) throws an exception during the linking according to VM spec.
[20:26:39] <Zhig> Hmm.. and it examines the static type check not runtime.
[20:27:15] <Zhig> Which means I can't even pass Object obj = new Con(); to conObj.intrf(obj);
[20:28:52] <blahjake> Zhig: pastebin? your inline example includes a paramterized type after erasure that wouldn't be there
[20:29:29] <Zhig> blahjake: My mistake. class Con implements SomeInf<Con> should be class Con implements SomeInf.
[20:29:30] *** igordcard has quit IRC
[20:29:54] <Zhig> blahjake: I was just hastily throwing a quick example. I should've used the pastebin.
[20:30:46] *** vezzoni has quit IRC
[20:31:58] *** romanb has joined ##java
[20:32:23] *** Dracofodder has quit IRC
[20:32:48] <Meddi> argh.. anyone who knows how to align components in a gridbaglayout ?:\
[20:33:12] <quarsaw> Meddi: do you have any other components in your panel?
[20:34:05] <Meddi> nop just 1, ill have more after i finish with this one though, but, even after putting more in it, it is not aligned where I want it to :\
[20:35:51] <r0bby> Meddi: show your code
[20:35:56] <r0bby> ~~ Meddi pastebin
[20:35:56] <javabot> http://eugeneciurana.com/pastebin Paste the final url after you've pasted your stuff there.
[20:36:30] <r0bby> it's not incredibly hard
[20:36:39] <Meddi> yeh sure
[20:37:01] <r0bby> Set them to adjacent x,y coordinates
[20:37:02] *** cuban has joined ##java
[20:37:09] *** cuban has left ##java
[20:37:13] *** cuban has joined ##java
[20:37:18] <r0bby> with spacing/insets set properly
[20:37:28] <cuban> ~pastebin
[20:37:29] <javabot> http://pastebin.stonekeep.com Paste the final url after you've pasted your stuff there.
[20:38:53] <blahjake> Zhig: your compile error is name clash isn't it?
[20:39:02] *** malik__^ has joined ##java
[20:39:11] <malik__^> hi all, i need help with java security
[20:40:12] <malik__^> i want to use java encryption and decryption using symmetric keys but want to use my own string to generate the Key that will be used for encryption and decryption. please help me
[20:40:35] *** vsync has joined ##java
[20:40:46] <Meddi> r0bby: http://eugeneciurana.com/pastebin/pastebin.php?show=39938
[20:41:06] <Zhig> Blaay: Clash? I didn't know the errors have mnemonic names? No, something in this effect: "intrf(Con) in Con cannot be applied to (java.lang.Object)".
[20:41:20] *** mengu has joined ##java
[20:41:32] <Meddi> for the label in lines 264/267 appears in the middle of the panel and not at the upper left corner. the constraints are, gridx/y = 0 and insets(0,3,0,5)
[20:41:35] <r0bby> Meddi: you know you can re-use the GridbagConstraints instance right?
[20:41:52] <Meddi> yeh i am :\ i just wrote you some of the constraints
[20:42:55] <r0bby> Meddi: to make a label and it's associated text field line up you'd place them in adjacent x cells.
[20:43:05] <r0bby> on the same y coordinate
[20:43:30] <r0bby> that should do what you want
[20:43:38] <Meddi> how shall I implement that?
[20:43:52] *** Resistance has quit IRC
[20:43:53] <blahjake> Zhig: i meant literally "name clash", due to intrf(S) and intrf(Object) having the same erasure
[20:44:03] <r0bby> c.grix = 0; ... c.gridx = 1;
[20:44:09] <malik__^> any help on my problem please
[20:44:10] <r0bby> it's common sense from there
[20:44:15] *** tro has joined ##java
[20:44:39] <Meddi> yes, i already did that
[20:44:47] <r0bby> Meddi: You know how to set the gridx and gridy constraints
[20:44:47] <tro> ~pastebin
[20:44:47] <javabot> http://eugeneciurana.com/pastebin Paste the final url after you've pasted your stuff there.
[20:45:05] <r0bby> just set the same gridy coordinate or the label
[20:45:12] <r0bby> or whatever you're trying to line up
[20:45:46] *** topriddy has quit IRC
[20:45:48] <r0bby> similarly to line them up vertically, same gridx and adjacent gridy
[20:46:05] <Meddi> centerPanel.add(transitionFunctionsLabel,constraints.transitionFunctionsLabelConstraints()); ----- > constraints.transitionFunctionsLabelConstraints() This function returns a GridBagConstraints objrct with gridy=0 and gridx=0
[20:46:17] <r0bby> okay
[20:46:21] <r0bby> then gridx=1
[20:46:26] <tro> what could possibly be going on here? i'm using jdk 1.4.2_11 on winxp: http://eugeneciurana.com/pastebin/pastebin.php?show=39939
[20:46:28] <Meddi> shouldnt the label be placed at the upper left corner, since they are both 0?
[20:46:39] <Meddi> i tried that too, still in the middle of the panel :(
[20:46:39] <tro> it looks like the exception is coming from within java.util.logging
[20:46:51] <cheeser> /3/2
[20:46:52] <Zhig> blahjake: No, you are simply changing the method signature. The reason it fails with that error is because the compiler synthetically insert a "checkcast" instruction in the bridge method which makes sure the type passed on to the bridge method, if explicitly or otherwise, have an appropriate reference type.
[20:47:17] <r0bby> Meddi: *shrug*
[20:49:52] *** hunterp has quit IRC
[20:50:22] <tro> i tried a different revision of 1.4.2 (18) and the same thing occured
[20:50:59] <r0bby> Meddi: i always mix layout managers, i never bothered to actually fight with gridbag -- i despise UI design
[20:51:46] <r0bby> the gridbag tutorial in the sun site is good -- i used it
[20:52:03] <Meddi> yeh i am going through that right now :) thanks btw
[20:52:20] <waz> ~tablelayout
[20:52:20] <javabot> waz, tablelayout is a layout manager that provides all the power of GridBagLayout, but is simple and easy to use: https://tablelayout.dev.java.net/
[20:52:27] *** cybereal has joined ##java
[20:52:42] *** cuban has left ##java
[20:52:46] *** cuban has joined ##java
[20:53:04] <r0bby> Meddi: no problem
[20:53:24] <r0bby> Meddi: I basically got an idea of how i wanted it, then coded it to make it look like it
[20:53:28] <r0bby> I got pretty close :)
[20:53:44] <jmpf> I have a bytereader that works well with ascii but it seems to read in too much when I send it a utf8 character like an euro -- any suggestions?
[20:54:03] *** malik__^ has quit IRC
[20:54:23] <Meddi> hehe, thats what i am trying to do :p
[20:54:37] <Meddi> hopefully i will make it :)
[20:54:39] <cybereal> jmpf: work in bytes or in characters, don't try to work in both
[20:54:40] <r0bby> Meddi: just cheat and use BorderLayout + GBL
[20:55:15] <Meddi> yup thats what i use
[20:55:16] *** squi has quit IRC
[20:56:27] <jmpf> cybereal: so basically I need to drop the readers and just use inputstream right?
[20:56:51] <cybereal> jmpf: use *Stream for bytes, *Reader for chacters, don't try to get bytes from a Reader...
[20:57:38] <jmpf> cybereal: cool, thnx.. I'm looking at the api
[20:57:55] <cybereal> jmpf: but more importantly, if you're transferring data, either send it as bytes or send it as characters, don't send it as one that's expected to be interpreted as the other, for example, http works entirely in bytes for the body, regardless of its encoding, so the size it sends is easy to interpret
[20:57:55] *** M[]ssad has quit IRC
[20:58:00] *** M[]ssad has joined ##java
[20:58:20] <cybereal> if you want to send characters you have to know the encoding ahead of time and you can't count bytes to know when you've finished reading a block
[20:58:40] * cybereal prefers just sticking to bytes and letting the end point convert those bytes to characters as necessary
[20:59:49] *** cybereal has quit IRC
[21:01:29] *** drip has joined ##java
[21:02:13] *** gaten has joined ##java
[21:03:39] *** UK-sHaDoW has joined ##java
[21:08:58] *** oxi has joined ##java
[21:09:04] <oxi> hi
[21:09:30] *** monestri has quit IRC
[21:09:36] <oxi> shouldn't this work?:
[21:09:51] <oxi> private Set contentTypes = new HashSet(); contentTypes.add(new String("video/quicktime")); ?
[21:10:12] <oxi> I get: ....<identifier> expected....
[21:10:14] *** n3llyb0y has left ##java
[21:10:43] <oxi> in maven I set <source>1.3</source> <target>1.3</target>
[21:10:48] <oxi> can anyone help with this?
[21:10:54] *** surial has joined ##java
[21:10:56] <cheeser> oxi: are you in a method?
[21:11:10] <oxi> chesser: no
[21:11:16] <cheeser> ~~ oxi show us
[21:11:16] <javabot> Paste the code (and any errors) in the pastebin where we can see it. See ~pastebin for options. Also see ~testcase for good examples as to how to help us help you quickly diagnose and solve problems.
[21:11:23] <oxi> cheeser: does this have to be in a method?
[21:11:36] <cheeser> pastebin the code
[21:12:06] <oxi> huh, I'm afraid, because it's soo messed up and full of tries
[21:13:24] <oxi> basically I'm just doing public class SendRedirectServlet extends HttpServlet{ ... public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) ... HttpServletResponseWrapper wrapper = new HttpServletResponseWrapper((HttpServletResponse) servletResponse) { ..... private Set contentTypes = new HashSet(); contentTypes.add(new String("video/quicktime"));
[21:14:26] <joed> Pastebins are great.
[21:15:05] <oxi> alright, but it's a catastrophy: http://pastebin.com/m4e9328a3
[21:15:51] <oxi> you see there that actually I'm just trying to add a set of strings
[21:15:56] <oxi> the stuff is compiled by maven
[21:16:58] <oxi> "contentTypes" would be the name of the set
[21:17:08] *** Resistance has joined ##java
[21:17:16] *** em_pleh has joined ##java
[21:17:24] <em_pleh> anyone can help with http://forums.java.net/jive/thread.jspa?threadID=57161&tstart=0
[21:17:53] <r0bby> jesus christy
[21:18:05] <em_pleh> lol
[21:18:24] <joed> ~lol
[21:18:24] <javabot> http://idisk.mac.com/zacheryjensen-Public/images/vglol.png
[21:18:26] *** no7 has joined ##java
[21:18:50] <em_pleh> ~lmao
[21:18:50] <javabot> em_pleh, I have no idea what lmao is.
[21:18:55] <em_pleh> (
[21:19:16] <em_pleh> r0bby: did you figure it out
[21:19:45] <surial> r0bby: That's a new word meaning 'it has the jesus christ' nature? Like in, "wow, this cracker is jesus christy!"?
[21:21:26] <oxi> heh, I moved it into a method and it worked
[21:21:32] <oxi> thanks cheeser
[21:21:33] <r0bby> surial: yeh new word
[21:21:37] <r0bby> I made it up
[21:21:40] *** LegendaryPenguin has joined ##java
[21:21:59] <r0bby> ajnd em_pleh no
[21:22:11] <r0bby> the lack of indentation makes me wanna gouge my eyes out
[21:22:19] <LegendaryPenguin> If i have an xml file, whats the best way to read it in? Could I just create classes that reflect the structure of the xml file and have it automatically read it or is there another way
[21:22:30] <r0bby> ~xml parsing
[21:22:31] <javabot> r0bby, xml parsing is best accomplished with one of - XOM @ http://www.xom.nu/ - JAXB @ http://java.sun.com/xml/jaxb/ - JDOM @ http://www.jdom.org/ - XmlMap @ http://tinyurl.com/3pjxjn - JAXP (including StAX as well as the legacy SAX and DOM) @ https://jaxp.dev.java.net/
[21:22:44] *** Stef1 has quit IRC
[21:23:01] <r0bby> LegendaryPenguin: you could use something like xstream
[21:23:07] <r0bby> which does all this for you
[21:23:19] *** jottinger has quit IRC
[21:25:30] <tieTYT> r0bby: maybe we should put xstream at the front of this factoid?
[21:25:48] <r0bby> tieTYT: no...
[21:25:49] *** jmpf has quit IRC
[21:25:58] <tieTYT> why not?
[21:25:58] <r0bby> because it's not necessarily for parsing
[21:26:05] <tieTYT> is jaxb?
[21:26:10] <jchauncey> xstream = t3h b0mb!
[21:26:13] <tieTYT> i see jaxb and xstream as pretty similar
[21:26:18] *** lenbust has left ##java
[21:26:26] <jchauncey> dosnt xstream use JAXB?
[21:26:29] <jchauncey> or it can rather
[21:26:57] *** jdolan_ has quit IRC
[21:27:14] <tieTYT> xstream doesn't require a separate compile before you use it so i doubt it
[21:27:23] <r0bby> xstream is for serialization to XML
[21:27:29] <r0bby> to/from i should say
[21:27:59] *** jivedude has quit IRC
[21:28:43] <cheeser> oxi: sorry, i got sidetracked. get it figured out?
[21:29:23] *** tro has left ##java
[21:29:32] <oxi> cheeser: yep, thanks a lot
[21:29:49] <oxi> cheeser: just had to move it into a function, like you guessed
[21:30:12] <cheeser> i was actually think it was the other way around: that you were trying to declare a local variable private.
[21:30:37] <jchauncey> oh i am thinking of JAXP
[21:30:41] <cheeser> but if I'm reading your pastebin correctly, you were trying to declare a field on an anonymous inner class and you can't do that.
[21:30:51] <jchauncey> You require xstream-[version].jar and xpp3-[version].jar in the classpath. XPP3 is a very fast XML pull-parser implementation. If you do not want to include this dependency, you can use a standard JAXP DOM parser instead:
[21:31:42] *** ridoo has joined ##java
[21:32:31] *** M[]ssad_ has joined ##java
[21:33:42] *** M[]ssad has quit IRC
[21:34:14] *** genesiss has quit IRC
[21:34:21] *** igordcard has joined ##java
[21:34:52] *** ScottG489 has joined ##java
[21:35:16] <blahjake> cheeser: you can declare fields on anonymous inner classes
[21:35:41] <cheeser> maybe i'm thinking of declaring constructors...
[21:37:16] *** Marius has joined ##java
[21:40:39] *** Varox has quit IRC
[21:40:44] *** cybereal has joined ##java
[21:43:44] *** ayrnieu_ has joined ##java
[21:43:50] *** ayrnieu has quit IRC
[21:43:55] *** ayrnieu_ is now known as ayrnieu
[21:44:08] *** mistik1 has joined ##java
[21:44:45] *** Carnage\ has joined ##java
[21:44:51] *** tmTim has quit IRC
[21:44:56] <surial> cheeser: Correct. Constructors are not allowed in AICLs. instance initializers are though.
[21:45:03] *** jchauncey has quit IRC
[21:45:11] <cheeser> i know
[21:45:18] <surial> I wonder why I don't use those more.
[21:45:34] <cheeser> i actually just made use of that "loophole" last week.
[21:45:45] <surial> instance initializers in AICLs?
[21:45:54] <ernimril> surial: probably because you want to keep the aic very short
[21:45:59] <cheeser> surial: yeah
[21:46:08] <surial> I meant, I don't use instance initializers much, if ever. Anywhere.
[21:46:36] <surial> ernimril: Seen that 'fold a one-liner AIC into a single line in your IDE' thing? lambda4ecj or some such.
[21:46:54] <surial> ~lambda4jdt
[21:46:54] <javabot> surial, I have no idea what lambda4jdt is.
[21:47:29] <ernimril> surial: I do not use code folding and I do not like it even if my ide (emacs) can do it
[21:47:44] <surial> ~lambda4jdt is a plugin for eclipse that folds anonymous inner class instances that only contain 1 line of actual code into a single line in the eclipse java editor. Effectively allows you to -read- BGGA, but because its folding, you can't edit or write them BGGA-style. See http://code.google.com/p/lambda4jdt/
[21:47:44] <javabot> Okay, surial.
[21:48:02] <ernimril> surial: most people who use code folding use it because they write too long methods or have way too many methods in the class
[21:48:03] <surial> ernimril: Me neither, but it's a cool hack.
[21:48:55] *** ryuho has joined ##java
[21:49:28] <ernimril> surial: not really, for some reason I did like code folding 13-14 years ago, guess I have changed the way I code since then
[21:49:57] <surial> folding itself isn't the hack that I thought is cool. It's the lambda4jdt plugin.
[21:50:03] <cybereal> I like code folding for one thing: import lists
[21:50:16] <cybereal> but that's because I let my IDE deal with those and so I don't need to see them or care about them
[21:50:40] *** Vicfred has joined ##java
[21:50:42] <blahjake> i fold imports and javadoc by default
[21:50:48] <surial> cybereal: The folding implementation of jedit and eclipse, then, yes - only import lists. But lambda4jdt does indicate more useful folding constructs. I would totally not mind a public basic getter to fold into its field.
[21:51:06] <surial> especially if the folding action does indicate on the field line that there's a normal getter.
[21:51:07] <surial> something like:
[21:51:22] <surial> > (getter) private int foo;
[21:51:27] *** pirho has left ##java
[21:51:28] <surial> where the > is the folding indicator in the margin.
[21:51:32] <surial> just a thought.
[21:51:35] <ernimril> if you want one line getters then write then on one line "public int getFoo () { return foo; }"
[21:51:42] <ernimril> no need to use folding for that
[21:51:44] <surial> that's still 2 lines.
[21:51:51] <surial> that, and the actual foo declaration.
[21:51:56] <cybereal> surial: I'd really rather see java get around to adding real properties and synthesis of the getters as seen in Obj-C :) but yeah that's not too bad of an idea
[21:52:07] <surial> cybereal: agreed, but, stopgap.
[21:52:19] <rgravener> i'd like to be able to pass around methods
[21:52:19] *** durka42 has quit IRC
[21:52:21] <rgravener> in java
[21:52:36] *** ridoo has quit IRC
[21:52:41] <surial> you could do the same thing for setters, and even add a property-setter fold (where setting also fires off a PropertyChangeEvent, and the addPropertyChangeListener/removePropertyChangeListener, and the actual PropertyChangeListeners object to hold the listeners, are all folded away).
[21:52:56] <surial> rgravener: You can't pass methods themselves.
[21:53:00] *** ramdam has quit IRC
[21:53:13] <rgravener> you can do in flex
[21:53:14] *** convivial has quit IRC
[21:53:19] <cybereal> rgravener: methods are incomplete without their associated class, perhaps you mean that you want first class functions in java along with the ability to pass them?
[21:53:21] <surial> rgravener: and in many other languages, but not in java.
[21:53:30] <surial> rgravener: You may want to look at anonymous inner class literals.
[21:53:33] <cybereal> rgravener: or do you want selector syntax, also seen in obj-c?
[21:53:35] <surial> ~~rgravener anonymous inner class
[21:53:35] <javabot> rgravener, anonymous class is essentially a local class without a name. See http://www.developer.com/java/other/article.php/3300881
[21:53:43] <rgravener> i know what anonymous inner classes are
[21:53:47] <rgravener> i want everything
[21:53:53] <rgravener> java seems so limited when learning a new language
[21:53:54] <surial> Use groovy. Or scala.
[21:53:55] <rgravener> you are like, wtf
[21:54:02] <rgravener> how come i never learned this
[21:54:14] <surial> Yes, java is a piss poor programming teaching tool.
[21:54:15] <cheeser> learned what?
[21:54:25] <cheeser> it is not piss poor at all.
[21:54:31] <waz> scala!
[21:54:34] <rgravener> i just want to learn
[21:54:36] * waz bows
[21:54:40] <surial> This isn't the place to effectively complain about it though. As far as I know, none of us have either the sway or the inclination to fix education.
[21:54:45] <cheeser> it certainly doesn't encompass every possible technique but no/few languages do.
[21:54:45] <rgravener> java is good for teachin data structures
[21:55:00] <rgravener> but learning a new language coming from java is not so simple
[21:55:03] <cheeser> it *is* one of the more approachable languages ( or at least pre-1.5 )
[21:55:06] <cybereal> I work in educatio
[21:55:06] <cybereal> n
[21:55:08] <cybereal> heh
[21:55:18] <rgravener> so do me
[21:55:32] <cybereal> but definitely do not have influence over teaching practices or curriculum
[21:55:52] <MacFlecknoe_> whats so bad about it
[21:56:05] <rgravener> its too good
[21:56:20] *** riotz has joined ##java
[21:56:22] <MacFlecknoe_> huh
[21:56:26] *** DjZemich has joined ##java
[21:56:40] <MacFlecknoe_> can you please elaborate
[21:56:49] <rgravener> sorry, its friday.
[21:56:55] <rgravener> and i'm programming j2me
[21:57:57] <MacFlecknoe_> oh that explains it... :-/ ... why dont you go off to #linux and shout "freebsd forever" or something
[21:58:11] <surial> The 3 biggest educational problems with java is A) vast amounts of voodoo, and B) lacks certain things which many other languages have and which are important concepts, such as closures, and C) Not nearly enough instant feedback along with a relatively complicated compile/run cycle that requires an IDE from day 1 or a day or two learning all about classpaths (yich).
[21:58:21] *** convivial has joined ##java
[21:58:30] <surial> None of these are in any way or form relevant to java as a language itself, except maybe item B, but for introductory programming courses, those are very big problems.
[21:58:57] <surial> assuming for a moment that that's what you wanted elaboration on, MacFlecknoe_.
[21:58:59] <cheeser> java does not require an idea.
[21:59:01] <cheeser> ide
[21:59:22] <cheeser> god forbid!
[21:59:31] <surial> That's not the right thing to be doing on day 1 and day 2.
[21:59:39] <cheeser> learning stuff at a uni! oh, the humanity!
[21:59:57] <MacFlecknoe_> so other classes dont use libraries? can you tell me what voodoo you are taling about? is memory management voodoo or are you referring to something else
[22:00:04] <surial> on day 1 and day 2, you need to be playing around with evaluating 5+5, and sorting through lists or some other trivial task.
[22:00:18] <cheeser> surial: which can and has been done with java.
[22:00:23] <waz> I'm baffled how for so many years I produced code that worked yet didn't use closures
[22:00:26] <surial> MacFlecknoe_: Take Hello World for example.
[22:00:29] <waz> it's really hard to fathom
[22:00:34] <MacFlecknoe_> i would argue its one hellava lot easier to pickup than c which doenst even have a decent ide
[22:00:40] <surial> MacFlecknoe_: there's public class. there's static. There's methods. There' System.out'....
[22:00:44] <cheeser> waz: you clearly are an inferior programmer and human being.
[22:00:52] * waz sulks
[22:00:57] <surial> MacFlecknoe_: When you're just learning to program, the teacher has to say: 'jsut take all that for granted for now - we won't cover 'static' for like another YEAR'...
[22:00:57] <joed> ~pet waz
[22:00:57] <javabot> pets waz affectionately
[22:00:58] <surial> that's bad.
[22:00:59] <cybereal> I dunno, seems like the very first thing I was taught to do in java was make fake closures out of anonymous inner classes
[22:01:06] <surial> on phone
[22:01:19] <waz> is there a special pill that I take that makes me think that closures are one of the most important parts of any language?
[22:01:29] <cybereal> not that I think that's a particularly special problem but it does seem to warrant their inclusion in the language
[22:01:30] <joed> The blue one.
[22:01:49] <waz> damn, I had the red
[22:02:06] <cheeser> at least you won't get pregnant now
[22:02:20] *** em_pleh has left ##java
[22:02:21] <waz> but I want more kids
[22:02:22] <waz> grr
[22:02:26] <waz> this is all going wrong
[22:03:14] <joed> Hahahaha
[22:03:40] *** eidolon has quit IRC
[22:03:52] <MacFlecknoe_> what exactly can you do in java in terms of closures
[22:03:55] <MacFlecknoe_> er cant
[22:04:14] <waz> you ignorant slut
[22:04:18] <MacFlecknoe_> you define an abstract class and fill it in anonymously
[22:04:37] <_W_> MacFlecknoe_, I think you'll find that there are few things you can't do in most general-purpose languages - the question is how easy it is
[22:04:50] <surial> ~_W_++
[22:04:50] <javabot> _w_ has a karma level of 24, surial
[22:04:52] <cybereal> MacFlecknoe_: you can emulate them but it's quite a lot of boilerplate for such a common task
[22:04:59] <cheeser> or how "readable" which is subjective and fappery prone
[22:05:08] <cheeser> it's not *that* much at all.
[22:05:15] <cybereal> MacFlecknoe_: the point of such language features is to reduce the complexity of common tasks
[22:05:20] <cheeser> you just have to have a predefined type: interface or class
[22:05:25] <_W_> oh yes, let no one missunderstand me for a closures-in-java proponent
[22:05:28] *** riotz has quit IRC
[22:05:38] <MacFlecknoe_> you reduce the complexity by using interfaces and objects
[22:05:43] <MacFlecknoe_> but that an oo way of doing things
[22:05:49] <MacFlecknoe_> it IS an oo language afterall
[22:06:00] <cheeser> i agree. and the closures proposals all were fucking up the syntax.
[22:06:30] <surial> waz: Closures are not a very important part of a language spec. But if you're going to have a language for -teaching-, then it better damn well cover the concept.
[22:06:51] <MacFlecknoe_> its procedural by nature... i dont see the point
[22:06:55] * waz yawns
[22:06:55] <ayrnieu> you can't have nice direct sunlight through your skylights and also have an imposing skyscraper. Design decisions have design costs - but inexperienced programmers in particular often take language features as things that ought to be fungible and infinitely composeable.
[22:06:57] <cheeser> yeah. because we wouldn't have gotten to where we are without teaching closures.
[22:07:00] <surial> MacFlecknoe_: You cannot do non-local breaks, returns, continues, and exception transparancy with anonymous inner classes. The syntax is also fucking idiotic.
[22:07:06] <waz> and that means ANY language that doesn't have them is useless
[22:07:09] <waz> for teaching
[22:07:10] <cheeser> i remember the day my prof introduced closures in my C and asm classes.
[22:07:20] <waz> your prof sucked
[22:07:23] <surial> MacFlecknoe_: closures do not have any relation to nominal or structural typing. You can have closures just fine with only nominal typing.
[22:07:31] <waz> ~be cheesert
[22:07:32] <javabot> waz, I have no idea what be cheesert is.
[22:07:32] <surial> (a.k.a. using interfaces for everything)
[22:07:37] <waz> me either
[22:08:37] <surial> Liking how everyone jumped on this one thing, whereas it was the weakest of my 3 reasons.
[22:09:01] <waz> haha
[22:09:39] <surial> So, now defend java as a teaching tool in the face of all the voodoo involved in "Hello, World", and how there isn't a command line interpreter.
[22:09:49] <surial> You can teach with it. It's just sub-optimal.
[22:09:50] *** neuro_damage has quit IRC
[22:10:14] <surial> Also, as an aside: If you like java (and I do), then it behooves you to argue against using java as the main teaching language of the world. Because of that, the java community is overwhelmed with idiots.
[22:10:15] <waz> it was important enough for you to list it as one of 3 problems
[22:10:21] <ayrnieu> Forth is the ultimate teaching language, of course.
[22:10:22] *** nvictor has joined ##java
[22:10:24] <waz> you're the one who made it a big deal
[22:10:41] *** DjZemich has quit IRC
[22:10:45] <surial> waz: Let's say, for arguments sake, that you've convinced me that it isn't. Let's move on. Because there are still 2 big reasons why java sucks as a teaching language.
[22:10:58] <waz> i have no desire to convince you of anything
[22:11:06] *** nvictor has left ##java
[22:11:08] <cheeser> 1. because ricky doesn't like it. 2. because surial doesn't like it.
[22:11:11] <cheeser> i'm convinced!
[22:11:14] <waz> you can't run away from your point now
[22:11:17] <MacFlecknoe_> lol
[22:11:23] <waz> you make a point then back peddle
[22:11:26] <waz> admirable
[22:12:06] <cheeser> he's just unwinding the stack after encountering an exception
[22:12:08] <surial> Yes, my point was: Java sucks as a teaching language. I believe I can make my case most effectively with this particular crowd by focussing on Hello World voodoo and lack of an interpreter.
[22:12:12] *** oxi has quit IRC
[22:12:28] <blahjake> agreed on hello world, too much biolerplate
[22:12:44] <waz> you're the one who brought up Hello world!
[22:12:45] <surial> We could continue in 'stuff that would be good to learn, but which java is bad at' if you'd like, but that's going to take much longer.
[22:12:46] <waz> hahahqa
[22:12:48] <waz> man
[22:12:50] <blahjake> same thing with lack of closures, this is absurd: new Runnable() { public void run() { oneCall(); } }
[22:13:01] <surial> waz: What the fuck are you on?
[22:13:16] *** ChanServ sets mode: +o waz
[22:13:18] <MacFlecknoe_> can you tell me what the problem with hello world is... im not clear
[22:13:26] *** waz sets mode: +b *!*@ip545054ce.speed.planet.nl
[22:13:33] <waz> enough of this crap and back peddling
[22:13:34] <cheeser> MacFlecknoe_: because you have to declare a class and a method
[22:13:46] <cheeser> MacFlecknoe_: the horror
[22:13:58] *** Marius has left ##java
[22:14:25] <MacFlecknoe_> have you looked at the system calls a hello world c program makes?
[22:14:28] *** oxi has joined ##java
[22:14:36] <MacFlecknoe_> its ridiculous
[22:14:41] <MacFlecknoe_> is that your argument?
[22:14:50] *** rdancer has joined ##java
[22:14:51] <MacFlecknoe_> the hidden complexity?
[22:15:02] <StanAccy> outrageous..
[22:15:12] <StanAccy> its just a damned outrage
[22:15:45] <MacFlecknoe_> we should all learn to program in 5 volt pulses... its what i have always said and belive to this day
[22:16:05] <StanAccy> ah, but then then you have to connect up those two wires...
[22:16:08] *** durka42 has joined ##java
[22:16:15] <StanAccy> you could never use that for teaching
[22:16:22] <MacFlecknoe_> lol
[22:16:46] <StanAccy> Im going to mail him a 2x4
[22:17:00] <StanAccy> with "only use for teaching"
[22:17:04] <StanAccy> written down the side
[22:17:33] *** jdolan_ has joined ##java
[22:18:32] *** riotz has joined ##java
[22:18:53] *** vix85 has quit IRC
[22:19:30] *** surial has quit IRC
[22:19:46] *** waz sets mode: -b *!*@ip545054ce.speed.planet.nl
[22:19:50] *** surial has joined ##java
[22:20:01] *** Mike-N-Go has joined ##java
[22:20:04] <surial> I missed about half of all that due to my IRC client crashing.
[22:20:12] <waz> heh
[22:20:42] *** toader has joined ##java
[22:21:04] <StanAccy> well. let me summarize: waz made a very convincing and definitive set of arguments about why you were wrong. We all agreed they were soundly thought out, and then we moved on.
[22:21:09] <surial> waz, MacFlecknoe_: I'll put it as simple as I can: Asking a student to take the meaning of 'static' as being magic voodoo (without it, it doesn't work, but I'm not going to explain to you what it does at this point in time. Ask me again in a month) is a hurdle.
[22:21:29] <toader> HI, when i run the program, the used heap size become bigger and bigger. Is it memory lead?
[22:21:31] *** phyburn has quit IRC
[22:21:31] <surial> Yes, the argument was: I don't want to argue, I"m an op, and fuck this idiot. A fine argument.
[22:21:40] <surial> I'm sure socrates would be proud.
[22:21:53] * StanAccy shrugs - Ive never met the guy
[22:21:57] *** ridoo has joined ##java
[22:22:03] <StanAccy> toader: Sure seems that way
[22:22:22] <toader> StanAccy: so, how should i do?
[22:22:33] <surial> toader: Without seeing the program, I'd have to guess. So, I'll guess: java doesn't particularly feel the need to garbage collect until its covered a lot of heap. So it just grows until a certain limit, and you haven't hit that limit yet. You can set this limit with -Xmx10m (for 10mb). the default is 64 on most VMs.
[22:22:36] <StanAccy> toader: how should you what? drive? swim?
[22:22:56] <cybereal> MacFlecknoe_: they're not making very good cases. I don't think java's necessarily bad, but it can't be the only language, especially in a general purpose program like "computer science." It is pretty limited in the programming paradigms it promotes. You should review this list http://en.wikipedia.org/wiki/Programming_paradigm and hopefully you'll see that many methodologies are only achievable through backward hacks in java whereas another language mig
[22:23:08] *** vesz has quit IRC
[22:23:28] <surial> cybereal: Thanks for keeping my faith in this channel at least somewhat alive. Not often that you get bullied by two ops with asinine arguments.
[22:23:29] <cybereal> still even some of the more esoteric paradigms are implemented, one way or another, in java, which is handy
[22:24:13] <toader> surial: I have used java -Xms1024m -Xmx2048m -XX:-UseGCOverheadLimit
[22:24:25] <surial> Right, so that means you've given java 2 gigabytes of heap.
[22:24:48] <StanAccy> toader: On a 32 bit JVM?
[22:24:51] <surial> Which java pretty much takes as: Cool. I'll not care particularly much about collecting the garbage until we're getting close to that limit.
[22:25:14] <cybereal> toader: what's the problem, you're scared because java uses memory in a different way than you're used to seeing?
[22:25:18] <toader> surial: there is a loop in my program, in the loop there is getConnection() to get connect to MySQL
[22:25:27] <surial> do you close that connection?
[22:25:32] <StanAccy> toader: Post your code on the pastebin
[22:25:40] <toader> yes, i have close it
[22:25:53] * StanAccy takes odds on that...
[22:26:08] <surial> the creating and closing and management of connections lies with the mysql jdbc driver which may not be playing nice. Who knows. Either way, use a profiler. It has ways to tell if memory is leaking, by e.g. forcing a garbage collect. System.gc() does not FORCE a garbage collect (it merely hints the need for one), but a profiler CAN force it.
[22:26:26] <toader> http://paste.pocoo.org/show/103014/
[22:27:11] <waz> oddly I've never seen any teacher tell a student static is voodoo.
[22:27:23] <waz> I love all the straw men though!
[22:28:00] *** jbwiv has quit IRC
[22:28:16] <toader> When a loop finishes, it run getConnection() again, at this moment the heap size grows much more.
[22:28:54] <StanAccy> toader: Thats a connection pool. correct?
[22:29:03] <surial> waz: 'voodoo' was not meant as a literal quotation, of course. It was meant as: A teacher simply won't explain what it does, or tersely does so in a way that the student doesn't really understand it. How could he? Before static even makes sense you need to know all about classes, instances of classes, and preferably namespaces, and to be complete, inheritance and how it doesn't apply to static.
[22:29:16] *** traxy has quit IRC
[22:29:17] <StanAccy> surial: Get some better teachers
[22:29:32] <toader> StanAccy: yes
[22:29:50] <StanAccy> toader: And when using a connection from a connection pool, do you normally close it or return it to the pool?
[22:29:51] <toader> StanAccy: but the connection pool, there is on one connection
[22:29:56] <waz> you back peddle a lot
[22:30:05] <toader> StanAccy: yes
[22:30:16] <surial> StanAccy: From the magic fairy land? Whatever. No teacher can explain every aspect of hello world to a complete programming newbie in about 5 minutes.
[22:30:29] <StanAccy> surial: Sure they can
[22:30:35] <toader> StanAccy: you can see, i have mysqlPool.closeAllConnections();
[22:30:55] <waz> yeah! Static is a year two topic!
[22:30:55] <StanAccy> surial: maybe just because you didnt understand it for a month doesnt mean that others dont
[22:30:56] <surial> StanAccy: I think if you say that 5 more times, it'll magically become truth.
[22:31:03] <waz> oh wait, surial didn't really mean that either
[22:31:20] <StanAccy> toader: Thats a really odd usage of a connection pool
[22:31:32] <surial> I give up. You're right. hello world in java is just as easy to understand as hello world in python. Or groovy. Or scala.
[22:31:48] <StanAccy> or C, or C++ or Modula2, or Pascal
[22:31:54] *** mistik1_ has joined ##java
[22:31:56] <toader> StanAccy: so, is there any new ways to use connectio pool?
[22:32:07] <StanAccy> toader: Let me ask you this - why use a connection pool?
[22:32:39] <toader> StanAccy: acutally no reason, it is not necessary
[22:33:03] <toader> StanAccy: does it make any difference?
[22:33:31] <StanAccy> toader: not really what I was asking, but try it without it
[22:33:37] <StanAccy> also, why do you keep closing all the connections>
[22:33:38] *** mistik1 has quit IRC
[22:33:45] *** mistik1_ is now known as mistik1
[22:34:42] *** Afterlawl has joined ##java
[22:34:57] *** mbroeker has quit IRC
[22:34:58] <toader> StanAccy: I just try. there is mysqlPool.free(conn); but it is same
[22:35:17] <StanAccy> toader: why do you keep getting a new connection?
[22:35:24] <StanAccy> toader: how many do you need?
[22:35:55] <toader> StanAccy: actually only one is enough, connectionPool is not necessary
[22:36:08] <StanAccy> ok, so just use one connection
[22:36:16] <StanAccy> open it, once. Close it, once.
[22:36:51] <StanAccy> you are currently closing it within the loop
[22:36:54] <toader> StanAccy: yes, so u can see my connectonPool, i just give the quato 1
[22:37:18] <toader> StanAccy: yes,
[22:37:24] *** casmo has quit IRC
[22:37:26] <StanAccy> I can see the pool, yes. But once you get a connection, why close it until you have finished with it?
[22:38:41] *** Absolute0 has quit IRC
[22:38:50] <StanAccy> you also have a problem on line 46
[22:40:49] *** Pelao has quit IRC
[22:42:01] <toader> StanAccy: what is the problem on 46
[22:42:25] <toader> StanAccy: while (rs.next()) {
[22:42:35] <toader> StanAccy: is this line?
[22:42:39] <StanAccy> yes
[22:42:53] <toader> StanAccy: what is the matter?
[22:43:51] <blahjake> surial i'm with you on hello world, all its supposed to demonstrate is printing out "hello world", all the rest is noise that is justifiably glossed over for beginners
[22:44:38] <MacFlecknoe_> the concept of simply printing out the words "hello world" is best demonstrated using a pad of paper and a pen
[22:44:44] <surial> blahjake: It's a shame that beanshell isn't really maintained much anymore.
[22:45:02] *** Mike-N-Go has quit IRC
[22:45:03] <MacFlecknoe_> but then you have to take the pen for granted
[22:45:26] <toader> StanAccy: I cannot find the problem. It is a normal use in this way
[22:45:27] <MacFlecknoe_> hmmm... perhaps you should begin at buddism and layer abstractions on top of it
[22:45:45] <surial> MacFlecknoe_: Teaching works better if there's some sort of feedback instead of continually having to say: Just trust me, this will work. You should look into didactic theory for more information on how to be effective in teaching anything to anybody.
[22:45:58] *** no7_ has joined ##java
[22:46:18] *** wans has quit IRC
[22:47:08] *** LinuS has joined ##java
[22:47:10] <whaley> heh.
[22:47:26] <StanAccy> ~surial interesting
[22:47:26] <javabot> StanAccy, I have no idea what surial interesting is.
[22:47:30] <StanAccy> bah
[22:47:37] <StanAccy> ~~
[22:47:39] <LinuS> hi, i'm trying to use java web start but i'm encountering some difficulties
[22:47:54] <LinuS> do i get a standard input and standard output in jws too?
[22:48:17] <toader> StanAccy: Could you me what the problem is? thanks
[22:48:19] <blahjake> LinuS: you get a standard out for sure
[22:48:33] <StanAccy> toader: well, its not the while()
[22:48:34] <blahjake> LinuS: however, if webstart isn't configured to show the console you won't see it
[22:48:46] *** LostMonarch has quit IRC
[22:48:46] <LinuS> i had an exception on this line: op = opParse(buffer.readLine());, where buffer was InputStreamReader flusso = new InputStreamReader(System.in);
[22:48:46] <LinuS> BufferedReader buffer = new BufferedReader(flusso);
[22:49:11] <blahjake> LinuS: which class was the exception?
[22:49:12] *** Freelance-Java has joined ##Java
[22:49:15] <LinuS> mom
[22:49:35] <LinuS> error: handle not valid and then in details
[22:49:43] <toader> StanAccy: Ok, now i am running with on connection pool
[22:49:52] <toader> StanAccy: no connectionPool
[22:50:04] <StanAccy> ok, so where now do you open and close the connection?
[22:50:14] *** armyriad has joined ##java
[22:50:19] <LinuS> moment, i'm pastebinning it
[22:50:29] <toader> StanAccy: Out of the loop
[22:50:41] *** ridoo has quit IRC
[22:50:44] <LinuS> http://rafb.net/p/jA0l4u39.html
[22:50:58] *** aleksei has joined ##java
[22:51:01] <oxi> hi
[22:51:14] <aleksei> hey
[22:51:31] <toader> StanAccy: You can see here http://paste.pocoo.org/show/103015/
[22:51:35] <surial> LinuS: OS?
[22:51:41] <LinuS> win xp sp3
[22:51:48] <surial> LinuS: And it would help if you pastebinned your code as well.
[22:51:54] <LinuS> sure
[22:52:03] <StanAccy> toader: Great. So you are trying to load a million rows at a time?
[22:52:24] <toader> StanAccy: yes
[22:52:26] <LinuS> here it is
[22:52:26] <LinuS> http://rafb.net/p/NRikxZ38.html
[22:52:59] <surial> LinuS: Okay, I'll run your code in a moment, because it almost seems like a weird OS bug, but, general piece of advice:
[22:53:10] <surial> For reading human-entered stuff off of the command line, you may want to look at Scanner. It's a lot easier to use.
[22:53:13] <surial> ~~LinuS javadoc Scanner
[22:53:14] <javabot> LinuS: http://is.gd/izIT [java.util.Scanner]
[22:53:15] <StanAccy> toader: Thats a lot of data
[22:53:49] <surial> LinuS: and you do know about BigInteger right?
[22:53:53] <surial> ~~LinuS javadoc BigInteger
[22:53:53] <javabot> LinuS: http://is.gd/iFPj [java.math.BigInteger]
[22:53:56] *** zmanning_ has joined ##java
[22:54:05] <toader> StanAccy: not many. I am planning to test by loading 10m, 20m, ....100m
[22:54:17] <LinuS> i do but BigNumber class is my discrete math project
[22:54:19] <zmanning_> anyone know the property to set the default charset for javamail?
[22:54:22] <LinuS> implementing it i mean :)
[22:54:57] *** durka42 has quit IRC
[22:54:58] *** no7 has quit IRC
[22:55:12] *** bas-i has quit IRC
[22:55:19] <blahjake> LinuS: for testing, do you get an IOException if you call flusso.read() after instantiating it?
[22:55:47] <LinuS> let me try
[22:55:53] <surial> LinuS: Code works fine on mac os x.
[22:56:12] <LinuS> no, blahjake
[22:56:17] <toader> StanAccy: it is same. On loading the second miillion, the heap sized grow up sharply and dont drop down any more.
[22:56:37] <StanAccy> toader: What does your addition.addTriple() method do?
[22:56:39] <LinuS> surial: might it be my jnlp file then?
[22:56:43] *** igordcard has quit IRC
[22:56:56] <surial> LinuS: Yes.
[22:57:16] <surial> LinuS: I'm guessing that internally, System.in is set to nothing, and that's why you get an invalid handle error.
[22:57:39] <oxi> does anyone know how I can access a servlet filter once it's instanciated?: <filter-name>fooFilter</filter-name><filter-class>my.foo.bar.superFilter</filter-class></filter>
[22:57:45] <toader> StanAccy: It insert data to the PostgreSQL database
[22:57:50] <LinuS> hmm, any clues on how to read user input then?
[22:58:15] <surial> LinuS: I believe there's a a way to tell jnlp to spool up a console. If not, it shouldn't be too hard to create a JTextArea and cook up some InputStreams and OutputStreams that read and write from that.
[22:58:37] <toader> StanAccy: now it is loading data from MySQL to PostgreSQL
[22:58:44] <LinuS> i'll check that out
[22:59:14] <blahjake> lack of IOException on read() hints that System.in is ok
[22:59:47] <ojacobson> oxi: the servlet container doesn't give you anything for accessing specific filter instances. You might consider using Spring - you can set up a filter as a spring bean and inject it into tools that need to manipulate it.
[23:00:01] <LinuS> well, my application run from java Progetto.class was actually ok blahjake
[23:00:15] <LinuS> i've got that exception when trying to open it via java web start
[23:00:28] *** _acid__ has quit IRC
[23:00:30] *** waz has quit IRC
[23:00:31] *** G0-T0 has joined ##java
[23:00:31] *** romanb has quit IRC
[23:00:45] <LinuS> or were i meant to test the flusso.read() into jws? if so, sorry, didn't got it
[23:00:51] <StanAccy> toader: So that addition() method triggers an insert into a different DB?
[23:00:59] <oxi> ojacobson: hmm, there must be a way to access it, if you have a look at this:
[23:01:04] <oxi> ojacobson: https://issues.apache.org/bugzilla/show_bug.cgi?id=24970#c30
[23:01:16] *** UK-sHaDoW has quit IRC
[23:01:17] <blahjake> Linus: ah nod, i meant test it in webstart
[23:01:38] <toader> StanAccy: yes
[23:01:49] <LinuS> i'll do it now then
[23:01:53] *** staykov has quit IRC
[23:01:57] <oxi> ojacobson: this guy created a pulic method to set the content type through his filter. Though I have no idea how I accesses that method
[23:02:09] <toader> StanAccy: you can see here the picture of the used Heapsize: http://picasaweb.google.com/groupme/Work#5299808131470725218
[23:02:40] *** rgravener has quit IRC
[23:02:43] <ojacobson> oxi: he's modifying the request
[23:02:53] <oxi> ojacobson: I understand your idea with spring and I think that it would work. But I'm not so familiar with spring and I don't want to add that dependency.
[23:03:12] <ojacobson> that is, instead of passing on the request he got in the first place, he's creating a new request (Decorator pattern) around it with an extra behaviour on the setContentType method *on the request*
[23:03:16] <ojacobson> the method is not on the filter
[23:03:25] <oxi> ojacobson: ok, but do you have any idea where and how he calls setContentType?
[23:03:30] <zmanning_> hey guys when sending a message using javamail i cant get my subject line to process the text as utf-8. i am setting the mail.mime.charset property to UTF-8 with no luck. is the correct way to proceed?
[23:03:32] *** mhanlon is now known as rollins
[23:03:38] <ojacobson> his servlet calls setContentType on the request
[23:04:18] <toader> StanAccy: Do u think it is Memory leak?
[23:04:27] <ojacobson> (or his JSP declares a content type in the <%@page directive, equivalently)
[23:04:32] <oxi> ojacobson: I see. Thanks a lot for explaining this.
[23:04:51] <StanAccy> toader: Reduce your -Xmx setting down to 600M
[23:05:04] <oxi> ojacobson: I tried this first, but it seems to me that I have trouble to get it to work
[23:05:21] <StanAccy> and set your min heap size to something lower, like 246M
[23:05:30] <ojacobson> sorry, on the response, not the request
[23:05:34] <ojacobson> same idea though
[23:05:45] <ojacobson> he's creating a wrapper response and passing that through the rest of the filter chain
[23:05:46] <oxi> ojacobson: this is how I set the contenttype: getPageContext().getResponse().setContentType("video/quicktime")
[23:06:05] <oxi> ojacobson: now as you see I have big trouble with tomcat adding a charset
[23:06:05] <ojacobson> oxi: if you're doing that in a JSP, why are you using JSP to serve video?
[23:06:16] <ojacobson> That sort of thing is better-suited to a servlet
[23:06:25] <toader> StanAccy: if i set it smaller, it will throw exception as i query 1m data once.
[23:06:26] <oxi> I belive this is a bug since 2003 and it will never be fixed
[23:06:31] <ojacobson> at that point you can just use the response you're passed in the onGet/onPost/service method
[23:06:43] <toader> StanAccy: I have tried before, so i have to set it to bigger
[23:06:55] <StanAccy> toader: Look at your heap profile you should be ok with 600M
[23:06:57] <oxi> I'm serving a server generated SMIL file which is kind of a w3c xml standard for videostreams
[23:07:02] *** ofl_ has quit IRC
[23:07:22] <ojacobson> ah
[23:07:32] <oxi> and quicktime doesn't like that tomcat is adding a charset to the end of the http conten-type response header
[23:07:32] <ojacobson> then consider using the <%@ page directive rather than setting it programatticaly
[23:07:38] <ojacobson> ~google jsp page directive
[23:07:39] <javabot> http://letmegooglethatforyou.com/?q=jsp+page+directive
[23:07:57] <oxi> I don't really want to change the tomcat source code allthough that would be the easiest solution
[23:08:30] <oxi> ojacobson: I'm using coldfusion, but it's techniques are very similar to jsp
[23:08:44] *** [TechGuy] has quit IRC
[23:08:57] <oxi> ojacobson: and coldfusion is capable of accessing the underlying java stuff
[23:09:50] <cybereal> oxi: does your SMIL have an xml preamble whose charset mismatches the one tomcat adds to the content-type header?
[23:09:51] *** LinuS has quit IRC
[23:10:10] <cybereal> or, if it doesn't have a preamble or that optional specification, is tomcat not sending utf-8 as the charset?
[23:10:17] <cybereal> either of those two cases might piss off a strict xml parser
[23:10:19] *** ScottG489 has quit IRC
[23:10:37] <cybereal> or rather a strict http + xml reading utility :)
[23:10:47] <oxi> cybereal: very good point, I have to check this
[23:11:07] *** igordcard has joined ##java
[23:11:44] *** G0-T0 has quit IRC
[23:11:54] <oxi> cybereal: no it's not setting any charset:
[23:12:04] <oxi> cybereal: SMILtext<smil xmlns:qt="http://www.apple.com/quicktime/resources/smilextensions".....
[23:12:05] <toader> StanAccy: i have no idea. Maybe i should use gc
[23:12:25] *** Varox has joined ##java
[23:12:28] <oxi> cyberreal: while that weird start with SMILtext<.... is required in my setup
[23:12:33] *** otep has quit IRC
[23:12:40] *** beol has quit IRC
[23:13:13] <oxi> tomcat is sending utf-8, yes, but I need tomcat not to send anything and that's the big trouble :-)
[23:13:24] <ojacobson> oxi: can you show the HTTP headers?
[23:13:25] <cybereal> oxi: no, the big trouble is that your client is retarded
[23:13:27] <ojacobson> (pastebin)
[23:14:02] <ojacobson> cybereal: I'm not sure what the mime spec says about unfamiliar qualifiers on content types
[23:14:06] <oxi> cybereal: alright, you're probably right about that, but I can't change the quicktime player :-)
[23:14:09] <ojacobson> it might actually say you need to bounce them
[23:14:51] <oxi> ojacobson: yes I need to bounce them
[23:15:18] <ojacobson> oxi: if that's what the RFC says. If that's not, then you're being retarded. :)
[23:15:26] <cybereal> ojacobson: http specifies a delimiter to be used in that header, the mime part of it ends at the semi-colon, non-inclusive
[23:16:01] *** ScottG489 has joined ##java
[23:16:02] <cybereal> however a buggy client is hardly uncommon in the http world, especially one that's generally tied to an existing server implementation :)
[23:16:10] <oxi> this is the response header in tomcat gets: Content-Type: video/quicktime;charset=UTF-8
[23:16:37] <ojacobson> the http rfc is silent on whether you ignore or reject unknown type parameters
[23:16:49] <oxi> but if I just server a static *.mov file, then everything works fine and the response header gets: Content-Type: video/quicktime
[23:17:40] <cybereal> oxi: from what I remember about tomcat, the only way you'll get the effect you're seeing is because the content type is being set to text/* before it's set to application/whatever
[23:17:43] *** StanAccy has quit IRC
[23:18:03] *** Jonny_ has quit IRC
[23:18:13] <ojacobson> which is probably because he's setting the content type programattically from a JSP
[23:18:21] <ojacobson> rather than using the <%@page directive like god intended
[23:19:02] <oxi> cybereal: you might be right about that. I think I read something like that. Though I have no idea where and why tomcat is setting to text/* first
[23:19:09] <ojacobson> which is probably because he's setting the content type programattically from a JSP
[23:19:12] <ojacobson> rather than using the <%@page directive like god intended
[23:19:17] <ojacobson> stop being thick
[23:19:23] <ojacobson> google the terms that are unfamiliar
[23:19:26] <ojacobson> try it and see if it fixes your problem
[23:19:30] <cybereal> there's also the possibility of how you're outputting, if it's a servlet vs. a jsp, if it's a servlet and you're not using ServletOutputStream, etc.
[23:19:45] <oxi> and I believe that the charset is right for text/* according to the servlet rfc, but not for application mime types and not for xml
[23:20:05] <cybereal> basically somehow you're making tomcat think that you're sending text (which, actually, you are, even though your mime type indicates otherwise)
[23:20:18] <oxi> here's a demo: http://ltn-stream.unibas.ch/cvtreff/2007-12-12/index.html
[23:20:23] *** M[]ssad_ has quit IRC
[23:20:33] <oxi> there's a static file and everything is fine
[23:20:34] *** eidolon has joined ##java
[23:21:25] *** sombriks has joined ##java
[23:21:28] *** igordcard has quit IRC
[23:21:45] <oxi> the weird thing: when I put a static *.mov file in tomcat, everything is fine and it picks video/quicktime as mime
[23:22:02] <cybereal> right
[23:22:13] <cybereal> that's not weird at all
[23:22:13] <oxi> but if I generate it with jsp/java/coldfusion, whatever tomcat really loves to add video/quicktime;charset=UTF-8
[23:22:21] <cybereal> what's weird is programmatically sending non-text in a servlet
[23:22:24] <oxi> I didn't find any way to prevent this yet
[23:22:35] <cybereal> tomcat's optimized/designed for the more common case of sending characters
[23:22:38] *** NielsD has joined ##java
[23:22:41] <oxi> cybereal: ok, I give you right on this
[23:23:07] <oxi> but there must be a nice clean way to serve non-text in tomcat without having to change it's sourcecode
[23:23:18] <cybereal> so if I was in your position I'd be looking for a way to avoid any indication of sending text :)
[23:23:33] <cybereal> yeah, writing a plain servlet and using the correct output stream
[23:23:40] <cybereal> I've done this for images
[23:23:52] <oxi> cybereal: ok, I give you right again
[23:24:20] <SniperFodder> Does tomcat have a configuration file?
[23:24:27] <SniperFodder> I've never worked with it before So I wouldn't know...
[23:24:34] <cybereal> it has several, potentially quite a few
[23:24:43] <oxi> SniperFodder: yep several
[23:24:58] <SniperFodder> kk, Here's what I'm thinking then...
[23:25:08] <SniperFodder> Correct me if I'm wrong... but Doesn't appache web server
[23:25:13] <oxi> cybereal: you're right!!!
[23:25:28] <oxi> cybereal: I don't know why I didn't think about this.
[23:25:32] <SniperFodder> have a section in it's config for setting the type of output it's sending?
[23:25:52] <SniperFodder> and if it does, then is it possible tomcat has such a section too?
[23:26:00] *** otep has joined ##java
[23:26:01] <oxi> I think it won't be easy, but I know there are ways to directly access streams with coldfusion
[23:26:21] *** fez has joined ##java
[23:26:36] <SniperFodder> Because what you guys have been talking about with the texte mime stuff
[23:26:42] <SniperFodder> reminded me of a setting in apache
[23:26:47] <oxi> I will look into this. I didn't expect that tomcat would stop doing this charset stuff when I directly acces the right streams, but you are right, this should really work
[23:26:55] <cybereal> SniperFodder: this is more complicated an issue than just defining a mime type
[23:26:57] *** hiredman has quit IRC
[23:27:03] <SniperFodder> Mmm, k
[23:27:05] <cybereal> SniperFodder: first of all, it's cold fusion built upon tomcat
[23:27:20] <SniperFodder> Yea, there lies the problem with me XD
[23:27:24] <cybereal> not just tomcat or this would be a non-issue, he'd write a plain servlet as I mentioned and just avoid the problem entirely
[23:27:28] <SniperFodder> I have never worked with serverlets before
[23:27:28] *** hiredman has joined ##java
[23:27:33] *** Bollinger has quit IRC
[23:27:40] <oxi> however I'm still curious how the external version would work where I filter the stuff, just as a proof of concept: https://issues.apache.org/bugzilla/show_bug.cgi?id=24970#c30
[23:28:01] <SniperFodder> *Shrug* Good luck. I'll go back to be annonymous for now...
[23:29:28] <cybereal> I have to get back to my work as well, too much to get done at 3:30pm
[23:29:31] <cybereal> on a damn friday
[23:29:37] <oxi> cybereal: not really, coldfusion comes as a war file, it could probably be put into resin, was, jboss, jetty and others
[23:29:52] *** monkeycid has quit IRC
[23:30:01] <oxi> cybereal: good, luck and thanks a lot!
[23:30:42] *** dmlloyd_ has joined ##java
[23:31:12] <cyth> anybody use ncurses with java? what library do you use?
[23:31:51] <AMcBain> ~~cyth jcurses
[23:31:51] <javabot> Console/terminal support: See JavaCurses - http://sourceforge.net/projects/javacurses/ and Charva - http://www.pitman.co.za/projects/charva/ and Jcurzez - http://www.nongnu.org/jcurzez/ and also "Console Window with a JTextArea Component" - http://javaalmanac.com/egs/javax.swing.text/ta_Console.html and Java 6.0's java.io.Console class.
[23:32:53] <hiredman> oooh
[23:32:59] <hiredman> that looks useful
[23:33:00] *** mengu has quit IRC
[23:34:00] *** drip has quit IRC
[23:34:28] *** whaLberG has joined ##java
[23:36:35] <cyth> meh nothing seems to be active, just curious. thanks
[23:37:05] <AMcBain> non-active doesn't mean that it isn't usable.
[23:37:08] *** quarsaw has left ##java
[23:38:48] *** thecarlhall has quit IRC
[23:39:07] *** ReTaL has joined ##java
[23:39:45] <ReTaL> hello hello
[23:39:48] *** dmead has quit IRC
[23:40:01] <cyth> AMcBain, right but in this case I think I'd rather use python.
[23:40:35] <AMcBain> that's a total nonsequitor ... "can you do ncurses with Java? ... let's use python"
[23:40:59] *** davidc has quit IRC
[23:41:01] <ReTaL> I have a crazy experience on my friday night. I try to store extra information in the exceptions i throw. More precisely i story a linked list of exceptions.
[23:41:03] <ReTaL> But while debugging i see this information just gets lost! How can this be? can one only store exceptions inside the cause member of an exception?
[23:41:04] <cybereal> you could use jni
[23:41:16] <cybereal> and just use actual ncurses :)
[23:41:22] <cybereal> or hey jna maybe even easier...
[23:41:55] <cybereal> cyth: does it have to be in the actual console, or could you provide your own terminal emulator in swing? because javassh has a good one associated with it
[23:42:07] <cybereal> vt102, etc.
[23:42:15] *** SpeedyGhost has quit IRC
[23:42:15] *** whaLberG has quit IRC
[23:42:15] *** NielsD has quit IRC
[23:42:16] *** riotz has quit IRC
[23:42:16] *** oxi has quit IRC
[23:42:16] *** gdoko has quit IRC
[23:42:16] *** Sulis has quit IRC
[23:42:16] *** kab has quit IRC
[23:42:16] *** indeterminatus has quit IRC
[23:42:16] *** Epcylon has quit IRC
[23:42:16] *** ozzloy has quit IRC
[23:42:16] *** zeel has quit IRC
[23:42:16] *** dmiles_afk has quit IRC
[23:42:16] *** ccherrett has quit IRC
[23:42:16] *** r0bby has quit IRC
[23:42:16] *** SinisterBen has quit IRC
[23:42:16] *** funktor has quit IRC
[23:42:16] *** kshepherd has quit IRC
[23:42:16] *** FauxFaux has quit IRC
[23:43:16] *** durka42 has joined ##java
[23:43:56] *** whaLberG has joined ##java
[23:43:56] *** NielsD has joined ##java
[23:43:56] *** riotz has joined ##java
[23:43:56] *** oxi has joined ##java
[23:43:56] *** Sulis has joined ##java
[23:43:56] *** kab has joined ##java
[23:43:56] *** indeterminatus has joined ##java
[23:43:56] *** Epcylon has joined ##java
[23:43:56] *** ccherrett has joined ##java
[23:43:56] *** ozzloy has joined ##java
[23:43:56] *** SpeedyGhost has joined ##java
[23:43:56] *** zeel has joined ##java
[23:43:56] *** dmiles_afk has joined ##java
[23:43:56] *** kshepherd has joined ##java
[23:43:56] *** r0bby has joined ##java
[23:43:56] *** SinisterBen has joined ##java
[23:43:56] *** funktor has joined ##java
[23:43:56] *** FauxFaux has joined ##java
[23:44:54] *** dmead has joined ##java
[23:45:32] <cyth> cybereal, i was hoping actual console.
[23:45:42] *** NielsD has quit IRC
[23:46:13] <cyth> cybereal, basically the idea was when a user logged on to a console they would be greeted by a user friendly control panel for development servers.
[23:46:16] *** dmlloyd has quit IRC
[23:47:20] *** psydian has quit IRC
[23:47:26] <cybereal> a command line is user friendly
[23:47:30] *** sphenxes has quit IRC
[23:47:41] *** adi112358 has quit IRC
[23:47:42] <cyth> I agree.
[23:47:50] <cyth> but not everyone sees it my way :)
[23:47:52] <cybereal> also, if done well, programmably interactive with like... expect ;)
[23:49:33] <zmanning_> hey guys for some reason certain unicode characters in emails i send are being replaced by =E9 and such. any idea why that would happen?
[23:49:39] *** toader has quit IRC
[23:49:58] <cybereal> maybe because email is teh such
[23:50:00] <cybereal> er teh suck
[23:50:49] *** reverend has quit IRC
[23:50:53] <cyth> zmanning_, you set the right char set in the mime headers?
[23:51:05] <zmanning_> cybereal: unfortunately its the best medium the internet has available for such communication
[23:51:21] <cybereal> XMPP is better
[23:51:24] <cybereal> :P
[23:51:26] <cyth> XMPP is hot
[23:51:30] <zmanning_> cyth: yea i set the system property but javamail autodetects
[23:51:47] <cyth> zmanning_, javax.mail?
[23:51:50] <zmanning_> cyth: the email header shows content type UTF-8
[23:51:57] <cyth> ohok
[23:51:59] <cyth> i dunno then
[23:52:26] <zmanning_> ah!
[23:52:32] <zmanning_> ah in frustration thatis
[23:52:40] *** MacFlecknoe_ has quit IRC
[23:52:46] <cyth> oh i thought that was an eureka ah.
[23:52:54] <cyth> wrong kind of ah
[23:52:57] <zmanning_> i wish it was
[23:53:14] <cyth> zmanning_, what type is the mail? text/plain?
[23:53:19] <zmanning_> text/html
[23:53:26] <zmanning_> but its happening in the subject line too
[23:53:33] <cyth> i blame the client
[23:53:40] <cyth> is that allowed?
[23:53:40] <zmanning_> vi?
[23:53:48] <cyth> yeah sure
[23:54:22] <zmanning_> off to the vi irc channel for support!
[23:54:27] *** waz has joined ##java
[23:54:44] <cyth> zmanning_, does it do it in all clients or just vi?
[23:54:58] <zmanning_> it was a bug filed i think maybe through outlook
[23:55:06] <zmanning_> verified on my local machine in vi
[23:55:07] <cyth> oh i see
[23:55:28] *** reverend has joined ##java
[23:55:36] *** psydian has joined ##java
[23:55:42] <zmanning_> an accented e should still be utf-8 right? :)
[23:56:02] <zmanning_> how annoying ive been on this all day
[23:56:06] <cyth> zmanning_, if it is utf-8 accented e :p
[23:56:54] <cybereal> zmanning_: lots of encodings have that
[23:57:29] <zmanning_> i know im just messing around, i know it does
top

   February 6, 2009  
< | 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 | >