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


NOTICE: This channel is no longer actively logged.

Toggle Join/Part | bottom
[00:00:25] *** jcp has quit IRC
[00:00:38] *** x77686d has joined ##java
[00:04:03] *** riotz has joined ##java
[00:06:20] *** timte has quit IRC
[00:07:59] *** scott_w has quit IRC
[00:08:52] *** ScottG489 has joined ##java
[00:10:22] *** kapipi has quit IRC
[00:11:23] *** antwaungomez has joined ##java
[00:11:32] *** basix has joined ##java
[00:12:20] *** UT2K3 has quit IRC
[00:12:28] <basix> which package will allow me to parse http packet headers, given a string?
[00:14:56] <ernimril> basix_: why do you have to?
[00:15:09] <ernimril> basix_: URL/URLConnection typically do it for you...
[00:15:25] *** durka42 has quit IRC
[00:15:32] *** _graham_ has quit IRC
[00:15:35] <ernimril> basix_: there is apache httpcore/httpclient if you want more control, but you typically do not need it
[00:15:38] *** durka42 has joined ##java
[00:15:56] *** x77686d has quit IRC
[00:16:00] <basix> ernimril, i'm using jpcap to capture packets off the wire / tcpdump file. I want a routine to simply parse and validate the http header.
[00:16:42] <ernimril> basix_: I have also written a http proxy, you can use its code if you want
[00:16:43] <ernimril> ~rabbit
[00:16:44] <javabot> ernimril, rabbit is a web proxy used to speed up slow connections. For more information see: http://www.khelekore.org/rabbit/
[00:17:21] *** Cypher has joined ##java
[00:17:38] <basix> ernimril, okay...thanks. i'll check it out.
[00:17:38] *** monkeycid has quit IRC
[00:17:48] <ernimril> basix: I would guess that my proxy is the one that is most strict (if you tell it to be http/1.1 strict) but I have not used httpcore much so I can not really say
[00:18:23] <ernimril> basix: and for real world usage you really can not be strict, too many broken clients and servers
[00:19:07] <basix> ernimril, i get it. its just some experimental stuff i'm doing. any pointers? i see you have a HttpHeader class. What all do I need to use?
[00:19:42] *** linxuz3r has joined ##java
[00:25:02] *** kapipi has joined ##java
[00:26:07] *** ScottG489 has quit IRC
[00:26:26] *** monkeycid has joined ##java
[00:27:03] *** kapipi has quit IRC
[00:28:07] *** Inhuman has quit IRC
[00:30:44] *** svendbent has joined ##java
[00:30:53] <svendbent> What java profiler do you recommend?
[00:31:28] *** jex_ has joined ##java
[00:31:38] *** jex_ has quit IRC
[00:33:26] *** ankylose has quit IRC
[00:33:47] *** ankylose has joined ##java
[00:35:09] <ernimril> basix: well, HttpHeaderReader.java is probably what you want
[00:35:24] <ernimril> ~~svendbent profiler
[00:35:24] <javabot> svendbent, a profiler is a tool to find performance bottlenecks. VisualVM is included in JDK nowadays and is great for a free profiler; jprofiler and jprobe cost money (jprofiler has a free eval period). Some more are listed here: http://javafaq.mine.nu/lookup?169
[00:36:09] *** trustin has joined ##java
[00:37:52] *** igordcard has joined ##java
[00:39:02] *** eduardopl has quit IRC
[00:40:27] <svendbent> ernimril:you use VisualVM?
[00:40:40] <ernimril> svendbent: no, I write my own profiler
[00:41:36] <svendbent> ernimril: why=?
[00:42:20] <ernimril> svendbent: when I started there were no good one out there and the alternatives at that time did cost lots of money. so I thought, how hard can it be..
[00:43:04] <svendbent> so yours is just way better than any existing ones?
[00:43:12] <ernimril> svendbent: no...
[00:43:41] <ernimril> svendbent: mine answers my questions and it does that better than the alternatives. You probably do not have the exact same questions
[00:44:01] <ernimril> svendbent: feel free to try the alternatives and see which one works for you
[00:44:28] <ernimril> svendbent: mine are tijmp (java/6 and later) or jmp (java 1.3 up to java/5)
[00:44:37] <ernimril> ~tijmp
[00:44:38] <javabot> ernimril, tijmp is a small, fast and easy to use memory profiler for java/6 and later. See http://www.khelekore.org/jmp/tijmp/
[00:44:42] *** ahughes has quit IRC
[00:44:57] *** ahughes has joined ##java
[00:45:01] <ernimril> svendbent: since visualvm is part of the jdk it is probably easier to start with
[00:45:21] <ernimril> svendbent: and it seems like some people like jprofiler
[00:45:32] <tazle> svendbent: if you have the money, jprobe is awesome
[00:46:07] *** latebind has quit IRC
[00:46:48] <basix> ernimril, thanks
[00:47:36] <ernimril> basix: please note that I wrote my http handling to be part of my proxy, it may be that you have a hard time using them...
[00:48:08] <basix> ernimril, yeah, i'm looking at it right now. may actually write my own parser. not sure though. thanks :)
[00:48:10] <ernimril> basix: they are not written to be a http framework like httpclient/httpcore
[00:48:39] <ernimril> basix: I also wrote them to work in a non blocking fashion
[00:50:11] <basix> ernimril, hmm...okay. i have a couple of questions regarding reassembling tcp packets. Are you the right person?
[00:50:22] <basix> ernimril, to ask i.e.
[00:50:28] <ernimril> basix: probably not, but feel free to ask
[00:50:51] *** Daniel_H has quit IRC
[00:51:22] *** ankylose has quit IRC
[00:51:27] *** cic has quit IRC
[00:51:39] <basix> ernimril, well i'm trying to reassemble a tcp stream which contains http transmissions. i would like to extract the transmitted files. I read a lot on TCP and it seems the sequence number of the next packet = current packet's sequence number + size of the data. Is this correct?
[00:52:29] <ernimril> basix: go check the spec, I do not know
[00:52:52] <basix> ernimril, ok
[00:56:30] *** ankylose has joined ##java
[00:58:17] *** InsolitWork has joined ##java
[00:58:26] *** vesz has quit IRC
[00:59:28] *** level1 has quit IRC
[01:01:57] <svendbent> i installed visualvm. I am on windows....should i use visualvm_w.exe or visualvm.exe ?
[01:04:28] *** durka42 has quit IRC
[01:07:17] *** convivial has joined ##java
[01:08:57] *** kibibyte has quit IRC
[01:09:18] *** eduardopl has joined ##java
[01:12:20] *** SinisterBen has joined ##java
[01:12:27] *** meanburrito920_ has joined ##java
[01:13:25] *** noobraska has joined ##java
[01:14:27] *** svendbent has quit IRC
[01:15:30] *** SinisterBen has quit IRC
[01:17:57] *** orgy` has quit IRC
[01:18:08] *** latebind has joined ##java
[01:21:57] *** viperhr has joined ##java
[01:22:10] <r0bby> wow
[01:22:17] <r0bby> it's dead in here
[01:22:28] * r0bby sweeps dead bodies under the rug
[01:22:38] <latebind> lol
[01:23:16] *** pchapman has quit IRC
[01:24:17] <aTypical> r0bby, some of us actually have lives outside of ##java. I'm not one of them, but some do.
[01:24:57] <[pwgr]> superbowl's on
[01:28:05] *** rdancer has quit IRC
[01:31:27] *** gregor_k has quit IRC
[01:32:03] *** gregor_k has joined ##java
[01:33:51] <aTypical> Superwhat?
[01:35:11] *** Xianny has quit IRC
[01:36:16] <ahughes> that's the tv ad contest aint it?
[01:36:48] *** Razec has joined ##java
[01:37:33] *** monkeycid has quit IRC
[01:41:45] *** Varox has quit IRC
[01:41:45] *** ankylose has quit IRC
[01:42:50] *** Xianny has joined ##Java
[01:45:35] *** alek_b has joined ##java
[01:45:48] *** SinisterBen has joined ##java
[01:46:09] *** monkeycid has joined ##java
[01:46:14] *** dob1 has quit IRC
[01:50:04] *** pchapman has joined ##java
[01:50:40] *** jihedamine has joined ##java
[01:51:48] *** jihedamine has quit IRC
[01:54:44] *** eidolon has joined ##java
[01:55:22] <r0bby> I have a life I mean i really do
[02:04:55] *** LordMetroid has quit IRC
[02:05:28] *** nvictor has joined ##java
[02:05:54] *** nvictor has left ##java
[02:06:06] <_W_> r0bby, I don't
[02:06:47] <aTypical> _W_, please don't let r0bby fool you. He does NOT have a life. If he did, he wouldn't be here with us.
[02:06:57] *** Sulis has joined ##java
[02:10:09] *** monestri has quit IRC
[02:10:19] *** monestri has joined ##java
[02:10:57] *** pstickne has quit IRC
[02:11:26] *** tissue has joined ##java
[02:12:42] *** magcius has quit IRC
[02:13:04] *** antwaungomez has quit IRC
[02:13:15] *** magcius has joined ##java
[02:16:25] <r0bby> aTypical: how dare you
[02:16:30] *** thefalling has joined ##java
[02:16:41] *** waz has joined ##java
[02:17:44] *** alek_b has quit IRC
[02:17:58] <thefalling> How do i make it to where some of my widgets such as JtextArea auto resize as the window is resized? Is there an easy way to do it under Visual editor in eclipse?
[02:19:25] <aTypical> r0bby, hey... at least I'm not trying to say that I have a life and you don't. I'm readily admitting that I too have no life.
[02:21:00] <KnK0> i agree with aTypical
[02:21:32] <KnK0> r0bby you don't have life :P
[02:22:26] *** latebind has quit IRC
[02:22:38] <eidolon> ping ojacobson
[02:25:37] *** antwaungomez has joined ##java
[02:25:58] *** antwaungomez has left ##java
[02:26:20] *** dvayanu has quit IRC
[02:28:13] *** The_Birdman has quit IRC
[02:32:20] *** vesz has joined ##java
[02:35:30] *** Razec has quit IRC
[02:36:37] *** riotz has quit IRC
[02:38:30] *** InsolitWork has quit IRC
[02:40:24] *** vesz has quit IRC
[02:48:06] *** KnK0 has quit IRC
[02:53:18] *** ml` has quit IRC
[02:55:24] *** teralaser has quit IRC
[02:56:23] *** igordcard has quit IRC
[02:56:25] *** andun has quit IRC
[02:57:03] *** seyfarth has joined ##java
[03:00:09] *** Torikun has joined ##java
[03:01:23] *** alek_b has joined ##java
[03:01:35] *** kochii has quit IRC
[03:02:17] *** rdancer has joined ##java
[03:09:33] *** gregor_k has quit IRC
[03:10:15] *** Torikun has left ##java
[03:13:11] *** [Soap] has joined ##java
[03:13:19] *** [Soap] has left ##java
[03:16:03] *** arthur_kalm has joined ##java
[03:17:24] *** alek_b has quit IRC
[03:18:11] *** RLN has joined ##java
[03:22:26] *** dmiles_afk has quit IRC
[03:23:06] <Ububegin> how to do a dictionary structure in java... Like {(int,String),(int,String) } etc......
[03:23:42] <aTypical> ~collections
[03:23:42] <javabot> The Collections API is available at http://java.sun.com/javase/6/docs/technotes/guides/collections/index.html
[03:25:15] <Ububegin> aTypical: "Map" looks good.
[03:25:39] <aTypical> Cool. I hope it works for yo.
[03:25:41] <aTypical> you
[03:25:49] *** arthur_kalm has quit IRC
[03:26:16] *** dmiles_afk has joined ##java
[03:26:56] <Ububegin> aTypical: I have chosen "HashMap" ... thanks
[03:27:48] <aTypical> Good luck.
[03:33:34] *** da_shadow has joined ##java
[03:35:02] *** cher has quit IRC
[03:39:19] *** roue has quit IRC
[03:42:38] *** orange80a has joined ##java
[03:43:29] *** Insolit has quit IRC
[03:49:11] *** Bonix has quit IRC
[03:50:07] *** _acid__ has quit IRC
[03:51:10] *** RakataPrime has joined ##java
[03:51:42] *** durka42 has joined ##java
[03:56:58] *** _acid__ has joined ##java
[04:00:19] *** Afterlawl has quit IRC
[04:00:28] *** orange80a has quit IRC
[04:01:33] *** _stack has quit IRC
[04:04:15] *** woogley has joined ##java
[04:04:26] *** The_Birdman has joined ##java
[04:04:27] *** Afterlawl has joined ##java
[04:05:10] *** toytoy has joined ##java
[04:05:32] *** RakataPrime has quit IRC
[04:08:40] *** pstickne has joined ##java
[04:13:31] *** CrypticSquared has joined ##java
[04:14:17] *** ofl_ has quit IRC
[04:14:42] *** arpu has quit IRC
[04:19:09] *** seyfarth has quit IRC
[04:22:30] *** s88 has joined ##java
[04:23:05] *** legis has left ##java
[04:23:28] * da_shadow sings *In the channel, the quiet channel, the eggheads sleep tonight*
[04:24:47] *** Wicked has quit IRC
[04:26:35] <s88> hi all, I'm using a Thread to collect data and save those data into a static class. When I try to get those data in a SWT ViewPart, I got nothing! Any idea?
[04:27:10] <s88> I remember the java threads is shared memory space...
[04:27:24] *** Wicked has joined ##java
[04:27:29] <waz> yeah, use Swing!
[04:27:32] *** thunderbolt has joined ##java
[04:28:12] <da_shadow> Are you using some sort synchrinisation to make sure there are no race conditions and memory is properly read
[04:28:24] *** twobytes has quit IRC
[04:30:02] <s88> In my case, I don't care about the synchronization. Because it's a one way reader-writer model.
[04:30:56] *** kater_ has joined ##java
[04:31:10] <s88> But I still add keyword "synchronized" before my getter/setter methods.
[04:31:43] *** Wicked has quit IRC
[04:32:49] *** Tniffoc has joined ##java
[04:32:51] *** Wicked has joined ##java
[04:33:13] <Tniffoc> Why no help with applets?
[04:34:38] <aTypical> I think the channel believes there's a better way to do whatever it is you want to do with applets.
[04:34:44] <aTypical> Why do you want to use an applet?
[04:35:29] <Tniffoc> aTypical: I don't.. I was just wondering why no applets.. that's all really.
[04:35:37] *** reval has joined ##java
[04:35:41] <aTypical> I mean other than it's some twisted college Prof's idea.
[04:35:46] <aTypical> :-)
[04:36:11] <thefalling> Is there a tool out there to create custom swing widgets? Like a jbutton thats in a circle, etc.
[04:36:13] *** kater has quit IRC
[04:36:24] <waz> 93.2% of applet problems have nothing to do with Java
[04:36:32] <Tniffoc> theFalling: could be done by extending JPanel probably.
[04:37:17] <reval> hi, can someone tell me whats working with this: http://www.pastie.org/377051
[04:37:39] <Tniffoc> TheFalling: make a JPanel look like a JButton and have a mouseListener on it with the code you need when somebody clicks it.
[04:38:19] <thefalling> how do i make a circle jpanel?
[04:38:48] <Tniffoc> reval: you're defining a function inside of another function.
[04:39:16] <Tniffoc> thefalling: define it as a square but show it to the user as a circle. Graphics.drawOval(ASDFASDFASFASDF);
[04:42:50] <Tniffoc> reval: thefalling: did that help?
[04:43:32] <reval> Tniffoc: i think, i declared the method as a static
[04:43:42] *** baklava- has joined ##java
[04:45:06] *** noobraska has quit IRC
[04:45:42] *** Tniffoc has quit IRC
[04:45:51] <t3mp3st> I have a generic class that returns a Set<E>. E is constrained to extend another interface, "RandomInterface". A method in the generic class returns Set<E>. However, from within another class, Eclipse indicates that the method does not return Set<E>, but instead Set. This makes it impossible to iterate using a foreach ("for(RandomInterface r : geninstance.returnSet())") -- Java thinks that the return value is a set of Object and not a desc
[04:45:51] <t3mp3st> endant of RandomInterface. Can someone help point me in the right direction?
[04:46:02] <thefalling> yeah gonna try to figure it out, thx for the help
[04:46:05] *** Tniffoc has joined ##java
[04:46:26] <Tniffoc> reval: yes... but you tried to DECLARE another method inside of your main method..
[04:47:01] <s88> Hi, I paste my source code in http://www.pastie.org/377057
[04:47:40] <s88> I setPercentage in a Thread, and getPercentage in a SWT ViewPart.
[04:48:14] <s88> setPercentage is success, but getPercentage gets nothing!
[04:49:59] *** da_shadow has quit IRC
[04:51:18] <reval> Tniffoc: yeah, i fixed that, it worked now, thx man
[04:51:47] <Tniffoc> reval: np. glad I could help.
[04:54:21] *** thepointer-work has joined ##java
[04:56:29] *** armyriad has joined ##java
[05:01:32] *** zacs7 has joined ##java
[05:01:46] *** Techdeck has quit IRC
[05:01:59] *** Wicked has quit IRC
[05:02:32] *** meanburrito920_ has quit IRC
[05:02:56] *** bitshuffler has joined ##java
[05:03:55] *** meanburrito920_ has joined ##java
[05:06:07] <Tniffoc> night
[05:06:37] *** Tniffoc has left ##java
[05:09:42] *** nwmcsween has joined ##java
[05:14:05] *** thefalling has quit IRC
[05:24:56] *** SinisterBen has quit IRC
[05:30:21] *** Modjor has joined ##java
[05:35:46] <reval> whats the easiest way to check if two strings are the same?
[05:36:07] <nwmcsween> ==
[05:36:12] <The_Birdman> hehe
[05:36:22] <The_Birdman> ~equals
[05:36:22] <javabot> Ask me about javadoc Object.equals(*)
[05:36:47] <The_Birdman> there's a difference between == and equals
[05:37:03] <zacs7> The_Birdman: learn about references first.
[05:37:10] <zacs7> Oops
[05:37:14] <zacs7> I mean reval ;)
[05:37:17] <The_Birdman> :-)
[05:37:36] *** kingping has joined ##java
[05:37:37] *** Weems has quit IRC
[05:37:44] <kingping> Hello chaps.
[05:38:44] <zacs7> kingping: hi :)
[05:40:15] *** CrypticS_ has joined ##java
[05:40:50] <kingping> I need to save configuration for a plain console app in a file. I considered XMLDecoder/XMLEncoder but it seems to me that it uses anonymous access to values, so that the values come one after the other and don't have any names.
[05:41:57] <kingping> It can be erorr prone.
[05:42:10] <kingping> What can be used instead?
[05:44:01] <r0bby> ~~ kingping xstream
[05:44:01] <javabot> kingping, XStream is a simple library to serialize objects to XML and back again. It can be found at http://xstream.codehaus.org
[05:44:28] <kingping> othanks
[05:44:32] <kingping> r0bby
[05:45:16] *** ahughes has quit IRC
[05:50:08] *** CrypticS_ has quit IRC
[05:51:09] *** piksel has joined ##java
[05:51:15] *** CrypticS_ has joined ##java
[05:52:09] <piksel> I have a multi-threaded program, and one thread uses a list (that is not accessible to any other threads), but I keep getting java.util.ConcurrentModificationException. How can I force java to ignore this exception or something?
[05:54:44] *** thunderbolt has quit IRC
[05:54:51] <kingping> piksel: Maybe you need synchronized modifier?
[05:55:38] *** lint has joined ##java
[05:55:48] *** ycy has quit IRC
[05:56:04] <kingping> So that only one thread is able to access a routine simultaneously.
[05:56:05] *** eduardopl has quit IRC
[05:56:36] <zacs7> yes
[05:56:46] *** McBainas has joined ##java
[05:56:58] *** AMcBain has quit IRC
[05:57:00] *** McBainas is now known as AMcBain
[05:57:01] <The_Birdman> or you could use concurrent collections
[05:57:15] *** Kwitschibo has quit IRC
[05:58:42] <lint> I'm trying to properly re-work some already existing code and I can't seem to find the correct OO way to approach it. http://eugeneciurana.com/pastebin/pastebin.php?show=39698
[05:58:50] <piksel> hmm.. nevermind, I was unaware that I could not remove items from a list using the way I was iterating through it
[05:59:07] <The_Birdman> piksel: unless you use iterator.remove
[05:59:15] <lint> If someone wouldn't mind taking a look at my predicament and give me a suggestion as the proper way to do it, I'd appreciate it.
[06:01:03] *** keeb has joined ##java
[06:01:28] <zacs7> lint: so don't make it abstract?
[06:02:13] <lint> So you're suggesting adding sendEmail to TaskImpl, except have it do nothing. Then SuperTask would @override?
[06:02:19] <zacs7> Yes
[06:02:22] *** ycy has joined ##java
[06:02:46] <zacs7> Seems the logical way ;)
[06:03:09] <lint> I thought of that as well, but let's say sending emails in the context of the base task doesn't even make sense in the problem domain. Now i'm cluttering my base class with my subclasses problems
[06:03:30] <lint> This could easily become an issue if each extending Task now has a special requirement...
[06:04:42] <zacs7> Why not add a "server task" ?
[06:04:59] <zacs7> then call super.execute(); and email straight after?
[06:05:18] <zacs7> That is the server task is derived from TaskImpl
[06:05:52] *** blankthemuffin has joined ##java
[06:05:59] <lint> Ah, that seems like a good idea. Agreed.
[06:06:16] *** aTypical has quit IRC
[06:06:53] <zacs7> lint: that way it makes sense :)
[06:07:01] <lint> Just for the sake of learning, let's say that now an issue arises in which one of the new Tasks needs to do something in the middle of the "hundreds of preceeding lines of code".
[06:07:33] <lint> Now I can't do the super.execute(), is my best option now back to the "blank method" trick we just discussed?
[06:07:38] <zacs7> lint: and you want to avoid a cut-n-paste as you should... hmm good point ;)
[06:08:05] <zacs7> lint: do you mean something the server doesn't have to do?
[06:08:43] *** The_Birdman has quit IRC
[06:08:52] <kingping> ~~ xml
[06:08:52] <javabot> The syntax is: tell nick about factoid - you missed out the 'about', kingping
[06:09:01] <lint> So let's say before save() or compress() is called, in the hundreds of lines of preceeding call, a DB update exists. Let's say for whatever reason a new task we need to create has to do some prep work before this DB call.
[06:09:05] <kingping> ~ xml
[06:09:05] <javabot> kingping, xml is http://www.w3.org/XML - XML stands for "eXtensible Markup Language". It looks a bit like HTML except that you can define whatever tag you want. Used to store hierarchical data of any kind into a standard format. See "xml parsing" for how to write or parse XML.
[06:09:29] <kingping> ~ xml parsing
[06:09:30] <javabot> kingping, xml parsing is best accomplished with one of - XOM @ http://www.xom.nu/ - JAXB @ http://java.sun.com/xml/jaxb/ - JDOM @ http://www.jdom.org/ - XmlMap @ http://tinyurl.com/3pjxjn - JAXP (including StAX as well as the legacy SAX and DOM) @ https://jaxp.dev.java.net/
[06:09:49] <kingping> wew
[06:10:07] <lint> Is it more proper to encapsulate that DB work in a method, then override that method, or should I add the "doPrepWork()" method and have it do nothing in the base class, but override in the child?
[06:10:24] *** zmanning has quit IRC
[06:12:01] <lint> I would assume, encapsulate DB work in method. Override and at the beginning do the prep work and super.doDBWork().
[06:12:06] <zacs7> lint: it's always good to have good cohesion -- you have to ask yourself if "execute()" that does many things is a good thing.
[06:12:19] *** Modjor has quit IRC
[06:13:29] <lint> Yeah, not my fault, *shakes fist at legacy code* :)
[06:13:46] *** kochii has joined ##java
[06:14:36] *** zmanning has joined ##java
[06:16:37] *** kane77 has quit IRC
[06:19:27] *** convivial has quit IRC
[06:20:21] <lint> Last theoretical zacs7. Let's say some of our Tasks don't want to compress. So the choice to compress is binary, yes or no. What's the proper thing to do now? If it's abstract, now we'll have copy paste issues. If it's not, then every one that doesn't want to compress has to override.
[06:20:29] *** kochii has quit IRC
[06:20:31] <lint> Thanks for the constructive dialogue ;)
[06:20:46] <criminy> anyone to talk to about PDF technology?
[06:21:26] <criminy> http://criminy.webfactional.com/media/images/PDFError02/a_zA_Z0_9_symbols.png
[06:21:28] <zacs7> lint: perhaps a compress flag? execute(final boolean compress) >
[06:21:30] <zacs7> ?
[06:21:34] *** Junior has joined ##java
[06:22:10] <Junior> yellou ;)
[06:22:11] <criminy> this is a screenshot from a PDF givin the text AKCBCD....Za-z1-9symbols
[06:22:18] <lint> My first thought was to introduce a Zippeable interface which enforces compress(). Then TaskImpl could have a protected compress() { //blank }. Then ones that implemented Zipeablle would override.
[06:22:45] <zacs7> lint: there's an idea :)
[06:22:47] *** kochii has joined ##java
[06:22:55] <zacs7> Much nicer IMO
[06:23:11] *** Angel-SL has joined ##java
[06:23:13] <lint> However, it's just an interface, so now I've got no implemented logic. So still copy and paste ;/
[06:23:17] *** kochii has quit IRC
[06:24:10] <zacs7> make it abstract then
[06:24:14] <zacs7> hehe.
[06:24:28] <lint> Can't have multiple inheritence, can't extend TaskImpl and Zippeable :)
[06:25:13] <zacs7> well you can slightly ;)
[06:25:18] <zacs7> but it's ugly
[06:26:59] <lint> Yeah, hrmm. See throughout this entire exercise it feels like I'm missing something. All of these solutions feel slightly hacky.
[06:27:56] <zacs7> Just use plenty of abstact classed and interfaces and you'll be fine ;)
[06:28:00] <zacs7> *classes
[06:28:03] *** piksel has quit IRC
[06:29:26] <lint> lol ok, thanks zacs7.
[06:30:04] *** Gracenotes has quit IRC
[06:30:35] *** ejb has joined ##java
[06:32:36] *** scorchsaber has joined ##java
[06:37:40] *** _acid__ has quit IRC
[06:38:26] *** Gracenotes has joined ##java
[06:41:04] *** mohadib has joined ##java
[06:41:37] <mohadib> howdy
[06:44:18] <lint> hola.
[06:44:44] <Gracenotes> greetings sir
[06:46:08] *** epalm has quit IRC
[06:46:12] *** kochii has joined ##java
[06:46:35] *** kochii has quit IRC
[06:46:44] *** epalm has joined ##java
[06:48:27] *** viperhr has quit IRC
[06:50:06] *** indeterminatus has quit IRC
[06:53:31] *** bindaas has joined ##java
[06:54:28] *** zelakt has joined ##java
[06:54:32] <t3mp3st> is there a way to return a container of E from a method of a generic class such that passing an instance of the generic class to another method will not cause the container to "forget" what it contains?
[06:55:00] *** zelakt has left ##java
[06:55:38] <t3mp3st> i.e., for type-erasure to lead to Set<E> looking like Set, requiring an unchecked cast EVEN if E was constrained to extend a particular superclass?
[06:57:35] *** indeterminatus has joined ##java
[07:01:09] *** ScottG489 has joined ##java
[07:01:42] *** rgravener has quit IRC
[07:07:33] *** mgenov has quit IRC
[07:08:05] *** woogley_ has joined ##java
[07:08:11] *** s88 has quit IRC
[07:08:17] *** woogley has quit IRC
[07:08:20] *** woogley_ is now known as woogley
[07:10:54] *** gdoko has joined ##java
[07:13:05] *** delskorch has quit IRC
[07:13:21] *** waz has quit IRC
[07:15:25] *** Bevin has joined ##java
[07:18:07] *** ScottG489 has quit IRC
[07:22:26] *** trustin has quit IRC
[07:24:49] *** Farzad has joined ##java
[07:24:57] <Farzad> hello there
[07:25:07] <Farzad> is there any one that work with rxtx ?
[07:25:39] <dangertools> ~anyone
[07:25:39] <javabot> Instead of asking whether anyone works with something you need help with, please save time by asking your actual question. If someone knows and wants/has time to help, perhaps he/she will.
[07:25:59] <t3mp3st> is there a way to return a container of E from a method of a generic class such that passing an instance of the generic class to another method will not cause the container to "forget" what it contains?
[07:26:11] <t3mp3st> i.e., for type-erasure to lead to Set<E> looking like Set, requiring an unchecked cast EVEN if E was constrained to extend a particular superclass?
[07:27:22] *** rgravener has joined ##java
[07:27:57] *** Wicked has joined ##java
[07:28:56] *** number-6 has joined ##java
[07:29:50] <number-6> where is survivdad?
[07:30:53] *** Malformation has quit IRC
[07:31:34] <number-6> all 257 people here to stupid to talk?
[07:33:35] <zacs7> number-6: stfu.
[07:34:05] *** pstickne has quit IRC
[07:34:35] <[pwgr]> number-6 == nick?
[07:36:14] <t3mp3st> if I declare a generic class (SomeCls) where E extends SomeIface, and I wish to have a method elsewhere that accepts instances of this class, what is the type of the argument? Is it "SomeCls<? extends SomeIface> arg"? Isn't this code duplication?
[07:36:32] <t3mp3st> <- is desperate for help :P
[07:36:40] *** Poken_Gabriel has joined ##java
[07:37:17] <deebo> umm lol(SomeIface bla)
[07:38:03] <t3mp3st> deebo: the type paramter, not the class implement SomeIface
[07:38:33] <t3mp3st> (err, more correctly: the type parameter extends SomeIface, the class doesn't implement it)
[07:39:33] <deebo> if you have a class X that implements interface Y, then your method can either be lolMethod(X x) or lolMethod(Y y)
[07:41:38] <t3mp3st> deebo: my class doesn't implement the interface; it accepts a type parameter that itself extends a certain superclass [sorry, shouldn't have been saying interface]: class Thing<E extends SomeOtherThing>
[07:43:14] <number-6> what the hell are you talkin about? lol
[07:43:30] *** Frostix has quit IRC
[07:43:50] <deebo> then the param can be just as you said
[07:44:12] <deebo> lolMethod(GenericClass<? extends Something> arg)
[07:44:35] <deebo> i tested it in 5seconds, dont know why you didnt :)
[07:45:32] <t3mp3st> deebo: haha, I did-- and it works-- but it seems, well, bad
[07:46:05] <t3mp3st> deebo: i'm duplicating tons of information that seems like it should reside strictly in the class definition (namely, that the type parameter of the class extends SomeOtherClass)
[07:46:43] <deebo> umm well the parameter can be Myclass arg
[07:46:49] <deebo> but youll get a warning about type safety
[07:46:59] *** kercyr has joined ##java
[07:47:13] *** morkar- has joined ##java
[07:47:21] <t3mp3st> deebo: hm, that's what i had been doing before but all hell was breaking lose when I wanted to obtain a Set<E> from the Myclass instance.
[07:47:34] <t3mp3st> deebo: but okay, your reassure has saved the day for me :P
[07:50:12] *** amz has quit IRC
[07:52:36] *** isr` has left ##java
[07:53:30] *** Bevin has quit IRC
[07:53:46] *** armyriad has quit IRC
[07:54:18] *** sebr has quit IRC
[07:55:52] *** gdoko has quit IRC
[07:56:01] *** meanburrito920_ has quit IRC
[07:56:13] *** Bevin has joined ##java
[07:56:49] *** TrentCreek has joined ##java
[08:01:16] *** pandora-- has joined ##java
[08:08:19] <TrentCreek> I keep getting an error with this statement: int j = (int) (Math.randon()*52);
[08:08:36] <TrentCreek> ymbol : method randon()
[08:08:36] <TrentCreek> location: class java.lang.Math
[08:08:50] *** ayrnieu has quit IRC
[08:08:53] <TrentCreek> anyone take a stab at why?
[08:08:55] *** mele- has quit IRC
[08:09:06] <number-6> its random
[08:09:13] <number-6> not randon
[08:09:29] <TrentCreek> Doh!
[08:09:39] <TrentCreek> always the simplest things
[08:09:54] <TrentCreek> guess I have had these contacts in too long
[08:10:00] <number-6> typos can kill ya
[08:10:16] <TrentCreek> thanks for spotting that
[08:12:33] *** ircozzy has joined ##java
[08:13:06] *** epalm has quit IRC
[08:14:06] *** spiderbyte has joined ##java
[08:19:59] *** shadewind has quit IRC
[08:20:07] <TrentCreek> Here is another... http://pastebin.com/d79c5fa08
[08:20:23] *** Copter has joined ##java
[08:20:37] <TrentCreek> I am doing starting at line 33
[08:20:40] *** indeterminatus has quit IRC
[08:21:02] <TrentCreek> The "super" is throwing me off and not sure what I should be calling...
[08:21:08] <TrentCreek> or accessing
[08:21:15] <TrentCreek> the extended class is below
[08:21:21] *** tinh has joined ##java
[08:22:11] <TrentCreek> arrayOfCards ?
[08:23:43] <TrentCreek> I got it..i think
[08:23:53] <TrentCreek> it compiled this time
[08:24:02] *** perry753 has quit IRC
[08:24:21] *** mele- has joined ##java
[08:25:29] *** brady_k has joined ##java
[08:26:33] <brady_k> hey everyone... i've got a question
[08:26:59] *** bas-i has joined ##java
[08:27:02] <brady_k> i'm trying to find the longest and lexographically first repetition of a substring of a string
[08:27:05] <brady_k> and i'm having issues
[08:27:10] <brady_k> what i've got so far: http://pastebin.com/d4c9570ea
[08:27:27] <brady_k> it works on inputs like "zhb seven dogs seven" but fails on "again and again"
[08:27:30] <number-6> why?
[08:27:47] <brady_k> why? i don't know why it's failing, which is why i'm coming here
[08:28:06] *** Kwitschibo has joined ##java
[08:28:06] <number-6> no, why do you want to do that?
[08:28:29] <brady_k> oh well to be honest, it's HW. but i'm no noob. i'm new to java, not new to programming
[08:28:43] <brady_k> and i can't figure out why this isn't working, when i've done this before in c/c++ a few times
[08:29:00] <woogley> any error messages?
[08:29:15] <brady_k> no, it just produces the wrong output for most inputs
[08:29:24] <woogley> so no indexes being out of bounds or anything
[08:29:32] <brady_k> for example "again and again" as input produces "aa" as the result
[08:29:37] <brady_k> right, no bounds issues
[08:29:42] <brady_k> i fixed those ;-)
[08:30:17] *** kom0dor has joined ##java
[08:30:31] <kom0dor> Hello
[08:31:39] *** trustin has joined ##java
[08:31:39] <kom0dor> I'm having an error of "cannot find symbol" and don't understand if what I'm doing wrong with Math.pow()
[08:31:43] <kom0dor> Anyone around?
[08:31:54] <brady_k> kom0dor: hey, but i can't help... sorry, i'm new to java
[08:32:01] <woogley> brady_k: are you confined to that algo? or do you have a bit of freedom of what you're allowed to do
[08:32:14] <brady_k> woogley: we can do it however, this is what i just smacked together
[08:32:29] <brady_k> woogley: but it has to have the same lexographic parsing at the end... not that way exactly, but filter for the same results
[08:32:40] <woogley> so you're allowed to use indexOf then?
[08:32:52] *** xabbuh has joined ##java
[08:32:56] <brady_k> woogley: yeah. i use it in line 26?
[08:33:02] <woogley> ah sure enough
[08:33:17] <woogley> i'll tell you what i would do.. probably not the most efficient algo but
[08:33:22] <woogley> it may be easier to code
[08:33:24] <brady_k> (if you refresh the page i made some comments to clarify)
[08:33:39] <brady_k> woogley: ok
[08:33:53] <woogley> i would just have a for loop going through s.length()/2
[08:34:07] <woogley> and seeing if the substring(0,j) has more than 1 index (meaning its in the string more than once)
[08:34:18] <woogley> j being the current character count, up to s.length()/2
[08:34:43] <woogley> that completely eliminates all string comparison
[08:35:13] <brady_k> oh
[08:35:15] <brady_k> i get it
[08:35:16] <brady_k> nice
[08:35:24] <woogley> quick hint for you
[08:35:27] <brady_k> sure
[08:35:39] <woogley> first index of a string: int x = s.indexOf('whatever",0);
[08:35:56] <woogley> to see if there is another occurrence.. s.indexOf("whatever",x+1)
[08:36:06] <woogley> if that returns -1, there is no other occurence
[08:36:10] <brady_k> right
[08:36:17] <woogley> just remember the x+1
[08:36:20] *** mele- has quit IRC
[08:36:22] <brady_k> i will
[08:36:23] <brady_k> thanks, let me go play with this... be back
[08:36:24] <woogley> otherwise you're just getting the same index over and over
[08:36:26] <woogley> np
[08:36:33] *** kom0dor has quit IRC
[08:40:07] *** t3mp3st has quit IRC
[08:42:06] *** ridoo has joined ##java
[08:42:49] *** jahid has joined ##java
[08:45:18] <woogley> brady_k: assuming you have to compare word-by-word, my above solution wont work =)
[08:45:42] <woogley> "foo dupe bar dupe" will never check
[08:45:54] <brady_k> woogley: no, it's char based
[08:46:17] <woogley> yeah, but do see what i mean.. it will never check for just 'dupe'
[08:46:22] <woogley> it always stretches from the first char
[08:46:37] <woogley> it will check f, then fo, then foo, then foo d, then foo du, then foo dup, etc
[08:46:45] <brady_k> oh right good point
[08:46:51] *** Ububegin has quit IRC
[08:47:12] *** Bevin has quit IRC
[08:47:24] <woogley> i would compare word by word
[08:47:32] <brady_k> that'd be why it worked for "again and again" not the rest ;-)
[08:47:33] <woogley> and by word, i mean any collection of chars separated by space
[08:47:37] *** thpar has joined ##java
[08:47:38] <woogley> yes exactly
[08:47:46] <brady_k> no but that doesn't work either, because spaces count in this problem
[08:47:58] <brady_k> "seven saints and seven dinners" returns "seven "
[08:48:03] <brady_k> or is supposed to, anyway
[08:48:12] <woogley> word-by-word would work there
[08:48:26] <woogley> you take the first word, seven, and count occurrences
[08:48:31] <woogley> then go to saints, count occurrences, etc
[08:48:53] <woogley> you can get an array of all words with s.split(" ")
[08:49:01] <brady_k> yeah but there's other situations where it doesn't ;-)
[08:49:18] *** amitev has joined ##java
[08:49:21] <woogley> yeah if you're trying to catch dupe phrases.. that may be over my head :P
[08:50:25] <f3ew> Hmmm
[08:53:19] *** bitshuffler_ has joined ##java
[08:53:42] *** Bollinger has joined ##java
[08:55:01] *** gdoko has joined ##java
[08:55:53] *** morkar- has quit IRC
[08:59:31] <TrentCreek> That shuffle function worked like crap...
[09:00:02] <TrentCreek> still had some numbers sticking together
[09:00:19] *** Bevin has joined ##java
[09:00:38] <TrentCreek> what about a seed?
[09:01:02] *** ldam has quit IRC
[09:01:38] *** shadewind has joined ##java
[09:03:46] *** skoskav has quit IRC
[09:04:51] *** skoskav has joined ##java
[09:05:11] *** bas-i has quit IRC
[09:06:04] *** bashoh has joined ##java
[09:07:49] *** bas-i has joined ##java
[09:08:37] *** phyburn has joined ##java
[09:10:33] *** bitshuffler has quit IRC
[09:14:00] *** gdk has joined ##java
[09:14:16] *** Resistance has quit IRC
[09:14:21] *** jivedude has joined ##java
[09:14:23] *** Resistance has joined ##java
[09:14:57] *** brady_k has left ##java
[09:16:17] *** puwei has joined ##java
[09:17:24] *** Malformation has joined ##java
[09:19:23] <trifler> I'm having some trouble with a little package i've downloaded in order to make ping possible. But I can't get it to return that the ping failed. The package I'm using is estadisticas.icmp. Is there a way to add some kind of timeout function in order for the app to continue. Because now it stops at the pong();
[09:20:12] *** level1 has joined ##java
[09:20:50] *** mitch0 has joined ##java
[09:21:12] *** Malformation has quit IRC
[09:21:29] *** Farzad has left ##java
[09:21:46] <level1> hi, I'm trying to implement a server using ServerSocket. On windows, every port that I've tried causes a JVM_BIND problem. I have checked netstat and these ports are not in use. I have no firewall enabled
[09:22:42] *** TrentCreek has quit IRC
[09:23:12] <zacs7> level1: what ports?
[09:23:45] *** Malformation has joined ##java
[09:24:30] <trifler> heres what I'm trying to do. http://www.pastebin.se/197210 (the syntax got a little borked)
[09:25:25] <level1> zacs7, 8005, 10000-1, 12222-3, 64000
[09:30:53] *** thpar has quit IRC
[09:31:45] *** vesz has joined ##java
[09:34:50] *** gdk has quit IRC
[09:35:07] *** pschriner has joined ##java
[09:35:09] *** chadchoud has joined ##java
[09:36:04] <chadchoud> I was wondering if it was possible to send files from my computer to my cell phone via bluetooth. And it is possible, how. I searched a lot on Google but was not able to find what I exactly want.
[09:36:36] *** dpy has joined ##java
[09:37:50] <zacs7> chadchoud: you answered your own question.
[09:38:01] <chadchoud> no such thing?
[09:38:28] <zacs7> "files" are an implementation defined concept,
[09:38:52] *** kungen has joined ##java
[09:39:34] <chadchoud> to send any data, then
[09:40:19] <zacs7> of course.
[09:40:30] <chadchoud> I just wanna establish a connection, and for the rest I can count on myself
[09:41:00] *** thepointer-work has quit IRC
[09:41:06] <chadchoud> I found javax.bluetooth.* and javax.obex.* but they seem to be part of Java ME.
[09:41:52] *** gdoko has quit IRC
[09:42:48] *** kab has quit IRC
[09:44:05] *** gdoko has joined ##java
[09:45:29] *** agnul has joined ##java
[09:46:22] *** Angel-SL has quit IRC
[09:46:43] *** mazzachre has joined ##java
[09:47:05] <chadchoud> so zacs7, how would I do that?
[09:47:52] *** reval has quit IRC
[09:48:54] <level1> how do I support multiple clients in a server? if I try to bind serverSocket to the same port again, it gives me an error message
[09:49:29] <trifler> How do you steer away from a blocking function?
[09:49:41] *** Angel-SL has joined ##java
[09:50:32] <mahogny> level1, you only bind it once afaik and then keep accepting more clients on it
[09:51:32] *** ayrnieu has joined ##java
[09:51:43] *** gnech has quit IRC
[09:52:13] <level1> mahogny, thanks
[09:52:44] *** KermitTheFragger has joined ##java
[09:53:26] *** Carnage\ has joined ##java
[09:55:00] *** ldam has joined ##java
[09:56:50] *** ankylose has joined ##java
[09:58:46] *** bitshuffler_ has quit IRC
[09:58:49] *** chadchoud has quit IRC
[09:59:14] *** ankylose has quit IRC
[10:02:17] *** Resistance has quit IRC
[10:02:19] *** Ububegin has joined ##java
[10:03:44] *** zmanning has quit IRC
[10:09:04] <Ububegin> BufferedImage newImg = new BufferedImage(oldimg.getWidth(),oldimg.getHeight(),oldimg.getType());// This method throws an exception when the getType() ==0.
[10:09:43] <Ububegin> This Java API, states that an IllegalArgumentException is thrown.. Anyone has solved this before... thanks
[10:10:33] *** bindaas has quit IRC
[10:10:51] <AMcBain> what do you mean? you haven't really told us what you're trying to solve ... do you want it to work when type is 0, or something else?
[10:10:58] *** red1 has quit IRC
[10:10:59] *** albert_gan has joined ##java
[10:12:18] <albert_gan> Hello .. is there any string objects created during this statement example (the string literal) ? StringBuffer sb = new StringBuffer("test");
[10:13:04] <AMcBain> well, "test" would be a String yes.
[10:13:48] *** BigAllan has joined ##java
[10:14:07] <kercyr> but whether it was "created" depends on other code, doesn't it?
[10:15:11] <Ububegin> AMcBain: I mean i could hack thru this by finding when getType==0 , i could arbitraryly put another digit... But that shouldnt be the way , right... So if I could make it work when type=0, will be the best solution
[10:15:17] *** valcker has joined ##java
[10:15:50] <albert_gan> so, discarding the string constant pool issue, in the statement sb.append("i am").append("studying").append("java") <- this will create 3 string objects .. or 4 including the complete form ? I assume there are 4 objects created for String s = "i am" + "studying" + "java"; statement ?
[10:15:59] <AMcBain> Ububegin: if it throws an exception when type is 0, it won't ever work. You have to send in a different type value in those cases, and see if it works.
[10:16:07] *** basix has quit IRC
[10:16:20] *** deSilva has joined ##java
[10:16:28] <AMcBain> You can't do "boolean magic = true;" and then send it a 0 and have it "magically work" :P
[10:17:21] <Ububegin> AMcBain: but if I put in another digit, and make it work... Wont the newImage be somehow different from the oldImage..
[10:17:41] <Ububegin> AMcBain: Even if it is not visible to the naked Eye
[10:17:47] <AMcBain> technically yes, but in reality, not necessarily.
[10:20:33] <kercyr> Is string concatenation required to be implemented by stringbuffer?
[10:21:35] *** derwolf has joined ##java
[10:23:34] *** Poken_Gabriel has quit IRC
[10:23:49] <AMcBain> kercyr: It is not an implementation of an inteface. So that question makes no sense. It is also final, so can be no sucblasses to defer the workings of that method to the parent class.
[10:23:57] <AMcBain> so there can*
[10:24:35] <Ububegin> AMcBain: so I just chose this.. BufferedImage.TYPE_INT_RGB digit.. seems perfect to naked eye... But I am still wondering whether it will work for all Images... :S
[10:25:05] <Ububegin> all Images referring to images.getImageType==0
[10:25:55] <Ububegin> ~pastebin
[10:25:56] <javabot> http://pastebin.stonekeep.com Paste the final url after you've pasted your stuff there.
[10:25:58] <AMcBain> I don't see why it wouldn't, though, if it doesn't, it doesn't. If the image has (or rather, /had/) transparency RGB will cut that off.
[10:26:37] *** DJGummikuh has joined ##java
[10:26:40] <DJGummikuh> Hello
[10:27:22] <DJGummikuh> I have a question regarding Non-Typed lists.. is there a way to convert a List to List<Long> without having to parse every single object?
[10:28:08] <Ububegin> AMcBain: hmm.... heres that code snippet.. http://pastebin.stonekeep.com/5589 ... You see anything , ugly here..
[10:28:49] <W_work> DJGummikuh, parse? you don't have to parse, just check that it's the right type, cast, and add
[10:29:07] <AMcBain> W_work: I think he means that it was originally created sans generic typing.
[10:29:13] <AMcBain> So you can't tell.
[10:29:28] <kercyr> AMcBain, there is the java language specs. And the answer to my question is that the language does not require that + operator be implemented using StringBuffer (though it suggests it).
[10:29:38] <W_work> that's what I understood as well AMcBain, and why I answered as I did
[10:30:03] <AMcBain> hmm, I suppose if they were all Longs, it would let you.
[10:30:22] *** shadewind has quit IRC
[10:30:41] <AMcBain> kercyr: uh ... wha? I thought you meant the concatenation method of StringBuffer itself.
[10:30:43] <kercyr> it would let you without checking what's in side.
[10:30:44] *** Resistance has joined ##java
[10:30:50] <Ububegin> AMcBain: thanks....
[10:31:04] <AMcBain> Ububegin: to the best of my knowledge, that looks fine
[10:31:07] <kercyr> albeit, with a warning.
[10:31:12] <DJGummikuh> @All problem is that here we are using some kind of communication that does not allow typed lists.. but I KNOW that there are only longs in it, just have to convince java to use it
[10:31:49] <W_work> DJGummikuh, then still do as I said, only skip the "check" step
[10:32:20] <DJGummikuh> can I do something like List<Long> mylist = (List<Long>)MethodThatReturnsList(); ?
[10:32:24] <W_work> no
[10:32:24] <kercyr> AMcBain, I meant the + operator.
[10:32:37] <Ububegin> AMcBain: In that case, I think I juz wait for someone to complain that duplicate image is not right, then..... :D
[10:32:49] <AMcBain> kercyr: then I wouldn't know, I don't delve that far into Java.
[10:32:58] <AMcBain> Ububegin: okay then, gl.
[10:33:33] <DJGummikuh> W_work my problem is that I have another method that takes List<Long> and I don't want to have and step through every object in my List to add it to another List<Long> for the method call..
[10:33:43] <W_work> DJGummikuh, why not?
[10:34:01] <DJGummikuh> because that list can theoretically be hundred thousands of elements long...
[10:34:34] <W_work> that sounds like it might be good justification for fixing the old API to use generics
[10:34:59] <W_work> (it's usually a pain-free operation if it's well coded)
[10:35:09] <kercyr> Ububegin, read the docs on setRGB.
[10:35:18] <DJGummikuh> hmm....
[10:40:21] <kercyr> DJGummikuh, you really should be able to pass as List into a method which requires a List<T> for any T without any runtime checks.
[10:40:50] <DJGummikuh> kercyr yes I just figured that very moment.. though I didn't expect it to work..
[10:41:08] <DJGummikuh> which is why I came here in the first place.. I ruled the most obvious method out....
[10:41:10] <kercyr> you should get a compile-time warning.
[10:41:21] *** igordcard has joined ##java
[10:41:38] <DJGummikuh> kercyr yes I get those...
[10:41:49] <DJGummikuh> ~pastebin
[10:41:49] <javabot> http://www.papernapkin.org/pastebin Paste the final url after you've pasted your stuff there.
[10:42:20] <DJGummikuh> http://www.papernapkin.org/pastebin/view/4281/
[10:42:44] <DJGummikuh> this is the experiment I checked that way with...
[10:42:54] <DJGummikuh> cool thing that works.. :) thanks for your help
[10:43:03] *** sammyt123|away is now known as sammyt123
[10:43:33] <W_work> heh, that actually compiles?
[10:43:50] <DJGummikuh> yeah and runs :) (with 7 warnings)
[10:44:03] <kercyr> The monstrosity that is Java generics....
[10:44:11] *** skoskav has quit IRC
[10:44:18] *** skoskav has joined ##java
[10:44:49] *** elmomalmo has joined ##java
[10:45:21] <kercyr> DJGummikuh, add untyped.add("hahaha"); after the other add()'s.
[10:45:44] <DJGummikuh> that will most likely make it boom... but I don't need that, I KNOW that there are only ints in there :)
[10:46:06] <DJGummikuh> Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
[10:47:09] *** juc0 has joined ##java
[10:47:17] <kercyr> But it compiles...
[10:47:36] <DJGummikuh> yes
[10:47:51] <DJGummikuh> it has to.. it seems to cast on the fly...
[10:47:55] <DJGummikuh> (hence the CastException)
[10:48:58] * W_work adds to his todolist investigating how to turn all compile warnings to errors
[10:49:12] <W_work> though I expect Findbugs would catch it anyway
[10:54:59] *** casmo has quit IRC
[10:56:36] *** igordcard has quit IRC
[10:57:00] *** segun has joined ##java
[10:58:40] *** teralaser has joined ##java
[10:59:11] *** segun has left ##java
[11:00:49] *** sammyt123 has quit IRC
[11:01:00] *** casmo has joined ##java
[11:04:47] *** woogley has quit IRC
[11:10:00] *** agnul has quit IRC
[11:10:07] <gambler> what is the best Swing form designer?
[11:11:27] <AMcBain> gambler: your own two hands\
[11:11:58] <gambler> isnt there somethign easy for those of us who have to cope with many other libs
[11:13:04] <AMcBain> I wasn't kidding with the hands. I do much better than most will ever do using a form designer.
[11:13:37] <gambler> I believe you. I wasnt kidding either.
[11:13:49] <gambler> I like wysiwyg
[11:14:02] *** ankylose has joined ##java
[11:16:00] <AMcBain> Then NetBeans has a free editor, called Matisse, but it generates some ugly code if you don't set the default layout manger to something more reasonable ... and there are others, some of which might cost money
[11:16:22] <elmomalmo> gambler: I haven't tried many but the one that comes with IDEA is pretty good. Not free :-(
[11:16:35] *** agnul has joined ##java
[11:17:03] <gambler> cool. ill try those two
[11:18:07] *** bashoh has quit IRC
[11:18:30] *** gdoko has quit IRC
[11:19:43] *** casmo has quit IRC
[11:19:44] * kercyr despises GUI coding.
[11:20:27] <gambler> dont we all
[11:20:49] <AMcBain> hey now, I don't!
[11:21:03] <AMcBain> I'm no graphic designer, but I don't mind GUI coding.
[11:22:07] *** betim has joined ##java
[11:22:51] * AMcBain intereprets silence as "he's weird ... we should cease talking to him" :P (JK)
[11:24:01] *** Levia_ has joined ##java
[11:24:07] <kercyr> That's exactly what *I* was thinking.
[11:24:28] <gambler> pretty much....i resisted the urge to call you a philistine
[11:24:41] <AMcBain> Not much to be gained there, r0bby already called me weird for liking GUI coding.
[11:25:39] *** monkeycid has quit IRC
[11:26:16] *** rawblem has joined ##java
[11:26:51] <AMcBain> I admit some times it's frustrating, but overall, it's a cool thing to be able to build a front-end to your own app.
[11:27:15] <W_work> I like the kind of front end that is one-way and console-only
[11:27:51] <AMcBain> I'm also a sort of perfectionist for GUIs too ... I go and change the renderer code for JTables to not draw the cell focus border when you can't select individual cells, etc.
[11:28:16] <pragma_> Swing is such a pain in the butt.
[11:28:38] <AMcBain> Aww, really? I find it not so bad. I much prefer it to .NET's Windows Forms ...
[11:28:39] <pragma_> Most people muck up the threading
[11:29:54] <AMcBain> Well, threading isn't exactly something to just throw around, and as such, it isn't easy ...
[11:30:20] <pragma_> SwingWorker is a nice addition to 1.6
[11:30:29] *** orgy` has joined ##java
[11:30:51] <pragma_> as well as updating the samples to use EventQueue.invokeLater() when creating the gui
[11:31:12] <pragma_> even I didn't think about that part in my early days :p
[11:31:52] <AMcBain> I use invokeLater, but through SwingUtilities, though I know that's an alias, probably to that.
[11:32:42] <pragma_> gambler: I find the best to be hand-coded
[11:32:51] *** amitz has joined ##java
[11:33:03] *** Levia has quit IRC
[11:33:07] * AMcBain concurs :)
[11:33:11] <gambler> pragma_, no doubt. the most efficient code is written in assembly too
[11:33:19] <amitz> what to google if I want to run python library from java
[11:33:20] <amitz> ?
[11:33:37] <pragma_> gambler: well, that's not really quite a fair comparison
[11:33:37] <AMcBain> I have a feeling due to my like for GUIs, I'll get relegated that task this semester in our groups, once assigned.
[11:33:44] <elmomalmo> amitz: Jython?
[11:33:51] <AMcBain> ~python
[11:33:52] <javabot> ython is a dynamic object-oriented programming language that can be used for many kinds of software development. It offers strong support for integration with other languages and tools, comes with extensive standard libraries, and can be learned in a few days. Many Python programmers report substantial productivity gains and feel the language encourages the development of higher quality, more maintainable code.
[11:34:04] <AMcBain> ah ... not what I hoped for.
[11:34:08] *** monkeycid has joined ##java
[11:34:10] <AMcBain> and it's missing a "p"
[11:34:19] <amitz> thx
[11:34:32] <pragma_> gambler: I do agree that attempting to put a GUI together with swing and have everything grow and shrink and layout properly is a bit trail and error
[11:34:42] <AMcBain> ~no python is a dynamic object-oriented programming language that can be used for many kinds of software development. It offers strong support for integration with other languages and tools, comes with extensive standard libraries, and can be learned in a few days. Many Python programmers report substantial productivity gains and feel the language encourages the development of higher quality, more maintainable code.
[11:34:42] <javabot> Okay, AMcBain.
[11:34:46] <AMcBain> ~python
[11:34:46] <javabot> AMcBain, python is a dynamic object-oriented programming language that can be used for many kinds of software development. It offers strong support for integration with other languages and tools, comes with extensive standard libraries, and can be learned in a few days. Many Python programmers report substantial productivity gains and feel the language encourages the development of higher quality, more maintainable code.
[11:35:07] *** deepjoy has joined ##java
[11:35:33] <AMcBain> pragma_: try Windows Forms, as far as I can tell, there are no layout managers to speak of, unless you write your own or find a library.
[11:35:56] <AMcBain> There aren't even "default" ones, that expand the contents of a split pane when you resize the divider.
[11:35:57] *** bas-i has quit IRC
[11:36:17] *** trustin has quit IRC
[11:36:22] <AMcBain> that's the only real complaint I have against that GUI library/API.
[11:38:00] <gambler> the one area we actually need a monopoly in (GUI libs) microsoft wasnt able to dominate
[11:38:02] * kercyr wishes he can assign AMcBain his gui coding.
[11:38:12] *** TooAngel has joined ##java
[11:38:24] *** trustin has joined ##java
[11:38:30] *** casmo has joined ##java
[11:38:43] *** TooAngel has left ##java
[11:38:52] *** trustin has quit IRC
[11:38:55] <pragma_> hm
[11:39:10] <AMcBain> gambler: well, I found their GUI editor not too bad, for what it did ... but you really can't have a GUI lib that covers everything ... I think that's a reason all current GUI libs suck ... X11, MS ... etc.
[11:39:33] <pragma_> X11 isn't a gui lib
[11:39:43] <AMcBain> well, I mean, the underying systems.
[11:39:50] <pragma_> overlying, you mean?
[11:40:12] *** trustin has joined ##java
[11:40:34] <pragma_> wxwidgets, GTK, QT, etc run ontop, not underneath
[11:41:54] <pragma_> and QT is pretty popular, I should take a look at it, now that it's LGPL
[11:42:03] <AMcBain> no ... I mean, when you work on Windows (ingnoring higher-level things for now, like Swing) you have to interface with the Windows GUI-subsystem, and on Linux (usually) X11, and the upper level systems like GTK, QT, Windows Forms (though it doesn't abstract much!) all have to deal with these systems that were either originally designed for a slightly different purpose (X11) or legacy (Windows) and so the capacity to do it all over (and better!) is diminished.
[11:42:19] <pragma_> I created a few simply GTK applications 5 years ago or so, it wasn't too bad
[11:42:24] <pragma_> I'm sure it's improved a lot since then
[11:42:46] <pragma_> I always type simply instead of simple. interesting
[11:42:50] <AMcBain> Well, generally, yes, the higher level things (GTK) get better at allowing you to do more without handling low level stuff.
[11:43:04] <gambler> AMcBain, whats the swing equivalent of a GroupBox in Windows.Forms
[11:43:23] <pragma_> I remember hand-coding a few Win3.1 applications
[11:43:24] <AMcBain> gambler: I have no idea ... is a GroupBox part of a layout manager? because there aren't any ...
[11:43:32] <pragma_> and then swtiching to win95
[11:43:42] <pragma_> ... faintly.
[11:43:45] *** casmo has quit IRC
[11:43:54] <gambler> GroupBox is a little container for putting widgets in that draws a nice little border around it
[11:44:09] <pragma_> I tend to use Java for Windows/cross-platform stuff
[11:44:18] <AMcBain> gamber: ah, I think you can do that with a panel, and set the border or something on it, I've done it before ...
[11:44:20] <pragma_> I don't want to write anything native to Windows these days
[11:44:26] <pragma_> or for the last 10 years or so
[11:44:42] <pragma_> I did read a C# book though
[11:44:47] <AMcBain> well, most GUI subsystems need to be started over and written again, not because what we currently have totally sucks, but because we are sorta limited by what I mentioned above (the current systems are just built on top of the previous version)
[11:44:47] <pragma_> but not WF
[11:45:16] <AMcBain> and if we start over, we can free ourselves from the limited perspective they have that enforces certain styles of coding for them.
[11:45:21] *** toytoy has quit IRC
[11:45:54] <AMcBain> but ... even if I cloned myself, I doubt I could come up with anything remotely better than what we currently have.
[11:46:01] <pragma_> the problem seems to be that multithreading a gui system is impossible
[11:46:32] <pragma_> (to acheive with reasonable performance and lack of complexity, that is)
[11:46:53] <pragma_> hence the single event thread
[11:46:59] <pragma_> in most systems
[11:49:37] <pragma_> I think Swing is getting better all the time
[11:49:38] *** skoskav has quit IRC
[11:50:11] <pragma_> The JX Swing group is a boon
[11:50:17] <pragma_> JXTable, etc, are nice
[11:50:55] <pragma_> the JSwat debugger is very sexy
[11:51:07] <pragma_> I need to study those GUI components
[11:51:11] *** SniperFodder has quit IRC
[11:51:57] <pragma_> there's just a couple of kinks that I found weird in JSwat's GUI, but for the most part it's really great and customisable
[11:52:22] <pragma_> I should check out this NetBeans that it's based on
[11:52:44] <pragma_> but I don't like using IDEs
[11:52:49] <pragma_> I still use vim for Java
[11:53:06] <pragma_> I was using jdb for the longest time until I discovered JSwat
[11:53:24] <pragma_> I admit that Jswat makes it a lot easier :)
[11:54:00] <pragma_> great, I'm talking to myself
[11:54:23] <pragma_> r0bby: stfu
[11:54:39] *** midbit has joined ##java
[11:55:10] *** SniperFodder has joined ##java
[11:55:22] *** amitz has left ##java
[11:57:14] <midbit> hi
[12:01:43] *** ramdam has joined ##java
[12:03:17] *** ankylose has quit IRC
[12:03:58] <ramdam> hi
[12:04:04] <ramdam> wow, it's quiet here eh?
[12:04:10] <midbit> yesh
[12:04:35] <ramdam> well, obviously i have a problem with my java app
[12:04:42] <midbit> so do i :P
[12:05:18] <ramdam> uhoh !
[12:05:32] <midbit> whats the issue though ?
[12:05:52] <ramdam> i'm building an app using netbeans and swift
[12:06:28] <ramdam> what i am trying to do, get my app to close using System.exit(0); after a new window has appeared for 5 seconds
[12:06:41] <ramdam> Thread.sleep(x); doesn't work
[12:06:46] <ramdam> in fact, nothing seems to work
[12:07:24] <ramdam> sleeping the app has the weird effect of not letting the window appear even if it declared after gui instantiation.
[12:07:31] <ramdam> it's very frustrating
[12:07:37] <pragma_> ramdam: learn about Swing threading
[12:07:44] <pragma_> !link to swing threading
[12:07:50] <pragma_> ~link to swing threading
[12:07:51] <javabot> I guess the factoid 'swing text components' might be appropriate:
[12:07:52] <javabot> For a summary of text components available for swing please see http://java.sun.com/docs/books/tutorial/uiswing/components/text.html
[12:07:56] <pragma_> :o
[12:07:59] <pragma_> ~swing thread
[12:07:59] <javabot> pragma_, edt is Event Dispatch Thread, the thread that drives the awt/swing gui. See http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html for a tutorial on Swing and threads, and note http://java.sun.com/developer/JDCTechTips/2005/tt0727.html#1
[12:08:18] <ramdam> oh ma gawd
[12:08:20] <pragma_> Nice auto-complete/search
[12:08:25] <ramdam> pragma just helped?
[12:08:31] <midbit> heh
[12:08:35] <pragma_> ramdam: well, ##c++ is a joke channel, to me
[12:08:40] <ramdam> i see
[12:08:45] <pragma_> because C++ is a joke language, to me
[12:08:50] <midbit> :o
[12:09:11] <midbit> KDE is all joke!?!
[12:09:16] <ramdam> no
[12:09:19] <ramdam> kde is just ugly
[12:09:22] <ramdam> i kid you not
[12:09:26] <midbit> well, yes
[12:09:30] <pragma_> blackbox ftw
[12:09:52] <pragma_> well, I guess installing bbkeys, etc, is kind of outdated these days
[12:09:56] <pragma_> what is it now? fluxbox?
[12:10:00] <midbit> yeah
[12:11:33] *** puwei has left ##java
[12:11:41] <pragma_> ramdam: technically, javabot helped -- kind of impressive how easy it was to display some useful links without knowing the actual keyword
[12:11:55] *** skoskav has joined ##java
[12:12:05] *** monkeycid has quit IRC
[12:12:12] <ramdam> hmm yeah, it's indicative of java itself. ides write it for you
[12:12:26] <midbit> heh
[12:12:26] <ramdam> it's still a lot of writting in my opinnion
[12:12:26] <pragma_> I use vim and manually write all my gui code
[12:12:31] *** rawblem has quit IRC
[12:12:31] <midbit> I use eclipse
[12:12:36] <ramdam> i hate eclipse
[12:12:39] <ramdam> with a passion
[12:12:48] <midbit> whys that ?
[12:12:49] <pragma_> I prefer not to write a gui if I can get away with a console app
[12:13:09] <pragma_> but if I get caught up in a gui app, I really do get caught up in them
[12:13:18] <ramdam> cuz eclipse is ugly, bloated, and the epitome when it comes to practical examples of confusing users
[12:13:20] <pragma_> always trying to make it better and more flexible
[12:13:25] <pragma_> and make it do more and more and more
[12:13:29] <ramdam> huh, and you write it out manually?
[12:13:33] <pragma_> prettier and prettier
[12:13:44] <pragma_> manually is the only way for that :p
[12:14:02] <ramdam> at first i was doing gtk, but i now have a java class, so i switched. netbeans has a gui builder
[12:14:05] <ramdam> so yay netbeans
[12:14:14] *** longbeach has joined ##java
[12:14:20] <pragma_> were you using glide for gtk?
[12:14:49] <pragma_> er, glade
[12:15:04] <midbit> how do i set the font color for Graphics2D.drawString() ?
[12:15:29] <ramdam> no actually
[12:15:33] <ramdam> thats the funny thing
[12:15:45] <ramdam> i was actually learning it piece by piece
[12:16:07] <ramdam> i thought it would give me a more robust standing if i started straight with the gtkmm documentation
[12:16:10] <midbit> not using glade isn't a wise thing to do
[12:16:19] <ramdam> (because i was using c++, and still am)
[12:16:27] <midbit> unless you want to understand how it all works
[12:16:30] <ramdam> no, i think it is wise
[12:16:33] <ramdam> yeah, i do
[12:16:48] <ramdam> sometimes you look at tutorials to get you started
[12:16:54] <ramdam> but you always end up going back to learn more
[12:16:58] <ramdam> by reading the doc
[12:17:03] <ramdam> you know it all
[12:17:06] *** Cowie` has left ##java
[12:17:15] <midbit> yeah
[12:18:08] <zacs7> glade is deadsies. Well libglade is
[12:18:17] <pragma_> mibocote: use the drawString with AttributedCharacterIterator parameter
[12:18:22] *** ircozzy has quit IRC
[12:18:44] <pragma_> midbit:
[12:18:50] <pragma_> AttributedCharacterIterator
[12:18:50] <zacs7> pragma_: candide has been on holidays a lot lately?
[12:18:53] *** Angel-SL has quit IRC
[12:18:56] <ramdam> well i heard they changed it so it would stop generating code
[12:19:09] <midbit> pragma_: ah, i did it with setting the Graphics2D.color(Color b) just before drawing the string
[12:19:28] <pragma_> midbit: but that's too simple and easy
[12:19:36] <midbit> heh
[12:19:58] <pragma_> zacs7: well, ##c is a lot of work :p
[12:20:17] <zacs7> pragma_: I heard she went on honeymoon :p
[12:20:28] <pragma_> again?
[12:20:30] <zacs7> Seems to like Zharf :p
[12:20:41] <zacs7> I mean Zhivago:P
[12:20:57] *** monkeycid has joined ##java
[12:20:59] <pragma_> Sure it's not Zhig?
[12:21:26] *** Cypher has quit IRC
[12:26:19] *** Varox has joined ##java
[12:26:22] *** bigip has joined ##java
[12:26:31] *** edvard has joined ##java
[12:28:41] <ramdam> hmm, i think SwingWorker is going to solve ma problemmmsss yeahhh
[12:30:54] <deebo> anyone know if theres some wsdl based xml marshaller/unmarshaller for java?
[12:31:33] <deebo> i need some fast way to extract data from a soap response, the current method of Document() and xpath queries is toooo slow
[12:31:55] *** bas-i has joined ##java
[12:31:58] *** ries has joined ##java
[12:32:28] *** Angel-SL has joined ##java
[12:33:22] *** monkeycid has quit IRC
[12:33:27] *** thpar has joined ##java
[12:34:33] <Levia_> deebo: wsdl2java from apache?
[12:34:39] *** Levia_ is now known as Levia
[12:36:01] <deebo> hmm ill look into that
[12:36:49] *** casmo has joined ##java
[12:37:22] *** gdoko has joined ##java
[12:38:37] *** tinh has quit IRC
[12:40:58] *** morkar- has joined ##java
[12:42:22] *** monkeycid has joined ##java
[12:42:46] *** monkeycid has quit IRC
[12:43:47] *** gregor_k has joined ##java
[12:45:05] *** ridoo has quit IRC
[12:45:23] *** pirho has joined ##java
[12:45:42] *** Woflborg has joined ##java
[12:47:09] *** skoskav has quit IRC
[12:47:41] *** ridoo has joined ##java
[12:49:07] *** carmoon has quit IRC
[12:51:51] *** Angel-SL has quit IRC
[12:52:43] *** hoerup has joined ##java
[12:53:19] <lenbust> how do I use hbase tables as input and/or output for my mapreduce jobs?
[12:54:29] *** Angel-SL has joined ##java
[12:55:09] <zacs7> lenbust: with the manual.
[12:55:53] <lenbust> mm, hbase.mapred it seems
[12:56:59] *** ijuma has joined ##java
[12:58:09] *** thpar has quit IRC
[12:59:55] *** kercyr has quit IRC
[13:00:05] *** blankthemuffin has quit IRC
[13:09:42] *** romanb has joined ##java
[13:12:51] *** bindaas has joined ##java
[13:13:23] *** rgravener has quit IRC
[13:16:32] *** javahorn has joined ##java
[13:21:02] *** bas-i has quit IRC
[13:23:08] *** bas-i has joined ##java
[13:24:12] *** csaba has joined ##java
[13:24:49] <csaba> I have a set which contains Integers that are actually IDs. Can I write in Hibernate this? delete from XXX where id in :id, and then set the parameter id to be that set?
[13:28:32] *** hrehf has joined ##java
[13:28:51] *** Junior has quit IRC
[13:32:40] *** Beyonder has joined ##java
[13:32:54] *** Lintlock has quit IRC
[13:41:58] *** bliZZardz has joined ##java
[13:42:48] *** surial has joined ##java
[13:45:29] *** mgenov has joined ##java
[13:48:19] <elmomalmo> philphil
[13:48:32] <elmomalmo> gah, sorry, wrong window
[13:48:34] <Beyonder> Greetings. What is the fastest way to convert a text string to its MD5 representation in String (for sql query)?
[13:48:59] *** waz has joined ##java
[13:49:00] *** Resistance has quit IRC
[13:49:22] *** Resistance has joined ##java
[13:49:37] *** rawblem has joined ##java
[13:50:24] *** rulereric has quit IRC
[13:51:19] *** Varox has quit IRC
[13:51:45] *** shadewind has joined ##java
[13:52:06] *** mapreduce has joined ##java
[13:52:55] *** bushwakko has joined ##java
[13:52:58] <mapreduce> Hi. I'm benchmarking ImageIO, Toolkit.createImage (followed by MediaTracker to fully load the image) and FFmpeg, to compare their speeds at loading various JPEGs.
[13:53:04] <surial> Beyonder: That's not a java question, is it?
[13:53:39] <surial> Beyonder: md5 is not a function in the SQL spec, so check your db's specific documentation.
[13:53:51] <Beyonder> surial: well, by fastest I mean "least code", and I need to do it on java side.
[13:53:53] <surial> or use a stored procedure.
[13:53:58] <mapreduce> ImageIO is sometimes much slower (3x) than Toolkit, which is surprising. Is there any particular problem of ImageIO that would only be exhibited by certain JPEGs?
[13:54:03] <surial> okay, so, what's the sql query have to do with anything then?
[13:54:13] <mapreduce> FFmpeg is consistently the fastest, but not by a lot.
[13:54:38] <Beyonder> surial: well, I can convert each byte to HEX, but then I will get 0x320x250xff, while SQL requires 3225FF
[13:54:41] <ayrnieu> Beyonder - http://stackoverflow.com/questions/415953/generate-md5-hash-in-java
[13:54:42] <surial> Beyonder: You should check out a site I found recently. It's called 'google'. Has lots of useful things. 3rd link from it when googling for 'java md5': http://snippets.dzone.com/posts/show/3686
[13:54:50] <surial> ~stackoverflow--
[13:54:51] <javabot> stackoverflow has a karma level of -1, surial
[13:56:01] <Beyonder> thanks
[13:56:01] <surial> mapreduce: I really don't have any experience with this, but I vaguely recall that for most ImageIO things, the images aren't actually decoded until they are used. So I'm assuming you're using a mechanism to ensure its there. Possibly that mechanism works on queue or via the EDT and is the cause of the occasional slow lapse?
[13:56:26] <mapreduce> surial: I think it's Toolkit that does that and that ImageIO loads eagerly.
[13:56:28] *** ankylose has joined ##java
[13:56:54] <surial> Both Toolit and ImageIO are part of standard swing?
[13:56:58] *** toader has joined ##java
[13:56:59] <mapreduce> Well, it's definitely true that Toolkit does that, but I don't know about ImageIO.
[13:57:09] <mapreduce> Toolkit is java.awt, ImageIO is javax.swing iirc.
[13:58:25] *** Beyonder has quit IRC
[13:58:56] <toader> Hi, there is same string in different objects. do they point the same string in memory? or have two copies? thanks
[13:58:58] *** UK-sHaDoW has joined ##java
[13:59:35] <surial> toader: Can be either way.
[13:59:44] <surial> toader: You should not rely on either behaviour. Why do you need to know?
[13:59:56] *** jottinger has joined ##java
[14:00:12] <surial> mapreduce: Well, ImageIO uses an ImageInputStream spi system to find an appropriate decoder.
[14:00:15] <mapreduce> You can rely on it as it is guaranteed to behave the way it does. However, the rules confuse people.
[14:00:18] *** rawblem has quit IRC
[14:00:20] <surial> Toolkit is all native / sun.com voodoo.
[14:00:25] <toader> surial:I want to calculate the total memory size of these objects used
[14:00:33] <surial> mapreduce: if your code relies on that, you've got some seriously fucked up code.
[14:00:45] <surial> toader: Well, then, just check the references. If they are ==, then its the same reference. If not, then not.
[14:00:52] <mapreduce> surial: It might rely on that for not running out of memory.
[14:00:59] <surial> toader: If you want to force equality, use the .intern() method on string.
[14:01:02] <jottinger> toader: checking memory sizes is a profiling thing.
[14:01:48] <jottinger> What are you trying to do?
[14:02:21] <surial> mapreduce: Toolkit breaks down to CToolkit, UNIXToolkit, depending on your JVM. Perhaps Toolkit uses native code, and ImageIO's more java-centric approach uses an entirely different algorithm written mostly in java. You could download the sources to the sun.com bits and check out what's happening.
[14:03:44] <mapreduce> surial: Done that.
[14:04:02] <mapreduce> Though I downloaded openjdk for convenience instead, which might be slightly different.
[14:04:11] <mapreduce> I'm benchmarking on Java 6.
[14:04:15] <surial> Could be. Did you test your benchmarks on openjdk?
[14:04:21] <mapreduce> No, but I could.
[14:05:39] <surial> worth a try. rewriting some platform-dependent C stuff sounds just like the thing that the openjdk rewrites covered.
[14:06:33] <mapreduce> The ImageIO code in there looks like it's been there a while.
[14:06:39] <mapreduce> Hacky comments etc.
[14:07:09] <toader> surial: http://paste.pocoo.org/show/102417/
[14:07:14] *** Daniel_H has joined ##java
[14:07:17] <mapreduce> Ok, thanks surial.
[14:07:19] *** mapreduce has left ##java
[14:07:58] <toader> jottinger: could u also take a look my question? thanks
[14:08:04] *** durka42 has quit IRC
[14:08:06] <surial> toader: Use HashMap instead of Hashtable, for starters.
[14:08:29] <surial> toader: That doesn't answer WHY you need to calculate the size.
[14:08:41] <surial> Which, as jottinger said, is really best left to a profiler who can give you a pretty exact answer.
[14:09:18] <toader> surial: profiler? what is it?
[14:09:23] <surial> ~profiler
[14:09:23] <javabot> a profiler is a tool to find performance bottlenecks. VisualVM is included in JDK nowadays and is great for a free profiler; jprofiler and jprobe cost money (jprofiler has a free eval period). Some more are listed here: http://javafaq.mine.nu/lookup?169
[14:09:28] *** eidolon has left ##java
[14:09:48] <surial> NetBeans (the IDE) also has an excellent profiler. It's mostly the VisualVM profiler with a few extra bells and whistles.
[14:10:18] <toader> surial: i am using eclipse
[14:10:28] <jottinger> toader: considering that I just joined, I have no idea what your question was.
[14:10:29] <surial> ~google eclipse profiler
[14:10:29] <javabot> http://www.google.com/search?q=eclipse+profiler
[14:10:31] *** UT2K3 has joined ##java
[14:10:38] <jottinger> toader: and if you're using eclipse, that makes no difference. USE A PROFILER.
[14:10:48] <jottinger> jvisualvm is a fine tool.
[14:11:16] <toader> jottinger: it is my first time to hear Profiler, how to use it
[14:11:33] <jottinger> toader: well, now you know what to LOOK UP ON GOOGLE.
[14:11:41] *** vezzoni has joined ##java
[14:13:23] <r0bby> toader: http://www.google.com -- answers to life, the universe, and how to use profilers :)
[14:13:24] *** convivial has joined ##java
[14:13:41] *** soa2ii has joined ##java
[14:13:47] <toader> r0bby: ok
[14:13:54] <soa2ii> Hi there. Can you do smth like that here nicer? http://rafb.net/p/iI9hzW70.html
[14:14:33] <r0bby> soa2ii: no
[14:14:41] <soa2ii> OK (:
[14:17:21] *** Angel-SL has quit IRC
[14:22:09] *** tissue has quit IRC
[14:24:18] *** casmo has quit IRC
[14:27:15] <surial> soa2ii: You can call a method in there, should help reduce that 7-level loop thing.
[14:27:52] *** ijuma has quit IRC
[14:27:52] <soa2ii> surial: How do ypu mean that?
[14:27:55] *** noob13 has joined ##java
[14:28:15] <surial> 7-deep loops are usually a bad idea.
[14:28:15] <soa2ii> Of course I want to get this for stuff closer :P
[14:28:19] <soa2ii> Yeah.
[14:28:37] <soa2ii> Ah, ok.
[14:28:44] <surial> as is letting a constructor do any real work, as is letting the main class implement an interface instead of handing it an (anonymous) inner class....
[14:28:44] <surial> this code could use some work.
[14:28:45] *** ijuma has joined ##java
[14:29:52] *** chriswk has quit IRC
[14:30:07] <surial> So, to summarize: I'd make the BASE_DIRECTORY bit a parameter to Metflac's constructor, then I'd offload the actual action into a go() method of some sort (come up with a better name yourself), then I'd tackle that 7-deep loop by splitting part of it into another method. Finally I'd do the FileFilter job with an anonymous inner class, and then I'd let the main() call supply BASE_DIRECTORY to Metflac, and call .go() on it.
[14:30:26] <surial> Then your code would look nice to people who care about code aesthetics. Whether or not you find that important I leave up to you.
[14:31:41] *** mgenov has quit IRC
[14:32:17] *** mgenov has joined ##java
[14:32:28] *** Frostix has joined ##java
[14:32:29] *** chriswk has joined ##java
[14:32:35] <soa2ii> surial: You're right.
[14:32:43] <soa2ii> But how would such a method look like?
[14:32:47] <soa2ii> I got
[14:33:03] <surial> which method? I described at least 4 methods in there.
[14:33:22] <soa2ii> ~/Musik/<artist>/<album>/[CD 0..9]/<tracks>
[14:33:23] <javabot> soa2ii, I have no idea what /Musik/<artist>/<album>/[CD 0..9]/<tracks> is.
[14:33:37] <surial> I understand that. I assume oyu're talking about your 7-deep loop.
[14:33:44] <soa2ii> Yes.
[14:33:50] <soa2ii> So I would do smth like
[14:34:02] <soa2ii> for artist { getAlbum}
[14:34:03] <surial> You could for example replace everything inside the for(File album : interpret.listFiles()) with just: handleAlbum(album);
[14:34:04] *** Spike1506 has joined ##java
[14:34:07] *** BlackZ has joined ##java
[14:34:09] <soa2ii> but is that a void or what?
[14:34:09] <surial> The handleAlbum method would contain everything that's currently inside that for loop.
[14:34:11] <BlackZ> hello
[14:34:14] *** TooAngel has joined ##java
[14:34:19] <soa2ii> Hm... ok
[14:34:21] <surial> soa2ii: Yes.
[14:34:24] <BlackZ> how i can enable java plugin for mozilla firefox?
[14:34:28] <BlackZ> i use debian testing
[14:34:40] <BlackZ> java already installed,but i don't know how enable it in firefox
[14:34:45] <BlackZ> i use iceweasel
[14:34:45] *** UT2K3 has quit IRC
[14:34:46] <surial> Not really the right channel. Try #debian
[14:34:46] <surial> apt-get install openjdk6 did not do it for you?
[14:34:59] <surial> but did you install java via apt-get or via some other method?
[14:35:00] <Zharf> install sun-java6-plugin
[14:35:03] <surial> eh.
[14:35:08] <surial> Zharf: Badf.
[14:35:10] <surial> bad.
[14:35:12] <Zharf> ?
[14:35:12] <surial> Try openjdk6
[14:35:14] <surial> much nicer.
[14:35:19] <surial> and the future of java on debian.
[14:35:19] <Zharf> how is it nicer?
[14:35:39] <BlackZ> surial, via www.java.com
[14:35:42] <Zharf> openjdk totally sucks with cgoban3 at least :)
[14:35:42] <BlackZ> file .bin
[14:35:44] <surial> More stable. Open source. Fits better with debian. More debian hackers care about the openjdk6 target. etcetera.
[14:35:47] <surial> BlackZ: There's your problem.
[14:35:54] <surial> BlackZ: Try to undo whatever you did, and remember this mantra:
[14:36:02] <Zharf> surial, never had stability problems with sun java
[14:36:14] <Zharf> and personally I don't care about open source or not
[14:36:24] <surial> BlackZ: "If I use debian, I will accept that my computer is permanently fucked when I install anything, unless I install it via apt-get".
[14:36:42] <surial> Zharf: So the part that 'debian hackers put more effort into openjdk6', and 'openjdk is the future of java in general' are also irrelevant to you?
[14:36:47] <Zharf> surial, "except when I actually know what I'm doing"
[14:37:17] *** jottinger has quit IRC
[14:37:20] <Zharf> surial, until openjdk becomes better than sun java regarding cgoban3, yes
[14:37:27] *** usicow has joined ##java
[14:37:33] <surial> Zharf: Anybody who knows what they are doing can fill in that blank themselves. So it was redundant to add it.
[14:38:25] <usicow> does anyone know if its possible to filter out all log messages, except for one packages log messages using log4j? I'm seeing a million springframework log messages so I find it hard to see my own.
[14:38:36] <Zharf> I also tend to install most things on debian by hand anyway since debian is retarded and makes everything depend on alsa
[14:38:38] <BlackZ> surial, openjdk6 not exist in the debian testing repo
[14:38:50] <BlackZ> surial, sun-java6-plugin exist
[14:38:59] * Zharf leaves
[14:39:04] <surial> usicow: log4j is generally taken to be a dumb as nails tool. However, that does sound like something you ought to be able to do. The java logging system (java.util.logger) can definitely do that.
[14:39:31] <surial> BlackZ: Maybe openjdk6 isn't the exact name. Hold on.
[14:39:31] <surial> ~google debian packages
[14:39:31] <javabot> http://www.google.com/search?q=debian+packages
[14:40:09] <surial> It's openjdk-6-jdk
[14:40:18] <surial> ~debian
[14:40:18] <javabot> To get java for debian: sun-java6-jdk or sun-java6-jre on testing (non-free) or http://wiki.serios.net/wiki/Debian_Java_JRE/JDK_installation_with_java-package for stable. For java 5 replace java6 with java5.
[14:40:21] *** TheCastor has quit IRC
[14:40:27] <surial> wow, outdated factoid. fixing...
[14:40:49] *** TooAngel has left ##java
[14:41:07] *** UT2K3 has joined ##java
[14:41:26] <surial> ~no, debian is <reply>To install java on debian: apt-get install openjdk-6-jdk. If you know what you are doing, you can also get sun's from testing(non-free) with sun-java6-jdk. (suffix -jre also works for either). See also http://wiki.serios.net/wiki/Debian_Java_JRE/JDK_installation_with_java-package
[14:41:27] <javabot> Okay, surial.
[14:41:43] <surial> ~ubuntu
[14:41:43] <javabot> See https://help.ubuntu.com/community/Java and try #ubuntu-java. Also Ubuntu is an ancient African word meaning 'I can't configure Debian'.
[14:41:57] <BlackZ> surial, so i should install sun-java6-jre for get java
[14:42:01] <BlackZ> for debian testing
[14:42:02] <BlackZ> right?
[14:42:13] <surial> ~no, ubuntu is <reply>See https://help.ubuntu.com/community/Java and try #ubuntu-java. Also Ubuntu is an ancient African word meaning 'I can't configure Debian'. If you want to install java on ubuntu, ask me about ~debian (same instructions apply to ubuntu).
[14:42:14] <javabot> Okay, surial.
[14:42:17] <surial> BlackZ: No, openjdk-6-jdk
[14:42:25] <surial> or, openjdk-6-jre if you don't care about programming
[14:42:30] <surial> programming in java, that is.
[14:43:32] <BlackZ> surial, sun-java6-jre is for debian testing
[14:43:37] <BlackZ> and i have debian testing xD
[14:43:51] <surial> so is openjdk-6-jre
[14:43:51] <surial> openjdk is the open source version.
[14:44:16] *** dnmo has joined ##java
[14:44:16] <BlackZ> ok now i install it
[14:44:20] *** zacs7 has left ##java
[14:44:31] <surial> and as I said, the future. java on linux is in a limbo - sun's used to be the only one, but since sun open sourced java, development of all of java (not just on linux) continues under the openjdk tree. Hence why you should grab openjdk-6-jre.
[14:44:36] <surial> though they both work.
[14:45:11] *** shadewind has quit IRC
[14:45:29] *** steve-e has joined ##java
[14:46:07] *** Varox has joined ##java
[14:47:26] *** convivial has quit IRC
[14:48:31] *** Junior has joined ##java
[14:49:13] *** BigAllan has quit IRC
[14:49:23] <Junior> .
[14:50:33] *** midbit has quit IRC
[14:50:42] *** mele- has joined ##java
[14:51:06] <BlackZ> surial, done,but not work
[14:51:29] <BlackZ> i have installed sun-java6-jre
[14:51:34] <BlackZ> but not work with firefox
[14:51:59] <soa2ii> surial: http://rafb.net/p/lKY2Me35.html I think this will make you more happier (: But can you help me out at the FIXME?
[14:52:52] <surial> BlackZ: Are you deaf? or blind?
[14:53:02] <surial> BlackZ: Didn't I say you were supposed to install openjdk-6-jre?
[14:53:20] <surial> BlackZ: well, try installing sun-java6-plugin
[14:53:53] <surial> soa2ii: You're calling run() twice.
[14:54:03] <surial> First in the constructor, then AGAIN in main(). Remove it from the constructor.
[14:54:10] <Junior> does anyone has any ideea why this happens -> in eclipse all works fine, no errors, etc etc. when i try to compile i get -> ReportEngine.java:1418: cannot find symbol ...symbol : variable ReportCtl
[14:54:15] <soa2ii> Oh really... silly me :PÜ
[14:54:16] <surial> leave the 'base directory is invalid' in the constructor if you want.
[14:54:16] *** [TechGuy] has joined ##java
[14:54:29] <Junior> the variable name is 100% certain to be correct
[14:54:41] <surial> soa2ii: I don't really understand the problem at your FIXME. elaborate?
[14:55:02] <soa2ii> surial: Well I could have a dir with subdirectories and flac files in it
[14:55:02] <surial> Junior: Yeah. When it's monday, and oyu use the variable name that ends in 'ortCtl', java randomly complains.
[14:55:08] <surial> Junior: Just wait until tomorrow.
[14:55:13] <soa2ii> So I want to compute each dir on its own
[14:55:23] <soa2ii> But take ALL the files just once
[14:55:28] <surial> soa2ii: but that's what you're doing, no?
[14:55:38] <Junior> surial do i have to beleive this ?:))
[14:55:50] <soa2ii> surial: No
[14:55:50] <surial> Junior: No, it was an attempt to hint that your question is not answerable.
[14:55:54] <soa2ii> I take a for loop
[14:55:55] <surial> Junior: Not without a paste of some sort.
[14:55:59] <surial> ~~Junior pastebin
[14:55:59] <javabot> Junior, http://rifers.org/paste Paste the final url after you've pasted your stuff there.
[14:56:08] <soa2ii> so I'll get for example
[14:56:15] <surial> and the eclipse compiler is known to have 'bugs' and 'features' (places where it does not work like javac).
[14:56:15] <Junior> one second
[14:56:17] <soa2ii> dir = 1.flac 2.flac 3.flac
[14:56:40] <soa2ii> 3 times the same file group because the for loop will get each file once
[14:56:46] *** CaptainMorgan has quit IRC
[14:57:14] <surial> You're not making any sense.
[14:57:50] <toader> surial: VisualVM cannot shows the memory size is used for a large collections of objects
[14:59:08] *** usicow has quit IRC
[14:59:46] <toader> it just show the overall heap size used
[15:00:04] *** noob13 has left ##java
[15:00:15] *** TheCastor has joined ##java
[15:01:07] <surial> toader: So, there you go. Run your code in isolation, voila.
[15:01:08] <BlackZ> surial, work thanksssssss
[15:01:13] <surial> BlackZ: You're welcome.
[15:01:24] <surial> BlackZ: In the future, this shit will just come standard with debian :)
[15:01:46] <Junior> the 2 classes (partial) http://rafb.net/p/CDg9MJ91.html and http://rafb.net/p/7uMsRC45.html
[15:02:16] <surial> Which line has the error?
[15:02:28] <Junior> i eclipse no error
[15:02:30] *** kane77 has joined ##java
[15:02:32] <Junior> when i try to compile
[15:02:34] <surial> and in javac?
[15:02:43] <Junior> //ReportCtl.startDocumentPrint( Env.getCtx(), doc_type[0], doc_id[0], true );
[15:02:45] *** level1 has quit IRC
[15:02:50] <Junior> i've commented out
[15:03:00] <Junior> with the comment it compiles successfully
[15:03:05] *** BlackZ has quit IRC
[15:03:10] <surial> How are you compiling? With "javac *.java"?
[15:03:16] <surial> or one file at a time?
[15:03:29] <Junior> [javac] symbol : variable ReportCtl
[15:03:32] <Junior> javac
[15:03:45] <surial> No. You're not just calling "javac". That just prints some help info.
[15:04:20] <Junior> @echo Building ...
[15:04:20] <Junior> @"%JAVA_HOME%\bin\java" -Xms64m -Xmx512m -Dant.home="." %ANT_PROPERTIES% org.apache.tools.ant.Main -logger org.apache.tools.ant.listener.MailLogger complete
[15:04:30] <Junior> @IF ERRORLEVEL 1 goto ERROR
[15:04:53] <surial> uh. okay. Your ant task is failing. Don't you think that would have helped?
[15:04:57] <surial> pastebin your ant task.
[15:06:17] <Junior> hmm
[15:06:25] <Junior> i'm new to java... don't know how to find this
[15:07:24] <cheeser> Junior: don't paste here
[15:07:27] *** csaba has quit IRC
[15:07:50] <Junior> cheeser i've only paste 2 lines
[15:07:52] <Junior> sorry...3
[15:08:07] *** jchauncey has joined ##java
[15:08:09] *** Dracofodder has joined ##java
[15:08:21] <surial> Junior: Okay, so it seems that you're using a build system built by someone else. Why don't you go ask them? They broke it.
[15:08:32] *** LordMetroid has joined ##Java
[15:09:08] <Junior> surial yes. it's build by someone else
[15:09:08] <LordMetroid> Can Java output graphics if the X-server daemon isn't running?
[15:09:13] <Junior> i'm only "customising it"
[15:09:18] <Junior> to fit my needs
[15:09:21] <surial> Junior: Then I suggest you learn all about ant first.
[15:09:23] <cheeser> LordMetroid: output it to where?
[15:09:34] <LordMetroid> The screen I suppose
[15:09:39] <surial> This is a place for asking specific questions. Not a 'please give me a complete lecture and tutorial about build tools'.
[15:09:45] <Junior> i expected this asnwer ...
[15:09:50] <surial> LordMetroid: No, it can't.
[15:09:51] <Junior> but thanks for your time
[15:10:01] <surial> Junior: hint: go to ant.apache.org/manual
[15:10:07] <LordMetroid> ok, thank you...
[15:10:15] <Junior> understood
[15:10:17] <Junior> thanks
[15:10:21] <surial> No problem.
[15:10:27] *** Varox has quit IRC
[15:10:37] <surial> LordMetroid: There might be a special library to directly write to the framebuffer. You'd have to look.
[15:11:03] <surial> LordMetroid: java2d and javafx like to draw on blank canvas without any OS-supplied widgets, so it wouldn't even be that hard. Someone might have written it.
[15:11:03] *** Varox has joined ##java
[15:11:51] <Junior> brb
[15:11:55] *** Junior has quit IRC
[15:12:11] <soa2ii> surial: http://rafb.net/p/geFe0437.html is this nice now? (:
[15:12:45] <surial> looks much nicer. You get a cookie.
[15:13:13] <soa2ii> (:
[15:13:32] *** rollins has joined ##java
[15:13:52] <LordMetroid> surial, you think JOGL could do it maybe?
[15:14:15] <surial> I doubt it, but I can't say for sure.
[15:14:17] <surial> ~jogl
[15:14:17] <javabot> surial, jogl is a JNI binding of the OpenGL 3d Graphics library. Great for 3d games in Java. https://jogl.dev.java.net/
[15:14:29] <surial> Actually, maybe that will work.
[15:15:33] *** jdolan_ has joined ##java
[15:15:46] <LordMetroid> I will try :D
[15:17:38] <toader> surial: what do u mean
[15:17:44] <surial> ~~toader aolbonics
[15:17:44] <javabot> toader, aolbonics is using unnecessary abbreviations such as 'u', 'r', 'ur', 'thx', etc. Using this language depicts you as an imbecile in the eyes of the helpful regulars in this channel, and is generally not tolerated. If you want intelligent answers, the least you can do is speak intelligently. Additionally arguing about this rule will get you nowhere except banned. Have a nice day!
[15:17:58] <surial> toader: Run just your code, nothing else, then check the profiler to see how much heap your entire app just used.
[15:18:10] <surial> though, that will include the base JVM.
[15:18:13] <surial> So do a pre and post check.
[15:18:36] <toader> surial: but it doesnot make sense
[15:20:02] *** javahorn has quit IRC
[15:20:31] *** CrypticS_ has quit IRC
[15:20:41] *** CrypticSquared has quit IRC
[15:20:57] *** durka42 has joined ##java
[15:24:39] *** viperhr has joined ##java
[15:26:55] *** mohax has joined ##java
[15:27:06] <elmomalmo> I have a web app, which presents some information that is generated by some inefficient code. I want to fix the code but it will take a while so I'm after a stop-gap, generic caching solution. Any idea?
[15:28:31] *** alex-c has joined ##java
[15:28:33] *** jtheuer has joined ##java
[15:28:40] <cheeser> buy a faster computer?
[15:28:48] <surial> always a nice stopgap :)
[15:28:48] <alex-c> hi why cant i divide a number by a higher number?
[15:28:58] <surial> alex-c: show your code.
[15:28:58] <cheeser> alex-c: you can do that just fine.
[15:29:01] <surial> ~~alex-c pastebin
[15:29:02] <javabot> alex-c, http://eugeneciurana.com/pastebin Paste the final url after you've pasted your stuff there.
[15:29:10] <elmomalmo> cheeser: lol, it's a VPS
[15:29:11] <cheeser> but if you're doing 1/4, it's because that's integer division
[15:29:16] <surial> alex-c: You're probably trying to divide integers.
[15:29:19] <cheeser> elmomalmo: upgrade the VPS
[15:29:27] <alex-c> int newmuscleMass = muscleMass*(fatfreemass/fatfreemassFirstDM);
[15:29:36] <alex-c> surial i am
[15:29:38] <surial> alex-c: fatfreemass is an int?
[15:29:41] <surial> alex-c cast it to a double first.
[15:29:42] <alex-c> yeah
[15:29:51] <cheeser> is muscleMass a int?
[15:29:52] <Zharf> buying faster box isn't a reason to write inefficient code!
[15:29:53] <surial> an int divided by another int will always produce an int value. So 5/10, is 0.
[15:30:04] <cheeser> Zharf: no one said it is. pay attention.
[15:30:06] <surial> Zharf: He wasn't asking for a reason to write inefficient code. He was asking for a stop-gap.
[15:30:12] <alex-c> i forgot int is not signed
[15:30:22] <jtheuer> Hi folks, I want to include a library which has dependencies that conflict with my classes (different versions with same classnames) what is a good soloution? Use another JVM and RMI or jetty?
[15:30:23] <cheeser> uh. it *is* signed.
[15:30:25] <surial> alex-c: What?
[15:30:38] <surial> alex-c: 1) an int is signed, and 2) being signed or unsigned has zip fuck to do with what kind of division you get.
[15:30:39] <cheeser> jtheuer: different jvms. or osgi.
[15:30:53] <cheeser> i don't see how jetty would solve that problem.
[15:31:10] <alex-c> well i dont understand
[15:31:15] <alex-c> why do i get 0
[15:31:23] <jtheuer> jetty would mean to use http in order to transfer the data
[15:31:24] <surial> okay, an 'int' is an INTEGER. an integral number. It has no fractional part.
[15:31:33] <surial> alex-c: So, 1/4 is 0.25, which gets rounded down to 0.
[15:31:34] <alex-c> oh
[15:31:39] <alex-c> oh ok
[15:31:41] <alex-c> yeah
[15:31:44] <cheeser> 1/4 => 0.25 ===truncated=> 0
[15:31:45] <surial> because in java, dividing an int by an int says to the compiler: please use integer divisoin. which gets you the rounding.
[15:31:49] <alex-c> so stupid of me
[15:31:50] <alex-c> :D
[15:31:56] <cheeser> surial: truncation acutally, i believe
[15:32:05] *** dmlloyd has joined ##java
[15:32:06] <jtheuer> is it possible to form the jvm at runtime? I'd like to start the other process from my main server
[15:32:16] <surial> it doesn't matter if you assign this to a double. So in: double x = (int)5 / (int)10;, x is still 0, because the integer division produces 0, and than that gets assigned to a double, which java will let you do, because going from an int to a double is always 'safe' ( can't lose any precision).
[15:32:23] <surial> cheeser: Rounding by truncating, yes.
[15:32:40] <cheeser> rounding != truncation
[15:32:42] <surial> jtheuer: You can use ProcessBuilder to spawn new processes, but that's somewhat hacky, I'd say.
[15:32:57] <surial> cheeser: Sure it is. It is round via floor for positive numbers, and round via ceil for negative numbers.
[15:33:06] <jtheuer> ok
[15:33:15] <surial> jtheuer: OSGi would probably be a better solution here.
[15:33:25] <cheeser> they are equivalent in many cases. but saying rounding with truncation happens is, at best, misleading.
[15:33:31] <surial> jtheuer: Or any other solution that is based on using a classloader to load 2 different versions of the same code and run it in one jvm.
[15:33:46] <jtheuer> surial: yes, but the project is already at beta, so it might be not worse the effort. But I'll suggest that
[15:33:48] <surial> cheeser: Meh. In this case I don't think the rounding algorithm was relevant. So long as it was obvious that rounding happens.
[15:33:52] *** mele- has quit IRC
[15:33:56] *** Serge_HID has joined ##java
[15:34:03] <jtheuer> another classloader won't help, surial?
[15:34:10] <surial> jtheuer: Yes, it will.
[15:34:10] <cheeser> it *is* relevent because sometimes you'd expect a 1 out of that.
[15:34:23] <LordMetroid> If one does a webstart, can the application that has been started check what version of different libraries are installed on linux, much like a ./configure would do?
[15:34:25] <cheeser> jtheuer: down that path lies pain
[15:34:34] <cheeser> LordMetroid: sure
[15:34:56] <LordMetroid> Okay, nice... thank you cheeser
[15:35:10] <surial> jtheuer: bundling stuff up into OSGi is probably going to be easier, but rolling a classloader isn't too hard either. If you know what you're doing. You get funky situations - "java.lang.String is not compatible with java.lang.String" - those kinds of errors.
[15:35:48] <jtheuer> surial: thanks for the warnings.
[15:35:59] *** hendrixski has joined ##java
[15:36:20] <jtheuer> I guess OSGi uses different classloaders per plugin as well, right?
[15:36:58] <alex-c> thanks for your help guys
[15:37:16] <alex-c> and or girls
[15:37:18] <alex-c> :D
[15:37:24] *** hoerup has quit IRC
[15:38:43] <elmomalmo> another question about caching, is storing the generated values in a ThreadLocal variable a bad idea?
[15:38:58] *** randoms has joined ##java
[15:39:19] *** deepjoy has quit IRC
[15:40:23] <randoms> hi. ive created a commandline program in C++ that just waits for input. when it gets input it does whatever and waits for a new input. there is no load when i run the program direct from the command line in windows. but when i try to execute it from java with Runtime.getRunTime().exec() it uses all my cpu for some reason. any idea why?
[15:40:32] <elmomalmo> well, it's not causing exclamations of horror and disgust so it can't be that bad
[15:40:44] * elmomalmo implements ThreadLocal caching
[15:43:27] *** ^Migs^ has joined ##java
[15:43:28] <randoms> 97% CPU load is bad :>
[15:43:29] *** pschriner has quit IRC
[15:44:25] <W_work> randoms, what uses your CPU load? The C++ program or the Java process?
[15:44:34] *** bindaas has quit IRC
[15:46:11] *** derjohn has quit IRC
[15:47:21] <ramdam> has anyone done java and bluetooth apps?
[15:47:38] <surial> on jse?
[15:47:40] <ramdam> i have these packages but don't know where to put them or what to do with them...
[15:48:28] <surial> jtheuer: Yes, OSGi will automatically sort stuff out, and uses classloaders to manage it. You specify librarys you need (and their versions) per plugin, and if there are conflicting plugins, OSGi will solve the issue using classloaders.
[15:48:43] <cheeser> "module" not "plugin"
[15:48:44] <surial> elmomalmo: YOu have to weigh the memory load of caching against the CPU load of recalculating.
[15:48:59] <surial> er, yeah, module, not plugin. Too much eclipse usage.
[15:49:10] <surial> ramdam: On jse or jme?
[15:49:27] <ramdam> surial, umm, let me find out
[15:49:48] <surial> ramdam: As far as spawning off processes is concerned, consider using ProcessBuilder, and make sure you do something with the resulting Process's Input and Output streams.
[15:50:03] <surial> jse = java standard edition. For desktops. jme = java micro? edition. That's on mobile phones.
[15:50:13] <ramdam> oh
[15:50:14] <ramdam> se
[15:50:15] <surial> I'm fairly sure that bt support is built into jme, but I doubt it's there on jse.
[15:50:23] <surial> ~bluetooth
[15:50:24] <javabot> surial, I have no idea what bluetooth is.
[15:50:31] <elmomalmo> surial: yeah, I don't think memory will be a problem. It's a relatively small amount of data. I have one concern which is how many threads/processes runs within the servlet container and therefore how effective the ThreadLocal caching will be
[15:50:55] * elmomalmo now looking at ehcache as an option
[15:50:56] <ramdam> surial, that's the problem, i got a few packages and they have .java and .class files in them but i don't know where to put them
[15:50:57] <surial> Why not just stuff it into a static variable?
[15:51:29] <surial> If you've got loads to cache, check out memcache or ehcache or any other more robust caching mechanism, but if you just have a few small values...
[15:51:37] <toader> surial: do u think if i serize these objects to files, and then the files size is equaled to the size of objects in memory. Do u think if it works?
[15:51:47] <ramdam> ~javabluetooth
[15:51:48] <javabot> ramdam, I have no idea what javabluetooth is.
[15:51:48] <elmomalmo> surial: Hmmm... yeah that would be a simple solution
[15:51:56] <ramdam> ~bluez
[15:51:57] <javabot> ramdam, I have no idea what bluez is.
[15:52:06] <surial> ~~toader aolbonics
[15:52:06] <javabot> toader, aolbonics is using unnecessary abbreviations such as 'u', 'r', 'ur', 'thx', etc. Using this language depicts you as an imbecile in the eyes of the helpful regulars in this channel, and is generally not tolerated. If you want intelligent answers, the least you can do is speak intelligently. Additionally arguing about this rule will get you nowhere except banned. Have a nice day!
[15:52:13] <surial> That's the second time I need to tell you to stop using aolbonics.
[15:52:14] <ramdam> ~bluecove
[15:52:14] <javabot> ramdam, I have no idea what bluecove is.
[15:52:19] <ramdam> ~blue cove
[15:52:19] <javabot> I guess the factoid 'blueboobies' might be appropriate:
[15:52:21] <javabot> ramdam, blueboobies is http://animals.about.com/od/habitatprofiles/ig/Animals-of-the-Galapagos/Blue-Footed-Boobie.htm
[15:52:22] <ramdam> damn
[15:52:28] <surial> and, no, the output of serializing is larger than the memory footprint, in general.
[15:52:42] *** convivial has joined ##java
[15:52:48] <surial> oh come on, blue boobies have got to be better than blue cove. Whatever blue cove is.
[15:53:04] <ramdam> blue cove is one of the stacks i have downloaded
[15:53:06] *** ^Migs^ has left ##java
[15:53:14] <ramdam> it just don't know what to do with it
[15:53:27] <ramdam> why can't i just dump the files in java's library folder
[15:53:27] <JavaGeek> ~google blue cove
[15:53:27] <javabot> http://www.google.com/search?q=blue+cove
[15:53:28] *** thnee has joined ##java
[15:53:44] <ramdam> http://bluecove.org/
[15:54:03] <thnee> isnt request.getParameter("playUrl") in a scriplet supposed to be the same as ${requestScope.playUrl} ?
[15:54:22] *** rgravener has joined ##java
[15:55:54] <elmomalmo> thnee: nope, requestScope gives you the objects set via request.setAttribute
[15:56:08] <alex-c> does converting a double to int do the same rounding as Math.round() ?
[15:56:28] <elmomalmo> thnee: you're after ${param.playUrl}
[15:56:33] <cheeser> it truncates
[15:56:35] <cheeser> ~tias
[15:56:35] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[15:57:15] <alex-c> can i experiment javainstructions on the commandline?
[15:57:20] <rgravener> if i wanted to have the user send his username/password for each request, what is the best way to secure them without using ssl
[15:57:25] <alex-c> ass arguments to javac or something?
[15:57:35] <rgravener> i figure i would request a token then hash on the client and hash check that result against the hash of the server
[15:57:43] <alex-c> or do i have to make a class and everything
[15:57:46] *** jeukku has joined ##java
[15:57:52] <rgravener> are there any java implementations of this already? the problem is i'm using a j2me so the connection will be shoddy
[15:57:58] *** squi has quit IRC
[15:59:32] <surial> ramdam: That's not how you do library management. Set up your main app's classpath so it uses bluecove's jars.
[15:59:41] <ayrnieu> with a non-blocking server I get java.nio.channels.SelectionKey and, for .isAcceptable()s, I .accept() them -- which makes the 'non-blocking server' appropriately block when I next tell it to .select(). What can I do to .isReadable() SelectionKeys to make them not immediately reappear in the next .select() ?
[16:00:03] <surial> alex-c: Sort of. Download groovy or beanshell.
[16:00:05] <thnee> elmomalmo: oh, but i am not, what about the other way around? param.getParameter() ?
[16:00:12] <surial> alex-c: Also, eclipse and a few other IDEs have a scratchpad kind of deal.
[16:00:36] <surial> rgravener: Yes, it's called bcrypt.
[16:00:40] *** derjohn has joined ##java
[16:00:42] <surial> ~~rgravener bcrypt
[16:00:42] <javabot> rgravener, bcrypt is the right tool to use to hash up passwords. See http://www.mindrot.org/projects/jBCrypt/
[16:00:44] <thnee> elmomalmo: see, it's the ${requestScope.playUrl} that gives me what i want
[16:00:44] <rgravener> thanks
[16:00:50] <cheeser> ~bcrypt++
[16:00:51] <surial> but hashing on the client?
[16:00:51] <javabot> bcrypt has a karma level of 1, cheeser
[16:00:51] *** Fox_1_ has joined ##java
[16:00:53] <surial> Uh... you can try.
[16:01:02] <rgravener> cheeser: have you used it?
[16:01:10] <cheeser> i have
[16:01:15] <elmomalmo> thnee: therefore, I'm confues and I'm not sure what ypu're question is :-)
[16:01:22] <Fox_1_> people please suggest me the XML parser. which is better and faster?
[16:01:28] <surial> But if your project isn't worth the 100 bucks for an ssl cert, then I somewhat doubt you have to go to that kind of length. Not to mention that whatever you do, it won't be nearly as secure as SSL, because any attempt to hash stuff on the client needs javascript, and a MitM can just change that.
[16:01:42] * elmomalmo stares in disbelief at his fat fingers
[16:01:55] <cheeser> certs are free fwiw.
[16:01:57] *** Afterlawl has quit IRC
[16:01:59] <ramdam> surial, i am new to java, could you give me a direction on how i can add a directory to the classpath of my main class?
[16:02:04] <cheeser> you only have to pay if you want one from a "trusted" source
[16:02:06] <surial> ~~ramdam classpath
[16:02:06] <thnee> elmomalmo: let me rephrase: how do i get ${requestScope.playUrl} in scriptlet code?
[16:02:06] <javabot> ramdam, The classpath tells Java or the compiler in which jar files and folders to look for classes. Use the -cp/-classpath run-time options to specify the classpath. Also see http://java.sun.com/javase/6/docs/technotes/tools/solaris/classpath.html and http://mindprod.com/jgloss/classpath.html
[16:02:16] <surial> cheeser: You're in a pedantic mood today.
[16:02:23] <cheeser> today?
[16:02:25] <cheeser> P^)=
[16:02:37] <surial> Yes. Perhaps I should say (to be pedantic): You're even more pedantic than usual today.
[16:02:42] <cheeser> i've always just done my own certs.
[16:02:42] <surial> ~~Fox_1_ xml
[16:02:42] <javabot> Fox_1_, xml is http://www.w3.org/XML - XML stands for "eXtensible Markup Language". It looks a bit like HTML except that you can define whatever tag you want. Used to store hierarchical data of any kind into a standard format. See "xml parsing" for how to write or parse XML.
[16:02:48] <surial> ~~Fox_1_ xml parsing
[16:02:48] <javabot> Fox_1_, xml parsing is best accomplished with one of - XOM @ http://www.xom.nu/ - JAXB @ http://java.sun.com/xml/jaxb/ - JDOM @ http://www.jdom.org/ - XmlMap @ http://tinyurl.com/3pjxjn - JAXP (including StAX as well as the legacy SAX and DOM) @ https://jaxp.dev.java.net/
[16:02:49] <ayrnieu> ... nevermind. For some reason I thought that reading them was not doing it.
[16:03:06] <surial> Fox_1_: That list is mostly in order of preference.
[16:03:32] <elmomalmo> thnee: If you've set playUrl as an attribute of the page, request or the pag you should be able to just use ${playUrl} to get the value
[16:03:43] <Fox_1_> so, xom is the best?
[16:03:51] <cheeser> i tend to use dom4j
[16:04:24] <Fox_1_> ~~cheeser xom
[16:04:24] <javabot> cheeser, XOM is a high-performance XML object model for Java, at http://www.xom.nu - it has the advantage of being designed by and for programmers, and actually does a much better job than DOM4J or JDom.
[16:04:49] <cheeser> Fox_1_: i know what xom is
[16:04:56] <elmomalmo> thnee: If it's set as a parameter on the request you should be able to use ${param.playUrl}
[16:05:19] <Fox_1_> cheeser: I wrote for this "... and actually does a much better job than DOM4J or JDom."
[16:05:24] <alex-c> surial thanks for the advice im trying to locate the scratchpad you mention in myeclipse.. do you know where to locate it in eclipse
[16:05:40] <cheeser> Fox_1_: i've read it
[16:06:12] *** cambazz has left ##java
[16:06:28] <surial> alex-c: File, New... (search for 'scrapbook page').
[16:06:35] <surial> I haven't actually used that, but I assume it makes it easy to run snippets.
[16:07:48] *** ridoo has quit IRC
[16:09:48] *** ridoo has joined ##java
[16:10:12] *** [TechGuy] has quit IRC
[16:11:17] *** romanb has quit IRC
[16:12:01] *** jeukku has quit IRC
[16:14:21] *** phyburn has quit IRC
[16:16:51] *** nihi|ist has joined ##java
[16:18:28] *** randoms has quit IRC
[16:19:56] *** ridoo has quit IRC
[16:21:12] *** ofl_ has joined ##java
[16:21:51] *** armyriad has joined ##java
[16:23:32] *** Bevin has quit IRC
[16:24:22] *** durka42 has quit IRC
[16:25:51] *** jivedude has quit IRC
[16:29:28] *** Bevin has joined ##java
[16:29:30] *** Fox_1_ has quit IRC
[16:32:50] *** bhushanvmishra has joined ##java
[16:33:12] *** ScottG489 has joined ##java
[16:33:32] *** Serge_HID has quit IRC
[16:33:44] <bhushanvmishra> hi all, i am using jdk1.5 at command prompt when i type javac it will show following message
[16:34:18] <cheeser> ~pastebin
[16:34:18] <javabot> http://rifers.org/paste Paste the final url after you've pasted your stuff there.
[16:34:27] *** epalm has joined ##java
[16:34:57] *** bushwakko has quit IRC
[16:40:06] <jchauncey> morning
[16:40:37] *** ScottG489 has quit IRC
[16:40:49] <cheeser> ojacobson: how do I set mavent to skip tests in settings.xml? i found an example that creates a profile but I'm not sure i want to go that route.
[16:40:59] <ojacobson> create a profile
[16:41:13] <ojacobson> in the profile, set either <skipTests> or <maven.tests.skip>true
[16:41:25] <ojacobson> make profile active (either by default, by groupId, or manually)
[16:41:30] <cheeser> yeah. bummer. 8^)=
[16:41:40] <cheeser> i suppose i could just set MAVEN_OPTS, too.
[16:41:46] <ojacobson> yeah, there is that
[16:41:53] <ojacobson> I don't like that option much but it's there :)
[16:42:00] <ojacobson> JAVABOT-16!
[16:42:05] <ojacobson> then this is less of an issue
[16:42:17] <cheeser> well, this is on the server that runs the bot. i dont' want to run tests there.
[16:42:52] <jchauncey> cheeser: i thought you didnt like maven? =)
[16:43:00] <cheeser> i don't
[16:43:01] <cheeser> 8^)=
[16:43:23] <cheeser> jchauncey: http://www.antwerkz.com/how-best-to-prepare-and-serve-crow/
[16:43:49] <ojacobson> cheeser: re finding out what targets a POM offers, the reason a maven dev couldn't answer that is because the question is meaningless from maven's point of view
[16:43:55] <ojacobson> the answer is "all of them"
[16:44:00] *** ijuma has quit IRC
[16:44:13] <cheeser> ojacobson: well, sort of.
[16:44:16] <ojacobson> there's a standard lifecycle that should REALLY be better-documented; I keep a copy of the plexus config files that define it
[16:44:26] <ojacobson> specifically so I can go look up what goals the lifecycle in use has
[16:44:34] <cheeser> that's my point
[16:44:34] <cheeser> 8^)=
[16:44:36] <ojacobson> and what plugin targets they're bound to
[16:44:48] *** soa2ii has quit IRC
[16:44:57] <bhushanvmishra> hi all, i am using jdk1.5 at command prompt when i type javac it will show following message
[16:44:59] <cheeser> sometimes it's handy to invoke those plug-ins directly
[16:45:07] <cheeser> ~tell bhushanvmishra about repeating
[16:45:07] <javabot> bhushanvmishra, Please don't repeat yourself, it annoys people and rarely produces results. Try rephrasing or, failing that, come back in a good while when there are different people here. Meanwhile, google is your friend.
[16:45:11] *** mohax has quit IRC
[16:45:18] <ojacobson> in which case the answer really *is* "all of them", but doing 'mvn install' will list off the goals as it goes
[16:45:20] *** buntfalke has joined ##java
[16:45:23] <cheeser> and try sharing the error instead of just telling us about it.
[16:45:24] *** mohax has joined ##java
[16:45:25] <ojacobson> in [plugin:target] format
[16:45:38] <cheeser> ojacobson: now see, that's an interesting and helpful tip.
[16:45:41] <ojacobson> :)
[16:45:43] <ojacobson> I have many
[16:45:44] <cheeser> this guy didn't even have that tidbit
[16:45:45] <cheeser> 8^)=
[16:45:50] <ojacobson> I have looked at the maven code
[16:45:55] <ojacobson> there is a reason all of their developers are morons
[16:46:00] <cheeser> but it just shows how poorly executed maven is.
[16:46:01] <ojacobson> I am not willing to develop maven :)
[16:46:22] <bhushanvmishra> http://pastebin.com/d568d690f
[16:46:29] <ojacobson> yeah
[16:46:49] <ojacobson> if I had infinite spare time I'd write a compatible tool that didn't suck
[16:47:09] <cheeser> i've debated resurrecting gosling
[16:47:20] <cheeser> but i have too mean dreams in the fire.
[16:47:25] <ojacobson> on the balance, central is compelling enough in combination with the things maven does right to make up for the things it does wrong
[16:47:25] <cheeser> i mean, irons. P^)=
[16:48:00] <waz> hah
[16:48:04] <cheeser> ojacobson: a tool that worked with central would be ideal. support for running ant and maven tasks with less "native" dainbramage would be awesome
[16:48:24] <ojacobson> *nod*
[16:48:40] <ojacobson> useful tidbit: you can write maven plugins using ant. There's a gross amount of legalese involved, but it works.
[16:48:47] <userek> ~HttpClient
[16:48:48] <javabot> userek, HttpClient is a deprecated http client package for Java by Jakarta. It can be found at http://hc.apache.org/httpclient-3.x/index.html - note that it has dependencies like commons-codec, commons-logging, and possibly the other 18,000 jakarta dependencies that tend to accompany any single jakarta lib. Otherwise, great stuff. See ~httpcomponents for more current stuff.
[16:48:48] <cheeser> bhushanvmishra: you're not using java. you're using kaffe. install sun's vm and try again.
[16:48:48] *** jabalsad has joined ##java
[16:48:58] <ojacobson> Whoa, people use kaffe?
[16:48:59] <cheeser> ojacobson: yeah
[16:49:07] <userek> ~httpcomponents
[16:49:07] <javabot> userek, httpcomponents is http://hc.apache.org/httpcomponents-client - the current version of Apache's HTTP client for Java. More modular than httpclient 3.x was, and *probably* more multithread-friendly.
[16:49:10] <cheeser> we use ant tasks from maven in the glassfish build.
[16:49:15] <cheeser> makes me weep everytime I think about it.
[16:49:16] <ojacobson> via antrun or as plugins?
[16:49:22] <cheeser> not sure.
[16:49:28] <ojacobson> antrun is an attractive bad idea
[16:49:38] <ojacobson> plugins-in-ant are morally pretty neutral
[16:49:48] <ojacobson> (antrun lets you stuff ant snippets into pom.xml)
[16:49:48] <cheeser> a bandaid on an amputated limb
[16:50:09] <userek> As far as i can see it stil depends on common-logging
[16:51:16] *** nikki93 has joined ##java
[16:51:17] <JavaGeek> cheeser: well, maven has to support 'legacy' code... ;)
[16:51:24] *** nikki93 has left ##java
[16:51:40] <ojacobson> JavaGeek: you wouldn't know that from talking to maven dudes
[16:51:52] <cheeser> or the surefire guys
[16:51:52] <cheeser> 8^)=
[16:51:56] <ojacobson> *twitch*
[16:53:17] *** gdoko has quit IRC
[16:53:47] <ojacobson> cheeser: and then there's http://www.php-maven.org/
[16:54:36] *** javabot has quit IRC
[16:55:57] *** sombriks has joined ##java
[16:56:04] <jchauncey> i like the idea of maven
[16:56:09] *** DJGummikuh has quit IRC
[16:56:17] <jchauncey> it just seems too complicated for me to actually want to sit down and learn it
[16:56:20] *** toader has quit IRC
[16:56:42] <bhushanvmishra> cheeser how can i solve this problem?, i will get sun's vm but i must solve this problem first
[16:57:34] *** Resistance has quit IRC
[16:57:49] *** bigip has quit IRC
[16:58:40] <waz> depends on your project
[16:59:16] *** BigAllan has joined ##java
[17:01:24] <cheeser> bhushanvmishra: you solve it by using java or asking in a kaffe channel.
[17:01:48] <bhushanvmishra> ok......thanks
[17:03:09] *** JGarrido has joined ##java
[17:03:09] *** mgenov has quit IRC
[17:04:15] *** kungen has quit IRC
[17:05:08] *** BigAllan has quit IRC
[17:08:38] *** caverdude has joined ##java
[17:09:35] <caverdude> hi
[17:11:20] *** ijuma has joined ##java
[17:12:49] *** pstickne has joined ##java
[17:13:00] *** romanb has joined ##java
[17:13:06] *** javabot has joined ##java
[17:13:12] <cheeser> javabot: wb
[17:13:31] <javabot> Thank you, cheeser.
[17:13:34] <cheeser> ~ping
[17:13:34] <javabot> Pong
[17:13:37] <cheeser> ~version
[17:13:37] <javabot> cheeser, I have no idea what version is.
[17:13:42] <cheeser> ~stats
[17:13:42] <javabot> cheeser, I have no idea what stats is.
[17:13:45] <cheeser> hrm.
[17:13:49] <cheeser> ~admin listOperations
[17:13:49] <javabot> I know of the following operations:
[17:13:50] <javabot> AolBonics, DaysToChristmas, DaysUntil, Dict, ForgetFactoid, Google, Ignore, Info, Javadoc, JSR, KarmaChange, KarmaRead, Leave, Literal, Magic8Ball, Nickometer, Quit, Say, Seen, SpecialCases, Stats, Tell, Time, Shun, UnixCommand
[17:13:51] <surial> wb?
[17:13:51] <javabot> I am currently running the following operations:
[17:13:53] <javabot> use admin enableOperation or disableOperation to turn operations on or off
[17:13:57] *** morkar- has quit IRC
[17:13:59] <cheeser> oooh.
[17:14:03] *** Yustme has joined ##java
[17:14:14] <cheeser> time to enable some operations 8^)=
[17:15:01] <surial> ~wikitest foo bar
[17:15:02] <javabot> surial, I have no idea what wikitest foo bar is.
[17:15:14] *** convivial has quit IRC
[17:15:56] <cheeser> that's not in yet
[17:16:16] <surial> :(
[17:16:21] <surial> ~forget wikitest $+
[17:16:28] <cheeser> ~admin listOperations
[17:16:38] <javabot> surial, I have no idea what forget wikitest $+ is.
[17:16:40] <javabot> I know of the following operations:
[17:16:42] <javabot> AolBonics, DaysToChristmas, DaysUntil, Dict, ForgetFactoid, Google, Ignore, Info, Javadoc, JSR, KarmaChange, KarmaRead, Leave, Literal, Magic8Ball, Nickometer, Quit, Say, Seen, SpecialCases, Stats, Tell, Time, Shun, UnixCommand
[17:16:43] <JavaGeek> javabot spam--
[17:16:44] <javabot> I am currently running the following operations:
[17:16:46] <javabot> Google, Info, Javadoc, JSR, KarmaChange, KarmaRead, Leave, Literal, Magic8Ball, Say, Seen, SpecialCases, Stats, Tell, Shun, UnixCommand
[17:16:50] <javabot> use admin enableOperation or disableOperation to turn operations on or off
[17:16:50] <cheeser> ~javadoc String
[17:16:52] <javabot> spam has a karma level of -2, JavaGeek
[17:16:54] <javabot> cheeser: [java.lang.String]
[17:17:03] <cheeser> hrm. that's not right!
[17:17:03] <cheeser> 8^)=
[17:17:09] <surial> oh, right, the slow javadoc indexing thing.
[17:17:11] * cheeser eyes his unit tests
[17:17:22] <cheeser> surial: nope. there's no javadoc indexing involved.
[17:17:28] <surial> Is this pure genius or slightly insane? http://code.google.com/p/lambda4jdt/wiki/HowToMakeItWork
[17:17:29] <cheeser> at least not by the bot
[17:17:51] *** morkar- has joined ##java
[17:18:57] *** Resistance has joined ##java
[17:19:31] <cheeser> ~javadoc -list
[17:19:32] * AMcBain is sad ... his last website backup is toast.
[17:19:42] <AMcBain> unfortunately that's the one I want :-/
[17:20:49] <bhushanvmishra> i am using mandriva 2008.1 if i install 'java-1.6.0-sun-devel' does it mean that i got jdk 1.6
[17:21:23] <cheeser> java -version will tell you
[17:21:54] *** nwmcsween has quit IRC
[17:22:17] *** Goundy has joined ##java
[17:23:37] <cheeser> ~javadoc String
[17:23:50] *** LostMonarch has joined ##java
[17:23:58] <cheeser> hrm. still serializing requests. I thought I'd fixed that...
[17:24:10] * cheeser waits for the bot to finish
[17:24:52] <drichards> quit
[17:25:00] *** drichards has quit IRC
[17:25:08] <bhushanvmishra> thanks
[17:25:27] *** spideryummy has joined ##java
[17:25:50] *** sombriks has quit IRC
[17:26:14] *** bhushanvmishra has left ##java
[17:27:20] <spideryummy> how do i execute a native program using ProcessBuilder(), in such a way that my calling Java app won't block and wait for the native app to finish??
[17:28:42] *** mazzachre has quit IRC
[17:29:13] *** AMcBain has quit IRC
[17:31:16] *** bhushanvmishra has joined ##java
[17:31:44] <javabot> cheeser, I know of the following APIs: JDK JSF1.2_MR1 Wicket1.3
[17:31:45] <javabot> cheeser: http://is.gd/6UoM [java.lang.String]
[17:31:49] * cheeser nods.
[17:31:55] <cheeser> w00t
[17:32:34] <ojacobson> ~shun r0bby
[17:32:35] <javabot> r0bby is shunned until 2009/02/02 11:38:28.
[17:32:38] <ojacobson> sweet
[17:32:49] <cheeser> heh
[17:32:54] *** deSilva has quit IRC
[17:33:04] *** convivial has joined ##java
[17:33:41] <ojacobson> nice work on the javadoc stuff :)
[17:33:45] <ojacobson> Is it runnint outside jetty now?
[17:34:08] *** Gracenotes is now known as Gracenotes_away
[17:34:52] <ojacobson> interesting... the logs show bot replies *before* bot messages
[17:36:50] *** Ivellina has joined ##java
[17:37:31] <cheeser> yeah
[17:37:39] *** bhushanvmishra has quit IRC
[17:37:44] <cheeser> yeah. this is the bot running from mvn exec:java
[17:37:48] <cheeser> ~stats
[17:37:48] <javabot> I have been up for 0 days, have served 19 messages, and have 3849 factoids.
[17:37:54] <cheeser> ~help
[17:37:54] <javabot> cheeser, I have no idea what help is.
[17:37:59] <cheeser> ~about
[17:37:59] <javabot> for a FAQ and a quick tutorial on how to use javabot, see: http://javachannel.net/wiki/pmwiki.php/FAQ/Javabot
[17:38:10] <cheeser> hrm. i forget how to show the version of the bot.
[17:38:10] <cheeser> 8^)=
[17:38:20] *** MacGyverNL has quit IRC
[17:38:52] *** MacGyverNL has joined ##Java
[17:38:57] <ojacobson> hmm
[17:39:09] <ojacobson> ~version
[17:39:09] <javabot> ojacobson, I have no idea what version is.
[17:39:46] *** pstickne has quit IRC
[17:40:16] *** Goundy has quit IRC
[17:40:21] *** spideryummy has quit IRC
[17:40:34] *** nomoa has joined ##java
[17:40:49] *** Goundy has joined ##java
[17:41:36] *** yhuang has quit IRC
[17:42:10] <nomoa> Hi, is there any (sort of standard) comment meta-data that could help editor/developper to determine the .java files encoding?
[17:42:15] <ojacobson> I should cook up a bundle that's runnable with java -jar javabot.jar
[17:42:15] <cheeser> ~ping
[17:42:23] <cheeser> hrm.
[17:42:30] *** AMcBain has joined ##java
[17:42:38] *** thegraham has joined ##java
[17:42:48] <ojacobson> nomoa: no. Detecting encoding is error-prone at best, unfortunately. Pick one and use it (UTF-8 is a good one).
[17:42:51] *** javabot has quit IRC
[17:44:04] <nomoa> ojacobson: ok thanks
[17:44:23] *** Frostix has quit IRC
[17:44:24] *** javabot has joined ##java
[17:44:38] *** igordcard has joined ##java
[17:45:10] <cheeser> ~ping
[17:45:11] <javabot> You rang, m'lord?
[17:45:11] *** igordcard has quit IRC
[17:45:59] *** acuster has joined ##java
[17:47:12] *** Carnage\ has quit IRC
[17:47:52] <caverdude> hehe
[17:48:10] <caverdude> hi cheeser hows Denver?
[17:48:14] <caverdude> snowy?
[17:49:30] <cheeser> no idea. i live in NYC
[17:49:32] <cheeser> 8^)=
[17:50:52] *** Bevin has quit IRC
[17:53:15] *** UT2K3 has quit IRC
[17:53:31] *** Varox has quit IRC
[17:55:18] *** nomoa has quit IRC
[17:56:28] *** TooAngel has joined ##java
[17:56:35] <jchauncey> do you live in a cardboard box?
[17:56:47] <jchauncey> because i cannot imagine how much it costs to live in NYC
[17:57:11] <pr3d4t0r> jchauncey: About the same as in SF, but with higher population density/mi^2.
[17:57:12] *** TooAngel has left ##java
[17:57:19] <jchauncey> haha
[17:57:40] *** alex-c has quit IRC
[17:57:45] *** artz22 has joined ##java
[17:57:49] <artz22> hi everyone
[17:58:10] <artz22> i'm having some problems with netbeans form editor. It seems to be that sync got lost between the editor and a source file, is there a way to recover that?
[17:59:00] *** LordMetroid has quit IRC
[17:59:45] <cheeser> try ##netbeans
[17:59:48] *** dpy has quit IRC
[17:59:48] *** cyth has joined ##java
[18:00:08] <artz22> thanks cheeser
[18:00:41] <cheeser> ~seen ojacobson
[18:00:41] <javabot> cheeser, I have no idea what seen ojacobson is.
[18:00:45] * cheeser sighs
[18:00:52] <cheeser> ~admin listOperations
[18:00:52] <javabot> I know of the following operations:
[18:00:53] <javabot> AolBonics, DaysToChristmas, DaysUntil, Dict, ForgetFactoid, Google, Ignore, Info, Javadoc, JSR, KarmaChange, KarmaRead, Leave, Literal, Magic8Ball, Nickometer, Quit, Say, Seen, SpecialCases, Stats, Tell, Time, Shun, UnixCommand
[18:00:54] <javabot> I am currently running the following operations:
[18:00:56] <javabot> use admin enableOperation or disableOperation to turn operations on or off
[18:01:03] * cheeser sighs.
[18:01:10] <dmlloyd> ~nickometer cheeser
[18:01:10] <javabot> dmlloyd, I have no idea what nickometer cheeser is.
[18:01:13] <dmlloyd> :(
[18:02:14] <jchauncey> ~Nickometer cheeser
[18:02:14] <javabot> jchauncey, I have no idea what Nickometer cheeser is.
[18:02:25] <jchauncey> doh javabot is broked
[18:03:55] <ojacobson> ~info ping
[18:03:55] <javabot> I have no information regarding 'ping'
[18:04:06] *** ankylose has quit IRC
[18:04:09] *** artz22 has left ##java
[18:05:51] *** marvs has joined ##java
[18:05:54] *** javabot has quit IRC
[18:06:45] *** javabot has joined ##java
[18:07:06] <ojacobson> cheeser: now why would it ForgetFuckingEverything?
[18:07:37] <cheeser> because the operations table was in the old format
[18:07:41] <cheeser> ~admin listOperations
[18:07:41] <javabot> I know of the following operations:
[18:07:42] <javabot> AolBonics, DaysToChristmas, DaysUntil, Dict, ForgetFactoid, Google, Ignore, Info, Javadoc, JSR, KarmaChange, KarmaRead, Leave, Literal, Magic8Ball, Nickometer, Quit, Say, Seen, SpecialCases, Stats, Tell, Time, Shun, UnixCommand
[18:07:43] <javabot> I am currently running the following operations:
[18:07:44] <javabot> Dict, ForgetFactoid, Google, Info, JSR, Javadoc, KarmaChange, KarmaRead, Leave, Literal, Magic8Ball, Quit, Say, Seen, SpecialCases, Stats, Tell, UnixCommand
[18:07:45] <javabot> use admin enableOperation or disableOperation to turn operations on or off
[18:07:47] <cheeser> ~seen ojacobson
[18:07:49] <javabot> cheeser, ojacobson was last seen at 2/2/09 12:08 PM with the following entry: cheeser: now why would it ForgetFuckingEverything?
[18:07:52] <cheeser> 8^)=
[18:07:56] <cheeser> ~javadoc -list
[18:07:56] <javabot> cheeser, I know of the following APIs: JDK JSF Wicket
[18:07:57] <ojacobson> hot
[18:07:59] <cheeser> that's better.
[18:08:00] *** thegraham has quit IRC
[18:08:09] <ojacobson> Any word on ~javadoc Servlet?
[18:08:13] <ojacobson> ~javadoc Servlet
[18:08:13] <javabot> I don't know of any documentation for Servlet
[18:08:25] <surial> ~alljavadoc Servlet
[18:08:26] <javabot> http://myjavadoc.net/search/search-java.php/Servlet
[18:08:26] <surial> :)
[18:08:40] <surial> What would nickometer do?
[18:08:48] <ojacobson> lame, lame things
[18:09:03] <surial> those are the bestest!
[18:09:14] <AMcBain> surial: rates your nick name according to the types of characters that compose it. it was eventually limited to PM only, iirc.
[18:09:22] *** alek_b has joined ##java
[18:09:27] <surial> okay, fine, that's pretty lame.
[18:10:01] *** ijuma has left ##java
[18:12:05] <cheeser> it's why it's turned off
[18:12:06] <cheeser> 8^)=
[18:12:37] *** jabalsad has quit IRC
[18:12:47] *** ayrnieu has quit IRC
[18:12:55] *** jabalsad has joined ##java
[18:13:07] *** ayrnieu has joined ##java
[18:13:17] *** ldam has quit IRC
[18:14:47] *** _stack has joined ##java
[18:15:00] *** dnmo has quit IRC
[18:16:35] *** xabbuh has quit IRC
[18:16:35] *** jtheuer has quit IRC
[18:17:05] *** agnul has quit IRC
[18:20:34] *** surial has quit IRC
[18:20:59] *** wtfzz has joined ##java
[18:21:28] <pr3d4t0r> sproingie: You're a patient one some times.
[18:21:49] <pr3d4t0r> sproingie: I'd smacked Trollinator with a 2x4 for much less :)
[18:21:50] <sproingie> i've been called many things but patient
[18:22:21] <sproingie> probably why i don't have ops. my banhammer is well-dented.
[18:22:55] <pr3d4t0r> sproingie: Heh.
[18:23:06] <pr3d4t0r> javabot: sproingie++
[18:23:06] <javabot> sproingie has a karma level of 18, pr3d4t0r
[18:23:13] *** FMJaguar has quit IRC
[18:23:28] <mahogny> does anyone know of work on proper metaprogramming support in java?
[18:23:36] <caverdude> bbl
[18:24:13] *** Goundy has quit IRC
[18:24:52] <sproingie> can javac even properly support metaprogramming?
[18:25:23] *** Razec has joined ##java
[18:25:26] <sproingie> there's annotation processors, but i don't know how much reflection they can do at at compile time
[18:25:36] <mahogny> well, I have a proposal I would like to send in on how to do it if none has already attempted
[18:25:44] <sproingie> i suspect bytecode mungers at load time would be the best bet
[18:25:46] <mahogny> reflection can't do this
[18:25:57] *** jottinger has joined ##java
[18:26:01] <mahogny> bcel is the current way but it's rather useless in many cases
[18:26:16] <mahogny> good enough for AOP and RMI but that's about it
[18:26:28] *** jottinger has quit IRC
[18:26:34] <sproingie> bcel can technically do anything at all
[18:26:50] <sproingie> other than play nice with other classloaders that is
[18:27:05] *** bas-i has quit IRC
[18:27:14] <sproingie> javassist might work better for you
[18:28:00] *** nihilis7 has joined ##java
[18:28:03] <mahogny> I'd like to work on java source code level though
[18:28:13] *** nihi|ist has quit IRC
[18:28:26] <mahogny> my needs are in new syntax and high level rewriting for optimizations
[18:28:30] *** ffgeek200 has joined ##java
[18:29:35] <ffgeek200> I'm trying to get the runtime of my java code and I use System.nanoTime() but the runtime for that turns out to be 0 since it's not precise enough.. how can I get more precise time?
[18:30:06] <cheeser> if nanoTime is not precise enough then you're an idiot for caring. 8^)=
[18:30:27] <cheeser> if your program runs under 1 billionth of a second, find something else to care about
[18:30:30] <cheeser> 8^)=
[18:30:35] *** Spike1506 has quit IRC
[18:31:00] <pr3d4t0r> cheeser: And since most metrics are only relevant to the first four digits at any given scale...
[18:31:00] *** dogmeat has joined ##java
[18:31:02] <mahogny> you rather mean difference is 0?
[18:31:03] <ffgeek200> Obviously that isn't the case and the time reported has >1ns granularity
[18:31:25] <mahogny> most operating systems lack nanosecond precision themselves
[18:31:42] <mahogny> and either way, nanosecond precision is useless. when relative to the call is that time?
[18:31:43] <ffgeek200> this is windows, perhaps linux would give me better precision
[18:31:59] <waz> cheeser's pint is still valid
[18:32:08] <cheeser> waz: i could use a pint
[18:32:08] <cheeser> 8^)=
[18:32:23] <mahogny> I think both linux and windows offer about 200hz precision. on linux it depends on the kernel, how you compiled it
[18:32:51] <mahogny> precision here determined by swapping frequency; there are lower level timers if you just want absolute time
[18:33:07] <mahogny> but it's quite useless for a user application
[18:33:12] <ffgeek200> i'd like to access gethrtime() from sys/time.h somehow
[18:33:14] *** timte has joined ##java
[18:33:24] <mahogny> you can do it with jni
[18:33:41] <ffgeek200> ahh, I'll try that
[18:34:03] *** TheCastor has quit IRC
[18:34:36] *** schasi has joined ##java
[18:34:46] *** _acid__ has joined ##java
[18:34:47] *** twolf has quit IRC
[18:35:23] <cheeser> another solution overengineered. our work here is done. let's hit the pub
[18:36:22] <cheeser> ~stats
[18:36:22] <javabot> I have been up for 0 days, have served 14 messages, and have 3849 factoids.
[18:36:25] * cheeser nods.
[18:37:24] *** vesz has quit IRC
[18:38:08] *** GunZ has joined ##java
[18:40:11] *** FMJaguar has joined ##java
[18:41:25] *** [[thufir]] has quit IRC
[18:41:57] *** cambazz has joined ##java
[18:42:20] *** arpu has joined ##java
[18:42:26] <cambazz> hello. in the web.xml of a glassfish application, I got a filter-mapping and multiple url patterns, which causes invalid xml
[18:42:32] *** Stephmw has quit IRC
[18:42:36] <cambazz> how can I define multiple url patterns?
[18:43:43] *** tag has joined ##java
[18:47:37] <tieTYT> i was reading a blog article reviewing something. It mentioned a con and the creator responded saying, "You should enter a JIRA issue. There's no reason why we shouldn't add this"
[18:48:04] <tieTYT> why not add your own jira issue?
[18:48:50] <ffgeek200> got better timing stats, isInstance() was the cause of my slowness
[18:49:10] <cheeser> tieTYT: eh?
[18:49:58] <mahogny> I don't expect type checks to be very fast. but isinstance if any should be optimized to death
[18:50:04] *** twolf has joined ##java
[18:50:54] *** durka42 has joined ##java
[18:50:55] <ffgeek200> yeah, it's odd, but when I remove the isInstance then there's a noticable speedup. Keep in mind this is equity trading code, so every nanosecond counts
[18:51:46] *** bushwakko has joined ##java
[18:52:21] <mahogny> I'm sure you have latency bottlenecks that by far outweigh the nanoseconds :)
[18:52:26] <cheeser> if you're doing isInstance() your design probably sucks
[18:52:44] <mahogny> I have had to use isinstance. but only for obscene things
[18:52:58] *** schasi has quit IRC
[18:52:59] <ffgeek200> cheeser, that is correct, it does suck, it was a hack so it's time to fix it
[18:53:19] <ffgeek200> to make a long story short, I have a binary .jar I had to work around
[18:53:26] <ffgeek200> ..with no source
[18:53:37] <ffgeek200> and all methods were obfuscated
[18:54:00] <mahogny> sounds like someone is trying to make it hard for you.
[18:54:18] *** amnesiac has joined ##java
[18:54:22] <ffgeek200> They try, but I hack around them.
[18:54:53] <ffgeek200> bloomberg is the culprit
[18:55:02] <mahogny> they want you to pay a license?
[18:55:15] <cheeser> sounds like maybe you're trying to skirt restrictions on use
[18:55:19] <ffgeek200> we've already paid quite a bit for it.
[18:55:35] <ffgeek200> no skirting involved
[18:56:10] *** twolf has quit IRC
[18:57:33] *** durka42 has quit IRC
[19:00:57] *** GunZ has quit IRC
[19:01:55] *** valcker has quit IRC
[19:06:52] *** TheCastor has joined ##java
[19:09:44] *** buntfalke has quit IRC
[19:10:21] *** osmosis has joined ##java
[19:11:39] *** juc0 has quit IRC
[19:12:38] *** ldam has joined ##java
[19:14:24] *** KermitTheFragger has quit IRC
[19:16:40] *** bitshuffler has joined ##java
[19:17:46] *** alex-c has joined ##java
[19:22:18] *** dmlloyd has quit IRC
[19:22:27] *** number-6 has left ##java
[19:23:37] <tieTYT> if anyone's used JMockit... how do I mock a method with generics?
[19:24:27] *** dmlloyd has joined ##java
[19:25:31] *** Ivellina has quit IRC
[19:25:31] *** Yustme has quit IRC
[19:25:31] *** steve-e has quit IRC
[19:25:31] *** Copter has quit IRC
[19:25:31] *** pchapman has quit IRC
[19:25:31] *** jkriesten has quit IRC
[19:25:31] *** AskHL has quit IRC
[19:27:10] *** Yustme has joined ##java
[19:28:16] *** _stack has quit IRC
[19:30:27] *** mohax has quit IRC
[19:30:57] *** mohax has joined ##java
[19:31:16] *** Mike-N-Go has joined ##java
[19:33:20] *** bas-i has joined ##java
[19:34:06] *** ffgeek200 has quit IRC
[19:37:24] *** _acid__ has quit IRC
[19:37:37] *** ahmed-araby has joined ##java
[19:38:26] <ahmed-araby> hi i'm trying to use swt,but how to set the size and position by ratios to make it looks good on all resolutions ??
[19:38:45] <waz> use a layout manager
[19:39:13] *** Varox has joined ##java
[19:39:34] *** Ububegin has quit IRC
[19:40:05] *** linnuxxy has joined ##java
[19:40:18] <ahmed-araby> well I'm still beginner in Gui Apps too , is that the layout i use in creating swt app ?
[19:41:02] <waz> why SWT then?
[19:41:20] <linnuxxy> how to loop through concurrenthashmap safely ...even if there is other thread changing the the hashmap?
[19:41:23] <ahmed-araby> It's easy and not heavy
[19:41:27] <waz> haha
[19:41:36] <waz> compared to?
[19:41:40] *** alek_b has quit IRC
[19:41:46] <waz> and what's 'not heavy' actually mean
[19:42:18] <ahmed-araby> comparing to awt and swing it take less memory , that's what I've read
[19:42:27] *** Spike1506 has joined ##java
[19:42:34] <waz> and memory is an issue for your app
[19:42:35] <waz> ?
[19:42:59] *** adi112358 has joined ##java
[19:43:00] *** steve-e has joined ##java
[19:43:00] *** Copter has joined ##java
[19:43:00] *** pchapman has joined ##java
[19:43:00] *** jkriesten has joined ##java
[19:43:05] <waz> I suppose azureus is a low mem useage marvel!
[19:43:10] *** Frostix has joined ##java
[19:43:22] <linnuxxy> how to loop through ConcurrentHashMap safely ...even if there is other thread changing the the hashmap?
[19:43:35] *** marvs has quit IRC
[19:43:35] *** adi112358 has quit IRC
[19:44:00] <Sou|cutter> linnuxxy: If it's a concurrent hashmap then the iterator will never throw concurrentmodificationexception
[19:44:09] <Sou|cutter> read the docs :P
[19:44:15] <ahmed-araby> no but in swing I had to do many thing and the book I found made me thought that it's quite diffcult !
[19:44:44] <waz> heh
[19:45:27] *** bindaas has joined ##java
[19:45:27] <mahogny> ahmed-araby, I expect memory usage claims are pure bullshit. bad programming in general have by far more impact than the GUI lib can have
[19:45:45] <mahogny> if you want a swing alternative, Qt-jambi looks otherwise interesting
[19:45:58] <waz> he doesn't have a good reason to want a swing alternative
[19:46:05] <waz> he should just stick with swing at this point
[19:46:23] <ahmed-araby> does any one have abook ar even website explain swing in more easy way , away from applets ?
[19:46:25] <mahogny> qt is a memory whore by all means. but system consistency is by far more important
[19:46:35] *** Razec has quit IRC
[19:46:58] <mahogny> afraid I learned my swing basics from just looking at examples in a book, and later checking the net to see in which way the book was wrong
[19:47:36] <mahogny> learn borderlayout and gridlayout for a starter. then just plug in all components you need by checking individual examples
[19:48:04] <mahogny> some components are hell even with tutorials. sorry about that
[19:48:40] *** SJr|Work has joined ##java
[19:48:46] <ahmed-araby> never mind but do you have some where to start ?
[19:48:50] *** juacom99 has joined ##java
[19:48:53] <SJr|Work> When developing should I default to protected or private?
[19:49:15] <Sou|cutter> I personally don't use protected much
[19:49:19] <ldam> SJr|Work, always private
[19:49:22] <SJr|Work> i.e. I can't think of a good reason that a client would need to gain access, or a good reason a client shouldn't need access.
[19:49:36] <mahogny> protected is uncommon in my programs
[19:49:41] <mahogny> ahmed-araby, not really. suns website
[19:49:42] <SJr|Work> Really?
[19:49:50] <juacom99> protected is accecible only for the class and the child class
[19:49:51] <ldam> SJr|Work, and use public if access is from outside is required
[19:49:58] *** bushwakko has quit IRC
[19:49:59] <juacom99> private uis
[19:50:04] <SJr|Work> I know what the difference is
[19:50:07] <juacom99> only acces for the class
[19:50:24] <mahogny> protected is mainly interesting for abstract classes
[19:50:42] *** jkriesten has quit IRC
[19:50:42] *** steve-e has quit IRC
[19:50:42] *** pchapman has quit IRC
[19:50:42] *** Copter has quit IRC
[19:50:42] <juacom99> i'm agree with mahogny
[19:50:48] <mahogny> half-baked solutions that warrant additional encapsulation
[19:50:59] <SJr|Work> But don't things like decorators depend on them?
[19:51:00] <Sou|cutter> ahmed-araby: Filthy Rich Clients is a pretty sweet book
[19:51:09] <mahogny> decorators in no way
[19:51:15] <Sou|cutter> ahmed-araby: http://filthyrichclients.org/
[19:51:22] <ahmed-araby> mahogny,well it's very strict about syntax
[19:51:29] <SJr|Work> Hmmmmmm sorry not decorators... hmmmm
[19:51:31] <ahmed-araby> Sou|cutter,thanks I'll Try
[19:51:46] <juacom99> i have a java regex quiestion. i got this string "01{4Ñ‚}11 (Motd hecho por λÑ…|O´CoNИoR{4Ñ‚}. para ser visto con los ojos en Arial unicode) "
[19:51:57] <SJr|Work> I mean both protected members and protected methods
[19:52:07] <juacom99> and i need to replace (char)5+2 digits to white space
[19:52:18] <juacom99> so i write:
[19:52:30] <Sou|cutter> ahmed-araby: might be too advanced though
[19:52:34] <juacom99> s.replace("(\\d\\d){2,3}","");
[19:52:41] <Sou|cutter> it's inspiring nonetheless
[19:52:44] <juacom99> but it didn't seems to work
[19:52:52] <juacom99> what could be the porblem??
[19:53:04] <ahmed-araby> Sou|cutter,Well I just want it to say things simply and don't complicate things :)
[19:53:04] <juacom99> sotty i write
[19:53:11] <juacom99> s.replace("(\\d\\d){2,},"");
[19:55:16] *** bas-i has quit IRC
[19:56:19] *** SwanR has joined ##java
[19:57:24] <SwanR> Hello, my program is going to request/retrieve data from a server from many different parts of it... would it be best to have all the communications done in one single class, or have the communication spread where its needed in the program ?
[19:57:49] *** DeadEd_ has joined ##java
[19:58:37] <Sou|cutter> SwanR: it's hard to say, but if it's all the same, or very similar, definitely put it in one place and re-use it
[19:59:10] <Sou|cutter> having snippets of the same junk all over the codebase will cost you a lot of work in the longrun
[19:59:29] <Sou|cutter> if you're a contractor and want some job security, that might be a benefit :P
[19:59:41] *** heyqule has joined ##java
[19:59:44] <SwanR> i thought it might just be best to have it all in one place so i can manage it from there ... its all going to be XML , allbeit different data
[19:59:53] *** alek_b has joined ##java
[20:00:03] <SwanR> yeh i think ill make it central
[20:00:08] *** Mike-N-Go has quit IRC
[20:00:32] *** pchapman has joined ##java
[20:00:49] *** alek_b has quit IRC
[20:01:02] *** alek_b has joined ##java
[20:01:06] *** Copter has joined ##java
[20:01:06] *** jkriesten has joined ##java
[20:01:26] *** cambazz has left ##java
[20:02:09] *** Mike-N-Go has joined ##java
[20:03:23] *** Frostix has quit IRC
[20:04:24] <juacom99> sorry to ask again but i want to replace comething line ((char)5)+2 digits for a white
[20:04:24] *** heyqule has quit IRC
[20:05:01] <mahogny> I would probably use substring for it
[20:05:08] <mahogny> faster than replace
[20:05:13] <juacom99> i write string.replace(((char)5)+"\\d\\d","")
[20:05:15] <mahogny> +I know how to do it correct
[20:05:28] *** BigAllan has joined ##java
[20:05:41] <juacom99> mmm substr is complicated :S
[20:05:58] <juacom99> i must have indexOf
[20:06:04] <juacom99> and then the substr
[20:06:40] *** tom17bombadil_ has joined ##java
[20:07:16] *** bushwakko has joined ##java
[20:07:31] *** convivial has quit IRC
[20:08:34] *** CaptainMorgan has joined ##Java
[20:09:57] *** convivial has joined ##java
[20:10:24] *** Mike-N-Go has quit IRC
[20:11:17] *** Mike-N-Go has joined ##java
[20:11:53] *** DeadEd has quit IRC
[20:12:56] *** ShadowHntr has joined ##java
[20:14:20] *** convivial has quit IRC
[20:14:43] *** bindaas has quit IRC
[20:16:14] *** bjv has joined ##java
[20:16:19] *** jkriesten has quit IRC
[20:16:19] *** Copter has quit IRC
[20:16:30] *** Sebboh has joined ##java
[20:16:43] *** bas-i has joined ##java
[20:16:52] <bjv> How would I have Ant go about ensuring a project dependency exists?
[20:17:02] *** Copter has joined ##java
[20:17:02] *** jkriesten has joined ##java
[20:17:08] <bjv> the dependency is a whole other *project* in a zip file
[20:17:12] <sproingie> with ivy?
[20:17:20] <ojacobson> ivy, maven ant tasks, something of that ilk
[20:17:42] <bjv> just have Ant run unzip into a directory.. and check that it's compiled?
[20:17:54] <sproingie> rename the zip to jar and stick it in a repo
[20:18:16] *** bindaas has joined ##java
[20:18:21] <Sebboh> Hi. I'm running out of permgenspace. Given the nature of the application, I wouldn't expect that.. Can I get a list of instantiated objects, and the amount of memory assigned to each? There's a programming bug, somewhere. A list like that would probably tell me exactly what is going wrong.
[20:18:29] <cheeser> bjv: <available>
[20:18:36] <cheeser> ~~ Sebboh profiler
[20:18:37] <javabot> a profiler is a tool to find performance bottlenecks. VisualVM is included in JDK nowadays and is great for a free profiler; jprofiler and jprobe cost money (jprofiler has a free eval period). Some more are listed here: http://javafaq.mine.nu/lookup?169
[20:18:39] <bjv> sproingie: what is a repo?
[20:18:45] <sproingie> ~heap profiler
[20:18:46] <javabot> sproingie, I have no idea what heap profiler is.
[20:18:55] <sproingie> ~hprof
[20:18:56] <javabot> sproingie, hprof is a profiling feature inbuilt into Java since 1.2: http://java.sun.com/developer/technicalArticles/Programming/HPROF.html
[20:19:03] *** convivial has joined ##java
[20:19:05] <cheeser> bjv: use something like ivy or the maven ant tasks to fetch dependencies
[20:19:24] <sproingie> bjv: a maven repo. which ivy conveniently reads.
[20:19:41] <bjv> yeah googling "ant repo"
[20:19:47] <bjv> got me a bunch of ivy keywords
[20:19:50] <sproingie> it's probably massive overkill to start with, but it'll be convenient when you start adding more, start depending on versions, etc
[20:19:56] <bjv> i guess i read up now and find out what ivy is :O
[20:20:02] <mahogny> http://mahogny.areta.org/temp/javametaproposal.txt anyone have comments?
[20:20:10] <sproingie> otherwise, by hand with an ant task
[20:20:13] <cheeser> bjv: the maven ant tasks are simpler to set up and use
[20:20:20] <cheeser> ~smack sproingie
[20:20:20] <javabot> smacks sproingie in the mouth
[20:20:22] <ojacobson> cheeser: that's surreal
[20:20:30] <cheeser> ojacobson: whazzat?
[20:20:41] <ojacobson> it's like they could see the right thing, and then went off and did something else entirely to build maven proper :)
[20:20:51] <cheeser> ivy? yeah. it's odd
[20:20:56] <bjv> huh
[20:20:58] <sproingie> it seems like maven-lite to me
[20:21:04] <bjv> so ant+ivy isnt what i should go with?
[20:21:05] <sproingie> "we do dependencies, and that's all"
[20:21:08] <bjv> jump right into maven
[20:21:19] <bjv> guess im not really *using* ant yet either
[20:21:21] <sproingie> i never thought i'd say this, but maven has better documentation
[20:21:22] <bjv> might as well
[20:21:31] <ojacobson> sproingie: wash your mouth
[20:21:37] <sproingie> it certainly has better tooling
[20:21:42] <SJr|Work> How do I make a class only visible within it's package
[20:21:49] <cheeser> google is maven's documenation
[20:21:50] <bjv> ive noticed, Ant seems just like make... but in XML and if it has any other features
[20:21:51] <bjv> well,
[20:21:55] <sproingie> SJr|Work: leave off any and all 'public/private/protected'
[20:21:58] <bjv> i didnt find documentation explaining those features
[20:22:02] <cheeser> ~~ SJr|Work access control
[20:22:02] <javabot> SJr|Work, access level is one of 'public' ,'private', 'protected', or default a.k.a. package private. They control which code is allowed to access the attribute / call the method. public means: Everybody, 'private' means: Only stuff in this source file. For more info, see ~public, ~private, ~package-private, and ~protected, and this link: http://is.gd/eJYt (sun.com)
[20:22:11] <SJr|Work> thanks
[20:22:16] <cheeser> ~tell bjv about ant manual
[20:22:16] <javabot> bjv, ant manual is http://ant.apache.org/manual/
[20:22:25] <sproingie> ant is well documented. ivy is not.
[20:22:27] <Sebboh> thanks for your advice re: profilers.
[20:22:28] *** longbeach has quit IRC
[20:22:42] <Sebboh> Maven is documented?
[20:22:46] <sproingie> better than ivy
[20:22:47] <bjv> yeah, that is what i was using to learn how to type out the buildfiles
[20:22:59] *** jottinger has joined ##java
[20:23:20] <bjv> like the section for "integration with eclipse"
[20:23:21] *** Daniel_G has joined ##java
[20:23:23] <sproingie> i think it's more that maven has a lot more POMs floating around to cargo-cult
[20:23:29] <bjv> just linked you to eclipse.org
[20:23:35] <bjv> i didnt even get a "good luck, lol"
[20:23:41] <sproingie> ayep
[20:23:52] <bjv> oh well, ill look into maven, since the whole point of looking into ant
[20:24:06] *** deepjoy has joined ##java
[20:24:08] <bjv> is to automate distributable building, using this other project as a dep.
[20:24:10] <bjv> thanks
[20:24:12] *** Daniel_G has quit IRC
[20:24:12] <jottinger> maven's worth looking at, much like a car wreck with body parts is worth looking at
[20:24:19] *** Daniel_G has joined ##java
[20:24:23] <Sebboh> I still can't force maven to use a jar that I build, rather than the copy of the same jar that another developer built months ago, because he put his in a repository, and mine is in my workspace. ..My workspace.. You know, where code is built from. Fsking maven.
[20:24:48] <sproingie> maven is floor wax and dessert topping and personal lubricant and clothes whitener
[20:25:07] <jottinger> Sebboh: install it into your local copy of the repository... from your workspace.
[20:25:08] <ojacobson> Sebboh: you could always add a repository that is at <url>lib/</url>
[20:25:14] <jottinger> But yes, that's stupid. Welcome to maven.
[20:25:28] <jottinger> Maven: Where doing things the officious, bureaucratic, retarded way wins every time.
[20:25:36] <sproingie> i remember when maven was using jelly
[20:25:50] <jottinger> That was when it was being nice.
[20:25:52] *** acuster has quit IRC
[20:25:58] <jottinger> Now it goes in bareback and unlubed.
[20:26:17] *** ahmed-araby has quit IRC
[20:27:08] *** vesz has joined ##java
[20:27:12] <Sebboh> jottinger, I did install it. Like... that's how I build. "install" target. It was only recently that I learned that while the install target includes the build target, it's not the primary objective.. heh. I have zero academic interest in build environments, only a practical one. I memorize a few commands and get back to the code. Or the bickering and backstabbing, whichever.
[20:27:51] <jottinger> Sebboh: :) Well, I have no defense for maven; I use it but dislike it strongly, even though it has its strengths.
[20:28:06] *** twolf has joined ##java
[20:28:25] *** bjv has quit IRC
[20:28:50] *** jkriesten has quit IRC
[20:28:50] *** Copter has quit IRC
[20:29:13] <cheeser> same here
[20:30:01] <jottinger> cheeser: you ever used any of the realtime JVMs?
[20:30:05] <Sebboh> I like that it magically alters my apps's config files to use new libs. The other day I upgraded production to a new version of some lib by altering *one* pom file. Maven clearly knows more about ears and wars than I do.
[20:30:06] <cheeser> nope
[20:30:12] <jottinger> anyone else: any observations about Java realtime?
[20:31:39] <jottinger> There are a few realtime JVMs: the Sun realtime JVM, JRockit Realtime, a few others. Sun's RTSE is only for some Unixen, though.
[20:31:48] <Sebboh> jottinger, I saw a java implementation of qemu, pretty damned cool. That ran on the standard sun JVM... I came across it somewhere in the tubes while I was googling around realtime stuff in general.
[20:32:07] <jottinger> emulation of qemu? What's QEMU?
[20:32:37] <jottinger> ooo, Sun's RTSE is apparently atop JSE 5 too
[20:32:44] <jottinger> I thought it'd be more like J2ME
[20:32:52] <cheeser> it's like wine but even less functional (QEMU)
[20:33:20] <jottinger> heh, Sun's RTJVM also *requires* more than one CPU :)
[20:33:32] <Sebboh> implementation of qemu, not emulation. Subconsciously, you clearly know that qemu is a program that provides hardware emulation of an intel PC, from the metal on up. You can run windows/linux/whatever inside one.
[20:33:43] *** tom17bombadil_ has quit IRC
[20:34:00] <jottinger> I like JRockit's approach better: deterministic GC
[20:34:31] <dangertools> Sebboh: qemu does not only emulate PCs but also a bunch of other architectures
[20:34:34] <Sebboh> QEMU was integrated in with Xen at some point to provide hardware-virtualization.
[20:34:41] <Sebboh> dangertools, ahh. good.
[20:34:56] <jottinger> whatEVER. qemu sounds almost as interesting as vmware.
[20:35:37] <dangertools> qemu+kvm or kqemu is quite useful for virtualization of x86 guests on x86 hosts, everything else is just emulated
[20:35:54] * jottinger tries to act interested and stuff :)
[20:36:24] <jottinger> and ha! good to see TSS' spam prevention measures worked so well that spam is still part of the discussion pages :)
[20:37:10] <Sebboh> jottinger, when you say vmware, do you mean that brand, or, virtualization in general? :) Assuming the later, that's like saying that a hammer or a socket set isn't interesting. ..And I'd agree: it's what you do with these tools that's interesting, or not.
[20:37:12] *** Gracenotes_away is now known as Gracenotes
[20:37:14] *** tom17bombadil_ has joined ##java
[20:37:52] <jottinger> was referring to the former. But to me, virtualization isn't all that interesting in any event.
[20:37:54] *** crowbar has joined ##java
[20:38:19] *** romanb has quit IRC
[20:39:28] <Sebboh> javafaq.mine.nu is down. That's one of the urls mentioned by the bot re: profilers.
[20:40:08] <Sebboh> As you might be aware, mine.nu is a dynamic DNS service.. you might want to replace that factoid with one that points to a webserver that isn't somebody's personal PC.. :)
[20:40:21] *** b3nn3tt has joined ##java
[20:40:52] <Sebboh> or, at least, mine.nu was a dDNS service like five years ago.. I guess I haven't looked at it since then.
[20:41:12] <juacom99> question: is there any way to make a multicolor text area
[20:41:33] <juacom99> i'm making a chat client and i want to show text color
[20:41:44] *** Nikty has joined ##java
[20:42:23] *** resmo has joined ##java
[20:42:32] *** npm has joined ##java
[20:42:44] <juacom99> Sebboh: i used to use dyndns
[20:43:01] <juacom99> i think it have a linux version
[20:44:48] <cheeser> juacom99: yes, there is. i'm not a swing guy so i dunno how.
[20:44:48] <cheeser> 8^)=
[20:44:58] <cheeser> but i use several swing apps with multicolored text.
[20:45:13] <juacom99> ok
[20:45:19] <juacom99> i'll keep looking :S
[20:46:03] <juacom99> i thing i heard there was something like JTextAresa that suport mime types like RTF or html
[20:46:13] <cheeser> ~swing html
[20:46:13] <javabot> http://java.sun.com/docs/books/tutorial/uiswing/components/html.html
[20:46:14] <juacom99> *JTextArea
[20:46:17] <sproingie> http://www.java-tips.org/java-se-tips/javax.swing/how-to-add-colored-text-to-the-document.html
[20:46:35] <sproingie> i know nothing about the subject. i just typed three words into google
[20:46:48] <cheeser> javabot: sproingie++
[20:46:48] <javabot> sproingie has a karma level of 19, cheeser
[20:47:02] <juacom99> sproingie+10
[20:47:07] <juacom99> sproingie+++
[20:47:18] <juacom99> javabot: sproingie+10
[20:47:18] <javabot> juacom99, I have no idea what sproingie+10 is.
[20:47:28] <juacom99> javabot: sproingie+++
[20:47:28] <javabot> sproingie+ has a karma level of 1, juacom99
[20:47:32] <sproingie> okok, i'll take a simple increment :)
[20:47:46] * sproingie is an atomic counter.
[20:47:47] <juacom99> +++ dosn't work?
[20:48:00] <juacom99> javabot: sproingie++
[20:48:01] <javabot> sproingie has a karma level of 20, juacom99
[20:48:06] <juacom99> there you go
[20:48:18] <sproingie> +++ works in most languages with ++, it just doesn't do what you think
[20:48:39] <sproingie> pre-increment anyway
[20:48:49] <sproingie> probably doesn't parse in java tho
[20:49:02] <juacom99> i know is like i++
[20:49:05] <juacom99> or ++i
[20:49:17] <juacom99> pre an pos increments :D
[20:49:26] <sproingie> C will parse it as ++(+i) i think
[20:49:27] <jottinger> no, it isn't
[20:49:45] *** marrd has quit IRC
[20:50:36] <jottinger> i don't think a=b+++c; will compile; although it MAY read it as (b++)+c, which is going to be an undefined value in any event
[20:52:06] *** BigAllan has quit IRC
[20:52:44] <pr3d4t0r> jottinger: :*
[20:52:50] *** bushwakko has quit IRC
[20:52:54] <pr3d4t0r> jottinger: Do I get some feedback from you?
[20:53:33] <sproingie> undefined behavior can range from "compiles and does what you probably mean" to "doesn't compile" to exevp("nethack")
[20:54:06] *** Sebboh has quit IRC
[20:54:07] *** dk_schrute has joined ##java
[20:55:01] *** bushwakko has joined ##java
[20:55:03] *** dvayanu has joined ##java
[20:55:24] *** bushwakko has quit IRC
[20:55:27] *** kavon has quit IRC
[20:56:05] *** Nikty has left ##java
[20:57:20] *** JGarrido has quit IRC
[20:57:43] *** chasep_work has quit IRC
[20:58:27] *** _stack has joined ##java
[21:00:34] *** vezzoni has quit IRC
[21:00:54] *** MetaPhaze has joined ##java
[21:01:00] <juanez> juacom99: JEditorPAne / JTExtPane supports html and lots of other stuff
[21:01:07] <MetaPhaze> is there a way to get the size of a <div> that has had its width/height attribute set to auto using java?
[21:01:14] <juanez> alot of the swing components support html
[21:01:20] <ojacobson> ~~ MetaPhaze javascript
[21:01:20] <javabot> Javascript has nothing to do with Java, just like sweet breads are neither sweet, nor bread. See ##javascript
[21:01:27] <cheeser> MetaPhaze: that depends on the browser and the screen size etc etc etc
[21:02:23] <MetaPhaze> sorry javascript
[21:02:31] * cheeser eyes MetaPhaze
[21:02:35] <ojacobson> cheeser: called it
[21:03:10] <cheeser> ojacobson: i have a bead on that javadoc deletion bug.
[21:03:29] <MetaPhaze> someone needs to change that bot, javascript has 'something' to do with java, and the java language from sun or it wouldn't be called 'java' script, although the two languages are different in function they do have something to do with each other
[21:03:38] <cheeser> no, it doesn't.
[21:03:46] *** SoraCross has joined ##java
[21:03:47] <cheeser> absolutely nothing.
[21:03:59] <ojacobson> MetaPhaze: The name is a failed marketing initiative by Mosaic Communications & Sun.
[21:04:04] <SoraCross> Hello
[21:04:08] <ojacobson> MetaPhaze: at a technical level they're utterly unrelated.
[21:04:12] <SoraCross> quick question
[21:04:43] <SoraCross> If I have a int set up like 0XAARRGGBB is there a way I can test it to see what only the AA part is?
[21:04:55] <ojacobson> ~bitwise
[21:04:55] <javabot> ojacobson, I have no idea what bitwise is.
[21:04:58] <cheeser> MetaPhaze: no more relationship than these two companies: http://is.gd/i7YE and http://is.gd/30Bf
[21:05:05] <juacom99> juanez: thanks i'll try that
[21:05:10] <ojacobson> SoraCross: Sure, mask out the others with & and maybe >>>
[21:06:19] <SoraCross> Um, I don't quite understand. like if "0xAA&&&&&& == 0" ?
[21:06:26] <juacom99> isn't javascript copyright of netcape?
[21:06:47] *** lami1984 has joined ##java
[21:06:47] <juacom99> *netscape
[21:06:54] <lami1984> hello
[21:06:55] *** JGarrido has joined ##java
[21:06:55] <ojacobson> ~~soracross operators
[21:06:55] <javabot> soracross, operators is http://java.sun.com/tutorial/java/nutsandbolts/operators.html
[21:07:03] <ojacobson> SoraCross: Specifically, the bitwise ones
[21:07:25] <juacom99> hi lami1984
[21:08:49] <MetaPhaze> cheeser, just reading some history of javascript i can see some of what javascript has had to do with java... for instance, javascripts name was a result of a co-marketing deal between netscape and sun, in exchange for them bundling sun's java runtime with their then dominent browser, so i re-iterate my point, if part of a statement is false, all of it is... javascript has had "something" to do with java, so the bot should in fact say "ja
[21:08:49] <MetaPhaze> vascript and java are not the same language" instead of javascript has nothing to do with java
[21:09:03] <ojacobson> MetaPhaze: if you want help, go to ##javascript
[21:09:09] <ojacobson> MetaPhaze: if you want to argue that we should help you, get fucked
[21:09:24] <MetaPhaze> watch your mouth boy
[21:09:44] <epalm> this won't end well...
[21:09:45] * nDuff gets out the folding chairs
[21:09:47] <MetaPhaze> i'll come woop yer ass just tell me where ya live and wait ;)
[21:10:21] * ernimril brings out some popcorn
[21:10:28] <cheeser> MetaPhaze: i know the history of javascript. it was dumb then. it was dumb now. it doesn't make the languages related. they just shared stupid marketers.
[21:10:37] <sproingie> javascript got an API to load and script java objects
[21:10:42] <sproingie> liveconnect, i believe
[21:10:56] <sproingie> it wasn't used much. being a buggy piece of ass may have been part of it.
[21:11:19] <MetaPhaze> i didn't say they were related, i simply said they "had something to do with each other" now come here so i can rip out your intestines and pack them with your muscle and fat and have them twisted up for supper and fried in my pan
[21:11:34] <MetaPhaze> bitch
[21:11:38] <epalm> what. the. fuck.
[21:12:07] <sproingie> mm tripe
[21:12:28] <sproingie> stuff some barley in there and you've got haggis
[21:12:55] <MetaPhaze> mmmmm
[21:14:08] <MetaPhaze> don't mess with me today, not in a good mood, and quite psychotic to begin with
[21:14:15] * nDuff is surprised there hasn't been a banhammer deployed yet.
[21:14:50] *** whaley has quit IRC
[21:15:18] <sproingie> i love it when the kids put on a "persona" on irc
[21:15:40] <lami1984> is there any way to call a java method(might be static) from c/c++ code with jni but in the c style, I mean by getting an address, casting it to a function pointer and calling ptr()?
[21:15:40] <sproingie> i mean who would actually type that stuff out
[21:15:49] <dk_schrute> hola
[21:15:56] *** svm_invictvs has quit IRC
[21:15:58] *** dk_schrute is now known as svm_invictvs
[21:16:17] *** dk_schrute has joined ##java
[21:16:18] <ernimril> lami1984: that would depend on the jvm, there is no standard way to do it
[21:16:38] <sproingie> i imagine some fancy wrapper could do it. certainly not stock JNI.
[21:16:43] <lami1984> ernimril: what about sun jvm?
[21:16:46] *** Frostix has joined ##java
[21:16:59] <cheeser> MetaPhaze: i don't give a shit. if you have a java question great. otherwise pipedown. we've devoted enough time to this already.
[21:17:02] <ojacobson> You'd need to generate a trampoline for each method/object pair (not class, object) if you wanted to not have to pass this references around
[21:17:02] <ernimril> lami1984: without really knowing I would say: no way
[21:17:09] <sproingie> perhaps swig can generate such trampolines
[21:17:12] *** SpeedyGhost has quit IRC
[21:17:13] *** maverickbna has joined ##java
[21:17:15] <ojacobson> sproingie: out of my brain
[21:17:23] <cheeser> heh
[21:17:28] <SoraCross> So "0x00FFFFFF & 0x00" would return true?
[21:17:39] <sproingie> it's not a boolean
[21:17:42] <ojacobson> SoraCross: (int) & (int) evaluates to (int)
[21:17:52] <cheeser> ~~ SoraCross tias
[21:17:52] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[21:18:04] <dmlloyd> man, it's bad news when the first line I see in ##java when I sit down is a question like that :)
[21:18:05] *** ShadowHntr has quit IRC
[21:18:11] <ernimril> lami1984: hotspot does a lot of magic behind the scenes the method may not even exist in memory when you try to call it like that (inlined or class unloaded) so it would not be safe
[21:18:11] <MetaPhaze> java is easy, javascript is a pain in the ass... so no, i never have java questions... i just code it and it works... working with web browsers is a pita
[21:18:20] *** Pupeno has joined ##java
[21:18:39] <ernimril> lami1984: why do you want this?
[21:18:52] <lami1984> <ernimril>: ok so I will maybe tell you what I want to achive, maybe my thinking gets wrong way
[21:18:54] <ernimril> lami1984: jni is normally quite a pain, try to avoid it
[21:18:54] <sproingie> i wouldn't mind that, but i'd probably just write the wrapper by hand.
[21:19:15] <sproingie> maybe use a macro if i had a lot of them
[21:19:21] <Pupeno> Can I have class A with a protected field x of class X, and class B inherting class with a protected field of class Y where class Y inherits class X?
[21:19:26] *** maverickbna has quit IRC
[21:19:47] <sproingie> as long as class X is visible, sure
[21:19:59] *** Mike-N-Go has quit IRC
[21:20:13] <cheeser> ~~ Pupeno tias
[21:20:13] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[21:20:15] <lami1984> <ernimril>: I'm trying to code bindings for cross-platform library, there is special macro inside which you have to put after your main function and then it wraps your main in os dependent manner
[21:20:48] <Pupeno> cheeser: what I've found is that it doesn't behave as expected, but maybe I'm just doing something wrong and the answer to my question was "no, that leads to crazy behavior".
[21:20:54] *** Mike-N-Go has joined ##java
[21:21:05] <cheeser> Pupeno: it's hard to say without seeing code and errors.
[21:21:23] <svm_invictvs> ~testcase
[21:21:23] <javabot> Provide complete, compilable Java source code for a SINGLE class that shows the problem and nothing else. Be as brief as possible. (See http://javafaq.mine.nu/lookup?364 for details and a HOWTO.)
[21:21:24] *** SwanR has quit IRC
[21:21:27] <lami1984> <ernimril> so what I need to do is wrap one of my java methods
[21:21:35] <svm_invictvs> cheeser: wheres' the r0bby exception factoid?
[21:21:43] <ojacobson> ~be r0bby
[21:21:43] <javabot> FileNotFoundException is a subclass of IOException; Exception won't directly catch that.
[21:21:51] <r0bby> wtf!!!
[21:21:55] <ernimril> lami1984: just use standard jni for it and it will work
[21:22:17] *** tom17bombadil_ has quit IRC
[21:22:18] <ernimril> lami1984: you may in a few cases get one extra level of indirection, but that is about as good as you can get it
[21:22:18] <r0bby> oh, nevermind :)
[21:22:20] <svm_invictvs> r0bby: heh
[21:23:03] <svm_invictvs> r0bby: I was just trying to find it.
[21:23:08] <r0bby> heh :)
[21:23:11] <r0bby> ...why
[21:23:24] <sproingie> ~be javabot
[21:23:24] <javabot> It's great to be me!
[21:23:40] <r0bby> ~bot snack
[21:23:40] <javabot> r0bby, I have no idea what bot snack is.
[21:23:43] *** roue has joined ##java
[21:23:43] <svm_invictvs> Oh god..is there a....
[21:23:49] <svm_invictvs> ~be svm_invictvs
[21:23:49] <javabot> svm_invictvs, I have no idea what be svm_invictvs is.
[21:23:52] <svm_invictvs> good
[21:23:54] <lami1984> <ernimril> unfortunately it doesn't work for all of the functions, for example those that use native windows (in windows) popup box etc.
[21:24:01] *** jkriesten has joined ##java
[21:26:34] *** Daniel_G has quit IRC
[21:29:40] *** blankthemuffin has joined ##java
[21:32:26] *** Mike-N-Go has quit IRC
[21:33:29] *** mohax has quit IRC
[21:33:36] <lami1984> ernimril: if you have time to look at this, that's why I need to call a method from native code, macro main - http://rafb.net/p/bw6Aw845.html (important lines: 4 & 18), _WinMain wrapper - http://rafb.net/p/8cVimb64.html
[21:33:43] *** mohax has joined ##java
[21:34:28] *** jchauncey has quit IRC
[21:34:57] *** Frostix has quit IRC
[21:35:07] *** Mike-N-Go has joined ##java
[21:36:33] *** sombriks has joined ##java
[21:37:08] *** Carnage\ has joined ##java
[21:37:27] *** RealKillaz has joined ##java
[21:43:59] *** blahjake has joined ##java
[21:46:18] *** monstrfolk has joined ##java
[21:49:58] *** vesz has quit IRC
[21:50:00] *** tom17bombadil has joined ##java
[21:52:53] *** shadewind has joined ##java
[21:53:03] *** blankthemuffin has quit IRC
[21:53:19] *** basalt79 has joined ##java
[21:53:36] <basalt79> hi all, is there any util to use to convert a string to camel case?
[21:54:24] <ernimril> basalt79: depends on what you want... String.replaceAll can work, but do not use it tight loops
[21:54:40] *** convivial has quit IRC
[21:55:18] *** bushwakko has joined ##java
[21:55:33] <shadewind> split the string into words, use toLower (or whatever it's called) and then capitalize the first letter in each word
[21:55:41] <shadewind> then concatenate them
[21:55:42] <shadewind> done
[21:56:07] <basalt79> ok thx
[21:56:37] *** Mike-N-Go has quit IRC
[21:56:43] *** SpeedyGhost has joined ##java
[21:57:03] *** bakesz has joined ##java
[21:58:10] *** foo-nix has quit IRC
[21:58:23] *** convivial has joined ##java
[21:58:49] <bakesz> hi!could somebody tell me how to make the stack bigger?
[21:58:58] <bakesz> (on linux)
[21:59:11] <ernimril> ~~bakesz jvm options
[21:59:11] <javabot> bakesz, jvm options is http://blogs.sun.com/roller/resources/watt/jvm-options-list.html
[22:00:05] <shadewind> we should put up a contest, the fastest one to answer a question from someone just joing by using Javabot wins
[22:00:31] <cheeser> ~next
[22:00:32] <javabot> Another satisfied customer. Next!
[22:00:34] * cheeser bows.
[22:00:37] <cheeser> 8^)=
[22:00:51] * shadewind bows before cheeser
[22:01:00] <ojacobson> ~~ shadewind the google principle
[22:01:01] <javabot> The Google Principle: questions that can easily be answered by googling deserve incorrect and/or misleading answers.
[22:01:26] <shadewind> ojacobson: that's no news for me
[22:02:33] <bakesz> i tried to make put big number after -Xss and -Xoss,but i get the same problem
[22:02:48] <ayrnieu> ask a question about that problem, then.
[22:03:56] *** eracc has joined ##java
[22:04:28] *** juanez has quit IRC
[22:05:41] *** bitcrave has joined ##java
[22:06:34] *** whaley has joined ##java
[22:06:57] *** dmlloyd has quit IRC
[22:07:06] *** eduardopl has joined ##java
[22:07:29] *** dmlloyd has joined ##java
[22:08:20] *** deepjoy has quit IRC
[22:09:12] *** bushwakko has quit IRC
[22:09:37] *** mengu has joined ##java
[22:09:42] *** bhushanvmishra has joined ##java
[22:10:26] <bhushanvmishra> is there any IDE created in java for database developer's?
[22:11:38] <basalt79> do you know SQLDeveloper from oracel, its written in java
[22:11:38] <ries> bhushanvmishra: a couple....
[22:11:38] * hendrixski wonders what TOAD is developed in
[22:11:52] <cheeser> 1. why does it have to be in java. 2. ask in ##<your database>
[22:11:59] <cheeser> ~~ bhushanvmishra tech support
[22:11:59] <javabot> Hello, ##java is not a technical support channel for your Java apps or virtual machines, it is a development enthusiast channel which prefers to receive questions and discussion on the topic of programming with the Java language. Please consider seeking help with the vendor of your software if you can't figure out how to use it.
[22:12:05] <ries> bhushanvmishra: vpuml has a complete toolset
[22:12:18] *** panorama_tdk has joined ##java
[22:12:23] *** agnul has joined ##java
[22:12:27] <eduardopl> is it possible to validate a xml file against a schema via gwt?
[22:13:46] *** eracc has left ##java
[22:14:22] <bhushanvmishra> for ms sql server...........?
[22:16:43] *** ayrnieu has left ##java
[22:16:45] *** basalt79 has quit IRC
[22:16:58] *** durka42 has joined ##java
[22:17:30] *** tom17bombadil has quit IRC
[22:17:40] <juacom99> hoq do you append a text on a JEditorPane
[22:17:45] <juacom99> *how
[22:18:05] <ldam> juacom99, you should read the tutorials instead of asking here
[22:18:18] <juacom99> i did
[22:18:30] <juacom99> http://java.sun.com/docs/books/tutorial/uiswing/components/index.html
[22:19:17] *** ayrnieu has joined ##java
[22:19:19] *** tom17bombadil has joined ##java
[22:19:20] <ldam> so your question should always be answered
[22:19:39] *** latebind has joined ##java
[22:19:41] *** KristopherWindso has joined ##java
[22:20:59] <KristopherWindso> hi - what's the easiest way to hit a web page through my java program? i just need to send GET parameters, ie by hitting... index.php?value=something
[22:21:18] <ernimril> KristopherWindso: URL/URLConnection
[22:21:23] *** disown has joined ##java
[22:21:49] <KristopherWindso> thanks, will try it :)
[22:22:02] *** ciaron has joined ##java
[22:22:49] <juacom99> idam: but it not cos i have something like "<html><body><font color=\"#A100FF\">hello</font></body></html>" as default text and i want to intsert let say "<b>blond text</b>" betwen the <body></body> tag
[22:23:01] <juacom99> ldam: *
[22:23:27] <juacom99> the way that is in the doc dosn't work for me...
[22:23:37] *** eJot has joined ##java
[22:23:38] <disown> Hi all. I would like to know if a rule engine is just a hype or useful. I need to develop a action-reaction thingy with priorities, i.e "if night and sensor in livingroom then lights on livingroom prio 1, light switch overrules". Any suggestions?
[22:23:46] <ayrnieu> please use <em></em> for blonde text.
[22:24:08] <ldam> juacom99, on the editorpane tutorial, the first sentece says"Two Swing classes support styled text: JEditorPane and its subclass JTextPane"; if you click on one of the links you would get to the api; there you have methods. It should be quite obvious what these methods do
[22:24:11] *** eJot has quit IRC
[22:24:22] *** eJot has joined ##java
[22:24:28] <ernimril> disown: are you looking for such a thing in java or what?
[22:24:37] *** derwolf has quit IRC
[22:24:38] <ayrnieu> disown, search for 'prolog java'.
[22:24:46] <ernimril> ~jess
[22:24:46] <javabot> ernimril, jess is The Java Expert System Shell, a rule based engine written in java. http://herzberg.ca.sandia.gov/jess/
[22:25:20] *** bitcrave has quit IRC
[22:25:23] <juacom99> ldam: that what i did but the way thay said result on "<html><body><font color=\"#A100FF\">hello</font></body></html><b>blond text</b>"
[22:25:26] <juacom99> not no
[22:25:37] <ldam> juacom99, i would guess that you would access and manipulate the StyledDocument
[22:25:39] <disown> ernimril: but is that really useful? I think the syntax is very difficult. I would like some evaluation thingy (basically state machine++), where i can write java plugins
[22:25:40] <juacom99> "<html><body><font color=\"#A100FF\">hello</font><b>blond text</b></body></html>"
[22:25:56] <ernimril> disown: I have never used it myself, it depends on your problems
[22:26:00] <disown> ayrnieu: I don't need backtracking, so I don't think prolog is a good fit
[22:26:10] <ernimril> disown: you can also write your own state tracker if you want
[22:26:43] <svm_invictvs> ~finally
[22:26:44] <javabot> see http://java.sun.com/docs/books/tutorial/essential/exceptions/finally.html
[22:26:49] *** agnul has quit IRC
[22:27:06] <disown> ernimril: I think I would need something like state variables, events on state changes, some priority queues, thread synchronization and events. Is there something like that available?
[22:27:34] <disown> i can have some conficts, i.e rule 1 says half light, rule 2 says full light
[22:27:40] <ernimril> disown: I can not think of anything, but that does not make it non-existant
[22:29:25] <latebind> disown : you should consider if perhaps a design pattern is out there that will make this process simple, usually rule engines are for very sophisticated processes, and even then its probably overkill
[22:29:25] <eduardopl> I want to transform a string that contains xml data ("<element>...") into a File object that DocumentBuilder.parse() method expects. How do I do that?
[22:29:25] *** skoskav has joined ##java
[22:29:33] <disown> I tried to read up on the RETE algorithm in order to figure out if rule engines where useful. Seems like it is just condition-sharing, i.e like instance pooling of rules (interning).
[22:30:07] *** bas-i has quit IRC
[22:30:18] <latebind> disown : have you tried the state pattern?
[22:30:20] *** spiderbyte has quit IRC
[22:30:28] <disown> latebind: sounds good. I have some good ideas, I just wanted to know if I am reinventing the wheel
[22:30:40] <disown> problem is that I cannot really easily translate everything into state
[22:30:48] <disown> bad fit
[22:30:56] <latebind> disown : give me an example
[22:31:00] *** timte has quit IRC
[22:31:08] <latebind> and ill tell u if you can do it with state pattern..
[22:32:38] *** monkeycid has joined ##java
[22:32:45] *** eduardopl has quit IRC
[22:33:04] <dmlloyd> disown: you should look into drools, which has the rete stuff as well as process modeling
[22:33:19] <dmlloyd> where's conan, he should be pimping this stuff :)
[22:33:26] <disown> well: you have a bunch of conditions (i.e time of day, events from sensors etc etc). This translates via rules to wanted states (conflict resolution must take place). You end up with a wanted state for each device, i.e lamp 5 intensity 30. The "state wish" is withdrawn when the condition goes false
[22:33:33] <conan> wassup?
[22:33:44] <dmlloyd> tell disown that he wants to use drools for his problem :)
[22:33:57] *** biozit has joined ##java
[22:34:00] *** bas-i has joined ##java
[22:34:23] <conan> disown: drools provides complex event processing and workflow.
[22:34:38] *** andrew_ has joined ##java
[22:34:53] <conan> disown: Drools is a rule engine tht combines three complimentary technologues rules, workflow and event processing.
[22:34:55] <svm_invictvs> grumble
[22:35:03] <svm_invictvs> hadoop is really getting on my nerves.
[22:35:09] <andrew_> cry. the jsp channel is split to all getout
[22:35:10] <disown> dmlloyd: Ok, so what do I get with Drools? Can I write my rules in Java? Does it do thread synchronizing? Can I have "wishes" instead of events (ie "turn on, turn off" is really bad idea)
[22:35:26] <dmlloyd> tias :)
[22:35:32] <conan> disown: drools has it's own rule language, the DRL.
[22:35:42] <dmlloyd> but that's the type of problem that it's made for, so I'm sure it will do quite well
[22:35:48] <conan> disown: you can't do rules well in pure java, you need a DSL.
[22:36:06] *** segun has joined ##java
[22:36:22] <segun> hello all
[22:36:24] <disown> ok thanks guys. I'll start reading up on drools. Btw, is it better than jess?
[22:36:37] <segun> have anyone heard of or used BeanShell?
[22:36:42] <conan> disown: what do you mean by wishes?
[22:36:47] <vinse> ~anyone
[22:36:47] <javabot> Instead of asking whether anyone works with something you need help with, please save time by asking your actual question. If someone knows and wants/has time to help, perhaps he/she will.
[22:36:50] <conan> disown: hes a lot. jess only does rules.
[22:37:09] <conan> disown: it doesn't have built in workflow nor is it able to do complex event processing, plus jess .clp is hard to read.
[22:37:15] <vinse> segun: but yes, lots of ppl have -- although i was under the impression it was no longer under active development
[22:37:18] <conan> disown: where as drools is much more java like.
[22:37:26] <conan> disown: for isntance in consequences you can use just a java or mvel block.
[22:37:51] <conan> disown: you'll need to look to drools 5.0, about to be released, to get the event processing and workflow
[22:37:58] <disown> conan: Well, if I have a rule that says "lights on at 7pm, off at 10pm" and one "light on on sensor 1, lights off 1 minute later", you see what happens when someone walks into the room at 8 pm
[22:37:59] <segun> vinse: I have never heard of it until some moment ago
[22:38:11] *** tom17bombadil has quit IRC
[22:38:23] <conan> disown: http://blog.athico.com/2009/01/drools-50-m5-new-and-noteworthy-release.html links to M1, M2, M3/M4 release notes.
[22:39:00] *** bindaas has quit IRC
[22:39:13] <segun> I was trying to implement something similar, I posted it on my blog and someone pointed me to BeanShell. I have always been in this room and no one have even has made a mention of BeanShell
[22:39:15] <conan> segun: yes I konw beanshell, use MVEL instead
[22:39:19] <disown> conan: I will need to have rules like this instead: "between 7pm and 10pm lights on prio1", "on sensor1 and one minute further, lights on". These are the "state wishes" :)
[22:39:21] <conan> it's much faster and more powerful.
[22:39:27] *** zed_DX has joined ##java
[22:40:03] <conan> well drools supports the full temporal set of events
[22:40:12] <conan> sorry set of comparators
[22:40:18] <segun> Right now the news is that BeanShell is now a JSR 274 and Sun is including it in netbeans
[22:40:22] <conan> before/after/co-incides/between
[22:40:42] *** SoraCross has quit IRC
[22:40:42] *** resmo has quit IRC
[22:40:46] <conan> you also have duration rules. so you can have a rule that is true at 7pm, but won't fire unless it's been true for a given duration
[22:40:52] <conan> and you can check for absence of evets
[22:40:53] <conan> events
[22:41:18] <conan> if a buyacknowledgementevent doesn't happen within 10 minutes of the buyorderevent
[22:41:20] <conan> that sort of thing
[22:41:36] <conan> and you can window analysis, average stock price over last 5 minutes
[22:41:42] <Sou|cutter> Are there any concurrency problems with this lazy loading class? http://rifers.org/paste/show/8723
[22:42:18] <conan> segun: beanshell hasn't had an update in about 5 years, it's abandoned.
[22:42:32] <conan> segun: use MVEL it's faster and more powerful http://mvel.codehaus.org/
[22:42:35] <disown> conan: Sounds good. I will read up on it. Thank you for the explination
[22:42:39] <latebind> Sou|cutter : you dont like semaphore?
[22:42:49] *** staykov has joined ##java
[22:42:51] *** jottinger has quit IRC
[22:42:59] *** jottinger has joined ##java
[22:43:13] <disown> explanation.
[22:43:16] <latebind> Im not sure about the reentrant locks but Ive always used semaphores on my singletons
[22:43:58] *** Spike1506 has quit IRC
[22:44:14] <segun> conan: All I want to do is a java interactive shell
[22:44:15] <Sou|cutter> latebind: this isn't a singleton so much as a class to avoid people writing bad lazy loading code (although frequently it'd be used for singletons, yea)
[22:44:23] <conan> segun: use MVEL.
[22:44:29] <disown> conan: Oh, one more thing. Is drools really heavy? Need it to run on embedded...
[22:44:38] <conan> disown: it's embedded.
[22:44:43] *** hardwired has joined ##java
[22:44:47] <conan> disown: it's as heavy as the rules and data you insert.
[22:44:58] <conan> but it's more lightweight than other engine
[22:45:05] <conan> unlike jess we work off pojos out of the bo
[22:45:05] <conan> box
[22:45:19] <disown> ok. Sounds good :)
[22:45:29] <segun> conan: sure I am checking out MVEL
[22:45:34] <hardwired> 'llo. I discovered that when I build and deploy my project with netbeans, utf-8 characters work, however if I use ant in the console, they don't. where could the difference be found?
[22:45:42] <conan> segun: it has a powerful command line shell
[22:45:45] *** ahughes has joined ##java
[22:46:58] *** android6011 has joined ##java
[22:47:03] <segun> thanks conan
[22:47:27] <conan> also the MVEL author is always around and helpful
[22:48:13] <Sou|cutter> latebind: still, it's true that you could probably use a semaphore instead of a r/w lock... might be better
[22:48:13] <android6011> what the easiest way to create a 4 digit random number
[22:48:22] <latebind> Sou|cutter : I have only had good experiences with semaphore, I'd use that. but otherwise the code looks thread safe provided that reentrantlock is created with fair access enabled (IE true in constructor)
[22:48:27] *** disown has quit IRC
[22:48:46] <latebind> ReentrantReadWriteLock lock = new ReentrantReadWriteLock(true);
[22:49:19] <ldam> android6011, using Math.random()?
[22:49:47] <android6011> im using nextInt for my other random numbers but I just dont know how to limit it to only 4 digits
[22:49:54] <Sou|cutter> latebind: I'm not sure I understand the implication of fairness here
[22:49:57] <Sou|cutter> can you explain?
[22:51:01] *** jabalsad has quit IRC
[22:51:07] *** KristopherWindso has quit IRC
[22:51:19] *** jabalsad has joined ##java
[22:51:51] <latebind> Sou|cutter : the way I understand is that (with semaphore as well) if the policy is set to "fair" then it is strict queue , but if it is not fair then threads can barge or jump their place in the queue
[22:52:15] <Sou|cutter> yeah, I think that's accurate
[22:52:41] *** Frostix has joined ##java
[22:53:49] <Sou|cutter> Ahh, ok, I think I see where that could come into play... good advice
[22:53:57] <Sou|cutter> javabot: latebind++
[22:53:58] <javabot> latebind has a karma level of 5, Sou|cutter
[22:54:06] <latebind> tx! :)
[22:54:08] *** batcoder-7 has joined ##java
[22:54:14] *** Frostix has quit IRC
[22:54:14] <batcoder-7> kinda stupid question
[22:54:27] <batcoder-7> is there any mini java implmentations out there?
[22:54:47] <latebind> batcoder-7 : apart from me?
[22:54:51] <latebind> j2me\
[22:55:06] *** panorama_tdk has quit IRC
[22:55:21] <batcoder-7> huh?
[22:55:33] <Sou|cutter> batcoder-7: other than j2me, which is intended primarily for embedded use, no
[22:55:47] <batcoder-7> how small is that?
[22:55:48] <Sou|cutter> ~tell batcoder-7 about j2me
[22:55:48] <javabot> batcoder-7, jme is the Java Micro Edition. It is used for embedded devices such as cell phones and PDAs. See http://java.sun.com/javame/index.jsp and #j2me
[22:56:48] <batcoder-7> is it less then 5mb?
[22:56:56] <epalm> i've been given a project to manipulate xml with java. this is very bad news :(
[22:57:06] <cheeser> bah
[22:57:08] <cheeser> it's easy
[22:58:18] *** DeadEd_ is now known as DeadEd
[22:58:26] <hardwired> 'llo. I discovered that when I build and deploy my project with netbeans, utf-8 characters work, however if I use ant in the console, they don't. where could the difference be found?
[22:58:56] <svm_invictvs> Sou|cutter, batcoder-7: I don't know if you consider Android a "mini" java implementation.
[22:59:08] <svm_invictvs> Blu-Ray java
[22:59:09] <batcoder-7> how small is it?
[22:59:21] <svm_invictvs> batcoder-7: what kind of device are you trying ot run it on?
[22:59:35] <batcoder-7> a pc
[22:59:38] <epalm> cheeser: some files have already been written, and include a 1000-line method. containing a 700-line try/catch block. which, not surprisingly, catches (Exception e) :sadface:
[22:59:42] <batcoder-7> but i have a 5 mb limitation
[22:59:53] <svm_invictvs> epalm: oh snap.
[23:00:06] <svm_invictvs> batcoder-7: For java heap space?
[23:00:29] <epalm> svm_invictvs: this is some bullshit java right here http://paste.ifies.org/300
[23:00:34] <latebind> batcoder-7 : 5MB is a lot if you use it wisely
[23:00:39] <batcoder-7> how big is the regular java ?
[23:00:46] <svm_invictvs> 15, I think is the default?
[23:00:51] <batcoder-7> 15 mb?
[23:00:57] <svm_invictvs> of java heap space
[23:01:02] *** modjor has joined ##java
[23:01:05] <svm_invictvs> batcoder-7: you can limit the JVM's memory usage
[23:01:11] *** rollins has quit IRC
[23:01:25] <batcoder-7> no; no the size of the runtime ?
[23:01:34] <svm_invictvs> batcoder-7: Oh. WHy ar eyou limited to 5mb?
[23:01:43] <batcoder-7> don't asl :P
[23:01:45] <batcoder-7> asl
[23:01:46] <modjor> hi all...what the demand out there for jobs in java ee ?
[23:01:47] <batcoder-7> ask
[23:02:36] *** hardwired has quit IRC
[23:02:59] <latebind> epalm : thats pretty ugly
[23:03:00] <svm_invictvs> batcoder-7: Is this for a special application?
[23:03:07] <epalm> latebind: ................ :(
[23:03:15] <batcoder-7> not really
[23:03:20] <latebind> epalm : can you start again?
[23:03:29] <latebind> ie create new code
[23:03:34] <svm_invictvs> batcoder-7: so then why are you looking for a full distribution in under 5mb?
[23:03:34] *** squi has joined ##java
[23:03:41] <conan> anyone know any good simple embedded jta libraries? I'm looking at simple-jta,but it hasn't been maintained in a while. anything else?
[23:03:46] <epalm> latebind: well, i want to, but the person who wrote this abomination still works here
[23:03:48] <batcoder-7> i didn;t say i needed afull
[23:03:59] *** batcoder-7 has left ##java
[23:04:04] <latebind> epalm : so? he should lend a hand
[23:04:14] <epalm> latebind: but if i WERE to write it again, what about something like groovy that has native xml syntax
[23:04:14] *** simplismente has joined ##java
[23:04:31] <simplismente> guys can i run jsp under apache ebserver?
[23:04:34] <svm_invictvs> batcoder-7: If you told me something like it was to be deployed on a kiosk with limited disk space then I'd say just strip out of the default distribution all the unnecessary classes.
[23:05:15] *** sebr has joined ##java
[23:05:57] <latebind> epalm : there are many great xml frameworks for java, and using one of those combined with good common sense and avoidance of hard coding the crap out of a massive file should get you somewhere quickly, alot quicker then fixing/maintaining that file
[23:06:26] <latebind> ~xom
[23:06:27] <javabot> XOM is a high-performance XML object model for Java, at http://www.xom.nu - it has the advantage of being designed by and for programmers, and actually does a much better job than DOM4J or JDom.
[23:06:33] <simplismente> guys can run jsp under apache webserver anybody?
[23:06:44] <epalm> latebind: there are about 40 of these files, each "slightly" different than the next, minimal inheritance used.
[23:06:51] <epalm> latebind: largest one is 8000 lines :O
[23:07:37] <epalm> i'll read up on "xom". no comments on using groovy for xml-happiness?
[23:07:45] *** Sulis has quit IRC
[23:07:54] <latebind> its also good, there are so many good xml frameworks
[23:08:36] <latebind> You'll be surprised how quickly you can rewrite a system with a good framework
[23:08:53] <latebind> jaxb is also great, my favourite
[23:09:02] *** bhushanvmishra has quit IRC
[23:10:22] <andrew_> anyone have any links to resources explaining how one might develop asp.net style controls for jsp projects?
[23:10:38] <modjor> simplismente...i believe u have to install a tomcat webcontainer
[23:10:49] <ernimril> ~~modjor aolbonics
[23:10:49] <javabot> modjor, aolbonics is using unnecessary abbreviations such as 'u', 'r', 'ur', 'thx', etc. Using this language depicts you as an imbecile in the eyes of the helpful regulars in this channel, and is generally not tolerated. If you want intelligent answers, the least you can do is speak intelligently. Additionally arguing about this rule will get you nowhere except banned. Have a nice day!
[23:10:56] <epalm> andrew_: could check out DisplayTag, i used it to automate <table> construction and pagination
[23:11:11] <andrew_> ill give it a look
[23:11:18] <epalm> it comes with a bunch of jsp tags, and it's open source so you can see how they've done it
[23:11:18] <andrew_> im more interested in html reuse
[23:12:18] <modjor> lol at aolbonics. you can run jsp webpages on apache by using a tomcat webcontainer
[23:12:38] <andrew_> epalm: ie. i have the same form pasted in a dozen places in different jsp files
[23:12:48] *** TheCastor has quit IRC
[23:13:06] *** scorchsaber has quit IRC
[23:13:25] <modjor> so what the job outlook there for java ee? anybody
[23:16:52] *** Weems has joined ##java
[23:17:56] *** cl4udio has joined ##java
[23:19:44] <Sou|cutter> modjor: hard to quantify.
[23:19:59] <cheeser> it's looking good for me!
[23:20:42] <Sou|cutter> modjor: Look around at java job postings to get a feel what people are looking fo
[23:20:44] <Sou|cutter> *for
[23:20:59] <svm_invictvs> ugh
[23:21:09] <segun> Sou|cutter: what people are looking for is crazy
[23:21:09] <svm_invictvs> what's that HashMap that ignores the .hashcode and .equals method?
[23:21:12] *** juacom99 has left ##java
[23:21:18] <Sou|cutter> segun: True
[23:22:08] <Sou|cutter> svm_invictvs: If you're depending on hashCode or equals to get called for something, that's kinda wtf
[23:22:12] <serrghi> without sounding too stupid, what exactly is "datainvariant" ?
[23:22:43] <segun> modjor: They want you to be able to do everything, manage Database, develop, do networking, you must know struts, hibernate, spring, maven and ant. You must have at least 5 years experience working in a respectable company.......
[23:23:02] <svm_invictvs> Sou|cutter: No, i just wanna look it up by reference.
[23:23:02] <cheeser> ~~ segun google datainvariant
[23:23:03] <javabot> http://letmegooglethatforyou.com/?q=datainvariant
[23:23:08] <ernimril> svm_invictvs: you are probably looking for TreeMap which uses a comparator, but it is not a HashMap, it is just a Map
[23:23:25] <Sou|cutter> aight
[23:23:26] <cheeser> new google operation++
[23:23:38] *** simplismente has quit IRC
[23:23:47] <svm_invictvs> ~IdentifyHashMap
[23:23:47] <javabot> svm_invictvs, I have no idea what IdentifyHashMap is.
[23:23:50] <svm_invictvs> ~javadoc IdentifyHashMap
[23:23:51] <javabot> I don't know of any documentation for IdentifyHashMap
[23:23:56] <svm_invictvs> ~javadoc IdentityHashMap
[23:23:57] <javabot> svm_invictvs: http://is.gd/i9cE [java.util.IdentityHashMap]
[23:24:03] *** modjor has quit IRC
[23:24:04] <serrghi> yea but didnt really find any good explination for that :/
[23:24:13] <svm_invictvs> cheeser: New javabot?
[23:24:20] <segun> modjor: looking at the list, you will think it's a job description for the new robot in town
[23:24:25] *** magcius has quit IRC
[23:24:30] <svm_invictvs> cheeser: Did you add the parallelizing code to javabot?
[23:24:43] <svm_invictvs> Sou|cutter: IdentityHashMap
[23:25:08] <cheeser> svm_invictvs: 3.0!
[23:25:09] *** T-Hawk has joined ##java
[23:25:26] <svm_invictvs> 3.0:"?
[23:25:28] <svm_invictvs> ~source
[23:25:28] <javabot> you can find my source at my project site http://kenai.com/projects/javabot
[23:25:55] *** durka42 has quit IRC
[23:25:55] <svm_invictvs> cheeser: ^_^
[23:26:04] <svm_invictvs> cheeser: Did you add that parallelizing code?
[23:26:15] *** ja-barr has joined ##java
[23:26:17] <cheeser> working on it. it clearly doesn't work just yet...
[23:26:23] <svm_invictvs> I see.
[23:26:26] <cheeser> the javadoc parsing kills it.
[23:26:51] <svm_invictvs> cheeser: I had started to write some. I'll just scrap it.
[23:27:31] <svm_invictvs> Is it in kenai?
[23:27:40] <svm_invictvs> The code you're wokring on?
[23:27:41] <cheeser> hrm. i wonder if it's because i ran the javadoc in a private method...
[23:27:43] <cheeser> yeah.
[23:27:48] *** lem has joined ##java
[23:28:00] <lem> where does FileInputStream search for a file ?
[23:28:01] <cheeser> the private message stuff isn't queued up...
[23:28:10] <cheeser> lem: it doesn't search
[23:28:13] <svm_invictvs> I just started to run each request in a thread pool executor and just let the bot do the outbound queuing.
[23:28:18] <cheeser> ~javadoc FileInputStream
[23:28:18] <javabot> cheeser: http://is.gd/i9ew [java.io.FileInputStream]
[23:28:23] <cheeser> svm_invictvs: that's what I have now actually
[23:28:26] <svm_invictvs> Once again, I can't seem to get a test bot running.
[23:28:30] <svm_invictvs> ><
[23:28:38] <cheeser> check out the latest copy
[23:28:42] <cheeser> should be much simpler.
[23:28:42] <svm_invictvs> When I get home..
[23:28:55] <svm_invictvs> And perahps I can actually test the flood thing I wrote.
[23:28:58] <svm_invictvs> See if itw orks.
[23:29:22] *** magcius has joined ##java
[23:29:23] *** Carnage\ has quit IRC
[23:29:29] <lem> InputStream it=new FileInputStream("Testtext.txt");
[23:29:37] <lem> where does it search for Testtext.txt?
[23:29:43] <cheeser> the currect directory
[23:29:47] <cheeser> current
[23:29:58] <lem> the file IS in the current directory
[23:30:09] <cheeser> then it should find it just fine.
[23:30:31] <lem> even though I start the app with an ant script?
[23:30:37] <cheeser> ~tias
[23:30:37] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[23:30:44] <T-Hawk> hey guys... anybody know how i would go about placing a JFrame next to another JFrame? posibly lock it in place
[23:31:19] *** Yustme has quit IRC
[23:31:42] <lem> I tried
[23:32:05] <AMcBain> T-Hawk: you can't really "lock it into place" easily, if it is decorated ... I think. However, it is sorta easy to get them side-by-side ... have you considered using a JDesktopPane, and keeping all the "frames" internal to one enclosing Frame?
[23:32:06] <cheeser> T-Hawk: did you try setLocationRelativeTo() ?
[23:32:08] *** Carnage\ has joined ##java
[23:32:52] <T-Hawk> AMcBain, didn't know about JDesktopPanes, so no.. might look into that... and cheeser doesn't that position it more or less in the middle of the other frame?
[23:33:09] <AMcBain> T-Hawk: yeah, RealtiveTo does taht.
[23:33:20] <cheeser> T-Hawk: dunno
[23:33:29] <T-Hawk> AMcBain, that's what i thought, that's what i use for a few dialog boxes :)
[23:33:29] <cheeser> i've only used it to center on the screen
[23:33:39] *** sphenxes has quit IRC
[23:33:49] *** LostMonarch has quit IRC
[23:35:27] *** ciaron has quit IRC
[23:35:48] *** hendrixski has quit IRC
[23:36:26] *** TheCastor has joined ##java
[23:38:39] <cheeser> svm_invictvs: ok. i fixed that threading bug.
[23:38:39] <cheeser> 8^)=
[23:38:46] <svm_invictvs> Which one?
[23:38:51] <svm_invictvs> The javadoc parsing one>
[23:38:52] <svm_invictvs> ?
[23:39:07] <lem> ok it works now
[23:39:16] <lem> thx for kicking my ass ;)
[23:39:18] <cheeser> yeah. private messages weren't being queued in the executor so it blocked everything while it parsed the javadoc
[23:40:04] *** wtfzz has quit IRC
[23:40:15] *** lem has quit IRC
[23:40:51] *** mohax has quit IRC
[23:41:05] *** slango has quit IRC
[23:41:44] *** T-Hawk has quit IRC
[23:41:46] *** spiderbyte has joined ##java
[23:43:16] <vinse> hrmph
[23:44:07] <cheeser> ~stats
[23:44:08] <javabot> I have been up for 0 days, have served 91 messages, and have 3847 factoids.
[23:44:36] <epalm> 3847 factoids in 0 days, wow!
[23:44:57] *** Sebboh has joined ##java
[23:45:00] <cheeser> that's just how many it knows. 8^)=
[23:45:17] <Sebboh> Hi. I'm running out of permgenspace. At first I didn't realize that my JVM only dedicated 64mb to that, regardless of how I changed the -Xmx setting. (Currently two gigs.) So, how much should I give the permgen heap? Is there a document that I could read on this subject?
[23:45:19] <vinse> i'm having a dilemma with ajax and jsps ... if the response is long, the jsp page will write "success" headers even if an error occurs. this makes it hard for the browser to know if the response it got is actually any good, since the "error page" part of the response can end up buried way at the end
[23:46:20] <vinse> i know i can increase the jsp buffer size, but i'm not psyched to set it to "as big as my longest response could possibly be"
[23:46:38] <Sebboh> Uh, to clarify, my jvm is running JBoss.
[23:48:44] *** ramdam has quit IRC
[23:48:46] *** pstickne has joined ##java
[23:49:23] <svm_invictvs> cheeser: I see.
[23:49:46] *** gregor_k has quit IRC
[23:50:03] *** jabalsad has quit IRC
[23:50:21] *** jabalsad has joined ##java
[23:50:32] *** andrew_ has quit IRC
[23:50:39] *** CodeWar has joined ##java
[23:50:43] *** latebind has quit IRC
[23:52:19] *** morkar- has quit IRC
[23:52:27] <CodeWar> public class Surface{ public int getOffOffset(){} int getHiddenOffset(){}}
[23:52:53] <CodeWar> I dont want getHiddenOffset to be exposed to clients of this class outside my jar ( component) I could give it default visiblity that would work except..
[23:53:00] *** `House` has joined ##java
[23:53:08] *** segun has left ##java
[23:53:09] <CodeWar> now classes in my own module ( jar ) cannot access it either unless they are in the same package.
[23:53:27] *** roue has quit IRC
[23:54:08] <cheeser> you're kinda screwed
[23:54:11] <CodeWar> I have a fugly solution : subclass Surface -> InternalSurface make it public so all classes internal to my module can access it
[23:54:26] <cheeser> they can still cast
[23:54:28] <CodeWar> and place it in a package that my module does not export ( I m using OSGI )
[23:55:08] <CodeWar> cheeser, actually they wont be able to access it OSGI equinox prevents that but the fugly part is that I have to internally do casts
[23:55:09] <cheeser> ah. well, just don't export that concrete class
[23:55:44] *** popcornPanic has joined ##java
[23:55:56] <CodeWar> interface IAllocator{ Surface allocSurface(..); void freeSurface(Surface); }
[23:56:13] <CodeWar> now internally my freeSurface routines have a downcast
[23:56:27] <popcornPanic> hi i have a file that has lines with text and then randomly lines of whitespace. is there a method to remove those lines of whitespace?
[23:56:41] <cheeser> loop
[23:57:03] <cheeser> or load the file into a string and replaceAll()
[23:57:32] *** bas-i has quit IRC
[23:58:29] *** bas-i has joined ##java
[23:58:41] *** bas-i has quit IRC
[23:58:42] *** magcius has quit IRC
[23:58:51] *** jdolan_ has quit IRC
top

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