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


NOTICE: This channel is no longer actively logged.

Toggle Join/Part | bottom
[00:00:01] <pgib> grr. I can't find this Jersey @Ref annotation anywhere
[00:00:48] *** okiwan has joined ##java
[00:01:07] *** sphenxes has quit IRC
[00:01:16] *** titankiller has quit IRC
[00:01:18] *** McMAGIC-- has quit IRC
[00:02:07] <Najjah> cbeust, is it ok?
[00:02:12] *** Matic`Makovec has quit IRC
[00:02:30] <Planck_> Najjah: What's the exact exception, line number, etc you get?
[00:03:02] *** askhl has quit IRC
[00:03:18] *** askhl has joined ##java
[00:03:40] *** yxz97 has quit IRC
[00:03:45] *** cool123 has quit IRC
[00:03:53] <Najjah> http://pastebin.com/aDGsBJ0J
[00:05:53] *** Pawnee has quit IRC
[00:07:01] *** Behold has joined ##java
[00:07:26] *** Vorrin has left ##java
[00:07:41] <Najjah> any insights Planck?
[00:07:43] <Planck_> Najjah: You're getting an ECLErr when creating the ECLSession
[00:07:56] <Planck_> That means sess isn't set, which causes the later NPE
[00:08:47] <Najjah> actually the problem happens when it tries to instantiate sess
[00:08:47] *** tilerendering has joined ##java
[00:08:57] <Najjah> sess = new ECLSession(configData);
[00:09:10] <Planck_> Yes, ie. "when creating the ECLSession"
[00:09:37] <Najjah> I believe the null pointer is in configData
[00:09:46] <Najjah> for some reason it's null when creating the ECLSession
[00:10:25] <Planck_> No, you have two different exceptions
[00:10:46] <Planck_> First, the ECLErr. Later, the NPE (causes by the earlier failure to set sess)
[00:11:27] <Planck_> The stack trace shows that pretty clearly
[00:11:32] *** mjrlrjm has joined ##java
[00:12:14] <Najjah> I understand. I thought it was causing the ECLErr due to the NPE
[00:12:16] <Planck_> Your code catches and prints the stack trace from the first exception, but then tries to continue on regardless
[00:13:04] *** Charrit has quit IRC
[00:13:19] *** eerie is now known as eerie_
[00:13:28] <Najjah> Thanks Planck. I'll make further researches on that ECLErr
[00:13:38] *** pipeep has joined ##java
[00:13:59] *** okiwan has quit IRC
[00:14:10] *** okiwan has joined ##java
[00:14:55] *** okiwan has quit IRC
[00:15:05] *** okiwan has joined ##java
[00:15:22] *** wad has quit IRC
[00:15:23] *** okiwan has quit IRC
[00:15:34] *** okiwan has joined ##java
[00:15:51] *** eerie_ is now known as eerie
[00:17:07] *** Garibaldi has quit IRC
[00:17:25] *** epalm has joined ##java
[00:17:25] *** Garibaldi has joined ##java
[00:20:57] *** ormaaj has quit IRC
[00:21:41] *** fuzzygroove has left ##java
[00:22:17] *** strull has joined ##java
[00:23:11] <echosystm> anyone here use groovy for writing unit tests?
[00:23:30] *** Najjah has quit IRC
[00:23:52] *** Naith has joined ##java
[00:23:56] *** Olathe has quit IRC
[00:25:21] *** pipeep has quit IRC
[00:25:40] *** l2trace99 has quit IRC
[00:25:43] *** McMAGIC-- has joined ##java
[00:26:15] *** pen16 has joined ##java
[00:26:20] *** pgib has quit IRC
[00:27:48] *** pipeep has joined ##java
[00:29:56] *** saml has quit IRC
[00:30:06] <whaley> echosystm: yes
[00:30:07] <mjrlrjm> Is there a decent library to access serial ports under both Windows, Unix, and OSX?
[00:30:29] *** Nikelandjelo has quit IRC
[00:33:29] *** Olathe has joined ##java
[00:33:30] <mapreduce> Both the following three things!
[00:33:36] <strull> I have a method that returns a Class. How do I create an object with this return-value?
[00:33:48] <mapreduce> ~~ strull javadoc Class
[00:33:48] <javabot> strull: http://is.gd/jIXeo [JDK: java.lang.Class]
[00:34:26] *** zatan has quit IRC
[00:34:47] <strull> aah, the newInstance() .... thank you
[00:34:54] <mapreduce> Grr, leaning on the case of my MBP causes a mouse click.
[00:36:53] *** pyrony has quit IRC
[00:37:56] *** Cymage has quit IRC
[00:40:26] *** X-Scale has joined ##java
[00:41:18] *** pyrony has joined ##java
[00:41:28] *** deSilva has joined ##java
[00:42:05] *** cocoloa has quit IRC
[00:42:36] *** Fisiu has quit IRC
[00:45:11] *** pantsman has quit IRC
[00:45:28] *** RDove has joined ##java
[00:47:23] *** freeone3000 has joined ##java
[00:48:18] *** wolfman2000 has joined ##java
[00:48:48] *** Cymage has joined ##java
[00:50:22] *** faust45 has quit IRC
[00:50:46] *** Xzil0 has quit IRC
[00:50:59] <echosystm> whaley: what mock framework did you find best for use with groovy?
[00:51:17] <whaley> echosystm: built-in MockFor and StubFor
[00:52:23] *** L-----D has joined ##java
[00:52:25] *** Luc1fel has quit IRC
[00:52:29] <echosystm> okie dokie
[00:52:32] <echosystm> thanks
[00:52:44] <whaley> echosystm: http://groovy.codehaus.org/Using+MockFor+and+StubFor
[00:52:49] <whaley> echosystm: and #groovy
[00:54:28] <lf94> Wow Java's Java2D library is insanely powerful
[00:54:37] <lf94> Or Im just not used to high level languages lol
[00:54:57] *** cythrawll has quit IRC
[00:55:02] <lf94> Could someone explain BufferedImageOp to me?
[00:56:05] <echosystm> whaley: whats the best way to make tests written in groovy run with maven test ?
[00:56:09] *** barq has quit IRC
[00:57:19] <whaley> echosystm: currently just annotating the groovy test classes with junit annotations - works just like it would on java test classes. Just stick them in src/test/groovy
[00:57:31] <echosystm> sweet
[00:57:34] *** fisted_ has joined ##java
[00:57:37] <echosystm> i dont need to add any dependencies to my pom?
[00:57:44] <echosystm> i didnt know maven was groovy-aware
[00:58:08] *** fisted has quit IRC
[00:58:22] <whaley> echosystm: you'll need the gmaven plugin
[00:58:31] *** PelleTut has quit IRC
[00:58:34] <cheeser> and ##groovy
[00:58:38] *** werdan7 has joined ##java
[00:59:19] <echosystm> ok thanks
[01:01:13] <echosystm> whaley: would i be able to pm you? there is no one in #groovy
[01:01:20] *** Versuchen has quit IRC
[01:01:27] <echosystm> ive waited for days for a reply in there :/
[01:01:34] <tjsnell> days eh
[01:01:47] <tjsnell> cool, it used to be measured in weeks
[01:02:16] <cheeser> they're trying. it's just groovy is so slow...
[01:03:19] *** arborist has quit IRC
[01:04:10] *** jink has quit IRC
[01:04:30] *** terranova has joined ##java
[01:04:30] *** jink has joined ##java
[01:04:40] *** terranova has quit IRC
[01:04:42] *** robbyoconnor has joined ##java
[01:05:10] *** terranova has joined ##java
[01:06:20] *** bizarrefish has quit IRC
[01:07:38] *** dyurds has joined ##java
[01:09:01] *** cyphorious has quit IRC
[01:09:04] *** meling has quit IRC
[01:09:56] *** Behold has quit IRC
[01:11:01] <whaley> echosystm: I really can't offer you much more than what was in that wiki page - which is all I really did
[01:11:17] *** gtrak has quit IRC
[01:11:33] *** jesmon has left ##java
[01:13:03] *** l3dx has quit IRC
[01:15:35] <lf94> Could someone explain BufferedImageOp to me?
[01:16:39] <echosystm> whaley: my question is about how to actually get maven set up - i've got org.codehaus.groovy.maven:gmaven-plugin in my build with thes testCompile goal set
[01:17:08] <echosystm> ive then got a test-scope dependency on org.codehaus.groovy.maven.runtime:gmaven-runtime-default
[01:17:35] <echosystm> but whenever i try to run test, i get ava.lang.NoSuchMethodError: org.codehaus.groovy.control.SourceUnit.getSource()
[01:19:31] <mrapple> will the funciton on line 83 of http://galwarcom.svn.sourceforge.net/viewvc/galwarcom/trunk/Common/Maths/VectorHelper.cs?revision=273&view=markup work in java?
[01:22:26] *** DerHorst has quit IRC
[01:23:04] <freeone3000> mrapple: No reason it wouldn't.
[01:23:12] *** terranova has quit IRC
[01:23:21] <whaley> echosystm: http://docs.codehaus.org/display/GMAVEN/Building+Groovy+Projects
[01:23:28] <whaley> (last one from me, since this is ##java)
[01:23:36] <echosystm> ok, thanks
[01:25:20] *** okiwan has quit IRC
[01:26:57] *** deSilva has quit IRC
[01:27:29] *** Fuco has quit IRC
[01:27:33] *** gyscos has quit IRC
[01:30:39] *** epalm has quit IRC
[01:32:18] *** syphar has quit IRC
[01:35:38] *** mjrlrjm has left ##java
[01:38:42] *** jpk has quit IRC
[01:39:50] *** psst has quit IRC
[01:43:44] *** gverig has joined ##java
[01:43:58] <gverig> Are there any good intrusive collections for Java?
[01:45:08] *** GeorgeBrabazon has joined ##java
[01:46:13] *** Ruudjah has quit IRC
[01:46:21] <freeone3000> What makes a collection intrusive?
[01:48:15] <gverig> freeone3000: If I have a reference to an object it's a contant time to remove it from a collection. Any collection , including lists and what not
[01:48:28] <freeone3000> So "Supports Iterator.remove()"?
[01:48:43] <freeone3000> I suppose that's not a constant-time guarentee.
[01:49:00] <gverig> freeone3000: no. Value has these properties. See boost instrusive.
[01:49:22] *** hex` has quit IRC
[01:50:22] <gverig> freeone3000: basically, you either extend something or have a member element that is "intrusive"- has visibility into internal collection structure (e.g. for list knows who's next and previous). So, if I want to remove I can just go to previous, set it's next to my next and do the same to the next and I'm out of collection
[01:51:03] <gverig> freeone3000: It helps in several cases but specifically when you have multiple indexes point to the same object. You need to look it up once and then can remove from all other indexes in constant time
[01:51:06] <freeone3000> ListIterator can do this, but doesn't guarentee constant-time.
[01:51:09] *** tewecske has quit IRC
[01:51:58] <gverig> freeone3000: You lost me... do you suggest that I keep a ListIterator attached to my object?
[01:52:19] <freeone3000> No. More that some collections fit this, and some don't; none that I've heard of give visibility into internal structure.
[01:52:22] *** bobbytek has joined ##java
[01:52:51] *** homie has quit IRC
[01:53:01] <gverig> freeone3000: Point being, I have a class Apple that has weight, size, color and price. It's also stored in a list for whatever reason. I want to eat a green apple. I go to the map that has color-> apple mapping, find myself an object. Now I want to remove it from all the collections in constant time.
[01:53:32] <wyvern`> just use constant-time collections?
[01:54:35] <gverig> freeone3000: if you care, look up http://www.boost.org/doc/libs/1_46_0/doc/html/intrusive.html . It's actually an interesting approach, I was curious if java has something like this.
[01:55:01] *** wolfman2000 has quit IRC
[01:55:16] *** modernbob has quit IRC
[01:55:50] <wyvern`> gverig, looks like you just want a linked list implementation where you can directly manipulate the nodes
[01:55:54] <gverig> wyvern`: there is only one const. time collection I know of and it's HashMap. Which supports pretty limited functionality. I can argue why intrusive is nice if you care but again, I just wanted to know if it's implemented. If not, I'll either use something else or implement meself
[01:56:04] <wyvern`> no i totally see why you want this
[01:56:07] <mrapple> hello, i have float r = (float)Ang.toRadians(); and i get "float cannot be dereferenced"
[01:56:18] <wyvern`> pretty specialized but i see the use case
[01:56:30] <freeone3000> mrapple: Yep. You can't dereference a float.
[01:56:52] <mrapple> freeone3000: well thanks, i mean like, how am i defrenencenring it
[01:56:54] <freeone3000> mrapple: You probably want something like float r = (float)Math.toRadians(ang);
[01:56:59] <mrapple> aha
[01:57:05] <freeone3000> mrapple: You have a "." symbol. That's a dereference.
[01:57:23] <mrapple> gotcha
[01:58:09] *** DJClean has quit IRC
[01:58:55] <gverig> wyvern`: It's actually not just lists, it's sets and trees as well (not sure implementation differences but whatever). As for specialized case... yup, true dat but it's not that special. It's whenever you get a reference without having iterator (through another collection or in whatever other way)
[01:59:06] *** _controller has joined ##java
[01:59:56] *** sheenobu has joined ##java
[02:00:06] <freeone3000> You can't get a direct object in Java, so the collections are already storing copies of references.
[02:00:27] <sheenobu> Started using jax-rs/jersey by ##java suggestion. Found a problem, http://pastie.org/1649603 ?
[02:00:31] <_controller> I'm running a program on a box and outofmemory errors are occuring. Are jmap and jhat available with the default JDK installation on linux? If not, where can i find them? I'm running CentOS JDK 1.6.0_24
[02:01:08] *** modernbob has joined ##java
[02:01:09] <cheeser> did you look for them?
[02:01:11] <freeone3000> _controller: Yes. You probably also got JVisualVM, which works pretty and graphical.
[02:01:19] <sheenobu> How can I use a filter in JAX-RS/Jersey to set/override incoming form parameters. I've already tried it above
[02:01:37] <_controller> they don't appear to be in the default jdk bin/ directory freeone3000, cheeser
[02:02:03] <sheenobu> The jersey Form object is actually read-only, so when you do getFormParameters()..whatever it doesn't get written anywhere.
[02:02:20] *** karstensrage has quit IRC
[02:03:53] <_controller> oh never mind guys, it's available
[02:03:58] <_controller> thanks cheeser, freeone3000
[02:05:18] *** terranova has joined ##java
[02:10:35] <sheenobu> meeeehhh anybody?
[02:12:21] *** Olathe has quit IRC
[02:12:52] *** namidark has joined ##java
[02:12:54] <lf94> Could someone explain BufferedImageOp to me?
[02:14:07] <Planck_> What about it? It's an interface, it's implemented by various image transforms.
[02:14:17] <sheenobu> hey it worked!
[02:15:02] *** Sdw195 has joined ##java
[02:15:18] *** Sdw195 has left ##java
[02:15:29] *** lisak has quit IRC
[02:16:01] <sheenobu> now to test it with complex types
[02:17:48] <sheenobu> noo bad resource
[02:17:54] *** bduncan has quit IRC
[02:17:57] <sheenobu> bad request rather
[02:20:04] *** _controller has quit IRC
[02:21:00] *** Sliker has quit IRC
[02:21:41] *** wolfman2000 has joined ##java
[02:22:49] *** lamdk has quit IRC
[02:23:28] <lahwran> if I download and install java7 32bit on a 64bit machine, will it work?
[02:23:56] <lahwran> because I just downloaded it before realizing that the machine was 64 bit (not had access to it very long) and it will take quite a while to download 64bit
[02:24:16] <freeone3000> Same way any 32-bit program will work on a 64-bit machine.
[02:24:42] <optraz> ok.. but i will go with 64bit though...
[02:24:55] <optraz> though it might take some more time to download.
[02:25:05] <Fanook> optraz: be aware that your browser may want a 32-bit java plugin
[02:25:06] <lahwran> well, I thought 32bit libraries had problems on 64 machines?
[02:25:09] *** pyrony has quit IRC
[02:25:11] <lahwran> or am I making shit up
[02:25:57] <sheenobu> meh I may have to drop jersey and use resteasy
[02:25:59] <optraz> Fanook: normally im dealing with server and our servers all 64bits.
[02:26:04] <freeone3000> lahwran: You can't link 64-bit code with 32-bit code, and vice-versa. This is less a problem than a statement.
[02:26:06] <optraz> Fanook: and yes, my workstation is 64bit too..
[02:26:22] <lahwran> ohh, that must be what I was thinking of
[02:28:12] *** strull has quit IRC
[02:28:45] *** phantomcircuit has quit IRC
[02:30:02] *** realtime has quit IRC
[02:31:18] <mrapple> ok if i have a vector with two values, its a 2d vector and i should use Vector2d right?
[02:31:27] *** teralaser has quit IRC
[02:31:29] <cheeser> uh... what?
[02:31:41] <freeone3000> Mathematical, not collection.
[02:31:50] <mrapple> what? :P
[02:32:01] <mrapple> i basically have an x and y value..
[02:32:10] <Fanook> so you have a Point
[02:32:16] <freeone3000> Then you have a point, not a vector. It'd be a vector if it was in polar coords.
[02:32:28] <freeone3000> Vectors have direction and magnitude.
[02:32:37] <Planck_> It might be a vector expressed with x and y components
[02:33:14] * mrapple goes to re-examine his code
[02:33:23] <Planck_> Choice of coordinate system has nothing to do with whether something is a vector or not :)
[02:33:50] <mrapple> yeah ok ill just use a normal vector and have a blank z value
[02:34:12] <Planck_> mrapple: Are you using the javax.vecmath?
[02:34:32] <mrapple> Planck_: i was trying to, but i got a NoClassDefFoundError
[02:34:40] *** Teckla has quit IRC
[02:35:02] <freeone3000> That'd require Java3D.
[02:35:11] <whaley> if it begins with javax it depends on an external provider
[02:35:15] <Planck_> It's part of Java3D, a separate package
[02:35:20] <mrapple> alright
[02:35:21] <Planck_> yes, like javax.swing!
[02:35:27] <Planck_> Oh wait :)
[02:35:30] <whaley> erm yeah :P
[02:40:05] *** Pritchard has joined ##java
[02:40:12] <Pritchard> ~pastebin
[02:40:12] <javabot> http://mysticpaste.com - Paste the final url after you've pasted your stuff there.
[02:41:22] *** Teckla has joined ##java
[02:41:40] <echosystm> whats the best way to handle entitymanagerfactory dependency when you are using a servlet container and not a full blow AS?
[02:41:50] <echosystm> i cant use @PersistenceUnit etc.
[02:42:00] <cheeser> with spring you can.
[02:42:04] <echosystm> i need to be able to mock it up for my unit tests
[02:42:18] <echosystm> i'm not using spring
[02:42:18] <mrapple> ok so i installed libjava3d-java, still classnodeferror
[02:43:16] <mrapple> i just wont use javax then
[02:44:42] <Planck_> Like any Java library, it has to be in your classpath
[02:46:40] *** guidj0s has joined ##java
[02:47:50] *** wliao has joined ##java
[02:53:14] *** modernbob has quit IRC
[02:53:57] *** epalm has joined ##java
[02:56:12] *** Fallout2man has joined ##java
[02:57:12] *** new2net has quit IRC
[02:58:55] *** modernbob has joined ##java
[03:00:51] *** km has quit IRC
[03:00:52] *** L-----D has quit IRC
[03:03:30] *** phantomcircuit has joined ##java
[03:03:52] <Fallout2man> Is there a fast way for me to flip the keys/values in a Map if both are the same type?
[03:05:17] <freeone3000> You want a BiMap, possibly from Guava.
[03:05:55] *** xiliax has quit IRC
[03:06:38] <Fallout2man> I'm just looking into strange problems with this code I've got and trying to find a different approach. I've got about 20K rows to insert into a SQLite DB so I need optimization up the wazoo. I have a system for replacing keys/values of inserted ids into my rows in a very efficient manner but there's one table where I was having problems because it required a more complex solution.
[03:06:55] <Fallout2man> I have a Map and it stores the keys as a String token with the row id as a long.
[03:07:38] <Fallout2man> But for one table there is no single unique column I could use as a text-based token, so I had to create a composite key
[03:07:46] <Fallout2man> But that's where my map troubles come in.
[03:09:07] *** gigasoft has joined ##java
[03:10:33] *** gverig has quit IRC
[03:11:31] *** shurane has quit IRC
[03:13:43] *** Naith has quit IRC
[03:14:21] <mrapple> hi, i need some help from someone that is good at like 3d space. I'm trying to get the velocity needed to travel between two points, and here's my code so far http://codepad.org/KJFspuUr
[03:14:51] <Pritchard> mrapple: "good at like 3d space" "velocity needed to travel between twoo points"
[03:14:56] <Pritchard> I'm slightly confused.
[03:15:16] * Pritchard *two, so I don't make mrapple look like he makes typos
[03:16:01] <Fanook> mrapple: velocity? 1 m/s towards the destination
[03:16:04] <pen16> anyone know an example I can look at that organizes data inside of java sourcecode -- similar to JSON or whatnot
[03:16:15] <pen16> but in the .javas, not separate file (data organized by java syntax)
[03:16:26] <pen16> Just a big bunch of data and stuff
[03:16:32] <freeone3000> pen16: No one does that.
[03:16:45] <freeone3000> pen16: Java source cannot be eval()'d, so there'd be no point.
[03:17:00] <pen16> It doesn’t need to be eval’d
[03:17:01] <Pritchard> mrapple: I would try setting breakpoints right before your OMG! line is called. Check the values of all data structures at that point and make sure they are correct.
[03:17:07] <pen16> its not code, its data
[03:17:11] *** bradford has quit IRC
[03:17:14] <freeone3000> pen16: But Java code *is* code.
[03:17:21] <Pritchard> mrapple: If they are not what you expect, then the function you are calling at that point is not producing the correct results.
[03:17:33] <Pritchard> "Garbage In, Garbage Out!"
[03:17:40] <pen16> freeone3000 I guess you don’t know what I mean
[03:17:43] <pen16> Let me post an example
[03:18:14] <Pritchard> pen16: I read over your question and his response, and I think he meant what he said.
[03:18:30] <Pritchard> I haven't included large amounts of data in source files since QBASIC.
[03:18:52] <pen16> Pritchard what he said isn’t even related to what I was asking about
[03:19:01] <Pritchard> DATA 025, 255, 172, 131, 142, 003
[03:19:10] <Pritchard> pen16: I just noticed he mentioned eval. Perhaps you're correct.
[03:19:15] *** fr0gprince_ has quit IRC
[03:19:16] <mrapple> Pritchard: ew testing? :P
[03:19:21] <pen16> http://codepad.org/RMzwBAhJ
[03:19:23] <pen16> This --^
[03:19:36] <pen16> Look at line 256
[03:19:41] <Pritchard> mrapple: If you can't think it, you can't code it. And yes, testing. Otherwise program results are in theory unpredictable.
[03:19:52] *** mek||malloc has joined ##java
[03:19:59] *** me1 has joined ##java
[03:20:02] <me1> sucks
[03:20:06] <pen16> that’s C++ code
[03:20:12] <pen16> (i’m porting it to java)
[03:20:56] <freeone3000> pen16: Nope. Can't do that.
[03:21:25] <Pritchard> Hate to butt in, but that array initialization looks just fine to me.
[03:21:42] *** bradford has joined ##java
[03:21:44] <Pritchard> But I mix languages like a gourmet buffet, so I'm probably suffering from some kind of dyslexia right now.
[03:21:50] <freeone3000> Uses an alternate constructor syntax which Java can't do. It'll need a syntax conversion.
[03:22:16] <freeone3000> So yes, you can do the same thing with a few more parenthesis and "new" keywords. Whether you want to is a whole nother story.
[03:22:20] <pen16> it doesnt have to be exact
[03:22:21] <pen16> Just close
[03:22:27] <freeone3000> Yes, you can do that. Why would you want to?
[03:22:28] <pen16> what can java do thats almost similar?
[03:23:00] <freeone3000> "new SystemInfo[] { new SystemInfo(System.CD, "====", ... ), new SystemInfo(System.DC, "===", ...), ... };
[03:23:03] <freeone3000> But ick.
[03:23:13] *** Naith has joined ##java
[03:23:22] <pen16> freeone3000, I just like organizing it like that in the code, cause its code stuff really.. its a kinda odd thing (harmonical music info) so, it should be in the code like that really
[03:23:51] <freeone3000> And I'm fairly sure that code exceeds the maximum initializer size.
[03:23:53] <pen16> as for the new SystemInfo thing.. heh, not usable :P
[03:24:04] <mek||malloc> I'm writing a little multi-threaded application to perform BFS and each Node has a linked list of outgoing Edges. Currently, each Edge has a boolean value to represent whether it has been explored. Assuming I want to keep track of Edges after they explored, would it be more efficient to maintain two linked lists per Node, one for unexplored Edges, and one for explored Edges so I don't have to iterate over the unexplored LinkedList to get the cu
[03:24:36] <pen16> Well, I guess it might work like:
[03:24:44] <freeone3000> pen16: So if you get a javac compiler error about "maximum initializer size exceeded" or "maximum method size exceeded", you're going to have to externalize and load.
[03:25:05] <pen16> FooFactory.addRow(“Cd”, Cd, _Z, true, ... etc);
[03:25:12] *** JohanSJA has joined ##java
[03:25:16] <pen16> and just make a bunch of calls
[03:25:24] <freeone3000> Sure, that's fine, and that'll probably be small enough.
[03:25:35] <JohanSJA> I need help in converting String to java.sql.Clob
[03:25:44] <mek||malloc> Or is the cost of iterating 'n' times negligible compared to cost of creating a second LinkedList
[03:25:47] <Pritchard> Sure. Find & Replace + Regex == My Friend when I'm in dire need
[03:26:10] <freeone3000> pen16: Also. No, this stuff does not belong in code. Logic belongs in code.
[03:26:33] <pen16> freeone3000, theres no way to separate the content and logic of it
[03:26:37] <freeone3000> But you already have.
[03:26:47] <pen16> in harmony, the rules of physics arent changing anytime soon
[03:26:59] <freeone3000> A SymbolInfo has no behavior, only data.
[03:27:00] <pen16> there’s not a “J” note =)
[03:27:06] <Pritchard> "In typical implementations, nodes that have not yet been examined for their neighbors are placed in some container (such as a queue or linked list) called "open" and then once examined are placed in the container "closed""
[03:27:19] <Pritchard> @mek||malloc
[03:27:22] <pen16> freeon3000: in that case, it has behaviour -- it’s fast
[03:27:32] <pen16> that array is accessed using offsets
[03:27:50] <pen16> and the array is static
[03:27:52] <freeone3000> pen16: Okay, so the *array* is fast. Or are you saying that loading time matters?
[03:27:54] <mek||malloc> Pritchard: I'm aware of this technique. I just wondered about efficiency. Whether it's better to use two linkedlists or just jeep an int pointer to the current node in one linked list and re-iterate each time.
[03:28:00] <pen16> many of the constants in that table get replaced at compile time in the rest of the code
[03:28:11] <mek||malloc> s/jeep/keep
[03:28:42] *** homie has joined ##java
[03:28:53] <pen16> static const -> C++ compiler will inline everything
[03:28:56] <freeone3000> pen16: Fun note. Java doesn't do optimization at compile-time, only at runtime.
[03:29:05] <Pritchard> mek||malloc: I'll flatly admit I'm oblivious to what you're doing, but I can typically read documentation on data structures/algorithms. Without using a linked list, wouldn't searches deep into the graph become difficult to track?
[03:29:25] <pen16> freeone3000: I realize what you’re saying about “put it in a separate file”, but really, I dont want to.
[03:29:27] <pen16> For example:
[03:29:37] * Pritchard is also suffering from hypo-sleep disorder, I think that's the proper term...
[03:29:42] *** kieran491 has left ##java
[03:29:57] <pen16> I’ll show you code written in Java, that a 1 programmer wrote, and he makes $100,000 a day from this program
[03:30:06] <mek||malloc> Pritchard: I am using a linked list. The question is whether I should have 2 linked lists (one for an open list, one for a closed list) or whether I should just iterate each time over a single linked list and get the first Edge which is enabled.
[03:30:17] <Pritchard> Oh!
[03:30:43] <mek||malloc> The question is about the cost of multiple iterations versus object creation for the second LinkedList, specifically.
[03:31:06] <pen16> Look @ line 641
[03:31:07] <pen16> http://codepad.org/VRrfphnu
[03:31:12] <pen16> this is from Minecraft source.
[03:31:20] <Pritchard> That's a good question...
[03:31:23] <freeone3000> pen16: And it's terrible code.
[03:31:33] <pen16> but it’s making $100,000 a day
[03:31:37] <pen16> So
[03:31:38] <pen16> Oh well!
[03:31:41] <pen16> I like it.
[03:31:46] <Pritchard> mek||malloc: Unless efficiency is an absolute must, I would go with whatever seems to make more sense for your programming environment, tbh.
[03:32:29] <Pritchard> Multiple iterations seems like an unnecessary algorithm change. Using a second LinkedList shouldn't have too much overhead.
[03:32:34] * Pritchard waits for someone to hit him with a bat
[03:32:44] <mek||malloc> Pritchard: Well, when there can conceivably be tens of millions of nodes, I think it's worthy for me to look in to! But that just means I have to do some testing. Thanks for the insight.
[03:33:18] <Pritchard> mek||malloc: Is this something you're building out of curiosity?
[03:33:48] *** theandromedan has joined ##java
[03:33:52] <mek||malloc> Pritchard: I have some legacy code which is performing a DFS over a control flow graph. I am trying to partition it into several distributed DFS's.
[03:34:08] <mek||malloc> The search space is pretty massive though.
[03:35:29] *** Fallout2man has quit IRC
[03:35:29] <Pritchard> mek||malloc: I'm still thinking.
[03:36:07] <Pritchard> Wikipedia (which is surprisingly trustworthy for many CS topics) says typical implementations DO use two linked lists.
[03:37:00] <wyvern`> or you could just keep an index around saying the last position in the list that was explored
[03:37:05] <wyvern`> then you just start looking at that point
[03:37:37] <Pritchard> wyvern': This is a graph. What about when you have a depth greater than two?
[03:37:40] *** surial has quit IRC
[03:37:47] <mek||malloc> wyvern: That is my current technique, however, I am pretty sure it is implicitly iterating up to the place of the pointer.
[03:37:54] <Pritchard> Well never mind.
[03:39:03] <mek||malloc> If LinkedLists are optimized to have constant time lookup (which defies what I know about LinkedLists) then that's spiffy.
[03:40:07] <mek||malloc> That is, unless I can store a pointer to a node... Which is what I was trying to do.
[03:40:08] <cheeser> they are? where'd you read that?
[03:40:35] <mek||malloc> cheeser: I didn't think that was the case, actually.
[03:40:57] <Pritchard> It's definitely not. In fact, a singly-linked list should ensure data is iterated through in a given order.
[03:41:01] *** disappearedng_ has joined ##java
[03:41:38] *** X-Scale has quit IRC
[03:41:38] <Pritchard> http://en.wikipedia.org/wiki/Linked_list#Related_data_structures
[03:41:41] <mek||malloc> Pritchard: That's my point, however, if I can maintain a pointer-like shallow copy to the Linked List...
[03:41:50] <mek||malloc> Then I can get the next node in constant time
[03:42:12] <mek||malloc> cheeser: I was discussing the trade offs between using 2 LinkedLists, one for an open list and one for a closed list... And iterating to the ith item each time.
[03:42:36] <cheeser> LL are constant time only if you have a reference to the node around which you're deleting/inserting
[03:42:44] <cheeser> so, front/end
[03:42:48] <cheeser> typically
[03:42:49] <Pritchard> mek||malloc: All right. I understand. But I thought adding nodes to a linked list of nodes yet to be searched would guarantee the order in which they are searched, such that it abides by the breadth-first search algorithm specifications.
[03:43:11] <mek||malloc> Pritchard: Adding should be constant if you add to the beginning or end, just like cheeser was saying.
[03:43:25] <Pritchard> mek||malloc: Let me clarify...
[03:43:59] *** rfw has joined ##java
[03:44:19] <mek||malloc> Pritchard: If I use two LinkedLists -- one for an open list and one for closed -- I simply add the node I pop from the head of the open list and add it to the tail of the closed list. Each in constant time.
[03:44:24] <Pritchard> How does this algorithm utilize its list of nodes? Will it not check the first node in the list regardless? The linked list itself ensures easy addition/deletion and the order of elements. (That is, the order in which elements in your graph are searched.)
[03:44:28] *** disappearedng_ has left ##java
[03:44:45] <Pritchard> And so unless you're trying to skip somewhere in the middle of the (potentially huge) list, what does it matter?
[03:45:01] <mek||malloc> Pritchard: It does, but I do not want to throw away these Edges.
[03:45:37] <Pritchard> Thanks for the clarification.
[03:46:04] <mek||malloc> Pritchard: There's really two options. Move a visited node from one list to the other as it is explored, or iterate to the 'ith' position over the linked list and keep an integer index of the next unvisited node.
[03:46:26] <Pritchard> I wonder if #algorithms has anything to say (or is an active channel)
[03:46:47] <mek||malloc> Pritchard: Well, from an algorithmic point of view, I can figure it out.
[03:46:54] <mek||malloc> Pritchard: The question is about iteration in java and object creation
[03:47:24] <Pritchard> Moving nodes should not be costly. Does anyone here know which of the two simple tasks you listed are faster than one another?
[03:47:37] <mek||malloc> Moving nodes is essentially constant for the removing and addition
[03:47:45] *** kinks has quit IRC
[03:47:47] <mek||malloc> The point is, creating a second linked list is costly
[03:48:02] <mek||malloc> With respect to both space and time.
[03:48:24] <mek||malloc> However, iterating over the list each time to get the next node is also costly.
[03:49:25] *** ScottishPig has joined ##java
[03:49:35] <Pritchard> Creating the linked list should not be that costly. I see iteration as being a much bigger problem where n > 1000, n > 100000, etc...
[03:49:46] <cheeser> iterating is cheap
[03:49:55] <mek||malloc> cheeser: That was my question.
[03:50:29] <Pritchard> cheeser: With how many members? I can lock even a modern PC with a big enough loop - with nothing in it, even.
[03:51:03] <cheeser> sure, it's linear.
[03:51:20] <cheeser> "big loops" don't really enter into it.
[03:51:28] <cheeser> whatever a "big loop" is supposed to be.
[03:52:24] <Pritchard> We've seen iteration through recursion is fast because you can divide the search set repeatedly. There iteration isn't a problem. Maximum comparisons are maybe a handful even for large data sets.
[03:52:41] <Pritchard> But a true linear search being performed in iteration can become a hassle.
[03:52:59] *** whaley has quit IRC
[03:53:02] <mek||malloc> Well, iteration and recursion are different core concepts. One of the imperative, one functional... For the most part.
[03:53:28] <cheeser> um. i think you're misapplying those terms.
[03:53:50] <ScottishPig> If n > 10000, recursion is gonna be rough on stack space.
[03:54:15] <mek||malloc> ScottishPig: Not necessarily, depends if you are recursing in tail position and accumulating... And whether the compiler has TCO
[03:54:24] <Pritchard> What am I trying to say? I didn't want to start that discussion... What I meant was that we often ignore large sets of data in sequence because we may be able ot divide and conquer our way up to the member we want.
[03:54:25] <dmlloyd> what are we iterating?
[03:54:31] <dmlloyd> a graph of some sort?
[03:54:40] <mek||malloc> dmlloyd: The edges of a node in a graph.
[03:54:58] <cheeser> mostly it seems we're string together technical terms in a semblance of intelligent coversation.
[03:54:59] <dmlloyd> cyclic or acyclic?
[03:55:02] <cheeser> 8^)=
[03:55:15] <Pritchard> cheeser: That's my fault. I'm trying to be specific but I'm suffering from fatigue.
[03:55:17] <dmlloyd> a directed graph, presumably?
[03:55:19] <gracenotes> sometimes I convert recursive algorithms to use explicit stacks in a single for loop. .. everyone needs a hobby.
[03:55:19] <mek||malloc> dmlloyd: The question a trade of spacial and temporal locality. Acyclic.
[03:55:39] <mek||malloc> Directed graph, essentially turned into a tree via a concurrent hash blacklist
[03:55:40] *** freeone3000 has quit IRC
[03:56:02] <gracenotes> s/blacklist/backlist/?
[03:56:13] * mek||malloc shakes his head
[03:56:30] <gracenotes> or back-reference list to be more precise. k then.
[03:56:54] <dmlloyd> the most overall performant way to implement traversal of a graph of arbitrary size is to use a local ArrayDeque to queue nodes-to-visit and a HashSet of already-visited (if it is possible to visit a node more than once *and* such visiting is undesirable)
[03:57:11] <dmlloyd> gracenotes: no, blacklist, as in a set of visited nodes to exclude
[03:57:28] <mek||malloc> dmlloyd: I do indeed use a hashset for visited nodes.
[03:58:03] <mek||malloc> dmlloyd: The question is regarding a Node, whether it is more efficient to have 2 linked lists, one for an open list of Edges one for closed, or to simply point to the 'ith' element in a single LinkedList and iterate to the ith Edge each time.
[03:58:03] *** alanic has joined ##java
[03:58:10] <dmlloyd> anyway, then you just start by enqueueing your root node, then your agorithm is, while deque is not empty { dequeue a node; get its edges; enqueue each edge }
[03:58:38] <dmlloyd> it depends on how frequently your graph mutates
[03:59:18] <dmlloyd> in many cases the best way is for each node to keep an array of edges (or an array of other nodes, if edges don't carry any ancillary data), and atomically replace the array as needed (a.k.a. "copy on write")
[03:59:18] <mek||malloc> dmlloyd: The graph will be generated and searched at run time, though I can restrict the branching factor.
[03:59:29] <dmlloyd> this gives a concurrently consistent graph at least
[03:59:34] <gracenotes> oh, by blacklist, you mean like black-gray-white.
[03:59:41] <dmlloyd> gracenotes: no
[03:59:45] <gracenotes> it just seemed like an odd term to apply to a seen-set otherwise :(
[03:59:55] <mek||malloc> gracenotes: A blacklist usually refers to a list of items that have already been visited or explored. A closed list if you will.
[03:59:56] *** Cymage has quit IRC
[04:00:21] <alanic> I want to parse an xml file (collada) and use it easily
[04:00:31] <alanic> i've never done that in java
[04:00:35] <alanic> is XPath any good?
[04:00:51] <dmlloyd> anyway the reason that arraydeque outperforms linkedlist almost always is that (a) it's far more efficient about memory usage and (b) the data has a much better reference locality
[04:00:56] <gracenotes> never heard of it in that context, has more connotations of something which will never *ever* be explored to me. anyway, enough confusings.
[04:01:10] <dmlloyd> ~~ alanic jaxp
[04:01:11] <javabot> alanic, jaxp is the Java API for XML Processing at https://jaxp.dev.java.net/ - FAQ is at https://jaxp.dev.java.net/1.4/JAXP-FAQ.html
[04:01:25] <dmlloyd> ~~ alanic xml parsing
[04:01:25] <javabot> alanic, Parse XML with - XOM @ http://www.xom.nu/ - JAXB @ http://java.sun.com/xml/jaxb/ - JDOM @ http://www.jdom.org/ - Simple @ http://simple.sourceforge.net/ - XStream @ http://xstream.codehaus.org/ - JAXP (incl. StAX as well as legacy SAX/DOM) @ https://jaxp.dev.java.net/ - JiBX @ http://jibx.sourceforge.net/index.html - DONT use SAX or DOM unless you like pain. Those APIs suck.
[04:02:08] <mek||malloc> dmlloyd: That is great to know. I will indeed replace the linkedlist with an arraydequeue.
[04:02:09] <Pritchard> Thanks for the insights, guys. This conversation went over my head, which doesn't happen often. I'm glad :)
[04:02:30] <alanic> dmlloyd: see this is the problem there's too much out there :D
[04:02:40] <alanic> dmlloyd: thanks though!
[04:02:40] <dmlloyd> alanic: just use stax
[04:02:52] <dmlloyd> it's almost always the best
[04:03:04] <alanic> dmlloyd: sweet, will do!
[04:03:10] *** Pritchard has left ##java
[04:04:15] <mek||malloc> gracenotes: Imagine being in a maze. A blacklist may signify nodes along a path you've already fully explored / exhausted and which are not be successful paths to your destination.. And thus, yes. You'd never want to visit them again (depending on the data structure and scenario)
[04:04:52] <mek||malloc> A poor example which I'm sure you can find counter examples to, but that's the general idea.
[04:08:09] <alanic> dmlloyd: so, stax seems to be for streaming xml and it's ok if I load the whole xml in memory. should this lead me to another xml parser?
[04:08:33] <dmlloyd> alanic, I'd just use stax anyway, but that's just me. If you like the dom-ish style better, try XOM or JDOM
[04:11:21] <mek||malloc> Lisp has warped my mind.
[04:11:46] <mek||malloc> I just want to reference an object in a LinkedList and get its next..
[04:12:08] <guidj0s> mek||malloc: what's the trouble so far?
[04:12:48] <mek||malloc> guidj0s: No trouble. It would just be nice to point to an Object within a LinkedList<Object> and get its next()
[04:12:53] <gracenotes> mek||malloc: it's what I'd call a "seen set"
[04:13:02] <gracenotes> black seems dark and depressing :(
[04:14:25] <mek||malloc> gracenotes: Blacklist, expl, explored list, closed list, seen list, disabled list. All the same thing. Some domains have different conventions regarding which terminology to use.
[04:14:42] *** tigger0jk has joined ##java
[04:14:51] *** openpercept has joined ##java
[04:18:39] *** h6w has quit IRC
[04:19:05] *** Peej has joined ##java
[04:19:45] <Skyec> does anybody here use JFace Data binding? I'm just wondering if its worth the effort of importing it into my project...
[04:21:34] *** Logan_ has joined ##java
[04:22:32] *** JoeGazz84 has joined ##java
[04:22:46] *** JoeGazz84 has left ##java
[04:27:09] <JohanSJA> what is the object to use if I have a very large String to store?
[04:27:11] <mischief> kriko, yt?
[04:27:43] *** flippo has joined ##java
[04:27:44] *** Logan_ has left ##java
[04:28:02] <cbeust> Skyec: I tried for a little while but in the end, decided it was not worth it. I also noticed a few bugs with combo boxes.
[04:28:11] <cbeust> I concluded the databinding framework works great for very simple cases.
[04:28:44] *** eyesUnclouded has joined ##java
[04:33:32] <Skyec> cbeust: thanks. What about when some events are supported? I've noticed that DateTime widgets don't seem to have any changed events.. which is incredibly annoying :S
[04:33:41] <Skyec> *aren't
[04:34:43] <meeper> ugh
[04:35:04] <cbeust> Skyec: Not sure about DateTime but overall, I have moved away from the propertychange/event listener approach and I use local message buses: http://goo.gl/mFzLr
[04:36:29] <meeper> Skyec: jface is more trouble than it's worth. I've avoided it for even complicated swt apps.
[04:37:17] <cbeust> meeper: Really? Means you're doing away with a lot of useful stuff, e.g. wizards
[04:37:19] <meeper> alright, the call to Class.getMethods() can cause other classes to be loaded right. Which ClassLoader will load that those classes? It's the target's right?
[04:37:47] <dmlloyd> the initiating class loader of the class to which the method in question is attached
[04:37:52] <meeper> cbeust: not all of jface (though wizards, another thing I never found much use for) just the databinding I meant
[04:37:56] <dmlloyd> which could be the class or its superclass, if the method was inherited
[04:38:10] <meeper> dmlloyd: so, Class c; c.getMethods() ... c's classloader will be used right?
[04:38:22] *** BSWolf has quit IRC
[04:38:22] *** BSWolf2 has joined ##java
[04:38:28] <Skyec> cbeust: this messagebus/eventbus thing looks good. It definitely seems a lot easier. How's it holding up for you?
[04:38:32] <dmlloyd> meeper: c's class loader will be used for methods declared on c; for superclass methods, the superclass' class loader is used
[04:39:04] <cbeust> Skyec: It works great especially when coupled with DI (e.g. with Guice). The only thing to be aware of is that all your objects now share an instance of that bus, so it might stick around for a while
[04:39:06] <dmlloyd> meeper: note that getDeclaredMethods() does not consider supertypes
[04:39:24] *** BSWolf2 is now known as BSWolf
[04:40:23] <meeper> cbeust: message buses are an antipattern in gui land imo. that's some weird retroviral thing you got going on. it's like the worst habits of javascript monkeys have mutated and can now infect java programmers
[04:40:30] <meeper> I freaking knew this would happen eventually
[04:40:37] <meeper> dmlloyd: hmm, ok, thanks
[04:41:21] <Skyec> cbeust: i didn't know about Guice either. It looks good.. another thing to look into.
[04:41:48] <cbeust> Skyec: Absolutely, do spend some time to read up on Guice, it will change the way you write Java code.
[04:42:10] <Skyec> so far, it looks similar to the idea of JEE with EJBs?
[04:43:41] <cbeust> Skyec: No not at all, it's much more versatile than that and it has nothing to do with EJB's or persistence
[04:44:09] <Skyec> how are you using Guice with the Message/Event Bus?
[04:44:40] <Skyec> actually, don't answer that.. I'll watch this video for a while, so I can understand your reply better
[04:44:42] <cbeust> You use Guice to inject your bus wherever you need it, this way you don't need to pass it around in all the methods
[04:45:30] *** danzik17 has joined ##java
[04:46:01] <Skyec> far out, this is really neat. Why the hell am I not using this
[04:46:14] <cheeser> because you're young. and ignorant. in the good way.
[04:46:14] <cheeser> 8^)=
[04:46:21] <alanic> which one is better, xom or jdom?
[04:46:28] <Skyec> ~best
[04:46:29] <javabot> Skyec, what does that even *mean*?
[04:46:30] <cheeser> apples!
[04:46:50] <alanic> which one won't make me cry :'(
[04:46:55] <cheeser> neither
[04:47:12] *** eyesUnclouded has quit IRC
[04:47:26] *** caverdude has joined ##java
[04:48:28] <meeper> alanic: they both have their issues. I'd probably stick with jdom
[04:49:09] <alanic> meeper: thanks!
[04:54:05] *** slerp_lerp is now known as Grandequeso
[04:54:36] *** danzik17 has quit IRC
[04:54:53] <Grandequeso> jesus
[04:55:04] <Grandequeso> When was the last update to Javabot?
[04:55:11] <cheeser> why?
[04:55:23] <Grandequeso> Just curious.
[04:55:30] <Grandequeso> I noticed you can't delete "locked" factoids
[04:55:35] <cheeser> yeah buddy.
[04:55:41] <Grandequeso> hm...
[04:55:45] <Grandequeso> WHen was that?
[04:55:46] <cheeser> so. why were you fucking with the bot?
[04:55:54] <Grandequeso> cheeser: To remove the svm rule
[04:55:56] <meeper> cheeser: javabot is kind of hot
[04:56:18] <cheeser> ha! svm rule++
[04:56:28] *** Grandequeso is now known as svm_invictvs
[04:56:30] <svm_invictvs> jesuus
[04:57:06] <cheeser> i should've recognized the melodrama. it would have to be either you or r0bby.
[04:57:08] <cheeser> 8^)=
[04:57:11] <ztj> svm_invictvs: are you the ass that's been deleting random factoids that have been staple factoids for years?
[04:58:22] *** L-----D has joined ##java
[04:59:23] <cheeser> ~forget binary
[04:59:23] <javabot> I forgot about binary, cheeser.
[04:59:54] <meeper> cheeser: do you contribute to jersey?
[05:01:13] *** theandromedan has quit IRC
[05:01:43] <lf94> Hey guys, what could be causing this?: http://codepad.org/Pj3SyHvT
[05:02:27] <cheeser> meeper: i don't
[05:02:30] <svm_invictvs> ztj: no
[05:02:41] <cheeser> though our paths cross a fair bit because they're big grizzly users.
[05:02:49] <svm_invictvs> cheeser: Or you could have looked at my hostmask, too
[05:02:55] *** BSWolf has quit IRC
[05:02:57] *** BSWolf2 has joined ##java
[05:03:03] *** dangertools has quit IRC
[05:03:04] <cheeser> don't flatter yourself that i care that much
[05:03:04] <cheeser> 8^)=
[05:03:32] <mek||malloc> lf94: Is JAI indeed a variable? Or is that a class and you're trying to invoke a public static method.
[05:04:03] <svm_invictvs> cheeser: pft
[05:04:08] <lf94> mek||malloc, just following docs, it is a class method that I am trying to use
[05:04:09] *** ScottishPig has quit IRC
[05:04:11] *** BSWolf2 is now known as BSWolf
[05:04:13] *** nucc1 has quit IRC
[05:04:29] <Terabyte> trying to work out if that emot is a dude with glasses and a goatie looking left, or a sad men with boobs pointing right.
[05:04:31] <lf94> mek||malloc: http://java.sun.com/products/java-media/jai/iio.html
[05:04:44] *** SpaceDoG has quit IRC
[05:05:51] <mek||malloc> lf94: Are you importing the package for JAI?
[05:05:54] <lf94> or is JAI that terrible
[05:05:58] <lf94> uhm
[05:06:16] <lf94> Yes I think so.
[05:06:21] <mek||malloc> Don't think so. Know so.
[05:06:23] <lf94> 'import javax.imageio.ImageIO;'
[05:06:50] <lf94> although that is probably the wrong package
[05:07:01] <lf94> actually let me pastebin my code...
[05:07:02] <svm_invictvs> ~jai
[05:07:12] <svm_invictvs> ~poke
[05:07:28] *** eflynn has joined ##java
[05:07:29] <lf94> http://codepad.org/Gh1ZlmGL
[05:07:34] *** Terabyte has quit IRC
[05:07:59] <mek||malloc> lf94: http://java.sun.com/products/java-media/jai/forDevelopers/jai1_0_1guide-unc/Introduction.doc.html See section 1.4
[05:08:20] <eflynn> hey has anyone coded an application using Model-view-presenter?
[05:08:34] <svm_invictvs> eflynn: Using GWT?
[05:08:34] <mek||malloc> import javax.media.jai.JAI;
[05:08:43] <lf94> mek||malloc: aiight
[05:09:03] <javabot> svm_invictvs, what does that even *mean*?
[05:09:11] * javabot pokes with a stick
[05:09:22] <svm_invictvs> cheeser: On that topic it looks like javabot is having latency issues :-/
[05:09:25] <svm_invictvs> ~ping
[05:09:32] <eflynn> svm_invictvs: swing, though i've looked at gwt quite a bit
[05:09:35] * mek||malloc pongs
[05:09:36] <cheeser> ~ping
[05:09:48] <svm_invictvs> cheeser: Get in line behind mine....like 10 seconds ago
[05:10:04] <cheeser> yeah. the VPS might be having trtraffic issues.
[05:10:50] <svm_invictvs> It still hasn't responded
[05:11:06] *** Okami has joined ##java
[05:11:17] <Okami> anyone here code using Google API?
[05:11:28] <svm_invictvs> Which one?
[05:11:45] <lf94> Ah, gotta download JAI...
[05:11:59] <lf94> Why isn't it included with Java x_x
[05:12:01] *** terranova has quit IRC
[05:12:28] <svm_invictvs> lf94: I want to say some weird legal issues.
[05:12:42] <lf94> mek||malloc, any reason why I cant create instances of BufferedImage?
[05:12:50] *** SpaceDoG has joined ##java
[05:13:06] <javabot> pong. Pong. PONG Already! What do you people want?! What will it take to finally get some peace and quiet around here!?!
[05:13:09] <mek||malloc> lf94: import java.awt.image.BufferedImage; ?
[05:13:17] <lf94> I did, yep
[05:13:24] <javabot> You rang, m'lord?
[05:13:29] <svm_invictvs> cheeser: lol, took long enough.
[05:13:55] <lf94> mek||malloc: http://codepad.org/Gh1ZlmGL
[05:13:57] *** gelignite has quit IRC
[05:14:23] <cheeser> weird. server lagged for a while.
[05:15:13] <cheeser> ~ping
[05:15:13] <javabot> http://www.nataliedee.com/071405/ping.jpg
[05:15:16] * cheeser nods.
[05:15:29] <gracenotes> javabot was busy *insert anthropormorphization of javabot here*
[05:15:29] <javabot> gracenotes, what does that even *mean*?
[05:15:58] <Planck_> lf94: in what sense do you say that you can't create instances of BufferedImage. Compile error? Runtime Exception? Be specific.
[05:16:00] <gracenotes> javabot is right, the noun form uses "ism"
[05:16:00] <javabot> no, you are!
[05:16:08] <gracenotes> thank you
[05:16:27] <lf94> To be precise it says 'cannot find symbol'
[05:16:44] <lf94> Then the compiler arrow points at 'new'
[05:16:51] <meeper> has anybody used windowbuilder pro to build gwt apps?
[05:16:53] <Planck_> Which line?
[05:16:53] <echosystm> anyone know how to assign some default exception handler in servlets?
[05:16:59] <mek||malloc> lf94: Do you get an error if you just try: RenderedImage ri;
[05:17:01] <lf94> 43 and 46
[05:17:04] <meeper> echosystm: google knows
[05:17:06] <echosystm> specifically, jax-rs or jersey
[05:17:13] *** rjohnson19 has quit IRC
[05:17:25] <echosystm> i know how to set error pages and so on, but what if i want something to catch exceptions and log them to a db?
[05:17:30] <lf94> mek|malloc, nope
[05:18:20] <meeper> echosystm: there's no standard way to do it in jaxrs. you have to use jersey's prop RequestFilter api
[05:18:34] <Okami> svm_invictvs : I've been trying to play around with project ideas using the maps API
[05:19:01] <echosystm> hm
[05:19:01] <lf94> Planck_ , mek||malloc : http://codepad.org/s93ho2zB
[05:19:17] <meeper> echosystm: google jersey ContainerRequestFilter and you can add pre and post processing to all your resource methods
[05:19:31] <lf94> Dont worry about the first two errors, I just need to download JAI to fix them :)
[05:19:31] <mek||malloc> lf94: http://codepad.org/X18pl7TJ
[05:19:40] <Skyec> cbeust: with your Message/Event Bus, why not use a singleton?
[05:19:42] <echosystm> i was hoping there would be some standard jax-rs way
[05:19:49] *** dangertools has joined ##java
[05:19:57] <Planck_> public static void main(String[] args) {
[05:19:57] <Planck_> double π = Math.PI;
[05:19:57] <Planck_> System.out.println(π);
[05:20:10] <Planck_> Gah, silly gnome-terminal
[05:20:46] <meeper> echosystm: well I was hoping to someday fall into a pool of chemicals and gain the ability to see through walls
[05:20:54] <lf94> mek||malloc that did not fix anything
[05:21:00] <echosystm> that would be pretty great
[05:21:02] <Planck_> lf94: that compile error doesn't relate to the code you pastebinned.
[05:21:14] <meeper> echosystm: hasn't happened yet
[05:21:16] *** meling has joined ##java
[05:21:17] <lf94> It's not happening for you?
[05:21:30] <lf94> What do you mean
[05:21:32] <lf94> <_>
[05:21:34] <Planck_> No, i mean that you pasted an error that *can't possibly* relate to the code you posted.
[05:21:42] <mek||malloc> It's not complaining about BufferedImage.
[05:21:50] <Planck_> Line 17 in the compiler error isn't the same as line 17 in the source ocde
[05:21:50] <echosystm> meeper: do you think it is generally better to use jax-rs and go full EE?
[05:22:13] <echosystm> i'm using jersey + jpa, i'm not sure where to draw the line between using a container and an AS
[05:22:17] <mek||malloc> lf94: It's complaining about WritableRaster... Which is used to create bmpWritable... Which is needed for BufferedImage.
[05:22:38] <lf94> Which I imported
[05:22:48] <Planck_> Try compiling the code you actually pasted.
[05:22:52] <echosystm> pretty much the only reason im not using javaee is because jetty lets me automatically reload every time something changes
[05:22:52] <ztj> Planck_: are you a fish?
[05:23:00] <lf94> Planck_ I did lol
[05:23:03] <Planck_> (It will still fail, but with different errors)
[05:23:24] <meeper> echosystm: well, personally, I never touch EE. I rely soley on jaxrs apis. This is partly because I'm in osgi land and partly because EE adds little real value imo. all you need is jaxrs
[05:23:25] <lf94> 4 errors
[05:23:40] <lf94> 2 which I dont care for, and 2 'cannot find symbol'
[05:23:49] <lf94> yep those sound about right.
[05:24:06] <meeper> echosystm: I've always had trouble getting that to work. but in osgi world dynamic reloading is easy once you understand it
[05:24:09] *** eflynn has left ##java
[05:24:59] <mek||malloc> lf94: Did you declare bmpWritable as a type?...
[05:25:47] *** dangertools has quit IRC
[05:25:48] <mek||malloc> lf94: I see, sorry. Had your code closed.
[05:26:12] <mek||malloc> of course it's going to throw an error
[05:26:14] <meeper> echosystm: between spring and jaxrs are pretty much my whole stack these days. it's a very clean model
[05:26:16] <lf94> uhm, yep
[05:26:29] <lf94> WritableRaster bmpWritable;
[05:26:30] <lf94> :D
[05:26:53] <lf94> What?
[05:26:57] *** dangertools has joined ##java
[05:27:27] <mek||malloc> lf94: If bmpImage is not being populated correctly due to missing libraries, yet bmpWritable depends on bmpImage)
[05:27:46] <lf94> Ah
[05:27:51] *** Okami has left ##java
[05:28:08] <lf94> Interesting, so I guess I download JAI and see what happens from there
[05:28:11] <mek||malloc> So, it cannot create WritableRaster as you are providing it input it doesn't expect.
[05:28:31] <mek||malloc> lf94: I'd say downloading the libraries a program requires is indeed a wise first step.
[05:28:34] <meeper> did jboss up and buy exoportal?
[05:28:45] <lf94> Heh, thanks a ton mek||malloc :)
[05:28:52] <mek||malloc> lf94: My pleasure. Happy hacking.
[05:29:26] <cbeust> Skyec: It's cleaner to use a singleton via a DI framework such as Guice. You can roll your own, just avoid using statics.
[05:30:21] <Skyec> ah yeah, I just got to that bit in the video with "scopes"
[05:30:26] <Skyec> again, I asked too soon lol
[05:32:57] *** c_axis has quit IRC
[05:33:22] *** pipeep has quit IRC
[05:37:46] *** opakavic has joined ##java
[05:45:36] *** Fanook has quit IRC
[05:46:07] *** yxz97 has joined ##java
[05:46:59] <Skyec> http://www.smh.com.au/environment/weather/huge-earthquake-rocks-japan-20110309-1bnif.html
[05:47:07] <Skyec> argh... my bad.. wrong window
[05:47:45] *** gigasoft has quit IRC
[05:48:32] *** danzik17 has joined ##java
[05:54:21] *** danzik17 has quit IRC
[05:55:50] *** infid has joined ##java
[05:56:52] *** drindt has quit IRC
[05:58:49] *** BSWolf has quit IRC
[06:01:11] *** platzhirsch has joined ##java
[06:01:37] *** bojo has quit IRC
[06:03:01] <infid> if BDD is supposed to be better than TDD, why hasn't it caught on?
[06:03:36] *** alanic has left ##java
[06:04:53] *** BSWolf has joined ##java
[06:05:19] *** t0rc has joined ##java
[06:05:51] <cbeust> Neither BDD nor TDD have caught on, so comparing them is not going to get you very far.
[06:06:36] *** sakekasi has joined ##java
[06:07:20] *** fuzzygroove has joined ##java
[06:07:56] <sakekasi> What is the sql equivalent of a String? I need to store a string with multiple lines in it.
[06:08:00] *** fuzzygroove has left ##java
[06:09:00] *** zemanel has quit IRC
[06:09:35] <guidj0s> sakekasi: char, varchar, varchar2, who knows? What's really interesting is your asking this here.
[06:11:04] <sakekasi> guidj0s: I don't knowthe name of the channel for sql stuff
[06:11:13] *** platzhirsch has left ##java
[06:12:43] <guidj0s> sakekasi: surprising how you thought of #java before #sql.
[06:13:03] <sakekasi> i come on here more than anywhere else
[06:13:41] *** jpk has joined ##java
[06:15:32] *** cbeust has quit IRC
[06:16:41] <GeorgeBrabazon> sakekasi: if youre using postgresql just use the text datatype
[06:17:10] *** sysRPL has quit IRC
[06:17:21] <sakekasi> thanks
[06:17:29] *** cbeust has joined ##java
[06:21:06] *** zuxqoj has joined ##java
[06:23:48] *** dmh has joined ##java
[06:26:17] <GeorgeBrabazon> guidj0s: to be fair, #sql might not be his best bet, especially if he starts digging into either the edges of jdbc, or any frameworks, java is going to know before #sql is probably
[06:27:54] <guidj0s> GeorgeBrabazon: irrelevant given his question. Crazy given the chances.
[06:29:46] <GeorgeBrabazon> guidj0s: i figured i'd give him the benefit of the doubt, maybe is was the setup for the question "when making a jdbc call how can i include single quotes inside my string without things breaking?"
[06:30:11] <GeorgeBrabazon> granted, thats still arguably answerable/best answered in #sql
[06:30:24] <GeorgeBrabazon> but point is, it was quiet here and you might as well be nice
[06:34:29] *** devkhadka has joined ##java
[06:40:17] *** rvncerr has joined ##java
[06:41:26] *** freeone3000 has joined ##java
[06:43:47] *** mistik1 has quit IRC
[06:44:12] <echosystm> can anyone explain what benefit container-managed authentication has?
[06:44:20] <echosystm> i dont get it, it seems like a huge pain in the ass
[06:45:17] <echosystm> authentication is going to be almost always application-specific
[06:45:24] <echosystm> ie. against the database that the application uses
[06:46:05] <freeone3000> Unless it's not a database, and it's actually http-basic, or it's LDAP, or it's kerberos, or there's actually an encrypted file containing the user, passwords, and a favorite color...
[06:46:32] <echosystm> shouldnt the application decide that though, not the container?
[06:47:03] <freeone3000> I might be happier with container *provided* auth rather than container-managed, but that's not how the spec was done.
[06:47:22] <RDove> is jfreechart the best library to graph plots like gnuplot?
[06:47:58] *** GeorgeBrabazon has quit IRC
[06:48:11] *** kinabalu has joined ##java
[06:48:15] <echosystm> so, if you want your authentication system to be within your war, you're basically screwed?
[06:48:30] <echosystm> i wrote my own filter to do it
[06:48:38] <echosystm> but its shit, now i miss out on all that jsr-250 stuff
[06:48:46] <freeone3000> echosystm: There's spring-security, which assumes you're using spring-everythingelse, and that still isn't JAAS.
[06:49:20] <echosystm> am i the only person who thinks this is completely broken and retarded?
[06:49:24] <freeone3000> (JSR-250's javax.annotations, btw.)
[06:49:43] *** kUrld has joined ##java
[06:51:10] <echosystm> i would have thought that you could at least register some authentication filter where all you have to do is implement authenticate(user, pass)
[06:51:23] <echosystm> that should be part of the spec
[06:51:24] <freeone3000> You can register an authentication provider with your container, yes.
[06:51:50] <echosystm> its not container-agnostic though is it?
[06:55:43] *** mistik1 has joined ##java
[06:56:16] *** ormaaj has joined ##java
[06:56:23] <echosystm> no?
[06:56:41] <meeper> echosystm: for the last time no
[06:56:53] <echosystm> ok
[06:57:00] <freeone3000> No, doesn't look like it. Had to do a bit of digging to confirm - Glassfish and JBoss both use a "Realm", and have the same names for implementing classes, but they reside in separate packages.
[06:57:27] <meeper> echosystm: spring security is kind of a hot mess, but it does do a relatively good job of shielding you from prop apis
[06:57:29] <echosystm> sorry i just assume when something is so fail like this that i misunderstand something
[06:57:54] <meeper> I think it has plugins for all the popular jaxrs frameworks (jersey, cxf, resteasy)'
[06:58:02] <echosystm> so, just to clarify
[06:58:08] *** t0rc has quit IRC
[06:58:08] *** kUrld has quit IRC
[06:58:21] <meeper> if you're using jersey, writing a ContainerRequestFilter is simple and can be done in <.5hr
[06:58:53] <echosystm> if im making some website that needs http basic authentication (most simple case), it must be done in a container-specific way in order for me to get all the jsr250 security annotations?
[06:59:16] <meeper> echosystm: no, you have it backwards
[06:59:28] <echosystm> ?
[06:59:56] <meeper> echosystm: if you're using an ee container jaxrs layers on top of the standard servlet authauth. which means you just put all those silly tags in your web.xml and jaxrs has to pick it up
[07:00:27] <meeper> echosystm: if you're not in an ee container and/or don't have a web.xml you need to integrate with a jaxrs framework directly to plug in your own authauth
[07:00:36] <meeper> echosystm: ...just like everything else
[07:01:11] *** bitshuffler has joined ##java
[07:01:33] <meeper> echosystm: all of this is well documented
[07:01:55] <meeper> echosystm: imo you're better off integrating with a jaxrs container than with a container like tomcat or jetty
[07:02:25] <echosystm> "standard servlet auth" - this is completely application server specific right?
[07:02:38] <freeone3000> The tags to require auth are not.
[07:02:42] <freeone3000> How the auth is provided is.
[07:02:53] <echosystm> right, thats the problem i'm talking about
[07:02:56] <meeper> echosystm: http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.web20fepjaxrs.doc/info/ae/ae/twbs_jaxrs_impl_securejaxrs_webcont.html for example
[07:03:19] <meeper> echosystm: jaxrs is just another servlet when you're running in an ee container. there's nothing new or magical going on here.
[07:03:51] <meeper> man I really hate eclipse's code formatting. *shakes fist*
[07:04:03] *** epalm has quit IRC
[07:04:30] <freeone3000> echosystm: Isn't it enough to know that your servlet has an authentication constraint and that the provided user is in a given role?
[07:05:11] <echosystm> the issue is implementing security for every possible server
[07:05:16] <meeper> freeone3000: most apps aren't so simple. often a role class needs state.
[07:05:34] <freeone3000> echosystm: Which is why it's container-managed. See? Now you don't have to worry about that.
[07:05:57] <echosystm> no, i mean that is the problem
[07:06:01] <meeper> echosystm: again if you integrate directly with jersey and write your own ContainerRequestFilter you'll be able to drop into any container and have everything work. it's just a question of where you want to store your config info... jetty.xml or spring.xml
[07:06:16] <echosystm> i have to work out how to write an authentication "module" for every AS i want my application to run in
[07:06:46] *** billy_ran_away has quit IRC
[07:06:53] <freeone3000> echosystm: There's probably a module written that does what you want.
[07:07:04] *** caverdude has quit IRC
[07:07:06] <freeone3000> JBoss and Glassfish both ship with JDBCRealms, for instance.
[07:07:06] <echosystm> i tried searching, there isnt
[07:07:07] <meeper> also I find the ee security model, with security on url patterns, to be very limiting. you're not losing anything
[07:07:25] <freeone3000> echosystm: What're you authing from?
[07:07:25] <echosystm> the jdbc/ldap modules are either plain text or unsalted md5/sha
[07:07:40] <echosystm> salted sha256 in postgresql
[07:07:49] <meeper> echosystm: in my system I annotate my jaxrs methods directly with annotations like @RequireAuthenticated and @RequireRole ... it's much more flexible
[07:07:57] <echosystm> ok
[07:08:06] <echosystm> i will look at your way of doing it meeper
[07:08:32] <echosystm> it just amazes me that we have container agnostic persistence, but they couldnt standardise http basic
[07:08:57] <echosystm> (in-application)
[07:08:59] *** terranova has joined ##java
[07:09:07] <freeone3000> They *have* standardized http basic.
[07:09:33] <freeone3000> They've also done digest, and cert-based. Getting the credientials from the client to the server is not the problem. Matching the credientials with authorization is the container-managed bit.
[07:09:33] <echosystm> yeah, but the way they did it is retarded
[07:10:06] <meeper> echosystm: it's all a question of where you want the container to end and your app to begin
[07:10:13] <echosystm> the jdbc/ldap modules are a joke - who the hell uses plain text or unsalted passwords?
[07:10:23] <echosystm> thats like web development 101
[07:10:45] *** KarlThePagan1 has quit IRC
[07:10:56] <echosystm> anyway, im just ranting now
[07:10:56] <meeper> echosystm: for most webapps, ldap + ssl is plenty fine I think
[07:10:59] <echosystm> thanks for your help
[07:11:02] *** bn` has joined ##java
[07:11:45] <meeper> it's perfectly ok to use 'plaintext' as long as you're going over ssl. if all you need is a password so you can call out to ldap, then that's fine
[07:11:56] <echosystm> what if your database gets hacked? :P
[07:12:05] <echosystm> lawsuit!
[07:12:37] <meeper> echosystm: most apps don't actually store the password in the db. they just pass along the creds to ldap and ldap stores the passwords
[07:13:09] <echosystm> i know, im saying ldap/jdbc shouldnt store the password in plain text or unsalted either
[07:13:21] <freeone3000> Why not? LDAP only provides access to authorized users.
[07:13:30] <meeper> ldap doesn't store any password
[07:13:41] <meeper> at least not in the way you think
[07:13:50] <echosystm> well, ldap is a bad example because you pretty much always have to just store passwords as md5/sha hashes
[07:14:10] <echosystm> in an sql database though, theres no excuse to not have the hashes salted
[07:14:34] <echosystm> if your database gets hacked, the passwords can't be read or rainbow-tabled
[07:15:03] <freeone3000> Yet all the other data could be changed anyway.
[07:15:18] <freeone3000> What would one do with a user's credentials that they couldn't do with direct db access?
[07:15:41] <meeper> freeone3000: a lot. people re-use passwords.
[07:15:41] <echosystm> get access to other websites that person used the password for?
[07:16:13] <freeone3000> meeper: Shoot. Then why not just set up a free, popular webservice that requires registration, and farm the passwords yourself? A lot less risk.
[07:16:25] <echosystm> there was a huge shitstorm a few weeks ago about some website that got hacked and the passwords werent salted
[07:16:45] <echosystm> it resulted in those peoples facebook, hotmail, etc. all being compromised
[07:16:46] *** yxz97 has left ##java
[07:17:19] <meeper> freeone3000: it's likely already been done. See http://xkcd.com/792/
[07:18:42] <echosystm> haha
[07:18:47] <meeper> hmm, has anybody actually tried to use the jersey restclient on android
[07:19:29] *** Peej has quit IRC
[07:19:59] *** Peej has joined ##java
[07:22:12] <meeper> it probably would perform pretty awful wouldn't it
[07:23:18] <meeper> all that ioc hmm
[07:26:25] <mek||malloc> Is there a strategy or optimization to deal with runnables within a thread pool who need to wait for some child process to complete?
[07:27:01] <meeper> mek||malloc: java.util.concurrent has lots of stuff like barriers and the like
[07:27:26] <mek||malloc> meeper: I'll take a look at 'barriers'. I'm not familiar. Thanks.
[07:28:11] <mek||malloc> Ah this my work. Thanks for the suggestion.
[07:28:24] <svm_invictvs> What the fuck linkedin
[07:28:53] *** BSWolf has quit IRC
[07:29:54] *** pen has joined ##java
[07:29:54] *** pen has quit IRC
[07:30:20] *** pen has joined ##java
[07:30:20] *** pen has quit IRC
[07:30:45] *** pen has joined ##java
[07:30:51] *** pen has quit IRC
[07:31:12] *** pen has joined ##java
[07:31:12] *** pen has quit IRC
[07:31:15] *** echosystm has quit IRC
[07:31:39] *** pen has joined ##java
[07:31:39] *** pen has quit IRC
[07:32:05] *** pen has joined ##java
[07:32:05] *** pen has quit IRC
[07:32:30] *** pen has joined ##java
[07:32:30] *** pen has quit IRC
[07:32:55] *** pen has joined ##java
[07:32:55] *** pen has quit IRC
[07:33:21] *** pen has joined ##java
[07:33:21] *** pen has quit IRC
[07:33:48] *** pen has joined ##java
[07:33:48] *** pen has quit IRC
[07:33:54] *** glcrazy has joined ##java
[07:34:14] *** pen has joined ##java
[07:34:14] *** pen has quit IRC
[07:34:41] *** pen has joined ##java
[07:34:41] *** pen has quit IRC
[07:35:08] *** pen has joined ##java
[07:35:08] *** pen has quit IRC
[07:35:38] *** pen has joined ##java
[07:35:38] *** pen has quit IRC
[07:36:05] *** pen has joined ##java
[07:36:05] *** pen has quit IRC
[07:36:32] *** pen has joined ##java
[07:36:32] *** pen has quit IRC
[07:36:57] *** pen has joined ##java
[07:36:58] *** pen has quit IRC
[07:37:22] *** pen has joined ##java
[07:37:23] *** pen has quit IRC
[07:37:49] *** pen has joined ##java
[07:37:49] *** pen has quit IRC
[07:38:17] *** pen has joined ##java
[07:38:17] *** pen has quit IRC
[07:38:42] *** pen has joined ##java
[07:38:42] *** pen has quit IRC
[07:39:07] *** pen has joined ##java
[07:39:07] *** pen has quit IRC
[07:39:13] <lahwran> how do I find out my java version from cli?
[07:39:24] <lahwran> I'd like to verify that the correct java install is being used
[07:39:35] *** pen has joined ##java
[07:39:35] *** pen has quit IRC
[07:39:36] <freeone3000> java -version
[07:40:00] *** pen has joined ##java
[07:40:01] *** pen has quit IRC
[07:40:25] *** pen has joined ##java
[07:40:26] *** pen has quit IRC
[07:40:50] *** pen has joined ##java
[07:40:51] *** pen has quit IRC
[07:41:20] <lahwran> single dash?
[07:41:23] *** pen has joined ##java
[07:41:23] * lahwran facepalms
[07:41:23] *** pen has quit IRC
[07:41:26] <lahwran> no wonder it didn't work
[07:41:47] *** pen has joined ##java
[07:41:47] *** pen has quit IRC
[07:42:13] *** pen has joined ##java
[07:44:17] <sakekasi> how do I set the component of a JScrollPane after initializing it?
[07:45:13] <deebo> very carefully
[07:45:32] <Bombe> Not lightly!
[07:45:33] <sakekasi> deebo: JScrollPane.add does not work
[07:46:02] <Bombe> sakekasi: You might want to set the viewport view.
[07:46:43] *** jfe has joined ##java
[07:47:15] <sakekasi> Bombe, so I just go JScrollPane scroll = new JScrollPane; scroll.setViewPortView(/*component of my choice*/)?
[07:47:26] *** frangiz has joined ##java
[07:47:36] <jfe> what's the consensus on the "learning java" book from o'reilly?
[07:48:01] <jfe> i bought it recently and i feel like there aren't enough working examples.
[07:48:20] <sakekasi> jfe: I think it's pretty good if you are new to programming/ are a huge novie
[07:48:28] <sakekasi> not to say that i am not a novice
[07:48:34] <sakekasi> because I am
[07:49:52] *** bearded_oneder has quit IRC
[07:50:19] <lahwran> http://pastebin.com/wauP5eyd <<< what the ...?
[07:50:28] <lahwran> if ls sees it, why can't it run it?
[07:51:45] *** xianny has joined ##java
[07:52:28] <mek||malloc> lahwran: ./ ?
[07:52:40] <mek||malloc> ./jdk1.7.0/bin/java
[07:52:41] <lahwran> I suppose I could try that
[07:52:54] <lahwran> bash: ./jdk1.7.0/bin/java: No such file or directory
[07:54:20] <mek||malloc> ls jdk1.7.0/bin/java should return a list of files in jdk1.7.0/bin/java
[07:54:34] <mek||malloc> If it returns itself, chances are it's a symlink
[07:54:35] <tjsnell> file /jdk1.7.0/bin/java
[07:54:39] <tjsnell> what's that return
[07:55:24] <mek||malloc> Can always confirm via a ls -al, too. File should do the trick.
[07:55:25] *** brig has joined ##java
[07:55:54] <tjsnell> smells like java is a shell script that's hosed or a broken link
[07:57:12] *** selckin has quit IRC
[07:57:14] <shookees> morning
[08:02:53] *** bitshuffler has quit IRC
[08:03:38] <infid> i have a class i want to unit test but the constructor expects a database connection object to be passed. How would i deal with this, just mock the class and have my mock class not take a database object?
[08:03:43] *** BSWolf has joined ##java
[08:04:21] <Planck_> lahwran: Another possibility is a 64-bit binary on a 32-bit system
[08:05:00] <lahwran> other way around possibly?
[08:05:06] <Planck_> Or missing 32-bit libs the other way around
[08:05:08] <lahwran> it's a 64bit machine, that's a 32bit jdk
[08:05:13] <lahwran> :s
[08:05:28] * lahwran switches back to java 6 while he downloads the 64bit java7
[08:05:56] <Planck_> There's probably some package for 32-bit libs
[08:06:48] *** BSWolf has quit IRC
[08:06:50] *** BSWolf2 has joined ##java
[08:07:45] *** BSWolf2 is now known as BSWolf
[08:08:33] <deebo> infid: provide it a connection? use hsqldb or something during testing
[08:09:22] <infid> i dont want to use a real connection because that's integration testing
[08:09:29] *** sakekasi has quit IRC
[08:12:01] *** BSWolf has quit IRC
[08:12:17] *** coalado has joined ##java
[08:13:39] *** BSWolf has joined ##java
[08:14:56] *** lambda_x has joined ##java
[08:15:49] *** VooDooNOFX has joined ##java
[08:16:38] *** terranova has quit IRC
[08:21:33] *** bulltwang has joined ##java
[08:22:48] *** BSWolf has quit IRC
[08:26:52] *** zhulikas has joined ##java
[08:27:14] *** frangiz has quit IRC
[08:27:37] *** BSWolf has joined ##java
[08:28:12] <lahwran> http://pastebin.com/cq0simMB <<< the hell?
[08:28:25] <lahwran> I think it's trying to use commands that aren't there. just a guess.
[08:28:42] *** frangiz has joined ##java
[08:30:49] *** DJClean has joined ##java
[08:32:14] *** zhulikas has quit IRC
[08:32:21] *** brig has quit IRC
[08:32:24] <bulltwang> what distro are you using?
[08:32:37] <lahwran> that's on the server, I know very little about the machine
[08:32:56] <lahwran> extremely hardened, has only what has to be there to run the server
[08:33:16] <lahwran> could I install java locally and then copy it to the server?
[08:33:23] <lahwran> I have a 32bit machine locally :/
[08:33:33] *** Ch30ps has joined ##java
[08:34:37] <bulltwang> I've had similar issues, like that, it can be that either your .bin file is corrupt, or you are trying to install .bin files on an rpm distro ...
[08:34:46] <bulltwang> do you have access to the machine?
[08:35:43] <lahwran> access physically?
[08:35:46] <lahwran> no
[08:36:36] <bulltwang> ssh?
[08:36:39] <bulltwang> telnet?
[08:37:27] <bulltwang> what operating system is running on it?
[08:37:45] <lahwran> something unix based
[08:37:47] <lahwran> I have ssh
[08:37:51] <lahwran> it has bash
[08:37:51] <bulltwang> can you take that very same install, and install it on another server?
[08:38:06] <lahwran> it has java in the homedir
[08:38:13] <lahwran> I don't really know much more about it :/
[08:39:05] *** mastroDani has joined ##java
[08:39:46] <bulltwang> what does it say when you type uname -r
[08:39:48] <bulltwang> in ssh?
[08:39:50] *** bitshuffler has joined ##java
[08:40:02] *** dyurds has quit IRC
[08:40:08] <bulltwang> (what I mean is connect to the server and run the command), let me know what it says
[08:40:37] <lahwran> it says bash: uname: command not found
[08:40:40] <lahwran> :|
[08:40:43] <bulltwang> oh boy
[08:41:00] <lahwran> it couldn't find uname in the paste, either
[08:41:23] <lahwran> hence why I'd prefer to kinda "bake" a java install and then upload it
[08:41:26] <deebo> that installation is fucked
[08:41:29] *** Engin has joined ##java
[08:41:30] <bulltwang> type /bin/uname
[08:41:39] <bulltwang> with the -r
[08:41:41] <bulltwang> sorry
[08:41:44] <deebo> someone made it a bit too "secure"
[08:42:08] <lahwran> bulltwang: it's not there either
[08:42:16] <bulltwang> oh boy
[08:42:30] * lahwran messages the host asking if he'd install java7 for me
[08:42:32] <deebo> tell whoever made the installation to fix it
[08:42:32] *** rretzbach has joined ##java
[08:42:59] <bulltwang> really weird....
[08:43:40] <bulltwang> most of the *nix machines wil have the commands in /bin/ or in /usr/bin/
[08:44:11] <bulltwang> can you type /bin/ and then hit the tab button twice...
[08:44:20] <bulltwang> does it show anything at all?
[08:45:16] <lahwran> there are things in /bin, yes
[08:45:22] <lahwran> I assume you want a paste?
[08:45:44] <lahwran> http://pastebin.com/REymF5PU
[08:47:37] <bulltwang> thats realy weird, in my installations (which are basic installations of Solaris and a Centos) I checked there's ~100 files in there...
[08:47:43] <bulltwang> including uname
[08:47:49] *** scruz has joined ##java
[08:47:56] <scruz> hello
[08:48:12] *** mazzachre has joined ##java
[08:48:16] <bulltwang> I would talk to the guy who did the install, and tell him that you need to have those files....
[08:48:53] <bulltwang> (the java installation complained about files that it couldn't find as well, and that is why your installation completely freaks out)....
[08:49:29] *** ronr_ has joined ##java
[08:49:50] <lahwran> it's a hardened chroot, apparently
[08:50:42] *** blahspam has quit IRC
[08:51:38] *** ExtraSpice has joined ##java
[08:51:41] <bulltwang> okay....thats a step in one direction....
[08:51:44] *** White_Cat has joined ##java
[08:52:19] *** J11 has joined ##java
[08:52:34] *** _Jorde has joined ##java
[08:52:56] <lahwran> he said he'll install java7 from outside the chroot
[08:53:06] <lahwran> hopefully doesn't cost me any more :|
[08:53:15] *** bulltwang has quit IRC
[08:54:04] *** bulltwang has joined ##java
[08:54:07] <bulltwang> oopss
[08:54:38] <lahwran> heh.
[08:54:53] *** dframe has joined ##java
[08:55:12] <bulltwang> tell that guy about your installation, and show him those errors; if those files, like uname is installed on the server, he can add them to your profile, essentially giving you access to the files....
[08:55:37] <bulltwang> if not, he needs to help you get those files installed on that server.....
[08:55:54] <J11> So why does the jdk get installed inside the glassfish folder instead of the program files/Java dir on Windows when installing Java EE sdk?
[08:56:05] <bulltwang> you can try the 'baked' installation as well.... but will recommend you do it on a similar machine.... not windows....
[08:56:24] <J11> baked?
[08:58:08] *** frangiz has quit IRC
[08:58:21] <J11> I mean it used to be a dir you can have in your path that keeps all your java installations in place
[08:58:54] *** frangiz has joined ##java
[09:01:05] *** dframe has joined ##java
[09:01:06] *** dtrott has joined ##java
[09:01:26] <bulltwang> J11: sorry man, was talking to lahwran...
[09:01:33] <J11> ok
[09:02:15] <lahwran> bulltwang: oh, I run linux on everything
[09:02:17] <coalado> Hi. I wonder if you know any eclipseaddon to find unused public methods in a class (or better in an interface)
[09:02:23] <lahwran> so it would be a fairly similar machine
[09:02:31] <J11> well i thought i download the javaee sdk that bundled with the jdk so i have both SE and EE set up on myachine at once
[09:02:48] <coalado> perhaps eclipse already has something like this built in
[09:03:24] <dtrott> Gut feel question: Would you say that a $5000 machine should be able to push about 2000 messages (10K size) per second through a JMS broker like Active MQ?
[09:04:30] *** rretzbach has quit IRC
[09:05:10] *** magn3ts has quit IRC
[09:05:22] <tazle> dtrott: either "trivially", or "maybe", depending on whether you want the messages to go to disk for transactions to be durable etc.
[09:05:36] *** supercosmonaut has quit IRC
[09:07:17] *** drindt has joined ##java
[09:07:52] *** sphenxes has joined ##java
[09:08:32] <dtrott> Its still only about a 20 MB/s speed which should be sustainable on a decent RAID setup
[09:14:14] *** srji has joined ##java
[09:14:42] *** srji has quit IRC
[09:15:34] *** guidj0s has quit IRC
[09:15:34] *** jfe has quit IRC
[09:18:11] *** cbeust has quit IRC
[09:18:28] *** palyboy has quit IRC
[09:18:32] *** bobbytek has quit IRC
[09:18:58] *** Pozejdon has joined ##java
[09:19:31] *** kagu has quit IRC
[09:20:44] *** vengeancex32 has quit IRC
[09:20:51] <scruz> is toString() called automatically when a string is req'd?
[09:21:55] <ronr_> no
[09:22:04] <scruz> thanks, ronr_
[09:22:47] *** KwikkSilva has quit IRC
[09:23:42] <ronr_> it'll work in some cases, not all. that is, you can't pass a general object as a String parameter to a method. on the other hand, a "string" + object will use the toString() of the object.
[09:24:31] <ronr_> and I have about a minute lag, so I'm not sure it's ever going to reach you :)
[09:26:25] <scruz> it did :)
[09:27:00] <ronr_> eventually ;)
[09:28:12] <scruz> so the System.out.println(Object o) simply calls System.out.println(o.toString())?
[09:28:21] *** frangiz has quit IRC
[09:28:57] <ronr_> yup
[09:29:00] <Bombe> scruz: It actually calls String.valueOf(o).
[09:29:09] *** frangiz has joined ##java
[09:29:13] <Bombe> Otherwise println(null) would throw an exception.
[09:29:16] <scruz> hmm.
[09:29:20] <ronr_> tomato, tomato
[09:29:46] <scruz> there's a valid distinction, unlike the veg example
[09:30:31] <ronr_> I know :)
[09:30:56] <scruz> geh. why can't there just be world peace?
[09:31:08] <ronr_> then again, I imagine it may depend on the jre implementation rather than a general rule.
[09:31:34] <ronr_> because then life would be boring.
[09:32:06] <scruz> i'm creating a set a values as an enum, but they actually have two string representations - the actual value used by the system, and the human-understandable version
[09:32:47] *** [switch] has quit IRC
[09:33:09] <scruz> i was hoping on relying on toString() for the (more commonly used) system value, and another method for the pretty descriptive value
[09:33:12] <scruz> ah well
[09:33:40] <scruz> ronr
[09:33:44] *** abhijain has joined ##java
[09:34:30] <scruz> not having had world peace, i don't think it's valid to say that life would be boring if we did have it
[09:36:59] *** fr0ggler has joined ##java
[09:37:11] <scruz> hi fr0ggler
[09:37:18] <fr0ggler> morning
[09:40:51] *** psst has joined ##java
[09:43:10] *** zemanel has joined ##java
[09:44:27] *** mastroWork has joined ##java
[09:48:00] *** mastroDani has quit IRC
[09:48:49] *** brig has joined ##java
[09:48:50] *** mah01 has joined ##java
[09:48:57] *** rfw has quit IRC
[09:54:05] *** srji has joined ##java
[09:54:16] *** abhijain has quit IRC
[09:54:48] *** l3dx has joined ##java
[09:55:24] *** frangiz has quit IRC
[09:55:52] <l3dx> anyone familiar with weblogic (integration) and have read property files? No matter where I put the file, I can't figure out how to read it
[09:57:19] *** topriddy has joined ##java
[09:59:10] *** dtrott has quit IRC
[10:00:21] *** frangiz has joined ##java
[10:02:13] *** White_Cat has quit IRC
[10:02:29] *** BSWolf has quit IRC
[10:03:33] *** BSWolf has joined ##java
[10:04:29] *** arex\ has joined ##java
[10:04:42] <arex\> Which interface must be implemented for a class to support the enhanced for loop?
[10:08:10] *** White_Cat has joined ##java
[10:08:32] *** abhijain has joined ##java
[10:09:11] <sveajobb> arex\, I would guess Iterable, but I'm not sure
[10:11:44] *** BSWolf has quit IRC
[10:11:57] *** mastro has joined ##java
[10:14:16] *** terranova has joined ##java
[10:14:16] *** jjido has joined ##java
[10:14:24] *** ronr_ has quit IRC
[10:15:32] *** mastroWork has quit IRC
[10:16:04] *** arex\ has quit IRC
[10:16:47] *** ronr_ has joined ##java
[10:16:49] *** abhijain has joined ##java
[10:17:02] *** BSWolf has joined ##java
[10:17:04] *** mastro has quit IRC
[10:18:22] *** Wizard has joined ##java
[10:18:23] <Wizard> hi
[10:19:26] *** abhijain has quit IRC
[10:19:39] <bulltwang> l3dx: I'm midly familiar with weblogic....
[10:20:48] <l3dx> bulltwang: good! do you know where I should place my file, and which approach I should use to access it?
[10:21:03] <bulltwang> l3dx: is it an application running on weblogic that can't do the file intration
[10:21:04] *** teralaser has joined ##java
[10:21:56] *** Teckla has quit IRC
[10:22:30] *** Marcofe has joined ##java
[10:22:40] <l3dx> it's a weblogic integration process application running on weblogic (8.1sp6). I've tried using FileInputStream and classloader.getResourceAsStream() and I'm not able to succeed
[10:23:19] *** wliao has quit IRC
[10:24:33] <fr0ggler> ~doesn't work
[10:24:33] <javabot> fr0ggler, doesn't work is useless. Tell us what it is, what you want it to do, and what it is doing. Consider putting some code and any errors on a pastebin. (use ~pastebin for suggestions)
[10:24:40] <fr0ggler> mostly the latter
[10:25:31] <bulltwang> l3dx: put your code on pastebin, and send us the link.....
[10:25:53] *** BSWolf has quit IRC
[10:26:52] <bulltwang> l3dx: I also have to mention that Im more familiar with Weblogic app server, and not Integration....
[10:27:24] *** svm_invictvs has quit IRC
[10:27:45] *** Lonectzn has joined ##java
[10:27:52] <l3dx> http://pastebin.com/TrFkCvGn
[10:28:44] <l3dx> this is one of the approaches I've tried
[10:29:21] *** supercosmonaut has joined ##java
[10:29:24] <l3dx> I've tried some different paths. without /, classpath:sftp.properties
[10:30:25] <l3dx> and also using FileInputStream instead of classloader
[10:31:12] *** frangiz has quit IRC
[10:31:35] *** frangiz has joined ##java
[10:32:38] <Yusdan> Re. package naming conventions, my domain has a hyphen in it - what should I do there? Ignore it?
[10:34:01] <ztj> use something else
[10:34:03] *** mastroDani has joined ##java
[10:34:14] <ztj> reverse domain is a concept it doesn't have to actually be a real domain
[10:34:56] <Yusdan> Very true. I found the answer though :) http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html
[10:35:16] *** flip28 has joined ##java
[10:35:23] <bulltwang> l3dx: you are sure that sftp.properties is in your classpath though?
[10:35:32] <l3dx> bulltwang: no
[10:35:33] *** Lonectzn has quit IRC
[10:35:59] <ztj> l3dx: you can't put a file on your cp you can only put containers (directories or jars)
[10:36:20] <ztj> unless you are using some unusual classloader then it's up to that thing (but the default java behaviors are as I stated)
[10:36:24] *** scruz has quit IRC
[10:36:49] *** Lonectzn has joined ##java
[10:37:07] *** barq has joined ##java
[10:37:50] *** xianny has quit IRC
[10:38:25] *** Marcofe has quit IRC
[10:38:46] *** pen has quit IRC
[10:38:52] *** Prot has joined ##java
[10:39:31] *** mazzen has joined ##java
[10:41:50] *** BSWolf has joined ##java
[10:41:52] *** jds has quit IRC
[10:43:45] *** barq has quit IRC
[10:46:27] *** fr0gprince_ has joined ##java
[10:50:36] *** theandromedan has joined ##java
[10:51:20] *** theandromedan has quit IRC
[10:51:41] *** mastroWork has joined ##java
[10:54:02] *** dmh has quit IRC
[10:55:13] *** mastroDani has quit IRC
[10:57:21] *** Lonectzn has quit IRC
[10:58:28] *** JohanSJA has quit IRC
[11:01:28] <asfdd> does anyone know where i can download old versions of netbeans?
[11:01:41] <asfdd> that doesn't work in the new versions
[11:02:50] *** sebrock has joined ##java
[11:05:41] <l3dx> ztj, bulltwang: I've only added the file as part of the project. Thought it would be part of the generated .ear file. Anyway, I'm quite new to this so I'll leave it alone for now. Need to focus on something else. Thank you for helping
[11:06:19] *** Versuchen has joined ##java
[11:07:41] *** Kneta_ has quit IRC
[11:09:26] *** deSilva has joined ##java
[11:11:11] *** riotz has joined ##java
[11:12:12] *** Matuku has joined ##java
[11:14:47] *** mastro has joined ##java
[11:15:27] *** srji has quit IRC
[11:17:59] *** mastroWork has quit IRC
[11:18:55] *** modernbob has quit IRC
[11:19:55] *** defascat has left ##java
[11:20:38] *** McMAGIC-- has quit IRC
[11:22:38] *** McMAGIC-- has joined ##java
[11:23:28] *** thelarry has joined ##java
[11:23:57] *** devkhadka has quit IRC
[11:24:45] <thelarry> Hi! How can i check if the last character of a string is a number (or int)? i mean what is the common way?
[11:25:15] *** Luc1fel has joined ##java
[11:26:55] * topriddy ping
[11:30:51] *** Kneta_ has joined ##java
[11:31:39] <DroidAgent> thelarry: there's no standard way, I guess, you've got a couple of options, you can throw a regex at it, or you can grab string.charAt(string.length -1) and do one of these: http://rosettacode.org/wiki/Determine_if_a_string_is_numeric#Java
[11:31:52] *** mastroWork has joined ##java
[11:32:43] *** frangiz has quit IRC
[11:33:47] *** pipeep has joined ##java
[11:33:59] *** jjido has quit IRC
[11:35:41] *** mastro has quit IRC
[11:36:45] *** supercosmonaut has quit IRC
[11:37:18] <dreamreal> morning
[11:37:45] *** ferret_ has quit IRC
[11:37:49] *** yahya_h has joined ##java
[11:37:55] <yahya_h> hi alla
[11:37:57] *** ferret_ has joined ##java
[11:39:46] <yahya_h> logging question: it is possible to set the log level for packages separte from the one for class ones ?
[11:39:56] <yahya_h> i mean in java logging
[11:41:10] *** jjido has joined ##java
[11:42:41] <dreamreal> yahya_h: the categories are arbitrary
[11:42:56] <dreamreal> so you can specify logging levels for each category
[11:43:01] <dreamreal> http://download.oracle.com/javase/6/docs/technotes/guides/logging/overview.html
[11:44:01] *** frangiz has joined ##java
[11:45:27] <yahya_h> i ask becouse i want to konw if i can set it off or on for package without to change it for every class in the pacakge
[11:46:24] <mapreduce> yahya_h: Yes, they're hierarchical, aiui.
[11:46:40] <mapreduce> So if you set com.foo's level it applies to com.foo.Bar
[11:47:05] *** eyesUnclouded has joined ##java
[11:47:28] <mapreduce> I've not used that so I could be misremembering.
[11:47:35] *** eyesUnclouded has quit IRC
[11:47:54] *** terranova has quit IRC
[11:48:10] <yahya_h> i should say that i'm using it in glassfish, i have tried to make it but something have not worked
[11:48:29] *** devkhadka has joined ##java
[11:48:43] *** mastro has joined ##java
[11:48:46] *** Taos has joined ##java
[11:48:55] <Taos> im porting some fava what does this line do for (int val : prime_factors)
[11:49:09] <deebo> for each iteration
[11:49:48] <deebo> for (type value: iterable<type>)
[11:49:56] <mapreduce> ~foreach
[11:49:56] <javabot> mapreduce, foreach is " for (final Foo foo: fooList) { foo.setBar(baz); } " more at http://java.sun.com/j2se/1.5.0/docs/guide/language/foreach.html
[11:50:17] <Taos> for each int in list?
[11:50:24] <mapreduce> deebo: The right hand side of : can be an array.
[11:50:33] <mapreduce> Taos: Pretty much.
[11:50:36] <Taos> thanks
[11:50:43] <Taos> for i in [1,2,3] basically
[11:50:54] <deebo> true, but arent arrays iterable "internally"
[11:51:01] <mapreduce> I don't know the basically keyword.
[11:51:13] <mapreduce> deebo: No.
[11:51:27] <Taos> mapreduce: in python it would be `for i in [1,2,3]:`
[11:51:36] <mapreduce> assertFalse(new String[1] instanceof Iterable);
[11:51:46] <mapreduce> Taos: Yeah?
[11:51:56] <dreamreal> deebo: you can modify an array while iterating over it, for example.
[11:52:08] *** mastroWork has quit IRC
[11:52:15] <mapreduce> dreamreal: That's different from a list?
[11:52:17] <Taos> n /= val and finally this?
[11:52:29] <dreamreal> mapreduce: well, a collection you can modify via the iterator
[11:52:31] <Taos> n and val are variables ofc
[11:52:35] <dreamreal> but an array doesn't have that restriction
[11:52:37] <yahya_h> dreamreal, mapreduce: thank you for your help
[11:52:40] <mapreduce> Taos: I don't understand the question.
[11:52:56] <Taos> `/=` that syntax what does it do
[11:53:03] *** supercosmonaut has joined ##java
[11:53:15] <mapreduce> dreamreal: You can modify a CopyOnWriteArrayList however you like whenever you like.
[11:53:26] <mapreduce> Taos: x += y - what does that do?
[11:53:41] <dreamreal> mapreduce: *sigh* okay, you know, you're right, i'm not right at all, I have zero experience, because you can find exceptions to something I said.
[11:53:46] *** thinkHell has joined ##java
[11:53:50] <dreamreal> Never mind that it's the general case or anything.
[11:53:56] *** jjido has quit IRC
[11:54:02] <Taos> mapreduce: x = x + y
[11:54:13] <mapreduce> Taos: Then what do you suppose x /= y does?
[11:54:25] <Taos> x = x / y? is it float or int based?
[11:54:34] <mapreduce> Whatever the types of x and y are.
[11:54:42] <Taos> ok thanks :)
[11:54:43] <mapreduce> So, finally, what does x != y do?
[11:55:20] <Taos> x not equal to y (written as english ofc)
[11:55:23] <mapreduce> dreamreal: Sorry, I wasn't thinking of implementations.
[11:55:25] <mapreduce> Taos: Great.
[11:55:34] <Taos> Im a pythoner by birth thats all natural to me.
[11:56:19] <mapreduce> Untyped languages are fun.
[11:57:11] <Taos> I eventually have to learn java but im avoiding it for now
[11:57:24] <dreamreal> jython?
[11:58:17] <Taos> Used it once
[11:58:19] <Taos> not bad
[11:58:22] <mapreduce> Taos: 1 / 2 == 0, btw
[11:58:36] <mapreduce> In case the above about types wasn't clear.
[11:59:07] <Taos> Good
[11:59:10] *** LtHummus has quit IRC
[11:59:12] *** Zwei has left ##java
[11:59:20] <Taos> Im gonna miss alot of stuff when I leave python :(
[11:59:27] *** LtHummus has joined ##java
[11:59:37] <dreamreal> like what?
[11:59:43] <mitch0> yeah, like the GIL
[11:59:52] <mitch0> and the stupid syntax
[12:00:25] <sveajobb> my application is behaving differently on different platforms (all linux). first of all I'm using non blocking sockets, upon calling connect 2/3 return false and 1/3 return true. and upon server shutdown 2/3 report EOF and 1/3 simply returns READABLE + read 0 bytes.
[12:00:37] <sveajobb> how can I detect the server shutdown on that one stupid server?
[12:00:47] <Taos> mitch0: syntax for it is amazing and I can cope with the gil because I never thread
[12:01:00] <mapreduce> And you never thread because of the gil. :)
[12:01:01] <dreamreal> there's a lot to like in python
[12:01:16] <dreamreal> Taos: I keep mentioning jython because it allows you to run python quickly while retaining syntax
[12:01:31] <Taos> mapreduce: I never need to thread
[12:01:40] <mapreduce> Taos: fwiw, Haskell is worth a look if you like Python but want a typed language for some reason.
[12:01:44] <dreamreal> really? So you use small programs. I dig it.
[12:01:52] <Taos> mapreduce: Im learning haskell sometime in the future
[12:02:10] <Taos> dreamreal: To be honest threads rarely have a decent use
[12:02:16] *** frangiz has quit IRC
[12:02:22] * dreamreal giggles
[12:02:45] <mitch0> gaaah. PL/SQL is teh suxorz :(
[12:02:49] *** deSilva has quit IRC
[12:02:56] <mitch0> (even worse than python)
[12:02:58] <mapreduce> I wrote a small program using PySerial and wxPython, and found that if I screwed up my app would appear hung.
[12:03:10] *** frangiz has joined ##java
[12:03:18] <Taos> dreamreal: to be honest im a fan of multiprocess
[12:03:27] <mapreduce> In Java I would have moved the PySerial bits to a SwingWorker, so they wouldn't have hung the UI.
[12:03:38] <mapreduce> I.e., a separate thread.
[12:03:58] *** mastro has quit IRC
[12:04:34] <dreamreal> multiprocess what?
[12:04:52] <Taos> I would have multiprocessed the program
[12:05:00] <dreamreal> you mean, using threads?
[12:05:03] <thelarry> DroidAgent: thx!
[12:05:13] <Taos> dreamreal: No meaning spawnning multiple processed
[12:05:15] <Taos> processes*
[12:05:43] <dreamreal> foo 1 & foo 2 & foo 3 & foo 4 & # ?
[12:06:21] <Taos> No as in fork childprocesses with shared memory andor other IPC
[12:06:29] <dreamreal> okay.
[12:06:58] <dreamreal> So ... um... at the risk of being seen as an idiot, how is IPC/shared memory different than threading?
[12:07:14] <Planck_> Explicit shared state rather than implicit?
[12:07:57] <dreamreal> Planck_: you can do explicit stuff in java, in a single VM, too
[12:08:02] <Planck_> True
[12:09:06] <Taos> Multiprocessing spawns an entirely new process rather than a thread....
[12:09:13] *** mastro has joined ##java
[12:09:45] <Taos> The multiprocessing package offers both local and remote concurrency, effectively side-stepping the Global Interpreter Lock by using subprocesses instead of threads
[12:09:47] <dreamreal> Taos: yet this only means that you don't understand java's threading model, and what you're used to is insufficient.
[12:10:08] <Taos> dreamreal: java's threading model is probably different to python's
[12:10:17] <dreamreal> "probably."
[12:10:24] <Taos> Im not here for a language war I have just grown up learning threads are evil
[12:10:41] <dreamreal> to the point where avoiding threads is a great way to make sure your performance is as slow as python's. :)
[12:10:47] <ronr_> java is dead.
[12:10:53] <Taos> dreamreal: python is not slow
[12:10:58] <Taos> Missconception
[12:11:08] <dreamreal> Taos: java's muuuuuch faster. :)
[12:11:51] <Taos> Java 6?
[12:11:57] <dreamreal> java 5 was, too.
[12:11:59] <Taos> Server or Xint?
[12:12:05] * dreamreal snrks
[12:12:23] <dreamreal> why the everloving fsck of christ on a donkey would anyone intentionally choose -Xint?
[12:12:28] <Taos> Server then :)
[12:12:35] <dreamreal> or client.
[12:13:15] *** okiwan has joined ##java
[12:13:21] <dreamreal> there are absolutely zero advantages to -Xint. None. Anyone who uses it is trying to use a straw man.
[12:13:25] *** xiliax has joined ##java
[12:13:57] *** okiwan has quit IRC
[12:14:06] <Taos> Its faster for 'most' tasks granted but python is arguably more powerful ^^
[12:14:07] *** okiwan has joined ##java
[12:14:18] <dreamreal> you might as well say stuff like "foo is slow because it can't finish an infinite loop."
[12:14:28] <okiwan> ~pastebin
[12:14:28] <javabot> http://mysticpaste.com - Paste the final url after you've pasted your stuff there.
[12:14:37] <dreamreal> Taos: how so?
[12:14:46] *** Luc1fel has quit IRC
[12:14:56] <Taos> dreamreal: http://www.twistedmatrix.com/~glyph/rant/python-vs-java.html
[12:15:08] *** gelignite has joined ##java
[12:15:12] <dreamreal> hahaha
[12:15:22] *** javobiwan has joined ##java
[12:15:35] <Taos> Wait
[12:15:37] <mitch0> eh, nice disclaimer on the top ;)
[12:15:38] <Taos> Missed the topbar
[12:15:41] <Taos> :L
[12:15:42] <Taos> Sorry
[12:15:42] <dreamreal> you offer a "rant" as support for an argument? One that says "its conclusions are no longer relevant" and "its data was dubious at the time"?
[12:15:46] <dreamreal> hahahaha
[12:15:48] <dreamreal> WIN!
[12:16:05] <fr0ggler> ah do we have another "Java is so slow" person?
[12:16:09] <mitch0> more like "epic fail" :)
[12:16:11] <dreamreal> but I really don't appreciate it, my family is asleep and my laughter isn't a good thing in a quiet house
[12:16:24] <Taos> fr0ggler: Nope :)
[12:16:26] <ronr_> java isn't slow. it just doesn't work well.
[12:16:33] <dreamreal> and it's dead!
[12:16:37] <Taos> fr0ggler: dreamreal is saying java is faster than python and it is in somecases
[12:16:44] <fr0ggler> Taos, well that's true
[12:16:49] <Taos> fr0ggler: in some cases
[12:16:56] <Taos> and arguably python is more powerfuk
[12:16:58] <Taos> powerful*
[12:17:06] <fr0ggler> hah
[12:17:07] <mitch0> powerfuck
[12:17:09] <dreamreal> see, there's the argument that made me laugh
[12:17:19] <ronr_> it's not suitable for web-scale applications.
[12:17:21] <dreamreal> Arguably java's more powerful than python, too
[12:17:29] <Taos> Its subjective.
[12:17:31] <fr0ggler> Taos, that's one of those arguments that'll you'll always win, because that's what you believe. stop trolling.
[12:17:37] * dreamreal is plumb tickled
[12:17:38] *** XeruX has joined ##java
[12:17:42] <Taos> Im not trolling
[12:17:49] <Taos> Im just saying there are two sides to every coin
[12:17:55] <XeruX> How can I make the columns of my JTable as wide as they need ot ?
[12:17:56] <dreamreal> "No, you moron, Tool is WAY better than Led Zeppelin, and I can prove it!"
[12:17:56] <XeruX> to*
[12:17:58] *** jonkri has joined ##java
[12:18:01] <dreamreal> Taos: of course.
[12:18:01] <fr0ggler> ok. stop being stupidly obvious.
[12:18:42] <Taos> I am not.
[12:18:46] <dreamreal> yes, you are
[12:19:01] <fr0ggler> Taos, "there's two sides to every coin". do you think we're 5 years old?
[12:19:10] <dreamreal> Is there ANYONE on channel who doesn't agree that subjectively, python can be more powerful than Java in some situations, and vice versa?
[12:19:10] <ronr_> fr0ggler: 6.
[12:19:12] <Taos> fr0ggler: No.
[12:19:15] <dreamreal> Come on, show of hands
[12:19:21] <dreamreal> ANYONE?
[12:19:25] <Taos> Ugh...
[12:19:32] *** matsebc has quit IRC
[12:19:51] <fr0ggler> Taos, we *know* things are subjective. you don't need to tell us.
[12:20:20] <fr0ggler> and blindly saying "python is arguably more powerful" makes you look like a plum
[12:20:33] <fr0ggler> although I might rename my band to POWERFUK
[12:20:52] * dreamreal might rename HIS band to "Dream Reak"
[12:21:01] <dreamreal> gotta keep up, you know
[12:21:07] <fr0ggler> totally
[12:21:21] <Taos> Seriously this has just spiraled out from several points made earlier
[12:21:25] *** matsebc has joined ##java
[12:21:31] <Wizard> hi
[12:21:34] <fr0ggler> you started it *stamps feet*
[12:21:39] <Wizard> hot discussion? :>
[12:21:41] <dreamreal> totakky!
[12:21:44] <fr0ggler> heh
[12:21:53] <dreamreal> no, YOU started it
[12:22:06] <dreamreal> I can't believe you're going down this road
[12:22:14] *** ormaaj has quit IRC
[12:22:18] <Taos> Can't we just leave it where it is?
[12:22:25] <fr0ggler> where is it?
[12:22:43] <deebo> there, see it? _o7
[12:22:44] *** dangertools has quit IRC
[12:22:45] *** ormaaj has joined ##java
[12:22:46] <dreamreal> http://xkcd.com/870/
[12:22:47] <Taos> You two ripping me a new one
[12:23:12] <dreamreal> Taos: no, just pointing out the obvious and horribly logical flaw in what you said, even though we understood the intent and fully agreed with it
[12:23:27] <Taos> Well ok
[12:23:32] <Taos> enough then
[12:24:02] <dreamreal> we just were and are laughing about the sentiment, because it's something on the level of "BTW, the sky is up, and clearly blue sucks as a color for the sky"
[12:24:04] *** dangertools has joined ##java
[12:24:46] <Taos> alright alright you have told me im point the obvious several times now ok?
[12:25:04] <dreamreal> I dunno, we really want to make the point a few times more, just to nail it in.
[12:25:26] <dreamreal> It's now at the point where it's just plain fun
[12:25:52] <Taos> Ugh...
[12:26:06] <dreamreal> :)
[12:26:15] <dreamreal> Don't take it seriously, mate, we're toying with you
[12:26:22] <fr0ggler> We're a happy bunch.
[12:26:29] <mitch0> I'm not
[12:26:30] <Taos> Heh seems it :)
[12:26:41] <mitch0> I have to fight with pl/sql presently. bad on the mood
[12:26:43] <dreamreal> well, I am a happy guy. You seem all serious and depressed.
[12:27:15] <Taos> mitch0: what flavor of sql?
[12:27:25] <mitch0> erm, I just said: pl/sql
[12:27:32] <mitch0> oracle
[12:27:36] <Taos> brainflump
[12:27:42] <dreamreal> ooo! Are we looking at a "this trigger language is more powerfuller than that one!" debate too?
[12:27:43] <Taos> Sorry im not awake today
[12:27:51] <Taos> dreamreal: nope?
[12:27:56] * dreamreal grins
[12:28:00] <mitch0> :)
[12:28:12] <mitch0> postgres can do python triggers, right?
[12:28:12] *** badas has quit IRC
[12:28:22] <dreamreal> and java triggers!
[12:28:59] <Taos> mitch0: probably I don't use postgres much
[12:29:13] *** mastroWork has joined ##java
[12:29:30] <mapreduce> Python is better at instant feedback, and some of its libraries are better than you get for Java, e.g., PySerial.
[12:29:33] <mitch0> taos: let me guess: mysql?
[12:29:40] <Taos> mitch0: hell no.
[12:29:45] <dreamreal> mitch0: it's more powerfuller than oracle!
[12:29:48] *** Squarism has joined ##java
[12:29:59] <mitch0> mysql is the REAL powerfuk
[12:30:16] <Taos> I have a pet hate about mysql
[12:30:29] <Squarism> is there some view in IDEA where you can see the healt of your project? Ie any syntax or import errors?
[12:30:33] <Squarism> health
[12:30:40] <mitch0> I'll never finish this migrate procedure if we keep it on like this ;)
[12:30:54] <Taos> brb gotta rush to a short meeting
[12:32:07] <mapreduce> Squarism: Click on build.
[12:32:36] <mapreduce> A Messages view will appear if there's anything to report.
[12:32:41] *** frangiz has quit IRC
[12:32:47] *** mastro has quit IRC
[12:33:07] <mapreduce> Taos: I'd prefer to dawdle to a slow one.
[12:33:20] <Wizard> Squarism: sonar is quite nice
[12:33:23] *** frangiz has joined ##java
[12:33:33] *** aLeSD has joined ##java
[12:33:56] <dreamreal> I dunno, cubase is better
[12:34:32] <mapreduce> s/slow/long/
[12:35:01] <fr0ggler> that's what she said. hah!
[12:35:32] <mapreduce> fr0ggler: Yeah?
[12:36:25] <fr0ggler> no :( more like s/yes/not tonight/
[12:36:48] <mapreduce> I'm washing my hair tonight, sorry.
[12:38:19] *** daark has joined ##java
[12:38:43] <dreamreal> "I've a bone in my leg"
[12:40:18] *** vdv has joined ##java
[12:43:09] *** aksn has joined ##java
[12:45:58] <bulltwang> hello
[12:47:20] *** armyriad has quit IRC
[12:47:43] *** mastro has joined ##java
[12:48:03] *** daark_ has joined ##java
[12:48:09] *** daark has quit IRC
[12:49:08] <yahya_h> again to the log levels question in java and glassfish: i have the following situation i have a package and in that package i have more than one class, now i want to set the log level of the package on off and the calsses on any other level. in this situation it should provide no logging
[12:49:42] <dreamreal> set a higher-level logging category to no logging, then turn it up for the specific levels you want
[12:50:01] *** supercosmonaut has quit IRC
[12:50:04] <Squarism> mapreduce, thanx
[12:50:25] <mapreduce> nprblmsmthvgddy
[12:50:57] *** mastroWork has quit IRC
[12:51:17] <yahya_h> i have done it in glassfish adminstration console
[12:51:28] <yahya_h> but it didn't work for me
[12:51:40] *** Marcofe has joined ##java
[12:52:13] *** topriddy has quit IRC
[12:53:11] *** DerHorst has joined ##java
[12:54:54] *** mastro has quit IRC
[12:54:58] *** topriddy has joined ##java
[12:59:49] *** Taos has quit IRC
[13:01:27] *** Marcofe has quit IRC
[13:01:52] *** Marcofe has joined ##java
[13:02:26] *** XeruX has quit IRC
[13:03:36] *** frangiz has quit IRC
[13:04:40] *** frangiz has joined ##java
[13:04:56] *** bitshuffler has quit IRC
[13:07:39] *** Matuku has quit IRC
[13:09:08] *** surial has joined ##java
[13:09:30] *** matsebc has quit IRC
[13:10:33] *** Engin has quit IRC
[13:11:11] *** matsebc has joined ##java
[13:11:15] <mek||malloc> Is it invalid to have a ConcurrentHashMap of the form... final ConcurrentMap<Integer, ArrayDeque<SomeObject>> ?
[13:11:24] *** deSilva has joined ##java
[13:11:26] *** ech0s7 has joined ##java
[13:11:27] <ech0s7> hi
[13:12:13] <mapreduce> mek||malloc: What does the compiler think?
[13:12:34] <ech0s7> i know that it's possible access from java to c/c++ code. I'm looking for a way to make reverse: i would access from c/c++ code to java code... is that possible ?
[13:13:30] <mapreduce> Yep, JNI.
[13:13:53] <dreamreal> ech0s7: it's... possible. JNI is still involved, IIRC, and note that java is itself bootstrapped from C++
[13:14:15] <ech0s7> thanks mapreduce, dreamreal
[13:14:50] <Zharf> ech0s7, not very fun business that, by the way :p
[13:15:02] *** Marcofe has quit IRC
[13:15:30] <mek||malloc> mapreduce: I am finding it hard to tell. I attempting to pass that as an argument to a constructor and it's complaining ... http://pastebin.com/9k2Jmuat
[13:15:55] *** Marcofe has joined ##java
[13:16:18] <dreamreal> mek||malloc: i don't see the compiler's error message?
[13:16:31] <mek||malloc> dreamreal: Line 10.
[13:16:54] <dreamreal> that doesn't look like a standard java error message
[13:16:58] <mek||malloc> Cannot find symbol, complains about constructor of that form.
[13:16:59] <dreamreal> are you using javac?
[13:16:59] <Planck_> http://www.shortpacked.com/2011/comic/book-13/01-daddy-issues/unit/
[13:17:04] <mek||malloc> dreamreal: I am.
[13:17:17] <ronr_> okay, since I suck at bitwise operations - I have an int. I need to get the first bit and the second bit, how would I go about it?
[13:17:25] <Planck_> Dammit. I need to give up using the middle mouse button to click links. If I miss, it pastes :-/
[13:17:44] <dreamreal> ronr_: you mean the two least significant, or two most significant?
[13:17:53] <Planck_> ronr_: first & second bits from which end? And counting from 0 or 1?
[13:17:57] <dreamreal> (if it's the two least: myInt & 0x3)
[13:18:47] <ronr_> well, counting from 0, and it the docs don't say from which end. I need to check that. but generally speaking?
[13:19:10] <dreamreal> ronr_: if it's the least significant bits (i.e., the bits to the right) it's myInt & 0x03
[13:19:23] <mek||malloc> My understanding was a generic could represent a Collection.
[13:19:27] <dreamreal> if it's the most significant bits, you'll need to do a little more to manage the sign bit
[13:19:32] <ronr_> I need the bits separately...
[13:19:35] <dreamreal> mek||malloc: it can.
[13:19:57] <dreamreal> ronr_: myInt & 0x01 == least significant bit, myint & 0x02 == next least significant bit
[13:20:00] <mek||malloc> Then there's nothing inherently wrong with this line by itself?: final ConcurrentMap<Integer, ArrayDeque<TransitionSequence>> stacks = new ConcurrentHashMap<Integer, ArrayDeque<TransitionSequence>>();
[13:20:01] <ronr_> dreamreal: even though Java doesn't have an unsigned int, it's an unsigned int.
[13:20:36] <dreamreal> ronr_: right, you'll need to determine if it's negative or not (which will give you the MSB) and then 0x... whatever the number is for the next MSB
[13:20:50] <mek||malloc> Eh, I can test that easily enough. Disregard that.
[13:20:57] *** supercosmonaut has joined ##java
[13:20:58] <Planck_> In general, (theInt >>> bitNumber) & 0x01
[13:21:00] <ronr_> dreamreal: since it's unsigned, it's always positive.
[13:21:03] *** Fuco has joined ##java
[13:21:22] <ronr_> basically, it's jut a way to write flags. I don't like this way, but that's what I have.
[13:21:36] <dreamreal> ronr_: if it's in Java, it might not be.
[13:21:55] <dreamreal> Integer.MAX_VALUE does not contain an int with nothing but "on" bits.
[13:22:23] <dreamreal> So an unsigned int could contain (Integer.MAX_VALUE+1) and be valid. And the int would be negative.
[13:22:34] <ronr_> right
[13:22:36] <dreamreal> Unless I'm misunderstanding what you're saying.
[13:22:46] <ronr_> ah, no wait.
[13:23:22] <ronr_> I get the number as a string and I parse it to int (or long). I know the number I'll get will never be negative.
[13:24:16] <dreamreal> then your number to use for the logical and shifts
[13:24:44] *** deSilva has quit IRC
[13:25:04] *** DerHorst has quit IRC
[13:25:55] <ronr_> dreamreal: lost me with that sentence
[13:26:16] *** kaemo has joined ##java
[13:26:35] <dreamreal> ronr_: look: the idea is that you have an int. To get an individual bit, you would do something like this: boolean bitIsSet=(myint & 2^bitNumber == 0);
[13:26:53] <dreamreal> although in java, of course, it'd be different:
[13:26:56] <kaemo> how can i use foreach loop to iterate through array in reversed order?
[13:27:21] <dreamreal> boolean bitIsSet=(myInt & (1<<bitNumber))==0;
[13:28:10] <Planck_> kaemo: You can't.
[13:28:22] *** devkhadka has quit IRC
[13:28:23] *** new2net has joined ##java
[13:28:28] <kaemo> Planck_: :<
[13:28:30] <ronr_> dreamreal: okay. can you explain that a bit? of course I can copy it, but I want to try and understand it while I'm at it. & is bit-wise and and << will shift the bit?
[13:28:32] <Planck_> (Unless you reverse the whole array first, and that would be pretty silly)
[13:28:45] <new2net> when i grow up I want to be a jBoss :D
[13:28:59] <kaemo> yea, I thought about it and I come to same conclusion
[13:29:08] *** bn` has quit IRC
[13:29:20] <dreamreal> ronr_: yes.
[13:29:45] <Planck_> You can use a normal for loop though
[13:30:02] <new2net> << shift all bits >.<
[13:30:09] *** horte has joined ##java
[13:30:17] <ronr_> dreamreal: so that, in fact, will put 1 in the place of the bit I want, the rest be zero, and the bitwise and will leave me with that bit alone.
[13:30:27] <ronr_> dreamreal: shouldn't it be ==1 though?
[13:30:33] <dreamreal> right. and right.
[13:30:36] * dreamreal hides
[13:30:41] <new2net> use ^
[13:30:48] <ronr_> ^?
[13:31:05] <new2net> bits = bits ^ 16
[13:31:06] *** frangiz has quit IRC
[13:31:26] <Planck_> Yes, you can either shift 1 left and use &, or shift the int right then & with 1. Either way works
[13:31:27] <ronr_> dreamreal: regarding your previous question, LSB.
[13:31:35] *** topriddy has quit IRC
[13:32:28] *** jaskal has quit IRC
[13:32:31] <ronr_> well, even though I treat it as an 'int', I always care about only two bits (each independently)
[13:32:56] <Planck_> Sounds like yourInt&1 and yourInt&2, then
[13:32:57] <ronr_> basically, the number I'll get will be 0, 1, 2 or 3.
[13:35:17] <ronr_> Planck_: I'm a bit confused as to how yourInt&1, yourInt&2 works.
[13:36:21] <new2net> well yourint&1 returns true if the last bit is 1
[13:36:43] <new2net> well yourint&2 returns true if the 2nd to last bit is 1
[13:36:59] <new2net> yourint&3 returns true if the last two bits are 1
[13:37:03] *** dmlloyd has quit IRC
[13:37:07] <ronr_> right...
[13:37:29] <new2net> in mysql anyways lol
[13:37:41] *** jaskal has joined ##java
[13:37:43] <ronr_> since that's bitwise operations.
[13:38:13] <ronr_> well, I was asking since from that example, one could conclude that yourInt&3 will be the 3rd last bit.
[13:38:40] <ronr_> okay, great. thanks for the help :)
[13:38:51] <new2net> ronr_ that is yourint&4
[13:39:08] <ronr_> right
[13:39:15] <new2net> 1 2 4 8 16
[13:39:36] <ronr_> yeah, I remember how binary works ;)
[13:39:48] <ronr_> just that the specific operations always confuse me.
[13:41:34] <new2net> my bits works completely differently tho
[13:41:43] <new2net> so it's only yourint&4
[13:41:49] *** kriko has quit IRC
[13:43:05] *** jaskal has quit IRC
[13:43:37] *** terranova has joined ##java
[13:44:51] *** djbpython has joined ##java
[13:45:49] *** jaskal has joined ##java
[13:46:37] *** frangiz has joined ##java
[13:47:20] *** dmlloyd has joined ##java
[13:47:42] *** Fisiu has joined ##java
[13:48:24] *** topriddy has joined ##java
[13:54:33] *** BSWolf has quit IRC
[13:54:34] *** BSWolf2 has joined ##java
[13:54:50] <mapreduce> mek||malloc: Was your problem solved?
[13:55:11] <mek||malloc> mapreduce: It was. In the constructor I was using ConcurrentMapHash instead of ConcurrentMap
[13:55:30] *** BSWolf2 is now known as BSWolf
[13:55:31] <mapreduce> You made a hash of it.
[13:55:56] <mek||malloc> mapreduce: Pun?
[13:56:06] *** topriddy has quit IRC
[13:56:15] <ojacobson> pun
[13:56:57] *** topriddy has joined ##java
[13:57:09] <mapreduce> I had the idea that pun had another meaning, so I was looking at online definitions to find it.
[13:57:22] <mapreduce> pun (Spanish): The sound of flatulence
[13:57:50] <mapreduce> (A great name for an album/band)
[13:58:58] *** disaster_02 has joined ##java
[13:59:17] *** bkonrath has joined ##java
[13:59:41] *** Xeli has joined ##java
[14:00:15] *** mastroDani has joined ##java
[14:00:21] *** palyboy has joined ##java
[14:01:44] *** Johannes13 has joined ##java
[14:02:50] <dreamreal> gah, apache.org looks down
[14:03:24] <mapreduce> theserverside.com was down for a bit earlier, mercifully.
[14:03:47] *** hex` has joined ##java
[14:03:59] <ojacobson> is central still on fire?
[14:04:09] <dreamreal> oss.sonatype.org was down earlier
[14:04:34] <mapreduce> repo1.maven.org is up if that's what you mean.
[14:05:51] *** frangiz has quit IRC
[14:06:42] *** frangiz has joined ##java
[14:07:05] *** White_Cat has quit IRC
[14:07:22] *** glcrazy has quit IRC
[14:07:24] *** drindt has quit IRC
[14:10:12] *** drindt has joined ##java
[14:12:02] *** eyesUnclouded has joined ##java
[14:12:56] *** White_Cat has joined ##java
[14:17:30] *** mastroWork has joined ##java
[14:18:15] <new2net> how do I get random access to a file larger than 2GB in java?
[14:18:49] <new2net> do I need to use e notation?
[14:19:14] *** Yusdan has quit IRC
[14:19:15] <mapreduce> RandomAccessFile.
[14:19:43] <ojacobson> Long literals may help if you're seeking to fixed offsets
[14:20:57] *** mastroDani has quit IRC
[14:21:06] *** cocoloa has joined ##java
[14:21:48] <mastroWork> is there a way to make a method overload in an enum? like: public enum Types { INT, DOUBLE, STRING; public MyObj myMethod(???? value) { .... }} ? I'd like to create a different method for every different enum... that take integer if it is INT and double if it is DOUBLE and so on..... like with generics but with a different generics for every enum
[14:22:18] <ojacobson> No.
[14:22:41] <ojacobson> Enum values are not types (even when they're classes, surprisingly).
[14:23:12] <ojacobson> Since you know, statically, what type you're passing in, you don't need the enum though
[14:23:22] <ojacobson> foo(int i); foo(double d); foo(String s); ...
[14:23:24] <ojacobson> will be sufficient
[14:23:57] <mastroWork> ojacobson, so if I want to make a thing like that I had to create an generic inteface and create a different instance for each of my enum and initialize every enum with my instance
[14:25:19] *** Luc1fel has joined ##java
[14:25:22] *** coalado1 has joined ##java
[14:25:30] <ojacobson> I won't even pretend to have understood what you just said
[14:26:56] *** coalado has quit IRC
[14:27:08] <DroidAgent> So... there's no way to dictate the presence of a private method, like you can with a public method in an interface, is that right/
[14:27:12] *** Teckla has joined ##java
[14:27:18] <ojacobson> How would you know if it were there or not?
[14:27:31] <ojacobson> You can't dispatch to a private method in any class but the class containing the calling method definition
[14:27:36] <ojacobson> (no virtual private methods)
[14:27:38] *** White_Cat has quit IRC
[14:27:39] *** abhijain has joined ##java
[14:27:45] <DroidAgent> The compiler would catch it, I guess.
[14:28:03] <ojacobson> Sure, but how would you call it?
[14:28:06] *** bduncan has joined ##java
[14:28:12] <ojacobson> Given only an interface pointer and some unknown implementation
[14:29:02] <DroidAgent> I... dunno.
[14:29:09] <DroidAgent> I guess that's why it's not possible :)
[14:29:40] <ojacobson> Back up a step and explain why you thought you wanted that :)
[14:30:26] <DroidAgent> Hm let me try and explain this, but it's part of a rather large inheritance contraption.
[14:31:17] <ojacobson> That might be the root problem. :)
[14:31:35] <ojacobson> Big sprawling inheritance trees are generally a sign that something's gone wrong
[14:31:39] *** White_Cat has joined ##java
[14:33:00] <DroidAgent> Basically... I have an interface that defines getData(). Now, I have a bunch of datastructures that contain a url, so I call datastructure.getUrl() on them. getUrl() is in an interface, so so far no problem. However, the class that has getData needs to get other stuff from the datastructure, so I'm giving it a reference to a subtype of the datastructure.
[14:33:41] <DroidAgent> Now, getUrl() is the only call on that datastructure, so I figured I'd write that part out of getData() so I can put it in an abstract method and share it.
[14:34:01] <DroidAgent> Is this... too abstract?
[14:34:03] <DroidAgent> Sorry
[14:34:19] <DroidAgent> ..getUrl() is a call in getData()
[14:35:02] *** zemanel has quit IRC
[14:35:10] <DroidAgent> getData() does... get url from datastructure, fetch raw http data, call processData().. return processed data in predefined format.
[14:35:19] *** zuxqoj has quit IRC
[14:35:21] *** thelarry has left ##java
[14:35:53] *** frangiz has quit IRC
[14:36:13] *** Rissien has joined ##java
[14:36:58] *** frangiz has joined ##java
[14:37:21] <ojacobson> Seems like a fairly simple adapter
[14:37:24] <ojacobson> ~c2 adapter pattern
[14:37:25] <javabot> http://c2.com/cgi/wiki?AdapterPattern
[14:37:58] *** kriko has joined ##java
[14:38:35] <DroidAgent> Hm, you're right... I was confined to a box.
[14:38:37] *** abhijain has quit IRC
[14:39:05] *** mastroWork has quit IRC
[14:39:48] <DroidAgent> This could even be a static thingy, sort of like a factory.
[14:40:30] *** Xeli has quit IRC
[14:40:49] *** White_Cat has quit IRC
[14:41:54] *** kaemo has quit IRC
[14:42:20] *** homie has quit IRC
[14:43:48] *** daark_ has quit IRC
[14:46:43] *** sebersole has joined ##java
[14:47:12] *** X-Scale has joined ##java
[14:47:38] *** arborist has joined ##java
[14:47:56] *** matsebc has quit IRC
[14:48:40] <dreamreal> bleh. i find I dislike JPA more and more all the time.
[14:49:03] <ronr_> that's because Java is dead.
[14:50:42] *** White_Cat has joined ##java
[14:51:01] *** surial has quit IRC
[14:51:25] <dreamreal> yeah, yeah, move along
[14:51:53] <DroidAgent> Meh, wrote myself into a corner again.
[14:52:15] * ronr_ mocks DroidAgent
[14:52:44] <DroidAgent> :(
[14:52:52] *** surial has joined ##java
[14:53:31] *** Frankie-T has joined ##java
[14:55:15] <Frankie-T> Hi. Do you know which's faster? if(a==b){boolVar = true;} else {boolVar = false;} return boolVar; or return a==b
[14:55:33] <mapreduce> Frankie-T: return a == b;
[14:56:17] <Frankie-T> really? I thought the compiler might need a little bit more time to create the test for itself
[14:56:24] *** ironm has joined ##java
[14:56:32] <mapreduce> The compiler doesn't run at runtime.
[14:57:11] <Frankie-T> the interpreter, then
[14:57:36] *** White_Cat has quit IRC
[14:57:46] <mapreduce> I don't know what, other than trolling, would give you that idea.
[14:58:20] *** VJTachyon has joined ##java
[14:58:23] *** matsebc has joined ##java
[14:58:29] <flippo> Frankie-T, making it up as you go along?
[14:59:05] <Frankie-T> Do you have a explaination why it's faster? Less code doesn't always mean more speed
[14:59:22] <dreamreal> Frankie-T: because the JIT analyzes what the best result for the code path would be
[14:59:54] <ojacobson> Frankie-T: In practice it's not faster or slower, but it is much, much clearer. There might be a couple of jiffies of difference before the JIT kicks in, though.
[14:59:59] <dreamreal> JIT is not stupid. Its authors are among the brightest programming minds on earth. In fact, i dare say that JIT itself is smarter than most programmers. Write clear code. Let it do the work.
[15:00:13] *** JDuke128 has joined ##java
[15:00:22] <ojacobson> And, really, even if there were a speed difference, how large do you think it would be? Large enough to justify writing idiot code?
[15:00:26] <flippo> Frankie-T, a==b is either true or false. Reassigning that value to another variable before returning accomplishes nothing. Testing it to do so only adds an operation, which I'm sure would be optimized away anyway
[15:00:30] <mapreduce> Frankie-T: There are fewer operations in return a == b;, and the longer version contains at least those operations.
[15:00:42] <mapreduce> Frankie-T: Therefore, if either is slower it will be the longer version.
[15:00:58] <mapreduce> In practice, you'll never see the difference unless you're looking for it and probably not even then.
[15:00:59] <ironm> Hello - please allow me one question about monitoring java applications with monit. What is the syntax (monit config file) to monitor a java application? ... e.g. for a normal process it would be "check process nginx with pidfile /var/run/nginx.pid" - thank you in advance for any hints :)
[15:01:12] <mapreduce> But you didn't ask whether they perform the same, you asked which is faster.
[15:01:14] *** homie has joined ##java
[15:01:34] <flippo> Frankie-T, maybe you should use a ternary for extra decoration
[15:01:53] <mapreduce> return a == b == true ? !true : !!!false
[15:01:54] <mapreduce> ;
[15:02:02] <flippo> yep :)
[15:02:15] <mapreduce> sorry, != true
[15:02:23] <mapreduce> Must preserve semantics. :)
[15:02:26] *** maxorator has joined ##java
[15:02:40] *** Cymage has joined ##java
[15:05:39] <Frankie-T> Do you have any link to any documentation or tutorial which deals with this problem
[15:05:42] *** arborist has quit IRC
[15:05:56] <bulltwang> ek kan nie help om te dink dais verkeerd nie...
[15:06:09] *** arborist has joined ##java
[15:06:50] <ronr_> der wille zur macht!
[15:06:55] *** White_Cat has joined ##java
[15:07:00] <dreamreal> Frankie-T: look up hotspot.
[15:07:21] *** frangiz has quit IRC
[15:07:56] <dreamreal> this is the kind of non-issue that makes other non-issues jealous.
[15:08:07] *** mastroWork has joined ##java
[15:08:13] *** frangiz has joined ##java
[15:09:34] *** djbpython has quit IRC
[15:09:41] *** adamisme has joined ##java
[15:09:45] *** adamisme has left ##java
[15:10:39] *** bduncan has quit IRC
[15:11:39] *** devkhadka has joined ##java
[15:14:40] *** epalm has joined ##java
[15:16:17] *** L-----D has quit IRC
[15:22:38] *** jdolan has joined ##java
[15:23:55] *** javobiwan has quit IRC
[15:24:45] <ironm> Is it possible to use "monit" to monitor java applications? .. or is there another recommended method/package to do it? - thanks in advance for any hints
[15:25:21] <ronr_> jconsole :)
[15:25:30] <ronr_> visualvm :)
[15:25:43] <ronr_> <any other generic name here> :)
[15:26:19] *** Marcofe has quit IRC
[15:26:27] <ironm> hi ronr_ :) ... thank you .. however I need it for sysadministration .. so any kind of console is not what I am looking for
[15:26:54] *** Marcofe has joined ##java
[15:27:01] <ironm> monit runs as a deamon and restart every process it such one should stopped
[15:27:04] <ronr_> ironm: you want something that works in telepathy. gotcha.
[15:27:23] <ronr_> so you want a nanny.
[15:27:51] <ronr_> you can write a simple script to do that :)
[15:28:14] <ronr_> or use Tivoli. MUHAHAHAHAHA! :p
[15:28:30] *** jesmon has joined ##java
[15:28:44] <ironm> ronr_ .. moinit is a monitoring rool ( a kind of nanny) . the syntax for a normal application is like : "check process nginx with pidfile /var/run/nginx.pid"
[15:29:05] <ironm> do you know monit ronr_ ?
[15:29:23] <ronr_> ironm: yeah, it's a monitoring tool :p
[15:29:30] <ironm> my question is how to monitor a java application using monit
[15:29:53] <ironm> there is no description about monitoring java apps in monit manual
[15:30:03] <ironm> and no monit IRC channel
[15:31:31] <ronr_> ironm: read the first comment ;) http://prefetch.net/blog/index.php/2008/01/29/getting-alerts-when-java-processes-crash/
[15:31:36] *** progme has joined ##java
[15:32:48] *** Marcofe has quit IRC
[15:33:09] <ironm> thank you ronr_
[15:33:33] *** mastro has joined ##java
[15:33:36] *** bearded_oneder has joined ##java
[15:33:42] <ronr_> ironm: it doesn't answer 'how' but it definitely answers a different question :)
[15:34:05] <ronr_> ironm: also, Google is your friend. embrace it :)
[15:35:25] *** bn` has joined ##java
[15:35:30] *** Marcofe has joined ##java
[15:35:50] <ronr_> ironm: on the same note: http://lists.nongnu.org/archive/html/monit-general/2005-11/msg00053.html
[15:37:13] *** mastroWork has quit IRC
[15:37:15] *** frangiz has quit IRC
[15:37:19] <ironm> ronr_, I am trying google for two days already :(
[15:37:40] <ronr_> ironm: you need to learn to google then ;)
[15:37:46] <ironm> and altavista .. no real help
[15:38:08] <ironm> ronr_, I mean results from google ;)
[15:38:28] *** frangiz has joined ##java
[15:38:57] *** oliver3 has joined ##java
[15:40:49] *** kriko has quit IRC
[15:40:51] *** sbalmos has joined ##java
[15:42:25] *** Marcofe has quit IRC
[15:43:12] *** kur1j has joined ##java
[15:43:58] <freeone3000> ironm: Oh look. http://mmonit.com/wiki/Monit/FAQ . They have a website. Oh look. It describes what to do in detail.
[15:47:44] *** mastroWork has joined ##java
[15:47:51] *** qiip has quit IRC
[15:47:53] <mapreduce> Websites are old hat, centralised around US DNS servers.
[15:48:12] <mapreduce> We young'uns prefer the distributed model, i.e., asking in 15 IRC channels at once.
[15:49:13] *** Kamaran has joined ##java
[15:49:30] *** whaley has joined ##java
[15:49:50] *** modernbob has joined ##java
[15:51:27] *** mastro has quit IRC
[15:51:50] *** yxz97 has joined ##java
[15:53:59] *** djbpython has joined ##java
[15:54:42] *** bkonrath has quit IRC
[15:54:44] <ironm> thank you very much freeone3000 :)
[15:55:15] <kur1j> I am working on a deployment of Tomcat, the latest java JRE and our web application on windows. After an install on a fresh install of windows we keep getting the error "java.lang.UnsatisfiedLinkError: no dbjodbc in java.library.path" when we try to launch the application. Doing nothing other than restarting windows the issue goes away. I am trying to figure out what I need to refresh in windows to avoid having to restart the OS to get
[15:55:26] *** Marcofe has joined ##java
[15:55:43] *** tavish has joined ##java
[15:56:10] <dreamreal> looks like a system classpath of some sort
[15:57:59] *** kriko has joined ##java
[15:59:06] *** tuxtor has joined ##java
[15:59:20] <kur1j> dreamreal: You are correct. The change seems to have been made in the system but tomcat doesn't see it
[16:00:10] <tavish> can i use the java2 complete reference 3rd edition, or is it too outdated?
[16:00:27] <dreamreal> tavish: which java version does it refer to
[16:01:36] <dreamreal> you do know that tomcat sets its own classpath explicitly?
[16:01:50] *** freeone3000 has quit IRC
[16:02:01] <dreamreal> (if not: hey, tomcat sets its classpath explicitly.)
[16:02:28] <kur1j> dreamreal: well it would seem it does because after the restart it works
[16:02:43] *** mek||malloc has quit IRC
[16:02:50] *** supercosmonaut has quit IRC
[16:02:56] <dreamreal> well, you should be putting the driver in the tomcat classpath anyway, not relying on a system classpath in any way
[16:03:00] <tavish> dreamreal: i can't find it. in the preface it says 1st ed. was java 1.0, 2nd was java 1.1 and 3rd is java 2
[16:03:21] *** glcrazy has joined ##java
[16:03:32] <dreamreal> tavish: then assume no, I guess
[16:03:40] <dreamreal> does it mention generics or enum?
[16:04:24] *** ff1959 has joined ##java
[16:05:15] *** spass has joined ##java
[16:05:24] <tavish> dreamreal: nope
[16:05:29] <dreamreal> then definitely not
[16:06:31] *** Marcofe has quit IRC
[16:06:32] *** [clay] has quit IRC
[16:07:03] *** new2net has quit IRC
[16:07:27] *** caverdude has joined ##java
[16:08:25] *** cbeust has joined ##java
[16:08:42] *** frangiz has quit IRC
[16:08:46] *** Marcofe has joined ##java
[16:08:49] *** mastroWork has quit IRC
[16:09:22] *** supercosmonaut has joined ##java
[16:09:43] *** frangiz has joined ##java
[16:10:25] *** BeholdMyGlory has joined ##java
[16:11:23] *** Matic`Makovec has joined ##java
[16:11:54] *** spass has left ##java
[16:12:10] *** yahya_h has quit IRC
[16:12:44] *** jjido has joined ##java
[16:14:25] *** robbyoconnor has quit IRC
[16:15:09] *** bduncan has joined ##java
[16:17:07] <kur1j> dreamreal: putting it in the system classpath or the tomcat classpath shouldn't really matter
[16:17:16] *** jjido has quit IRC
[16:17:59] <dreamreal> kur1j: it would if tomcat overrides the system classpath.
[16:18:09] <kur1j> so why would it work after a restart then?
[16:19:03] *** srji has joined ##java
[16:19:54] <dreamreal> kur1j: I'm not defending tomcat or whatever. I'm just saying: system-wide classpaths are usually fail, because many programs *do* explicitly set a classpath (overriding any system classpath) and therefore your expected settings wouldn't survive.
[16:20:14] <kur1j> understandable
[16:22:19] *** NS_IS has joined ##java
[16:23:56] *** eross has joined ##java
[16:24:28] *** VJTachyon has quit IRC
[16:25:06] *** EvilPenguin has joined ##java
[16:25:46] *** VJTachyon has joined ##java
[16:28:12] *** jtheuer has joined ##java
[16:30:58] *** gtrak has joined ##java
[16:34:19] *** blahspam has joined ##java
[16:34:22] *** blahspam has left ##java
[16:36:03] *** blahspam has joined ##java
[16:36:06] *** Matuku has joined ##java
[16:36:19] *** tewecske has joined ##java
[16:37:11] *** Matuku has quit IRC
[16:37:25] *** caverdude has quit IRC
[16:39:40] *** vdv has quit IRC
[16:41:25] *** tigger0jk has quit IRC
[16:44:09] *** kriko has quit IRC
[16:44:22] *** Matuku has joined ##java
[16:45:46] *** TheLQ has joined ##java
[16:47:24] <TheLQ> I'm running into a strange problem: As soon as I add Generics to an interface a completely separate method not even using the Generic type returns Object instead of something else., breaking my code. Does anyone have any idea what would cause this? Example: http://pastebin.com/4w4DgbpJ
[16:48:34] *** ugoubuntu has joined ##java
[16:48:48] *** ugoubuntu has left ##java
[16:48:53] *** supercosmonaut has quit IRC
[16:51:32] *** eross has quit IRC
[16:52:05] *** bojo has joined ##java
[16:52:56] *** cythrawll has joined ##java
[16:53:19] <paulweb515> TheLQ: and what's the definition for ListenerManagerTest ?
[16:53:34] *** bojo has quit IRC
[16:53:49] <paulweb515> oh, sorry, you need to actually pass in something generic in your case 2
[16:53:50] <TheLQ> paulweb515: Its already there in the interface
[16:54:16] <TheLQ> And E should affect getListeners() as it doesn't even use E
[16:54:17] <paulweb515> setListenerManager(ListenerManagerTest listenerManager) ... that doesn't provide a generic
[16:54:44] *** kriko has joined ##java
[16:54:45] <TheLQ> But I'm not using E, I'm explicitly returning a Listener
[16:54:47] <paulweb515> TheLQ: I see what you mean
[16:55:07] <ojacobson> If only there were some kind of explanation
[16:55:11] <ojacobson> from the compiler's point of view
[16:55:25] <paulweb515> TheLQ: maybe not using ListenerManagerTest<?> causes it to deliberately switch to the type-earased version of the class ...
[16:55:39] <kur1j> dreamreal: I just think that after the tomcat service is installed it doesn't see the new environment variables until the restart
[16:56:05] <kur1j> because if I put the dll into C:\tomcat\bin\ the application loads correctly
[16:56:18] <TheLQ> paulweb515: But it shouldn't affect all Generics in the entire class
[16:56:32] *** opakavic has quit IRC
[16:56:36] <TheLQ> I could understand if it was returning Set<E>
[16:57:31] <ojacobson> TheLQ: Include the compiler error, please
[16:57:45] *** kriko has quit IRC
[16:57:49] <paulweb515> TheLQ: if it's deliberately picking the type-erased version, then that class has *no* generics.
[16:58:01] <paulweb515> TheLQ: of course ojacobson is correct, this is only speculation :-)
[16:58:36] *** freeone3000 has joined ##java
[16:58:41] <paulweb515> TheLQ: what does the compiler complain about when it goes bad ...
[16:58:42] <ojacobson> Also, that sure looks like a good place to use .contains rather than a loop
[16:58:59] <TheLQ> ojacobson: This was only an example
[16:59:03] <ojacobson> .contains might be faster than O(n) on the size of the set (and will be, for most built-in Set implementations) but a loop will always be O(n)
[16:59:12] <ojacobson> (or worse)
[16:59:25] *** laught has joined ##java
[16:59:31] <TheLQ> Compiler error: http://pastebin.com/f3WikYHf
[16:59:43] <laught> hello
[17:00:19] <freeone3000> TheLQ: Usually one sticks the code that causes the error and the code in the same post. ANyway, you have an Object, you're treating it like a org.pircbotx.hooks.Listener.
[17:00:38] <TheLQ> But I'm not returning E
[17:00:52] <TheLQ> Listener and E are two completely seperate things
[17:01:11] <laught> if i have a string like 'some words [other words] {some other words} etc', whats the best way to get and replace whats inside [] and {} ?
[17:01:13] <TheLQ> Set<E> getListener() would make sense for the error
[17:01:20] <TheLQ> Set<Listener> getListener() makes no sense
[17:01:30] <freeone3000> TheLQ: Well, the compiler says that you're trying to pass an Object to something that accepts a Listener.
[17:01:52] <freeone3000> laught: Regex.
[17:01:55] <freeone3000> ~~ laught regex
[17:01:55] <javabot> laught, regex is short for "regular expressions". See the tutorial at http://is.gd/fTe2o [oracle.com]; if you know what you're doing, use http://is.gd/fTe5a [javachannel.net] for reference, and see http://is.gd/fTe7a [javaworld.com] for tips on optimization. Ask me about "~javadoc Pattern" and "~javadoc String.split(*)".
[17:02:01] <paulweb515> TheLQ: what if you change your method to take ListenerManagerTest<?> or ListenerManagerTest<E extends PircBotX>
[17:02:18] *** Bombstone has joined ##java
[17:02:20] <TheLQ> paulweb515: Hmm... that fixed it
[17:02:20] <laught> thanks, was wondering if it was possible with regexp
[17:02:35] <TheLQ> This is so strange
[17:03:02] <paulweb515> TheLQ: no, it's the difference between the interface using generics and the type-erased interface (with absolutely no generics)
[17:03:42] *** kriko has joined ##java
[17:03:45] *** dframe has quit IRC
[17:03:59] <TheLQ> So No generics means wipe all generics for the entire class regardless if they are related or not?
[17:04:04] <TheLQ> That makes no sense
[17:04:18] *** mazzachre has quit IRC
[17:04:55] <paulweb515> TheLQ: it does if you understand what generics are ... compile time candy ... you can't ask it for "half the generics for this class"
[17:05:51] <ojacobson> JLS3 section 4.8 looks relevant
[17:06:23] <ojacobson> The short version is "don't use raw types, doofus" though
[17:06:39] <paulweb515> LMAO
[17:06:47] <TheLQ> And this is when I leave
[17:06:48] *** ff1959ff has joined ##java
[17:06:49] <TheLQ> Thanks for the help
[17:06:53] <sbalmos> enjoy
[17:06:58] <ojacobson> HAND
[17:07:09] *** ff1959ff has quit IRC
[17:07:33] *** jjido has joined ##java
[17:08:34] *** ff1959 has quit IRC
[17:08:51] <fr0ggler> i thought the answer was perfectly satisfactory.
[17:09:18] <fr0ggler> or am I picking up on some sentiment that isn't there? much like generics at runtime! hah!
[17:10:20] *** larmeh_ has joined ##java
[17:10:27] <larmeh_> hi there
[17:11:49] <larmeh_> why does InetAdress.getByName() take a byte[] as argument? i thought there is no way to make a byte "unsigned" so a byte's interval should be from −127 to 128, right?
[17:12:08] <cheeser> yes
[17:12:11] <ojacobson> It's all about the bit pattern, not the numeric value
[17:12:16] <cheeser> yes
[17:12:17] <cheeser> 8^)=
[17:12:22] <ojacobson> (You meant getByAddress, right?)
[17:12:30] <larmeh_> oh, sure
[17:12:56] <ojacobson> If you want the human-readable representation ("192.168.0.1") use getByName with that as the string
[17:13:17] <larmeh_> so if i set the bit pattern correctly, there can be an ip such as e.g. 192.168.0.254 without java messing up the last part?
[17:13:20] <ojacobson> The corresponding byte array has the same bit pattern as byte[] {(byte) 192, (byte) 168, 0, 1}
[17:14:34] *** TheLQ has quit IRC
[17:15:00] *** defascat has joined ##java
[17:15:17] *** nacre has quit IRC
[17:15:23] *** defascat has left ##java
[17:15:41] <mapreduce> It does?
[17:16:09] <mapreduce> (byte)254 == -2, fwiw
[17:16:28] <freeone3000> Yeah, but that doesn't matter. It's still the same bits in the same position.
[17:16:44] <laught> sorry, need some directions on how to use regexp to iterate throught groups
[17:17:50] *** Ramen has joined ##java
[17:18:00] <freeone3000> laught: Create a Pattern. Get the Matcher from the Pattern supplied with the input. Loop until matcher.find() returns false. The resulting Matcher has the current state of the match. For clarity, one can also choose to get the MatchResult from the Matcher, and operate on the MatchResult.
[17:18:45] *** RenatoSilva has joined ##java
[17:23:29] *** Ch30ps has quit IRC
[17:24:28] *** bojo has joined ##java
[17:24:28] <laught> thank you
[17:25:46] <mapreduce> freeone3000: I thought 254 would have a 1 at the beginning, and 1 wouldn't.
[17:25:47] <surial> larmeh_: To be clear, -2 and 254 are indistinguishable from each other by a computer (assume we're talking an 8-bit number here). They are EXACTLY the same byte under the hood: 1111 1110
[17:26:41] <freeone3000> mapreduce: The sign bit is 1 when a number is negative, and is at the most-significant-bit.
[17:26:47] <mapreduce> freeone3000: In fact, they're the inverse of each other.
[17:26:52] <mapreduce> freeone3000: 1 isn't negative.
[17:27:02] *** km has joined ##java
[17:27:02] <surial> larmeh_: System.out.println(that) will print -2 if 'that' is a byte, simply because all of java (including the language spec) has defined 1111 1110 in a byte to be interpreted as -2 and not as 254.
[17:27:07] <freeone3000> mapreduce: Right. I'm not saying 254 and 1 have the same bit pattern. I'm saying 254 and -2 do.
[17:27:51] <mapreduce> freeone3000: Gotcha, sorry.
[17:27:52] <surial> ... except where java doesn't. Such as for byte[] fed to an Inet4Address.
[17:27:59] *** bulltwang has quit IRC
[17:28:10] *** vpit3833 has joined ##java
[17:28:10] <surial> laught: "Iterate through groups"? That concept does not exist.
[17:28:49] <freeone3000> for(int i = 0; i < matcher.groupCount(); ++i) { String str = matcher.group(i); ... }
[17:28:49] *** new2net has joined ##java
[17:28:50] <surial> laught: Just ask for group(1), then group(2), and so on until you get nothing back.
[17:30:11] <laught> my string repeats, like : 'str [g1] {g2}, str2 [g3], str3 [g4] {g5}'
[17:30:47] *** djabbour has joined ##java
[17:30:57] <laught> what i want is to get whats btw [] and {} and replace it for something else, saving what was there somewhere else
[17:30:58] <surial> laught: Any given regexp has a set number of groups. You can't have a regexp that has an infinite number of groups. Something like (foo ([a-z]) bar)* does not imply you have an infinite number of groups.
[17:31:12] <laught> yes
[17:31:17] *** Luc1fel has quit IRC
[17:31:21] <djabbour> Is there a good library for writing a remote control CLI for my app? Basically I was thinking of exposing a socket interface for my app (kinda like telnet), but before I go code it manually I wanted to see what was out there?
[17:32:14] <freeone3000> Side fun note. IP defines its protocol in terms of bits, not integers, so the whole signedness is irrelevant for purposes of InetAddress.
[17:32:17] <ojacobson> I would be tempted not to
[17:32:39] <ojacobson> djabbour: might be worth exposing something higher-level (jmx, http, whatever) and writing a CLI client for that, instead
[17:32:56] <ojacobson> alternately, have a look at what jenkins and various osgi containers have done
[17:32:57] <freeone3000> Or using one. Fairly sure there's already a JMX client out there.
[17:32:58] *** jonkri has quit IRC
[17:33:27] <ojacobson> jconsole
[17:33:45] <laught> i know my string is separated by comma, and btw commas it can have or not the [] and {}. could i split the entire string by ',' and loop it, matching it with a regexp the get me the groups if they exist ?
[17:34:01] <freeone3000> laught: Yes.
[17:34:25] <freeone3000> Oh look. Pattern.split(). Now you have a String[] where you have to do the exact same thing as above, only more.
[17:34:30] <djabbour> ojacobson, thanks :)
[17:34:35] <djabbour> freeone3000, thanks :)
[17:36:02] <Kristen207> I have a JComboBox of 5 items. When I'm writing a test case and want to change it to be the 3rd, what is the code to do that? Like, with a checkbox it's just click(box)
[17:36:09] *** RenatoSilva has left ##java
[17:36:35] <mapreduce> freeone3000: Similarly, you can specify IP addresses to most programs as hex.
[17:36:59] <freeone3000> Kristen207: Which testing provider are you using? Unless you're using Robot, in which case, get a different testing provider (FEST is rather decent).
[17:37:45] <Kristen207> Seems to be a custom one
[17:37:47] *** Cymage has quit IRC
[17:37:56] <freeone3000> Good luck, ask them.
[17:38:43] <Kristen207> Ahh, here's the API
[17:38:45] <Kristen207> Got it
[17:40:22] *** fr0ggler has quit IRC
[17:42:21] <asfdd> fucking svn telling me to run cleanup, then when i run cleanup it says its locked
[17:42:28] <asfdd> then it says its not locked
[17:42:29] <asfdd> gah
[17:42:32] *** Frankie-T has quit IRC
[17:42:50] <tjsnell> haha
[17:42:55] *** RenatoSilva has joined ##java
[17:42:59] <tjsnell> I read that as "fucking svm"
[17:43:03] *** xianny has joined ##java
[17:43:19] *** Cymage has joined ##java
[17:43:46] <freeone3000> Oh, you silly antiquated developers, using a scm where "locking" is still an issue.
[17:44:02] *** realtime_ has joined ##java
[17:44:31] *** jjido has quit IRC
[17:44:34] * tjsnell goes to check in to CVS
[17:44:48] <ojacobson> freeone3000: nice try, please play again
[17:45:06] <ojacobson> that particular message is entirely talking about IPC locks to stop multiple invocations of svn(1) from stomping on each others' toes
[17:45:14] <ojacobson> not about SCM locks against commits
[17:45:47] <laught> http://pastebin.com/vSW2ZgXG
[17:46:50] *** TheBeerinator has quit IRC
[17:47:03] *** maxorator has quit IRC
[17:47:22] *** ironm has quit IRC
[17:47:27] <freeone3000> laught: First off, don't do that ".*" thing. It'll match the entire pattern, and is completely unnecessary. Second, your regex maches the space in the middle, which could have something to the left, and could have something to the right.
[17:47:46] *** srji has quit IRC
[17:48:33] *** GilbertErik has joined ##java
[17:48:50] <ojacobson> { and } are also metacharacters, and need escaping if you want to match { or } in the source text
[17:48:50] <laught> didnt understand the second part
[17:48:51] *** RenatoSilva has left ##java
[17:49:02] <freeone3000> laught: You probably want something similar to "((?:\\[(?:^\\])*\\])|(?:\\{(?:^\\})*\\})".
[17:49:47] <laught> ah, needed to escape { and }
[17:49:48] <laught> thanks
[17:49:52] <freeone3000> laught: Okay. Look at your pattern. You have an optional left-group "(\\[.+\\])?", an optional right group, "({.+})?", and a space in the middle, which is not optional. Consider the differences between yours and mine.
[17:50:10] *** zatan has joined ##java
[17:50:18] *** [clay] has joined ##java
[17:51:02] <laught> does | matches both ?
[17:51:09] <freeone3000> | is "or".
[17:51:16] <laught> yes
[17:51:19] *** riotz has quit IRC
[17:51:29] <laught> but when theres both expressions
[17:51:51] <freeone3000> Since the pattern will match one or the other, the matches to the pattern will be both, yes.
[17:51:53] <laught> i mean, 'a [b] {c}' is matched ?
[17:52:00] <laught> ok, cool
[17:52:21] <freeone3000> No. [b] will be matched, and then {c} will be matched.
[17:52:26] <laught> 'is matched' is probably 'matches'
[17:52:26] <laught> lol
[17:53:04] *** TheBeerinator has joined ##java
[17:53:24] *** teralaser has quit IRC
[17:53:31] <laught> why :^ ?
[17:53:39] *** disaster_02 has quit IRC
[17:53:45] <laught> ?:^ i mean
[17:54:49] <freeone3000> ?: disables the matching group for the subexpression. ^ is not.
[17:55:36] <freeone3000> \\[(?:^\\])\\] will read zero-or-more not-]'s until it reaches a ].
[17:56:21] <freeone3000> Err. If I had included the quantifier it would have. That'll read exactly one. Needs a * three chars from the right.
[17:56:29] *** brig has quit IRC
[17:57:38] <laught> hum it was there in the original
[17:59:44] *** ianp has joined ##java
[17:59:54] <laught> yours is always disabling groups ?
[18:00:14] <laught> oops, sorry
[18:00:20] <freeone3000> There'll be one group, consisting of the entire match. If you want more groups, take out ?: expressions.
[18:00:56] <dmlloyd> uh are you sure you can use (?:) inside of a character class
[18:01:11] <dmlloyd> oh it's not a character class at all
[18:01:42] <dmlloyd> making more sense would be \\[[^\\]]*\\]
[18:03:22] *** A1ex1 has joined ##java
[18:03:55] *** jdolan has quit IRC
[18:04:46] <A1ex1> http://pastebin.com/GziRPsQa Can someone explain why html always seem to have a length of 0 please?
[18:05:09] <freeone3000> A1ex1: Because you depend on InputStream.ready()
[18:05:32] <A1ex1> Oh :/
[18:05:39] <A1ex1> What should I change it to?
[18:05:58] <freeone3000> .read(byte[]), and read until that returns a negative number.
[18:07:09] *** aksn has quit IRC
[18:07:35] *** PelleTut has joined ##java
[18:08:54] <A1ex1> freeone3000: Eclipse has an error over the byte[] bit
[18:09:03] <A1ex1> Syntax error on token(s), misplaced construct(s)
[18:09:11] <freeone3000> ~javadoc InputStream.read(byte[])
[18:09:12] <javabot> freeone3000: http://is.gd/pqvSvn [JDK: java.io.InputStream.read(byte[])]
[18:09:14] <A1ex1> I tried while(in.read(byte[]) >= 0){
[18:09:27] <freeone3000> It wasn't intended to be copied verbatim.
[18:10:31] <dreamreal> heh
[18:10:34] *** jtheuer has quit IRC
[18:10:47] <A1ex1> byte[] b;
[18:10:47] <A1ex1> while(in.read(b) >= 0){
[18:11:00] <A1ex1> It thinks b is a CharBuffer
[18:11:14] *** _Jorde has quit IRC
[18:11:14] <A1ex1> when it's a byte array >_<
[18:11:17] <A1ex1> wtf
[18:11:37] <dreamreal> freeone3000: http://webcache.googleusercontent.com/search?q=cache:zEpl4rm_B2AJ:www.theserverside.com/news/thread.tss%3Fthread_id%3D49471+java+sucks+without+semantic+awareness&cd=1&hl=en&ct=clnk&gl=us&source=www.google.com
[18:11:56] *** cbeust has quit IRC
[18:12:33] <freeone3000> ~io
[18:12:33] <javabot> For information on handling input/output in java see http://download.oracle.com/javase/tutorial/essential/io/
[18:12:55] <freeone3000> A1ex1: Read that. Also, come back when you want to be berated for parsing HTML with regex.
[18:13:15] <A1ex1> I'm not even using that HTML parsing yet
[18:13:35] <A1ex1> No one has been able to show me how to download the page properly :/
[18:14:08] <dreamreal> show you how to download what? an html page?
[18:14:21] <A1ex1> yeah
[18:14:22] <freeone3000> URLConnection.getContent() would be the easiest way.
[18:14:34] <dreamreal> yeah, it ain't rocket science
[18:14:44] <freeone3000> You want to use a byte stream and copy it into memory, and there's nothing wrong with that - you're just doing it wrong.
[18:14:55] <freeone3000> Or rather, you are currently using, rathern than you want to use.
[18:16:09] <dreamreal> freeone3000: rather, http://www.theserverside.com/news/thread.tss?thread_id=49471 if you want to avoid google cache
[18:16:16] <dreamreal> but that post was directly from ##java :)
[18:16:31] <Skyec> there's a point to the way the semantics of Java work... but it has to be balanced with what people are used to, not only how "utopia" should be
[18:16:52] <freeone3000> It's more of a "people are morons" thing.
[18:17:36] <Skyec> perhaps... I did Smalltalk for a number of years. I found that incredibly easy to pick up... mainly because of the style/semantics
[18:18:01] <dreamreal> I don't think they're morons, exactly. I just think people are lacking in intellectual capacity.
[18:18:01] *** ech0s7 has quit IRC
[18:18:33] *** coalado1 has quit IRC
[18:18:36] <Skyec> its just perspective. There are stupid people out there sure... I don't think semantics has a big influence on whether a programming language would die or not though
[18:19:09] <dreamreal> I just think it's funny when people try IRC code as if it were literally the fix
[18:19:09] *** horte has quit IRC
[18:19:34] <Skyec> even the best codebase has some "copy and paste" code in it
[18:19:35] <dreamreal> "Wait, my collection is not named x, your code gave me a compilation error, MY list is named 'PersonList,' you moron!"
[18:19:42] *** cool123 has joined ##java
[18:19:51] <Skyec> oh... sorry, I see what you mean
[18:20:09] <Skyec> lol, well yeah, that is very stupid then :)
[18:20:36] <dreamreal> like I said... that post came directly from ##java, with names removed
[18:20:39] <shiranpuri> dreamreal: surely you wrote that code specific for me, and it's perfect as-is?
[18:20:50] <dreamreal> shiranpuri: of course.
[18:20:59] <dreamreal> If it doesn't work, you're using a broken compiler.
[18:21:06] <A1ex1> html = new URL("http://discogc.game-host.org/stats/players_online.html").openConnection().getContent().toString();
[18:21:12] <shiranpuri> dreamreal: I mean, you have nothing better to do than write my stuff for me
[18:21:13] <A1ex1> sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@4a913fe2
[18:21:14] <A1ex1> wtf
[18:21:19] <Skyec> i generally call my variables letters of the alphabet. It saves typing.
[18:21:27] <dreamreal> this is true. It's write code for you or do this fscking JPA crap.
[18:21:29] <Skyec> (that was a joke)
[18:21:41] <dreamreal> OpenJPA is nice, except it relies on transaction semantics to be VERY precise and amazingly verbose.
[18:21:49] <dreamreal> Skyec: liar.
[18:22:01] <freeone3000> A1ex1: How is http://download.oracle.com/javase/6/docs/api/java/net/URLConnection.html#getContent() in any way ambiguous?
[18:22:07] <dmlloyd> A1ex1: that's not how you use streams
[18:22:08] <Skyec> a.execute(b).set(c);
[18:22:13] <Skyec> for readability!
[18:22:17] *** coldpizza72i has joined ##java
[18:22:19] <dmlloyd> ~~ A1ex1 javadoc InputStream
[18:22:20] <javabot> A1ex1: http://is.gd/jUS9u [JDK: java.io.InputStream]
[18:22:33] <freeone3000> Coulda sworn it got you something different.
[18:23:03] <shiranpuri> A1ex1: I had a friend who liked to call his variables moo.
[18:23:07] <shiranpuri> moo1, moo2, moo3...
[18:23:12] <A1ex1> shiranpuri: lol
[18:23:50] *** coldpizza72i has quit IRC
[18:23:53] *** cime has joined ##java
[18:24:05] <dreamreal> shiranpuri: dummy. Clearly shoudl be mu1, moo2, mew3, mu4...
[18:24:12] *** goon12 has quit IRC
[18:24:26] <shiranpuri> dreamreal: lets not forget different capitalizations too!
[18:24:33] <shiranpuri> and some 0's instead of O's
[18:24:37] <dreamreal> oooo. M005...
[18:24:57] <cime> hi! is it possible to give remote access to javax.xml.ws.Endpoint? I tried to publish it on different IPs but no luck: 0.0.0.0, 192.168.0.5 (local ip), localhost
[18:25:07] *** svm_invictvs has joined ##java
[18:25:13] <svm_invictvs> ?
[18:25:23] *** greenm0nk has joined ##java
[18:25:25] *** BeholdMyGlory has quit IRC
[18:25:31] <A1ex1> dmlloyd: I'm not trying to use an inputstream
[18:25:46] *** robbyoconnor has joined ##java
[18:26:06] <laught> lol
[18:26:10] <dmlloyd> A1ex1: I'm sorry to hear that. But that's what you get.
[18:26:54] *** meling has quit IRC
[18:27:48] <A1ex1> Wish there was a simple way in java to get the HTML source of a page into a string :/
[18:27:56] <greenm0nk> i get "unchecked method invocation error" for https://gist.github.com/f1085dd28ee22923cf78
[18:27:59] <dreamreal> A1ex1: there is!
[18:28:00] <greenm0nk> any help?
[18:28:18] *** coldpizza72i has joined ##java
[18:28:23] <A1ex1> dreamreal: Probably, but these guys seem intent on hiding it within pages and pages of documentation -.-
[18:29:07] <dreamreal> A1ex1: no. You get an inputstream. You use it to build a string. It's very very simple.
[18:29:35] *** freeone3000 has quit IRC
[18:29:35] *** diminish has quit IRC
[18:29:43] *** bcave has joined ##java
[18:29:45] <bcave> hi
[18:29:50] <dreamreal> however, I have a feeling people have been telling you this.
[18:29:56] *** luxurymode has joined ##java
[18:30:00] <coldpizza72i> http://pastebin.com/xKXZLCVt any idea why my ceiling function isnt working...ex) when sigma is 9 and SLICE is 8
[18:30:43] *** diminish has joined ##java
[18:30:46] *** luneff has joined ##java
[18:31:10] <bcave> i have a problem with CDI....
[18:31:32] <bcave> (im trying to deploy someone elses code too :p )
[18:31:36] *** pipeep has quit IRC
[18:31:44] <luxurymode> hey all. not sure this is the right place to ask such a basic question, but im trying to figure out how to get my java class to import or read from a text file. do i need to use a FileInputStream? also, how can i add the text file as a resource in my project?
[18:31:53] <bcave> hope this is the right place...
[18:31:56] *** hex` has quit IRC
[18:31:58] *** Bombstone has quit IRC
[18:32:12] <greenm0nk> can anyone help with this - "unchecked method invocation error" for https://gist.github.com/f1085dd28ee22923cf78
[18:32:18] <bcave> i get an error of: Unsatisfied dependencies for type [Logger]
[18:32:27] <bcave> with qualifiers [@Default]
[18:32:34] <dreamreal> greenm0nk: is this a compiler warning only?
[18:32:51] *** wolfman2000 has quit IRC
[18:33:02] <bcave> been googling CDI a bit, and from what I understand, the library that provides that class needs to provide a beans.xml
[18:33:22] <bcave> (its using weld)
[18:33:26] <ojacobson> ~~ bcave jsr 299
[18:33:27] <javabot> bcave, 'JSR 299: Contexts and Dependency Injection for the JavaTM EE platform' can be found at http://www.jcp.org/en/jsr/detail?id=299
[18:33:39] <bcave> thanks ojacobson
[18:34:22] <bcave> so, in the classpath, there is a weld-se library that contains the org.slf4j.Logger class, but that error is due to the archive not having a beans.xml... ?
[18:34:34] <bcave> (i'll read the jsr now)
[18:35:03] <bcave> oh - and its Java SE
[18:35:08] <bcave> not EE
[18:36:47] *** greenm0nk has quit IRC
[18:37:17] <ojacobson> bah, Gavin King should know the difference between "typecast" (which happens to people like Patrick Stewart) and "cast" (which happens to Java references)
[18:37:19] *** topriddy has quit IRC
[18:37:28] <bcave> LOLL
[18:37:39] <dreamreal> ojacobson: don't say that, he'll scream at you
[18:37:51] <ojacobson> I'm eminently screamable-at
[18:38:02] <dreamreal> BAD GRAMMER MORON!
[18:38:04] <bcave> he's a pretty smart guy
[18:39:24] <coldpizza72i> http://pastebin.com/xKXZLCVt any idea why my ceiling function isnt working...ex) when sigma is 9 and SLICE is 8
[18:40:06] <mapreduce> Patrick Stewart was.. interesting in an adaptation of MacBeth I saw recently. I don't think he was typecast for that.
[18:40:16] <ojacobson> Math.ceil(sigma/SLICE_PER_PIE) is equal to sigma/SLICE_PER_PIE as both operands are integers
[18:40:40] <svm_invictvs> ojacobson: heh
[18:40:50] <coldpizza72i> ojacobson: do i need //
[18:40:52] <svm_invictvs> ojacobson: Dont' you mean Captain Picard?
[18:40:58] <ojacobson> the division is performed using integer rules, then the result is promoted to double and passed to Math.ceil
[18:41:07] <ojacobson> // is a comment marker
[18:41:20] *** new2net has quit IRC
[18:41:22] <ojacobson> There's no "divide two ints, giving a double" operator in Java - you need to promote one or the other operand yourself
[18:41:37] <coldpizza72i> okay thanks
[18:42:22] *** teralaser has joined ##java
[18:43:46] <mapreduce> The divide two ints, giving a double operator is named *1.0/
[18:43:49] *** larmeh_ has quit IRC
[18:44:25] *** jdolan has joined ##java
[18:44:40] <coldpizza72i> its been so long since i used java
[18:44:55] *** Sliker has joined ##java
[18:44:57] *** A1ex1 has quit IRC
[18:45:25] * mapreduce exudes jealousy.
[18:45:28] *** supercosmonaut has joined ##java
[18:45:43] *** meling has joined ##java
[18:48:20] *** petteyg has joined ##java
[18:48:47] *** cbeust has joined ##java
[18:48:48] *** rretzbach has joined ##java
[18:49:37] *** Marcofe has quit IRC
[18:50:33] *** terranova has quit IRC
[18:52:03] *** kriko has quit IRC
[18:53:20] *** rretzbach has quit IRC
[18:53:52] *** cbrock has joined ##java
[18:54:20] *** robbyoconnor has quit IRC
[18:54:20] *** bojo has quit IRC
[18:54:44] *** NoobSaibot has joined ##java
[18:55:43] *** mah01 has quit IRC
[18:57:49] *** bojo has joined ##java
[18:57:52] *** tktiddle has joined ##java
[18:58:35] <tktiddle> hi what do i use for javadoc @return value if my method returns void?
[19:00:00] <jesmon> tktiddle: you don't have a @return attribute, since it returns nothing
[19:00:12] <dreamreal> heh
[19:00:26] <tktiddle> just checking ;)
[19:01:15] <dreamreal> uh huh :)
[19:03:26] *** pgib has joined ##java
[19:07:23] <pgib> JAXB question: http://pastie.org/1652349 Trying to get my ideal output, but not sure how.
[19:07:39] *** Dux has quit IRC
[19:08:30] *** Dux has joined ##java
[19:09:16] *** Steve^ has joined ##java
[19:10:40] *** wh1t3 has joined ##java
[19:12:47] *** coldpizza72i has quit IRC
[19:14:30] *** openpercept has quit IRC
[19:15:22] *** BSWolf has quit IRC
[19:16:50] *** dlam has joined ##java
[19:17:39] <sbalmos> pgib: Try @XmlType(name="show")?
[19:19:07] *** Squarism has quit IRC
[19:19:20] *** BSWolf has joined ##java
[19:21:09] *** Varox has joined ##java
[19:21:35] *** laught has quit IRC
[19:21:58] <pgib> invalid placement of that annotation
[19:22:05] *** surial has quit IRC
[19:22:07] <pgib> (Put it on the collection)
[19:22:41] *** surial has joined ##java
[19:22:54] *** rhonabwy has joined ##java
[19:23:03] <sbalmos> put it on the class.
[19:23:28] *** kuber has joined ##java
[19:23:35] <sbalmos> don't know if that will work, since it's an inner class. May also try @XmlElement in addition to @Ref, or some variant thereof
[19:23:51] *** eakin has joined ##java
[19:24:23] *** luxurymode has quit IRC
[19:27:09] <pgib> hmm odd that I'd need it on the class since I thought that was the purpose of XmlRootElement. Hold on and I'll check
[19:27:27] <sbalmos> XmlRootElement defines the root class of a document
[19:27:45] <pgib> oh, so I should probably never use that
[19:28:38] <sbalmos> well, replace document with JAXB parse unit, or some weird nomenclature thereof.
[19:29:11] <sbalmos> When you tell JAXB to serialize a JAXB object graph into an XML string, there has to be a root class
[19:29:27] <sbalmos> and vice versa for parsing into an object graph
[19:30:19] *** flip28 has quit IRC
[19:30:24] *** defascat has joined ##java
[19:30:42] *** defascat has left ##java
[19:31:02] *** Varox has quit IRC
[19:31:17] *** BSWolf has quit IRC
[19:34:14] *** fuzzygroove has joined ##java
[19:35:08] *** bnjmn has joined ##java
[19:35:45] *** defascat has joined ##java
[19:35:55] *** vipaca has joined ##java
[19:35:57] <bnjmn> there seems to be a slew of companies selling java perf tools like appdynamics, dynatrace, etc
[19:35:59] *** defascat has left ##java
[19:35:59] *** fuzzygroove has left ##java
[19:36:25] <bnjmn> let's say i don't want to spend all that money and i'm smart enough to configure some perf monitoring tools myself...what's some good stuff out there?
[19:36:40] <sbalmos> pgib: I finally unclogged my head and looked at my own code. You want to annotate the collection with @XmlElement(name="blah")
[19:37:06] *** BSWolf has joined ##java
[19:37:12] *** l_r has joined ##java
[19:37:15] <l_r> hello
[19:37:32] <l_r> is there a way to add a jar to an existing war?
[19:38:07] <cheeser> yes
[19:38:07] <bnjmn> is perf4j any good?
[19:40:20] <tktiddle> is ther such a thing as returning 'this' in java?
[19:40:30] *** progme has quit IRC
[19:40:32] <wyvern`> sure. return this;
[19:40:35] <kuber> tktiddle: sure, why not
[19:40:47] <tktiddle> coool
[19:41:01] <l_r> cheeser, how? the problem is that a caller application references my sub applications which are deployed as jars. whenever a developer want to deploy an application which can be called from the calling menu (without modifying it in any way) it's just too boring to build the whole war with all the applications inside, it would be enough to add the jar to the lib directly (and reload the calling application to make it see the new lib)
[19:41:01] *** cbrock has quit IRC
[19:41:09] *** ab500 has quit IRC
[19:41:13] *** cbrock has joined ##java
[19:41:16] * cheeser throws a ParseException
[19:41:16] <pgib> sbalmos, I tried that before. but then I get: <shows><blah><show/><show/></blah></shows>
[19:41:29] <pgib> thanks for trying though
[19:41:48] *** eakin has quit IRC
[19:41:59] *** ab500 has joined ##java
[19:42:27] *** sebrock has quit IRC
[19:42:39] *** flakatime has joined ##java
[19:43:57] *** cbrock has quit IRC
[19:44:21] *** cbrock has joined ##java
[19:44:28] *** oso[OuT] has quit IRC
[19:44:42] *** tavish has quit IRC
[19:45:18] *** gkmngrgn has joined ##java
[19:45:37] *** intuition has joined ##java
[19:45:50] *** bindaas has left ##java
[19:46:05] <gtrak> what's supposed to go in the javax.servlet.request.X509Certificate array?
[19:46:14] <gtrak> sometimes I see one certificate, sometimes more, any rules on that?
[19:46:20] *** cool123 has quit IRC
[19:46:43] *** defascat has joined ##java
[19:47:02] *** defascat has left ##java
[19:49:10] *** cool123 has joined ##java
[19:49:24] <intuition> Currently our game's editor includes our client jar for rendering purposes -- in our client's pom we are using the sign goal of the maven-jar-plugin. We also need to sign our editor which is shading in our client. When I try to sign the shaded editor, I get: Invalid signature file digest for Manifest main attributes
[19:49:47] *** petteyg has left ##java
[19:50:28] *** Frostix has joined ##java
[19:50:43] *** cool123 has quit IRC
[19:51:26] <intuition> nvm, I think i'll just avoid shading the client into the editor
[19:52:17] *** cbrock has quit IRC
[19:52:31] *** cbrock has joined ##java
[19:54:20] *** cbrock_ has joined ##java
[19:55:59] *** cbrock__ has joined ##java
[19:56:27] *** [[thufir]] has joined ##java
[19:56:27] *** defascat has joined ##java
[19:56:31] *** surial has quit IRC
[19:56:49] *** defascat has left ##java
[19:56:59] *** cbrock has quit IRC
[19:57:04] *** cbrock__ is now known as cbrock
[19:58:41] *** Kamaran has quit IRC
[19:59:03] *** irn has joined ##java
[19:59:07] *** cbrock_ has quit IRC
[19:59:16] *** tktiddle has quit IRC
[20:00:01] *** bcave has quit IRC
[20:02:40] *** cool123 has joined ##java
[20:03:50] *** wolfman2000 has joined ##java
[20:04:37] *** defascat has joined ##java
[20:04:41] *** defascat has quit IRC
[20:05:36] *** [[thufir]] has quit IRC
[20:06:12] *** magn3ts has joined ##java
[20:07:19] *** wchun has quit IRC
[20:07:59] *** cbrock has quit IRC
[20:08:10] *** robbyoconnor has joined ##java
[20:08:30] *** Guyman has joined ##java
[20:08:44] *** cbrock has joined ##java
[20:08:49] *** intuition has quit IRC
[20:09:34] <Guyman> if i have a stock of words, and i have a string , and i want to check this string contain only words that are in this stock, using Pattern Matches, how would i do that? how would the reg look like?
[20:10:28] *** bindaas has joined ##java
[20:12:26] *** saml has joined ##java
[20:12:34] <saml> hey, what's a good thread dump analyzer? TDA?
[20:13:27] *** irn has quit IRC
[20:13:46] *** tilerendering has quit IRC
[20:13:50] *** svm_invictvs has quit IRC
[20:16:56] <wyvern`> Guyman, why not just split up the string and check in a Set if the words are there
[20:17:18] <Guyman> because i dont know what Set is, and can't use it because we didnt learn it yet
[20:18:40] *** GilbertErik has quit IRC
[20:18:44] *** jpk has quit IRC
[20:19:08] *** jpk has joined ##java
[20:19:55] *** dancinllama has joined ##java
[20:21:46] *** thinkHell has quit IRC
[20:23:25] *** Mkop has joined ##java
[20:28:17] *** bduncan has quit IRC
[20:34:44] *** tuxtor has quit IRC
[20:35:23] *** lambda_x has left ##java
[20:35:41] *** Cymage has quit IRC
[20:35:55] *** Cymage has joined ##java
[20:36:09] * sbalmos scratches head... a class trying to teach regexes before basic collections usage. Makes a hell of a lot of sense
[20:38:12] *** BeholdMyGlory has joined ##java
[20:38:25] <l_r> suppose i deploy a shared library my.lib 1.0 (in a war) containing 1.jar, 2.jar. then i deploy my.lib v 1.1 on the stack of deployed libraries containing only 1.jar . can consumers use 2.jar in any way?
[20:40:50] *** zaxeeq has joined ##java
[20:40:53] *** zaxeeq has left ##java
[20:41:20] <ojacobson> "shared library"?
[20:41:29] * ojacobson smells IDE-specific terminology.
[20:44:04] *** shiranpuri has quit IRC
[20:44:05] *** c_axis has joined ##java
[20:44:12] *** bolt has quit IRC
[20:44:28] *** Ch30ps has joined ##java
[20:44:33] *** modernbob has quit IRC
[20:45:09] *** modernbob has joined ##java
[20:45:46] *** shiranpuri has joined ##java
[20:46:10] *** bolt has joined ##java
[20:46:22] *** devkhadka has quit IRC
[20:46:54] *** LouisJB has joined ##java
[20:47:05] *** surial has joined ##java
[20:47:31] <l_r> ojacobson, yes...
[20:48:12] *** sebrock has joined ##java
[20:48:17] *** robbyoconnor has quit IRC
[20:48:24] <l_r> ojacobson, maybe it's too much oracle terminology, anyway..consider it a standard war including jars
[20:48:27] *** ormaaj has quit IRC
[20:48:43] *** robbyoconnor has joined ##java
[20:48:50] <ojacobson> Then the answer is "the libraries in your container and the libraries in WEB-INF/lib are the libraries available to your WAR"
[20:49:10] <ojacobson> (plus anything in your EAR that's either on the WAR's Class-Path or that's in application.xml as a jar module, if applicable)
[20:49:15] *** rtdos has quit IRC
[20:49:15] *** dj_pi has quit IRC
[20:49:22] *** ormaaj has joined ##java
[20:49:36] *** NoobSaibot has left ##java
[20:50:05] <l_r> ojacobson, thanks..so here is the next question.. how can i add a jar to an existing and deployed container?
[20:50:29] <ojacobson> generally you don't - you add libraries to your app and deploy an updated version of the app
[20:50:35] * cheeser nods.
[20:51:14] *** arosen1 has quit IRC
[20:54:20] <l_r> ojacobson, that's what i want to avoid.. basically i have a global menu, with hundreds (potentially) of sub applications (jars). until now i can develop and deploy calling and called application/libs separately . the only boring point is that after finishing a new application i have to take all the old jars, add the new one and build a war again. this takes time .. the ideal solution would be to just add the new jar only to the existing war "dinamically"
[20:54:27] *** riotz has joined ##java
[20:56:38] *** bduncan has joined ##java
[20:56:44] <cheeser> ~osgi
[20:56:44] <javabot> cheeser, osgi is a module system for java. It's seen in eclipse, glassfish, jboss, and a host of other environments. See also ~equinox, ~felix, and ~knopflerfish
[20:56:59] <cheeser> you can deploy osgi bundles on to glassfish
[20:57:32] *** Varox has joined ##java
[20:57:38] <l_r> cheeser, my environment is oracle weblogic (if there's not anything standard)
[20:57:58] <cheeser> so switch to oracle glassfish
[20:57:59] <cheeser> 8^)=
[20:58:08] <l_r> i can't :)
[20:58:20] <ojacobson> Why is it one giant WAR?
[20:58:39] *** lisak has joined ##java
[20:58:41] <ojacobson> The webapp lifecycle indirectly assumes that changes to a webapp involve redeploying its WAR
[20:58:41] *** nibbless has joined ##java
[20:58:50] *** McMAGIC-- has quit IRC
[20:59:00] <lisak> how come the uri fragment is null ? http://imm.io/4eDb
[20:59:07] <l_r> ojacobson, yes, i know that, but it is acceptable
[20:59:17] *** nibbless has quit IRC
[20:59:19] <cheeser> lisak: there's no fragment there.
[20:59:21] <ojacobson> there are container-specific ways to avoid that (and maybe weblogic has something, but I wouldn't count on it) but in general you might be better off with N WARs
[20:59:36] <lisak> cheeser, I thought "https" is fragment
[20:59:38] <ojacobson> lisak: no
[20:59:41] <l_r> redeploying would be acceptable, what about adding only one jar to the war?
[20:59:43] <lisak> what is ?
[20:59:44] <cheeser> that's the scheme
[20:59:47] <ojacobson> A fragment identifier is the part after the # in the URI
[20:59:50] <ojacobson> Your URI has no #
[20:59:56] <lisak> I see
[20:59:57] <cheeser> http://foo.com/bar#bob
[21:00:02] <cheeser> bob is the fragment.
[21:00:04] <lisak> ok, thank ouy
[21:00:10] <cheeser> bar is the request URI
[21:00:14] <cheeser> etc etc
[21:00:15] *** [twisti] has joined ##java
[21:00:21] <cheeser> lisak: http://www.skorks.com/2010/05/what-every-developer-should-know-about-urls/
[21:00:26] *** ronghail has quit IRC
[21:00:26] *** dwayne has quit IRC
[21:00:30] *** rtdos has joined ##java
[21:00:31] <[twisti]> is there no 'java way' to get %appdata% on windows systems ?
[21:00:38] <cheeser> System.getenv()
[21:00:47] <l_r> ojacobson, splitting libs in N new wars implies chancing the code of calling applications N times..
[21:00:51] <[twisti]> i expected it to be a user.something property
[21:00:57] <lisak> I had some a typo in my head for a moment
[21:01:02] <[twisti]> just making sure that getenv is the thing to do
[21:01:04] <l_r> since i have to statically add references to the N wars
[21:01:06] *** KarlKFI|work has quit IRC
[21:01:32] <[twisti]> meh
[21:01:34] *** ronghail has joined ##java
[21:01:38] *** jdolan has quit IRC
[21:01:38] <l_r> with one big war i dont have to do this..
[21:02:06] <[twisti]> would this be proper ? %appdata%\ApplicationName on windows, and ~/.ApplicationName on linux ?
[21:02:07] *** dwayne has joined ##java
[21:02:08] *** jdolan has joined ##java
[21:02:09] *** fisted_ is now known as fisted
[21:02:24] <cheeser> only if appdata is define
[21:02:36] <[twisti]> it is
[21:02:54] <[twisti]> since like windows 2000
[21:03:03] *** surial has quit IRC
[21:03:39] *** BeholdMyGlory has quit IRC
[21:03:47] *** Varox has quit IRC
[21:04:31] *** BeholdMyGlory has joined ##java
[21:05:01] *** PelleTut has quit IRC
[21:05:38] *** sputnick has joined ##java
[21:05:42] <sputnick> hi there
[21:06:14] *** lisak has quit IRC
[21:06:43] *** cyphorious has joined ##java
[21:06:45] *** jor has joined ##java
[21:07:34] <sputnick> is there anyone here to take a look to my servlet ? It's a homework for my school, I wrote the whole code by myself, I just need to know if my use of doPost() and doGet() is right or not. see http://pastebin.com/7ndmPdVW
[21:08:29] <sbalmos> does it work?
[21:08:46] <deebo> get is called for a GET method, post for POST
[21:08:56] <ojacobson> It's got some fairly glaring HTML injection holes
[21:08:59] <sputnick> sbalmos: sure, verry well
[21:09:02] <ojacobson> and return this.arg2 = arg2.length(); <-- is a bit of a boggle
[21:09:08] <deebo> one thing i see is that you use instance variables in a servlet
[21:09:26] <sputnick> ojacobson: yes I know, but I have specs
[21:09:26] <ojacobson> "use" is a little strong
[21:09:30] <deebo> its a huge issue, servlets are run in parallel, usually via the same instance of the servlet
[21:09:30] <ojacobson> assign to, but not read from
[21:09:38] <ojacobson> it's almost certainly a mistake
[21:09:47] <ojacobson> I wouldn't write HTML out by hand in a servlet like that
[21:09:57] <sbalmos> ojacobson: You're going too deep. I would've said it's correct if it works, since it's homework. :P
[21:10:06] <ojacobson> ~~ sbalmos why no homework
[21:10:06] <javabot> sbalmos, We understand you aren't asking us to do your homework. That's not why we don't answer. We don't because 1) You usually don't comprehend the answer and we get stuck in an endless loop of 'why', 2) You will understand, but you'll retort with "my professor doesn't want me to do it this way'. That's frustrating. 3) Homework questions are boring questions. We don't get paid. Your prof does.
[21:10:19] *** Nikelandjelo has joined ##java
[21:10:22] <sbalmos> ojacobson: And you're reminding me of this why?
[21:10:23] <ojacobson> For a simple app I'd probably delegate to a JSP to display the results; for something more complex, maybe JSP and maybe some other view tool
[21:10:26] <ojacobson> because point 3
[21:10:36] <sbalmos> ojacobson: Yet you're answering. :)
[21:10:49] <ojacobson> Sure. I'm answering in the way I would have liked to have been answered, though, not necessarily the one he wants.
[21:10:52] <deebo> we make it interesting by answering beyond the question :P
[21:11:03] * sbalmos mutters
[21:11:13] *** jonh has joined ##java
[21:11:29] <sbalmos> ojacobson: I await the obligatory "can't use that because we haven't been taught that (?:yet)?"
[21:11:43] *** ftc has joined ##java
[21:12:32] *** Tashtego has joined ##java
[21:12:38] *** gratz|home has joined ##java
[21:14:02] <ftc> so i am trying to run a java program that uses jni outside of eclipse for the first time and i am getting an undefined symbol error from one of the shared objects that my shared object that is called by java. I have tried setting all the environment variables the same as they are in eclipse but still getting the same error, does anyone know what i am missing here?
[21:14:39] <sputnick> this is the beginning (4 hours) for Java Enterprise Edition guys ;) So, I need to make changes to do POST in a doPost() and GET in a doGet() only ? I don't try (for the moment) to write something 100% reliable, but something working with no misconceptions errors...
[21:14:47] <ftc> or perhaps where to even begin to debug this
[21:15:23] *** eyesUnclouded has quit IRC
[21:16:21] *** terranova has joined ##java
[21:16:29] *** terranova has quit IRC
[21:16:36] *** dack_x has joined ##java
[21:16:46] *** adamisme has joined ##java
[21:16:46] *** kriko has joined ##java
[21:17:01] *** terranova has joined ##java
[21:17:22] *** dancinllama has quit IRC
[21:17:36] *** magn3ts has quit IRC
[21:19:17] <[twisti]> i never did much file stuff with java, but are there no os hooks to copy files ? everything google gives me is manual implementations of file copying
[21:19:27] *** mastroDani has joined ##java
[21:22:32] <ianp> [twisti]: there are no OS filesystem hooks, other than java.io.File
[21:22:43] <[twisti]> weird
[21:22:44] <ianp> as far as I know, anyway
[21:22:53] <[twisti]> that seems like a ridiculously huge oversight
[21:22:59] <ianp> [twisti]: not really... Java is a OS independent application platform
[21:23:10] <[twisti]> one that apparently cant copy files
[21:23:19] <ianp> [twisti]: FileInputStream/FileOutputStream
[21:23:23] <ianp> pretty easy
[21:23:39] <[twisti]> i dont think 'reinventing the wheel' is a proper answer to missing basic features
[21:24:00] *** svm_invictvs has joined ##java
[21:24:08] <svm_invictvs> ?
[21:24:13] <svm_invictvs> Hola
[21:24:15] *** luneff has quit IRC
[21:24:41] <svm_invictvs> Regarding java.util.UUID...
[21:26:21] <[twisti]> wow
[21:26:29] <[twisti]> and google is full with terrible file copy example
[21:26:31] <ianp> [twisti]: FileOutputStream is not a missing basic feature
[21:26:36] <ianp> [twisti]: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4073756
[21:26:39] <svm_invictvs> Looking at its source it uses a SecureRandom object to generate UUIDs and keeps a static instance of that object. Is that safe? and could that be apotential source of bottlencks if used in a large application?
[21:26:43] <ianp> [twisti]: check out the class posted in the comments, you can use that.
[21:26:58] <ianp> I'm about to use it actually, because I am hitting this bug ;)
[21:27:03] <ianp> er, "non bug"
[21:27:27] <[twisti]> youve got to be kidding me
[21:27:38] <[twisti]> youre suggesting a method that copies file in single byte steps ?
[21:27:44] <svm_invictvs> ugh
[21:27:48] *** EricInBNE has joined ##java
[21:27:53] <svm_invictvs> Taht's like trying to fill the ocean one spoonfull of sand at a time.
[21:28:01] <ianp> [twisti]: that's not how BufferedOutputStream works
[21:28:21] <ianp> though, this code is bad.
[21:28:30] <ianp> their close calls are not in finally's
[21:28:31] <ianp> etc
[21:28:32] <[twisti]> ianp: youre saying that this: while ((theByte = inBuffer.read()) > -1) { outBuffer.write(theByte); }
[21:28:42] <ianp> [twisti]: what type is outBuffer?
[21:28:42] <[twisti]> will not be a MASSIVE performance hog
[21:28:46] <[twisti]> ?
[21:28:51] <ianp> BufferedOutputStream, right?
[21:28:52] <lahwran> is there a way to use the jre 7 jar installer when you have no gui?
[21:29:02] <[twisti]> right
[21:29:05] <ianp> check the docs of that class
[21:29:10] <ianp> it does its own in memory buffering
[21:29:20] <[twisti]> does bufferedoutputstream contain magic to eat up all the method call overhead ?
[21:29:21] <lahwran> I already tried the .bin installer, it tries to use a bunch of commands not available in my hosts's overhardened chroot
[21:29:22] *** Niamkik has joined ##java
[21:29:25] <svm_invictvs> ianp: Yeah, but it'd still be a [performance hit
[21:29:39] <[twisti]> this is ridiculous
[21:29:48] *** eyesUnclouded has joined ##java
[21:29:57] <ianp> optimizing your code by avoiding method invocations in a modern hotspot vm seems ridiculous to me
[21:30:09] <ianp> if you want better performance you'd be writing custom buffering anyway
[21:30:15] <svm_invictvs> ianp: If you look at at with read/write do in the impl it's a bunch of overflow checking reallocations etc etc. writing 0one byte is very costly.
[21:30:41] <[twisti]> we are talking about something that will potentially loop BILLIONs of times
[21:30:54] <svm_invictvs> I'm inclined to agree with [twisti].
[21:30:58] <[twisti]> this is hardly premature optimization
[21:31:12] <[twisti]> which is why im so speechless its not a feature of, like, java 1.0
[21:31:18] *** McMAGIC-- has joined ##java
[21:31:20] <ianp> [twisti]: how fast is a method invocation in java after hotspot has warmed up?
[21:31:35] <[twisti]> theres so much you can do wrong without knowing stuff about this kind of thing
[21:31:58] <[twisti]> thats why you dont make everyone reinvent things like copy or lists or stuff like that
[21:32:21] <svm_invictvs> ianp: Actually each invocation of BufferedOutputStream.write() obtains a lock as well.
[21:32:25] <ianp> most competent programmers can get done what they need with the existing APIs in fairly short time
[21:32:46] <ianp> svm_invictvs: all depends on if this is the bottleneck of an application
[21:32:51] <[twisti]> ianp: and they produce stuff like that, that makes copying terribly slow
[21:33:28] <ianp> for an app that writes 1 1k file it is a waste of time to even think about that stuff
[21:33:41] <[twisti]> right, and yet they still have to manually implement it
[21:33:43] <svm_invictvs> True with small files.
[21:34:02] <svm_invictvs> But havinga buffer to copy a file isnt' a terribly unreasonable thing.
[21:34:08] <[twisti]> and even there they have to worry about things they probably know nothing about, like network buffer underflows
[21:34:13] *** gilead has joined ##java
[21:34:17] <svm_invictvs> Anyhow...
[21:34:23] <deebo> svm_invictvs: spring integration uses UUID generation to generate message id's, and it is a bottleneck, but its still like bazillion generations per second
[21:34:44] <deebo> test the speed if you really need a uuid
[21:34:50] <ianp> here's an nio solution the guy claims is 1/3 faster http://www.javalobby.org/java/forums/t17036.html
[21:35:05] <svm_invictvs> deebo: Yeah, well there's only like 3 places in the code it's used. It's used for stamping exceptions :-/
[21:35:36] <svm_invictvs> deebo: And presumably it's using /dev/urandom, but looking at the code it's just using the builtin prng implementation.
[21:35:42] <[twisti]> id use System.exec but god only knows if "cmd /Ccopy" in windows is smart or not, and odds are, its not
[21:36:20] <svm_invictvs> deebo: This is from actual performance data on a site. Thread is getting blocked in the c'tor to SecureRandom.
[21:36:29] <[twisti]> too bad i cant use java 7, it seems like some other people agreed with my assessment that this is a needed feature
[21:38:29] <svm_invictvs> Isn't there a filesystem library that can help you with things like that?
[21:39:06] <ianp> [twisti]: what's the problem with FileOutputStream?
[21:39:20] <ianp> the fact that you are forced to write a dozen-line routine?
[21:39:22] *** dj_pi has joined ##java
[21:39:35] <ianp> are you expecting large copies?
[21:39:39] <[twisti]> in short, yes, because you need knowledge to make that routine suck that neither i nor you have
[21:39:40] <[twisti]> yes
[21:39:44] *** barq has joined ##java
[21:39:49] <ianp> ok
[21:39:58] <ianp> try the NIO based method i mentioned above and benchmark it
[21:40:04] <ianp> maybe it will be good enough?
[21:40:20] <ianp> your disk speed may be the delimiting factor, not your code
[21:40:26] <[twisti]> i can already see at least one bug in that
[21:40:29] <cheeser> s/de//
[21:40:30] <cheeser> 8^)=
[21:40:33] <[twisti]> no, two
[21:40:36] <dmlloyd> also might be interesting to compare transferFrom and transferTo
[21:40:38] <ianp> cheeser: what's the differnece?
[21:40:40] <[twisti]> yeah, more terrible code
[21:40:52] <dmlloyd> they don't really close things the right way
[21:41:11] <dmlloyd> and you also don't really need to do createNewFile, that's redundant
[21:41:11] <ianp> the second example (NIO one) looks to close things correctly
[21:41:12] *** Migi32 has joined ##java
[21:41:12] *** realtime_ has quit IRC
[21:41:14] <dmlloyd> and it's also not needed
[21:41:26] <cheeser> ianp: delimit is to separate out items to separate groups (comma delimited file) to limit is to place constraints on something
[21:41:28] <[twisti]> FIS.read can return 0 without being done
[21:41:31] *** solvedsnake has joined ##java
[21:41:33] *** solvedsnake has left ##java
[21:41:39] <[twisti]> it should be >= 0 and then test for 0 before writing it
[21:41:43] <ianp> cheeser: hmm, im pretty sure i've heard 'delimiting factor' before...
[21:41:45] *** john_doe has joined ##java
[21:41:52] <ianp> but 'limiting factor' does seem to sound more correct, logically
[21:41:53] <[twisti]> also im pretty sure that code is missing a flush
[21:42:02] <ianp> doesnt close imply flush
[21:42:02] <dmlloyd> no
[21:42:06] <cheeser> ianp: i have no doubt about that. it's wrong irregardless. P^)=
[21:42:06] <dmlloyd> close implies flush
[21:42:14] <[twisti]> alright then, just one bug
[21:42:24] <ianp> what's the bug..
[21:42:36] <ianp> I'm about to use the code, I am genuinely interested :)
[21:42:38] <john_doe> can netbeans convert its gui code into raw java code?
[21:42:43] <[twisti]> [2011/03/09 21:39:42] <[twisti]> FIS.read can return 0 without being done
[21:42:43] <[twisti]> [2011/03/09 21:39:52] <[twisti]> it should be >= 0 and then test for 0 before writing it
[21:42:56] *** Fisiu has quit IRC
[21:43:04] <ianp> [twisti]: ah, I'm looking at the nio code, its FileChannel.transferFrom
[21:43:13] <ianp> that code i mentioned on the java bug issue is kinda bad
[21:43:20] <ianp> it's just an example though
[21:43:53] <ianp> (still, not at all an excuse for teaching people improper resource management)
[21:44:29] *** Cymage has quit IRC
[21:45:44] <[twisti]> ianp: it seems theres an apache commons thing for what i need so ill probably use that
[21:46:34] *** Fisiu has joined ##java
[21:47:38] <ianp> [twisti]: Yeah, i usually avoid adding those... but im sure they work fine
[21:47:52] <ianp> they usually wind up in my transitive deps anyway
[21:48:30] *** cool123 has quit IRC
[21:49:02] *** cool123 has joined ##java
[21:49:04] *** jonh has quit IRC
[21:50:17] *** sebrock has quit IRC
[21:50:35] *** Matic`Makovec has quit IRC
[21:51:32] *** wolfman2000 has quit IRC
[21:51:33] *** Cymage has joined ##java
[21:51:45] *** BSWolf has quit IRC
[21:54:06] *** gpeterso has joined ##java
[21:54:12] *** qiip has joined ##java
[21:55:10] <gpeterso> No matter what font I specify with g2d.setFont() they all look exactly the same.
[21:55:33] *** sphenxes has quit IRC
[21:56:05] *** BeholdMyGlory has quit IRC
[21:56:22] *** NoobSaibot has joined ##java
[21:57:11] <Guyman> if i have a stock of words, and i have a string , and i want to check this string contain only words that are in this stock, using Pattern Matches, how would i do that? how would the reg look like?
[21:58:17] <gpeterso> Guyman - regex is slow. Probably faster to do for (String word : myWords) { if (testStr.contains(word)) { dosomething... } }
[21:58:45] <Guyman> i need the opposite, i need to know if there is a word which is not in my stock
[21:58:52] *** bduncan has quit IRC
[21:59:09] *** cbrock_ has joined ##java
[21:59:12] *** BeholdMyGlory has joined ##java
[21:59:17] *** sphenxes has joined ##java
[21:59:19] <dmlloyd> you need a Set<String> of your words, and a tokenizer to iterate your test string
[21:59:20] *** dack_x has left ##java
[21:59:34] <Guyman> we didnt learn set yet , so i can't use it
[21:59:41] <ojacobson> ~why no homework
[21:59:41] <javabot> We understand you aren't asking us to do your homework. That's not why we don't answer. We don't because 1) You usually don't comprehend the answer and we get stuck in an endless loop of 'why', 2) You will understand, but you'll retort with "my professor doesn't want me to do it this way'. That's frustrating. 3) Homework questions are boring questions. We don't get paid. Your prof does.
[22:00:14] <gpeterso> Guyman: there may be a regex channel. Basically, regex has an or. thisWord\|thatWord\|anotherWord
[22:00:30] <Guyman> its just 1% of my homework, a part that im stuck with
[22:00:40] <gpeterso> Guyman: Learn Regex. Few things have helped me in my programming life as much as regex.
[22:00:40] *** cbrock has quit IRC
[22:00:41] *** cbrock_ is now known as cbrock
[22:00:45]
[22:00:50] <Guyman> i am trying to use regext
[22:00:52] *** bradford- has joined ##java
[22:01:12] <Guyman> but the "or" will return true if one those words are there..
[22:01:27] <gpeterso> Guyman: exactly.
[22:01:46] <Guyman> i need to know if a DIFFERENT word is there.
[22:01:59] <Guyman> and if i do ^word|^anotherWord it will always return true
[22:02:20] <Guyman> well, almost alway
[22:02:21] <Guyman> well, almost always
[22:03:24] <gpeterso> Guyman: Can you match stuff then see what's left?
[22:03:39] *** bradford has quit IRC
[22:03:42] <gpeterso> Guyman: what are the words separated by?
[22:03:54] <Guyman> spaces
[22:03:56] <Guyman> or lines
[22:04:02] *** Cymage has quit IRC
[22:04:18] *** Behold has joined ##java
[22:04:22] <bnjmn> don't use regex bro
[22:04:31] <Guyman> then how?
[22:04:49] <cocoloa> how does emacs/hyperspec.el call my default browser to open a specific url?
[22:04:50] <gpeterso> Guyman: If you can't use string tokenizer or split, then this is a regex question, you should ask there.
[22:04:57] <bnjmn> you have a whitelist of words. put those in a dict or a set. then split up the string you got, into words and check each one if it's in the set.
[22:05:00] <kuber> Guyman: do you know what '^' actually means in a regex?
[22:05:14] <Guyman> kuber, means "not" in the text
[22:05:23] <NoobSaibot> If anyone has spare time and would like to take a stab at this error: http://pastebin.com/QWBEAGcs I'm not a Dev..just a Net Eng trying to act as a SysAdmin today, and I can't get connected to my SAN controller. This is the error I keep getting.
[22:05:31] <jesmon> cocoloa: try #emacs
[22:05:34] <Guyman> bnjmn cant use Set
[22:05:40] <bnjmn> Guyman why the heck not
[22:05:44] <bnjmn> use a dict then
[22:05:48] *** Johannes13 has quit IRC
[22:05:49] <cocoloa> jesmon: of course!
[22:05:55] <Guyman> neither dict, didnt learn it yet
[22:06:00] <jesmon> Guyman: use a damn array!
[22:06:08] <bnjmn> ok...so...you also haven't learned regex either
[22:06:13] <kuber> Guyman: it depends on the context
[22:06:17] <gpeterso> Anyone know why no matter what font I specify with Graphics2d.setFont() that they all look exactly the same? I cycle through GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames() to get valid names.
[22:06:19] <Guyman> we did learn regex
[22:06:21] <bnjmn> because ^ means not only inside of a []
[22:06:39] <bnjmn> outside of [], it means match the beginning of a string
[22:06:41] <Guyman> and ^word means if its at the begining of the sentence, right?
[22:06:43] <Guyman> yes
[22:06:51] <bnjmn> that's right bro
[22:06:57] <pgib> hello. Still stuck on this one from a few hours ago, just revisited. http://pastie.org/1652349 let me know if you can help, thanks!
[22:07:00] <bnjmn> but not sentence. string.
[22:07:07] <Guyman> right sorry
[22:07:12] <Guyman> jesmon use array how?
[22:07:18] <bnjmn> can you use split?
[22:07:19] <gpeterso> Guyman: ^word means that the word is the beginning of a line or a string. Netbeans has this wrong.
[22:07:24] <Guyman> bnjmn yes
[22:07:28] <bnjmn> super
[22:07:39] *** BeholdMyGlory has quit IRC
[22:07:48] <Guyman> gpeterso i know
[22:07:55] <bnjmn> just split up the sentence you have, then for each word in the sentence, just loop over the whole list of words that are ok
[22:08:03] <bnjmn> it's slow, but it works
[22:08:16] <bnjmn> and really, if the list is short, it's not that slow
[22:08:39] <Guyman> so it will be a long if with || inside
[22:08:46] <Guyman> "or" for each word
[22:09:14] <Guyman> if !a[i].equals(word) || !a[i].equals(word2) || ..
[22:09:30] *** BSWolf has joined ##java
[22:09:31] <Guyman> doesnt make sense
[22:10:30] <jesmon> pgib: remove @XmlRootElement from Item (as it's not a root element) and apply @XmlElement(name = "show") to Collection<Item> items
[22:10:34] *** cholland has joined ##java
[22:11:01] *** mazzen has quit IRC
[22:11:06] <bnjmn> Guyman .. no, no ||.. just for loop
[22:11:14] <bnjmn> a for loop inside a for loop
[22:11:19] <bnjmn> you figure out the rest sorry
[22:11:19] *** Johannes13 has joined ##java
[22:11:26] <Guyman> boolean flag
[22:11:33] <Guyman> alright
[22:11:44] <Guyman> thanks
[22:12:01] <cholland> anyone know of a quick way to get the a count of the number of digits after the decimal point in a double? ...like n = nDigits(3.13456) should return n = 5
[22:12:04] <Guyman> wait what about using enums and catch exception?
[22:12:19] <ojacobson> cholland: indeterminate
[22:12:26] <pgib> ah ok. I thought I did @XE on the Collection and it said it didn't know how to serialize it. Will try again. Thanks Jesmon. I guess I don't quite understand the whole RootElement thing. So I'd need two different classes (ShowsRoot and Shows) if I want a show list as either root or a child?
[22:12:28] *** john_doe has left ##java
[22:12:39] <ojacobson> cholland: doubles don't use decimal places. You can approximate it by taking the ceiling of log10(d) though.
[22:13:01] <pgib> oh, maybe I did @XmlAttribute and that fails for obvious reasons
[22:13:33] <cholland> ok thx ojacobson
[22:14:35] *** cool123 has quit IRC
[22:15:04] *** cool123 has joined ##java
[22:15:44] *** c_axis has quit IRC
[22:15:56] *** BSWolf has quit IRC
[22:15:57] *** eyesUnclouded has quit IRC
[22:17:17] <jesmon> pgib: I'm not sure if you need to classes, actually (I just made the snap judgement that it wasn't a root based on the code you pasted ;). If it can't serialize the child object, it means the child doesn't have the correct attributes to be serialized in that context, which may be the root element tag in this case
[22:17:24] <jesmon> *two classes
[22:17:55] *** aksn has joined ##java
[22:20:06] *** Mkop has quit IRC
[22:22:32] *** Zta has joined ##java
[22:22:49] *** riotz has quit IRC
[22:23:10] <pgib> jesmon, hmm. I Wonder if I should just make a general @XmlRootElement Response and just always encapsulate my response in that so I do not have to worry about accidentally reusing something marked as Root. Regardless: Your fix works! thanks
[22:24:16] <jesmon> pgib: yeah, not sure what you should do there.
[22:24:37] * jesmon is using protobuf for pretty much all serialization these days
[22:26:05] <Zta> Hi, I'm in need of help to solve this EJB/JPA mystery. I have two create methods that should behave similar but don't! http://pastebin.com/sQhNM5EA The factory methods are on line 142 and 159. The test is on line 68 and 70.
[22:26:15] *** NoobSaibot has left ##java
[22:26:23] <pgib> yeah. I'm just using JAXB since it makes JAX-RS that much more convenient. I'll just experiment with the Root stuff over time
[22:26:50] <Zta> (I also have a problem on line 61+63 but I think this is a different issue.)
[22:27:12] <gpeterso> When I render text in Java on my Ubuntu desktop, I get Latin, Greek, Kanji, basically all Unicode BMP characters. When I put the same Java code on my RedHat server, I get empty boxes where all the non-Latin characters should appear. Any ideas?
[22:27:39] <ojacobson> gpeterso: missing typefaces
[22:28:09] <gpeterso> ojacobson: more please. Missing typefaces where?
[22:29:26] *** White_Cat has quit IRC
[22:29:27] *** BSWolf has joined ##java
[22:29:28] <gpeterso> ojacobson: Do you mean in font.properties in jre/lib directory?
[22:29:32] *** supercosmonaut has quit IRC
[22:30:19] <pgib> there isn't any way to statically get a Method is there? like Foo.class? No way to do Foo.method.Method (obviously not that exact syntax)? Or is finding a Method always prone to instrospection failing (badly formed method-name string..)
[22:30:49] <ojacobson> Nope.
[22:31:27] <pgib> I figured as much.
[22:31:40] <ojacobson> (You'd still have to handle all of the cases introspection can fail on, even if there were -- nothing stops someone from recompiling a class without the method you took a reference to)
[22:32:00] <ojacobson> (And while the JVM can verify that all the classes your class statically references are available, it only validates methods that are actually called, IIRC)
[22:33:13] *** choongii has joined ##java
[22:34:18] *** White_Cat has joined ##java
[22:34:28] *** cool123 has quit IRC
[22:34:35] <pgib> ah, invoking is a bit less direct than I imagined. (I'm still stuck in the C calling convention mentality half the time). I suppose that is why they promote the term "Invoke"
[22:34:47] *** eyesUnclouded has joined ##java
[22:34:59] <ojacobson> Yeah, it's more complex than a push+jmp
[22:35:02] *** cool123 has joined ##java
[22:35:17] <ojacobson> There's a method binary name baked into your bytecode which is looked up at runtime
[22:35:34] <ojacobson> (the binary name contains most of what's in the signature, plus the return type)
[22:38:01] *** Behold has quit IRC
[22:39:10] *** jor has quit IRC
[22:39:51] *** gelignite has quit IRC
[22:40:44] <pgib> now, time to figure out how to force JAX-RS (Jersey) to force a different root. It is adding context-path to all generated URLs, but this is invalid since our web proxy rewrites urls (api.foo.com/blah => localhost:8080/_api/blah)
[22:42:04] <ojacobson> pgib: that's a lot easier to solve if the context root in the container matches the root url in the real world
[22:42:20] <ojacobson> can you deploy your app at / in the container (possibly on an alternate vhost/port, if it would conflict with your main app)?
[22:43:32] *** starcoder has quit IRC
[22:43:56] <pgib> hmm, well we have 4 WARs each on their own context-path - and managing vhosts in apache. Running Glassfish BTW
[22:44:13] *** teralaser has quit IRC
[22:44:19] <pgib> we had terrible luck with vhosts back in GF2, so we've been running this configuration for a while. I am not fixated on the idea of having a proxy at all though
[22:44:46] <pgib> I realize we MUST have separate IP or port for each vhost though, or else SSL won't work
[22:45:17] <pgib> (since SSL is at the IP layer and unaware of domains)
[22:46:02] *** mastroDani has quit IRC
[22:46:20] *** cbrock has quit IRC
[22:46:22] <pgib> but, this is definitely something I wouldn't mind completely changing for simplicity
[22:47:07] <dmlloyd> past experience has taught me that proxying apache to a servlet container is foolish
[22:47:46] *** BSWolf has quit IRC
[22:47:53] *** Matuku has quit IRC
[22:47:56] <pgib> agreed. We DO have a load balancer now. Although we don't directly manage it (Dedicated hardware run at the data center)
[22:47:56] *** BSWolf2 has joined ##java
[22:48:15] *** tilerendering has joined ##java
[22:48:43] *** BSWolf2 is now known as BSWolf
[22:49:11] *** Matuku has joined ##java
[22:49:17] *** kur1j has quit IRC
[22:49:47] *** ninja_sense has joined ##java
[22:50:01] <pgib> so, I wonder what would be the ideal way to host 4 different WARs on 4 different domains, and support SSL on 3 of those domains with one app container.
[22:50:02] <Zta> Anyone care to take a look at my problem?
[22:50:13] *** platzhirsch has joined ##java
[22:50:24] *** platzhirsch has left ##java
[22:50:33] *** Matuku has quit IRC
[22:50:48] *** magn3ts has joined ##java
[22:50:52] *** starcoder has joined ##java
[22:51:03] *** Matuku has joined ##java
[22:52:40] *** shiranpuri has quit IRC
[22:56:00] *** VJTachyon has quit IRC
[22:56:12] *** tieTYT has quit IRC
[22:56:25] *** VJTachyon has joined ##java
[22:56:28] <pgib> ojacobson, so. Did you have some solution for hosting multiple webapps on the same context-path '/'?
[22:57:01] <ojacobson> multiple vhosts
[22:57:12] <ojacobson> or multiple ports (same thing, really)
[22:57:29] *** BSWolf has quit IRC
[22:57:48] *** Cymage has joined ##java
[22:58:11] <pgib> yeah. Going to need multiple ports for the load balancer to do "SSL on Multiple IPs => Single IP"
[22:58:20] *** ronghail has quit IRC
[22:58:43] <pgib> ok. time to look into glassfish guide again. Thanks. Need to fix this JAX-RS issue first
[22:59:17] *** ronghail has joined ##java
[22:59:57] <ojacobson> Design schema => generate mappings => use generated mappings
[22:59:58] <ojacobson> that's how I do it
[23:00:01] <gpeterso> Zta: Can you shorten your example until the only thing left is just the problem? 327 lines for the first example is kind of a lot to wade through.
[23:00:05] <ojacobson> code-first XML = failboats
[23:00:09] <sbalmos> pgib: Note that here at $employer, we actually run separate cluster nodes for each app, so we can also individually tune, fool with GC, heap, etc.
[23:00:23] *** cbrock has joined ##java
[23:00:43] *** vengeancex32 has joined ##java
[23:01:02] *** neuro_sys has quit IRC
[23:01:15] *** flippo has quit IRC
[23:01:27] <pgib> ojacobson, well my issue right now is independent of JAXB (but looking at how much more I have to implement, I agree with your assertion)
[23:02:41] *** epalm has quit IRC
[23:02:51] *** BSWolf has joined ##java
[23:03:01] *** shiranpuri has joined ##java
[23:03:25] <pgib> my main issue right now, is getting JAX-RS to generate the right URL to some other resource. From a resource on the path "/channels/0" I try to use UriBuilder to make a URL to: "/shows/1", but it generates: "/channels/0/shows/1"
[23:03:42] <ojacobson> baseUriBuilder
[23:03:54] <ojacobson> (UriInfo.baseUriBuilder)
[23:03:57] *** phantomcircuit has quit IRC
[23:04:01] <pgib> That was was wrong in a different way
[23:04:04] <pgib> let's see
[23:04:22] <ojacobson> I'm doing it by path, not by resource class + method, though
[23:04:36] <ojacobson> (due to resources being objects living in spring, not really classes)
[23:04:42] <pgib> IIRC, it generated "/1" instead of "/shows/1"
[23:04:59] *** djabbour has quit IRC
[23:05:07] <Zta> gpeterso: I understand. But I have included both the service bean, the entity bean, and the unit test. I think they're all necessary to understand what's going on. But could you start by focusing only at the test in line 57-70, please?
[23:05:16] *** fr0gprince_ has quit IRC
[23:05:27] *** fr0gprince_ has joined ##java
[23:06:05] *** freeone3000 has joined ##java
[23:06:29] *** sbalmos has quit IRC
[23:06:33] *** rjohnson19 has joined ##java
[23:06:48] <Zta> gpeterso: I create to entites: child1 and child2 in two different ways, but effectively they should behave equally. But as line 68+70 shows, the child1 gets its parent while child2 doesn't. I think that's strange.
[23:07:15] <Zta> gpeterso: the two create methods are almost identical as the first is just a delegate to the other.
[23:08:06] <pgib> ojacobson, FWIW: http://pastie.org/1653274
[23:08:10] *** Pozejdon has quit IRC
[23:09:25] *** hiredman has quit IRC
[23:09:43] *** ExtraSpice has quit IRC
[23:11:23] *** Rissien has quit IRC
[23:13:40] *** cythrawll has quit IRC
[23:13:56] *** srcerer is now known as Guest91345
[23:14:03] *** Guest91345 has quit IRC
[23:15:05] *** Peej has quit IRC
[23:16:06] *** Behold has joined ##java
[23:16:17] *** DerHorst has joined ##java
[23:18:10] *** coldpizza72i has joined ##java
[23:18:16] *** Frostix has quit IRC
[23:18:16] *** dlam has quit IRC
[23:18:22] <coldpizza72i> is there any way to return a Type Error
[23:18:34] <cheeser> say what now?
[23:19:10] *** shaunren has joined ##java
[23:19:17] <coldpizza72i> like an error function...ex) error("must use an integer!!!")
[23:19:33] *** rgr has joined ##java
[23:19:35] <dmlloyd> ~~ coldpizza72i exceptions
[23:19:35] <javabot> coldpizza72i, exceptions is http://java.sun.com/docs/books/tutorial/essential/exceptions/ (also see http://billharlan.com/pub/papers/Catching_Exceptions_in_Java.html )
[23:19:41] *** Peej has joined ##java
[23:21:21] <Zta> gpeterso: stripped down version =) http://pastebin.com/d55JVDXk
[23:23:24] *** [twisti] has quit IRC
[23:25:09] *** cool123 has quit IRC
[23:25:25] *** jbender has joined ##java
[23:26:09] <jbender> can someone explaine to me how to view my log after LogFactory.getLog(whatever.class) and calls to log.info or log.debug
[23:26:13] *** frangiz has quit IRC
[23:26:26] *** bnjmn has left ##java
[23:26:58] *** oso96_2000 has joined ##java
[23:27:03] *** Auv5 has joined ##java
[23:27:11] *** daark has joined ##java
[23:29:26] *** dlam has joined ##java
[23:30:04] <gener1c> i am having problems with string comperison with Scanner....http://pastie.org/1653364
[23:30:55] <EuroTrash> ... use .equals, not !=
[23:31:04] <l_r> is there a way to dinamically reference a jar from a consumer application?
[23:31:06] <pgib> ugh.. I think I'm just going to build URLs myself. This JAX-RS UriBuilder stuff just won't give me the result I want
[23:31:08] *** saml has quit IRC
[23:31:38] <freeone3000> l_r: You want a plugin framework, or possigly OSGi.
[23:31:40] <jesmon> pgib: the good thing is that restful conventions makes it trivial to do
[23:32:06] <gpeterso> Zta: Sorry, I looked, but I don't know enough about EJB/JPA to answer your question. I use Hibernate. If you cut it down to 50 lines, someone who knows more than me might be willing to study it enough to answer your question.
[23:32:23] <l_r> freeone3000, yes
[23:32:44] <freeone3000> ~plugin
[23:32:44] <javabot> to build a plugin based system you should consider either JPF (~jpf) or, for more complex uses, see OSGi.
[23:32:54] <freeone3000> Oh. There's only one, apparently.
[23:32:59] <l_r> freeone3000, specifically, i want to divide a calling application from the called sub-application (in a jar). i dont want to modify the caller. the called application is get, say, through a parameter on the url
[23:33:26] <l_r> jpf
[23:33:28] <l_r> ok..
[23:33:30] <Zta> gpeterso: I could cut it down, but I suspect that soon that person would ask me for more source for the beans
[23:33:31] <l_r> let me see
[23:34:03] *** pipeep has joined ##java
[23:34:36] *** X-Scale has quit IRC
[23:35:38] *** srcerer has joined ##java
[23:35:57] *** echosystm has joined ##java
[23:36:44] *** Niamkik has quit IRC
[23:37:48] <l_r> freeone3000, is jpf reliable for a production system?
[23:37:59] <Zta> gpeterso: but thanks anyway =)
[23:38:13] <freeone3000> l_r: As reliable as any other jar, I suppose. OSGi's more widely used for production.
[23:39:59] *** mister_m has joined ##java
[23:40:27] <mister_m> can I call the contrustor X(), from the constructor X(int) ?
[23:41:32] <freeone3000> mister_m: Yes. "this();"
[23:41:37] <mister_m> freeone3000: thanks.
[23:43:25] *** Ch30ps has quit IRC
[23:44:22] <pgib> jesmon, I don't understand that last comment
[23:44:50] <l_r> freeone3000, from what i am reading, osgi cannot be integrated well with weblogic. is this right in your opinion?
[23:45:05] <freeone3000> Never used weblogic.
[23:45:34] <freeone3000> Considering that OSGi can be run in any container, and even in an SE application, I doubt it.
[23:46:01] <jesmon> pgib: just saying that REST imposes a pretty simple and neat url schema, which makes generating urls for "resourses" really easy
[23:46:23] *** choongii has quit IRC
[23:47:10] <pgib> ah. I just need to build that scaffolding myself apparently since JAX-RS just ignores my wishes ;). But I agree, a URL is a handy abstraction point
[23:48:02] *** ftc has quit IRC
[23:48:09] *** matsebc has quit IRC
[23:50:13] <l_r> jpf is rather old
[23:50:38] <l_r> i am stuck. basically a standard plugin framework does not exist yet
[23:50:52] *** Polah has joined ##java
[23:51:15] *** TR2N has joined ##java
[23:51:18] *** BSWolf has quit IRC
[23:51:39] *** wcfs96 has joined ##java
[23:51:50] *** wcfs96 has left ##java
[23:52:43] *** KarlKFI|work has joined ##java
[23:53:14] *** mister_m has quit IRC
[23:53:29] <Polah> Can anyone explain to me exactly what Xmx and Xms do? I was told that Xms reserves memory, or something to that effect even if it doesn't need it, and Xmx sets a limit on the amount of memory that can be used. Is this correct?
[23:54:15] <freeone3000> Polah: Yes. The "memory" in question is Java heap space, where objects are allocated.
[23:54:31] *** Xanius has joined ##java
[23:54:38] *** Xanius has left ##java
[23:54:52] <_W_> Polah, there are more variables than those that affect actual memory use though
[23:55:53] *** robbyoconnor has quit IRC
[23:57:33] *** yxz97 has quit IRC
[23:57:39] <Polah> I see, the only two I need to use though is Xms and Xmx, but apparently for the applicaton I should be using Xmx and Xincgc, I just didn't quite understand the way someone had explained it before.
[23:59:09] *** Steve^ has quit IRC
[23:59:49] *** mitch0 has quit IRC
top

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