| time |
nick |
message |
00:17 |
<dfas> |
which xml processing (read/write) lib is recommended for flexibility and ease? |
00:17 |
<dfas> |
dom4j? |
00:17 |
<joed> |
Look at xstream |
00:25 |
<cybereal> |
~~dfas sjsxp |
00:25 |
<javabot> |
dfas, I have no idea what sjsxp is. |
00:25 |
<cybereal> |
idiot bot |
00:25 |
<cybereal> |
~stax |
00:25 |
<javabot> |
StAX is the Streaming API for XML: see JSR 173 - http://www.jcp.org/en/jsr/detail?id=173 - there is an implementation available from Sun as part of jwsdp 1.5 and later. A StAX implementation is included in the JDK starting with JDK6 |
00:25 |
<cybereal> |
~sjsxp is <see>stax |
00:25 |
<javabot> |
Okay, cybereal. |
00:27 |
<cybereal> |
~no, stax is the Streaming API for XML: see ~jsr 173 and https://sjsxp.dev.java.net/ for Java 1.5 and earlier. Java 1.6 includes an implementation in the JDK. |
00:27 |
<javabot> |
Okay, cybereal. |
01:22 |
<hunterp> |
anyone have any idea why this stacktrace is happening? http://pastebin.com/m6ea5750c |
01:22 |
<Fanook> |
looks like you tried to call a method that doesn't exist |
01:23 |
<hunterp> |
im mashing together two applications. |
01:23 |
<hunterp> |
that worked before the mash |
01:23 |
<TimothyA> |
what's with all this mashing these days? |
01:23 |
<TimothyA> |
what happened to good old smashing? |
01:46 |
<pstickne> |
Mmm. Why is % not modulus? :( |
01:46 |
<Fanook> |
it is, as long as your number is non-negative |
01:46 |
<Fanook> |
% returns the signed remainder |
01:47 |
<cybereal> |
~javadoc Math |
01:47 |
<javabot> |
cybereal, please see java.lang.Math: http://java.sun.com/javase/6/docs/api/java/lang/Math.html |
01:47 |
<pstickne> |
how do I handle the negative case easily? |
01:47 |
<pstickne> |
I looked there, but didn't see anything blatantly useful. |
01:47 |
<Fanook> |
if(negative) {add N} |
01:47 |
<Fanook> |
for num % N |
01:48 |
<pstickne> |
what if it's negative by a huge amount? |
01:48 |
<cybereal> |
lmao |
01:48 |
<Fanook> |
..... |
01:48 |
<cybereal> |
hahahahah oh man that's hilarioius |
01:48 |
<pstickne> |
:( |
01:48 |
<pstickne> |
I fail. |
01:48 |
<Fanook> |
it can't be smaller than -(N-1) |
01:49 |
<cybereal> |
there's a java puzzler on this |
01:49 |
<pstickne> |
imagine: float f = -1233.123; float norm_angle = f % 360; // wrong, but intention |
01:50 |
<flippo> |
pstickne: ((n % m) + m) %m |
01:50 |
<Fanook> |
C conditioned me to never use % on floating point numbers :) |
01:51 |
<Fanook> |
flippo: i wonder how that compares to the check-and-add |
01:51 |
<cybereal> |
http://java.sun.com/javase/6/docs/api/java/lang/Math.html#IEEEremainder(double,%20double) |
01:52 |
<flippo> |
Fanook, it costs vastly more, more than you can afford, perhaps. |
01:53 |
<flippo> |
(Floats should use Math, yes.) |
01:53 |
<r0bby> |
r0bby looks around |
01:56 |
<r0bby> |
did I miss a party? |
01:56 |
<r0bby> |
(I see xjrn is opped) |
01:56 |
<cybereal> |
r0bby: no we waited for you |
01:57 |
<r0bby> |
oh, can I make it an epic fail party? |
01:57 |
<cybereal> |
didn't you already? |
01:57 |
<r0bby> |
Don't I always :> |
01:57 |
<cybereal> |
oh sorry you need to stop that though |
01:57 |
<cybereal> |
I mean I'm not really trying to be mean |
01:57 |
<cybereal> |
but it's like you keep holding up these "Please be mean to me" signs... |
01:58 |
<xjrn> |
r0bby: it was a glorious op moment. [15:44] =-= Mode ##java +b BUSH_FROM_HEAVEN!*@* by xjrn ; <xjrn> BUSH_FROM_HEAVEN: I do this purely on moral, religious, and visual grounds |
01:58 |
<r0bby> |
~xjrn++ |
01:58 |
<javabot> |
xjrn has a karma level of 7, r0bby |
01:58 |
<r0bby> |
damn my karma throttling code |
01:59 |
<r0bby> |
javabot xjrn++ |
01:59 |
<javabot> |
xjrn has a karma level of 8, r0bby |
01:59 |
<r0bby> |
:> |
01:59 |
<xjrn> |
r0bby: i want a factoid that says "let's all slam down lots of coffee and talk about web toolkits!" |
01:59 |
<r0bby> |
One thing I'm glad is that come next january, no more Dick and Bush in the white house |
02:00 |
<r0bby> |
I can make more crude jokes, but I won't |
02:01 |
<r0bby> |
~~xjrn be xjrn |
02:01 |
<javabot> |
xjrn, let's all slam down lots of coffee and talk about web toolkits! |
02:02 |
<r0bby> |
I seriously wanna write an operation to handle all of this so the factoid table doesn't get clogged |
02:02 |
<xjrn> |
factoid table gets double-plus-unemptied |
02:03 |
<r0bby> |
I think i'll do it now |
02:03 |
<r0bby> |
~source |
02:03 |
<javabot> |
you can find my source at https://fn-javabot.svn.sourceforge.net/svnroot/fn-javabot - a tutorial on how to set up the bot can be found at http://javachannel.net/wiki/pmwiki.php/FAQ/RunningJavabot |
02:04 |
<r0bby> |
r0bby pulls a clean tree |
02:04 |
<xjrn> |
orwell was a C programmer at heart |
02:04 |
<r0bby> |
heh? |
02:04 |
<cybereal> |
++!good |
02:04 |
<xjrn> |
you'd have to read 1984 to understand |
02:05 |
<cybereal> |
r0bby... you haven't read 1984? |
02:06 |
<r0bby> |
I |
02:06 |
<r0bby> |
ve been meaning to |
02:06 |
<xjrn> |
xjrn points and laughs |
02:06 |
<Fanook> |
Fanook shuns r0bby |
02:07 |
<cybereal> |
you really ... hm it will simultaneously amaze you and crush your hope for humanity |
02:07 |
<r0bby> |
I never did get hooked on fonics :P |
02:07 |
<svm_invictvs> |
... |
02:07 |
<r0bby> |
bad joke |
02:07 |
<svm_invictvs> |
lol |
02:07 |
<svm_invictvs> |
I lol'd |
02:08 |
<r0bby> |
you have to remember those lame commercials |
02:08 |
<svm_invictvs> |
I do |
02:08 |
<svm_invictvs> |
~facebook |
02:08 |
<javabot> |
svm_invictvs, I have no idea what facebook is. |
02:08 |
<svm_invictvs> |
Oh man |
02:08 |
<r0bby> |
1-800-ABCDEFG |
02:08 |
<svm_invictvs> |
Somebody needs to create a Freenode ##java facebook group! |
02:09 |
<r0bby> |
one exists |
02:09 |
<r0bby> |
but for efnet i think |
02:09 |
<xjrn> |
the only comercials worth remembering are the clapper and life alert and 'where's the beef!' |
02:10 |
<svm_invictvs> |
r0bby: eh? |
02:10 |
<svm_invictvs> |
Well, there needs to be Freenode ##java! |
02:10 |
<svm_invictvs> |
I made one for ##C++ |
02:10 |
<svm_invictvs> |
Freenode ##C++ |
02:10 |
<svm_invictvs> |
I bet cheeser would approve :-P |
02:11 |
<r0bby> |
not if i created it :P |
02:12 |
<r0bby> |
cute |
02:12 |
<r0bby> |
the maven repo for maven-ant-tasks is down |
02:13 |
<svm_invictvs> |
r0bby: I seriously doubt anybody would join. |
02:13 |
<svm_invictvs> |
heh |
02:13 |
<r0bby> |
yeh me too |
02:14 |
<r0bby> |
I cant figure out how to create a group (and I don't think i care too much; I lost interest in facebook) |
02:14 |
<cybereal> |
Do one on LinkedIN |
02:16 |
<r0bby> |
bah |
02:18 |
<r0bby> |
cute -> http://eugeneciurana.com/pastebin/pastebin.php?show=32797 |
02:21 |
<The_Birdman> |
r0bby, you came back to windows? :-) |
02:22 |
<cybereal> |
The_Birdman: r0bby is a huge vista fanboy |
02:22 |
<The_Birdman> |
~r0bby-- |
02:22 |
<javabot> |
r0bby has a karma level of 14, The_Birdman |
02:22 |
<The_Birdman> |
r0bby:how come your karma is still positive compared to before :-) ? |
02:24 |
<r0bby> |
reset, but pr3d is tanking it |
02:24 |
<r0bby> |
cybereal: I sure hope that was sarcasm |
02:27 |
<cybereal> |
r0bby: based on you still using it I'm not so sure |
02:29 |
<svm_invictvs> |
tanking? |
02:30 |
<cybereal> |
svm_invictvs: mmm not that kind of tanking |
02:32 |
<r0bby> |
cybereal: i'm using it because all hardware is supported under vista and I don't feel like fighting right now |
02:33 |
<cybereal> |
:) |
02:33 |
<cybereal> |
beginning to sound like why I switched to Mac |
02:34 |
<r0bby> |
cybereal: I got this laptop because it was pretty looking |
02:34 |
<r0bby> |
It's orange! |
02:35 |
<cybereal> |
hideous |
02:35 |
<r0bby> |
nonsense! ..my cell phone is also orange |
02:35 |
<cybereal> |
also hideous |
02:37 |
<r0bby> |
beauty in the eye of the beholder: translation: you're hideous |
02:37 |
<cybereal> |
But I am a golden god |
02:37 |
<r0bby> |
Of course, i'm the one who's single so... yeh :P |
02:38 |
<Fanook> |
but....beholders have many many eyes |
03:02 |
<GreySkyze> |
can anyone recommend a good, inexpensive, web host provider that provides jvm access, tomcat5/6, struts, and allows servlets, jsps, mysql/postgresql? |
03:04 |
<The_Birdman> |
GreySkyze:try google, but maybe myjavaserver.com, there should be some other cheap hosts |
03:12 |
<tty1> |
grrr |
03:12 |
<tty1> |
why must netbeans be so buggy! |
03:13 |
<tty1> |
every system, and every OS ive installed it on it always does the same buggy crap :( |
03:18 |
<cybereal> |
netbeans is crap |
03:18 |
<cybereal> |
take a little time to learn eclipse, or pay out for IDEA or just drop IDE's altogether, that's my suggestion list ;) |
03:18 |
<Fanook> |
trying to remember, can you make eclipse use Sun's compiler? |
03:22 |
<pstickne> |
IDEA is really nice -- now, when they have good Scala support ;-) |
03:22 |
<pstickne> |
tty1: the worst part is netbeans has really poor "backup" support ^^ |
03:23 |
<pstickne> |
tty1: which I find a shame (backups are friends. they turn an "omg, my last 30 minutes of work are gone!!!" into a "man, have to restart ... time for a coffee") |
03:24 |
<cybereal> |
Fanook: I don't know, but it's really just for the debugging phase, any sane use of an y ide is coupled with a standalone build process and tests... so I never really worry about that. Though I have come across at least two different compiler behavior differences between eclipse and sun. |
03:24 |
<joed> |
Fanook: you can. |
03:25 |
<cybereal> |
pstickne: backups? do you mean edit history or... actual backups like in the sense of backing up your files (which makes no sense mind you) |
03:25 |
<cybereal> |
hm I need some food. Zero effort. No wheat. pisser! |
03:27 |
<pstickne> |
cybereal: anything that can withstand a random crash. |
03:28 |
<pstickne> |
cybereal: that is, not lose data during an unexpected failure. not that integration with a history/RCS isn't nice. |
03:29 |
<joed> |
I suspect you crash a hell of a lot more often than I do... |
03:30 |
<cybereal> |
I've never had a crash that affected my files, though I do do backups |
03:30 |
<cybereal> |
my backsups have been useful in all human-error cases |
03:31 |
<cybereal> |
at any rate, eclipse has an editing history |
03:31 |
<cybereal> |
local history |
03:31 |
<cybereal> |
not sure how it works though |
03:32 |
<cybereal> |
and if you're waiting 30+ minutes to hit save I wonder about that... :) |
03:33 |
<CodeWar> |
PMD has a warning "turn final local variables into member fields". Now I m thinking the reason its final is because I believe the reference should not change once assigned and its local because nobody outside the local context should see it. Is there another side to this wisdom I m missing |
03:34 |
<cybereal> |
CodeWar: final implies a little more than that, perhaps the warning stems from there |
03:34 |
<cybereal> |
you could also just ignore PMD |
03:35 |
<CodeWar> |
Yes I want to but I want to understand what its saying first. Unfortunately its go no more information for this warning than that |
03:36 |
<CodeWar> |
!pastebin |
03:36 |
<CodeWar> |
!paste |
03:36 |
<Fanook> |
CodeWar: there isn't anything in their documentation either |
03:36 |
<Fanook> |
http://pmd.sourceforge.net/rules/controversial.html |
03:36 |
<The_Birdman> |
CodeWar, PMD is useful but you don't want to follow everything it suggests! :-) |
03:37 |
<CodeWar> |
what about FindBugs |
03:38 |
<The_Birdman> |
It's nice too but like I said before those tools are not to be followed blindly :-) |
03:38 |
<The_Birdman> |
Trust your own master time to time, ie you |
03:40 |
<The_Birdman> |
I wouldn't trust a Java dev which only relies on those tools to write good code :-) |
03:40 |
<CodeWar> |
"If you have only static methods in a class turn it into a Singleton" Now I m thinking I do have one such class and the reason I prefer all static to Singleton is less code. I dont need to create a instance creator make sure theres only one copy make the cons pvt. Is there something on the other side of the argument |
03:40 |
<cybereal> |
CodeWar: a class with all static methods and private static state *IS* a singleton |
03:41 |
<cybereal> |
CodeWar: java world is so full of people who can't see through the shit they buried themselves in |
03:41 |
<The_Birdman> |
hehe |
03:41 |
<joed> |
https://sourceforge.net/.../?func=detail&atid=479921&aid=2027626&group_id=56262 |
03:41 |
<amnesiac> |
cybereal, not if you never instanciate that class only one |
03:41 |
<amnesiac> |
cybereal, think of the class-enum pattern. |
03:42 |
<CodeWar> |
cybereal, I understand its a singleton is there reason one would prefer an explicit singleton over a static all class |
03:42 |
<amnesiac> |
cybereal, that's not a singleton at all, a single is a bit more than a static class with *static* state |
03:43 |
<cybereal> |
amnesiac: see you're a perfect example of a moron who is poisoned by years of java overengineering |
03:43 |
<cybereal> |
CodeWar: dogma |
03:44 |
<cybereal> |
CodeWar: or perhaps that constant fear of change which would require them to actually think really hard about whether something should actually be a singleton as using a static class kind of binds you to it |
03:44 |
<amnesiac> |
cybereal, sure. like a fucking singleton is a Java thing |
03:44 |
<The_Birdman> |
CodeWar, usually the methods in an all static share few to zero variables, if you share a lot of variables between all static methods you probably want the usual singleton(getInstance()) |
03:44 |
<cybereal> |
~~pstickne pm |
03:44 |
<javabot> |
pstickne, Use /msg to talk to Drone and javabot, but ask other users first. See: http://javachannel.net/wiki/pmwiki.php/FAQ/Pm |
03:44 |
<m0> |
Wow, since when did eclipse allow you to edit your code while in debug mode |
03:44 |
<pstickne> |
cybereal: aww :-/ |
03:44 |
<amnesiac> |
cybereal, wake up |
03:44 |
<cybereal> |
amnesiac: thinking it has to be a single *INSTANCE* is a bad java habit |
03:44 |
<amnesiac> |
cybereal, yes.. as you say... :) |
03:44 |
<cybereal> |
m0: since... always? |
03:44 |
<m0> |
For real? |
03:44 |
<cybereal> |
mmm as long as I've used it ;) |
03:44 |
<cybereal> |
at least 3 years |
03:44 |
<m0> |
Been using eclipse like 5 years, wow |
03:45 |
<m0> |
Thats sick |
03:45 |
<The_Birdman> |
Hello world style :p, m0 ? |
03:45 |
<m0> |
So happy :) |
03:45 |
<The_Birdman> |
The_Birdman hides |
03:45 |
<m0> |
Thats like innovative lool |
03:45 |
<m0> |
New way to code now |
03:49 |
<CodeWar> |
googling some more I found a monostate pattern. Instead of all static functions have non static functions but static data members. Seems the adv is that this can still be inherited from and all the work to make it a singleton is not involved either |
03:49 |
<TravisD> |
This may be an off topic question, but I think its more on-topic here than anywhere else. Is there a good, free, Swing GUI editor for eclipse (a visual one) |
03:49 |
<Fanook> |
that implies there's a good Swing gui editor at all |
03:50 |
<CodeWar> |
Jigloo seemed decent but then I switched to netbeans a while back |
03:50 |
<TravisD> |
thats true, it does, Fanook. Is there no such thing? |
03:51 |
<Fanook> |
if you understand how Swing works, there's no real need for a gui editor |
03:53 |
<TravisD> |
Fanook, I think the big difference is being able to look at it while you design. I am no design expert though, and I am not sure if this is true or not |
03:55 |
<Fanook> |
*shrug* I don't use gui editors because I hate the code they generate. I think it helps that visualization comes easy to me |
03:56 |
<TravisD> |
Fanook: Do you have any suggestions for figuring out swing? |
03:57 |
<The_Birdman> |
TravisD, there are books and swing tutorials, IDEs which have Swing designers too if you don't want to bother about it |
03:57 |
<Fanook> |
play around with it. learn how the standard layout managers work: Grid, Box, Flow, Group. Then look at TableLayout and FormLayout |
03:57 |
<r0bby> |
r0bby kicks The_Birdman |
03:57 |
<r0bby> |
dont tell him about that! |
03:58 |
<Fanook> |
if you want to learn pain, play with GridBag |
03:58 |
<TravisD> |
thanks |
03:58 |
<The_Birdman> |
The_Birdman dodges r0bby kick |
03:58 |
<TravisD> |
Why is GridBag pain? |
03:58 |
<r0bby> |
~gbl |
03:58 |
<javabot> |
r0bby, gridbaglayout is a very powerful layout manager that allows precise control of component resizing. Tutorial http://java.sun.com/docs/books/tutorial/uiswing/layout/gridbag.html. a great helper class to set the constraints can be found here: http://papernapkin.org/examples/GBConstraints.java |
03:58 |
<r0bby> |
tryit |
03:58 |
<r0bby> |
you'll see why |
03:58 |
<Fanook> |
TravisD: http://geekylittlepassages.blogspot.com/ |
03:59 |
<r0bby> |
is that you Fanook ? |
03:59 |
<Fanook> |
yeah |
03:59 |
<Fanook> |
which reminds me, I need to write up the next part |
04:01 |
<Fanook> |
the sad part is that I've already got the GroupLayout code written, I just haven't gotten around to doing the write-up |
04:02 |
<TravisD> |
Fanook, are you australian? |
04:02 |
<Fanook> |
no, but I am a fan of the BBC |
04:03 |
<TravisD> |
haha |
04:03 |
<r0bby> |
~gridbag |
04:03 |
<javabot> |
I guess the factoid 'gridbaglayout humor' might be appropriate: |
04:03 |
<javabot> |
r0bby, gridbaglayout humor is at: http://madbean.com/anim/totallygridbag |
04:03 |
<r0bby> |
see that TravisD |
04:04 |
<r0bby> |
I never watvhed that |
04:04 |
<r0bby> |
LMFAO |
04:04 |
<Junior> |
mornin` |
04:04 |
<TravisD> |
Why is it hard to understand? |
04:05 |
<r0bby> |
I totally hate using gridbag 100% why i prefer to cheat w/ BorderLayout |
04:05 |
<r0bby> |
TravisD: because it's not what you think |
04:07 |
<r0bby> |
Fanook: don't you DARE post about GroupLayout |
04:07 |
<TravisD> |
TravisD is on a mac, with only java 5 :( |
04:07 |
<r0bby> |
sucks for you :) |
04:07 |
<TravisD> |
haha |
04:07 |
<cybereal> |
dude get up to date |
04:07 |
<cybereal> |
cybereal pets his java 1.6 on his mac |
04:08 |
<TravisD> |
cybereal: explain me |
04:08 |
<Fanook> |
r0bby: I WILL post about GroupLayout, and you might even like it |
04:08 |
<Fanook> |
~soylatte |
04:08 |
<javabot> |
Fanook, soylatte is the port to OS X of the FreeBSD version of the OpenJDK, by Landon Fuller. It currently runs on OS X 10.4 and 10.5, but still requires that you start X11 in order to use swing. See: http://landonf.bikemonkey.org/static/soylatte/ |
04:08 |
<r0bby> |
oh baby I like it kinky like that |
04:08 |
<cybereal> |
i don't know you well enough to explain you |
04:08 |
<cybereal> |
and no I don't mean soylatte |
04:08 |
<Fanook> |
really... |
04:08 |
<Fanook> |
ADC? |
04:08 |
<cybereal> |
java 1.6 has been available on mac for months, if you have a current mac |
04:08 |
<cybereal> |
no, regular software update |
04:08 |
<Fanook> |
ah, right |
04:08 |
<cybereal> |
just have to have a 64 bit mac |
04:08 |
<r0bby> |
uhm Fanook |
04:09 |
<TravisD> |
cybereal: how can I check? |
04:09 |
<cybereal> |
which all currently sold macs are |
04:09 |
<cybereal> |
TravisD: it would show up in software update |
04:09 |
<cybereal> |
you probably don't have core 2 duo? |
04:09 |
<r0bby> |
Syntaxhighlighter escapes markup :P |
04:09 |
<r0bby> |
http://geekylittlepassages.blogspot.com/2008/08/gridbag-dude.html |
04:09 |
<r0bby> |
see your last code snippet |
04:09 |
<TravisD> |
cybereal: I bought a new macbook pro less than 4 months ago |
04:09 |
<Fanook> |
I should know that, I have a newish mac downstairs |
04:09 |
<cybereal> |
TravisD: then you probably already have java 1.6 |
04:09 |
<cybereal> |
TravisD: just know it's not set to the default |
04:09 |
<cybereal> |
the default remains 1.5 |
04:09 |
<TravisD> |
hmm |
04:10 |
<TravisD> |
how do I change it? |
04:10 |
<Fanook> |
r0bby: oops |
04:10 |
<TravisD> |
TravisD wonders if he should, or if he should maintain compatibility with older macs |
04:10 |
<cybereal> |
TravisD: depends on what you want to change, take a look in /Applications/Utilities/java there should be something to control it there |
04:10 |
<r0bby> |
the way I handled it is removed it from syntax highlighting :) |
04:11 |
<r0bby> |
and embedded it in <code> tag |
04:11 |
<TravisD> |
I'll be damned. 6 is in there. |
04:11 |
<r0bby> |
used it when i posted my initial BGGA post |
04:12 |
<cybereal> |
TravisD: the one that seems to actually affect non-applet apps it the list where you pick the order of which VM's should be used for JNLP (webstart) |
04:12 |
<cybereal> |
if I slid java 6 to the top, then in terminal java -version shows java 1.6, if I move 1.5 up there, terminal shows 1.5 |
04:12 |
<TravisD> |
cybereal: yeah, I drug it up to the top .Whats new in 1.6? |
04:12 |
<cybereal> |
uh |
04:12 |
<cybereal> |
~api |
04:12 |
<javabot> |
cybereal, api is http://java.sun.com/javase/6/docs/api/ |
04:12 |
<cybereal> |
go there, go up one level, and there is a link about what's new someplace |
04:13 |
<cybereal> |
just know that on mac, you still don't have java 1.6 for applets because safari is still 32 bit (it's still carbon based) |
04:13 |
<TravisD> |
cybereal: yeah :) I'm not a huge user of applets |
04:13 |
<cybereal> |
me either but it's worth noting |
04:13 |
<r0bby> |
good =) |
04:13 |
<cybereal> |
I wonder if iTunes and Safari will get ported to cocoa for snow leopard... |
04:13 |
<TravisD> |
hopefully. |
04:14 |
<TravisD> |
Ugh. So good to be using java again, haha. I spent the last 4 months working on a project for the University in C++ |
04:14 |
<cybereal> |
maybe apple will support the cocotron project for the Windows counterparts |
04:27 |
<TravisD> |
the tutorial at java.sun.com strongly suggests using a tool to create GUI's instead of hand coding them |
04:28 |
<cybereal> |
TravisD: despite the consensus here, I believe it's good to use a tool. just preferred if that tool isn't saving its work as source code, even if it eventually generates some from what you designed |
04:28 |
<TravisD> |
cybereal: Are there any XML-Swing kind of things? haha |
04:28 |
<TravisD> |
probably not eh? |
04:29 |
<cybereal> |
well I heard that matisse actually does save a more structured file as well as generating code, maybe confirm that? it seems to be the premier gui editor for swing tehse days |
04:30 |
<cybereal> |
though given javabeans existence, there's no really good reason one couldn't deserialize a gui out of an xml file |
04:30 |
<cybereal> |
you'd just have to know where to hook in events and bindings |
04:31 |
<TravisD> |
thoughts and feelings about the MiGLayout? |
04:36 |
<cybereal> |
never heard of it, I dont' do much gui work with java |
04:36 |
<cybereal> |
or anyr eally |
04:36 |
<TravisD> |
oh, I see, haha |
04:36 |
<TravisD> |
apparently it solves all layout issues, and is designed specifically for hand-coding them |
04:36 |
<TravisD> |
lol |
04:41 |
<vdv> |
hi all |
04:41 |
<TravisD> |
hi |
04:43 |
<vdv> |
Travis, or maybe anybody else.. who knows, is it possible to programmatically expand awt's Choice? |
04:44 |
<Archon> |
does an InterruptedException get thrown if another thread calls .interrupt() even if the thread is not in a blocking state? |
04:48 |
<cybereal> |
Archon: it will be thrown after it's not blocking anymore |
04:48 |
<cybereal> |
some blocking operations will honor the interrupt and stop |
04:49 |
<Archon> |
cybereal: ok. because i've got a thread that's supposed to be waiting on network input (ie. read()) |
04:49 |
<Archon> |
and the thread should be interrupted when the user wants to exit |
04:50 |
<cybereal> |
well make it daemon and it shouldn't matter |
04:54 |
<Archon> |
cybereal: ok, thanks |
05:07 |
<tty1> |
is there a way, in java, to determine the number of cpus/cores in the current system (so i can programatically determine the best thread pool size) |
05:08 |
<Archon> |
tty1: i think there's a method in System |
05:08 |
<cybereal> |
tty1: yes but just cores |
05:08 |
<cybereal> |
it'll return the count of cores |
05:08 |
<tty1> |
cybereal: cores are all i need |
05:08 |
<tty1> |
what call or class do i look at? |
05:09 |
<cybereal> |
read Archon ... |
05:09 |
<pstickne> |
tty1: it matters that much? |
05:10 |
<tty1> |
cybereal: i looked at System and saw no such method |
05:10 |
<tty1> |
pstickne: yup, it does |
05:10 |
<cybereal> |
~javadoc System |
05:10 |
<javabot> |
cybereal, please see java.lang.System: http://java.sun.com/javase/6/docs/api/java/lang/System.html |
05:10 |
<tty1> |
cybereal: again, looked at the System class javba docs, and not seeing it |
05:10 |
<pstickne> |
tty1: what kind of numbers/performance implications are observed from tweaking the thread pool size wrt core count? |
05:10 |
<cybereal> |
maybe it's in Runtime |
05:10 |
<Archon> |
cybereal: yeah or that |
05:11 |
<Archon> |
sorry |
05:11 |
<pstickne> |
tty1: just looking for some random ballpark :p |
05:11 |
<Archon> |
Runtime.getRuntime().availableProcessors() |
05:11 |
<tty1> |
Archon: thank you |
05:11 |
<tty1> |
pstickne: random ballpark of what? |
05:11 |
<tty1> |
oops |
05:11 |
<tty1> |
pstickne: missed one of your messages |
05:12 |
<tty1> |
pstickne: im noticing significant performance difference |
05:12 |
<cybereal> |
cybereal pasted http://pastie.textmate.org/private/arusxa3ihrgnbzjudvjjpa |
05:12 |
<cybereal> |
check that use of that method out ;) |
05:12 |
<tty1> |
pstickne: on my dual core machine i get a significant performance boost from using two threads in my thread pool rather than one |
05:12 |
<pstickne> |
tty1: any numbers? that's neat, I have no idea how this stuff really plays out in life :) |
05:12 |
<pstickne> |
tty1: on a single-core? |
05:12 |
<tty1> |
pstickne: not exact number, but its also highly application specific |
05:12 |
<cybereal> |
lmao well yes obviously 2 is going to be a big diff from one, but above that it becomes questionable, it varies by numerous variables |
05:12 |
<tty1> |
pstickne: two core, one cpu |
05:13 |
<pstickne> |
tty1: I mean two threads on two cores vs two threads on one core |
05:13 |
<tty1> |
cybereal: oh, of course :) but i do see a noticable decline when i run 10 as opposed to 3 |
05:13 |
<tty1> |
pstickne: you wont notice a HUGE difference there |
05:13 |
<tty1> |
but i see a noticable difference in 3 vs 10 |
05:13 |
<cybereal> |
depending on what you're doing you may still get a performance increase |
05:16 |
<tty1> |
pstickne: my problem wasnt with picking too many threads though its with picking too many |
05:17 |
<tty1> |
pstickne: even if i picked a seemingly high and sane number like 10, what if its run on a system with 4 or even 8 quad core cpus.... that wont cut it |
05:18 |
<pstickne> |
tty1: make it automatically determine the number of threads :) |
05:18 |
<pstickne> |
tty1: independent of cores :) |
05:19 |
<tty1> |
pstickne: that would require more coding than jsut relying on the number of CPUS :) |
05:19 |
<tty1> |
pstickne: down the line it may very well be dynamic based on performance |
05:19 |
<pstickne> |
tty1: right, it doesn't have to be dynamic, could use a `warmup' period |
05:19 |
<pstickne> |
although I think dynamically adaptive systems are cool |
05:20 |
<tty1> |
pstickne: there are many ways to better determine the number of threads, no doubt about that. but all of them are more of a coding error :) |
05:20 |
<pstickne> |
tty1: it doesn't seem terribly complex :) |
05:21 |
<pstickne> |
besides, you're 1/Mloc error rate, right? ;-) |
05:21 |
<tty1> |
pstickne: i never said it was insanely complex. but complex enough to not be worth my time for this particular app :) |
05:30 |
<tty1> |
any poor java coeders wanna make some quick cash helping me with a demo program (its relativly small considering it is just a demo of a PoC) |
05:31 |
<tty1> |
i have one frigin problem i cant figure out for days/weeks now |
05:31 |
<pstickne> |
tty1: still? what problem btw? (not that I'm volunteering ;-) |
05:32 |
<tty1> |
pstickne: its a program which does lossy image compression using a neural network, and the image isnt comming out as clear as it does when ive implemented the algorithm in c# (Which i have working just fine as a refrence) |
05:35 |
<tty1> |
pstickne: ive went over it so many times, and compared it to the C# stuff that i know it must be a small error, something like a one line fix |
05:35 |
<tty1> |
just cant frickign find it |
05:35 |
<tty1> |
and its killing me |
05:36 |
<pstickne> |
tty1: aww :( about the time you hit "neural network" I had a temporary memory of AI (CS440) last year ;-) |
05:36 |
<pstickne> |
and that made me think of SOAR, which makes my head hurt |
05:37 |
<pstickne> |
tty1: using types with the same precision, right? |
05:37 |
<tty1> |
pstickne: the neural net stuff is pretty simple actually, just a simple multilayer perceptron (Well technically the activation function isnt a perceptron, its a Sin or tanh activator) |
05:37 |
<tty1> |
pstickne: well there is some conversion between byte to double (between -1 and 1).. so no.. but i should be normalizing the values properly (all tests seem to indicate thats the case) |
05:38 |
<tty1> |
of course at this point im willing to accept that anything could be to blame |
05:39 |
<pstickne> |
If I don't have to sign an NDA I may look at it if I get bored -with no guarantee of any feedback, useful or not ;-) |
05:39 |
<tty1> |
pstickne: no nda required, and no garuntees required, in fact its open source :) |
05:40 |
<pstickne> |
posty posty posty |
05:40 |
<tty1> |
pstickne: svn://svn.syncleus.com/dANN |
05:41 |
<tty1> |
pstickne: the current version on my HDD uses multiple cpu's/core's to speed it up.. but not the latest one in the svn... since my code is mostly debugging printouts i dont want to check it in till i clean it up a bit |
05:41 |
<pstickne> |
what does dANN stand for/do? |
05:42 |
<tty1> |
pstickne: Dynamic Artificial Neural Network. It is just a ANN library |
05:42 |
<tty1> |
pstickne: it is intended, over time to contain standard algorithms as well as new R&D stuff from me and my company. But most of all the really cool stuff hasnt been moved from closed to open source just yet... so right now its pretty basic |
05:44 |
<tty1> |
pstickne: this particular problem/app is just a demo, part of a series of example demos on how to use the library and some things it can do.. this one being a simple lossy image compression using an ANN |
05:47 |
<tty1> |
pstickne: im more than happy to step you through getting it compiled and runnigna nd pointing you at the various points of intrest in the code if youd like |
05:47 |
<pstickne> |
still downloading |
05:47 |
<pstickne> |
what's the C code for? |
05:47 |
<tty1> |
pstickne: not used here |
05:48 |
<tty1> |
pstickne: the library has a C varient, C#, and java, as well as a JNI layer over the C varient (which is seperate from the native java implementation) |
05:48 |
<tty1> |
this particular issue uses the native java version of the library |
05:49 |
<pstickne> |
so it works in the C# and C and C/JNI versions? |
05:51 |
<tty1> |
pstickne: the library itself has been tested with a XOR for all the libraries including the native java one and works.. however this particular image compression demo has only been tested and working in C#, the java version of the demo is what were working on now, C++ and jni do not have this demo, yet |
05:54 |
<tty1> |
need me to step you throught he various parts of the code? or help getting it compiled? |
05:58 |
<pstickne> |
oh, noes, I have to setup ant |
05:59 |
<tty1> |
every proper java dev space needs ant :) |
05:59 |
<pstickne> |
it's a pita to setup and use. I hate how it's distributed. |
05:59 |
<pstickne> |
c'mon, no make? |
05:59 |
<tty1> |
lol linux guy huh? |
05:59 |
<pstickne> |
I do enjoy a good console, yes ^^ |
05:59 |
<tty1> |
on windows its just a quick install, but i hate windows for so many other reasons |
06:00 |
<tty1> |
pstickne: how many cores you have? |
06:01 |
<pstickne> |
ahh, apt-get install ant. this looks to be much easier |
06:01 |
<tty1> |
:) |
06:01 |
<tty1> |
debian or ubuntu fan i take it? |
06:02 |
<pstickne> |
aww, no run target? |
06:02 |
<tty1> |
sure there is |
06:02 |
<tty1> |
what are you working with? |
06:02 |
<pstickne> |
debian -- sure, it's a "step behind" in packages, but it's the parent and, dammit, it doesn't try to pretend it's windows |
06:02 |
<tty1> |
java_dann doesnt have one, its just the library |
06:02 |
<tty1> |
but java_dann_examples does |
06:03 |
<tty1> |
first compile java_dann, then compile java_dann_examples, then issue the run target in examples |
06:03 |
<tty1> |
assuming we dont have a dependency issue it should work (or memory issue as with some more conservative systems |
06:03 |
<tty1> |
both of which are easily fixed |
06:03 |
<pstickne> |
ah, okay, so how do I generate this image do-dah? |
06:03 |
<tty1> |
pstickne: the broken java one or the workign c# one? |
06:04 |
<tty1> |
for the java one run from ant, you should get a menu of choices ont he console, choose g, this should pop up a swing gui window |
06:04 |
<tty1> |
then click on the ... buttons |
06:04 |
<tty1> |
for the trainign dir pick any directory with one or more png files |
06:04 |
<pstickne> |
tty1: ooh, tried Y (the 3D is borken) |
06:04 |
<tty1> |
and for the sample pick any png file |
06:04 |
<tty1> |
then click train, then wait, then process |
06:04 |
<tty1> |
pstickne: if you go with y you need to install java3d |
06:05 |
<tty1> |
but Y is the onlye xample that uses that |
06:05 |
<pstickne> |
ahh, image files ... short of those (goes to `find` in /usr/share) |
06:05 |
<tty1> |
pstickne: i can e-0mail you some |
06:06 |
<tty1> |
as well as the output from the C# version so you know what kinda quality it should get |
06:06 |
<joed> |
are you making opensores babies? |
06:06 |
<tty1> |
'huh? |
06:06 |
<pstickne> |
joed: the blisters haven't popped yet ;-) |
06:07 |
<joed> |
This channel is logged, so you might want to PM. |
06:07 |
<tty1> |
pstickne: images sent 3 original, and 3 output from c# |
06:08 |
<joed> |
tty1: Btw, I'm happy to say I left Philly :) |
06:08 |
<tty1> |
joed: where did ya go? |
06:08 |
<joed> |
tty1: Denver. |
06:08 |
<tty1> |
id take philly over denver any day :) |
06:09 |
<joed> |
See that is where we differ, wife hated it. |
06:09 |
<tty1> |
joed: i do prefer nature, but the people in philly are the best |
06:09 |
<pstickne> |
tty1: boo, the open dialog is kabroken (no files listed) |
06:09 |
<joed> |
I'd argue that long time... |
06:10 |
<tty1> |
pstickne: thats cause your selecting a directory not a file |
06:10 |
<joed> |
I spent a long time downtown corp Philly though. |
06:10 |
<pstickne> |
tty1: ohh |
06:10 |
<tty1> |
joed: south philly is the place to be socially |
06:10 |
<tty1> |
joed: for training anyway |
06:10 |
<pstickne> |
uhm, how long does training take? :( |
06:10 |
<tty1> |
err pstickne ^ |
06:10 |
<joed> |
We lived in suburbia, close to Wilmington. |
06:11 |
<tty1> |
pstickne: for 1000 cycles, few seconds |
06:11 |
<pstickne> |
Ahh, if there isn't an exception :) |
06:11 |
<tty1> |
pstickne: takes 50,000 to see results similar to the c# image on c# though |
06:11 |
<tty1> |
uh oh |
06:11 |
<tty1> |
what sort of exception? |
06:11 |
<pstickne> |
"Danger will robinson, Danger" |
06:11 |
<pstickne> |
heh |
06:12 |
<tty1> |
LOL :) |
06:12 |
<tty1> |
i love that :) |
06:12 |
<tty1> |
pstickne: especially considering its AI, i thought that to be particularly cute :) |
06:12 |
<pstickne> |
gah, could have at least picked a better looking girl, that picture is depressing |
06:13 |
<pstickne> |
(or rather, just in better shape) |
06:13 |
<tty1> |
pstickne: those 3 images were jsut the first 3 results ic ould get from google when searching for decent png images :) |
06:13 |
<tty1> |
pstickne: i was looking for trainign images without too much area of constant color |
06:14 |
<tty1> |
to give it a better training set for such a small number of images |
06:14 |
<pstickne> |
are all those training images or image-images? |
06:14 |
<tty1> |
use jsut the IN* images as training images |
06:14 |
<tty1> |
all 3 |
06:14 |
<tty1> |
then pick any of the three as the sample |
06:16 |
<pstickne> |
hmm, I take it the output shouldn't look monochromatic |
06:16 |
<tty1> |
yes |
06:16 |
<tty1> |
its a monochromatic representation of the blue channel |
06:16 |
<pstickne> |
reminds me of islands in and old game... |
06:16 |
<tty1> |
to be exact |
06:16 |
<tty1> |
the c# version processes it as 3 seperate b&W channels for each color than recombines |
06:17 |
<tty1> |
for now im working with just one channel, i will add the other 2 once the image is clear and its working |
06:17 |
<pstickne> |
how do I view the output? |
06:17 |
<tty1> |
what do you mean, i thought you can see a monochromatic image? that is the output |
06:18 |
<tty1> |
its just highly distorted, much more than it should be |
06:18 |
<pstickne> |
right, but it doesn't say much |
06:18 |
<tty1> |
what do you want it to say? |
06:18 |
<pstickne> |
(as in, it could spit out anything and I'd go, "uhh, huh") |
06:18 |
<tty1> |
the only useful information i could add is an error between output and input |
06:19 |
<pstickne> |
no output image? |
06:19 |
<tty1> |
but you can visually see that the error is too high at this point |
06:19 |
<tty1> |
pstickne: there is an output image, its just displayed |
06:19 |
<tty1> |
should be when you click process |
06:19 |
<pstickne> |
(if I had a reference) |
06:19 |
<tty1> |
below the original |
06:19 |
<tty1> |
pstickne: i sent you a reference |
06:19 |
<tty1> |
the e-mail had 6 images, in and out |
06:19 |
<pstickne> |
the picture displayed is gray-scale ^^ |
06:20 |
<tty1> |
right |
06:20 |
<tty1> |
but the quality should be similar to the c# quality |
06:20 |
<pstickne> |
all the images you sent were color... |
06:20 |
<tty1> |
just in greyscale |
06:20 |
<joed> |
Guys, take it to a pm. |
06:20 |
<pstickne> |
oh, heck, then it's not even close |
06:20 |
<tty1> |
joed: why this is java |
06:20 |
<tty1> |
pstickne: yup, not even close |
06:20 |
<tty1> |
pstickne: there in lies the problem |
06:20 |
<joed> |
No it is not, it is you pimping your company. |
06:21 |
<tty1> |
joed: actually its an open source java app |
06:21 |
<joed> |
Please don't argue. |
06:21 |
<tty1> |
joed: no one complains about talking about apache |
06:21 |
<tty1> |
or tomcat |
06:21 |
<joed> |
We seldom do and tomcat sucks. |
06:22 |
<joed> |
Right now you are providing install instructions. |
06:22 |
<tty1> |
joed: ill go in pm if your an op (or any op asks me) very happily (are you, if so im sorry to have continued)... but unless that happens, considering as this is help with a java bug, id prefer to keep it in here. |
06:22 |
<joed> |
Which is all fine and dandy, just move it off channel? |
06:22 |
<pstickne> |
so, uhm, how's the weather? |
06:23 |
<tty1> |
joed: like i said, im sorry to have continued then. |
06:23 |
<joed> |
Can you please move this to a pm? |
06:23 |
<tty1> |
joed: of course. |
06:23 |
<joed> |
Thanks bud! |
06:23 |
<tty1> |
joed: my pleasure |
06:23 |
<tty1> |
pstickne: well may i pm you then? |
06:24 |
|