Switch to DuckDuckGo Search
   February 4, 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:12] *** ces200 has left ##java
[00:00:57] <TryNiX> hmm, what are the languages that any decent computer scientist is expected to be at least intermediate with? or there is no such thing?
[00:01:06] *** dvayanu has joined ##java
[00:01:42] <cybereal> a computer scientist? is anyone ever actually just a "computer scientist" ?
[00:02:06] *** Odin79 has joined ##java
[00:02:16] <TryNiX> a graduate of computer science.. ?
[00:02:39] <jottinger> C
[00:02:45] <jottinger> smalltalk or something similar
[00:02:46] *** Angel-SL has joined ##java
[00:02:46] <jottinger> lisp
[00:02:53] <jottinger> brainfuck
[00:02:58] <cybereal> I don't know, is it enough to have studied a scientific field to label you a scientist? I would expect you practice the scientific method within the field of computers to be a scientist :)
[00:03:02] <cybereal> heh
[00:03:37] <idea4good> cybereal : can you please look at the question i asked
[00:03:41] <cybereal> idea4good: no
[00:04:24] <idea4good> go and fuck ur self then
[00:04:24] <TryNiX> cybereal, ah, I get the point =p should have asked what programming languages any self-proclaimed computer scientist should decently know :P
[00:04:47] <cybereal> No.. I think you still missed my point :)
[00:04:58] <cybereal> Why do you care? Presumably so you can have an improved chance of getting a job right?
[00:05:49] *** Meddi has joined ##java
[00:06:03] *** scott_w has quit IRC
[00:06:15] <TryNiX> not really... I am just comparing it to math, where if you don't know fourier transformation, you will always miss the chance of solving problems easily when fourier transformation is applicable on them
[00:06:24] <TryNiX> so basically just to not miss chance of doing things nicely and easily =p
[00:06:36] <TryNiX> but then thats too broad -_- guess I just shot my self
[00:06:46] <Meddi> Hi. URL: http://eugeneciurana.com/pastebin/pastebin.php?show=39789 ---> Why do lines 18 and 19 return the same object??
[00:06:54] <cybereal> TryNiX: then language knowledge is not a concern
[00:07:05] <cheeser> the spring api is huge.
[00:07:08] <cybereal> TryNiX: data structures and algorithms are your first concern
[00:07:10] <cheeser> i'll add it.
[00:07:16] <cheeser> i can always remove it later.
[00:07:21] *** teralaser has joined ##java
[00:07:29] <cybereal> TryNiX: those are the concepts you'll apply across every language you ahve to learn for whatever purpose
[00:08:16] <cheeser> ~javadoc -list
[00:08:16] <javabot> cheeser, I know of the following APIs: JDK ( http://java.sun.com/javase/6/docs/api/ ) , JEE ( http://java.sun.com/javaee/5/docs/api/ ) , Spring ( http://static.springframework.org/spring/docs/2.5.x/api/ ) , Wicket ( http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/ )
[00:08:19] <cheeser> w00t
[00:08:26] <TryNiX> cybereal, thanks :) that will be my first priority for now then :)
[00:08:52] * Meddi greetings btw :-)
[00:09:13] <paztulio_> TryNiX: maybe one assembly language, a compiled language and one for scripting.I did asm (8051 uC), Java and C.
[00:09:15] *** soa2ii has joined ##java
[00:09:18] <cybereal> TryNiX: if you just want to hedge your bets though, learn C, Java, Ruby, and some random ML and/or FP language and you should be able to pick up any other language pretty quickly. At this point, I expect myself to be able to work at least moderately effectively in any given language within a few days time, given resources about that language are available.
[00:09:22] *** Junior has quit IRC
[00:09:23] *** Varox has quit IRC
[00:09:24] <cheeser> ~javadoc ApplicationContext
[00:09:25] <javabot> cheeser: http://is.gd/ihNV [org.springframework.context.ApplicationContext]
[00:09:28] <cheeser> tee hee hee
[00:09:38] <soa2ii> http://rafb.net/p/89VOib83.html why does java not executes the command? It just prints it.
[00:09:42] <cheeser> done!
[00:09:48] <cheeser> the bot kicks ass.
[00:09:56] <soa2ii> sorry... got the wrong paste :P
[00:09:58] <cybereal> TryNiX: the idea is to expose yourself to different ways that languages approach problems, so you don't get stuck in a rut like so many C++ losers.
[00:10:05] <soa2ii> The comment is gone of course :P
[00:10:07] <cheeser> k. time to help fix dinner.
[00:10:10] <cheeser> later all
[00:10:23] * Meddi wonders if anyone could help him with his 'silly' question :-))
[00:10:26] <Meddi> laters cheeser !
[00:10:32] <teralaser> just is.gd/TvDiner , cheeser
[00:10:37] <cybereal> ~~ Meddi ask to ask
[00:10:37] <javabot> Meddi, ask to ask is asking a useless question before your main question. For example, "Anyone use eclipse?". If I answer "Yes" and can't answer your followup question, we just wasted each others time. If I answer "No", I wasted your time and annoyed everyone else in the channel a little bit by adding pointless noise. So just ask the question you were going to ask as if someone already said yes.
[00:10:44] <Meddi> i did, shall I repeat?
[00:10:55] <Meddi> i mean i did ask;p
[00:10:57] <TryNiX> cybereal, I am moderately exposed to java so far, and none to c++, so maybe I'll learn on C and Ruby as I go along, while concentrating on algorithms and data structures
[00:11:06] <TryNiX> paztulio_, thanks for your reply :)
[00:11:06] <cybereal> Meddi: guess so, I didn't see it
[00:11:11] <Meddi> Hi. URL: http://eugeneciurana.com/pastebin/pastebin.php?show=39789 ---> Why do lines 18 and 19 return the same object??
[00:11:15] <Meddi> thanks :)
[00:11:45] <nDuff> Meddi, what do you expect them to do?
[00:11:52] <cheeser> Meddi: because you add the same object to both lists.
[00:12:10] <TryNiX> cybereal, although I seem to notice alot of people mentioning python now adays =p
[00:12:13] <cybereal> TryNiX: C's safe because basically every remotely popular platform's system level lingua franca is C, even apple's primary high level app dev API language, Obj-C is ANSI C "plus stuff." So no harm there. Java's just good because it's damned popular, the other suggestions were examples of languages that'll give you a different set of common solutions.
[00:12:22] *** schasi has quit IRC
[00:12:28] <cybereal> TryNiX: python's ok, I knew python before I knew java :)
[00:12:40] <Meddi> nDuff, I want to have a copy of all the objects in auto1.getStates() arrayList<state>
[00:12:45] *** schasi has joined ##java
[00:12:53] <cybereal> but I don't know that python is sufficiently different from java to really give you much value, that's a matter of opinion of course
[00:13:11] <nDuff> Meddi, so you want to make copies of objects, rather than adding new ones? Where in your code are you doing that? (If not, why would you expect it to be getting done?)
[00:13:19] <sombriks> if you want copies try to use the new operator. then copy properties
[00:13:22] <nDuff> s/adding new ones/just referring to the same ones/
[00:13:34] <TryNiX> cybereal, makes sense :P
[00:13:44] <sombriks> your code make copies of references
[00:13:46] <Meddi> I thought that State st = (State)statesIt.next(); creates a new object identical to the other one
[00:13:52] <Meddi> :\
[00:13:55] <Meddi> how can I fix that?
[00:14:00] <sombriks> nope as you can sse
[00:14:22] * nDuff thinks Python is fully distinguishable from Java in terms of the idioms they encourage.
[00:14:23] <sombriks> try to make copies for each one before add it
[00:14:34] <sombriks> line 13 to 16
[00:14:35] <teralaser> Meddi : Read about clone and deepClone :D
[00:14:42] <sombriks> just copy references
[00:14:49] <cybereal> nDuff: not as much as ruby... and I assume the guy doesn't have infinite time to learn every random language out there
[00:14:50] <sombriks> that't it
[00:15:00] *** Carnage\ has quit IRC
[00:15:03] *** raboof has left ##java
[00:15:06] <sombriks> ~clone
[00:15:07] <javabot> Making deep copies of objects: http://java.sun.com/developer/JDCTechTips/2001/tt0410.html#making Cloning Objects: http://java.sun.com/developer/JDCTechTips/2001/tt0306.html#cloning Making defensive copies of objects: http://java.sun.com/developer/JDCTechTips/2001/tt0904.html#tip1 also see: http://mindprod.com/jgloss/clone.html
[00:15:08] <cybereal> TryNiX: oh but if you want to work for google, you'll want to learn python :)
[00:15:26] <Meddi> thank yu sombriks
[00:15:32] <Meddi> and teralaser
[00:15:35] <cybereal> I get regularly headhunted by google because I know both java and python...
[00:15:40] <sombriks> :)
[00:15:46] <TryNiX> cybereal, and you don't wanna work there?? :P
[00:15:52] <cybereal> no, not really
[00:15:53] <teralaser> haha
[00:15:56] *** idea4good has quit IRC
[00:16:00] <cybereal> I like my job, and where I live
[00:16:01] <Meddi> I am so useless :p
[00:16:08] * nDuff was invited to their Austin office housewarming... and then, not a year later, they just closed it.
[00:16:47] <Apocalisp> I'll bet they got cool t-shirts and had fun with their segways though.
[00:16:59] <TryNiX> cybereal, what about functional programming languages. do they have any demand or usage overall?
[00:17:22] <nDuff> Apocalisp, ...nifty shirts, yes, and the Googletinis they served were quite tasty
[00:17:29] <cybereal> I've never had the requirement to use them myself, but I think they are definitely worth knowing if only so you can reduce some of the stupid assumptions that seem to be displayed by people who've never worked with them...
[00:18:33] <cybereal> and if I had my way, the software I worked on would be architected in such a way that FP languages would definitely be used interspersed throughout the whole system, where they would best expression algorithms, etc.
[00:18:38] *** alek_b has joined ##java
[00:19:28] <TryNiX> interesting =p guess I'll do quite a bit of reading
[00:19:39] *** blahjake has quit IRC
[00:20:14] *** mele- has joined ##java
[00:20:17] <nDuff> TryNiX, see http://www.catb.org/~esr/faqs/hacker-howto.html#skills1 for ESR's perspective
[00:20:36] <cybereal> just be warned that ESR is a self-absorbed prick, though he makes good points here and there
[00:21:04] <TryNiX> and ESR is? :P sorry if I am ignorant
[00:21:08] * nDuff 's first thoughts on ESR are still "eh, the guy plays a mean jazz flute"
[00:21:32] <nDuff> TryNiX, Eric S. Raymond. Founder of the "Open Source" movement, as distinct from the "Free Software" movement.
[00:21:37] *** Kalianyia has quit IRC
[00:22:53] *** jerkface03 has joined ##java
[00:23:44] <TryNiX> nDuff, thanks =p
[00:24:00] <cybereal> TryNiX: honestly though, in CS the whole point is to learn the concepts that are applied in languages, so I wouldn't get too worried about being an expert at a ton of languages, just knowing a basic concept of different ways different languages/types of languages approach the same problems is good
[00:24:52] *** schasi has quit IRC
[00:25:09] <cybereal> I probably benefited more from learning about Finite State Automata than learning say... php
[00:25:29] <Apocalisp> word
[00:25:41] *** Copter has quit IRC
[00:25:59] *** pirho has quit IRC
[00:27:07] <r0bby> php?
[00:27:10] *** HexKey has quit IRC
[00:29:40] *** blankthemuffin has joined ##java
[00:29:40] *** FireSlash has joined ##java
[00:30:39] <cybereal> TryNiX: oh. my. god. I Completely forgot to tell you to learn prolog!
[00:30:50] * cybereal is ashamed
[00:31:04] <TryNiX> its functional programming isnt it ? :P
[00:31:13] <cybereal> declarative logic programming
[00:31:48] <TryNiX> hmm, interesting.
[00:33:04] <cybereal> techniques and tools usually associated with AI are becoming common-place in lots of industries (take a look at medical software for example)
[00:33:45] *** Mike-N-Go has quit IRC
[00:33:57] *** deiselton has joined ##java
[00:34:16] <TryNiX> and I guess prolog is the most language for that? then it's worth a read too
[00:34:32] <deiselton> i need some help with a little logical error i cant find... if i paste bin a small section of code is there any chance someone could help me out?
[00:34:34] <cybereal> it's a common one, sorta like using C to represent procedural
[00:35:31] <poseidon> What are some good foss java programs?
[00:35:36] <cybereal> TryNiX: basically instead of writing a set of linear instructions you write rules or, relationships rather, and kind of query against them
[00:35:37] *** Epoch`_ has quit IRC
[00:35:39] <poseidon> for linux
[00:35:47] *** thepointer-work has joined ##java
[00:35:49] <nDuff> cybereal, ...heh; I just came out of a 5-year stint at a medical software startup last year (from which I have a great deal of completely worthless stock); we were the only place I've known yet outside of academia employing computational linguists.
[00:37:23] <cybereal> yeah, well I've already shown how we can expand our current product line with a rules engine like drools or similar, which is based on rete (well, reteOO)
[00:37:24] <nDuff> cybereal, ...that said, we had a domain-specific (declarative) language all that was implemented in on top of a Java core, rather than reusing anything out-of-the-box.
[00:38:48] <cybereal> anyway it's interesting and another useful side of CS to know about I think
[00:39:49] <nDuff> *nod*
[00:42:21] *** ofl_ has joined ##java
[00:43:32] <cybereal> my application of it will be in applying a number of processing rules against messages as they flow through a server (something like JMS but, not JMS) that will potentially change the messages, which will require reconsideration of other rules, etc. without requiring admins/implementors to figure out which order they have to define them in, and will work against highly variable messages
[00:43:37] <cybereal> I think it'll work pretty well
[00:44:42] *** staykov has quit IRC
[00:44:58] *** staykov has joined ##java
[00:47:25] <TryNiX> sounds complicated -_- =p
[00:47:33] <cybereal> well, in java code it is
[00:48:06] <Apocalisp> sounds like data-flow programming
[00:48:33] <cybereal> but in drools, for example, it's actually just a matter of 1) I set up a contextual object to act as the proxy to easy application of state against the engine and 2) a few rules tables that I can actually make in excel if I want, and are trivial to explain to the people who have concerns about the rules but aren't programmers
[00:49:07] <cybereal> the system starts out so simple but everyone wants "just one more capability" that affects the messages, where they go, what they consist of, etc.
[00:49:21] <cybereal> writing it in imperative code is a pain in the ass
[00:49:30] *** Bonix has quit IRC
[00:50:16] *** rollins has quit IRC
[00:50:51] *** Mike-N-Go has joined ##java
[00:52:38] *** poseidon has quit IRC
[00:52:40] <cybereal> Apocalisp: a bit yes
[00:54:04] <cybereal> Apocalisp: incidentally, do you know of any good java tools for this kind of programming?
[00:55:25] *** nmatrix9 has joined ##java
[00:56:25] *** zacs7 has joined ##java
[00:57:47] <cybereal> oy 5pm, this will have to wait
[00:57:48] *** cybereal has quit IRC
[00:58:09] <Apocalisp> cybereal: fj.data.Stream<A> and fj.F<A, B> come to mind. You'd have to implement rules as cokleisli arrows over Stream.
[00:58:36] <Apocalisp> Hmm, maybe that's something for Functional Java 2.18.
[00:58:54] *** zacs7 has left ##java
[00:59:06] <Apocalisp> ah, bollocks
[01:00:12] *** Meddi has quit IRC
[01:05:57] *** sombriks has quit IRC
[01:06:29] *** TryNiX has quit IRC
[01:07:51] *** zanberdo has quit IRC
[01:08:38] *** Cpudan80 has joined ##java
[01:08:43] <Cpudan80> Hello everyone
[01:09:03] <Cpudan80> Gotta brush up on my Java for tutoring this semester
[01:09:12] <Cpudan80> So I figured I'd sit in here ;-)
[01:09:49] <[pwgr]> worst...idea....ever
[01:10:48] <AMcBain> javabot bug:
[01:10:49] <javabot> AMcBain, I have no idea what bug: is.
[01:10:51] <AMcBain> ~info learn
[01:10:51] <javabot> learn was added by: multiHYP on 12-03-2008 at 2:03 AM, EST and has a literal value of: a nickname!
[01:10:52] <javabot> I have no factoid called "learn"
[01:11:09] <AMcBain> ~forget learn
[01:11:09] <javabot> I forgot about learn, AMcBain.
[01:11:18] <Cpudan80> [pwgr]: lol it cant be that bad of an idea
[01:11:28] <Cpudan80> [pwgr]: It's only intro programming that I tutor for....
[01:11:52] <AMcBain> who was working on javabot the other day that I can ping with this ..
[01:12:04] <Cpudan80> ping me
[01:12:15] <AMcBain> uhhh, no.
[01:12:16] <Cpudan80> hrm.... sometimes that works
[01:12:28] <Cpudan80> Are you just trying to measure RTT ?
[01:12:39] <Cpudan80> * Ping reply from AMcBain: 0.52 second(s)
[01:12:51] <AMcBain> Cpudan80: not that kind of ping.
[01:13:32] *** warriorforgod has joined ##java
[01:14:09] *** _spm_Draget has quit IRC
[01:14:23] *** alek_b has quit IRC
[01:14:44] <eidolon> AMcBain: ojacobson and cheeser were, but o's super-frain-bried. i'd wait. :)
[01:14:47] *** SoraCross has quit IRC
[01:14:54] <AMcBain> ah
[01:15:47] *** SummerWO has left ##java
[01:15:53] *** rlubke has quit IRC
[01:19:34] *** durka42 has quit IRC
[01:19:57] *** bas-i has quit IRC
[01:21:24] *** Frostix has quit IRC
[01:21:34] *** mitch0 has quit IRC
[01:22:12] *** rullie has quit IRC
[01:22:34] * nDuff spends several minutes tacking boilerplate code onto subclasses of a type whose interface just changed and gets a sudden hankering for metaclasses.
[01:22:57] <Sou|cutter> what's that? Like a mixin or something?
[01:23:43] *** NotADJ has joined ##java
[01:24:44] <deiselton> any one have any idead when the string the substring is reffering to is 1191101 in this code : int Xcurr = Integer.parseInt(current.substring(1, 3)); Xcurr comes out to 15?
[01:24:54] <deiselton> shouldnt it be 191?
[01:25:07] *** NuMaStresa has joined ##java
[01:25:45] *** orgy` has quit IRC
[01:26:00] *** davidc has joined ##java
[01:26:20] <deiselton> auctually it comes out to 19
[01:26:38] <SJr|Work> What is a good way to implement a map, that is 1-1
[01:26:39] <AMcBain> substring goes from start to end - 1
[01:26:40] <Sou|cutter> deiselton: The second arg to substring is exclusive
[01:27:06] <Sou|cutter> 1 (inclusive) - 3 (exclusive) = 2 chars
[01:27:07] *** cactaur has quit IRC
[01:27:30] <Sou|cutter> the '-' there is meant to indicate a range, not subtraction
[01:27:47] *** Sikul has joined ##java
[01:28:19] <deiselton> oooh ok so i need 1, 4 to get the index 1 through 3
[01:28:28] <AMcBain> yes
[01:28:42] <Sou|cutter> the javadocs are pretty clear on substring IIRC
[01:28:57] <Sou|cutter> ~javadoc String.substring(int, int)
[01:28:58] <javabot> Sou|cutter: http://is.gd/iifN [java.lang.String.substring(int,int)]
[01:29:00] <nDuff> Sou|cutter, http://en.wikipedia.org/wiki/Metaclass; my immediate use case is related to metaclasses' ability (at least in Python) to generate and attach new methods to classes using them.
[01:29:02] * nDuff could also get the effect he's looking for with C++-style generics, but eww.
[01:29:22] <Sou|cutter> nDuff: ahh I get ya
[01:31:04] * r0bby fights the urge to be a fanboy again
[01:31:23] <ayrnieu> what is tempting you?
[01:38:21] *** jsa has quit IRC
[01:39:18] *** FireSlash has quit IRC
[01:42:57] *** gregor_k has quit IRC
[01:43:16] <r0bby> nDuff :P
[01:45:20] *** bitshuffler has quit IRC
[01:46:21] *** emet has joined ##java
[01:49:07] *** matadon has joined ##java
[01:49:11] *** amr has quit IRC
[01:50:07] <cheeser> AMcBain: what's up?
[01:50:29] <AMcBain> There's a bug, do ~info "anything" ... it repeats the info and that it can't find that factoid.
[01:50:32] <AMcBain> ~info hello
[01:50:32] <javabot> hello was added by: cheeser on 10-16-2008 at 9:57 AM, EDT and has a literal value of: <see>hi
[01:50:33] <javabot> I have no factoid called "hello"
[01:50:37] <cheeser> fixed already
[01:50:37] <cheeser> 8^)=
[01:50:43] <AMcBain> okay, good then :)
[01:51:18] <emet> does Java have any libraries for binary RPC
[01:52:34] <matadon> For anybody running on OSX, is there a way to get Java CLI commands to dump their output in UTF8? I run my Mac in Japanese, and it's defaulting to some other encoding (SJIS), rather than the encoding used by Terminal.app.
[01:52:53] *** cyth has quit IRC
[01:52:58] <matadon> Kind of irritating to have to type 'javac foo bar baz 2>&1 | nkf -w' just to see compiler output. :)
[01:55:00] *** riotz has quit IRC
[01:55:49] <ayrnieu> try LANG=C javac ...
[01:56:45] *** rdancer has joined ##java
[01:56:51] <matadon> ayrnieu: Nope.
[01:57:15] <ayrnieu> does that have any effect, or just not the one you want?
[01:58:07] *** Afterlawl has joined ##java
[01:58:27] <matadon> ayrnieu: No effect whatsoever.
[01:59:03] <cheeser> matadon: what's your localtime set to?
[01:59:23] <matadon> cheeser: localtime?
[01:59:32] <cheeser> /etc/localtime
[01:59:39] <cheeser> you're on linux, yes?
[01:59:42] <cheeser> oh. OS X
[01:59:58] <cheeser> yeah. /etc/localtime
[02:00:05] *** ankylose has quit IRC
[02:00:41] <ayrnieu> maybe: javac -J-Dfile.encoding=UTF8 ...
[02:01:05] *** yclian has quit IRC
[02:01:10] *** JoshJ has joined ##java
[02:01:42] <JoshJ> http://pastebin.com/d4f69f5b8 I'm not entirely sure how I'm violating concurrency here :\
[02:01:50] <ayrnieu> no, I wouldn't expect that to work. /me shrugs.
[02:01:50] <JoshJ> (this is not a multithreaded application)
[02:01:56] <Sou|cutter> well, there is a -encoding option for javac but I think it's for the java file encoding, not the output of javac
[02:01:58] <matadon> cheeser: /etc/localtime on OSX contains binary-compressed timezone data; my time zone is set to PDT, though.
[02:02:16] <cheeser> JoshJ: you're modifying the list you're iterating.
[02:02:33] <JoshJ> is proposed.conditions.remove removing it from r as well?
[02:02:33] <matadon> Sou|cutter: Bingo.
[02:02:44] <cheeser> JoshJ: proposed == r
[02:02:57] <cheeser> matadon: java defaults to the locale in which it's run.
[02:02:58] <JoshJ> hrm. i need to new that , don't i?
[02:03:08] <cheeser> so set it to a japanese locale
[02:03:16] <Sou|cutter> cheeser: ah, good idea
[02:03:34] <matadon> cheeser: It is, but the output is all SJIS, not UTF-8, which is what the terminal environment is set for.
[02:03:49] <matadon> So, it's like the CLI tools are ignoring the specified output encoding.
[02:04:12] <matadon> The few solutions I've found online say "Set your terminal encoding to SJIS", but that isn't an option for me.
[02:04:33] <cheeser> apple+, then the advanced tab. at the bottom: international/character encoding.
[02:04:38] <cheeser> you're welcome.
[02:04:39] <cheeser> 8^)=
[02:04:52] <cheeser> whoops. girls are crying. brb.
[02:05:13] <ayrnieu> matadon - javac -J-Duser.language=en ...
[02:05:13] <[pwgr]> woops you beat them too harshly
[02:05:42] <SJr|Work> I asked about this a while ago, when I knew alot less. I need to get access to a specific file in a servlet. Currently we are using ClassLoader.getSystemResourceAsStream(). You guys had said this was a stupid way to go. My question is, would this approach reference the same file accross multiple servlets?
[02:05:50] <matadon> cheeser: Um... Is this in Terminal? They changed the Terminal settings in 10.5, but my terminal is properly configured for UTF8 in Japanese, and I can use a big pile of other console apps with no problems.
[02:06:12] <cheeser> yeah. that's in 10.5.6
[02:06:16] <ayrnieu> I also have sun.io.unicode.encoding
[02:06:29] <cheeser> so set your terminal to SJIS
[02:06:30] <Sou|cutter> SJr|Work: I think you want something more like Thread.current().getContextClassLoader()...
[02:06:42] <cheeser> Sou|cutter: which might be null, iirc
[02:06:44] *** dv_ has joined ##java
[02:06:44] <JoshJ> cheeser, it's still not working: http://pastebin.com/pastebin.php?diff=d6d0f14f2
[02:07:04] <Sou|cutter> cheeser: just a stab in the dark
[02:07:06] <JoshJ> i must have a fundamental misunderstanding of how java treats something =\
[02:07:06] <cheeser> JoshJ: because you're still removing from r
[02:07:11] *** eleftherios has joined ##java
[02:07:27] <SJr|Work> Sou|cutter well currently I'm having a problem where the file it's reading doesn't seem to be anywhere, so I was thinking perhaps it's because the ClassLoader path is shared between all, or a specific servlet
[02:07:37] *** eleftherios has left ##java
[02:07:39] <matadon> Ah, found the problem -- Java6 is slightly broken. Works fine if I downgrade. Probably something in the package; I'll need to fix things there.
[02:08:13] <cheeser> this why everyone should just speak english
[02:08:13] <cheeser> 8^)=
[02:08:30] <ayrnieu> or why OSX should get good Java6
[02:08:37] <matadon> ayrnieu: Yeah, what you said. :)
[02:08:38] <cheeser> works fine for me
[02:08:39] <cheeser> 8^)=
[02:08:57] <JoshJ> i'm clearly missing something here. how do i make proposed an exact copy of r without making it be the same object?
[02:09:12] <cheeser> JoshJ: use a while loop and an Iterator
[02:09:19] <cheeser> then call remove() on the iterator.
[02:09:28] <JoshJ> well, conditions is a HashMap
[02:09:31] <cheeser> what you're doing will end up screwing up the indexing of the loop
[02:09:33] <cheeser> so?
[02:09:41] <cheeser> entrySet().iterator()
[02:10:15] *** tissue has joined ##java
[02:10:17] *** indeterminatus has quit IRC
[02:10:33] *** soa2ii has quit IRC
[02:10:42] <SJr|Work> How can I get the ClassPath in Java, the exact classpath that ClassLoader.getSystemResourceAsStream() will use.
[02:13:28] *** Daniel_H has quit IRC
[02:13:38] <eidolon> goddamnit
[02:13:52] <eidolon> why have various bits of my machine started using the hardware beep for a software bell
[02:14:05] <eidolon> like, bash for tab completion, vim for an end of line, and eclipse for 'no find match'
[02:14:07] * eidolon gripegripe
[02:14:23] * cheeser beeps
[02:14:25] *** dvayanu has quit IRC
[02:14:30] * eidolon kill -9's cheeser
[02:14:51] <cheeser> not owNo matching processes belonging to you were found
[02:15:40] <ayrnieu> sjr, you can get your boot classpath from System.getProperty("java.class.path")
[02:15:51] <cheeser> that's not the boot classpath.
[02:15:59] <cheeser> there is a specific entity called bootclasspath
[02:16:25] <cheeser> k. time to play. later.
[02:17:13] <ayrnieu> ah.
[02:17:51] *** [[thufir]] has quit IRC
[02:19:48] *** fryderyk has quit IRC
[02:21:11] <matadon> Ok, now I'm going to ask a very n00b question: I'm playing around with Jetty, and have written a simple static web server, but I can't seem to import anything from the Jetty JAR package (located in the current directory), so javac just throws out errors. I know that I'm missing something simple... any ideas/
[02:21:14] <matadon> ?
[02:21:52] *** thedatastream has joined ##java
[02:21:56] <Fanook> matadon: the jetty .jar file needs to be on your classpath
[02:22:11] <matadon> So 'javac -cp . FooBarBaz.java' should work, right?
[02:22:16] <ayrnieu> no, that won't work.
[02:22:26] <Fanook> matadon: no. .jar files need to be explicitly included in the classpath
[02:22:59] <matadon> Aaah... that works.
[02:23:00] <matadon> Thanks!
[02:23:09] <Fanook> ~~ matadon classpath
[02:23:09] <javabot> 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
[02:23:21] <matadon> I'm coming back to Java after a very, very, very long hiatus. :)
[02:24:26] <matadon> Fanook, ayrnieu: Thanks.
[02:24:47] *** javver has quit IRC
[02:25:33] *** jdolan_ has quit IRC
[02:26:20] *** amnesiac has quit IRC
[02:26:49] *** iluvgrlzwglasses has joined ##java
[02:28:56] <eidolon> so, jstl / EL question : Current invoice amount is ${currentinvoice.amount}<br>
[02:28:59] <eidolon> that shows '0'
[02:29:13] <eidolon> <c:when test="${#session.currentInvoice.amount == 0}"> <-- that evaluates false
[02:29:16] <eidolon> howcome?
[02:29:51] <eidolon> i'v tried various EL combinations, i can't find the right magic.
[02:29:55] <SJr|Work> Case Sensitivity?
[02:30:06] <SJr|Work> currentinvoice may come from a seperate scope
[02:30:21] <SJr|Work> I'm also very weak in EL so
[02:30:21] <eidolon> scope is definately 'session' - it's in the sessionspace
[02:30:35] <eidolon> aha!
[02:30:37] <SJr|Work> Hmmmm ${currentInvoice.amount} instead of ${currentinvoice.amount} perhaps?
[02:30:45] <eidolon> <c:when test="${sessionScope.currentinvoice.amount == 0}">
[02:30:46] <eidolon> that worked
[02:30:54] <SJr|Work> Ah
[02:30:55] <SJr|Work> excellent
[02:31:00] <eidolon> i didn't notice the cap I in the middle there.
[02:31:49] *** NuMaStresa has quit IRC
[02:31:51] *** Sulis has quit IRC
[02:32:58] * jottinger lies to eidolon's face
[02:33:11] *** whaley has quit IRC
[02:33:14] * eidolon , in a fury, rips jottinger's head off.
[02:33:20] <eidolon> man that pissed me off.
[02:33:28] <eidolon> teenagers riding a snowmobile up my driveway.
[02:33:34] <eidolon> "The neighbor said it was okay! Sorry man"
[02:33:46] <eidolon> i already gave them heat for "the neighbor doesn't own my driveway"
[02:33:49] <eidolon> but later i asked the neighbor
[02:33:55] <eidolon> "Never heard of them. I dont' know any kids in the area."
[02:34:14] <jottinger> heh
[02:35:58] <[pwgr]> fire at will
[02:36:07] *** b3nn3tt has quit IRC
[02:36:14] *** alek_b has joined ##java
[02:36:21] <[pwgr]> aim for the fuel tank
[02:38:38] <jottinger> "I didn't know the fuel was explosive. I thought fairies drank it and pissed out motive power."
[02:39:57] *** aceofspades19 has quit IRC
[02:40:38] *** ramdam has joined ##java
[02:41:52] *** eduardopl has joined ##java
[02:45:38] *** kapipi has quit IRC
[02:48:26] *** durka42 has joined ##java
[02:53:01] *** durka42 has quit IRC
[02:58:35] <JoshJ> getting NaN in Java as the value of a double means what, exactly? I thought there was a divide by zero exception?
[02:59:07] <SJr|Work> Not a Number
[02:59:35] <SJr|Work> perhaps you are operating on a base type that is not closed under the operation you'd like.
[02:59:41] <JoshJ> i'm operating on two ints
[02:59:54] <SJr|Work> i.e. trying to get the supremum of an atribrary set of rationals.
[02:59:55] <ayrnieu> ~google how do I get NaN in java
[02:59:55] <javabot> http://letmegooglethatforyou.com/?q=how+do+I+get+NaN+in+java
[02:59:56] *** twolf_ has joined ##java
[03:01:12] *** mbroeker has quit IRC
[03:07:25] *** skoskav has joined ##java
[03:07:34] *** Tniffoc has joined ##java
[03:10:33] *** twolf has quit IRC
[03:16:15] *** teralaser has quit IRC
[03:17:00] *** deiselton has quit IRC
[03:19:44] *** da_shadow has joined ##java
[03:19:50] *** JoshJ has quit IRC
[03:28:04] <B|ackPanther> the bot is getting clever :)
[03:28:20] *** firen has quit IRC
[03:28:49] <jottinger> it's had that for a long, long, long time
[03:29:48] <ayrnieu> only recently, it used google rather than lmgtfy
[03:30:03] <r0bby> <3 cheeser
[03:30:08] <r0bby> ~cheeser++
[03:30:08] <javabot> cheeser has a karma level of 603, r0bby
[03:30:21] <eidolon> and cheeser owns the bot. coincidence? you decide.
[03:30:28] <Cpudan80> Haha
[03:30:32] * eidolon feels the Groove almost upon me.
[03:30:40] <r0bby> javabot: pr3d4t0++
[03:30:40] <javabot> pr3d4t0 has a karma level of 2, r0bby
[03:30:40] <eidolon> i've made 4-5 major changes to this codebase in the last 2 hours.
[03:30:42] <r0bby> javabot: pr3d4t0r++
[03:30:42] <javabot> pr3d4t0r has a karma level of 526, r0bby
[03:30:49] <r0bby> pr3d4t0r is a close contendor.
[03:30:50] <r0bby> :)
[03:30:56] <eidolon> ~r0bby--
[03:30:56] <javabot> r0bby has a karma level of -10, eidolon
[03:30:57] <Cpudan80> He's always been helpful on my questions
[03:31:06] <reverend> you will miss me when i burn
[03:31:13] <r0bby> nah
[03:31:16] <Cpudan80> ~Cpudan80
[03:31:16] <javabot> Cpudan80, I have no idea what Cpudan80 is.
[03:31:17] <jottinger> I'm close! I have almost 25% of pr3d4t0r's karma
[03:31:20] <Cpudan80> :-(
[03:31:20] <r0bby> ~karma Cpudan80
[03:31:20] <javabot> cpudan80 has a karma level of -1, r0bby
[03:31:24] <jottinger> ~be jottinger
[03:31:24] <javabot> There are no stupid questions, only stupid people.
[03:31:26] <Cpudan80> awwww -1
[03:31:33] <Cpudan80> How did I get below 0 ?
[03:31:36] *** obnauticus has joined ##java
[03:31:43] <jottinger> you were stupid.
[03:31:59] <Cpudan80> Guess I got someone off track once
[03:32:09] <Cpudan80> Where are all the easy questions when you need them!?!?
[03:32:17] <Cpudan80> "Array indexes in java start at ......"
[03:32:27] <Cpudan80> Exactly
[03:32:31] <obnauticus> that's what she said?
[03:32:35] <Cpudan80> Thats what I've been doing wrong this whole time
[03:32:42] <eidolon> Cpudan80: be around at the beginning of a semester. september / october is a great time.
[03:32:42] <Cpudan80> rofl
[03:32:57] <Cpudan80> eidolon: I tutor for the intro java class here
[03:32:59] <AMcBain> Cpudan80: people don't give out karma any more for answering their questions ... you get it for random witty stuff.
[03:33:01] <obnauticus> Cpudan80 don't you just love my channel interjections.
[03:33:24] <Cpudan80> I have told a great many people that return "a"; return "b"; return "c"; does not do what they want
[03:33:26] <r0bby> like this one time...at band camp...
[03:33:31] <Cpudan80> And will never do what they want
[03:33:36] <eidolon> AMcBain: i try to ++ when i get steered down a path I didn't understand before, or one of the ubergeeks points out some noodly logic flaw in waht i'm doing.
[03:33:42] * obnauticus == a tangible form of counterproductivity
[03:33:43] <Cpudan80> But yet they proceed to just throw those returns all over the place
[03:33:55] <AMcBain> eidolon: some do, yes. most don't (those who just join, get their answer, then leave)
[03:34:08] <AMcBain> I generally try for the same, but I haven't asked anything in there in a long while.
[03:34:17] <r0bby> drive by support--
[03:34:19] <eidolon> ~amcbain++ // just cuz
[03:34:19] <javabot> eidolon, I have no idea what amcbain++ // just cuz is.
[03:34:22] * eidolon loses.
[03:34:35] <Cpudan80> THe bot doesn't understand comments?
[03:34:39] <eidolon> nope.
[03:34:39] <jottinger> no
[03:34:41] <Cpudan80> ~javabot--
[03:34:42] <javabot> javabot has a karma level of 181, Cpudan80
[03:34:52] <jottinger> the bot's retarded
[03:34:52] <jottinger> it's sort of like you
[03:34:56] <AMcBain> eh, it's okay. I haven't done a lot of Java lately, though I should continue work on my IRC client, just for the hell of it ...
[03:35:15] <Cpudan80> jottinger: now that isnt nice ;-)
[03:35:23] * eidolon is in a maze of twisty little sprint, struts, jsp, jstl, and liquibase files, all earily similar.
[03:35:36] <eidolon> and oddly enough, it all works.
[03:36:02] <AMcBain> haha ... just as long as you keep a sacraficial animal on hand, right?
[03:36:37] <AMcBain> (that's actually not so nice to say though, some software is just *really good*)
[03:36:54] *** skypce has joined ##java
[03:36:58] <skypce> i need insert data from jtable to database? how do it please?
[03:37:03] <eidolon> dbs at clipper:~/workspace/congo-2 dot 0.0.2/src/main$ find . -type f | xargs cat | wc -l
[03:37:03] <eidolon> 35312
[03:37:23] <AMcBain> yikes
[03:37:30] *** durka42 has joined ##java
[03:37:42] <eidolon> i figure i'm about 80% code complete.
[03:37:54] <reverend> so about 20% of the way there
[03:37:58] <eidolon> about :)
[03:38:05] <AMcBain> skypce: well, that's a bit like saying I have some pegs and some holes, I can't tell you what shape they are. Can you make them fit?
[03:38:24] <eidolon> i joked that i was about 80% done with this rewrite a few weeks ago, and i was impressed at the number of people who said "So you're about 10% of the way done, huh?"
[03:38:42] <AMcBain> haha people are perceptive :)
[03:38:54] <eidolon> hum, that cat included .svn files. *tries to figure out how to filter that.
[03:39:09] <eidolon> ahaahhahahaah.
[03:39:15] <eidolon> dbs at clipper:~/workspace/congo-2 dot 0.0.2/src/main$ find . -type f | grep -v svn | xargs cat | wc -l
[03:39:15] <eidolon> 12952
[03:39:19] <eidolon> okay, that sounds saner :)
[03:39:19] <AMcBain> wow
[03:39:28] <AMcBain> > half are svn shit :PP
[03:39:42] <eidolon> svn logfiles / entries stuff is history and tracking
[03:39:47] <AMcBain> yeah
[03:40:05] <eidolon> the original codebase for this was about 8k lines, but it was crap. php + html + xml + java
[03:40:27] <AMcBain> sound rather yukky.
[03:40:31] <AMcBain> yucky*
[03:41:01] * AMcBain has as rather nice web app he's been building with PHP.
[03:41:11] <eidolon> i'm sorry to hear that.
[03:41:14] <eidolon> ~php
[03:41:14] <javabot> eidolon, php is the solution of choice for relaying mysql errors to web users.
[03:41:26] <AMcBain> I'd like to escape the PHP, but when I finally get a chance to use something else, I don't want to write it over.
[03:41:32] <eidolon> (nb - i've been a php developer off and on for like 15 years)
[03:42:13] <AMcBain> yeah, PHP isn't super-duper terrible, but it doesn't encourage good programming and it unfortunately makes itself the best-common-denomiator of choice for webhosts.
[03:42:17] <ayrnieu> I subscribed to salon.com, once upon a time, and especially enjoyed their emails that consisted of nothing but PHP errors.
[03:42:58] <eidolon> AMcBain: all my complaints about php pale against the crap i'm maintaining these days. a few hundred thousand lines of... Perl CGI code.
[03:43:07] <AMcBain> ah, yeah, that would suck.
[03:43:08] <eidolon> undocumented. coded by dozens of developers. nightmarish.
[03:43:17] <ayrnieu> You'd think after the first few times that someone would at least write a program to see if the outgoing email contained reasonable text, or didn't contain PHP errors. But no.
[03:43:40] <AMcBain> Ours is made by two of us, we have at least 1 comment per function, it's all pretty easy to see what most of it does really. It's pretty well organized, and we don't do anything crazy :P
[03:44:10] <Sou|cutter> If I have a class A, a class B that extends A, and a class C. if A defines a serialVersionUID and has nothing but a method that returns C... and class B doesn't have a serialVersionUID... if I change the package of C, does that change the serialVersionUID of B?
[03:44:29] <Sou|cutter> because the method signature of A's method which returns C is different...
[03:44:45] <Fanook> Sou|cutter: how did you generate the SVUID?
[03:44:50] *** Deiselton has joined ##java
[03:44:52] <Sou|cutter> Fanook: it's 1
[03:44:54] <Sou|cutter> 1L
[03:45:06] <eidolon> AMcBain: i have an ace in the hole durint this rewrite. ojacobson is my partner. :)
[03:45:11] <Fanook> then it's constant. nothing changes it until you explicitly go into the code and change it
[03:45:12] <Sou|cutter> B's is the default serialVersionUID
[03:45:13] <eidolon> he doesn't let me do stupid shit. :)
[03:45:16] <AMcBain> eidolon: NICE
[03:45:22] <Fanook> there is no default SVUID
[03:45:29] <Sou|cutter> Fanook: No, in class B which extends A, no serialVersionUID is defined
[03:45:52] <Sou|cutter> Fanook: Well, default so far as auto-matically generated by javac
[03:46:09] <Fanook> i guess B inherits A's kinda, and javac doesn't generate one afaik
[03:46:24] <Deiselton> guys i build a java app with netbeans and it built it and also create a .jar package.... when i run the jar executable it runs fine... but when somone else does it it doesnt.. and when i run it from the cmd line it exits because it says there is no main class.... anyone ever experience this or can tell me were to start debugging this problem
[03:46:32] <Sou|cutter> uhh javac definitely creates one if you don't define it
[03:46:35] *** ScottG489 has quit IRC
[03:47:14] <Deiselton> http://pastebin.com/m323b6f58 this is my error
[03:47:36] <Cpudan80> Deiselton: java -jar jarFile
[03:47:43] <Cpudan80> might be /jar in windows
[03:47:47] <Fanook> it's not
[03:47:49] <Cpudan80> Not real sure
[03:47:51] <Sou|cutter> Fanook: I guess I need to write a test case
[03:47:56] *** twolf_ is now known as twolf
[03:48:07] <Fanook> you can also do java -cp path/to/your.jar MainClass
[03:48:23] <Cpudan80> There is some file in the jar that points to the main class
[03:48:28] <Cpudan80> I forget what that file is called though
[03:49:25] <Sou|cutter> http://java.sun.com/javase/6/docs/platform/serialization/spec/version.html#6678 might help me figure it out too
[03:49:52] <Deiselton> Cpundan80: hmm that works for me now... now i can tell my friend to try that and see why it wont run on his...
[03:51:42] *** drichards has joined ##java
[03:53:47] <r0bby> wow cute
[03:53:59] <r0bby> im getting comment spam now lol
[03:54:27] <r0bby> Cpudan80: manifest
[03:54:55] <Cpudan80> yeah that thing
[03:55:07] * Cpudan80 programs mostly in PHP/Python
[03:55:27] <Cpudan80> Used to use Java all the time -- now the tide has shifted
[03:55:35] <Cpudan80> What the client wants, the client shall receive
[03:55:40] <Cpudan80> This client say PHP/Python
[03:55:56] <AMcBain> my two favorite languages are Java and JS, but if I had the choice, I wouldn't program everything in them.
[03:56:28] <AMcBain> (however, knowing this information, JS2 doesn't make me eccatic ... quite the opposite)
[03:56:42] <eidolon> js2? someone's rewriteing javascript?
[03:56:58] *** zacs7 has joined ##java
[03:57:00] <AMcBain> yeah, they're going to give it classes etc.
[03:57:06] <AMcBain> at least, last I heard.
[03:57:10] <AMcBain> (and that was a while ago)
[03:57:38] * eidolon nods
[03:57:52] <eidolon> i've been (probably to my own detriment) avoiding learning JS.
[03:58:01] <eidolon> though it seems impossible to write webpages without using it nowadays :-/
[03:58:08] <AMcBain> ah, the problem is that most seem to see it only in the scope of browsers.
[03:58:54] <AMcBain> It's a great language to use for lots of things. I like it outside the browser, mainly because there are more chances there to use inheritance, other fun stuff, and tie yourself to one interpreter (so you can get mozilla's __define[GS]etter__)
[03:59:05] *** zacs7 has left ##java
[03:59:14] * eidolon goes glossy eyed. "uh huh..."
[03:59:19] * eidolon goes back to struts land.
[03:59:43] <AMcBain> eidolon: getters/setters are like what they have in C#.
[03:59:57] *** mpupu has joined ##java
[04:00:05] <AMcBain> It's a property on the outside, but it calls a function when gotten or set.
[04:00:38] <mpupu> A friend found a strange piece of code: http://pastebin.com/d728dc309
[04:00:40] <AMcBain> (I like using it with Canvas ... similar idea to Java's Graphics object)
[04:01:04] <mpupu> What is the type being infered for U and why doesn't set fail?
[04:01:20] <SJr|Work> Is there an annotation available that will generate a warning, maybe even only in eclipse if a method 'should' be overriden.
[04:01:32] *** kab has joined ##java
[04:03:29] <reverend> PHP/python sounds like a long sentence in hell
[04:04:37] <reverend> mpupu: why's that weird?
[04:04:39] <AMcBain> mpupu: well, technically, the Box.fill line should fail something, maybe the compiler, I don't know as "weird" and boxes do not have the same type ... but I'm much sure on what you really mean.
[04:04:40] *** ScottG489 has joined ##java
[04:04:59] <AMcBain> Type erasure probably has something to do with it ...
[04:05:10] <reverend> god is what i make of him
[04:06:04] <mpupu> AMcBain: so what is the type inferred for U?
[04:07:01] <AMcBain> mpupu: it doesn't matter, they don't match, so it gives an error.
[04:07:26] <mpupu> oh, does it?
[04:07:31] <mpupu> it doesn't give an error here
[04:07:45] <AMcBain> hmm, well, let me test that with javac directly.
[04:08:27] <mpupu> the weird thing is that a Box<Integer> ends up containing a String
[04:09:02] <mpupu> I guess that could be caused by type erasure, but there's something failing in between
[04:09:05] *** firen has joined ##java
[04:09:29] <AMcBain> ah, the compiler *does not* give an error/warning.
[04:09:42] <AMcBain> hm ... well, at least javac doesn't. Eclipse's compiler does.
[04:10:22] <mpupu> what does Eclipse say?
[04:10:33] <reverend> KAISER PERMANENTE
[04:10:46] <AMcBain> "The method fill(U, List<Box<U>>) in the type Box is not applicable for the arguments (String, List<Box<Integer>>)"
[04:10:57] *** stormcommander has joined ##java
[04:12:14] <Fanook> which is the correct error javac should be pumping out
[04:12:26] <mpupu> I had thought that maybe U could be specified as ?
[04:12:26] <mpupu> but I'm not sure how Java's type inference works
[04:12:27] <Fanook> or some variant on that
[04:12:28] <AMcBain> well, JDK 6_7 on my machine does not.
[04:13:53] <AMcBain> however, I also do not get a print out when run with "java" though.
[04:14:06] <AMcBain> (the code, I think, should print something out, no?)
[04:14:30] <mpupu> that's because it's actually assigning a String to object
[04:14:30] <mpupu> instead of an Integer
[04:14:40] <AMcBain> ah, yes, I see that.
[04:15:46] <Sou|cutter> http://java.sun.com/javase/6/docs/platform/serialization/spec/class.html#4100 <-- that was what I was looking for
[04:16:05] *** LordMetroid has quit IRC
[04:17:01] <Fanook> hmmm, 6u10 doesn't flag that either. very strange
[04:17:25] <AMcBain> interesting.
[04:17:38] *** monkeycid has quit IRC
[04:17:38] <mpupu> so my hypothesis is: U:=? and type erasure makes the Box forget about <Integer>
[04:17:38] <mpupu> is that possible?
[04:18:01] <mpupu> but I don't know how to check what U really is without going inside the compiler
[04:18:19] <AMcBain> well, it does forget about the Integer, yes, but the reason it assigns the String is because it is probably the first parmeter to the method ...
[04:19:18] <AMcBain> yes, if you swap the parameters, javac complains.
[04:19:31] <Fanook> ~jls
[04:19:32] <javabot> Fanook, jls is The Java Language Specification: http://java.sun.com/docs/books/jls/
[04:19:37] <mpupu> yes, what I mean by "it forgets" is that the set method for the only element of boxes should have set(Integer t) as a signature
[04:19:39] <Fanook> generics are fun :)
[04:19:45] <AMcBain> so with them in the reversed order it copies them over, it appears.
[04:20:56] <SJr|Work> Argh I can't switch off of enumerated types?
[04:21:05] <SJr|Work> Java 5 enum?
[04:21:14] <AMcBain> "switch off"?
[04:21:22] <Fanook> enums are a good thing. why would you want to turn them off?
[04:21:30] <eidolon> why would you want to disable a part of the language.
[04:21:38] <SJr|Work> sorry I mean do a switch, on an enum type
[04:21:46] <eidolon> ah
[04:21:49] <eidolon> ~switch
[04:21:49] <javabot> eidolon, switch is http://java.sun.com/tutorial/java/nutsandbolts/switch.html
[04:21:50] <AMcBain> you can ... afaik.
[04:21:52] <SJr|Work> ENumType x = foo(); switch x { case x.BAR)
[04:21:53] <Fanook> yep
[04:22:13] <eidolon> read that page.
[04:23:17] <SJr|Work> I don't see an example there
[04:23:23] <Fanook> oh yeah, that's why i hate reading the parts of the JLS dealing with generics...
[04:23:27] <eidolon> *blink
[04:23:41] <eidolon> you mean the really big example at the top o how to use a switch clause?
[04:23:58] <AMcBain> Switches don't work on Strings, but I've found that it's easier (and better for design) to just put all of your Strings in an enum anyways and use that method on the enum to turn a string into one (that exists in the enum, of course)
[04:23:59] <SJr|Work> That page only switches off ints, "It also works with enumerated types (discussed in Classes and Inheritance)"...
[04:24:04] *** mengu has quit IRC
[04:24:10] <eidolon> did you even try it before asking here?
[04:24:15] <SJr|Work> I did yes
[04:24:19] <eidolon> or are you looking to be spoonfed your CS101 assignment?
[04:24:29] <SJr|Work> Lol such hate
[04:24:34] <eidolon> such idiocy.
[04:24:37] <Fanook> SJr|Work: then you also clicked on that link in the bit you pasted above and saw the version with enums?
[04:24:48] <r0bby> SJr|Work: you show no effort...
[04:25:05] <eidolon> look, i just found a code exmaple how how to do enums with a switch statement.
[04:25:06] <SJr|Work> oh I'm an idiot I missed that part
[04:25:14] <eidolon> the google search took me all of 1.7 seconds.
[04:25:16] <AMcBain> coming from r0bby, that's harsh.
[04:25:24] <SJr|Work> r0bby always says that to me
[04:25:31] <eidolon> ~next
[04:25:31] <javabot> Another satisfied customer. Next!
[04:25:34] *** Tniffoc has quit IRC
[04:25:41] <r0bby> SJr|Work: next time do that before coming here :)
[04:25:46] *** Mike-N-Go has quit IRC
[04:25:49] <SJr|Work> I actually was already on the page :)
[04:26:02] <SJr|Work> I just needed to get rid of the type specifier
[04:26:04] <r0bby> ...why ask?
[04:26:27] <SJr|Work> nevermind, I over looked the example
[04:26:42] * r0bby hugs SJr|Work
[04:27:14] *** staykov has quit IRC
[04:27:17] *** cactaur has joined ##java
[04:27:33] <Sou|cutter> cactaur: great name
[04:27:44] <Sou|cutter> my favorite FF critter
[04:27:49] <cactaur> Sou|cutter: Of course!
[04:28:33] <SJr|Work> tee hee, my code is so sexy
[04:28:48] <eidolon> ah'm... too sexy for mah code... too s...
[04:28:50] <eidolon> er, sorry.
[04:29:00] *** tnks has left ##java
[04:29:22] *** cppiii has joined ##java
[04:30:17] *** durka42 has quit IRC
[04:30:17] <cppiii> are there any frameworks like Django in Java?
[04:30:26] <eidolon> dunno. what's django?
[04:30:44] <cppiii> http://www.djangoproject.com/
[04:30:50] <r0bby> did i fuck up InfoOperation?
[04:30:51] <eidolon> thank you for the url
[04:30:57] * eidolon goes back to work.
[04:31:04] * reverend avoids reading the url.
[04:31:10] <Fanook> web framework
[04:31:27] <eidolon> </unhelpful>
[04:31:57] *** rawblem has joined ##java
[04:33:28] <r0bby> ~~ cppiii wicket
[04:33:29] <javabot> cppiii, wicket is a component based web application framework written in java. See http://wicket.apache.org or ##wicket for more details
[04:33:40] <r0bby> ~grails
[04:33:40] <javabot> Grails is a web framework which brings rails-like concepts to the groovy language. See http://grails.org for more information.
[04:33:43] <Sou|cutter> ~stripes
[04:33:43] <javabot> Sou|cutter, stripes is http://www.stripesframework.org/display/stripes/Home
[04:33:45] *** kater_ has joined ##java
[04:33:49] <eidolon> ~struts
[04:33:49] <javabot> eidolon, struts is is a flexible control layer based on standard technologies like Java Servlets, JavaBeans, ResourceBundles, and XML, as well as various Jakarta Commons packages. Struts encourages application architectures based on the Model 2 approach, a variation of the classic MVC design paradigm. see: http://jakarta.apache.org/struts.
[04:33:50] <waz> django is on my list to learn this year
[04:33:52] <r0bby> ~~ cppiii google java web frameworks
[04:33:52] <javabot> http://letmegooglethatforyou.com/?q=java+web+frameworks
[04:34:04] <Sou|cutter> I was kinda having fun naming as many as possible!
[04:34:09] <eidolon> heh
[04:34:17] <waz> ~jsf
[04:34:18] <javabot> JavaServer Faces technology simplifies building user interfaces for JavaServer applications. Developers of various skill levels can quickly build web applications by: assembling reusable UI components in a page; connecting these components to an application data source; and wiring client-generated events to server-side event handlers. More can be found at http://java.sun.com/j2ee/javaserverfaces
[04:34:23] <Sou|cutter> ~webwork2
[04:34:23] <javabot> Sou|cutter, I have no idea what webwork2 is.
[04:34:23] <waz> ~tapestry
[04:34:24] <javabot> waz, tapestry is http://tapestry.apache.org/ a framework for creating web applications.
[04:34:24] <r0bby> cppiii: consider googling?
[04:34:30] <Sou|cutter> ~webwork
[04:34:31] <javabot> Sou|cutter, I have no idea what webwork is.
[04:34:36] <Sou|cutter> I guess that's too old
[04:34:40] <reverend> java sucks for frameworks
[04:34:46] <Sou|cutter> ~spring-mvc
[04:34:46] <javabot> Sou|cutter, I have no idea what spring-mvc is.
[04:34:49] <reverend> there's just not enough
[04:34:50] <Sou|cutter> O_O WHAT
[04:34:56] <r0bby> ~spring mvc
[04:34:56] <javabot> r0bby, I have no idea what spring mvc is.
[04:34:58] <r0bby> ...
[04:35:00] <r0bby> wow
[04:35:06] <Sou|cutter> that's a glaring omission
[04:35:06] <reverend> maybe someday java will have ruby on rails
[04:35:10] <reverend> and then we'll be all set
[04:35:12] <da_shadow> ~spring
[04:35:12] <javabot> da_shadow, spring is a Java/JEE Application Framework - http://www.springframework.org/
[04:35:14] <r0bby> reverend: it does :)
[04:35:17] <r0bby> sort of
[04:35:20] <waz> ~grails
[04:35:20] <reverend> grails is not it
[04:35:20] <javabot> Grails is a web framework which brings rails-like concepts to the groovy language. See http://grails.org for more information.
[04:35:24] <Sou|cutter> reverend: I work on a framework that is inspired by RoR
[04:35:24] <r0bby> just outside its door
[04:35:24] <reverend> grails is for homos
[04:35:31] <Sou|cutter> not grails tho
[04:35:33] <waz> you can run Rails on the JVM
[04:35:37] <waz> so close :)
[04:35:38] <Sou|cutter> jruby :P
[04:35:39] <r0bby> jruby++
[04:35:45] <eidolon> i wonder if the OPer is still even watching :)
[04:36:33] *** Soliah has joined ##java
[04:36:34] <reverend> ~interesting
[04:36:34] <javabot> this is all very interesting (not really) but please take it somewhere else.
[04:36:41] <reverend> there, just like cheeser was here
[04:36:44] <Fanook> eidolon: does that really matter at this point? :)
[04:36:56] <eidolon> i need to open tickets in a way that makes it easier to close them. i keep opening stuff like "Write an app."
[04:36:59] <eidolon> which can never be closed.
[04:37:10] <eidolon> i need to open tickets like "Bob is misspelled in jsp foo.jsp."
[04:37:19] <eidolon> course, i can fix them faster than i can open the ticket :-/
[04:37:40] <warriorforgod> Can an inner class access static variables and methods of an outer class?
[04:37:50] <cppiii> thanks all, does Wicket have a ACL module?
[04:38:13] <eidolon> did you look at the website?
[04:38:15] <da_shadow> ~~ warriorforgod tias
[04:38:16] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[04:38:20] <reverend> how could you find out, short of asking a bunch of people who may have a penchant for leading you astray?
[04:38:20] <eidolon> did you read the commetns about where to get more information?
[04:38:26] <eidolon> ~tell cppiii about wicket
[04:38:26] <javabot> cppiii, wicket is a component based web application framework written in java. See http://wicket.apache.org or ##wicket for more details
[04:40:17] <r0bby> cppiii: yes it does.
[04:40:51] <reverend> leave it to r0bby to pull a fish out of his ass and stuff it in someone's mouth
[04:41:16] <r0bby> huh
[04:41:51] <AMcBain> that would certainly be interesting ...
[04:42:46] <reverend> ~fish
[04:42:46] <javabot> reverend, I have no idea what fish is.
[04:42:51] <reverend> ~feed a man a fish
[04:42:52] <javabot> 10 poke a man a fish, 0xc0ffee
[04:43:07] *** epoxy has joined ##java
[04:43:14] <AMcBain> ~~reverend fire
[04:43:14] <javabot> Light a fire for a man, keep him warm for one night. Light a man on fire, keep him warm for the rest of his life.
[04:44:21] *** juanez has quit IRC
[04:44:33] <epoxy> hey.. i'm building a Sudoku puzzle/solver.. I have a gameboard (JFrame) which 9 9x9 squares
[04:44:58] <waz> eidolon: you're even more cheerful than normal tonight!
[04:45:03] *** thunderbolt has joined ##java
[04:45:12] <AMcBain> epoxy: so what's the issue?
[04:45:18] <epoxy> each with 9 buttons in them. is it ok to keep the actionlistener on the board and pass it as an argument so it gets to the cell
[04:45:26] <epoxy> heh..didnt mean to hit enter up there
[04:45:27] <eidolon> waz: i was sick the last 2-3 days. i just got better this afternoon, and i spent 6+ hours today working on the project i -want- to work on.
[04:45:45] *** kater has quit IRC
[04:45:59] <AMcBain> epoxy: huh?
[04:46:06] <epoxy> hold on.. i'll paste some code..
[04:46:10] <AMcBain> okay
[04:46:18] *** eduardopl has quit IRC
[04:47:26] <drichards> I miss nested functions
[04:48:28] <Fanook> no, you just think you do :)
[04:48:43] <drichards> :)
[04:49:54] *** nmatrix9 has quit IRC
[04:50:04] *** Cpudan80 has left ##java
[04:50:13] *** durka42 has joined ##java
[04:51:33] *** isr` has joined ##java
[04:52:29] <isr`> so if i have some classes that implement an interface and i want to hold instances of these classes in some container, do they also have to inherit from a superclass to be held in the same container?
[04:53:05] <Fanook> if you have a Container<Foo> you can put anything that can be implicitly cast to Foo in it
[04:53:17] *** mpupu has quit IRC
[04:53:22] <Fanook> i.e. a Foo or any subclass of Foo
[04:54:06] <drichards> I think he's asking about Foo being an interface
[04:54:11] <isr`> yeah
[04:54:43] <isr`> because i need some methods to be explicitly included in the classes that i will instantiate and stick in the container
[04:54:54] <isr`> but would those classes also have to inherit from, say Foo
[04:55:07] <isr`> so i could use container<Foo>
[04:55:10] *** iluvgrlzwglasses has quit IRC
[04:56:54] <drichards> I think this is where some folks would say "try it and see"
[04:57:38] <epoxy> AMcBain, http://pastebin.com/m1c4f6b00 (lots of details omitted of course) lines 24, 35, 44, 58, 62.... I am pretty much wondering if it is OK to pass around the action listener like that. I'm newish to java
[04:57:53] <isr`> drichards: well i'm still in the analysis/design phase.
[04:58:00] <isr`> i havent even begun to implement the solution
[04:58:05] <epoxy> seems dirty to me.
[04:58:33] *** criminy has quit IRC
[04:59:02] <AMcBain> epoxy: seems fine to me, why wouldn't you do that?
[04:59:29] <epoxy> AMcBain, i was just curious if that was shunned upon or something, that's all.
[04:59:34] <drichards> isr`: sure, just write a couple test programs to try it out
[04:59:47] <isr`> meh, i think i'll just inherit.
[04:59:52] <isr`> and make the methods i need protected.
[04:59:59] <isr`> i dont know enough about interfaces yet to use them
[05:01:12] *** tomvolek has joined ##java
[05:01:14] <thunderbolt> interfaces are just classes with abstract methods ;-)
[05:01:28] <drichards> ok, but let me tell you one thing about this channel. It's a very important lesson. If you appear to be lazy and/or take shortcuts, these guys will eat you alive.
[05:01:50] <isr`> drichards: yes, i understand this.
[05:01:57] <drichards> k
[05:02:49] *** alek_b has quit IRC
[05:05:13] <Fanook> isr`: there are 3 rules to programming. Make it work. Make it clean. Make it fast.
[05:05:32] *** skoskav has quit IRC
[05:05:33] <dmlloyd> you forgot rule 4: make dmlloyd some $$$
[05:05:38] <Fanook> obey them in that order and you will have few problems
[05:05:42] *** skoskav has joined ##java
[05:05:44] <isr`> lol
[05:05:46] <isr`> thanks Fanook
[05:06:21] <skypce> i need insert data from jtable to database? how do it please?
[05:06:51] <SJr|Work> If two seperate servlets have a copy of the same class, that has a static member, would all servlets share that same member
[05:09:04] *** amnesiac has joined ##java
[05:09:30] <joed> ~static
[05:09:30] <javabot> joed, static is a keyword which indicates that a member is scoped to a class rather than an object instance. Members of interfaces (except methods) are always static. Nested interfaces and enums are always static. See http://tinyurl.com/3q7oc and http://tinyurl.com/34vr3u for more information.
[05:10:47] <SJr|Work> thanks
[05:16:05] *** ofl_ has quit IRC
[05:17:07] *** alek_b has joined ##java
[05:17:20] *** rdancer has quit IRC
[05:18:10] <Fanook> ~~ SJr|Work tutorials
[05:18:11] <javabot> Please see http://java.sun.com/docs/books/tutorial
[05:18:22] <Fanook> you should look there before asking here
[05:19:10] <joed> Here there everywhere, my doubt is clear!
[05:19:12] <SJr|Work> Nothing on servlets there
[05:19:55] <SJr|Work> You guys should change the bot, to output all urls with lmgtfy
[05:20:19] * joed changes the bot.
[05:20:29] <joed> ~yalla read the tutorials
[05:20:29] <javabot> read the tutorials!! read the tutorials!! read the tutorials!! read the tutorials!! read the tutorials!! read the tutorials!! read the tutorials!! read the tutorials!! read the tutorials!! read the tutorials!! read the tutorials!! read the tutorials!! read the tutorials!!
[05:20:36] <joed> Better?
[05:20:46] *** alek_b has quit IRC
[05:21:31] <SJr|Work> not really, I thought it was a specific enough question that someone might know the answer to.
[05:22:43] *** linear` has joined ##java
[05:23:29] <joed> You got a rather specific answer? How Static works?
[05:25:11] <SJr|Work> The answer to: "If two seperate servlets have a copy of the same class, that has a static member, would all servlets share that same member" is ". Every instance of the class shares a class variable, which is in one fixed location in memory. Any object can change the value of a class variable, but class variables can also be manipulated without creating an instance of the class."
[05:26:01] *** thunderbolt has quit IRC
[05:27:17] <joed> ~static
[05:27:17] <javabot> joed, static is a keyword which indicates that a member is scoped to a class rather than an object instance. Members of interfaces (except methods) are always static. Nested interfaces and enums are always static. See http://tinyurl.com/3q7oc and http://tinyurl.com/34vr3u for more information.
[05:28:19] <SJr|Work> Which tells me nothing about them being shared between web-application deployments in a Container
[05:29:39] <Fanook> that depends on how the container works. in any given VM+classloader, there will be one instance of a static member shared among all instances of that class
[05:31:12] <Tenac> My JTable has 3 columns, but I want each row to hold 4 values, how would this be possible?
[05:31:13] *** luckyshot has quit IRC
[05:31:30] <SJr|Work> And so in theory, something written as a singleton, even though it contains seperate copies in the WEB-INF/ class version, might actually end up refrencing the same location in memory.
[05:31:35] *** Soliah has quit IRC
[05:31:40] <SJr|Work> singleton/static
[05:31:47] <SJr|Work> Also depending on the container
[05:31:51] <Fanook> Tenac: how do you plan on displaying 4 values in 3 columns?
[05:31:53] <joed> Between web applications? Jeeebus that is really dumb.
[05:31:53] *** Soliah has joined ##java
[05:32:10] *** popcornPanic has joined ##java
[05:32:16] <SJr|Work> I'm not trying to do it, but I'm at a loss to explain why something is happening otherwise.
[05:32:17] *** ircozzy has joined ##java
[05:32:18] <Tenac> Fanook, I don't want to display it, I just want each row to have an extra assigned value
[05:32:26] <joed> And a singleton and a static is not the same thing.
[05:33:04] <Fanook> Tenac: so what's the problem? Create a class to hold the data for a row in your table and create the proper TableModel to pull the data you want
[05:33:22] <SJr|Work> Yes I know joed, however in this case it would stem from the same problem.
[05:33:38] *** linduxed has joined ##java
[05:34:07] <linduxed> im having a problem i believe is java related so ill give it a shot
[05:34:19] <linduxed> ive got this application called bluej
[05:34:24] <joed> SJr|Work: Are you using tomcat? Just set the context.
[05:34:31] <linduxed> im using ubuntu btw
[05:34:40] <joed> ~ubuntu
[05:34:40] <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'. If you want to install java on ubuntu, ask me about ~debian (same instructions apply to ubuntu).
[05:34:45] <drichards> Fanook: it's funny, many folks get wrapped around the axle in interviews because they focus on #3 first.
[05:34:58] <SJr|Work> rofl, I love javabot's hateful comments
[05:35:08] <Fanook> ~~ linduxed bluej
[05:35:08] <javabot> linduxed, bluej is not an IDE. It is a tool for learning object oriented programming that happens to use Java as its langauge
[05:35:16] *** toll_2323 has joined ##java
[05:35:27] <linduxed> Fanook: well exactly
[05:35:42] <SJr|Work> joed, hmmmm yeah I'm using tomcat, yes that would probably be the best way to do it, however I didn't design this, so I'm thinking about whether or not there is value in moving it there.
[05:35:50] *** popcornPanic has quit IRC
[05:35:54] <toll_2323> Hello!
[05:36:00] <joed> SJr|Work: It is 3 lines of XML.
[05:36:10] <SJr|Work> What's three lines of XML?
[05:36:10] *** alek_b has joined ##java
[05:36:37] <Fanook> linduxed: were you planning on asking a question at some point?
[05:36:45] <joed> SJr|Work: Providing a named context.
[05:36:56] *** Mike-N-Go has joined ##java
[05:37:23] <linduxed> the thing is that in all other systems (linux-distros, mac, windows) bluej works, here i get menus to dissapear as soon as i let go off my mouse button. i wonder if this can be easily resolved?
[05:37:23] <SJr|Work> I didn't even know you had to do that, I thought you could just go ServletContext().addParameter('instance',Object);
[05:37:24] *** wans has joined ##java
[05:37:26] <toll_2323> I normally write servlet apps with hibernate as a backend with mysql, but I am messing with some desktop apps - I dont want to bundle a mysql, nor write my own persistence class
[05:37:58] <linduxed> its like all menus had OnReleaseMouse = close
[05:37:59] <toll_2323> can anyone recommend a lib to use to store my data objects to disk and pull them out on the next startup
[05:38:11] <Fanook> ~~ toll_2323 javadb
[05:38:11] <javabot> toll_2323, derby is Apache Derby, an Apache DB subproject, is a relational database implemented entirely in Java and available under the Apache License, Version 2.0. Small, embeddable, client/server. http://db.apache.org/derby
[05:38:42] <toll_2323> can i just stick my POJOs in it, or do I have to write mapping files?
[05:38:58] <joed> You do know you can annotate?
[05:39:07] <SJr|Work> toll_2323 I thought you just use an ObjectOutputStream to write to disk
[05:39:21] <joed> And that Hibernate is a JPA implementation?
[05:40:21] <toll_2323> yes i could just call serialise and store to disk, but I was looking for something more feature rich
[05:40:31] <toll_2323> without having to write object/table mapping files
[05:40:52] <Fanook> toll_2323: use a JPA implementation and annotations
[05:41:38] *** bigua has joined ##java
[05:41:52] <toll_2323> is there a really simple "JPA implementation" that you would recommend
[05:41:53] <linduxed> Fanook: was that a valid question?
[05:42:17] <Fanook> linduxed: that sounds like an ubuntu problem
[05:42:33] <bigua> Hello, Im with a trouble in thread, Im have t1 and t2, both threads! and a msg1 and msg2. so in the function run(), i run msg1 in 10minutes and msg2 in 1hour, im dont know how to set it in right, anyone have someidea? sorry my english!
[05:42:36] *** cppiii has quit IRC
[05:42:40] <drichards> ~help
[05:42:40] <javabot> drichards, I have no idea what help is.
[05:44:03] *** arquebus has joined ##java
[05:45:58] <linduxed> Fanook: well thats true since i havent had this on other systems... but on the other hand the stuff is strictly java related so i was hoping this was a known problem
[05:46:32] <wans> ~filereader
[05:46:32] <javabot> wans, filereader is of limited use because almost NOBODY KNOWS ENCODINGS PROPERLY and it doesn't let you set one. Reader reader=new InputStreamReader(inputStream,"some encoding here"); is generally better. inputStream would probably be a FileInputStream
[05:47:00] <joed> toll_2323: Hibernate, TopLink, OpenJPA etc.
[05:49:25] <toll_2323> cool, ok it looks like derby hibernate and annotations should do the trick
[05:49:42] <toll_2323> I hope i dont get stuck on this all day!
[05:49:45] <toll_2323> many thanks
[05:49:54] <dmlloyd> that factoid makes no sense
[05:50:25] <dmlloyd> cheeser: fyi - if you ask about a factoid's info in pm, it gives you the answer, and then tells you it doesn't exist even when it does
[05:50:32] <cheeser> dmlloyd: i have that fixed.
[05:50:56] <dmlloyd> oh ok. carry on then :)
[05:52:27] <joed> ~info filereader
[05:52:27] <javabot> filereader was added by: tieTYT on 04-17-2007 at 2:09 PM, EDT and has a literal value of: of limited use because almost NOBODY KNOWS ENCODINGS PROPERLY and it doesn't let you set one. Reader reader=new InputStreamReader(inputStream,"some encoding here"); is generally better. inputStream would probably be a FileInputStream
[05:52:28] <javabot> I have no factoid called "filereader"
[05:52:43] <joed> ~forget filereader
[05:52:44] <javabot> I forgot about filereader, joed.
[05:52:55] <joed> ~tieTYT--
[05:52:55] <javabot> tietyt has a karma level of 38, joed
[05:53:19] *** arquebus has quit IRC
[05:53:20] *** mele- has quit IRC
[05:53:51] *** mele- has joined ##java
[05:54:25] <bigua> ah fix
[05:54:26] <bigua> :D
[05:54:28] *** bigua has quit IRC
[05:54:29] <joed> mele-: !!!! how do to you and some in the sauce on the ninja colone strings in the radical rose?
[05:55:01] <Fanook> and joed wins the incoherency prize of the night
[05:55:09] *** Kwitschibo has quit IRC
[05:55:17] * joed bows.
[05:55:23] *** alek_b has quit IRC
[05:56:29] *** javabot has quit IRC
[05:56:39] <wans> ~gtfo
[05:57:00] *** tomvolek has quit IRC
[05:57:28] *** javabot has joined ##java
[05:57:29] *** thunderbolt has joined ##java
[05:57:33] <cheeser> ~info hi
[05:57:54] <javabot> hi was added by: cheeser on 07-16-2008 at 0:26 PM, EDT and has a literal value of: <reply>http://i38.tinypic.com/25aopzn.jpg
[05:58:03] <cheeser> happy?
[05:58:03] <cheeser> 8^)=
[05:58:41] <wans> haha
[05:59:43] *** woogley has joined ##java
[06:00:22] <r0bby> Did i goof up on InfoOperation bad?
[06:02:39] *** CrypticSquared has left ##java
[06:02:55] *** CrypticSquared has joined ##java
[06:05:41] <cheeser> r0bby: no. just a missed case on my clean up from the List passing days.
[06:07:08] <r0bby> ahh
[06:07:59] <r0bby> Okay didn't know if i did --when i tested it -- it worked as i expected it to; I should have written a test case :-/
[06:10:02] *** Tenac is now known as Fusion89k
[06:10:14] *** Fusion89k is now known as Tenac
[06:10:18] *** Mike-N-Go has quit IRC
[06:11:38] <Tenac> I have a JTable with 3 columns, but I want each row to secretly have a fourth value that isn't visible but can be accessed most likely by table.getValueAt(row, 3). Any ideas how this can be done?
[06:12:52] *** Tenac is now known as Fusion98k
[06:13:31] *** amnesiac has quit IRC
[06:13:33] *** cactuar has joined ##java
[06:13:48] *** linxuz3r has joined ##java
[06:13:55] *** cactaur has quit IRC
[06:14:07] *** Fusion98k is now known as Fusion89k
[06:15:10] *** FireSlash has joined ##java
[06:15:37] *** amz has quit IRC
[06:15:46] *** stormcommander has left ##java
[06:20:15] *** fryderyk has joined ##java
[06:21:57] *** FireSlash has quit IRC
[06:24:56] *** gdoko has joined ##java
[06:26:21] *** Mike-N-Go has joined ##java
[06:26:35] *** toll_2323 has quit IRC
[06:26:44] *** jewbaca has joined ##java
[06:27:28] *** Mike-N-Go has quit IRC
[06:27:54] *** Tenac has joined ##java
[06:28:09] *** Mike-N-Go has joined ##java
[06:28:22] <Tenac> damnit, got d/c. Did anyone answer my question when I was gone?
[06:28:36] *** IRAQI` has joined ##java
[06:29:05] *** skypce has quit IRC
[06:29:21] <repnop> no
[06:36:22] *** Afterlawl has quit IRC
[06:38:55] *** Junior has joined ##java
[06:39:00] *** Mike-N-Go has quit IRC
[06:46:49] *** ircozzy has quit IRC
[06:47:35] *** aditsu has joined ##java
[06:48:50] <aditsu> hi, how can I see what the memory is used for in a java process, outside of the heap (in linux)? including jars, shared libraries, whatever
[06:49:49] <joed> Unless you combine a profiler for the JVM with some serious study, you wont?
[06:51:27] *** staykov has joined ##java
[06:55:19] *** da_shadow has left ##java
[06:56:35] *** Resistance has quit IRC
[06:56:42] *** Resistance has joined ##java
[07:01:35] *** bitshuffler has joined ##java
[07:05:17] <Tenac> aditsu, JConsole?
[07:08:14] <ernimril> aditsu: modern profilers can show you how much non-heap memory you jvm use, but not much information about it
[07:08:56] <ernimril> aditsu: lsof and "/proc/<pid of jvm>/maps" and a few more proc-entries may give a bit more information
[07:09:06] <joed> ernimril: It will not show you OS info, nor will it show sysV memory.
[07:09:24] <joed> ernimril: But you already knew that.
[07:09:50] <aditsu> ernimril: thanks
[07:10:07] <ernimril> aditsu: what information are you looking for?
[07:10:07] <joed> I think we should pimp that swedish profiler.
[07:10:50] <aditsu> ernimril: basically, the memory usage reported by the OS is much greater than the java heap, just wanted to see what it's used for
[07:11:58] <ernimril> aditsu: ok, a big part is usually a mmap of rt.jar (40-50MB)
[07:12:19] <ernimril> aditsu: (depending on what OS and tool you use, you may or may not see that)
[07:14:46] *** waz has quit IRC
[07:15:24] *** mocas_ has joined ##java
[07:18:00] *** thunderbolt has quit IRC
[07:18:38] *** ahughes has quit IRC
[07:20:58] <aditsu> I wonder if there's a tool that parses the info in maps and shows the biggest chunks in descending order
[07:23:32] *** kab has quit IRC
[07:23:36] *** Copter has joined ##java
[07:23:44] *** inflex has joined ##java
[07:23:45] *** deepjoy has joined ##java
[07:24:04] *** deepjoy has quit IRC
[07:24:42] <inflex> hi there, how can I find out if some .jar files are inaccessible by normal users but not root on linux? I'm occasionally running into the problem of not being able to load class files but sometimes things just 'hang' before I find pull up the console.
[07:24:43] *** Kwitschibo has joined ##java
[07:24:52] *** thepointer-work has quit IRC
[07:30:06] *** mocas has quit IRC
[07:31:22] <dangertools> inflex: is the file readable by the user?
[07:31:35] <inflex> yes
[07:31:51] <inflex> all the jar files that I can see are 644
[07:32:09] <dangertools> shouldn't be a problem then
[07:32:27] <inflex> np, I'll keep searching then
[07:33:35] *** shadewind has quit IRC
[07:37:38] *** Levia has quit IRC
[07:37:39] *** pstickne has joined ##java
[07:39:40] <joed> And well, then pstickne said that basically Scala was for retards
[07:41:56] *** gdoko has quit IRC
[07:49:55] *** convivial has quit IRC
[07:52:24] *** MigoMipo has joined ##java
[07:53:15] <pstickne> joed: s/basically//
[07:53:35] <pstickne> joed: on the other hand, it suits me better ^^
[07:55:22] *** mele- has quit IRC
[07:57:55] *** svm_invictvs has left ##java
[07:57:57] *** ridoo has joined ##java
[07:58:01] *** svm_invictvs has joined ##java
[07:58:53] *** arpu has quit IRC
[08:00:20] *** linduxed has quit IRC
[08:05:40] *** inflex has left ##java
[08:06:35] *** mitchnull has joined ##java
[08:09:29] *** cyzie has quit IRC
[08:09:49] <epoxy> Is there built in method for vertical tooltip?
[08:10:19] <epoxy> or... a way to get \n working in there :) i have a list of numbers that i wasnt vertical
[08:10:24] <epoxy> s/wasnt/want
[08:12:17] *** cactuar has quit IRC
[08:12:46] <AMcBain> epoxy: you could try to see if Java tooltips obey HTML like other text components in Java. Start the tooltip with <html> and use <br>
[08:13:23] <epoxy> alrighty..i'll read up on that. i tried basic <html>foo<br></html>
[08:13:39] <AMcBain> well, that should work ... but it might not for tooltips.
[08:13:48] <epoxy> truncated everything after <br>
[08:13:53] <AMcBain> (and you don't need the closing </html> in Java)
[08:13:57] <epoxy> ah
[08:14:01] <aditsu> epoxy: try <html>foo<br>bar</html>
[08:14:24] *** Corey has quit IRC
[08:14:29] *** pstickne has quit IRC
[08:15:01] <deebo> anyone know how to use saxon xpath (jaxp) :P
[08:15:05] <epoxy> ah.. it was the </html>
[08:15:17] <deebo> im using xalan xpathapi but it has a "feature" that makis it sloooow
[08:15:30] <deebo> but i cant get jaxp xpath api (via saxon) to return anything
[08:16:03] <wans> hey if i want to sort these numbers... which type of array should i use to sort them correctly? -1.25 , 0 , 1.25
[08:16:16] <wans> float?
[08:16:23] <wans> long?
[08:17:09] <aditsu> wans: long is wrong, I usually use double for floating-point, but float can work too in this case
[08:18:42] <wans> thanks
[08:18:47] <wans> im having a problems
[08:18:59] *** Sikul has quit IRC
[08:19:02] <wans> whats the best way to read just the number values from this file
[08:19:07] <wans> http://pastebin.stonekeep.com/5602
[08:19:52] *** bas-i has joined ##java
[08:20:09] <wans> by string arrays or by chars ones?
[08:20:16] <aditsu> wans: you can use Scanner
[08:22:18] <gnech> wans: yeah, just use Scanner and convert the strings to float type
[08:22:43] *** MigoMipo has quit IRC
[08:24:54] <deebo> http://pastebin.com/ma3fe22b any ideas?
[08:29:11] *** Deiselton has quit IRC
[08:31:42] *** CrypticS_ has joined ##java
[08:34:20] *** magentar has joined ##java
[08:36:05] *** teralaser has joined ##java
[08:39:14] *** Carnage\ has joined ##java
[08:40:59] *** linxuz3r has quit IRC
[08:41:39] *** Bollinger has joined ##java
[08:44:35] *** kapipi has joined ##java
[08:44:48] *** [[thufir]] has joined ##java
[08:47:08] *** W_work has joined ##java
[08:47:24] *** amitev has joined ##java
[08:47:49] *** casmo has joined ##java
[08:50:58] *** magentar has quit IRC
[08:51:37] *** HeatHawk[AP2] has joined ##java
[08:51:37] *** gdoko has joined ##java
[08:51:40] *** segun has joined ##java
[08:52:06] <segun> i need advice, struts or spring, which should I learn
[08:52:17] *** Hail_Spacecake has joined ##java
[08:52:22] <Woflborg> learn it all
[08:52:32] <Woflborg> thats what learning is all about. diversity.
[08:52:35] <ldam> segun, of the two, prioritize spring
[08:52:56] <Hail_Spacecake> if $echo "some string" | egrep "some regular expression" outputs that string instead of nothing
[08:53:00] *** devurandom has joined ##java
[08:53:02] <Hail_Spacecake> (this is assuming a unix console)
[08:53:12] <HeatHawk[AP2]> I have a swing app that has a recursive function, and when it returns to the top the swing app fails with a nullpointerexception at java.io.file.<init><Unknown Source>, ideas?
[08:53:27] <Hail_Spacecake> then some_string.matches("smame regex"); will return True in all cases, right?
[08:53:28] <pr3d4t0r> Good night, Everyone.
[08:53:30] <HeatHawk[AP2]> i can't post any code, protected :\
[08:53:40] *** dpy has joined ##java
[08:53:53] <segun> all right. I will learn spring
[08:54:17] <segun> and I hope using spring + hibernate is not redundancy?
[08:54:21] *** sliverchair has joined ##java
[08:55:03] <sliverchair> any help how can I download this javadoc then I'll zip it so I can use it for NetBeans,
[08:55:04] <sliverchair> http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/index.html
[08:55:10] *** devurandom has left ##java
[08:55:32] *** roadt has joined ##java
[08:56:06] <segun> sliverchair: use httrack if the site didnt provide a downloadable zip
[08:56:23] *** jivedude has joined ##java
[08:56:32] <Hail_Spacecake> do you need to escape /'s in java? in a string?
[08:57:05] <sliverchair> Hail_Spacecake: nope
[08:57:19] <Hail_Spacecake> so does anyone know the answer to my first question?
[08:57:45] <deebo> ah finally got it to work
[08:58:00] <deebo> xpath execution time dropped to one fifth after changing xalan to jaxp saxon
[08:58:31] <Woflborg> Hail_Spacecake: yeah, it should, if its the same regexp
[08:58:57] <segun> Hail_Spacecake: what is your first questio
[08:59:06] <segun> question*
[08:59:08] <Hail_Spacecake> <Hail_Spacecake> if $echo "some string" | egrep "some regular expression" outputs that string instead of nothing
[08:59:14] <Hail_Spacecake> Hail_Spacecake> then some_string.matches("smame regex"); will return True in all cases, right?
[08:59:33] *** skoskav has quit IRC
[09:00:20] <segun> yes of course. as long as "some regular expression" is the same as "smame regex"
[09:00:27] <Hail_Spacecake> yeah
[09:00:41] <Hail_Spacecake> I'm getting a false from that where I should be getting a true
[09:01:01] <Hail_Spacecake> so I'm wondering if there might be cases where egrep's interpretation doesn't mesh with java's
[09:01:10] <Hail_Spacecake> I dont' know regexes all that well myself
[09:01:29] <Woflborg> techically it may be possible to make it return false if you have some regexp flags modifying the behaviour
[09:01:46] <Hail_Spacecake> I'm not passing anything special to egrep
[09:02:02] <deebo> you might need to signal some modes to the regexp engine in java
[09:02:02] <Woflborg> like making dot match newlines too
[09:02:18] <deebo> like .* doesnt match row changes by default etc
[09:02:27] <Woflborg> theres an echo here :p
[09:02:35] <Hail_Spacecake> what I'm trying to have happen is for "\b[0-9]{1,2}/[0-9]{1,2}/[0-9]{1,4}\b" to match "2/4/2"
[09:02:54] <deebo> \\b
[09:03:09] <Hail_Spacecake> so backslashes do need to be escaped
[09:03:11] <Hail_Spacecake> okay
[09:03:28] <Hail_Spacecake> what does a java string view \b as, then?
[09:03:44] <deebo> no idea
[09:03:57] <Woflborg> but they need to be escaped since \ is the escape character
[09:03:58] <deebo> whats \b? numeric
[09:04:04] <Hail_Spacecake> well works now
[09:04:07] <Hail_Spacecake> thanks
[09:04:40] *** skoskav has joined ##java
[09:04:54] *** schasi has joined ##java
[09:07:57] *** segun has left ##java
[09:08:49] *** bas-i has quit IRC
[09:10:12] *** aditsu has quit IRC
[09:10:35] *** bas-i has joined ##java
[09:11:05] *** Rounin has joined ##java
[09:12:56] <Rounin> Say, I have this if clause which says if ( (a == null) || (a.compareTo(b) < 0) ) dosomething; , but it's giving me a null pointer exception... Is there any way of getting it not to evaluate the second clause that I just out of stupidity haven't thought of?
[09:14:02] <deebo> mm use &&?
[09:14:23] <svm_invictvs> uh...
[09:14:28] <deebo> altho um
[09:14:37] <deebo> it shouldnt be possible to get a npe
[09:14:39] <Rounin> It's supposed to not do the second evaluation haha
[09:14:40] <svm_invictvs> (a == null) || (a.foo()) shouldn't ever npe
[09:14:40] <deebo> unless b is null
[09:14:41] *** pierrep has joined ##java
[09:14:47] *** isr` has quit IRC
[09:15:05] <svm_invictvs> if the first case is true then the secodn won't execute.
[09:15:20] <Rounin> Ah, sorry, I've got it all wrong, b is null, but the first clause also checks b
[09:15:22] <svm_invictvs> yeah, b is null.
[09:15:30] <Rounin> (b == null) || a.compareto(b)
[09:15:41] <svm_invictvs> then a may be null
[09:15:53] <Rounin> I've checked for that also though
[09:16:00] <svm_invictvs> Why would both be null?
[09:16:07] <svm_invictvs> That seems like a code smell...
[09:16:11] <svm_invictvs> how are you checking it?
[09:16:32] *** ldam has quit IRC
[09:16:48] <Rounin> if (a == null) throw
[09:16:48] <Rounin> new NullPointerException();
[09:16:56] <Rounin> So a shouldn't be null...
[09:17:09] <Rounin> And b shouldn't be null, because then it shouldn't do the compareTo at all
[09:17:15] <Rounin> Or so I thought...
[09:17:22] <Rounin> Bit if I replace the compareto with (true) it compiles
[09:17:33] <svm_invictvs> Rounin: pastebin the whole fucking method. I'm sick of speculating.
[09:17:40] <Rounin> Haha OK
[09:17:49] *** schasi has quit IRC
[09:17:50] <svm_invictvs> And you should never throw NPE yourself?
[09:17:52] <svm_invictvs> er
[09:17:56] <svm_invictvs> s/?/.
[09:17:57] <Rounin> ~pastebin
[09:17:57] <HeatHawk[AP2]> sorry for repeat...I have a swing app that has a recursive function, and when it returns to the top the swing app fails with a nullpointerexception at java.io.file.<init><Unknown Source>, ideas?
[09:17:57] <javabot> http://www.papernapkin.org/pastebin Paste the final url after you've pasted your stuff there.
[09:18:09] <Rounin> The assignment I'm doing tells me to throw it, so I can't really not do it
[09:19:01] <svm_invictvs> Rounin: Then your assignment is bunk. Go in and expalin to the dimwit that assigned it to you that you should throw an IllegalArgumentException.
[09:19:27] <HeatHawk[AP2]> if i dont do my recursive call, the function runs fine, updates the textbox, etc, and in the recursion it works fine, its only when I leave to the top i get this nullpointer exception
[09:20:03] *** indeterminatus has joined ##java
[09:20:20] <svm_invictvs> ~javadoc NullPointerException
[09:20:22] <javabot> svm_invictvs: http://is.gd/ikaR [java.lang.NullPointerException]
[09:20:49] <Rounin> Hm, so http://www.papernapkin.org/pastebin/view/4301
[09:21:20] <svm_invictvs> Rounin: Okay, I take that back. The javadocs say it should be thrown. Personally I think you shouldn't check for null pointers...
[09:21:25] <svm_invictvs> considering the VM does it for you.
[09:23:15] <svm_invictvs> Rounin: Honestly I think NPE is inappropraite for your case. Considering that your'e checking the argument of a method which you shoudl clearly document as one that rejects null values. Most of the Java standard API does that.
[09:24:54] <Rounin> Well, that's fine, but I can't really change the assignment
[09:24:56] <HeatHawk[AP2]> http://pastebin.com/m69525d3a when the cursive call doesnt get made, runs fine, when it does get called, it crashes with NPE when it returns, ideas would be super nice now :\
[09:26:02] <HeatHawk[AP2]> *recursive
[09:26:26] *** pschriner has joined ##java
[09:27:21] <svm_invictvs> Rounin: I bet you anything currnode is null
[09:28:16] *** aditsu has joined ##java
[09:28:26] <Rounin> AH! Ah... Oh... Oh man, I would have never thought of that... Thanks
[09:28:32] <svm_invictvs> Rounin: And yes. I'm a culturally insensitive american who has no idea what language your comments are in so I dont' know what you're code is supposed to be doing.
[09:28:33] *** bas-i has quit IRC
[09:28:43] *** bas-i has joined ##java
[09:28:45] <Rounin> Ah well, the comments are just ironic mostly
[09:28:47] *** bindaas has joined ##java
[09:29:21] <Rounin> It's a singly linked list apparently... Or it will be once ahem... A few things are ironed out
[09:29:52] <svm_invictvs> Write a double linked list
[09:30:03] <svm_invictvs> :-P
[09:30:03] *** staykov has quit IRC
[09:30:14] <Rounin> Can't do that either; the assignment is quite specific
[09:30:14] <svm_invictvs> In CS101 I wrote a Single linked list and it took forever to write
[09:30:29] <svm_invictvs> In C++
[09:31:42] *** antipivo has joined ##java
[09:31:50] <antipivo> hi all
[09:31:59] <svm_invictvs> Rounin: I seem to remember it being easier to write as a double linked list.
[09:32:15] <ambient> svm_invictvs: in python: "list = []" ;)
[09:32:20] <HeatHawk[AP2]> double linked lists are easier to manage
[09:32:30] <Rounin> I'm sure it is
[09:32:36] <HeatHawk[AP2]> anyways, can someone help me :(
[09:32:40] <svm_invictvs> ambient: Somebody still had to write it...
[09:32:59] <ambient> svm_invictvs: and somebody had to write that C++ compiler
[09:33:12] <svm_invictvs> in C++ it's just std::list
[09:33:27] *** ShadowHntr has quit IRC
[09:33:58] <svm_invictvs> LinkedList<Foo> in java
[09:35:42] *** spydon has joined ##java
[09:36:36] <svm_invictvs> ambient: I'm reminded of that joke from the simpsons, "YOu learn Karate so you need not ever use it."
[09:37:01] <HeatHawk[AP2]> svm_invictvs, i dont want to be a total pain man, but can you please look at my question? :(
[09:37:12] <svm_invictvs> HeatHawk[AP2]: yeah, I did.
[09:37:14] <svm_invictvs> Its' a huge function
[09:37:54] <HeatHawk[AP2]> ya
[09:37:58] <svm_invictvs> HeatHawk[AP2]: You're recusrively traversing a directory validating MD5 sums?
[09:38:06] <HeatHawk[AP2]> ya
[09:38:22] <svm_invictvs> You're getting an npe?
[09:38:38] *** codeRat has joined ##java
[09:38:40] <HeatHawk[AP2]> ya, only when its coming out of recursion tho
[09:38:59] <spydon> How do I get the keycode from a keyevent?
[09:39:26] <svm_invictvs> when it's returning?
[09:40:02] <HeatHawk[AP2]> ya, like when it goes back up a level
[09:40:16] <svm_invictvs> HeatHawk[AP2]: I'd start by simplifying the recursive logic.
[09:40:23] <[[thufir]]> why does java.com report that I don't have java installed and working? I do: http://pastebin.com/m462ea48e
[09:40:36] <svm_invictvs> HeatHawk[AP2]: Isolate the code that just does the recursive walk.
[09:40:51] *** teralaser has quit IRC
[09:41:11] <svm_invictvs> because that function is a bit of a beast
[09:41:31] <HeatHawk[AP2]> ya
[09:41:34] <HeatHawk[AP2]> gah
[09:41:41] <HeatHawk[AP2]> stupid 4AM came fast
[09:41:52] <HeatHawk[AP2]> i should go to bed, maybe ill see it tomorrow
[09:41:53] <[[thufir]]> woops, that was wrong channel, but you're free to comment
[09:41:58] *** emet has quit IRC
[09:42:34] <spydon> [[thufir]]: sudo apt-get install sun-java6-jdk
[09:42:35] <antipivo> I wish to consider from the keyboard a type primitive int, write so int CMegapix = in.nextLine(); But I receive error in line n.nextLine();
[09:43:20] <HeatHawk[AP2]> svm_invictvs, thanks anyways
[09:43:22] <svm_invictvs> HeatHawk[AP2]:t ake apart your function and start with one that just traverses a directory recursively. Then make functions to do the rest.
[09:43:22] <HeatHawk[AP2]> peace
[09:43:25] <svm_invictvs> and call 'em
[09:43:44] <HeatHawk[AP2]> ya, i see what your saying for sure
[09:43:54] <HeatHawk[AP2]> ill do it tomorrow tho
[09:43:54] <[[thufir]]> spydon: thans
[09:43:56] <HeatHawk[AP2]> need sleep
[09:43:56] <HeatHawk[AP2]> lol
[09:43:58] <HeatHawk[AP2]> thanks
[09:44:56] *** r0bby has quit IRC
[09:45:19] <spydon> How do I get the keycode from a keyevent?
[09:46:16] <spydon> actionevent i mean
[09:46:55] *** bas-i has quit IRC
[09:48:23] *** mapreduce has joined ##java
[09:50:07] <mapreduce> I have some code that I think works on its own, but I fork many processes sequentially that do similar things, and in that case I get an IOException from FileInputStream.read, with the message "Bad file descriptor".
[09:50:33] <mapreduce> Some searching shows up a JDK bug that was apparently fixed prior to my JDK (1.6.0_11). I've tried adding a pause between executions.
[09:50:38] <mapreduce> Any suggestions?
[09:50:44] *** agnul has joined ##java
[09:51:27] *** ldam has joined ##java
[09:51:38] *** epoxy has quit IRC
[09:53:42] *** bas-i has joined ##java
[09:54:09] *** casmo has quit IRC
[09:55:10] *** bashoh has joined ##java
[09:59:07] *** woogley has quit IRC
[09:59:14] <Woflborg> hit it with a debugger and see where it throws it ?
[09:59:37] <mapreduce> I can see where it throws it from the stack trace.
[09:59:44] <mapreduce> FileInputStream.read, and from there, within native code.
[10:00:11] *** spydon has quit IRC
[10:00:40] <Woflborg> so no clue on why it throws it then ?
[10:00:59] *** mitch0 has joined ##java
[10:01:38] *** ajazz has joined ##java
[10:03:04] *** KermitTheFragger has joined ##java
[10:03:36] <Woflborg> its a bit hard to go guess on these things without knowing even the nature of the code youve written :)
[10:04:23] *** ridoo has quit IRC
[10:04:28] <mapreduce> I'm reusing the Stream when I shouldn't be.
[10:04:50] <mapreduce> So there's no longer a question.
[10:05:56] <Woflborg> Ah well, I'll go back to being useless then :(
[10:06:41] <mapreduce> Hmm. I'm trying to benchmark some code that reads stuff from an InputStream. In other runs it reads from a byte[] or a ByteBuffer instead. I think it would be unfair to include creating the InputStream in the time taken.
[10:07:19] <mapreduce> Would it be unreasonable to create 1000 or more FileInputStreams all pointing at the same file, so that I can do that bit in advance?
[10:08:19] <mapreduce> Oh, hell, I'll read into a byte[] then construct ByteArrayInputStreams instead.
[10:08:55] *** habbekratz has joined ##java
[10:09:41] <deebo> anyone know if xml unmarshallers are fast, i have a 1+ MB xml to parse, im currently using xpath and going from xalan to saxon was a massive improvement, but in a web context its still "slow"
[10:09:59] *** teralaser has joined ##java
[10:10:16] <tazle> mapreduce: see what happens on syscall level with strace or some similar tool
[10:10:57] <tazle> mapreduce: if this is Unix, you might be running out of file descriptors
[10:13:34] *** CarstenP2 has joined ##java
[10:13:47] <deebo> 1.2MB xml and xpath to get data from it took xalan XPathAPI 280 seconds
[10:13:55] <deebo> saxon jaxp xpath api only 14seconds
[10:14:21] <zmyrgel> As Java doesn't have multiple inheritence how can I add common stuff for my classes? Currently I tried to use interface with abstact class that implemets all the common methods and then use that but MyClass extends JPanel,MyAbstact isn't valid
[10:15:04] <zmyrgel> other idea was to have my abstract class to implement my interface and to extend JPanel but that just generated a bunch of errors
[10:15:08] <mapreduce> zmyrgel: You could put that stuff in a separate object.
[10:15:30] <mapreduce> Rename MyAbstact to MyConcrete, and have MyClass hold a MyConcrete as a member.
[10:16:02] <zmyrgel> http://www.wickedbsd.net/code/
[10:16:11] <zmyrgel> there's a code sample
[10:16:38] <zmyrgel> I would need to have that functionality within those class ( Composite design pattern )
[10:16:48] *** Sikul has joined ##java
[10:18:27] <mapreduce> MyContentPanel doesn't look very useful, as JPanel already has all those methods, and 300 more.
[10:19:05] <habbekratz> isn't extends written before implements?
[10:19:07] <mapreduce> 322 more, to be exact.
[10:19:13] <mapreduce> habbekratz: It does not have to be.
[10:20:46] *** n3llyb0y has joined ##java
[10:21:49] *** dvayanu has joined ##java
[10:22:07] <zmyrgel> mapreduce: http://en.wikipedia.org/wiki/Composite_pattern#Java
[10:22:10] *** Resistance has quit IRC
[10:22:15] <zmyrgel> tried to achieve something like that
[10:22:24] *** Vantaa has joined ##java
[10:23:09] <mapreduce> Swing already implements that.
[10:23:28] <zmyrgel> damn swing :)
[10:24:20] *** adi112358 has joined ##java
[10:24:35] <zmyrgel> Hmm, I think I need to go back to my drawing board then ...
[10:24:41] <mapreduce> JPanel has getComponents()
[10:24:47] <mapreduce> Well, that's from Container.
[10:25:09] <mapreduce> Are you in search of a problem or a solution?
[10:25:52] <zmyrgel> I'm just on Design patterns course and one assignment is to do a program with at least 8 design patterns. This code is to another course but I'm intending to add the patterns to it.
[10:26:09] <zmyrgel> Apparently the composite to my JPanels was a wrong move
[10:26:11] *** topriddy has joined ##java
[10:26:16] *** CodeWar has joined ##java
[10:26:46] <mapreduce> I am trying very hard not to tell you how ridiculous that assignment is.
[10:27:42] <zmyrgel> Why's that?
[10:27:44] *** adi112358 has quit IRC
[10:27:58] <mapreduce> Because inserting patterns is not what programming is.
[10:28:14] <mapreduce> Patternitis is a problem in software.
[10:28:17] <zmyrgel> using patterns to make re-usable components?
[10:28:45] <mapreduce> Patterns are themselves ways of repeating an implementation many times.
[10:28:58] <mapreduce> That's not the ideal form of reuse.
[10:29:02] <CodeWar> mapreduce, not necessarily for example I have the state pattern coded up such that I can reuse it as is
[10:29:26] * mapreduce looks up the state pattern.
[10:30:16] <mapreduce> The cleanest mechanism for that in Java is an enum with each member implementing the state transformations.
[10:30:20] *** ridoo has joined ##java
[10:30:44] <CodeWar> theres some clutter involving how many states can there be and such its easy to capture that in a multimap
[10:31:00] <CodeWar> Map<State, Map<Input, NewState> >
[10:31:03] <mapreduce> enum OnOrOff { ON { OnOrOff switch() { return OFF; } }, OFF { OnOrOff switch() { return ON; } }; abstract OnOrOff switch(); };
[10:31:34] <mapreduce> though switch is a reserved word for something I don't use.
[10:32:07] <CodeWar> dont follow so I ahve state A and with input X it goes to state B how are we capturing taht again with the enums
[10:32:17] *** valcker has joined ##java
[10:32:49] <mapreduce> CodeWar: OnOrOff.ON.switch() == OnOrOff.OFF
[10:33:19] *** roadt has quit IRC
[10:33:34] *** obnauticus has quit IRC
[10:34:45] <CodeWar> so switch() stands for possible inputs? if there was 3 inputs I1 I2 I3 you would have 3 such methods?
[10:35:16] *** Resistance has joined ##java
[10:35:18] <mapreduce> switch is just one transformation. If it was TrafficLights you might have next() instead of switch().
[10:36:54] <CodeWar> thats clutter so for all states that dont have transitions on an input I have to explicitly add noop methods?
[10:37:19] <CodeWar> well I guess you could give them base calss noop methods .. but still doesnt feel good
[10:37:28] <CodeWar> too much subclassing going on here :)
[10:38:08] <mapreduce> Give an example of such a state (that doesn't have transitions on an input).
[10:38:34] *** squi has quit IRC
[10:38:49] <CodeWar> DFA not all states have transitions on all inputs unless specified you stay in the same state
[10:39:02] * mapreduce looks up DFA.
[10:39:18] <mapreduce> Ah, state machine.
[10:39:21] <CodeWar> stringcompare
[10:39:34] <CodeWar> "abcd" compare with xoupoadufdasabcdadfd
[10:39:52] <CodeWar> after a I want b anything else I ll stay in that particular state
[10:40:58] *** squi has joined ##java
[10:41:10] *** killuats has joined ##java
[10:41:25] <CodeWar> though theres nothign wrong with the enum solution you can do the same thing just dont make your switch() and other transition methods abstract give them a noop body
[10:41:28] <mapreduce> That sounds broken.
[10:41:35] <CodeWar> huh
[10:41:50] <mapreduce> Is this to find exact matches, or to find substrings?
[10:41:56] <CodeWar> substring
[10:42:16] <mapreduce> Then it's broken.
[10:42:18] <f3ew> mapreduce, patterns are a way to describe solutions
[10:42:22] <CodeWar> how come
[10:42:28] <f3ew> not reuse
[10:42:47] <mapreduce> a followed by d should reset to the null state.
[10:43:04] <mapreduce> You need 5 states for this, NULL, A, B, C, D
[10:43:10] <CodeWar> sure it should goto the start state not null state
[10:43:17] * mapreduce codes it for fun.
[10:43:50] *** schasi has joined ##java
[10:45:29] <CodeWar> actually nopes you need 4 states A is the start state D is the final state from A any input other than B stays at A .. input B takes you to B . from B anything other than C takes you back to A
[10:46:15] *** dv_ has quit IRC
[10:48:22] <CodeWar> naah its 5 states alrite
[10:48:26] * CodeWar brushes up his DFA concepts
[10:49:07] *** ridoo has quit IRC
[10:50:59] <CodeWar> !pastebin
[10:52:06] *** topriddy has quit IRC
[10:53:06] <nekrozion> ~pastebin
[10:53:06] <javabot> http://eugeneciurana.com/pastebin Paste the final url after you've pasted your stuff there.
[10:53:43] <CodeWar> http://eugeneciurana.com/pastebin/pastebin.php?show=39810
[10:54:03] <CodeWar> anyways I find this implementation of statepattern a bit more reusable and less inheritance frenzy but perhaps i m biased because I wrote it
[10:58:25] *** foo-nix has quit IRC
[11:02:34] <mapreduce> CodeWar: http://pastebin.com/ffe2d60b
[11:03:01] <mapreduce> I wouldn't implement it this way for anything real, this is just for pedagogy.
[11:05:15] <CodeWar> mapreduce, if I added 10 more transitions you would have to add 10 for each of the subclasses .. not sure how this is reusable for any state pattern solving problems
[11:06:05] <mapreduce> CodeWar: For something real I wouldn't implement it as a separate transition for each possible character.
[11:06:11] <CodeWar> isnt this really onthing more than a multimap Map<State, Map<Transition, State>>
[11:06:48] <mapreduce> Objects are nothing more than maps.
[11:07:25] <mapreduce> Perl programmers are known for approaching non-Perl languages and doing everything as maps.
[11:07:28] *** ridoo has joined ##java
[11:08:14] <CodeWar> I have no idea what you just said and how taht connects it to state pattern.. my mind is rather slow I gues :)
[11:09:03] <CodeWar> that switch case is another pain ... wouldnt you want the transitions to happen based on a map lookup instead of writing code for the switch?
[11:09:23] <mapreduce> Depends how repetitive the switch is.
[11:09:27] <mapreduce> Here it is.
[11:09:45] *** molgrew has joined ##java
[11:10:37] *** schasi has quit IRC
[11:10:43] <mapreduce> The main advantage to a map is that you can update it outside the code it's used in.
[11:10:48] <mapreduce> over a switch, that is.
[11:11:00] <aje> hi there
[11:11:18] <CodeWar> mapreduce, isnt the builder syntax sweet too :)
[11:11:21] <aje> i am having great problems with a jndi lookup for a stateless ejb in my jboss 5.0 application server
[11:11:27] <aje> i use the following lookup: http://pastie.org/379248
[11:11:28] <mapreduce> CodeWar: Which builder syntax?
[11:11:36] *** tinh has joined ##java
[11:11:39] <aje> the funny thing is that the first lookup actually works well.
[11:11:53] <aje> bu the second lookup generates a ClassCastException
[11:11:55] <CodeWar> mapreduce, StateMachine machine = new StateMachine(initSTate);
[11:12:04] <CodeWar> machine.withState(someState).
[11:12:16] <aje> could somebody point me to how to resolve this jndi problem?
[11:12:17] <CodeWar> .withInput(one).gotoState(someOtherState)
[11:13:08] <mapreduce> CodeWar: That pattern leads to some hilarity with subclassing.
[11:14:08] <mapreduce> I'm thinking of the normal builder use - new FooBuilder().withName("Bob").withAge(42).build()
[11:14:14] <CodeWar> http://eugeneciurana.com/pastebin/pastebin.php?show=39810
[11:14:26] *** ambient has quit IRC
[11:14:45] <CodeWar> are you referring to the AState subclasses? you dont need them unless you have something unique you want to see done in the enterState method just reuse a noop AStateNoop.
[11:15:28] *** killuats has quit IRC
[11:15:50] *** acuster has joined ##java
[11:16:46] *** molgrew has left ##java
[11:16:50] *** i-bas has joined ##java
[11:17:24] *** Resistance has quit IRC
[11:18:14] *** bitshuffler has quit IRC
[11:18:15] *** PuffTheMagic has quit IRC
[11:19:59] *** Soliah has quit IRC
[11:20:35] *** CodeWar has quit IRC
[11:21:27] *** Elvanor has joined ##java
[11:22:16] *** DjZemich has joined ##java
[11:22:47] *** Daniel_H has joined ##java
[11:24:33] <Elvanor> How do you create constant class instances?
[11:24:58] *** Resistance has joined ##java
[11:25:19] *** acuster is now known as avc_work
[11:26:32] <W_work> Elvanor, what is a constant class instance?
[11:27:06] <Elvanor> You have a class. You create an instance of that class, which will be constant (eg, constant properties)
[11:27:08] *** UK-sHaDoW has joined ##java
[11:28:16] <mapreduce> You make the class immutable, i.e., make all fields final, and the types of all fields immutable types.
[11:28:27] <W_work> Elvanor, make all the fields final, and set them in a constructor
[11:28:50] <W_work> what mapreduce said...
[11:29:09] <Elvanor> mapreduce: no because I need several instant of that class
[11:29:15] <Elvanor> each with different properties
[11:29:38] *** serrghi has quit IRC
[11:29:39] *** genesiss has joined ##java
[11:29:42] *** serrghi has joined ##java
[11:29:47] <mapreduce> final fields can be different for each instance.
[11:29:57] <Elvanor> Hmm
[11:30:12] <mapreduce> class Complex { public final double re, im; public Complex(double re, double im) { this.re = re; this.im = im; } }
[11:30:28] <Elvanor> I see, but that does not give me a constant
[11:30:35] <Elvanor> I have to create it afterwards
[11:30:46] <mapreduce> You can't mutate the Complex, so what do you mean by a constant?
[11:30:51] <Elvanor> eg, Complex a = new Complex(2, 3);
[11:31:02] <Elvanor> and I want that a cannot be assigned to another
[11:31:09] <Elvanor> eg a =b is not possible
[11:31:09] <mapreduce> final Complex a = ..
[11:31:11] <W_work> ~~Elvanor final
[11:31:11] <javabot> Elvanor, final is a Java keyword that denotes that its target cannot change. A final field/variable cannot be assigned more than once, a final method cannot be overridden in a subclass, and a final class cannot be subclassed.
[11:31:30] <Elvanor> mapreduce: and would it be possible to have
[11:31:48] <Elvanor> static final Complex first = new Complex(2, 3);
[11:31:53] <Elvanor> inside the Complex class?
[11:31:58] <mapreduce> Yes.
[11:32:02] <Elvanor> so that the class would hold some static constants.
[11:32:05] <Elvanor> mapreduce: ok thanks.
[11:32:18] *** bas-i has quit IRC
[11:32:32] <mapreduce> For fun, remove the static and you'll get a stack overflow.
[11:35:41] *** Levia has joined ##java
[11:37:45] *** i-bas has quit IRC
[11:39:03] <Elvanor> mapreduce: I can understand why
[11:40:49] *** EspenG has quit IRC
[11:42:22] *** mitchnull has quit IRC
[11:43:16] *** nytejade has quit IRC
[11:46:56] *** zacs7 has joined ##java
[11:48:04] *** topriddy has joined ##java
[11:48:50] *** nater has joined ##java
[11:49:19] *** blankthemuffin has quit IRC
[11:49:35] *** Razec has joined ##java
[11:50:16] *** zacs7 has left ##java
[11:52:12] <topriddy> \clear
[11:52:18] <topriddy> :D
[11:59:24] *** codethief has joined ##java
[12:00:15] *** pirho has joined ##java
[12:00:17] *** justafish has joined ##java
[12:02:20] *** casmo has joined ##java
[12:02:56] *** tinh has quit IRC
[12:03:47] *** teralaser has quit IRC
[12:06:29] *** NiSoOo has joined ##java
[12:07:02] *** sliverchair has quit IRC
[12:07:17] *** FMJaguar has quit IRC
[12:08:55] *** Resistance has quit IRC
[12:09:02] *** Resistance has joined ##java
[12:09:47] *** deepjoy has joined ##java
[12:10:38] *** bas-i has joined ##java
[12:11:45] *** vesz has joined ##java
[12:12:21] *** otep has joined ##java
[12:12:29] <Hail_Spacecake> can you declare a helper procedure inside of a different procedure in java?
[12:13:30] <kubek2k> Hail_Spacecake: what is helper procedure ?
[12:14:08] <Hail_Spacecake> some private method within another method
[12:14:09] *** mitchnull has joined ##java
[12:14:29] <Hail_Spacecake> this is my habit from Lisp, I think, but it seems to do what I want it to do
[12:14:36] <Hail_Spacecake> except I"m getting an error
[12:14:39] <Hail_Spacecake> when I try to compile
[12:15:37] *** skoskav has quit IRC
[12:16:27] <W_work> Hail_Spacecake, no, you can't. You can create an anonymous implementation of an interface containing the function you want though
[12:16:36] *** Elvanor has quit IRC
[12:16:53] <Hail_Spacecake> what do you mean by anonymous implementation of an interface?
[12:17:05] <Hail_Spacecake> you mean, declare a private method elsewhere in the class?
[12:17:11] <W_work> like executor.schedule(new Runnable{public void run(){/* do stuff */}});
[12:17:35] <W_work> in that case, you are passing a Runnable, but the actual implementation is defined right at the point of passing
[12:17:45] <W_work> which is kind of like passing the run() method
[12:18:49] <W_work> Java does not have first-class functions, you cannot reference a function or method. You have to use interfaces
[12:19:03] <tazle> except with a bunch of extraneous syntax that gets tiring if you have to convert a ton of tests to use a callback-ish API ... which is what I'm doing now
[12:19:22] <W_work> but yes, if you don't need to pass the method anywhere, a private static method is the more common idiom
[12:20:45] <W_work> depending on the utility of the method, you might want to set it out in its own class that can be reused elsewhere
[12:22:19] *** bashoh has quit IRC
[12:22:54] *** sombriks has joined ##java
[12:25:34] *** BrokenClockwork has joined ##java
[12:25:47] *** bindaas has quit IRC
[12:25:51] <BrokenClockwork> Hey fellows, is it possible to code in Eclipe with white von black background style?
[12:26:11] *** igordcard has joined ##java
[12:26:34] <BrokenClockwork> or in IntelliJ
[12:26:42] *** xabbuh has joined ##java
[12:27:30] *** mazzachre has joined ##java
[12:28:30] *** keks_ has joined ##java
[12:29:38] *** cyzie has joined ##java
[12:30:04] *** EspenG has joined ##java
[12:30:15] *** SpeedyGhost has quit IRC
[12:30:22] *** cyzie has quit IRC
[12:30:32] *** monk-san has joined ##java
[12:30:45] *** cyzie has joined ##java
[12:30:49] <mapreduce> Hail_Spacecake: You can have a class within a method, and define your method-private methods in there.
[12:31:10] <mapreduce> Hail_Spacecake: Any free variables used from the enclosing method need to be declared final though.
[12:31:11] *** BrokenClockwork has left ##java
[12:31:55] <mapreduce> And those method-private methods can't be static. In short, it's a non-starter and Java almost forces you to place those methods outside the method they're relevant to.
[12:38:44] *** mmc has joined ##java
[12:41:44] *** lami1984 has joined ##java
[12:41:47] *** funktor has joined ##java
[12:41:48] <lami1984> hello
[12:42:26] *** MacGyverNL has quit IRC
[12:42:50] *** MacGyverNL has joined ##Java
[12:43:53] *** ramdam has quit IRC
[12:44:14] *** ajazz has quit IRC
[12:44:45] *** mitchnull has left ##java
[12:45:16] *** skoskav has joined ##java
[12:45:39] *** teralaser_ has joined ##java
[12:46:41] *** mapreduce has left ##java
[12:47:13] *** DragonLord- has joined ##java
[12:48:27] *** romanb has joined ##java
[12:50:08] *** morkar- has joined ##java
[12:50:23] *** gregor_k has joined ##java
[12:50:43] <topriddy> hi
[12:50:53] <jottinger> it's not a nonstarter. It just has rules
[12:55:28] *** spacepup has quit IRC
[12:55:51] *** aditsu has quit IRC
[12:56:46] <neshaug> hmm, I heard about a tool for checking the code syntax in java (too keep the code in a standard form), but I can't remember what it is called. Know wich tool I'm thinking about? :P
[12:57:14] <habbekratz> findbugs
[12:58:01] <neshaug> habbekratz: hmm, nope it wasn't that, but findbugs looks great as well.
[13:00:19] *** NiSoOo has quit IRC
[13:00:50] *** skoskav has quit IRC
[13:01:04] *** ramdam has joined ##java
[13:02:02] <habbekratz> is there a way to cast an int to a char in el?
[13:04:51] *** ramdam has quit IRC
[13:05:06] <kubek2k> Hail_Spacecake: it would be really dirty - as lisp ;)
[13:05:23] *** ramdam has joined ##java
[13:05:32] <Hail_Spacecake> I've been in my java class for two weeks and I've already decided that lisp is far better than java :)
[13:05:47] *** shadewind has joined ##java
[13:06:12] <habbekratz> nothing is better. evrything has a prupose
[13:06:20] *** lyy has joined ##java
[13:06:21] <habbekratz> purpose*
[13:06:30] <lyy> hi
[13:07:02] <lyy> any open source code out there that a newish guy can take a look at and possible help out with?
[13:08:06] <habbekratz> you could help me generate A to Z in a jsp :)
[13:08:37] <habbekratz> preferably without scriptlets
[13:09:31] <lyy> generate letters a to z?
[13:09:36] <lyy> is that what you mean?
[13:09:44] <jottinger> habbekratz: how hard could it be?
[13:09:44] <habbekratz> yes
[13:09:55] *** EspenG has quit IRC
[13:09:59] <jottinger> A language is judged by YOUR ability to generate letters in a sequence?
[13:10:00] <habbekratz> i'm trying that without using w%=%W
[13:10:09] <habbekratz> scriptlets*
[13:10:16] <jottinger> You DO know that programming languages are, like, designed for other things, right?
[13:10:52] <habbekratz> I'm not looking at the big picture atm
[13:11:04] <jottinger> oh, i see
[13:11:11] * jottinger writes habbekratz off
[13:11:17] <habbekratz> lol
[13:11:42] <lyy> isn't writing letters a - z kinda trivial with servlets?
[13:11:46] *** traxy has joined ##java
[13:11:48] <habbekratz> so is it possible using only el to generate those letters or do i have to use scriptlets
[13:12:06] <lyy> el?
[13:12:09] <habbekratz> coz scriptlets in views are bad etc
[13:12:16] <habbekratz> expression language
[13:12:21] <lyy> ah, ok..
[13:12:27] <lyy> I've seen that in my java book :D
[13:12:46] <lyy> java is kinda a horrible language
[13:13:00] <lyy> but oh well.. the work place wants to use it so here i am :)
[13:13:10] *** jonaslund has joined ##java
[13:13:24] <jonaslund> uh-oh, is the 1.6 jre unstable under windows ?
[13:13:36] <lyy> did it crash on you?
[13:14:33] *** B|ackPanther has quit IRC
[13:15:02] *** igordcard has quit IRC
[13:15:02] <jonaslund> yep
[13:15:24] <lyy> i don't know. it works for me - hasn't crashed yet.
[13:15:31] <jonaslund> i was stress-testing my webapp when it happened
[13:15:33] <lyy> oh wait
[13:15:38] <lyy> I have the jdk
[13:15:42] <lyy> you meant the jre
[13:15:42] <jonaslund> oh jdk
[13:15:53] <jonaslund> um.. is there a difference ?
[13:16:04] <jonaslund> isn't the jdk just a compiler,etc ?
[13:16:08] <lyy> jdk is the dev kit
[13:16:10] <lyy> yes
[13:16:17] <jottinger> the jdk is the jre + tools for compilation and monitoring
[13:16:20] <lyy> jre is just the tool to run stuff
[13:16:25] <lyy> yes
[13:16:26] <jottinger> but normally, no, the JVM is not unstable
[13:16:31] <lyy> yup - we on same page
[13:16:38] <jottinger> and what makes java a horrible language?
[13:16:58] <lyy> well, maybe not horrible
[13:17:15] <lyy> but it has too many things outside of it to make it do what it needs to do
[13:17:20] <lyy> like el
[13:17:23] <lyy> dirby
[13:17:26] <jottinger> errrr
[13:17:32] <lyy> alot of frameworks
[13:17:35] <lyy> jboss
[13:17:39] <jottinger> those... are bad?
[13:17:49] <lyy> why dn't it have just 1 thing
[13:17:55] <lyy> that does everything
[13:18:03] <jottinger> *blink*
[13:18:10] <jonaslund> umm..
[13:18:22] <jottinger> because it would do that "everything" in a way that was inappropriate for YOUR specific need
[13:18:22] <jonaslund> might have been an interesting case i've exposed..
[13:18:33] <jottinger> as it is, you have a lot of choices to solve things the *right* way
[13:18:44] *** topriddy has quit IRC
[13:18:47] <jottinger> i.e., Derby performs a *certain* way. You might need how something *else* performs.
[13:18:50] <jonaslund> (Classloader).loadClass("blabla") should return an instance of the class is already loaded?
[13:19:02] <lyy> too many choices blows people's brains up
[13:19:05] <jottinger> So you choose what makes sense for you. if that is a problem for you, perhaps you should run screaming up MUMPS or something.
[13:19:25] <jottinger> Riiight. So: .Net has one choice to work with at a time. It's waiting for you.
[13:19:34] <wans> ~hi
[13:19:34] <javabot> http://i38.tinypic.com/25aopzn.jpg
[13:19:39] <lyy> this is extreme, but how do you know what's right for you when you're just starting out?
[13:19:45] <jottinger> When MS changes what that choice is from under you, well, surely they know better; and you only have one choice!
[13:19:45] *** spiderbyte has quit IRC
[13:19:50] <lyy> say, there's like 20 frameworks out there
[13:19:52] <jottinger> lyy: you don't. You learn.
[13:19:54] <lyy> which one to use?
[13:20:02] <jottinger> Maybe you follow the crowd at first.
[13:20:14] <lyy> yeah, like i'm going to sit and learn all 20 frames works to figure out what's right for me
[13:20:15] <jottinger> Maybe you take a stab in the dark. Maybe - just maybe - you think a little.
[13:20:19] <jonaslund> hey
[13:20:34] <jottinger> jonaslund: it might. But what are you doing?
[13:20:40] <jonaslund> is it an error to call loadClass repeadetly with the same name ?
[13:20:52] <jottinger> no, but it's dumb. :)
[13:21:00] <jonaslund> what way should it be done? :P
[13:21:07] <jottinger> should WHAT be done?
[13:21:14] <jonaslund> getting a class by name
[13:21:19] *** spiderbyte has joined ##java
[13:21:28] <jottinger> use a factory. But what are you really trying to do?
[13:21:32] <lyy> damn, so many marketing key words for java
[13:21:32] *** spiderbyte has quit IRC
[13:21:40] <jottinger> lyy: where?
[13:21:42] <W_work> ~~jonaslund javadoc Class
[13:21:43] <javabot> jonaslund: http://is.gd/ilcl [java.lang.Class]
[13:22:01] <jonaslund> jottinger: it's a small mvc framework that looks up classes to initiate by name
[13:22:02] <jottinger> lyy: at this point you're sounding like mapreduce and ilyak
[13:22:05] * W_work cheers in awe at javabot's new format
[13:22:20] <jottinger> jonaslund: which small mvc framework? And why not cache the references as you get them?
[13:22:34] <jonaslund> hmh i could i guess
[13:22:39] <jonaslund> jottinger: one i wrote
[13:22:49] <jonaslund> seems silly that i'd have to do it tho
[13:23:06] *** Hail_Spacecake has quit IRC
[13:23:07] *** spiderbyte has joined ##java
[13:23:19] *** spiderbyte has quit IRC
[13:23:22] <jottinger> ilyak spends all his time on ##java whining about how tool X doesn't do what he needs it to do, how he needs it done, and in the brevity he wants.... which means you'd be PERFECTLY matched. He CHOSE one and only one framework, only to discover it wasn't what he wanted, but he won't choose another; you WANT only one framework.
[13:23:22] <jonaslund> W_work: you're thinking about forName ?
[13:23:33] *** kapipi has quit IRC
[13:23:44] <jottinger> jonaslund: why walk the classloader hierarchy if you don't need to?
[13:23:55] <jonaslund> true
[13:24:13] <jonaslund> still i kinda expected the system to actually have it stored somewhat efficiently
[13:24:32] <jottinger> It does.
[13:24:50] <jonaslund> no it doesn't apperantly
[13:24:54] *** spiderbyte has joined ##java
[13:24:54] <jottinger> But you probably shouldn't walk up the tree yourself just because you can. But what's the error?
[13:24:57] <jottinger> heh
[13:24:58] <jonaslund> my crash was due to repeated calls to "defineClass"
[13:25:06] *** spiderbyte has quit IRC
[13:25:08] <jottinger> what's the error in defineClass?
[13:25:36] <jonaslund> ALLVARLIG: Servlet.service() for servlet se.jlim.webtemplate.Connector threw exception
[13:25:36] <jonaslund> java.lang.LinkageError: loader (instance of org/apache/catalina/loader/WebappClassLoader): attempted duplicate class definition for name: "my/pages/game/Index"
[13:25:36] <jonaslund> at java.lang.ClassLoader.defineClass1(Native Method)
[13:25:52] <lyy> jottinger: i'm not whining about x not doing what i want it to do
[13:26:05] <lyy> but you're right, i'm whining still nonetheless
[13:26:17] <jottinger> lyy: oh, but you see, your solution and ilyak's problem are almost perfectly matched. You're like mirrored images of stupidity.
[13:26:28] <lyy> hold up here..
[13:26:33] <lyy> don't call peopel stupid out of the blue
[13:26:39] <jottinger> jonaslund: Incidentally, Class.forName() is probably better for you, unless you're using OSGi.
[13:26:41] <jottinger> ~be jottinger
[13:26:42] <javabot> There are no stupid questions, only stupid people.
[13:26:45] <jottinger> ~be jottinger
[13:26:45] <javabot> All humans suck.
[13:26:47] <lyy> i'll tell you what i'm whining about
[13:26:47] <jottinger> ~be jottinger
[13:26:47] <javabot> Kindness is a lie.
[13:26:49] <jottinger> ~be jottinger
[13:26:49] <javabot> Darn you to the potholes of heck!
[13:26:51] <jottinger> ~be jottinger
[13:26:51] <javabot> I hate you.
[13:26:51] *** spiderbyte has joined ##java
[13:26:54] <jottinger> ~be jottinger
[13:26:54] <javabot> Damn you to hell.
[13:26:59] <jottinger> ~be jottinger
[13:26:59] <javabot> There are no stupid questions, only stupid people.
[13:27:03] <jottinger> out of the blue, huh?
[13:27:04] *** spiderbyte has quit IRC
[13:27:17] <lyy> I'm whining about why there's a,b,c,d,e,f...,x,y,z to do 1 thing
[13:27:30] <jottinger> When you can prove to me you're not stupid, I'll be careful not to call you stupid. In the meantime, I'll try being nicer if you'll try being smarter.
[13:27:43] <jottinger> lyy: Right. But "one thing" there is actually quite broad.
[13:28:00] <W_work> good money on you both failing that
[13:28:07] <jottinger> "Why is there more than one way to store daaaaaaaata?" "Because data takes many forms, and needs many access mechanisms depending on WHAT YOU ARE DOING."
[13:28:15] <jottinger> W_work: :)
[13:28:19] <lyy> i couldn't give a shit if you think i'm stupid or not and I would rather to take a crap before I bother trying to prove shit to someone in a chat room
[13:28:19] <habbekratz> lyy you generated them how did you do that?
[13:28:24] <jottinger> If only I cared what people think...
[13:28:25] <jonaslund> jottinger: forName should hopefully be ok
[13:28:51] *** spiderbyte has joined ##java
[13:29:04] *** spiderbyte has quit IRC
[13:29:05] *** keks_ has quit IRC
[13:29:06] * W_work peers at spiderbyte
[13:29:08] <lyy> jottinger: we know you care
[13:29:12] <jottinger> lyy: it's not that I think you, yourself, specifically, are stupid. It's that I think everyone is stupid. You, as a person, simply fall into the standard definition. And I've seen nothing that says anything else about you.
[13:29:16] <lyy> because you talk alot of shit
[13:29:20] <jonaslund> hahahaha
[13:29:25] <jonaslund> it's still fuckin crashing
[13:29:51] <jonaslund> altho this time it didn't leave any stack traces
[13:29:57] <jonaslund> this is SAD
[13:30:03] <jottinger> jonaslund: then there's something else going on. I've used Java for a decade or so; I've *never* seen it be unstable out of the blue, stress-testing or not.
[13:30:06] <lyy> java is sad
[13:30:16] <lyy> but i'm here and trying to elarn so i'm sad
[13:30:19] <lyy> we are all sad
[13:30:43] *** armyriad has quit IRC
[13:30:47] <jonaslund> jottinger: tomcat's webappclassloader is involved in this mess but the only thing it does is "load/findClass" that calls the java.net.urlclassloader
[13:30:54] <jonaslund> i'm gonna pastebin it
[13:30:55] *** spiderbyte has joined ##java
[13:30:59] <lyy> jottinger: you never seen it unstable? you living in a cave?
[13:31:07] *** spiderbyte has quit IRC
[13:31:40] <jottinger> lyy: the VM is quite stable overall.
[13:31:52] <jottinger> When I've seen instability, it's been identifiable causes, not "the classloader"
[13:32:12] <reverend> everytime i write code in java it comes out unstable! java sucks
[13:32:20] <lyy> lol
[13:32:20] <neshaug> LOL reverend
[13:32:23] <lyy> hahaha
[13:32:26] *** dnmo has joined ##java
[13:32:35] <lyy> java is only good for slow apps
[13:32:53] *** ChanServ sets mode: +o jottinger
[13:32:59] <neshaug> good that we have fast computers then
[13:33:01] <lyy> not sure why it's unstable
[13:33:10] <reverend> java is certainly not slow
[13:33:12] <lyy> because it 's slow as hell
[13:33:17] *** squi has quit IRC
[13:33:18] *** jottinger sets mode: +b *!*n=Yang@*.hsd1.wa.comcast.net
[13:33:22] <jonaslund> http://pastebin.com/m75b378b7
[13:33:23] <reverend> at least not for the last 10 odd years or so
[13:33:24] *** squi has joined ##java
[13:33:33] <jonaslund> NOTE: the code works for a few hundred times then this happens
[13:33:39] <neshaug> lol, he just wants a kick ban, he knows calling java slow is the dumbest shit ever
[13:33:49] <jottinger> reverend: BTW, yesterday I was running tests where i was getting full GCs to run in 1.6ms
[13:33:54] <jonaslund> the first exception is repeated so the start-and end of that pastebin is interesting
[13:34:09] <jottinger> on another JVM, I got partial GCs in 0.04ms :)
[13:34:49] <jottinger> neshaug: I'm happy to oblige. Didn't kick him, because if he wanted to leave the channel, he could do it.
[13:34:49] <jonaslund> ~javadoc ClassLoader
[13:34:50] <javabot> jonaslund: http://is.gd/ilgK [java.lang.ClassLoader]
[13:34:50] <reverend> impossible, gc is slow
[13:34:59] <jottinger> Bu this way he doesn't have to SAY stupid things.
[13:35:24] <jottinger> reverend: the cool thing is, on the long GC, i could *guarantee* the pause time... but that's *expensive* (jrockit)
[13:35:33] <jottinger> the other one was the bog-standard Sun VM :)
[13:36:03] *** lyy has left ##java
[13:36:09] <jottinger> oracle's terms for jrockit seem destined to kill the VM as a viable offering :(
[13:36:26] *** rdancer has joined ##java
[13:36:46] *** Gracenotes has quit IRC
[13:37:02] * jonaslund talked to a guy who was working on the JIT for jrockit
[13:37:10] <jottinger> jonaslund: which one?
[13:37:24] <reverend> oracle will likely destroy whatever bea IP they got eventually
[13:37:40] <neshaug> jottinger: well, hopefully there is someone to pat him on the back and tell him wich framework to use ;)
[13:37:41] *** SinisterBen has joined ##java
[13:37:42] <jottinger> reverend: :(
[13:37:53] <jottinger> neshaug: as soon as they do that, they'll be wrong :)
[13:38:03] <jonaslund> jottinger: no idea, we were drunk :(
[13:38:04] <jonaslund> :)
[13:38:18] <neshaug> true enough
[13:38:26] <reverend> as soon as you pick a framework, you're wrong
[13:40:26] *** eidolon has quit IRC
[13:41:11] *** kapipi has joined ##java
[13:49:00] *** TheCastor has quit IRC
[13:51:12] * jonaslund murrs
[13:51:40] <jonaslund> it could possibly be a synchronization error within tomcats classloader :P
[13:52:05] <jonaslund> still that error shouldn't bring everything down
[13:53:32] *** jottinger has quit IRC
[13:54:09] *** amitev has quit IRC
[13:56:45] *** amitev has joined ##java
[13:57:50] *** buntfalke has joined ##java
[14:00:05] <jonaslund> oh i hate shit like this
[14:01:19] <jonaslund> does the java debugger alter the way code executes ?
[14:01:34] <jonaslund> as soon as i enabled a breakpoint in one location that should be hit by this error the error disappeared
[14:01:41] <jonaslund> removing it and i get a crash again!!!
[14:01:41] <jonaslund> :P
[14:01:43] *** deSilva has joined ##java
[14:04:24] *** ridoo has quit IRC
[14:06:26] *** MacGyverNL has quit IRC
[14:06:51] *** MacGyverNL has joined ##Java
[14:07:27] *** mr_daniel has joined ##java
[14:10:07] <ScottG489> weird
[14:10:43] <mr_daniel> I want to import an existing project into eclipse 3.4.1 but I have problems with the build path options
[14:11:07] <mr_daniel> the project which I want to import has a class which import the following classes:
[14:11:08] <mr_daniel> http://rafb.net/p/binSqv97.html
[14:11:21] <mr_daniel> but eclipse is not able to resolve them
[14:11:38] <mr_daniel> what can I do to make eclipse is able to resolve the imports?
[14:12:05] <mr_daniel> I am working on a ubuntu/linux machine and use the java-6-openjdk JDK
[14:13:16] *** EspenG has joined ##java
[14:14:30] * jonaslund is at a loss at what he's witnessing tomcat doing
[14:14:41] <rgravener> tomcat sucks, use jetty
[14:15:08] *** frego has joined ##java
[14:15:11] <lami1984> mr_daniel: go to project properties ->> build path -> libraries -> add external jar
[14:16:02] <frego> Hello, I have a BufferedReader object. I perform many read() on it. Sometimes it's reading a byte and sometimes two bytes. How is that possible?
[14:16:18] <lami1984> mr_daniel: I assume you are using java media framework, you need to add this external lib if you want to use it
[14:16:55] <mr_daniel> you mean JMF? yes, I guess the project I want to import uses JMF
[14:17:16] <W_work> frego, would you like to rephrase that question so it isn't a tautology? (It's possible because reality is possible)
[14:17:19] <lami1984> mr_daniel: do as I said
[14:17:46] <W_work> ~~frego javadoc BufferedReader.read(*)
[14:17:47] <javabot> frego: http://is.gd/iltB [java.io.BufferedReader.read(char[],int,int)], http://is.gd/iltC [java.io.BufferedReader.read()]
[14:17:53] *** Deiselton has joined ##java
[14:18:31] <mr_daniel> is the JMF packed into one or more JAR files?
[14:18:47] <mr_daniel> if yes, where can I find these JAR files?
[14:18:56] <mr_daniel> does they have a specific name?
[14:18:58] <Deiselton> im having some trouble with an executable .jar file.... i can run it fine... but i put it on my server and let a couple people test it and both cant run it... when they try to run it from the cmd line with java -jar bleep.jar it says it cant find the main class....
[14:19:00] <W_work> frego, you might want to learn a little about character sets as well, especially so-called multi-byte character sets (that term is a huge hint for you)
[14:19:05] <Deiselton> anyone experiance this?
[14:19:18] <lami1984> mr_daniel: no idea, jmf is not a default java package, didn't you download it?
[14:19:37] <mr_daniel> well, no
[14:19:45] <frego> W_work: http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedReader.html#read() says it is reading a character as in integer in the range (0, 0xffff)
[14:19:46] <lami1984> mr_daniel: if you are importing someone''s else project you need to download jmf from the net
[14:19:54] <W_work> frego, indeed it does
[14:20:24] <W_work> how many bytes a character takes up is determined by the character, and the character set. There, that's enough spoonfeeding, now go do some research.
[14:20:51] <frego> W_work: when I am reading 0x0a, I have 0x0a, but when I am reading 0xca, I am having 0xdeab
[14:20:57] <lami1984> mr_daniel: write my nick in the begining of the line next time because other people are speaking too
[14:21:08] <mr_daniel> lami1984: ok
[14:21:23] <W_work> frego, could you read what I write?
[14:21:54] <W_work> I mean, asking questions here is rather pointless if you're not willing to listen to the advice you're given
[14:22:56] *** rurouni has joined ##java
[14:23:32] <frego> well if it was reading 2 bytes to get the char, then I should have 0xcafe and not 0xdeab as I am sending
[14:23:52] <frego> W_work: I am reading your answer, but maybe I don't understand it
[14:23:54] <Deiselton> ok the only thing i can find is someone said i might need to use a compiler to make an .exe file... but that doesnt sound right... thre has to be a way to debug it to were it can be run without problems
[14:24:09] *** durka42 has quit IRC
[14:24:17] *** r0bby has joined ##java
[14:24:21] <rurouni> anyone know what the best approach is to get the filename of a file and append it to the header and footer of the file using ant?
[14:24:28] <W_work> frego, which is why I have told you to do some research. If you don't understand the answer, there's nothing else to do but learn and come back and ask again when you understand more
[14:25:14] <frego> W_work: sure, when I understand, I will come back and ask question about what I am now understanding
[14:25:37] <frego> ...
[14:26:43] *** nixblicker has joined ##java
[14:26:51] <Deiselton> lol Frego: he is saying u dont understand the basic concept so u cant grasp the full concept.. learn the basic concept and the explanation of the full concept will aid u on the path to discovery :) just call me yoda
[14:27:03] *** mazzachre has quit IRC
[14:27:37] <r0bby> ~~ Deiselton u
[14:27:48] <Deiselton> lol
[14:27:56] <Deiselton> srry just had to be all mystical
[14:28:00] <r0bby> javabot: wake up
[14:28:00] <javabot> yawns, glares at r0bby, rolls over, and proceeds back to sleep.
[14:28:13] *** ridoo has joined ##java
[14:28:25] <Deiselton> ~~ Deiselton u
[14:28:28] <W_work> javabot: tell Deiselton about aolbonics
[14:28:28] <javabot> Deiselton, 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!
[14:28:35] <r0bby> cheeser: bug
[14:28:45] <r0bby> ~~ r0bby foo
[14:28:45] <javabot> r0bby, I have no idea what foo is.
[14:28:50] <r0bby> ...
[14:28:55] <r0bby> okay it works
[14:28:59] <W_work> ~info u
[14:28:59] <javabot> u was added by: ricky_clarkson on 11-27-2005 at 6:48 AM, EST and has a literal value of: <reply>U is Dutch for "you" or an aolbonic meaning "I am stupid".
[14:29:12] <W_work> strange
[14:29:19] <Deiselton> interesting
[14:29:25] <r0bby> ~u
[14:29:35] <r0bby> interesting bugs...
[14:29:54] <Deiselton> now back to my question... should i need to compile my .jar as an exe to get it to run correctly without the main class not found error on others machiones?
[14:29:56] *** soa2ii has joined ##java
[14:30:47] <r0bby> Deiselton: no.
[14:30:55] <r0bby> specify the main class in your manifest
[14:31:28] <r0bby> or you can use fatjar or jarjar if you want to make a large jar containing all your deps
[14:32:03] <soa2ii> Hi there. What do you have to do with files if you want to run them in an exec command? http://rafb.net/p/GEBWpm34.html This program does not call the command somehow... I'm not sure if there are some issues with special characters in the filenames or what?
[14:32:06] <Deiselton> R0bby: im using netbeans which automatically makes one.... so that means i didnt learn to do it myself... how do i specify the mainclass in my manifesT?
[14:32:11] <r0bby> Deiselton: you don't 'compile' jars. Jars are justy zip files.
[14:32:12] * jonaslund cringes at the name.. jarjar
[14:32:36] <r0bby> Deiselton: well start learning
[14:32:56] <r0bby> Deiselton: other option is to put your jar on the classpath and specify the main class.
[14:33:06] <r0bby> jonaslund: groovy uses it
[14:33:12] <Deiselton> Robby: http://pastebin.com/m47e540dd this is my manifest and its correct
[14:33:44] <r0bby> Deiselton: open your jar up
[14:33:59] <Deiselton> i did
[14:34:09] <r0bby> is that class file there?\
[14:34:09] *** mengu has joined ##java
[14:34:19] <r0bby> (note you have to have .class files not .java files)
[14:34:26] <Deiselton> yes Robby
[14:34:29] *** EspenG has quit IRC
[14:34:40] *** jabalsad has joined ##java
[14:35:00] <Deiselton> all classes are there and the name in the manifest file is spelled correctly
[14:35:11] *** J0bk has quit IRC
[14:35:24] <Deiselton> the manafest sile is in the META-INF folder
[14:35:41] <Deiselton> which is were it is automatically put
[14:35:43] *** Frostix has joined ##java
[14:35:49] *** rurouni has quit IRC
[14:35:54] <r0bby> it should work
[14:36:23] *** keks_ has joined ##java
[14:36:24] <r0bby> but what class is it erroring out on
[14:36:29] <r0bby> are you sure it's yours?
[14:36:36] <Deiselton> hmm could it be that i didnt read directions and im supose to include the lib folder with it?
[14:37:07] <r0bby> no, you included the jars
[14:37:25] *** bindaas has joined ##java
[14:37:36] <Deiselton> but i didnt include the framework and swing .jars
[14:37:50] <r0bby> http://ant.apache.org/manual/CoreTasks/jar.html
[14:37:54] <r0bby> Deiselton: yes you did.
[14:37:57] <mr_daniel> lami1984: I have solved my problem with the JMF, but have now another problem
[14:38:10] <r0bby> Deiselton: they're not in your jar?
[14:38:19] <lami1984> mr_daniel: which is?
[14:38:22] <r0bby> Put them there.
[14:38:23] <mr_daniel> I want to import a project which includes a java class which includes the following classes:
[14:38:23] <mr_daniel> http://rafb.net/p/DhZZx644.html
[14:38:26] *** EnderMB has joined ##java
[14:38:47] <r0bby> ~~ mr_daniel classpath
[14:38:47] <javabot> 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
[14:38:50] <Deiselton> ok i added them... any chance u could test it to see if it works?
[14:39:07] <jonaslund> hmm
[14:39:09] <r0bby> that should work.
[14:39:17] <jonaslund> r0bby: i can see someone naming their project groovy using something like jarjar
[14:39:21] <r0bby> Deiselton: not a chance in hell :)
[14:39:29] <r0bby> jonaslund: it's quite popular.
[14:39:29] <mr_daniel> I dont think that is a classpath issue, this is the error message:
[14:39:36] <lami1984> mr_daniel: these are java default libs there shouldn't be a problem importing the
[14:39:36] <lami1984> m
[14:39:39] *** jabalsad has quit IRC
[14:39:52] <r0bby> mr_daniel: you;'re doing something else
[14:39:52] <jonaslund> r0bby: i'm looking at it from a standpoint only considering the names :)
[14:39:56] <Deiselton> R0bby: thought so... ill find someone else
[14:39:57] *** jabalsad has joined ##java
[14:40:04] <r0bby> Deiselton: just run it yourself
[14:40:09] <r0bby> outside of netbeans
[14:40:14] <lami1984> mr_danie: source -> organize import should fix the problem
[14:40:14] <r0bby> java -jar foo.jar
[14:40:19] <r0bby> or click it
[14:40:48] <jonaslund> jarjar likeamole groovy, *bzzt*
[14:40:57] <jonaslund> i need food
[14:41:05] *** DjZemich has quit IRC
[14:41:28] <mr_daniel> Access Restriction: the type XMLInputFactory is not accesible due to restriction on required library /usr/lib/jmv/java-6-openjdk/jre/lib/rt.jar
[14:41:40] <mr_daniel> this is the errormessage ^^^
[14:41:48] <r0bby> oh lord.
[14:41:50] <mr_daniel> the error is the same for all imported classes
[14:41:52] <r0bby> is this an applet?
[14:42:13] <mr_daniel> not sure, but I think no
[14:42:19] *** pirho has quit IRC
[14:42:27] <r0bby> how the hell are you not sure?
[14:42:33] <Deiselton> R0bby the other worked for me outside of netbeans to
[14:42:47] <mr_daniel> it is actually a huge projeft which consist of lot small modules or plugins
[14:42:48] <r0bby> okay, then that's good
[14:42:56] *** RLa has joined ##java
[14:42:56] <r0bby> Deiselton: if it works outside, it's fine
[14:43:02] <mr_daniel> maybe a plugin is using applet-technology, but I am not 100% sure
[14:43:09] <r0bby> mr_daniel: is it running in a browser?
[14:43:13] <mr_daniel> no
[14:43:19] <mr_daniel> it is a standalone application
[14:43:23] <lami1984> applet viewer?
[14:43:34] <mr_daniel> lami1984: maybe, not usre
[14:43:39] <r0bby> jesus christ
[14:43:45] <reverend> mr_daniel: ask the people that wrote it.
[14:43:51] *** che has joined ##java
[14:43:55] <r0bby> ~~ mr_daniel tech support
[14:43:55] <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.
[14:43:57] *** Kingsy101 has joined ##java
[14:44:09] <r0bby> every answer shows me this isn't even your app. If it was, you'd know these answers...
[14:45:34] <mr_daniel> r0bby: ok
[14:45:52] *** che has left ##java
[14:45:55] <mr_daniel> I even found a quick-n-dirty solution to solve my problem http://lkamal.blogspot.com/2008/09/eclipse-access-restriction-on-library.html
[14:46:09] <mr_daniel> but I will ask the original developers, ok
[14:46:21] <mr_daniel> thx@all for your help on my JMF problem
[14:46:35] <mr_daniel> espacially lami1984
[14:46:47] <lami1984> np
[14:46:51] <r0bby> mr_daniel: good luck
[14:47:03] <mr_daniel> r0bby: thx :)
[14:51:08] *** alek_b has joined ##java
[14:51:21] *** Junior has quit IRC
[14:52:34] *** alek_b has quit IRC
[14:52:47] *** Rounin has left ##java
[14:53:06] *** waz has joined ##java
[14:53:12] *** jchauncey has joined ##java
[14:57:32] *** jdolan_ has joined ##java
[14:59:03] *** eidolon has joined ##java
[14:59:10] *** ScottG489 has quit IRC
[15:00:59] *** KikiJiki has joined ##java
[15:01:04] *** EspenG has joined ##java
[15:01:45] *** bas-i has quit IRC
[15:03:21] *** waz has quit IRC
[15:03:47] *** waz has joined ##java
[15:03:54] *** tissue has quit IRC
[15:06:08] <cheeser> r0bby: what?
[15:10:20] <W_work> ~~cheeser u
[15:10:36] <r0bby> ~comfort cheeser
[15:10:36] <javabot> gives cheeser a hug and ruffles their hair
[15:10:44] <r0bby> ^^ that should be an action, it is not
[15:11:16] *** M[]ssad has joined ##java
[15:11:42] *** rollins has joined ##java
[15:12:10] *** goki-_- has joined ##java
[15:12:29] *** dnmo has quit IRC
[15:12:32] *** bas-i has joined ##java
[15:13:56] <goki-_-> Ok... first class properties, you call "get()" and "set()" on them to access values. So instead of person.getName() you call person.name().get() or person.name.get(). If we assume that - should the properties (as returned by "name()" in the example above) come in two interfaces, one with get()/set() and the other with only get(), or should they always have a set(), which throws an UnsupportedOperationException for read-only values?
[15:14:44] *** waz is now known as Guest65354
[15:14:46] <W_work> goki-_-, why would you do such a thing?
[15:14:49] *** pandora-- has joined ##java
[15:14:54] *** bas-i has quit IRC
[15:15:03] *** waz has joined ##java
[15:15:22] *** nater has left ##java
[15:15:23] *** shadewind has quit IRC
[15:15:52] *** EspenG has quit IRC
[15:16:28] *** bas-i has joined ##java
[15:18:47] <reisi> does anyone know a good howto on adding non-maven2 packaged jar's as dependecy to be supplied with my maven2-project?
[15:18:54] <reisi> or does anyone know if it's even possible
[15:19:22] <r0bby> goki-_-: properties WERE proposed for java 7 -- http://robbyoconnor.blogspot.com/2008/03/java-gets-some-properties.html
[15:20:52] <cheeser> r0bby: so file an issue. telling me in irc is a good way to lose things.
[15:21:04] <reisi> r0bby: hopefully they aren't getting included?
[15:21:10] <cheeser> reisi: i just put up my own repo for that.
[15:21:13] <lami1984> please reming me what is a signature and name for a constructor in bytecode
[15:21:33] <reisi> cheeser: you mvn:install those locally, and reference as normal dependencies?
[15:21:34] <r0bby> reisi: no, the prototype and the spec were out of sync has i learned when i ran my example
[15:21:52] <r0bby> s/has/as/
[15:21:52] <cheeser> reisi: well, if you put them locally no one else can grab them.
[15:22:05] <reisi> cheeser: yes, the obvious downside
[15:22:23] *** arpu has joined ##java
[15:22:46] <reisi> cheeser: we currently do not have any local maven repo.. hmm though i guess it could be set up in a few minutes
[15:22:56] <reisi> s/local/shared
[15:22:59] <goki-_-> W_work: Why would I do which bit?
[15:23:04] <cheeser> yeah. it's just a set of directories at the other end of a url
[15:23:25] <goki-_-> r0bby: Yup but those properties were just nasty syntactic sugar. Syntactic Nutrasweet if you want ;)
[15:23:31] <cheeser> reisi: if this is an internal project, consider using something like nexus or artifactory to publish those artifacts
[15:24:01] *** luiX_ has joined ##java
[15:24:16] <luiX_> hi, i'm having some problems consulting a database using jpa
[15:24:24] <reisi> cheeser: sounds like something i need to delegate over to my coworkers.. thanks for the tip :)
[15:25:00] <cheeser> reisi: both of those serve as proxies, too, so they cache external deps meaning fewer trips out on to the intarweb which means faster builds.
[15:25:08] <cheeser> it's really worth looking into
[15:25:10] *** skoskav has joined ##java
[15:25:23]
[15:25:30] <goki-_-> The situation is analogous to Lists, basically - there is only one List interface, that includes setters. Unmodifiable lists just throw runtime exceptions on an attempt to modify. So the question is about the same as "Do you think there should be a read-only List interface"
[15:25:37] <luiX_> i've changed the codification to utf-8 but it stills doesn't work, any idea?
[15:25:46] <reisi> cheeser: ok, really makes sense as the central repo seems rather slow on time to time..
[15:27:04] <cheeser> right.
[15:27:23] <cheeser> and you can also add more external repos (like jboss's) without having to touch your poms
[15:29:41] <W_work> goki-_-, the collections framework did it that way to avoid an explosion of interfaces
[15:29:56] <W_work> would that be a problem for you_
[15:33:17] <rgravener> what the hell is an era in date?
[15:34:17] <cheeser> rgravener: like when you accidentally fart in front of her or make fun of a group of people that happens to include her dead mother.
[15:34:43] <rgravener> or ad bc
[15:35:02] <cheeser> oh. not "error"
[15:35:03] <cheeser> 8^)=
[15:35:52] <rgravener> oh then in that case, not pulling out in time too.
[15:36:14] <rgravener> some may score that as an rbi tho
[15:36:24] <cheeser> that's the culmination of an error and not the most significant one at that.
[15:36:24] <cheeser> 8^)=
[15:36:56] <ldam> hm if W was upside down, then setWidget() would be setMidget()
[15:37:47] *** DjZemich has joined ##java
[15:39:37] *** durka42 has joined ##java
[15:40:37] * rgravener needs to convert utc to j2me local time
[15:40:45] * rgravener wishes he had joda time
[15:41:11] *** segun has joined ##java
[15:41:23] *** skypce has joined ##java
[15:42:01] *** vesz has quit IRC
[15:42:15] <segun> please I want to ask a question concerning hibernate, I have been in #hibernate and nobody seems to be replying. I have this error and I dont know what to do
[15:42:18] <skypce> i need insert data rows from jtable to my bd , ? how do it please?
[15:42:20] <segun> java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory
[15:43:13] <segun> what is bd? u mean db right?
[15:43:18] *** shadewind has joined ##java
[15:43:28] <skypce> bd= base de datos , o db
[15:43:30] <skypce> ups
[15:44:51] <skypce> i dont found examples for this in google, only have of database to jtable. i dont need this.
[15:45:16] *** hrehf has joined ##java
[15:45:47] <jchauncey> ...
[15:46:15] <segun> skypce: i would read the data from the jtable and call insert statements
[15:46:40] <skypce> yes
[15:48:03] *** convivial has joined ##java
[15:48:49] <lami1984> is it possible to map java array to native array? (changing java array would affect native array)
[15:49:05] *** antipivo has quit IRC
[15:49:45] *** whaley has joined ##java
[15:51:02] *** RLa has quit IRC
[15:51:30] *** jabalsad has quit IRC
[15:51:48] *** jabalsad has joined ##java
[15:52:04] *** |sanchez| has joined ##java
[15:52:35] *** luiX_ has quit IRC
[15:54:10] *** teralaser_ has quit IRC
[15:54:35] *** buntfalke has quit IRC
[15:55:08] <segun> ~~ pastebin
[15:55:08] <javabot> The syntax is: tell nick about factoid - you missed out the 'about', segun
[15:56:06] <segun> javabot thanks but that was not suppose to get here in the first place. lol
[15:56:06] <javabot> No problem, segun.
[15:59:05] *** teralaser has joined ##java
[16:00:41] <segun> skypce: http://www.eugeneciurana.com/pastebin/pastebin.php?show=39822
[16:01:15] <skypce> thank you segun
[16:01:58] *** LordMetroid has joined ##Java
[16:02:04] *** frego has quit IRC
[16:02:13] *** mengu has quit IRC
[16:02:37] *** blahjake has joined ##java
[16:03:50] <segun> is it possible to restrict the use of reflection api??
[16:04:52] <cheeser> with a security manager, sure
[16:05:07] <cheeser> i should write one of those someday. i've never used one...
[16:05:13] *** sombriks has quit IRC
[16:07:04] <segun> cheeser: I have no idea how to do that. Now by default, is the reflection api enabled or restricted?
[16:08:29] *** buntfalke has joined ##java
[16:09:11] *** [TechGuy] has joined ##java
[16:09:49] *** Resistance has quit IRC
[16:11:28] <segun> I need help with this, this error wont go away and I have tried all the tricks on my fingertips
[16:12:14] <segun> java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory
[16:13:03] *** slonkko has joined ##java
[16:13:12] *** sircco has joined ##java
[16:13:15] *** sircco is now known as slonkko
[16:13:55] <cheeser> segun: by default you can do whatever you want
[16:14:28] <blahjake> segun: if you are going to use reflection to access something otherwise restricted you need to setAccessible(true) it first
[16:14:48] <blahjake> segun: security manager could potentially block the setAccessible however
[16:14:59] *** mitchnull has joined ##java
[16:15:04] <reisi> blahjake: the exception is thrown from slf4j-api, segun doesn't seem to be do anything but try get started with java development
[16:15:23] <blahjake> oh i see
[16:15:28] *** slushpuppeh has joined ##java
[16:15:59] <slushpuppeh> Hi, is it appropriate to do this: int i; if (i == null) {..}?
[16:16:35] <blahjake> ~tias
[16:16:36] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[16:17:59] <cheeser> <hint>only references can be null</hint>
[16:18:18] <slushpuppeh> Alright.
[16:19:19] <cheeser> that's a distinction you should probably learn soon
[16:20:26] <reisi> for beginners the part of java that "simple types" are not references cannot be easy to understand
[16:20:59] <segun> reisi: you are here too
[16:21:01] *** dnmo has joined ##java
[16:21:09] *** keks_ has quit IRC
[16:21:10] <slushpuppeh> And one more question, I tried compiling a package CLI. So I cd'd one level aboved the parent folder(payroll) and typed: javac .\payroll\PayRoll.java. When I tried to excute it using "java .\payroll\PayRoll.class", I get http://pastebin.com/m505c9170
[16:21:40] <slushpuppeh> Yes, the main class is there. I have compiled the same package using Jcreator and it runs
[16:21:41] <cheeser> ~ slushpuppeh class
[16:21:42] <javabot> cheeser, I have no idea what slushpuppeh class is.
[16:21:45] <cheeser> ~ slushpuppeh no class
[16:21:45] <javabot> cheeser, I have no idea what slushpuppeh no class is.
[16:21:53] * cheeser grumbles
[16:21:58] <slushpuppeh> Hm?
[16:22:00] <[TechGuy]> ~smack cheeser
[16:22:00] <javabot> smacks cheeser in the mouth
[16:22:17] <cheeser> ~class
[16:22:17] <javabot> To run a java class simply give the class name: java com.foo.bar.OmgPonies, not java com.foo.bar.OmgPonies.class
[16:22:17] <blahjake> slushpuppeh: refer to the class by its name (including package) not its file path
[16:22:19] <cheeser> there!
[16:22:27] <cheeser> missing the 2nd ~
[16:22:31] <slushpuppeh> Ah, thanks!
[16:22:43] <cheeser> sometimes my keyboard doesn't detect that first key press
[16:22:49] <[TechGuy]> ~~slushpuppeh packages
[16:22:49] <javabot> please see http://java.sun.com/tutorial/java/interpack/packages.html and some examples http://javafaq.mine.nu/lookup?254
[16:25:11] *** durka42 has quit IRC
[16:25:27] *** segun has left ##java
[16:28:57] <goki-_-> W_work: Yes the exact problem we have is an interface/class explosion
[16:29:11] <goki-_-> W_work: Sorry I went AFK there btw ;)
[16:29:45] <goki-_-> W_work: So in the List example, you would need to have a SynchronizedReadOnlyList and a SynchronizedList
[16:29:48] <zmyrgel> what would be a good way to do multiple views in java GUI app? I have MainWindow and I add multiple panels to it and I set their visibility according to view variable
[16:30:38] <goki-_-> everything that decorates or handles a List needs to come in two versions, one of which passes through the read-only interface, and one for the normal interface
[16:31:15] <goki-_-> W_work: The advantage of having the read-only version is that it catches people trying to illegally set at compile time, but I'm not convinced that is necessary
[16:32:06] *** Resistance has joined ##java
[16:32:07] <goki-_-> zmyrgel: Do you want to display one component out of a list of possible components? In that case, CardLayout in a JPanel
[16:33:23] <zmyrgel> goki-_-: I have 'add, settings, result ...' panels that I wish to show in main window
[16:34:58] *** pstickne has joined ##java
[16:36:04] *** DjZemich has quit IRC
[16:36:40] <goki-_-> zmyrgel: If the user is going to choose with tabs, then JTabbedPane, otherwise if the program itself will decide which component to show, use a JPanel with CardLayout
[16:36:56] <goki-_-> zmyrgel: If you're not sure, read the docs for those classes
[16:37:39] <zmyrgel> goki-_-: yeah, I'm doing that but I'm making my first GUI app so theres a lot of new stuff to take care. Mostly some basics and layout stuff
[16:38:38] *** Varox has joined ##java
[16:39:56] *** Gracenotes has joined ##java
[16:40:48] *** zupaxx has joined ##java
[16:40:58] <zupaxx> ref = (Properties)ctx.lookup("java:/Mail.properties");
[16:41:09] <zupaxx> hi is this a valid lookup?
[16:41:35] <cheeser> ~tias
[16:41:35] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[16:41:37] <goki-_-> zmyrgel: Yup no problem. I just meant that the docs are quite helpful.
[16:42:43] <zupaxx> i was looking at an old code
[16:42:54] <zupaxx> done by a developer before me ...that lookup is being used
[16:42:56] <zupaxx> and it works.
[16:47:28] *** pirho has joined ##java
[16:47:49] *** Blaay has joined ##java
[16:48:25] <cheeser> zupaxx: then there's your answer
[16:48:50] *** deepjoy has quit IRC
[16:50:29] <zupaxx> thanks.
[16:53:33] <goki-_-> Has anyone here used an alternative "bean" library, by the way? I think someone said they had used bean-properties but found it a bit odd.
[16:55:28] *** orgy` has joined ##java
[16:55:44] *** Deiselton has quit IRC
[16:57:43] *** jmpf has joined ##java
[16:58:14] *** zupaxx has quit IRC
[17:00:03] *** phyburn has joined ##java
[17:00:41] *** gdoko has quit IRC
[17:01:31] *** trancenrg has joined ##java
[17:02:41] *** Greeny_ has joined ##java
[17:03:28] *** ldam has quit IRC
[17:04:06] *** hrehf_ has joined ##java
[17:05:21] *** SwanR has joined ##java
[17:05:44] *** segun has joined ##java
[17:05:51] <SwanR> Hello, is it common practice to put java libraries in the jdk folder somewhere , or with my source code and change the CLASSPATH ?
[17:06:14] *** foo-nix has joined ##java
[17:06:27] <_W_> no SwanR
[17:06:38] *** bindaas has quit IRC
[17:06:38] <SwanR> where would they go then ?
[17:06:45] <_W_> or rather, the latter
[17:06:48] <SwanR> ah
[17:06:53] <SwanR> thanks
[17:07:02] *** foo-nix has quit IRC
[17:07:17] *** giupo has joined ##java
[17:07:27] *** foo-nix has joined ##java
[17:07:45] <segun> SwanR: put in you project folder and use ant/maven to specify classpaths
[17:08:21] <segun> skypce: did you get my message??
[17:09:09] *** euvitudo has joined ##java
[17:09:34] *** Inhuman has joined ##java
[17:10:18] *** cads has joined ##java
[17:10:56] *** dpy has quit IRC
[17:11:19] *** drichards has quit IRC
[17:12:05] <cads> my cousin in romania inquires, "What programming language is popular in the US?", to which I reply that java is the number one language. This makes him happy, because he's studying it. He asks then, "So that means If I come to the US with skill as a java programmer I will easily get a job?"
[17:12:19] <cads> What thoughts do you guys have?
[17:12:29] <_W_> I'd like a pizza
[17:12:37] <trancenrg> I would too actually
[17:12:37] <cads> I have this overriding economic pessimism right now
[17:12:40] <trancenrg> or mexican food
[17:12:50] <segun> I dont live in the US
[17:12:58] <cads> anything spicy, actually.. pizza with chille seeds..
[17:13:19] *** sombriks has joined ##java
[17:13:26] <trancenrg> *drools*.. lunch can't come fast enough
[17:13:27] <_W_> why would anyone want to move to the US? I get moving -out- of Romania, but still, there's lots of other perfectly nice countries
[17:13:31] <dmlloyd> programming language is not the #1 consideration when it comes to getting a job.
[17:13:33] *** mitchnull has left ##java
[17:13:33] *** bitshuffler has joined ##java
[17:14:11] <_W_> dmlloyd, it's probably the biggest factor in the number of jobs you can realistically apply to though (but I agree with you)
[17:14:16] <cads> _w_, in romania there is the dream of moving to america - in many post-soviet countries, I'm sure
[17:14:25] <cheeser> _W_: it's a date. pizza for lunch. 8^)=
[17:14:28] <jchauncey> experience > *
[17:14:33] <cads> I'd agree with you too, dmlloyd
[17:14:53] <trancenrg> I rather enjoy the US myself
[17:15:02] <cads> he's learning from a book, so experience is little, he's going to take some sisco java programmer's certification
[17:15:10] <cheeser> ugh.
[17:15:16] <dmlloyd> he'll never get a job here
[17:15:21] <cheeser> ~magic8 will cads's cousing get a job here?
[17:15:21] <javabot> If I tell you that I'll have to shoot you
[17:15:27] <jchauncey> haha
[17:15:28] <_W_> haha, I saw a job advert the other day that stated that java certification would be a big plus
[17:15:30] <trancenrg> LOL
[17:15:34] <cheeser> doesn't look promising.
[17:15:36] <cads> I will get him to do some open source projects with me
[17:15:44] <dmlloyd> _W_: it is. but it's not a substitute for experience
[17:15:51] <trancenrg> I've heard bad things about java certs like the SCJP on this very channel
[17:16:03] <cheeser> certs aren't bad if they're all you've got.
[17:16:08] <cads> but for that I need to learn java (anyangnyang (trying to bite own jugular vein))
[17:16:11] <_W_> dmlloyd, no, I mean, I saw one ad, out of like the thousand I've gone through in the last year
[17:16:12] <cheeser> but if they're all you've got, you have bigger problems.
[17:16:16] <dmlloyd> if someone told me they got a 100% on the SCJP, I'd know that it means that they know how to study, and that they know the language basics thoroughly
[17:16:31] <cads> dmlloyd: I see.
[17:16:46] <cads> I know that a big part of it is showing that you're capable of learning the toolsets that are used at the company
[17:16:47] <dmlloyd> but without experience, I'd still not hire them :)
[17:16:56] <jchauncey> dmlloyd: how would you compare that to say a CS degree
[17:17:10] <cads> CS degrees are jokes in a lot of places
[17:17:12] <cheeser> degree > certs > nothing
[17:17:20] <dmlloyd> I don't know that I've ever been involved in hiring *anyone* with a CS degree
[17:17:28] <trancenrg> how about a CS related degree with open source project experience
[17:17:32] <cads> experience is greater than all of those, as jchauncey says
[17:17:35] *** jottinger has joined ##java
[17:17:45] <waz> any degree is a good sign
[17:17:46] *** slonkko has quit IRC
[17:17:51] <dmlloyd> I have found some people with CS degrees to often have an unrealistic view of how to write software
[17:17:59] <jchauncey> well cads yes, eventually at 10-15 years experience most people arnt looking to see if you have a BS in CS
[17:18:02] <dmlloyd> I'd probably sooner hire someone with, say, a physics degree
[17:18:02] <whaley> I've got a Ph.D. in Pain and a Masters in Disaster
[17:18:09] <trancenrg> I agree.. most of the people I deal with at school can't program for shit
[17:18:10] <whaley> hire me please
[17:18:10] <dmlloyd> or mathematics
[17:18:11] *** Malformation has quit IRC
[17:18:14] <trancenrg> and don't really have a passion for it
[17:18:28] <cheeser> whaley: done. now go get me a latte.
[17:18:29] *** jschoolc has joined ##java
[17:18:35] <jchauncey> haha
[17:18:42] <trancenrg> They see it as something easy.. and certainly don't do it in their free time
[17:18:42] <waz> one of the best devs I've worked with has a degree in economics :)
[17:18:43] *** Malformation has joined ##java
[17:18:45] <dmlloyd> and I know more people with CS degrees who are working in retail than people without CS degrees working as software engineers :)
[17:18:53] <dmlloyd> well, maybe not more, but the proportion is alarming
[17:19:06] *** nihi|ist has joined ##java
[17:19:07] <jchauncey> well i have yet to use my degree in any meaningful way
[17:19:14] *** javver has joined ##java
[17:19:15] <jottinger> me too
[17:19:20] *** Goundy has joined ##java
[17:19:25] <jchauncey> then again i dont know many jobs that would require you to analyze the runtime of yoru algorithms
[17:19:36] <trancenrg> LOL I'm taking that class currently
[17:19:45] <jchauncey> ive done that once, only because they wanted to know why i didnt want to code a specific solution to the problem
[17:19:47] <trancenrg> "Design and Analysis of algorithms"
[17:20:09] <habbekratz> barf
[17:20:13] <cheeser> jchauncey: that's why you shouldn't have majored in Women's Studies.
[17:20:15] *** Malformation has quit IRC
[17:20:18] <jchauncey> they didnt understand the, it will take this solution about 2 months to complete and you need it done in 2 hours =)
[17:20:23] <jchauncey> cheeser: =(
[17:20:33] <jchauncey> i liked looking at all the purty gurls
[17:20:39] <trancenrg> heh
[17:20:43] <cads> I have a friend at an engineering company, (okay, a toy company - Estes/Cox, the rocket/model plane makers).. and he notes that over the past six months, they've laid off about 2/3rds of the employees
[17:20:45] <cheeser> that's awesome but hard to market
[17:20:46] <cheeser> 8^)=
[17:20:49] *** MoonWolf has joined ##java
[17:21:05] *** c369 has joined ##java
[17:21:15] <cads> I hear similar horror stories from all sorts of fields, and I was wondering if I could get a realistic picture about how the programming field is doing
[17:21:17] *** Malformation has joined ##java
[17:21:31] <jchauncey> pleanty of places are hiring if you have the skill sets they want
[17:21:38] <jchauncey> the government sector is hurting though
[17:21:59] <cheeser> clearly it's sucking wind right now since we all have time to debate it.
[17:22:00] <cheeser> 8^)=
[17:22:01] *** hrehf has quit IRC
[17:22:03] <AMcBain> I think (from my perspective) that most of my CS friends are more interested in gaming than much else, where as I spend that time doing side projects, programming etc. ... It's a wonder how they decided they even wanted to be CS people if they only do what they have to for class or a job (if they have one)
[17:22:05] <waz> cads: like most fields if you excel then you'll do fine
[17:22:06] <cads> that only experienced programmers are being hired seems to show that things are a bit dire.. in a boom everyone that knew anything was getting hired
[17:22:09] *** hrehf_ has quit IRC
[17:22:25] <dmlloyd> in a boom, people who didn't know jack shit were getting hired
[17:22:30] <cads> hehe
[17:22:31] *** Necker has joined ##java
[17:22:38] <whaley> and subsequently fired
[17:22:38] <dmlloyd> which set a false standard for what constitutes "knowing something"
[17:22:46] <dmlloyd> which we suffer from even today
[17:22:47] <trancenrg> AMcBain: that has been my experience as well
[17:22:50] <cads> true I suppose
[17:22:51] <jchauncey> dmlloyd: exactly
[17:23:14] <dmlloyd> the problem is that there are still tons of people who are horribly underqualified have really no idea that they are
[17:23:20] <dmlloyd> and have*
[17:23:25] * cheeser eyes ##java
[17:23:26] <cheeser> 8^)=
[17:23:29] <AMcBain> dmlloyd: I think someone showed me the other day an image of a resume (from some website) where they had listed CHMOD as things they knew how to use/do. :P
[17:23:30] <dmlloyd> :)
[17:23:42] <dmlloyd> stand back, I know chmod
[17:23:47] * dmlloyd karate pose
[17:23:52] <jottinger> I have you beat
[17:23:54] <jottinger> I know chown, too
[17:24:20] <giupo> I will list as a skill that on my resume I can turn on and off an electric device.
[17:24:22] <dmlloyd> fool! I have spent 4 years in the mountains of tibet studying with the gurus of chown!
[17:24:23] <cheeser> call you really need is echo and /proc
[17:24:38] <jottinger> okay - chgrp and chsh too!
[17:24:40] <jottinger> biatch!
[17:24:47] <dmlloyd> prepare to be chrooted!
[17:25:02] <jottinger> I know d, dir, ls too
[17:25:03] <jottinger> suckah
[17:25:04] <AMcBain> well, the funny thing was that this was listed *in addition to* Linux in that image.
[17:25:06] *** segun has left ##java
[17:25:07] <jchauncey> haha
[17:25:09] <waz> my favorite bozo programmer move, someone let him have root on a big hpux box used by a ton of us. sudo chown bozo -R * .*
[17:25:21] <MoonWolf> I was wondering if someone could help me with the following issue: I have a class implementing runnable, and i'd like to sleep, or wait timeout it from inside, is this doable or should I look for a different aproach ?
[17:25:28] <waz> .* matches .. which then changes a crap load of files :)
[17:25:36] <cheeser> ~~ MoonWolf tias
[17:25:36] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[17:25:53] <trancenrg> AmcBain: I saw that! he had mad chmod skillz
[17:26:10] *** latebind has joined ##java
[17:26:15] <jchauncey> next people will be putting php on their resume
[17:26:35] <AMcBain> jchauncey: some employers are interested in that, sadly.
[17:26:44] <cads> MoonWolf: you're not ever supposed to admit that kinda stuff :D
[17:26:50] *** Razec has quit IRC
[17:26:54] <cheeser> anyway
[17:26:55] <cheeser> ~interesting
[17:26:56] <javabot> this is all very interesting (not really) but please take it somewhere else.
[17:27:11] <AMcBain> To ##java-talk ! :P
[17:27:35] * cads once did a cp command onto his /usr folder which replaced his whole operating system, essentially, with a singular installation of nethack
[17:27:47] *** _acid__ has joined ##java
[17:27:48] <MoonWolf> let me rephrase, i know i can't call sleep and wait normally i can't cast it to a thread because its not and i'd prefer not to callback to a wrapper class and have that call sleep or wait on my thread, is there a possible solution or am i simply going to have to inherit from thread and not from my abstract class ?
[17:27:48] <cads> ... sorry AMcBain
[17:28:07] <jmpf> I'm trying to put all my grammars into their own package to clean up but they use classes from the parent pkg -- and am getting 'protected access' errors
[17:28:33] <dmlloyd> ~~ MoonWolf jcip
[17:28:34] <javabot> MoonWolf, jcip is Java Concurrency In Practice, a book focused on implementing threaded and concurrent applications in Java. http://jcip.net/
[17:29:36] <cheeser> MoonWolf: why can't you call sleep?
[17:30:13] *** Necker has quit IRC
[17:31:00] <latebind> MoonWolf : you can still extend the abstract class AND be a thread, just impl Runnable??
[17:31:20] <MoonWolf> because i'm only implementing the runnable interface, it doesn't supply me with anything , only requires me to include a public run.
[17:31:36] *** tyler_wylie has joined ##java
[17:31:52] <latebind> MoonWolf : so you can still call Thread.sleep
[17:32:02] <tyler_wylie> Hey there's supposed to be a 64 bit plugin in 6u12 correct? (For netscape based browsers)
[17:32:38] *** alek_b has joined ##java
[17:32:41] <cheeser> sleep() is static anyway
[17:32:43] <MoonWolf> latebind, ooh, now that helps me along wonderfully, I was not aware you could do that.
[17:32:53] *** cads has quit IRC
[17:32:57] *** jbwiv has joined ##java
[17:33:01] <MoonWolf> My thanks.
[17:33:02] *** osmosis has quit IRC
[17:33:04] <latebind> MoonWolf : if you call Thread.sleep from anywhere it will sleep the currently executing thread, in this case your runnable
[17:33:07] *** cads has joined ##java
[17:33:28] <latebind> (because you called it during run() method)
[17:34:26] <latebind> imo thread should be final
[17:34:41] <latebind> so you have to extend Runnable
[17:34:47] <latebind> impl
[17:34:57] <MoonWolf> I was not aware thread had yield , sleep, etc as statics, this is the first time i have ever not used a class extending from thread , well, for threads that is.
[17:35:01] <cheeser> too late for that.
[17:35:13] <cheeser> yeah. you should never extend Thread
[17:35:14] *** amitev has quit IRC
[17:35:41] *** bhz- has joined ##java
[17:35:55] *** MoonWolf has left ##java
[17:36:03] *** cyth has joined ##java
[17:36:13] *** rlubke has joined ##java
[17:36:14] *** Ivellina has joined ##java
[17:36:27] *** LostMonarch has joined ##java
[17:39:13] *** deSilva has quit IRC
[17:39:59] *** pstickne has quit IRC
[17:40:08] *** waz is now known as Guest11112
[17:40:15] *** waz has joined ##java
[17:40:34] *** pgib has joined ##java
[17:42:45] <cheeser> ~javadoc Cipher
[17:42:45] <javabot> cheeser: http://is.gd/g0iW [javax.crypto.Cipher]
[17:43:05] <dmlloyd> ~javadoc Cipher
[17:43:05] <javabot> dmlloyd: http://is.gd/g0iW [javax.crypto.Cipher]
[17:43:09] <dmlloyd> caches, nice
[17:43:12] <cheeser> yep
[17:43:20] <cheeser> lazy fetches then caches
[17:43:24] <dmlloyd> anyway I guess is.gd will cache too
[17:43:28] *** Guest11112 has quit IRC
[17:43:31] *** inv_arp has left ##java
[17:43:33] <rgravener> when does the cahce release?
[17:43:42] <cheeser> it does but this saves me a fetch each time.
[17:43:45] <dmlloyd> at the end of the internets
[17:43:46] <cheeser> rgravener: which cache?
[17:43:55] <rgravener> javabot cache
[17:43:55] <javabot> rgravener, I have no idea what cache is.
[17:43:57] *** Woot4Moo has joined ##java
[17:44:08] <dmlloyd> ~javadoc XATerminator
[17:44:09] <javabot> dmlloyd: http://is.gd/imTW [javax.resource.spi.XATerminator]
[17:44:12] <dmlloyd> nice
[17:44:13] <cheeser> rgravener: as long as that API is in the db.
[17:44:13] <dmlloyd> javaee
[17:44:19] <cheeser> ~javadoc -list
[17:44:19] <javabot> cheeser, I know of the following APIs: JDK ( http://java.sun.com/javase/6/docs/api/ ) , JEE ( http://java.sun.com/javaee/5/docs/api/ ) , Spring ( http://static.springframework.org/spring/docs/2.5.x/api/ ) , Wicket ( http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/ )
[17:44:38] <dmlloyd> can you limit it to one?
[17:44:41] <rgravener> are you using html api docs?
[17:44:46] <cheeser> dmlloyd: not yet
[17:44:55] <cheeser> rgravener: it parses the html to generate the db entries
[17:44:58] <dmlloyd> ~javadoc XAResource
[17:44:59] <javabot> dmlloyd: http://is.gd/imUD [javax.transaction.xa.XAResource], http://is.gd/imUE [javax.transaction.xa.XAResource]
[17:45:02] <rgravener> k
[17:45:03] <dmlloyd> nice
[17:45:05] *** Guest65354 has quit IRC
[17:45:08] <rgravener> i tried your bot one time, couldn't get it to work
[17:45:17] <dmlloyd> one is from javase, one is from javaee
[17:45:20] <cheeser> dmlloyd: why is that there twice?
[17:45:36] <dmlloyd> twice is expected - but no indication as to which is which is not expected :)
[17:45:36] <cheeser> dmlloyd: that's it
[17:45:37] <cheeser> sun--
[17:45:40] <cheeser> 8^)=
[17:45:41] *** ArcSighter has joined ##java
[17:46:00] *** nater has joined ##java
[17:46:02] *** SilentAssassin has joined ##java
[17:46:05] <dmlloyd> I guess if javaee6 will require se6, then they'd probably remove it from javaee?
[17:46:18] <cheeser> good question.
[17:46:25] * cheeser emails bill shannon
[17:46:26] <cheeser> 8^)=
[17:46:34] <userek> is it possible to upload file to form using URLConnection?
[17:46:41] <dmlloyd> yes
[17:46:45] <rgravener> yup
[17:46:52] <rgravener> set method to post
[17:46:55] <userek> any hints? :)
[17:46:55] <rgravener> i know that much :)
[17:46:57] <SilentAssassin> hi i just wanted to know cause i read about it but i'm not sure if i understand when i have servlets , a document that sends a form to that servlet , is that java application running on server or on my PC
[17:47:02] <dmlloyd> best http client api ever
[17:47:25] <dmlloyd> a servlet runs on the server... SERVlet, SERVer
[17:47:25] <rgravener> do you base64 encode the bytes to a string?
[17:47:27] <userek> dmlloyd: yes, but... i want to avoid dependencies if possible
[17:47:38] *** segun has joined ##java
[17:48:03] <SilentAssassin> so i need always to be connected to internet if the page is done using servlets
[17:48:07] <jottinger> ....
[17:48:10] <tyler_wylie> is libjavaplugin_ini.so the plugin to use for JDK?
[17:48:12] *** Necker has joined ##java
[17:48:13] <userek> httpclient is like 2-3 extra jars
[17:48:16] <jottinger> how do you get your pages, SilentAssassin?
[17:48:16] <nater> I'm trying to upload a file via a post to an html form. I *believe* my headers are correct, but my file doesn't appear to be uploading, and the php script errors out on move uploaded file
[17:48:16] <dmlloyd> only if your servlet is on the internet, SilentAssassin
[17:48:22] <jottinger> do you, like, use a browser?
[17:48:23] *** Odin79 has quit IRC
[17:48:24] *** ArcSighter has left ##java
[17:48:42] <jottinger> do the magic content fairies poop data on to your screen or something?
[17:48:49] <SilentAssassin> cause someone told me it is running in some java application running in background ,
[17:48:54] <dmlloyd> nater: I'd use something like wireshark to see what's going on
[17:49:11] <userek> nater: are you using URLConnection or HttpClient?
[17:49:23] <dmlloyd> someone told me they'd like me to help them secure $3 million from a nigerian bank account too
[17:49:32] <jottinger> dmlloyd: you too?
[17:49:40] <jottinger> Odd how we have the same sets of friends
[17:49:42] *** nixblicker has quit IRC
[17:49:44] <cheeser> dmlloyd: yeah, i need that soon so could you hop on that?
[17:49:45] <nater> userek: both
[17:49:45] <dmlloyd> yeah, who would've thought there were so many rich nigerians
[17:50:02] <jottinger> all who address me as their closest friend, but they never... use my name
[17:50:05] <userek> nater: do you have any example of how to upload file using URLConnection?
[17:50:06] <SilentAssassin> well he is doing a java programmer without university so i wanted to know if he at least knows what is talking about :)
[17:50:12] <userek> i can't find any
[17:50:27] <dmlloyd> complements of the season upon you good sirs
[17:51:02] *** ldam has joined ##java
[17:51:25] <nater> userek: no i don't
[17:51:47] <nater> userek: can i pm you and see if we can't compare notes?
[17:51:57] <userek> okay
[17:51:58] *** pschriner has left ##java
[17:53:23] *** Junior has joined ##java
[17:55:30] *** Goundy has quit IRC
[17:55:45] *** slushpuppeh has quit IRC
[17:57:02] *** LordMetroid has quit IRC
[17:57:27] *** Kingsy101 has left ##java
[17:58:08] *** CarstenP2 has left ##java
[17:58:58] *** xabbuh has quit IRC
[17:59:08] *** ldamwork has joined ##java
[18:01:46] <jmpf> I have a class Foo that has protected members and a class in another package that makes Foo objects; would it be wiser to change the protected members to public or put the classes that are used in the same package or??
[18:02:40] <waz> it'd be wisest to not have such a leaky abstraction, but barring that put them in the same package
[18:02:40] *** gverig has joined ##java
[18:02:43] <pgib> jmpf, depends on what field visibility you require
[18:02:43] <cheeser> if you find classes so tightly bound you might consider refactoring them a bit.
[18:02:54] <ldamwork> jmpf, yes. ;) It is impossible to answer your question. It all depends on what the purpose and and relations are between the classes
[18:03:08] *** shadewind has quit IRC
[18:03:28] <nater> dmlloyd: installing wireshark now
[18:03:50] *** drip has joined ##java
[18:04:18] <jmpf> well.. my classes in the other pkg are generated by antlr (grammars) but they make use of my Foo objects when the text is parsed out;
[18:06:49] <pgib> has anyone devised a good way to get the current SVN revision number into their builds?
[18:06:57] <pgib> I'm using ANT if that helps
[18:07:38] <dmlloyd> good? no.
[18:08:07] <dmlloyd> you could parse out "svn info" output
[18:08:28] <dmlloyd> but without doing an "svn update" before every build you might end up with an old rev #
[18:09:03] <dmlloyd> or a non-uniform rev number, especially if some parts of your tree are more up-to-date than others
[18:09:15] *** monk-san is now known as SpeedyGhost
[18:09:19] <dmlloyd> also it won't take into account branches...
[18:09:43] <pgib> that's fine
[18:09:58] <pgib> this will be used mostly for stamping the production builds
[18:10:14] <EnderMB> Is there any way to inherit a class if said class already has a main method? I have two classes that should be near identical apart from one step in one method and it'd be a lot easier if I could just inherit everything from that class
[18:10:18] *** ridoo has quit IRC
[18:10:37] <dmlloyd> EnderMB: static methods (like main) aren't inherited
[18:11:06] <pgib> which are always update'd and clean-built. So I guess I can just generate a .java file that has an accessor for the version-string.
[18:11:16] <dmlloyd> EnderMB: if you want to use inheritance you should have split up the functions of your main method in to logical groups, made them into instance methods, and had a main which simply constructs the main class and calls a method on it
[18:11:47] <dmlloyd> pgib: then I guess I'd parse out the output to either "svn update" or "svn info" (svn info is probably easier)
[18:12:23] <pgib> yeah I was thinking info, I guess my big question was getting it from there into the code
[18:12:30] <cheeser> svn info --xml
[18:12:35] <dmlloyd> really?
[18:12:44] <dmlloyd> how about that
[18:12:48] <cheeser> then you can use the ant/propertfile stuff to grab it
[18:12:54] <pgib> in C++ I would define a environment var, then just use it with the preprocessor
[18:13:04] <dmlloyd> you learn something new every day I guess :)
[18:13:20] *** shadewind has joined ##java
[18:13:29] *** jmpf has quit IRC
[18:13:32] <pgib> cheeser, sure, but to get it from XML into a .java file?
[18:13:39] *** vezzoni has joined ##java
[18:13:44] *** jmpf has joined ##java
[18:14:07] *** Yustme has joined ##java
[18:14:13] <dmlloyd> pgib: write a utility to do it which you call from ant, or just use the propertyfile thing that cheeser mentioned
[18:14:20] <pgib> cheeser, thanks for the --xml hint, that is handy ;-)
[18:15:05] <pgib> I guess I'm not follwing you guys. I guess I will just write my own script to do it
[18:15:12] <EnderMB> Sorry, my mistake. I meant if it already had a holding method (i.e. a MainGame class having a MainGame method).
[18:15:25] <cheeser> pgib: http://www.innovationontherun.com/creating-a-build-number-with-ant-and-subversion/#comment-112
[18:15:43] <pgib> Still, If I'm able to use PropertyFile to modify a property file (the build.property file I imagine you are talking about) I need to still get it into the compile
[18:15:47] *** ldam has quit IRC
[18:16:47] <cheeser> ant subversion revision is <reply>http://is.gd/inaT
[18:16:57] <cheeser> ~ant subversion revision is <reply>http://is.gd/inaT
[18:16:57] <javabot> Okay, cheeser.
[18:17:08] <cheeser> ~ant svn revision is <see>ant subversion revision
[18:17:08] <javabot> Okay, cheeser.
[18:18:30] *** gverig has quit IRC
[18:19:52] *** osmosis has joined ##java
[18:20:25] *** giupo has quit IRC
[18:20:48] <EnderMB> Here is my code. How would I go about inhering a new TestGame class from my MainGame class as I've used a MainGame method to set variables?
[18:21:00] <EnderMB> http://www.eugeneciurana.com/pastebin/pastebin.php?show=39830
[18:21:20] *** verto has joined ##java
[18:21:29] <verto> hi guys
[18:21:58] <jschoolc> any Agile shops represented today? Have some questions about tools coming from a .NET and ruby background. (Very subjective questions, like best CI, IDE and test framework)
[18:22:18] *** shadewind has quit IRC
[18:23:14] *** shadewind has joined ##java
[18:23:47] *** pstickne has joined ##java
[18:23:47] <jchauncey> ~~jschoolc anyone
[18:23: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.
[18:23:56] *** IRAQI` has quit IRC
[18:24:51] <jschoolc> jchauncey: Sorry, but I did ask, at the end. What's state of the art for java agile tools? Best CI, IDE and test framework? I'm trying to narrow down my research
[18:27:41] *** TheCastor has joined ##java
[18:28:07] *** phyburn has quit IRC
[18:29:11] <dmlloyd> I don't know this "agile" religion you speak of, but IDEA is probably the best IDE, and most people seem to use junit or testng for testing
[18:30:44] *** EspenG has joined ##java
[18:30:45] *** jbwiv has quit IRC
[18:31:44] *** giupo has joined ##java
[18:32:11] <EnderMB> How would I go about inhering a new TestGame class from my MainGame class as I've used a MainGame method to set variables? Here's the code in question: http://www.eugeneciurana.com/pastebin/pastebin.php?show=39830
[18:33:16] <jchauncey> waterfall > *
[18:33:21] <_W_> EnderMB, well, why would you use inheritance?
[18:34:21] <_W_> jschoolc, why would you narrow down your research? It's not like there's hundreds of options to go through
[18:34:51] *** zeel has quit IRC
[18:35:02] *** latebind has quit IRC
[18:35:48] <jschoolc> _W_: There aren't hundreds but I'd like some "from the trenches" opinions
[18:36:45] *** amnesiac has joined ##java
[18:37:14] *** CapriCoRN^80 has joined ##java
[18:37:15] <EnderMB> _W_: The classes are going to be largely the same, so I wanted to inherit the values from MainGame and just allow the random number generator from MainGame to be changed in TestGame to a JOptionPane allowing the user to select their own random number.
[18:37:17] <_W_> jschoolc, why?
[18:37:43] <_W_> EnderMB, put the fields that will be the same in its own, third class
[18:38:02] <_W_> jschoolc, if you're going to evaluate them all anyway, why does opinions matter?
[18:38:30] *** tieTYT has quit IRC
[18:38:50] <jschoolc> _W_: I don't have time to evaluate them all
[18:39:01] <_W_> jschoolc, doesn't sound very agile
[18:39:26] <_W_> time used picking the right tool is time saved later
[18:39:49] *** valcker has quit IRC
[18:40:13] *** LordMetroid has joined ##Java
[18:40:20] *** habbekratz has quit IRC
[18:40:22] *** dvayanu has quit IRC
[18:40:39] <_W_> but I see I'm getting nowhere, so: hudson, netbeans, junit (newest!)
[18:40:52] <_W_> ~next
[18:40:52] <javabot> Another satisfied customer. Next!
[18:41:14] *** justafish has quit IRC
[18:41:43] <CapriCoRN^80> J2Me help : why we can't use this .. The Choice type Choice.POPUP is not allowed on List objects.
[18:41:56] <jschoolc> _W_: point taken, and I don't disagree. I'm just not in a position to be able to (or have the luxury to) evaluate all the options
[18:42:34] <jschoolc> _W_: IDE => eclipse, netbeans, IDEA. Did I miss any useful choices?
[18:42:37] *** vezzoni has quit IRC
[18:42:53] <_W_> ~ide
[18:42:54] <javabot> _W_, ide is Integrated Development Environment, see IDEA, Eclipse or Netbeans. You don't *need* an IDE to use Java, but it helps. Everyone and their brother has an opinion on which is best, but please try them all out and decide for yourself.
[18:43:09] <_W_> doesn't look like it
[18:43:18] *** KikiJiki has quit IRC
[18:43:39] <jschoolc> CI: maven, hudson, continuum, cc, team city.
[18:43:49] *** svm_invictvs has quit IRC
[18:43:50] *** vezzoni has joined ##java
[18:43:51] <_W_> jschoolc: http://weblogs.java.net/blog/kohsuke/archive/2008/12/hudson_adoption_1.html
[18:43:59] *** svm_invictvs has joined ##java
[18:44:07] <jschoolc> test => junit, jmock, easymock, testng
[18:44:11] *** Jonny_ has quit IRC
[18:44:14] <svm_invictvs> jmock?
[18:44:17] *** ofl_ has joined ##java
[18:44:35] *** tieTYT has joined ##java
[18:44:45] *** dk_schrute has joined ##java
[18:45:01] <CapriCoRN^80> svm_invictvs: not response on j2me
[18:45:04] <EnderMB> _W_: Sorry to be a pain, but even if I put this code into its own third class the new third class (Game) will still have its own method and won't be able to be inherited. How would I get around this?
[18:45:11] <svm_invictvs> CapriCoRN^80: what?
[18:45:26] <jschoolc> svm_invictvs: http://www.jmock.org/
[18:45:46] <svm_invictvs> CapriCoRN^80: Oh, I barely know anything abou thte UI classes in J2ME. My J2ME app has an entirely custom UI
[18:45:50] <_W_> EnderMB, look beyond inheritance - make reusable classes that you instantiate
[18:46:55] <_W_> say that your application needs a list - you don't have your main class subclass ArrayList, you just instantiate it instead, put it in a List reference, and use its public methods
[18:47:00] *** KermitTheFragger has quit IRC
[18:47:12] *** conan has joined ##java
[18:48:15] *** juc0 has quit IRC
[18:48:56] <svm_invictvs> jschoolc: Is it a code generator?
[18:49:23] <jschoolc> svm_invictvs: No, I don't believe so, looks like on the fly mock generation for test support
[18:50:30] <svm_invictvs> CapriCoRN^80: I don't know what timezone you're in, but I just got to work (and so did pandora--) and if you asked me a question it was liekly between the time I was either asleep, showering or commuting to work ;)
[18:50:34] <svm_invictvs> (and now of course)
[18:54:23] <pandora--> svm_invictvs: hah he tried to ask it here already?
[18:54:25] <pandora--> *sigh*
[18:54:27] <pandora--> fail
[18:54:53] *** looner{work has joined ##java
[18:56:27] <looner{work> i want to make a barcode reader, but not sure how. is there a library i need to get or do i have to write one from scratch in java?
[18:57:30] <svm_invictvs> pandora--: are you regularly in here?
[18:58:03] *** vesz has joined ##java
[18:58:06] <pandora--> svm_invictvs: always
[18:58:14] <pandora--> svm_invictvs: have been for yeeeaaarrrssss
[18:58:24] <pandora--> but more idling here, and less idling in #j2me
[18:58:49] <svm_invictvs> Ah.
[18:58:51] *** teralaser has quit IRC
[18:58:57] <pandora--> before there was #j2me, there was just 3 people in #java (before ##java) that knew anything about j2me :)
[18:59:31] *** sombriks has quit IRC
[19:00:10] <jonaslund> there's on thing to remember about j2me
[19:00:12] *** jmpf has quit IRC
[19:00:15] <jonaslund> write once, debug everywhere ;P
[19:01:04] *** CapriCoRN^80 has quit IRC
[19:03:32] <svm_invictvs> pandora--: and, at some point, cheeser got put in charge and it all went downhill :-P
[19:03:39] <svm_invictvs> j/k
[19:03:56] *** c369 has quit IRC
[19:04:15] <pandora--> jonaslund: hehhe
[19:04:47] <svm_invictvs> You know what, j2me was a good start, it should have been better developed.
[19:06:54] <jonaslund> actually most pre-2.0 phones (and some 2.0) phones were really crap
[19:07:01] <jonaslund> or atleast some
[19:07:29] <pandora--> they're a lot nicer now
[19:07:33] <jonaslund> the things i heard from people that worked around that time was that a GC or division could sometimes take like half a sec
[19:07:40] <pandora--> especially since its hard to find anything thats not cldc 1.1
[19:08:13] <jonaslund> and the famous nokia http connections causing memory leaks
[19:08:38] <jonaslund> but yeah. most modern stuff is fairly ok
[19:08:51] <jonaslund> and i do like jsr 239 :)
[19:09:05] <jonaslund> (opengl bindings)
[19:10:00] <jonaslund> i'm having mixed feelings about 184 tho (mobile 3d).. on one hand it's decently laid out but apperantly slow as dog on some devices :P
[19:10:20] <svm_invictvs> Probably because the phone doesn't have the hardware.
[19:10:33] <svm_invictvs> I'd kind of like ot see more of android
[19:10:43] <jonaslund> svm_invictvs: well one famous example was k700i that apperantly shipped with DEBUG binaries for jsr184 :P
[19:10:51] <svm_invictvs> lol
[19:10:55] <nater> i'm starting to suspect that for some reason or another its my recieving script not picking up the file
[19:10:57] *** Zeel has joined ##java
[19:11:06] <svm_invictvs> jonaslund: Implemented by Lowest Bidder Inc.
[19:11:14] <jonaslund> altho that implementation was apperantly done by the "mascot" people (conspiracy? ;P)
[19:11:29] <Zeel> Hello, I am running a lengthy process in a thread, and after the process completes I want to update a component in the UI. The only way I can do that is if I am in Event Dispatch Thread. So when I use SwingUtilities.invokeLater(... loadReport ...) the whole UI freezes. loadReport is just an asynchronous call, and if I run that call directly on the EDT Thread without threads, no freeze occurs. I am having a hard time trying to know why that is happening. Any advi
[19:11:31] <jonaslund> svm_invictvs: implemented by people who had a propietary api
[19:11:56] <jonaslund> of course that api ran at full speed on that phone
[19:12:12] <Stephmw> jonaslund: jsr184 really only works well with hardware acceleration, like in S40
[19:12:52] * Stephmw is pretty sure the W880i also has hw accel
[19:13:33] <jonaslund> Stephmw: depends on what you define as well tho, in my case i'd say anything that'd be faster than doing your own software renderer
[19:13:37] *** giupo has quit IRC
[19:14:12] <jonaslund> ohwell.. gotta go back to some accounting stuff :(
[19:14:27] *** bhz- has quit IRC
[19:15:03] <svm_invictvs> yeah
[19:17:17] * Stephmw goes back to pissing about with LDAP
[19:18:13] *** usicow has joined ##java
[19:18:13] *** ankylose has joined ##java
[19:18:54] <ankylose> hi everybody !
[19:19:42] <usicow> are there any frameworks that are common to use when writing a java program that once started sits there waiting for things to do until a kill command is recieved? i.e. writing a server in java?
[19:20:34] *** ffgeek200 has joined ##java
[19:21:05] <ffgeek200> Is it possible to do a switch..case but on an enum object?
[19:21:20] *** Mike-N-Go has joined ##java
[19:21:32] <[TechGuy]> ~tias
[19:21:32] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[19:21:51] <ffgeek200> ~did that already, getting an error
[19:21:51] <javabot> ffgeek200, I have no idea what did that already, getting an error is.
[19:21:59] *** nijm has joined ##java
[19:22:00] <ffgeek200> no entry
[19:22:04] *** alek_b has quit IRC
[19:22:16] <ffgeek200> ~snarky
[19:22:16] <javabot> ffgeek200, I have no idea what snarky is.
[19:22:35] <dangertools> ffgeek200: it is possible so you do it wrong
[19:22:40] <dangertools> ~~ ffgeek200 enum
[19:22:40] <javabot> ffgeek200, enum is http://java.sun.com/j2se/1.5.0/docs/guide/language/enums.html or http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.9 (JLS 3rd Edition 8.9)
[19:24:37] *** yclian has joined ##java
[19:24:38] <nijm> Hey guys. I have some objects that I'd like to store persistently. They're publisher objects, which have a list of listeners. I don't think I can serialize everything because some of the listeners have FileInputStreams, so I was wondering what some good options are for storing these objects?
[19:24:48] *** eduardopl has joined ##java
[19:26:00] *** alek_b has joined ##java
[19:26:30] *** alek_b has quit IRC
[19:26:49] *** alek_b has joined ##java
[19:26:50] <ffgeek200> the problem was I was using case TheEnum.LAST whereas I should have been using case LAST:
[19:26:58] *** Carnage\ has quit IRC
[19:27:14] *** roaet has joined ##java
[19:27:24] <ffgeek200> thanks dangertools
[19:28:02] *** squi has quit IRC
[19:30:34] *** Woot4Moo has quit IRC
[19:31:43] *** timte has joined ##java
[19:32:05] *** jivedude has quit IRC
[19:33:22] *** Blaay has quit IRC
[19:35:19] *** nater has left ##java
[19:36:00] <blahjake> is there a way to search for reachable instances of a class given the corresponding Class object?
[19:38:04] <_W_> most profilers should be able to do that
[19:39:22] *** pstickne has quit IRC
[19:40:08] *** Jonny_ has joined ##java
[19:41:37] *** roaet has left ##java
[19:42:49] *** usicow has quit IRC
[19:43:19] <blahjake> programmatically?
[19:43:32] <neshaug> anyone know a syntax checking library or something similar? I know the person who mention it mentioned it as using it with findbugs to check his cod.e
[19:43:44] *** foo-nix has quit IRC
[19:44:15] *** rindolf has joined ##java
[19:44:39] <rindolf> Hi all.
[19:44:56] <rindolf> I'm getting http://sial.org/pbot/34884 when running ant on Mandriva Cooker. What should I do to resolve this?
[19:45:03] *** cyth has quit IRC
[19:45:43] *** cyth has joined ##java
[19:46:21] <cheeser> looks like that ant bundle is busted.
[19:47:08] *** agnul has quit IRC
[19:47:31] *** shadewind has quit IRC
[19:47:55] <rindolf> cheeser: hmmm...
[19:47:58] <_W_> neshaug, that was probably me, I use findbugs and checkstyle in all my build scripts
[19:49:31] *** Qjimbo has joined ##java
[19:49:46] <Qjimbo> are there any channels I can go to to discuss applets?
[19:49:46] *** casmo has quit IRC
[19:50:01] *** eduardopl has quit IRC
[19:50:06] *** M[]ssad has quit IRC
[19:50:18] *** M[]ssad has joined ##java
[19:50:28] <pr3d4t0r> Dammit.
[19:50:35] *** ChanServ sets mode: +o pr3d4t0r
[19:51:52] *** JanK has joined ##java
[19:52:16] <pr3d4t0r> ~aolbonic
[19:52:16] <javabot> pr3d4t0r, I have no idea what aolbonic is.
[19:52:19] <pr3d4t0r> ~aolbonics
[19:52:19] <javabot> pr3d4t0r, 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!
[19:52:35] <pr3d4t0r> Hrm... where is the retarded Oracle factoid link?
[19:52:36] <JanK> is it possible to write binary numbers in the code? ie. 1010 (bin) for 10 (dec)
[19:52:58] <cheeser> wth would you want to?
[19:53:02] <pr3d4t0r> JanK: Sure.
[19:53:13] <JanK> pr3d4t0r: how? :P
[19:53:13] <pr3d4t0r> JanK: Use hex, though. Easier to read.
[19:53:30] <cheeser> not quite as easy as decimals.
[19:53:35] <cheeser> you wankers.
[19:53:36] <cheeser> 8^)=
[19:53:46] <pr3d4t0r> cheeser: Depends on what you're doing.
[19:54:02] <pr3d4t0r> cheeser: Decimals are a pain for computer-related stuff.
[19:54:09] <pr3d4t0r> cheeser: End-user code? Sure.
[19:54:14] <tyler_wylie> Anyone get 64 bit java plugin working in firefox?
[19:54:41] <repnop> works out of the box for me in fedora
[19:54:58] <_W_> wow, I don't know where to begin, ~anyone ~tech support or ~applets
[19:55:08] <tyler_wylie> repnop: via sun download?
[19:55:50] *** yclian has quit IRC
[19:55:53] *** fez has joined ##java
[19:55:58] <ankylose> libjnetpcap is not for noobs :/
[19:56:03] *** ovnicraft has joined ##java
[19:56:11] <ovnicraft> ~pastebin
[19:56:11] <javabot> http://rifers.org/paste Paste the final url after you've pasted your stuff there.
[19:56:37] <JanK> pr3d4t0r: how to mark binary numbers? (i'm curious)
[19:57:10] *** igordcard has joined ##java
[19:57:26] <Qjimbo> I really need some help with this applet, but I can't find anywhere to go :(
[19:57:45] <Qjimbo> and to do the same thing in flash it would cost me $3000-$4000
[19:58:14] *** yclian has joined ##java
[19:58:20] *** tomvolek has joined ##java
[19:58:21] <pr3d4t0r> JanK: You need a method. They aren't directly supported in Java.
[19:58:22] <svm_invictvs> _W_: I think the quote from Billy Madison is appropriate.
[19:58:25] <_W_> Qjimbo, not our problem
[19:58:33] <Qjimbo> well I know that
[19:58:33] <pr3d4t0r> JanK: You can save time using octal or hex, which are supported.
[19:58:41] <JanK> ok, thanks
[19:58:42] <Qjimbo> but I was hoping for some suggestions
[19:58:51] *** Deiselton has joined ##java
[19:58:54] <_W_> ~~Qjimbo applets
[19:58:54] <javabot> Check the topic, read http://javachannel.net/wiki/pmwiki.php/FAQ/Applets - Basically, we don't support them here. Try the sun forums at http://tinyurl.com/2q2hog
[19:58:59] <_W_> there's one
[19:59:08] <svm_invictvs> ~madison
[19:59:08] <javabot> svm_invictvs, I have no idea what madison is.
[19:59:13] <pr3d4t0r> JanK: Sux. Java has some queer implementation idiosyncrasies.
[19:59:26] <svm_invictvs> Does javabot have that quote?
[19:59:29] <cheeser> all software is computer related code. 8^)=
[19:59:34] <svm_invictvs> ~incoherent
[19:59:34] <javabot> svm_invictvs, I have no idea what incoherent is.
[20:00:07] <tomvolek> Hi All: I have a set of classes in different files , what is the best design to have exception handling and logging errors.. ?
[20:00:49] <svm_invictvs> ~specific
[20:00:50] <javabot> svm_invictvs, I have no idea what specific is.
[20:01:06] <svm_invictvs> ~specific is <reply> Be more specific. We are not mind readers.
[20:01:06] <javabot> Okay, svm_invictvs.
[20:01:06] <Deiselton> guys im writign a small code to post a part of a textfiel to the system clipboard every 2 seconds.... but im curios about something... im using the substring funtion and incrementing the index i am grabing in a while loop.... but what does it return when it goes out of bounds??... null?
[20:01:12] <svm_invictvs> ~~ tomvolek specific
[20:01:13] <javabot> Be more specific. We are not mind readers.
[20:01:51] <svm_invictvs> cheeser: how come he's not replying with the nick?
[20:01:51] <tomvolek> should I have an toError(String Errono) which will be called from try...catch.. blocks with error types to log .. etc ?
[20:02:04] <pr3d4t0r> cheeser: Come on, make it easy for me to troll!
[20:02:06] <pr3d4t0r> cheeser: Sheesh.
[20:02:09] <_W_> Deiselton, I bet the documentation tells you
[20:02:20] <_W_> ~~Deiselton rtfm
[20:02:20] <javabot> Firstly, see http://xkcd.com/293/ then see the API Docs at http://java.sun.com/javase/6/docs/api and the Really Big Index at http://java.sun.com/docs/books/tutorial/reallybigindex.html
[20:02:24] <pr3d4t0r> cheeser: Do you recall which aolbonics factoid had the Oracle link?
[20:02:26] *** b3nn3tt has joined ##java
[20:02:27] <tomvolek> svm_invictvs .. what is the best way to handle error handling in large projects... ?
[20:02:30] <cheeser> ~aolbonics
[20:02:30] <javabot> cheeser, 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!
[20:02:37] <cheeser> that one did. but the link died.
[20:02:37] <Deiselton> _W_: im sure it does somewere but i cant find it...
[20:02:44] <pr3d4t0r> cheeser: Ah.
[20:02:55] <_W_> Deiselton, you really can't find the documentation for String?
[20:02:57] <svm_invictvs> tomvolek: Use a logging library or framework.
[20:03:12] <pr3d4t0r> cheeser: Heh. Some Oracle webadmin must've noticed the extra traffic to that otherwise content-free set of pages :)
[20:03:34] <tomvolek> svm_invictvs does Java has anything native.. ? Do u have any examples ?
[20:03:36] <_W_> Deiselton, protip: the main docs link has a frame at the bottom left named "all classes". It's sorted alphabetically.
[20:03:37] <svm_invictvs> ~~ tomvolek java.util.Logger
[20:03:37] <javabot> tomvolek, I have no idea what java.util.Logger is.
[20:03:44] <svm_invictvs> ~~ tomvolek java.util.logging.Logger
[20:03:44] <javabot> tomvolek, I have no idea what java.util.logging.Logger is.
[20:03:47] <svm_invictvs> fuck
[20:03:51] <svm_invictvs> ~javadoc Logger
[20:03:51] <javabot> svm_invictvs: http://is.gd/io1F [java.util.logging.Logger]
[20:03:59] <svm_invictvs> tomvolek: Look at that as a startr
[20:04:01] <svm_invictvs> **start
[20:04:11] <tomvolek> thanks svm
[20:04:14] <svm_invictvs> There's also..
[20:04:15] *** Woot4Moo has joined ##java
[20:04:16] <svm_invictvs> ~log4j
[20:04:16] <javabot> svm_invictvs, log4j is a logging system for java. See http://logging.apache.org/log4j/docs/index.html.
[20:04:28] <svm_invictvs> ~sl4fj
[20:04:28] <javabot> svm_invictvs, I have no idea what sl4fj is.
[20:04:29] <svm_invictvs> er
[20:04:49] <svm_invictvs> tomvolek: There's a few logging frameworks and utilities. but start looking at java.util.logging
[20:05:21] <tomvolek> will do sir , thanks .. another wonderful hint from good folks at IRC chat :)
[20:05:32] <tomvolek> god bless
[20:05:46] <Deiselton> _W_: very funy... the only thing i can find is that it throws an index out of bounds exception...
[20:05:57] *** bjv has joined ##java
[20:05:57] *** Odin79 has joined ##java
[20:05:58] <jchauncey> there you go
[20:06:08] <_W_> Deiselton, that's your answer right there
[20:06:20] <jchauncey> ~~Deiselton rif
[20:06:20] <javabot> Reading Is Fundamental
[20:06:23] <_W_> and if you think you still need to know what it returns, you should read up on what an exception is
[20:06:25] <Deiselton> ok... is there a way to say do this while(no index out of bounds error)
[20:06:39] <Deiselton> other then a try catch box
[20:06:40] <_W_> Deiselton, that's really horrible coding, but yes.
[20:06:44] <_W_> no
[20:07:00] <_W_> but you know the bound already, why not check for it in the loop?
[20:07:32] *** vix85 has joined ##java
[20:09:38] *** jabalsad has quit IRC
[20:10:09] <Deiselton> _W_ i dont knwo the bound... when they use one button it generates a string of numbers separated by spaces... but they are 7 digit sectors... so i know in the substring function returns a full sector when the index is incremented by seven... but the numebr of times it could be varies
[20:10:16] *** adimit has joined ##java
[20:10:40] <bjv> for an object to be threadable it _must have a static main()?
[20:10:48] <cheeser> uh. no.
[20:10:49] <bjv> because i made a dummy thread without one.
[20:10:57] <bjv> and my program did not seem to thread
[20:11:03] <_W_> Deiselton, the length of all strings are available
[20:11:07] <cheeser> ~~ bjv threads
[20:11:07] <javabot> bjv, threads is http://java.sun.com/tutorial/essential/threads
[20:11:10] <bjv> it just froze/blocked while the "thread" did its thing
[20:11:18] *** dvayanu has joined ##java
[20:11:23] <bjv> im reading that. you can make a runnable object or extend Thread
[20:11:26] <cheeser> did you say new MyThread().run() ?
[20:11:28] <_W_> bjv, you probably called run directly
[20:11:29] <bjv> both examples have a main()
[20:11:59] <bjv> cheeser yes, when i click the button that says MyAlreadyInstantiatedObject.run()
[20:12:00] *** casmo has joined ##java
[20:12:03] <bjv> the program locks
[20:12:08] <cheeser> that's not how you use threads.
[20:12:10] <cheeser> read the link.
[20:12:31] *** Varox has quit IRC
[20:12:35] <cheeser> how you got from that to needing a main() is bewildering.
[20:12:46] <Deiselton> yes... but they are separated by spaces... meaning i oculd just say string.legnth divided by 7... but that dont account for the spaces... which depending on number of sectors varies... so unless i knwo the number of sectors in there i wont know how many spaces so i cant use math to get the exact number
[20:12:47] *** ayrnieu has quit IRC
[20:13:02] *** ayrnieu has joined ##java
[20:13:05] <adimit> Suppose I have a stream handle on a web page (potentially large web page), and need to perform sequential operations on its content. Putting it in a StringBuffer and iterating over the String seems kinda the wrong approach. Is there a (threaded) pattern to read the page in one thread and have a thread listening on the other side, doing its business on whatever flows in?
[20:13:05] <Deiselton> unless i did i used a string tokenizer
[20:13:38] <Deiselton> and deleted the spaces... then i could just dived the length by 7 and loop that many times
[20:13:45] <adimit> and can someone recommend me good online sources on understanding threaded IO in Java in general
[20:13:48] <adimit> ?
[20:14:07] <cheeser> ~nio
[20:14:07] <javabot> cheeser, nio is http://java.sun.com/javase/6/docs/technotes/guides/io/example/index.html and http://gee.cs.oswego.edu/dl/cpjslides/nio.pdf
[20:15:05] <bjv> cheeser: mm, ok let me try.
[20:15:20] <adimit> cheeser: OK, thanks.
[20:15:23] * adimit is off reading.
[20:15:33] *** ordex has joined ##java
[20:15:37] <Deiselton> _W_: ok i need a break i think... been working 16 hours strait... and my brain is fried.. i do beleive i just went into a chat room to ask a question that is literally how do i ask when the Y index is less then or equall to a string length
[20:15:38] <ordex> hi men
[20:15:55] <Deiselton> _W_: srry for the bother... im way overthinking things
[20:16:00] <ordex> does it exist a class that implements an ordered array with log(n) search time?
[20:16:16] <repnop> Deiselton: you should read about all the member functions of the classes you're using when you run into problems.
[20:16:22] <ordex> in order to do not implement it by hand
[20:16:28] <repnop> but if it's just a large string...
[20:17:33] <ordex> anyone knows?
[20:17:44] <bjv> _W_, cheeser: yeah, sorry. i called MyAlreadyInstantiatedObject.run()
[20:17:52] <bjv> instead of .start()
[20:18:26] *** wans has quit IRC
[20:18:37] *** skypce has quit IRC
[20:18:58] *** ovnicraft has quit IRC
[20:21:51] *** tag has joined ##java
[20:22:41] *** ovnicraft has joined ##java
[20:22:51] *** adi112358 has joined ##java
[20:26:53] *** EnderMB has quit IRC
[20:28:09] *** soa2ii has quit IRC
[20:28:39] *** shoeplex has quit IRC
[20:30:43] *** segun has left ##java
[20:33:20] *** chris_abyi has joined ##java
[20:33:41] *** mknix has joined ##java
[20:34:42] <tieTYT> can I use intellij to edit svn conflicts?
[20:35:00] <cheeser> sure
[20:35:04] <tieTYT> how do you do that?
[20:35:07] <cheeser> ~idea faq
[20:35:07] <javabot> Yes, IDEA can do that.
[20:35:07] <tieTYT> i mean with the diff view
[20:35:17] <cheeser> click on the change you want to keep.
[20:35:21] *** verto has quit IRC
[20:35:25] <cheeser> there are arrows and Xs and the like
[20:35:29] <svm_invictvs> ~eclipse faq
[20:35:29] <javabot> I don't think so. But maybe there's a plugin...
[20:35:32] <svm_invictvs> lol
[20:35:56] <tieTYT> cheeser: yeah but hwo do I get into that view with the intent of fixing conflicts?
[20:36:11] <cheeser> look in the version control window along the bottom
[20:36:38] <cheeser> or right click in the project view->subversion->resolve conflict
[20:36:46] <cheeser> or hit F1
[20:36:47] <cheeser> 8^)=
[20:37:19] *** Mike-N-Go has quit IRC
[20:37:27] *** blankthemuffin has joined ##java
[20:37:33] <tieTYT> yeah i only have resolve text conflict
[20:37:37] <tieTYT> ah!
[20:37:41] <tieTYT> so you hit the merge button in there
[20:38:15] *** bindaas has joined ##java
[20:40:14] *** Razec has joined ##java
[20:40:16] *** TooAngel has joined ##java
[20:40:52] *** bjv has quit IRC
[20:40:53] *** TooAngel has left ##java
[20:42:01] <tieTYT> bah this is retarded. It expects you to select one change over another. It doesn't let you choose "use theirs then yours"
[20:42:53] *** Necker has quit IRC
[20:43:36] <cheeser> you can edit in that window, too, if you want to manually merge
[20:44:14] <tieTYT> ahh
[20:44:27] <tieTYT> that's the best of both worlds
[20:44:27] <tieTYT> thanks
[20:44:40] <cheeser> you think idea faq is a joke. but it's pretty close to true.
[20:44:41] <cheeser> 8^)=
[20:46:54] <svm_invictvs> can idea auto make ant scripts?
[20:46:57] *** cybereal has joined ##java
[20:47:03] <tieTYT> yes
[20:47:09] <tieTYT> but so can all the others, i'm sure
[20:47:13] <svm_invictvs> yeah
[20:47:29] <svm_invictvs> Does idea integrate with proguard?
[20:47:35] <tieTYT> cheeser: the thing that it seems to do is assume that if you don't want one conflict, you DO want the other
[20:47:37] *** tomvolek has quit IRC
[20:47:39] <tieTYT> this happens even if I manually resolve it
[20:47:45] <tieTYT> other than that, it's really nice
[20:48:21] <cheeser> tieTYT: well, sure.
[20:48:42] <tieTYT> oh i get it
[20:48:48] <tieTYT> i can just hit the apply button and it accepts everything
[20:49:05] <cheeser> you can also have it autoaccept any nonconflicting changes.
[20:49:18] <cheeser> then you can deal with the actual conflicts
[20:49:33] <chris_abyi> hey - has anyone here ever used the itext libraries?
[20:49:33] *** StanAccy has joined ##java
[20:49:43] <cybereal> chris_abyi: no, never
[20:49:52] <cybereal> nobody has ever used it, in the whole universe, throughout all time
[20:50:09] <tieTYT> that's also very cool
[20:50:12] <StanAccy> Is the current state of a static variable in a class guaranteed to be visible to multliple threads, or does it have to be marked volatile?
[20:50:27] <cybereal> StanAccy: it's not guaranteed
[20:50:30] <StanAccy> (assuming that the value of that static is being changed)
[20:50:42] <cybereal> StanAccy: even volatile might not be enough depending on the type
[20:50:48] <StanAccy> Now, what if I synchronize on the class that contains the static - its still not guaranteed?
[20:51:01] <cybereal> StanAccy: if you need a value shared between threads you use a locking mechanism, a very simple one would be the Atomic* classes
[20:51:25] <StanAccy> Im debugging existing code - so trying to understand potential problems
[20:51:31] <StanAccy> we know we have a race condition
[20:51:37] <cybereal> it's better to use a container at the value level if possible because synchronizing is cooperative, meaning a thread could just skip that and read directly/write directly
[20:51:46] <chris_abyi> cybereal, I didn't want to bother you with the question, but now, Ill do it: :) Does anyone know if there's a different solution of doing a lineskip than adding a new paragraph to the document?
[20:52:09] <cybereal> but if you had your value masked behind at least a method call, or one of these Atomic wrappers, you could easily ensure thread safe access
[20:52:42] <cybereal> StanAccy: if you are accessing a bare public static field between threads you're asking for problems
[20:53:14] <StanAccy> Its private, accessing from multiple threads, but the accessing methods are synchronzied
[20:53:32] <cybereal> StanAccy: if it's only accessed through those synchronized methods then you're fine
[20:53:59] <StanAccy> so the lock methods force the value to be synchronzied across all threads for all variables?
[20:54:14] <StanAccy> if thats the case, whats the use for 'volatile' ?
[20:54:28] <cybereal> StanAccy: reading without synchronization
[20:54:39] <cheeser> volatile prevents the VM from caching values per thread
[20:55:06] *** dmlloyd has quit IRC
[20:55:07] <StanAccy> is a static guaranteed to only have one value across multiple threads (i.e. all the same)?
[20:55:45] <cybereal> not if you access it directly without synchronization and it's not volatile
[20:56:06] <StanAccy> ok, so throw in a couple of read/write synchronzied methods, but no volatile
[20:56:17] *** trancenrg has quit IRC
[20:56:18] *** dmlloyd has joined ##java
[20:56:30] <StanAccy> Im synchronzing on a Lock, not the static var in question
[20:56:59] <StanAccy> does acquiring the lock, force the active thread to get a current copy of the static vars contents?
[20:57:12] <StanAccy> so for example if the previous thread that held the lock nulled it out
[20:57:16] <cheeser> ~jcip
[20:57:16] <javabot> cheeser, jcip is Java Concurrency In Practice, a book focused on implementing threaded and concurrent applications in Java. http://jcip.net/
[20:58:33] *** vesz has quit IRC
[20:58:51] <StanAccy> Thanks for the ref - I ordered that book, but it wont be here until Thursday.
[20:59:21] <StanAccy> so does acquiring a lock force the objects variables to be synchronized and brought up to date before the thread reads them?
[20:59:27] *** vix85 has quit IRC
[21:00:53] <StanAccy> ~jls
[21:00:53] <javabot> StanAccy, jls is The Java Language Specification: http://java.sun.com/docs/books/jls/
[21:01:22] *** trancenrg has joined ##java
[21:01:26] <trancenrg> join ##java-talk
[21:01:53] <trancenrg> woops forgot that forward slash
[21:02:27] *** igordcard has quit IRC
[21:05:06] *** Deiselton has quit IRC
[21:05:43] *** adimit has quit IRC
[21:07:18] *** adimit has joined ##java
[21:10:02] *** obnauticus has joined ##java
[21:10:13] *** vezzoni has quit IRC
[21:11:26] <adimit> nett.
[21:11:34] <adimit> (sry, wrong window, ignore)
[21:12:40] *** Mixmasterxp has joined ##java
[21:13:31] *** casmo has quit IRC
[21:13:33] <Mixmasterxp> hello, for a .net visual studio programmer, whats a good programming environment for java?
[21:13:56] <mahogny> I use eclipse
[21:14:08] <ernimril> Mixmasterxp: emacs/vim, make/ant, bash/<other shell>
[21:14:08] <mahogny> if you prefer bloat, go with netbeans
[21:14:16] <whaley> Mixmasterxp: that is subjective... thankfully there is actually a choice here :D
[21:14:32] *** blankthemuffin has quit IRC
[21:14:37] <cheeser> ~newbie ide
[21:14:37] <javabot> Newbies shouldn't start with IDEs. It's important to learn the environment and fundamentals of a language before offloading those to an IDE. Learn about packages and imports and classpaths. Learn how to compile and use the JDK tools. Get some basic grasp of the API layout. Learn how to do things then switch to an IDE to do them faster. See http://tinyurl.com/yvks48 and and http://tinyurl.com/2cpn6o for more info.
[21:14:39] <ernimril> Mixmasterxp: if you want to learn java, then start with the basic tools and learn the _basics_
[21:15:02] <Mixmasterxp> I used to use netbeans 2 years ago, just wondering if theres any new IDEs out there very similiar to visual studio
[21:15:14] <ernimril> ~ide
[21:15:15] <javabot> ernimril, ide is Integrated Development Environment, see IDEA, Eclipse or Netbeans. You don't *need* an IDE to use Java, but it helps. Everyone and their brother has an opinion on which is best, but please try them all out and decide for yourself.
[21:15:23] *** kapipi has quit IRC
[21:15:24] <Woot4Moo> no there are no java ides that write the whole program for you like visual studio
[21:15:56] *** dvayanu has quit IRC
[21:18:53] <waz> what, do you start Visual Studio and say 'Build me a WebApp' and it's done?
[21:18:54] *** ovnicraft has quit IRC
[21:19:19] <ernimril> do they have a module in there that reads your mind and figures out what you want?
[21:19:28] <tieTYT> man...
[21:19:29] <Woot4Moo> name me a developer who can debug something that they wrote using a msft ide
[21:19:35] <tieTYT> in 1.4, branching with svn is a nightmare
[21:19:46] <tieTYT> there are so many pitfalls you can make
[21:19:55] <whaley> tieTYT: HEH
[21:20:14] <tieTYT> i can't imagine how bad cvs must have been for this to be considered an improvement
[21:20:34] <whaley> tieTYT: yeah, I want to get my employer to start using 1.5 on the server so we can use merge tracking
[21:20:35] <cheeser> ah, kids.
[21:20:41] <cheeser> hg++
[21:20:45] <whaley> tieTYT: we get lots of screw ups too :-x
[21:21:48] <tieTYT> and yet, all the guys in #svn suggest you should preemptively make branches for most changes you're going to make
[21:22:09] <tieTYT> anyway, i guess this isn't really on topic but the conversation can really effect your java code like it just did to mine
[21:22:24] <whaley> tieTYT: well, I do an early branch for most of my changes all the time as well
[21:22:55] <whaley> tieTYT: for whatever reason, I've never had a problem with it... aside from the random conflict here and there, which happens
[21:23:13] <tieTYT> whaley: can I pm you?
[21:23:19] <whaley> tieTYT: sure
[21:23:45] <rindolf> How can I print java's current classpath?
[21:23:48] <Mixmasterxp> Woot4Moo: what do you mean by debug something in vs?
[21:23:51] <rindolf> $CLASSPATH is empty.
[21:23:57] <Woot4Moo> what
[21:24:04] <Woot4Moo> oh
[21:24:13] <ernimril> rindolf: why do you want to do it?
[21:24:18] <Mixmasterxp> [15:15] <Woot4Moo> name me a developer who can debug something that they wrote using a msft ide
[21:24:23] <Woot4Moo> there are few developers who use vs that know how to debug the programs they "create'
[21:24:26] <ernimril> rindolf: you should not normally set a global CLASSPATH
[21:24:43] <rindolf> ernimril: because I'm trying to see where there are stale copies of ant classes.
[21:24:52] <rindolf> http://ant.apache.org/faq.html#NoClassDefFoundError
[21:24:58] *** dmlloyd has quit IRC
[21:25:01] <Mixmasterxp> isn't that same as most other IDEs, just set a breakpoint and walkthrough it?
[21:25:08] *** dmlloyd has joined ##java
[21:25:21] <Woot4Moo> you missed my point about vs taking all the thinking out of coding
[21:25:32] <Woot4Moo> and creating a horde of idiotic programmers
[21:25:32] <ernimril> I really do not like breakpoints, it takes too much time to walk through code
[21:25:40] *** Mike-N-Go has joined ##java
[21:25:53] <Woot4Moo> i find most people that use that ide are in fact terrible software writers
[21:26:05] <waz> haha
[21:26:16] <waz> so you're one of the real men that don't use IDEs?
[21:26:21] <ernimril> Woot4Moo: s/that use that ide//
[21:26:27] <Woot4Moo> waz
[21:26:32] *** cambazz has joined ##java
[21:26:32] <Woot4Moo> for the love of god learn english
[21:26:44] <Woot4Moo> vs is for horrishitty programmers
[21:26:49] * cheeser notes that he can safely disregard all of Woot4Moo's opinions
[21:26:49] <cambazz> how can i get the url from a jsp page
[21:26:56] <cambazz> within a jsp i mean
[21:26:59] <cheeser> cambazz: from the ServletContext
[21:27:03] <Mixmasterxp> When you have time constraint to work against, i dont think your going to be working in notepad
[21:27:04] <Woot4Moo> fair enough cheeser fair enough
[21:27:27] <Woot4Moo> i actually do a lot of dev in notepad++
[21:27:56] <Woot4Moo> listen i have yet to come across someone who codes in vs that can debug worth a damn
[21:28:09] <cheeser> 1. vs != all ides. 2. vs != java
[21:28:20] <cheeser> so let's move on
[21:28:26] <cambazz> cheeser: and how would I do that? ${servletContext.url} ?
[21:28:28] <ernimril> Woot4Moo: how many people do you know that can debug well?
[21:28:39] <Woot4Moo> 1 billion
[21:28:40] <cheeser> ~~ cambazz javadoc ServletContext
[21:28:40] *** ScottG489 has joined ##java
[21:28:40] <javabot> cambazz: http://is.gd/ioIs [javax.servlet.ServletContext]
[21:28:43] <Woot4Moo> they live in china
[21:28:50] <cheeser> ~interesting
[21:28:51] <javabot> this is all very interesting (not really) but please take it somewhere else.
[21:29:04] <Woot4Moo> ~fail
[21:29:04] <javabot> Woot4Moo, fail is http://de.fishki.net/picsw/022008/26/fail/15_fail.jpg
[21:29:09] <Woot4Moo> oh nice
[21:29:23] <cambazz> well, how do i access to the servlet context from a jsp page
[21:29:25] <jonaslund> Woot4Moo: pffft
[21:29:33] * pr3d4t0r hovers over the channel, looking for prey.
[21:29:52] <jonaslund> Woot4Moo: most people i know that use VS uses it for syntax completition and debugging
[21:29:57] <whaley> tieTYT: pr3d4t0r loves svn also
[21:30:06] <cheeser> ~~ jonaslund interesting
[21:30:06] <javabot> this is all very interesting (not really) but please take it somewhere else.
[21:30:09] <Woot4Moo> than i suppose i am surrounded by retards
[21:30:10] <jonaslund> Woot4Moo: granted tho they use it for c++
[21:30:16] <pr3d4t0r> ~spank Woot4Moo
[21:30:17] <javabot> runs the Spank-O-Matic against Woot4Moo
[21:30:20] <pr3d4t0r> ~spank whaley
[21:30:20] <javabot> runs the Spank-O-Matic against whaley
[21:30:25] <whaley> aahahaha
[21:30:26] *** pr3d4t0r sets mode: +b Woot4Moo!*@*
[21:30:26] *** Woot4Moo was kicked by pr3d4t0r (pr3d4t0r)
[21:30:34] <Mixmasterxp> I use vs for its intellisense and profiling tools
[21:30:46] *** Mixmasterxp was kicked by cheeser (i said drop it already)
[21:31:05] <cheeser> i'm seeing trend among VS users: can't follow directions
[21:31:20] <pr3d4t0r> cheeser: It's because they're largely illiterate.
[21:31:27] * cheeser nods.
[21:31:35] *** looner{work has left ##java
[21:33:09] *** nijm has quit IRC
[21:33:12] *** waz- has joined ##java
[21:33:31] *** waz is now known as Guest60302
[21:33:55] *** waz- is now known as waz
[21:34:12] *** Guest60302 has quit IRC
[21:36:10] *** JanK has left ##java
[21:36:22] *** romanb has quit IRC
[21:36:37] *** dvayanu has joined ##java
[21:37:07] *** TryNiX has joined ##java
[21:37:20] <TryNiX> hi all :P
[21:39:09] *** cheeser sets mode: -bbbb *!*n=ionine@*.dyn.optonline.net *!*i=orion@unaffiliated/whatsinaname* *!*n=Yang@*.hsd1.wa.comcast.net Woot4Moo!*@*
[21:40:14] *** vyoman has joined ##java
[21:40:24] <TryNiX> cybereal, hya :)
[21:43:14] *** ml` has joined ##java
[21:43:32] *** SilentAssassin has quit IRC
[21:43:54] <TryNiX> just started reading on Lisp. Syntax is quite weird for starters =p
[21:44:02] <cheeser> try ##lisp
[21:44:36] <TryNiX> only 3 people there :) and was just talking -_- not really askin for help on lisp =p
[21:45:24] <TryNiX> oo but #lisp is the realdeal =p thx
[21:45:47] <whaley> ~thx
[21:45:47] <javabot> http://www.thx.com/
[21:46:15] <TryNiX> I totally forgot about this company -_-
[21:46:33] *** crowbar has joined ##java
[21:47:58] <whaley> yipeeeeee
[21:49:08] <dmlloyd> 1 > 2 >> 3 >>> 4 = true
[21:49:31] <dmlloyd> this useless info was brought to you by the number 6 and the letter Ø
[21:49:48] *** nijm has joined ##java
[21:49:51] <TryNiX> isn't that an empty set
[21:50:00] *** jchauncey has quit IRC
[21:50:30] *** RainbowPrizm has joined ##java
[21:50:37] *** reisio has joined ##java
[21:51:32] <RainbowPrizm> has anyone had issues with CVS on RHEL 4 when checking in jar files? My CVS is able to add the .jar file and then it appears that it converts the .jar file toa .jar,v file.. but then an strace reveals it keeps getting "permission denied" unable to open standard.jar,v
[21:51:45] <RainbowPrizm> ive made sure permissions are open.. and many of those things as well.. i can check in other files fine
[21:51:53] <RainbowPrizm> .zip , .tar.gz .. .exe ..e tc
[21:51:59] <RainbowPrizm> just seems to be localized to .jar files
[21:52:09] <RainbowPrizm> even ones ive gotten from the internet from apache/tomcat .. and getty.. etc
[21:53:23] <cheeser> this isn't a cvs channel
[21:53:31] *** Weems has quit IRC
[21:53:33] <RainbowPrizm> im fully aware.. of that
[21:53:34] *** bindaas has quit IRC
[21:53:42] <cheeser> so wth are you asking here?
[21:53:44] <cheeser> try ##cvs
[21:53:57] <RainbowPrizm> because the problems seem localized to the fact the files are .jar files.. and i thought maybe someone coudl offer insight
[21:54:13] <cheeser> it's clearly a cvs issues and not related at all to java.
[21:54:33] *** [[thufir]] has quit IRC
[21:54:35] *** eidolon has left ##java
[21:54:35] <RainbowPrizm> perhaps.. it was just a thought
[21:54:41] *** reisio has quit IRC
[21:55:56] *** FMJaguar has joined ##java
[21:56:35] *** ChanServ sets mode: +o waz
[22:01:04] *** Russell^^ has joined ##java
[22:02:19] *** kshepherd has joined ##java
[22:02:39] *** RainbowPrizm has left ##java
[22:03:58] *** Bollinger has quit IRC
[22:04:05] *** jiggster is now known as jig[g]ster
[22:04:27] *** pierrep has quit IRC
[22:07:54] *** dv_ has joined ##java
[22:08:15] *** bitshuffler has quit IRC
[22:08:50] *** _stack has joined ##java
[22:09:59] *** adi112358 has quit IRC
[22:10:45] *** vix85 has joined ##java
[22:13:42] *** Mike-N-Go has quit IRC
[22:14:11] *** vezzoni has joined ##java
[22:14:17] *** foo-nix has joined ##java
[22:18:49] *** cybereal has quit IRC
[22:18:50] *** Razec has quit IRC
[22:19:12] *** jwl007 has joined ##java
[22:19:46] <jwl007> Im trying to write some unit tests for a portlet and struts application.. is there an equivalent of a Container in DispatcherPortlet?
[22:19:50] *** pandora-- has quit IRC
[22:22:07] *** rindolf has quit IRC
[22:22:08] *** Dr_Link has quit IRC
[22:22:15] *** StanAccy has quit IRC
[22:22:31] *** Dr_Link has joined ##java
[22:26:52] *** thecarlhall has joined ##java
[22:28:59] *** piksel has joined ##java
[22:30:15] <piksel> I want to iterate through a list of objects in a game, and when these objects overlap I remove one. I am using two ListIterators over Vectors, and I get a ConcurrentModificationException any time I remove one of the objects.
[22:30:58] <cheeser> call remove() on the Iterator not the List
[22:31:07] <Sou|cutter> piksel: use a concurrent collection, and be sure to call remove on the iterator
[22:31:09] <piksel> cheeser: I am
[22:31:14] <cheeser> ~~ piksel show us
[22:31:14] <javabot> Paste the code (and any errors) in the pastebin where we can see it. See ~pastebin for options.
[22:32:32] *** n3llyb0y has quit IRC
[22:32:59] *** Junior has quit IRC
[22:34:23] <piksel> cheeser: http://pastebin.com/d6bea9e65
[22:34:29] <jwl007> or just dont remove the item while you are iterating over it :)
[22:34:57] <cheeser> you have two iterators on the same list.
[22:34:58] <piksel> I tried to cut out all the irrelevant code, so hopefully I didn't remove anything important
[22:35:14] <piksel> cheeser: yes. I want to compare each object to every other object in the list
[22:35:21] <piksel> is there a better way?
[22:35:22] <cheeser> you can't do that.
[22:36:04] *** npm has joined ##java
[22:36:42] <rgravener> for(int i = 0; i < list.size(); i+=2)
[22:37:26] <jwl007> you can convert the list to a hashset then convert it back to whatever collection you are using
[22:38:36] <dmlloyd> yeah, you probably want a hashset in the first place
[22:38:48] <dmlloyd> if you want the objects to stay in order maybe you want a LinkedHashSet
[22:42:38] *** Frostix has quit IRC
[22:43:44] *** luiX_ has joined ##java
[22:43:48] <luiX_> hi
[22:43:49] <adimit> piksel: keep in mind that comparing each object to every other object induces a combinatorial explosion (something along the lines of O(n!), if I'm not mistaken) Maybe you shouldn't do that in the first place.
[22:44:14] <luiX_> is there any easy way to format a console output in columns automatically?
[22:44:30] *** Dr_Link is now known as elfbinary
[22:44:35] *** elfbinary is now known as Dr_Link
[22:45:07] <adimit> luiX_: you're looking for a pretty printer? Maybe jpplib can help you (jpplib.sf.net) but I haven't ever used it.
[22:45:43] *** Simucal has joined ##java
[22:46:45] <cheeser> ~~ luiX_ curses
[22:46:46] <javabot> Console/terminal support: See JavaCurses - http://sourceforge.net/projects/javacurses/ and Charva - http://www.pitman.co.za/projects/charva/ and Jcurzez - http://www.nongnu.org/jcurzez/ and also "Console Window with a JTextArea Component" - http://javaalmanac.com/egs/javax.swing.text/ta_Console.html and Java 6.0's java.io.Console class.
[22:47:05] <luiX_> cheeser, that sounds great ;)
[22:47:09] <luiX_> thank you both
[22:48:50] *** resmo has quit IRC
[22:49:00] <Simucal> Don't thank cheeser.. javabot did all the work!
[22:49:17] <cheeser> ~info curses
[22:49:17] <javabot> curses was added by: Fanook on 04-25-2007 at 9:32 PM, EDT and has a literal value of: <see>javacurses
[22:49:23] <cheeser> ~info javacurses
[22:49:23] <javabot> javacurses was added by: Blackwell on 04-14-2006 at 7:55 PM, EDT and has a literal value of: <reply>Console/terminal support: See JavaCurses - http://sourceforge.net/projects/javacurses/ and Charva - http://www.pitman.co.za/projects/charva/ and Jcurzez - http://www.nongnu.org/jcurzez/ and also "Console Window with a JTextArea Component" - http://javaalmanac.com/egs/javax.swing.text/ta_Console.html and Java 6.0's java.io.Console class.
[22:49:25] <cheeser> bah
[22:49:26] <cheeser> 8^)=
[22:49:27] *** skoskav has quit IRC
[22:49:34] <Simucal> lol
[22:49:35] *** alek_b has quit IRC
[22:49:36] *** skoskav has joined ##java
[22:49:47] <adimit> cheeser: you need a changelog for javabot's fact database :-P
[22:49:54] <pgib> yay for java+vista bugs
[22:49:55] <cheeser> ~changes
[22:49:55] <javabot> cheeser, I have no idea what changes is.
[22:50:01] <cheeser> adimit: antwerkz.com/javabot
[22:50:56] <cheeser> ~changes is http://is.gd/ipmC
[22:50:56] <javabot> Okay, cheeser.
[22:51:02] <luiX_> anyway, thank you all ;)
[22:51:22] <luiX_> or everyone, or however you say it (i'm spanish :P)
[22:51:39] <luiX_> xD
[22:51:51] <pgib> both work
[22:52:03] <cheeser> todos los peeps
[22:52:03] <cheeser> 8^)=
[22:52:14] <luiX_> todos los peeps?
[22:52:15] *** ScottG489 has quit IRC
[22:52:19] <luiX_> what's a peep?
[22:52:19] <luiX_> xD
[22:52:25] *** Yustme has quit IRC
[22:52:57] <cheeser> peeps == people
[22:53:03] <pgib> some English slang to confuse you even further
[22:53:12] <luiX_> supposed that, but wasn't sure
[22:53:13] <luiX_> xDDD
[22:53:32] *** mistik1 has quit IRC
[22:53:48] *** Resistance has quit IRC
[22:54:15] *** rlubke has quit IRC
[22:54:18] *** rlubke has joined ##java
[22:54:34] *** Resistance has joined ##java
[22:55:15] <pgib> I need to stop eatting food that is really spicy while at work. I am unable to communicate verbally right now
[22:55:27] *** ordex has quit IRC
[22:57:00] *** evud has joined ##java
[22:57:08] <luiX_> pgib, but maybe you can be more expressive now in a.... smelly way ;)
[22:57:09] <luiX_> xDDD
[22:57:38] <cheeser> pgib: i dunno. nothing says "leave me alone" than a mexican gastric nuke.
[22:57:49] <evud> Hello. I wonder if running a program written in java 1.6.x could have problems in java 1.5.x? I google it but cannot find exact differences, anyone knows a site where I can do?
[22:57:58] <luiX_> xDDD
[22:58:00] <cheeser> evud: yes, it could have problems
[22:58:08] <pgib> haha yeah. or a sandwich with Scotch Bonnet peppers
[22:58:26] <ernimril> evud: java/6 had updates to the standard api, any calls to new methods/classes will crash on java/5
[22:58:34] <pgib> ~recipies
[22:58:35] <javabot> pgib, I have no idea what recipies is.
[22:58:40] <pgib> ~recipie
[22:58:40] <javabot> pgib, I have no idea what recipie is.
[22:58:52] <pgib> ~recipe
[22:58:52] <javabot> pgib, I have no idea what recipe is.
[22:58:59] <pgib> hmm.. where is the java cookbook?
[22:59:15] <cheeser> ~~ pgib google java cookbook
[22:59:15] <javabot> http://letmegooglethatforyou.com/?q=java+cookbook
[22:59:18] <evud> ernimril could I know what methos or classes these are.... ? You mean crash(exit)? Or could also an Exception been thrown?
[22:59:24] <luiX_> ~cookbook
[22:59:24] <javabot> luiX_, I have no idea what cookbook is.
[22:59:28] <luiX_> have never used this
[22:59:28] <luiX_> xD
[22:59:35] <nijm> Is anybody here familiar with JAXP?
[22:59:38] <blahjake> letmegooglethatforyou += 10
[22:59:55] <ernimril> evud: you can compare the api:s or look at the @since or ...
[22:59:55] <vinse> i sent a letmegooglethatforyou link to my mom, and she considered it extremely helpful
[23:00:03] <vinse> i think she uses it now in general instead of google
[23:00:08] <crowbar> Is there a way to change the background color of only the box portion of a jcheckbox?
[23:00:11] <ernimril> evud: the easy way is to just run your program on java/5 if you really must use java/5
[23:00:29] *** mistik1 has joined ##java
[23:00:30] *** Vantaa has quit IRC
[23:00:37] *** _acid__ has quit IRC
[23:00:49] *** Russell^^ has quit IRC
[23:01:10] *** Inhuman has quit IRC
[23:01:52] <evud> ernimril Well I created a chess game(GUI) for 2 players, I played it in my pc OK(java 1.6.x) but when tried to play it in another computer (javax 1.5.x) an Exception was thrown, i tried producing the bug again(by doing the same things, game had save/load operations) but worked just fine.
[23:02:11] <cheeser> you can't run 1.6 bytecode on a 1.5 vm
[23:02:26] <ernimril> evud: what exception?
[23:02:32] <mahogny> what did they change 1.5-1.6?
[23:03:20] *** juanez has joined ##java
[23:03:31] <evud> cheeser no. i compiled there again ernimril I don't remember the exception(unfortunately didn't save the exception message)
[23:03:38] <ernimril> mahogny: the class file version, bits of the api
[23:04:02] *** ScottG489 has joined ##java
[23:04:02] *** buntfalke has quit IRC
[23:04:05] <mahogny> hm. api I figured but I didn't know the bytecode changed
[23:04:10] <mahogny> (why else up the version?)
[23:04:32] *** rgravener has quit IRC
[23:04:38] *** waz has quit IRC
[23:04:39] *** Johnny_vd_Laar has joined ##java
[23:04:52] <blahjake> api-wise, for example String.isEmpty
[23:05:28] *** chris_abyi has quit IRC
[23:05:30] *** ScottG489 has quit IRC
[23:06:47] <evud> cheeser now I'm thinking it again, maybe the bytecode was 1.6 ... :S I will try to compile with 1.6 and run with 1.5 see if the bug comes out. thank you and also thanks ernimril ...
[23:07:20] *** ahughes has joined ##java
[23:08:01] *** durka42 has joined ##java
[23:08:35] <dmlloyd> my base classes are feeling fragile today
[23:08:38] *** evud has quit IRC
[23:08:48] *** rlubke has quit IRC
[23:09:09] *** convivial has quit IRC
[23:09:20] *** Vicfred has joined ##java
[23:09:26] *** ScottG489 has joined ##java
[23:09:32] *** jottinger has quit IRC
[23:10:23] *** SeicherlBoB has joined ##java
[23:11:24] <SeicherlBoB> how can i read the generic information of a Class object at runtime? Example: I have a Collection<String> Class Object and i need to get the information about the String. Any suggestions?
[23:12:54] *** [TechGuy] has quit IRC
[23:13:39] *** waz has joined ##java
[23:13:39] *** rawbk has joined ##java
[23:14:14] <juanez> SeicherlBoB: you cant
[23:14:28] *** thecarlhall has quit IRC
[23:14:29] <pgib> thanks cheeser, I'm new to this whole "Google" thing
[23:14:44] *** eduardopl has joined ##java
[23:14:51] <juanez> SeicherlBoB: genereics are compile-time only..
[23:14:58] <SeicherlBoB> juanez: well, that's ... too bad
[23:15:18] <SeicherlBoB> juanez: so i need to do it the other way round... thanks
[23:15:47] <AMcBain> Java does generics via type erasure ... that means there is no type information after it is compiled.
[23:15:50] *** drip has quit IRC
[23:16:04] *** DragonLord- has quit IRC
[23:16:26] *** sombriks has joined ##java
[23:16:31] *** Absolute0 has quit IRC
[23:16:39] <dmlloyd> junit.framework.AssertionFailedError: expected:<true> but was:<PEAR>
[23:16:43] <juanez> AMcBain: exactly. you said it much better :)
[23:16:44] <dmlloyd> oh well, what's a guy gonna do
[23:16:47] *** Absolute0 has joined ##java
[23:17:03] <adimit> wasn't java 7 supposed to introduce reified generics? Or did they get dropped?
[23:17:12] <dmlloyd> guess I'll change reality: enum Boolean { TRUE, FALSE, FILE_NOT_FOUND, PEAR }
[23:17:35] <juanez> i'd guess they were dropeed
[23:17:50] <adimit> dmlloyd: four-valued logic is a slippery slope. I've had my fair share of hairy hassle with three-valued logic already.
[23:18:08] *** jdolan_ has quit IRC
[23:18:11] <dmlloyd> enum Boolean { TRUE, FALSE, FILE_NOT_FOUND, PEAR, GIRAFFE }
[23:18:38] <juanez> true,false,null
[23:18:56] <pgib> I sure hope JSR-310 is healthy
[23:19:13] <adimit> juanez: too bad. I really think that the Java Generics system needs an overhaul. The code of classes like ArrayList is a bit ugly...
[23:19:28] <whaley> pgib: heh... I just checked out the code for that the other day to give it a gander
[23:19:28] <dmlloyd> ah, I see. Boolean is a regular serializable object in Java's world. And since I have enums implemented but not serializable objects, it poops
[23:19:38] <whaley> pgib: it looks very low volume over there
[23:19:39] <cheeser> poop!
[23:19:40] <dmlloyd> guess that means I need to get back to work on this
[23:19:44] <Simucal> I think you and the rest of the world thinks Java Generics needs a bit of an overhaul
[23:19:44] <cheeser> ~jsr 310
[23:19:45] <javabot> 'JSR 310: Date and Time API' can be found at http://www.jcp.org/en/jsr/detail?id=310
[23:19:51] <juanez> adimit: agreed
[23:19:55] <cheeser> pgib: he was asking for help a while back...
[23:19:56] <dmlloyd> I like java generics :(
[23:19:56] <pgib> I noticed. But it has so many big-name supporters
[23:20:03] <dmlloyd> they're not bad
[23:20:08] <SeicherlBoB> am I right that everything that can contain more than one object is either an array or a collection?
[23:20:15] <cheeser> SeicherlBoB: no
[23:20:20] <dmlloyd> hell no
[23:20:31] <pgib> cheeser, yeah, back in December, I remember hearing about that. That's what made me ask
[23:20:32] *** kab has joined ##java
[23:20:33] <adimit> dmlloyd: they're nice, of course. But they *could* use a bit of polish. T[] foo = new T[N]; would be splendid.
[23:20:34] <cheeser> a collection implements Collection
[23:20:42] *** Woflborg has quit IRC
[23:20:47] <AMcBain> dmlloyd: I agree, but I also think that it has some points that are a bit confusing for people just learning
[23:20:51] <dmlloyd> adimit, yeah, *some* kind of array integration would be good
[23:21:02] <cheeser> reification++
[23:21:04] <dmlloyd> for now I just live with using Object[] and doing casting
[23:21:18] <dmlloyd> ~javadoc Class.cast(*)
[23:21:19] <javabot> dmlloyd: http://is.gd/ipBB [java.lang.Class.cast(Object)]
[23:21:20] <adimit> which would make immutable lists feasible, and list/cons pairs.
[23:21:22] <dmlloyd> I like that mathod
[23:21:23] <SeicherlBoB> cheeser: so what else can contain more than one object (of the same type)
[23:21:23] <dmlloyd> method*
[23:21:25] <benJIman> adimit: Arrays? What are they?
[23:21:55] *** jottinger has joined ##java
[23:22:15] *** foo-nix has quit IRC
[23:22:29] *** morkar- has quit IRC
[23:22:58] *** foo-nix has joined ##java
[23:23:00] <adimit> dmlloyd: ah, nice, I didn't know about Class.cast(). In fact, I don't really know much about the Java reflection API at all... :-(
[23:23:12] *** rollins has quit IRC
[23:23:30] *** foo-nix has quit IRC
[23:24:33] <luiX_> byeee
[23:24:35] *** luiX_ has quit IRC
[23:25:00] <dmlloyd> Class.cast() only barely counts as reflection imo
[23:25:09] <AMcBain> adimit: some of us try to avoid using reflection (I do!)
[23:25:31] <AMcBain> It is inevitible that I will have to use it eventually, though.
[23:26:18] <adimit> AMcBain: yes, I do, too. I think a static type system should be there to enforce a good coding style and perform important compile-time logic/sanity checks. Using reflection a lot sort of spoils that.
[23:26:19] <dmlloyd> Object obj; Class<T> type; [...] type.cast(obj); is better than just doing (T) obj
[23:26:42] <juanez> is there a equiv. of "linq" being done for Java? officially that is, not 3rd party stuff
[23:26:46] <adimit> dmlloyd: how is it better?
[23:27:23] <dmlloyd> adimit: because it does the cast right then and there in the code - if you do a straight (T)obj cast, the cast is erased (no actual cast occurs there), so it's "unsafe"
[23:27:46] <dmlloyd> normally if a cast fails you get a CCE, but not so if you do a cast to an unbounded type parameter
[23:28:16] <adimit> dmlloyd: woo, thanks. I didn't know that. I have to use UIMA, where casting is, unfortunately, and important part of the game.
[23:28:16] <dmlloyd> I'm not sure whether a bounded one produces a cast or not, but even if it does it won't be an "all the way" cast, so clazz.cast() is still better
[23:28:34] *** BrokenClockwork has joined ##java
[23:28:49] *** Dr_Link is now known as all
[23:28:50] *** vesz has joined ##java
[23:28:52] * adimit dislikes casting a lot.
[23:28:56] *** all is now known as Dr_Link
[23:29:00] <BrokenClockwork> Hey fellows, is there a way to set Elicpse to a white on black background color scheme? or IntelliJ?
[23:29:04] <juanez> it is ugly :(
[23:29:16] <dmlloyd> BrokenClockwork: yes and yes
[23:29:17] *** Resistance has quit IRC
[23:29:21] <juanez> BrokenClockwork: maybe go ask in #eclipse
[23:29:26] <dmlloyd> I use IDEA with a light-on-dark scheme. I had to make it myself though
[23:29:28] <BrokenClockwork> okay, thank you
[23:29:33] <BrokenClockwork> :)
[23:29:33] <dmlloyd> ~~ BrokenClockwork idea faq
[23:29:34] <javabot> Yes, IDEA can do that.
[23:29:36] <dmlloyd> :)
[23:29:57] <dmlloyd> granted I made the color scheme back when I was using 4.5 or whatever it was like a zillion years ago
[23:30:08] <adimit> hehe. I heard a lot about IDEA, but currently I prefer using Eclipse and Eclim, so I can use Vim...
[23:30:51] *** TryNiX has quit IRC
[23:31:32] <juanez> gotta get me Eclim
[23:31:37] *** vix85 has quit IRC
[23:31:43] *** nihi|ist has quit IRC
[23:31:54] *** omaru has quit IRC
[23:31:58] *** nihi|ist has joined ##java
[23:32:08] <adimit> juanez: it's getting more and more mature. Even has formatting now, and several features I wouldn't know how to use properly in Eclipse :-)
[23:32:39] <adimit> and the newest version has an experimental function to embed GVim directly in Eclipse. VERY nice, but not 100% workable yet.
[23:32:41] <cheeser> seems to me most eclipse users just use it as a fancy text editor so that's not surprising
[23:32:43] <cheeser> 8^)=
[23:32:58] *** kriemhild has joined ##java
[23:33:17] <SeicherlBoB> cheeser: so what else can contain more than one object (of the same type) which is not an array and not a Collection implementation?
[23:33:43] *** codethief has quit IRC
[23:34:13] <adimit> actually *using* Eclipse is quite a PITA, I must admit. I find it increbidly overcomplicated. I'm a simpleton, so I need everything at my fingertips :-D
[23:34:25] <juanez> adimit; oh, mostly wanted to integrate it in eclipse...
[23:34:28] *** codethief has joined ##java
[23:34:39] *** Resistance has joined ##java
[23:35:04] <juanez> i think eclipse is awesome for Java dev, but vim for the bash/python/q work
[23:35:10] <cheeser> SeicherlBoB: whatever class you want to write
[23:35:18] *** LostMonarch has quit IRC
[23:35:19] <cheeser> HashMap, e.g.
[23:35:19] <dmlloyd> SeicherlBoB: Maps, Map.Entry implementations... whatever you can imagine
[23:35:48] <SeicherlBoB> cheeser: ok, excluding Maps and only standard java classes
[23:36:07] <dmlloyd> SeicherlBoB: why would that matter? are you doing a census or something?
[23:36:15] <dmlloyd> class census, organize by purpose!
[23:36:44] <adimit> If a class can hold n objects and is not using Collection or being a special purpose class, it's doing something wrong.
[23:36:46] <dmlloyd> class Foo<A, B, C> { A a; B b; C c; } <- look, a generic class that isn't a Collection
[23:36:51] <cheeser> adimit: wrong
[23:37:03] <adimit> cheeser: how so? (I'm here to learn :-)
[23:37:20] <dmlloyd> adimit: you should not make assertions like that. it's the opposite of learning - it's shutting out ideas.
[23:37:20] <SeicherlBoB> dmlloyd: checking sourcecode with reflect api. i need to know if a field is a kind of "collection" of objects
[23:37:22] <cheeser> adimit: broad pointless generalizations are almost always wrong.
[23:37:25] *** teralaser has joined ##java
[23:37:36] <cheeser> so I answered with another generalization.
[23:37:45] <adimit> dmlloyd, cheeser, OK, lesson learned.
[23:37:46] <dmlloyd> SeicherlBoB: you can't know. A field can be a primitive type, an array type, or a non-array object type
[23:37:58] <cheeser> dont' be so quick to condemn something without knowing why it is the way it is.
[23:38:18] <SeicherlBoB> dmlloyd: I can know (reflect api)
[23:38:53] <SeicherlBoB> dmlloyd: and acutally i'm not working on fields but on return values of getter functions.
[23:38:53] *** Copter has quit IRC
[23:39:18] <adimit> well, my idea was that, a special purpose class can amass objects for a special purpose, and thus avoid being a collection. But as soon as it's general purpose, it should implement collection, in order to accomodate standard behaviour, and just be easier to use.
[23:39:39] <dmlloyd> SeicherlBoB: no, you can't know. The reflection API isn't clairvoyant - it can't look at the *intent* of the type of the field.
[23:39:55] *** pandora-- has joined ##java
[23:40:17] <adimit> but maybe that's wrong. :-\
[23:40:58] <dmlloyd> when you try to box classes into categories like "container", you're building up a false illusion for yourself
[23:41:37] <dmlloyd> you'll just end up being confused in the end
[23:41:46] <SeicherlBoB> dmlloyd: as I'm working in a JPA environment, i can know. The getter is annotated, so i need the returnvalue of the getter function. now if that getter relates to a "collection" kind of type, it is meant to be for a e.g. 1:N relation and i need to know the generic type "in" the collection and the kind of collection beeing used.
[23:42:02] *** alek_b has joined ##java
[23:42:13] *** eduardopl has quit IRC
[23:42:20] <adimit> I thought that was what OOP was about? Thinking in patterns, and using them? (I'm currently reading Gamma et al. So I'm seeing patterns everywhere...)
[23:42:22] <Apocalisp> SeicherlBoB: public abstract class P2<A, B> { public abstract A _1(); public abstract B _2(); }
[23:42:27] <cheeser> SeicherlBoB: then check for @OneToMany or @ManyToMany
[23:42:30] *** piksel has quit IRC
[23:42:37] <dmlloyd> SeicherlBoB: then the definition of "collection" is what the JPA defines as one. At a guess it's probably arrays, Collections, and Maps, but you'll have to read the JPA spec to know for sure.
[23:44:20] <SeicherlBoB> .... ok. that was not my question anyways but ok. ...
[23:44:31] *** SeicherlBoB has quit IRC
[23:44:39] *** foo-nix has joined ##java
[23:44:43] <dmlloyd> adimit: no, not at all. learning from "patterns" books is learning the wrong way around, in my opinion. once you've developed a good sense of what you're doing, you might recognize "patterns", but you shouldn't try to write software that conforms to them just to have software that conforms to them.
[23:45:24] *** vezzoni has quit IRC
[23:46:15] *** timte has quit IRC
[23:46:37] <adimit> Yes, there's probably some truth to it. My focus has been on the logic/functional paradigms in the past, so I'm trying to find good ways to develop software in OOP-land...
[23:46:49] <vinse> adimit: but in way you are right: using some named pattern, whether appropriate or not, is what OOP is all about for a lot of people :/
[23:47:03] *** Vicfred has quit IRC
[23:47:10] <adimit> vinse: but it shouldn't be, if I understood correctly, eh?
[23:47:17] <blahjake> the road to hell is paved with factory-factories
[23:47:19] <blahjake> ;-)
[23:47:29] <adimit> well, that's what I get for reading blug-FUD.
[23:47:39] <adimit> *blog
[23:49:48] <sproingie> yah patterns should be "oh so that's what that's called", not "this is how they say i should do it"
[23:50:23] <sproingie> you could do worse than to learn something new with the Visitor pattern tho
[23:50:32] <sproingie> even if it is crippled multiple dispatch
[23:51:00] <ldamwork> sproingie, or more to the point, in documenation: "Here i designed it in the style of pattern X"
[23:51:23] *** mr_daniel has quit IRC
[23:51:30] <sproingie> ldamwork: although that's no guarantee of a deep understanding of pattern X
[23:52:07] <ldamwork> sproingie, true; but it tells your audience what you intended, which will leverage their understanding of your code
[23:52:43] *** blahjake has quit IRC
[23:52:49] <sproingie> the dirty raisin of patterns, yes
[23:52:55] <lami1984> dmlloyd: "adimit: because it does the cast right then and there in the code - if you do a straight (T)obj cast, the cast is erased (no actual cast occurs there), so it's "unsafe"" | I assume that for a generic <A> cast (A)someObject is useless because A is "converted" to java.lang.Object and someObject is already an object, what if we have a generic <T extends Type>, I assume that cast (T)object is performed (to java.lang.String), am I right? can yo
[23:52:55] <lami1984> u confirm that?
[23:53:03] * sproingie .oO ( raison detre plus some accents )
[23:53:05] *** t3mp3st has joined ##java
[23:53:15] <cheeser> ~~ lami1984 aolbonics
[23:53:16] <javabot> lami1984, 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:53:27] <cheeser> oh. never mind.
[23:53:27] <cheeser> 8^)=
[23:53:37] <lami1984> cheeser: double line ;P
[23:53:39] * cheeser goes back to hating beuracracy
[23:54:31] <t3mp3st> I need to determine whether an object of type Superclass is actually a particular type of subclass of superclass; is there an easy way to do this? Should I make a method overriden to take both Super and Sub and have behavior vary between each? Do I add some kind of method that returns a type enum?
[23:54:32] <dmlloyd> lami1984: I'm not sure whether that's the case - but even if it was, consider this. If you have <T extends Collection>, then you cast to (T), it's still not a full cast; T may actually be List or some subclass thereof, so it's really not much better.
[23:55:02] <dmlloyd> lami1984: only by using Class.cast() can you know to a 100% certainty that the object is correctly cast to the target type.
[23:55:14] <dmlloyd> ~~ t3mp3st instanceof
[23:55:15] <javabot> t3mp3st, instanceof is a way for checking if a given object is of a certain type. See http://mindprod.com/jgloss/instanceof.html for examples.
[23:55:34] *** Carnage\ has joined ##java
[23:55:47] *** ScottG489 has quit IRC
[23:55:51] <t3mp3st> dmlloyd: d'oh! thank you so much
[23:56:02] <lami1984> dmlloyd: I get the point, just wanted know if <T extends Type> -> Type get actually inside the bytecode (there is no need in case of pure T)
[23:56:03] <sproingie> if you have to know exactly what the subclass is, i'm going to ask Barbara Liskov to come over and smack you.
[23:56:25] <dmlloyd> lami1984: I'm not sure. I would think so, but I'm not 100% sure.
[23:56:41] <dmlloyd> lami1984: after all, if you have <T extends Collection>, and T foo; you can call foo.size() without a cast.
[23:56:45] <lami1984> dmlloyd: ok thanks, I'll check myself later
[23:57:19] <lami1984> dmlloyd: thats true, I'm always curios about such details
[23:57:29] *** Towny has joined ##java
[23:57:33] <dmlloyd> curiosity is good :)
[23:57:55] <Towny> Is there a way to convert a java.awt.Image to a byte[]?
[23:57:58] *** tomisina has joined ##java
[23:58:38] <lami1984> Towny: want to convert the whole object or the data?
[23:58:48] <Towny> the data
[23:59:15] <dmlloyd> can't you make a BufferedImage that wraps a byte[]? then maybe you could copy the image to it?
[23:59:26] <dmlloyd> ~javadoc Image
[23:59:26] <javabot> dmlloyd: http://is.gd/ipV1 [java.awt.Image], http://is.gd/ipV2 [org.apache.wicket.markup.html.image.Image]
[23:59:32] <BrokenClockwork> holy mother, there is really a Vim Plugin for Eclipse, this is awesome
[23:59:53] <adimit> BrokenClockwork: eclim.sf.net :-)
top

   February 4, 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 | >