greptilian logo

IRC log for #javaee, 2013-08-02

Please see http://irclog.greptilian.com/javaee for which days have been logged.

| Channels | #javaee index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
00:00 SoniEx2 bbl...
00:03 whartung that's funny SoniEx2
00:03 sfisque that method is so full of awesomesauce, it hurts
00:03 whartung yea
00:10 cavemanlg joined ##javaee
00:25 SoniEx2 also it won't work...
00:25 SoniEx2 and back
00:25 ibaca joined ##javaee
00:28 caverdude joined ##javaee
00:30 cavemanlg joined ##javaee
00:46 ibaca joined ##javaee
01:06 SoniEx2 how do I do little endian floats? (or just throw an exception?)
01:09 sfisque http://en.wikipedia.org/wiki/IEEE_754http://www.scism.lsbu.ac.uk/jfl/Appa/appa2.html
01:09 sfisque bah
01:09 sfisque that's supposed to be two different links
01:10 sfisque http://en.wikipedia.org/wiki/IEEE_754http://www.scism.lsbu.ac.uk/jfl/Appa/appa2.html
01:10 SoniEx2 wait let me check something...
01:10 sfisque java FPA is ieee 754 compliant
01:19 sfisque oh wow, learned something new.   keyword "strictfp"
01:19 sfisque http://en.wikipedia.org/wiki/Strictfp
01:19 sfisque part of the jvm since 1.2?  astonishing!
01:33 SoniEx2 if I have x=0xF0 and y=0x0F, would x|y be faster than x+y?
01:34 sfisque negative.   modulo is one of the slowest operations a processor can do
01:35 sfisque division is worse
01:35 sfisque or are you talking about bitwise or/and?
01:36 sfisque that would be faster
01:36 SoniEx2 bitwise or and add
01:36 sfisque that would be faster
01:36 SoniEx2 so x|y is faster than x+y?
01:36 sfisque yes but lossy
01:36 SoniEx2 for x = 0xF0 and y = 0x0F
01:37 sfisque for that, no loss, and it would be fine
01:37 sfisque just have to make sure you don't lose any carry bits
01:37 SoniEx2 yeah so Java's DataInputStream sucks :P
01:44 caverdude joined ##javaee
01:49 SoniEx2 this is how you make javadocs: http://imgur.com/BIxTo1f
02:02 cavemanlg joined ##javaee
02:16 caverman joined ##javaee
02:19 caverdude joined ##javaee
02:20 SoniEx2|2 joined ##javaee
02:28 SoniEx2 I would like help writing an IRCd
02:28 SoniEx2 with chanmode +x
02:28 SoniEx2 or +X... something like that
02:29 grug SoniEx2: do you have a specific question?
02:29 SoniEx2 idk how to make an IRCd
02:32 caverdude joined ##javaee
02:33 grug it sounds like you should probably do some research on the irc protocol
02:33 grug http://www.irchelp.org/irchelp/rfc/rfc.html
02:33 grug there's the RFC - go nuts!
02:34 SoniEx2 I tried making an IRCd once, and following the RFC
02:34 SoniEx2 I get stuck on channels and users
02:37 grug ok, do you have a specific question about anything? if not, it sounds like you need to go back and work out what you do and don't know
02:37 SoniEx2 I'm rewriting some stuff right now...
02:37 grug mmk
02:38 grug so do you have a specific question?
02:40 SoniEx2 not really...
02:40 sfisque it's all good.  we promote "thinking out loud" in here :-D
02:42 * pdurbin wants to be alone with his thought
02:45 grug SoniEx2: it's just difficult to help if there isn't really a question :P unless you didn't have a question, in which case that's fine :P
02:45 SoniEx2 my question is more like "would you help me with the whole project?"
02:46 grug my answer is yes, if you're willing to pay contractor rates
02:46 grug if you have a specific question then i can lend you my eyes for 5 mins
02:48 SoniEx2 for help with an open-source GPLv3 project? I'm sorry but no
02:50 grug mmk well i wish you good luck on your project :)
02:51 grug i wish you good luck in finding strangers on the internet to contribute to your revolutionary project
02:57 grug :)
02:58 SoniEx2 you're mean
02:58 SoniEx2 :P
02:59 grug i've only wished you well, and it's not very fair to expect "help" if you can't ask a question
03:05 SoniEx2 I'm just kidding you're not mean :P
03:06 grug do you have any code written for this project available on github?
03:07 SoniEx2 not really
03:07 SoniEx2 there isn't any code actually
03:15 sfisque soniex2 - there is a sourceforge project for a java ircd - maybe take a look at that and contribute rather than building "yet another"?  -- j-ircd.sourceforge.net
03:16 SoniEx2 ok add /mode #channel +x [a:something;b:something;c:something;...;] to it
03:17 SoniEx2 yes that's my idea
03:17 sfisque says it's fully rfc-1459 compliant.  though last update on page is 2006 so project is probably stale
03:18 sfisque oh wow, has irc servlet container and jmx support
03:18 SoniEx2 I don't think +x would conflict with the RFC
03:19 SoniEx2 if so then it could be +X instead
03:19 sfisque well, lets take a look
03:21 sfisque x is not part of the original spec of modes.  now we look at the alter rfc revisions
03:22 cavemanlg joined ##javaee
03:22 sfisque updated by 2810, 2811, 2812, 2813 (wow someone was a busy beaver)
03:26 SoniEx2 does the RFC say "no extra modes"?
03:26 sfisque generally rfc's won't specify things like that.  they generally indicate "minimal functionality"
03:27 SoniEx2 so there's nothing wrong with adding chanmode +x
03:28 sfisque nothing at all.. it would seem from 2812 ->  The available modes are as follows:
03:28 sfisque a - user is flagged as away;
03:28 sfisque i - marks a users as invisible;
03:28 sfisque w - user receives wallops;
03:28 sfisque r - restricted user connection;
03:28 sfisque o - operator flag;
03:28 sfisque O - local operator flag;
03:28 sfisque s - marks a user for receipt of server notices.
03:28 sfisque Additional modes may be available later on.
03:31 sfisque so it looks like +/-x is open for expansion :-)
03:31 sfisque 2813 makes no mention of any "new" user modes, so i think you're safe implementing an "x" mode
03:33 caverdude joined ##javaee
03:35 kobian joined ##javaee
03:35 ericwei_ joined ##javaee
03:37 SoniEx2 sfisque: I'm talking about channel modes
03:37 ericwei_ left ##javaee
03:42 sfisque aye i think you're still safe, i did not see a +/-x in channel modes either
03:45 SoniEx2 so that's 52 new channel modes available
03:45 SoniEx2 (52 = 26*2)
03:48 kobain_ joined ##javaee
03:48 cavemanlg joined ##javaee
04:25 SoniEx2 ok I need someone to tell me why this doesn't work: https://github.com/SoniEx2/NBX-API
04:42 grug SoniEx2: think about what you've just asked. you've linked a project and said "it doesn't work" - are you able to provide an error message of some description, and maybe describe the environment in which you are executing the code
04:43 SoniEx2 there's no error
04:44 grug mmk well then think even harder about how you can aid us in helping you
04:44 SoniEx2 but it sets all the layer names and volumes to the default ("null" and 100%)
04:44 grug can you provide a self contained test case for us?
04:47 SoniEx2 http://pastebin.com/xDRjbA3g
04:48 SoniEx2 use this as TTFAF.nbs: http://www.host-a.net/u/nick530/DragonForce_Through-the-Fire-and-Flames.nbs
04:50 SoniEx2 ok now this makes no sense: http://imgur.com/yE5Cq8g
04:51 grug that most certainly makes sense :P
04:51 grug youre accessing an array index that is out of bounds
04:51 grug fire up a debugger and youll quickly see why that is happening
04:51 SoniEx2 "resize(x)"
04:51 SoniEx2 it worked fine until I started moving the stuff around
04:55 SoniEx2 anyway I g2g... :/
05:20 SoniEx2|2 joined ##javaee
05:24 caverdude joined ##javaee
05:31 cavemanlg joined ##javaee
05:42 caverman joined ##javaee
05:47 cavemanlg joined ##javaee
08:58 whartung joined ##javaee
09:17 Quest joined ##javaee
13:19 Naros joined ##javaee
13:44 pallu joined ##javaee
13:44 pallu hello
13:46 Quest pallu,  hi
13:47 pallu left ##javaee
13:49 Naros hehe, hello & buh bye
13:49 Quest :)
13:49 Quest Naros,  how are you
13:49 Naros i'm good and yourself?
13:49 Quest Naros,  I am having pretty good time with spring and spring sec. well its set up but hey. its spring and once you dive in. you want more. and you breath less
13:50 Quest Naros, Iam fine :)
13:50 Quest where should the messages file (for internationalization ) be put and images/ css/ script files be put in an mvc application?
13:50 Quest I mean whats the good practices
13:54 Naros I've seen varying approaches.
13:54 Quest whats yours
13:55 Naros Well, in a struts2 world, i18n stuff is a bit different.  Generally, they go in
13:55 Naros src/main/resources/<package folder>/<struts2actionname>.properties
13:55 Naros But one can override that and specify global i18n files like other frameworks
13:55 Naros In which case I typically put them in src/main/resources
13:56 Naros which translates to WEB-INF/classes during the build process.
13:57 Naros As for images/css/static stuff
13:58 Quest cant i just put images/ scripts in web-inf/views/jsps/images             and  scripts in web-inf/views/jsps/scripts    of scripts
13:58 Naros generally that goes under src/main/webapp/static or whatever directory structure you want.
13:58 Quest and  scripts in web-inf/messages.properties        for messages.
13:58 Naros No public content should never be put in WEB-INF because you can't serve it back to the clients
13:59 Naros src/main/webapp/images or src/main/webapp/static/images
13:59 sfisque depends.  if you want to force them through the servlet conduits, you don't want stuff at the root of the war
13:59 Naros I generally prefer the static approach with sub directories for images, css, js, etc.
13:59 sfisque aka, prevent "directory surfing"
14:00 Naros Aye, but that implies he sets up filters so that .js, .png, .gif, etc are all served back through some servlet filter.
14:00 Naros which I disagree with for that sorta stuff
14:00 Quest hm
14:01 Naros In particular, it often introduces bad habits in .JS files as I've seen developers put struts tags, etc inside .JS files and have the struts filter wire in stuff that really is bad habits
14:02 sfisque the overhead isnt that much for simple pass through.  those resources are already going through the servlet engine anyway (it has to serve them up to whatever proxy is fronting the container)
14:02 sfisque and most frameworks have a "default" servlet for that purposes
14:03 pallu joined ##javaee
14:03 sfisque if those bits are "that static" (aka glacial) they could be moved out of the war and put onto a centralized consumption endpoint
14:03 Quest rephrase: i meant , cant i just put images, scripts in webapps/web-inf/views/jsps/images             and  scripts in webapp/web-inf/views/jsps/scripts  and        messages in      webapps/web-inf/messages.properties
14:04 Naros I prefer message.properties in src/main/resources
14:04 Naros I prefer all .properties in my classes directory at the top of my classpath.
14:04 Quest hm. why put in resource dir?
14:04 sfisque you "can" put them anywhere in the war.  whether they are "trivially" accessible is a different matter
14:05 Naros WEB-INF/classes is naturally in your classpath for your app.
14:06 sfisque general practice though is if they need to be protected, somewhere in web-inf works fine.  if it needs to be on your classpath (as naros points out) web-inf/classes and web-inf/lib work nicely
14:07 sfisque if the artifacts are "public" access, you can distribute them at the root of your war or in subdirs rooted there.
14:07 Naros But you can put images/scripts under WEB-INF, but I wouldn't put them under JSPs.  Images may also be used for things such as PDFs or other non-JSP rendered content depending on the application.
14:07 Quest I woudlnt want the properties file to be access to public. and would like the servlets only accesing the images
14:08 Naros WEB-INF/views/images | WEB-INF/views/js | WEB-INF/classes/messages.properties
14:08 Naros that would be my preference
14:08 Quest ok
14:09 Naros But there is an advantage of deploying static content separately
14:09 Naros You could put js / images / css on an apache httpd server and allow the servlet container to handle the servlet only aspects of the app.
14:10 Naros reduces the load on the servlet container for static content
14:10 Naros if it is truly public static content
14:12 Quest I wanted a way that in future if i want to change paths and file locations, i dont have to refactor all the jsps or .java classesI woudlnt want the properties file to be access to public. and would like the servlets only accesing the images
14:13 Quest i18n is a way to reach /resources or anything in /classes ? by a jsp?
14:13 Naros in struts world we have a TextProvider and a s:text tag to handle that stuff.  idk about spring-mvc.
14:13 sfisque it has similar mechs
14:14 Naros I don't understand how refactoring jsps affects images.
14:14 sfisque if he's using relative paths, and the path structure changes
14:15 Naros Aye, but how often do image paths change if the images are stored outside whatever structure the jsps use?
14:15 sfisque or similarly for explicit paths also but that's more easily sovled with a tool
14:15 sfisque i think he was talking about when they're stored internal
14:15 Naros Aye, Search-And-Replace :P
14:16 Quest Naros,  if i change images dir path. all jsps pointing to that previous path would have to be changed
14:16 sfisque unless you use a #{var}
14:16 sfisque to point to where the images are located
14:16 sfisque then you change it once
14:16 sfisque or a couple times if you have "n" referneces to subdirs , etc.
14:16 Quest sfisque,  exactly
14:17 Naros Aye just jsp include a parameter file at the top of your jsps
14:17 Quest that was my plan. to use  <spring:message code="paths.imagedir"/>
14:18 Naros We had some similar needs beyond just JSP paths so we have a table in the DB for each instance that has some configurable parameters that the context loads during startup.  When we change attributes in this table, an event fires that reloads the context params on the fly.
14:18 sfisque meh, don't use i18n to do heavy lifting.  it's for internationalization, not variable storage
14:19 Quest sfisque,  hm. but advantage can be taken out of its approach. anyways. what do you suggest. I want all to be generic and easy to refactor
14:19 Quest Naros,  ^
14:20 sfisque spring (and any other web framework) has a very simple mech for expanding a variable in context.  #{} (or ${} for legacy frameworks)
14:20 Quest hm
14:20 Quest Naros,  what did you meant by  include a parameter file at the top of your jsps
14:25 Naros You create a JSP that defines some page context values
14:25 Naros such as what your path is to your images
14:25 Naros You include that jsp inside all your others so if those parameters need to change, you change 1 JSP and all the others will behave right
14:26 Naros in the struts world I can do <s:include value="/WEB-INF/view/global-parameters.jsp" />
14:26 Naros it basically takes that JSP content and puts it where the include tag is
14:26 Naros I think JSP has <jsp:include /> or something
14:27 Quest oh
14:28 Quest how to set up the params in that global-parameres.jsp        and how to print out those in the jsp pages in which they are included. for e.g for <img src="<what here?>pic.jpg"
14:29 Naros if you use the core jstl taglib, you can use c:set to set a variable in the pageContext
14:30 Naros <c:set var="imagePath">/WEB-INF/view/images</c:set>
14:30 Quest oh. that was a thing i never used before. thought its default jstl
14:30 Quest hm
14:30 Naros But I'm surprised that spring-mvc doesn't have a URI tag :P
14:30 Quest if it did. i wont be aware of   it.
14:30 Quest as iam new
14:31 Quest :)
14:31 Naros <img src="<s:url value="/WEB-INF/view/images/logo.gif" />" />
14:31 Quest c:set for setting and c:what for output?
14:31 Naros Struts has one :P
14:31 Naros but in the struts world, I can't put that sorta stuff in WEB-INF using that tag that way :E
14:31 Quest oh. need to run. boss. catch you soon!
14:31 Quest thanks! :)
14:31 Naros later.
14:32 sfisque code strong!
14:32 Quest thanks sfisque  too
14:32 * Naros giggles how Quest vanishes so promptly.
14:32 Quest :) job description you know
14:33 Naros hehe, as a dev being in irc is commonplace i thought :E
14:34 sfisque do we know if he's actually a dev "by day"?
14:35 Naros I do not.
14:35 sfisque for all "i" know, he's a hobbiest
14:35 sfisque and he might be working as a call center jockey
14:35 Naros perhaps
14:37 sfisque or he might be a bell labs post doc, and he's just doing this to amuse himself in a perverse way :P
14:37 Naros So I have this attribute that when a user selects a specific value, I need to populate a list of things.  But this list could be considerably deep, thousands depending on the volume.   Putting thousands of values in a combo-box is terribly bad practice.
14:37 sfisque aye
14:38 Naros I'm just not sure of any particular other approach
14:38 sfisque can you use an "auto-complete" instead?  force the user to type a few chars and then filter the list down to a useable size?
14:39 sfisque could also go the "sublaunch a chooser dialog" that offers filtering options
14:39 Naros Aye, was thinking the filter route.
14:39 sfisque or use a separate view, with filtering that then dispatches to the "next" step in the workflow
14:39 sfisque many ways to skin that cat
14:39 Naros It's when they select a vendor, I need to allow them to select a PO based on the selected vendor to associate the repair document against.
14:40 Naros aye, they dislike the workflow approach, which makes no sense to me.
14:40 Naros Workflow would fit this to a tee.
14:40 Naros Step1 through Step5, with a review/jump to modify concept.
14:40 sfisque and it's an established paradigm.  tell them it's a "shopping cart" and sell it that way :P
14:41 Naros hehe, agreed.
14:41 sfisque we'll use the "e commerce" paradigm to get better buy-in from our upstream and downstream presence based user experience context.....
14:41 Naros thing is once the data is captured, they can come back and modify it at any point.
14:41 sfisque smells like shopping cart to me
14:42 Naros hehe, it would make the UI look better rather than what it currently is.
14:42 Naros 30+ fields on a single screen isn't a great user experience.
14:42 sfisque it's funny how just about every enterprise project i've been on for the last 15 years generally boils down the the same concept...  e-commerce with a shopping cart
14:43 * sfisque agrees with naros
14:43 sfisque but but but, it works just like our old green screens
14:43 Naros pretty much.  our entire app is built on search & do a business process.
14:44 sfisque and the vast majority of BPs are just "choose items" (resource) and walk them through some queue (checkout)
14:44 Naros BW analyzes the business data, generates analytics and I present those in pretty clickable, drilldown charts
14:45 Naros but yah, there are very much similarities in almost every webapp
14:55 kobain joined ##javaee
15:08 Naros it isn't easy to make your domain model not have cyclic dependencies :E
15:08 Naros *it is
15:08 Naros er no, isn't
15:08 Naros lol
15:09 Naros We have a particular business process which has a domain model.  But User seems to have that domain model as a property and core shouldn't reference this other module.
15:09 Naros >.<
15:10 sfisque does the circularity exist in the schema (via FK relationships)?
15:11 Naros Yes.
15:11 Naros Only cause it was coded such way.
15:11 sfisque gotcha
15:12 Naros Could move the relationship to be managed by that other module rather than on the user object itself is one way.
15:12 Naros take this code_id and create a separate table managed by that process that relates their code_id to a user_id
15:13 Naros And during the save of user, update user, and create this relationship as a part of the business process within the same trx.
15:13 Naros but still feels kludgy.
15:21 sfisque either way you have an FK relationship.  either have to figure out a way to reorder the linkages to remove the circularity or accept it as part of the model
15:23 SoniEx2 sfisque: I shouldn't have told you my age... now I don't get the creepy stuff anymore :(
15:24 Naros creepy?  lawlz :P
15:25 SoniEx2 Naros: aka nudes
15:25 SoniEx2 (not really but still)
15:26 * Naros is puzzled.
15:26 sfisque lolz.  is all good
15:26 sfisque soni and i bonded over our alternative lifestyles :P
15:27 Naros alternative?  really?
15:28 sfisque yes.  we do sometimes infiltrate the software industry :P
15:28 sfisque like alan turing
15:28 Naros Oh, I thought you meant alternative in other contexts perhaps :P
15:28 SoniEx2 are you talking about this? http://imgur.com/vu5xqHh
15:29 sfisque is that minecraft?
15:29 SoniEx2 yes, modded
15:30 SoniEx2 well more like self-modded... :P
15:30 SoniEx2 or something...
16:28 SoniEx2 btw I fixed the NBX-API stuff
16:28 sfisque cool
16:29 SoniEx2 mostly derps
16:29 sfisque that's what refactory is all about.  as we learn we fix :-)
16:29 SoniEx2 and an off-by-one bug
16:30 SoniEx2 https://github.com/SoniEx2/NBX-API/commit/fb226b902c0d612b546e29f45a37a4f999b45a10
16:32 sfisque nice catch
16:43 sfisque i love finding classes that exist solely so people can do things like
16:43 sfisque ... styleClass="blah#{instance.value}"...
16:43 sfisque and then i find that the style class is not defined in any css file anywhere.  awesome-sauce.  what i need, a class that does nothing polluting the source code....  /le sigh
16:44 sfisque we should change the channel name to alt.javaee.recovery :P
16:47 whartung :)
16:48 whartung I foolishly tried EJB injection with a new MDB in a legacy EJB 2, and was soundly punished by the container for it.
16:48 sfisque VERBOTTEN!!
16:48 whartung what was I thinking...
16:49 sfisque go sacrefice a windows 7 disc in the nearest microwave to appease the baby java
16:49 sfisque >:-D
16:49 sfisque bah..   > : - D
16:49 whartung oh -- I'm out those, as I just do that for sport.
16:49 sfisque ROFL
16:57 pdurbin ah. Message-Driven EJBs - http://docs.oracle.com/cd/E13222_01/wls/docs103/ejb/message_beans.html
16:57 whartung yes
17:00 pdurbin huh. we even use them... I see @MessageDriven at https://github.com/IQSS/dvn/blob/develop/src/DVN-EJB/src/java/edu/harvard/iq/dvn/core/index/IndexMessage.java
17:00 whartung bueno
17:00 pdurbin :)
17:00 whartung they're pretty nice
17:20 SoniEx2|2 joined ##javaee
17:38 Naros sfisque: alternative to the circular dependency was to change the business process.
17:38 Naros when defining business codes, associate those to users.
17:38 Naros rather than allowing the definition of a user to tie back into a business code
17:39 Naros it means changing the schema but makes more logical senses in flow for users too.
18:13 sfisque joined ##javaee
18:15 onr joined ##javaee
18:15 onr howdy folks
18:15 * pdurbin just registered for http://www.oracle.com/javaone ... September 22–26, 2013 | San Francisco
18:15 pdurbin onr: howdy
18:18 onr so I started learning Java through Oracle's docs
18:19 * sfisque is jealous of pdurbin
18:19 pdurbin sfisque: :)
18:19 pdurbin last day for early bird
18:20 sfisque as a contractor, i do not have the leverage to get my "employer" to absorb sending me to J1
18:20 sfisque unfortunately
18:21 Naros hehe, even when you aren't a contractor, that's a hard sale sometimes.
18:21 Naros been to a few spring conferences tho which were close :)
18:21 sfisque yah.  i did get to go to a smaller java con in dc once... about 17 years ago.  was fun and interesting.
18:22 sfisque now i just get to watch the videos after the fact
18:22 Naros sadly the industry has come a long way in 17 years.  hell it has in the last 5-10 :P
18:22 * sfisque agrees with naros
18:22 Naros But in some areas, at least it's slowing down a bit
18:23 sfisque dunno about that.  i've read that java10 or thereabouts we'll see the "end" of primitives.  no more autoboxing, and such
18:23 sfisque that will be quite a migration
18:23 Naros aye, heard the same.
18:23 pdurbin heh. java 10
18:23 Naros It isn't that far if you think about it pdurbin.
18:23 Naros Wasn't so long ago we were at java 2 :P
18:24 sfisque aye, 8's out, and 9 is definitely in dev by now
18:24 Naros if you think about the lifecycle of an application
18:24 sfisque has anyone played with the new "closures" feature?  i've read a little and looked at it during the early phases.  thoughts?
18:25 Naros well, technically java 8 isn't out :P
18:25 Naros GA due out March 2014
18:25 sfisque true... but.. it's available
18:25 Naros Aye thru OpenJDK
18:26 Naros I particularly love closures and can't wait for them.
18:26 Naros Use them in jQuery scripting all the time
18:26 sfisque what will they solve for you?  i'm not sure i'm a fan.  i can see the advantage in highly parallel frameworks, but i only foresee lots of "abuse", sort of like when inner classes debuted
18:29 pdurbin sfisque: I listened to these JavaOne 2012 talks about lambdas and they're good: https://oracleus.activeevents.com/connect/sessionDetail.ww?SESSION_ID=5089 and https://oracleus.activeevents.com/connect/sessionDetail.ww?SESSION_ID=4862
18:31 Naros Just like everything else, they'll have their uses in various cases or ways to short-cut other means to achieve the same result.
18:31 Naros One immediate use is rather than defining interfaces and then implementations for certain constructs, you can get by passing a closure instead and doing the very samething.
18:32 Naros While crude, Comparing objects come to mind.
18:33 Naros But it does blur lines and certain can be abused.
18:33 Naros ie: pass a function into my service tier to lookup some i18n text from my web tier's i18n resource class.
18:33 sfisque aye.  i see them as a possible "delegate" shorthand.  but i also see that as an abusable construct (aka you get a ton of anonymous runtime constructs that can make debugging spurious state issues difficult)
18:34 Naros the closure would be in my web tier's controller by definition and thus iirc, the server tier wouldn't import any of my web tier objects as a result.
18:34 sfisque the real question is, will we see Functions as a top level object so we can finally do away with "utility classes"
18:34 Naros I'd love to, as I dislike these Util classes
18:35 Naros I love using std::bind or boost::bind in C++ to pass functions to other things
18:35 Naros but can quickly lead to spaghetti code
18:35 sfisque aye giving java the concept of "vector tables" can be both nice and daunting
18:36 Naros vtables - ugh
18:36 sfisque that is one thing i miss from C/C++, the ability to build a map of *function() that can be bound at runtime for dynamic dispatching
18:37 Naros Precisely.  My game engine makes heavy use of that for the message dispatch framework for both async and sync callbacks.
18:37 sfisque also allow for "looser" coupling for plugin and strategy patterns
18:37 Naros It's just another flavor of the Observer pattern in the end, but with far less coupling of components.  But maintenance is far higher long-term
18:38 Naros lol exactly.
18:39 Naros It'll probably be heavily leveraged in frameworks and probably very little in other avenues to start.
18:40 Naros Java's use of the singleton pattern drives me bonkers
18:40 sfisque do you mean "in java" or by java devs?
18:40 Naros So heavily frowned upon in other languages lol.
18:40 Naros by java devs mostly.
18:41 Naros it's pretty commonplace in java code to see singletons
18:41 sfisque well, without a first class function entity, what other facility do you have?
18:41 sfisque it's either that or a util class with all static public methods
18:41 Naros but in java, management of the allocation/resources that come with singletons isn't a nightmare as it is in say C++
18:42 Naros Since heap is managed by the underlining language and not the developer.
18:42 sfisque at some point, for memory scalability you need the ability to just leverage defining a method/function once and dispatching through it
18:42 sfisque aye
18:42 sfisque C/C++ memory management is .... "fun"?
18:42 Naros that's one of many ways to describe it.
18:43 Naros anywho, off to grab some food before I die of starvation :P
18:43 Naros be back in a few misn
18:43 sfisque kk be well
18:43 Naros *mins
18:59 * Naros waves.
19:09 sfisque wb
19:16 pdurbin I don't understand why I can't catch the EJBException exception in this getStudyByGlobalId method: https://github.com/IQSS/dvn/blob/00cbd45497b9e73a17bb6f20e2c7e5cf116995bf/src/DVN-EJB/src/java/edu/harvard/iq/dvn/core/study/StudyServiceBean.java#L1492
19:17 pdurbin this is where I'm trying to catch it: https://github.com/IQSS/dvn/blob/00cbd45497b9e73a17bb6f20e2c7e5cf116995bf/src/DVN-web/src/edu/harvard/iq/dvn/api/datadeposit/UrlManager.java#L173
19:19 sfisque which throw is not being caught?
19:20 pdurbin sfisque: the ':' not found in string one: https://github.com/IQSS/dvn/blob/00cbd45497b9e73a17bb6f20e2c7e5cf116995bf/src/DVN-EJB/src/java/edu/harvard/iq/dvn/core/study/StudyServiceBean.java#L1500
19:21 sfisque since EJBException is a RuntimeException is the container is trapping it?
19:21 pdurbin hmm
19:22 sfisque generally RuntimeExceptions indicate something "very bad" but not as bad as Error happened
19:22 sfisque "mostly bad" :P
19:22 * sfisque makes quote marks with his fingers
19:26 pdurbin I guess I'm talking about this the wrong way
19:26 pdurbin I *am* able to catch the exception
19:27 sfisque ok
19:27 pdurbin but what surprises me is that the stacktrack is printed to server.log (glassfish) anyway
19:27 sfisque EJBException is probably registered with the container's logger
19:27 pdurbin stacktrack!? stacktrace. can you tell I'm almost out the door? ;)
19:27 sfisque so that if you are not catching it, it's still logged
19:28 pdurbin hmmm
19:28 pdurbin not sure where to look for that
19:28 sfisque otherwise EJBEx's would fail quietly
19:28 sfisque which would be VERY BAD
19:29 sfisque i would guess the container has an interceptor on EJBException constructors or somesuch so that they do not go "unnoticed"
19:31 pdurbin sfisque: ok. that makes sense. thanks
19:41 sfisque npnp
19:53 sfisque anyone here done an "in situ" upgrade of macosx from 10.5 -> 10.6?
20:30 Naros sfisque / whartung - either of you do any aspectj?
20:33 pdurbin sfisque: I think my mom did. I always wipe and install os x fresh
20:42 sfisque naros : negative
20:42 sfisque pdurbin : aye i'm trying to not go "nuke/pave" route
20:42 sfisque basically curious of any caveat's regarding apps not working on 10.6 or time machine issues
20:43 sfisque i got bit going 10.4 -> 10.5   , my aging photoshop license stopped working and had to upgrade
20:49 whartung no Naros I've never used AOP beyond what JEE gives us "for free"
20:49 Naros okies, np.
20:50 onr which IDE you use?
20:52 whartung netbeans
20:52 Naros myeclipse
20:55 onr but their autocomplete is slow?
20:56 Naros which?
20:57 Naros i find myeclipse's autocomplete pretty fast
20:57 onr both netbeans and eclipse
20:58 Naros We found that MyEclipse had slow auto-complete if you had lots of capabilities enabled, particularly JPA.  One of our solutions was to split the project into multiple jars.
20:58 onr compared to IDEA
20:59 Naros when working within each project, its as fast as any other IDE I've worked with.
20:59 Naros but speaking of auto-complete.  I noticed something strange with AC and AspectJ.
21:00 Naros If I want to weave an aspect into a class in JAR-A but want to use JAR-A in WAR-B, for whatever reason WAR-B wants AspectJ capabilities.
21:00 Naros that doesn't make sense to me.
21:01 Naros Otherwise AC doesn't see the weaved content.
21:08 raoul- joined ##javaee
21:37 SoniEx2 sfisque: could you make me a class?
21:38 SoniEx2 I mean find me one
21:38 sfisque which one would that be?
21:39 caverdude joined ##javaee
21:40 * sfisque waits patiently
21:40 SoniEx2 I need something to store hours, minutes, seconds, and milliseconds, and the toString has to give something similar to hh:mm:ss;uuu
21:40 sfisque Calendar?
21:41 sfisque java.util.Calendar
21:41 sfisque coupled with SimpleDateFormat
21:44 SoniEx2 I don't think that would work...
21:44 sfisque why not?
21:45 sfisque or more to the point, what are you trying to achieve
21:46 SoniEx2 a song length method
21:46 sfisque calendar would work totally fine.  just set the Y/M/D to some static value and just use the H:M:S:ms fields
21:47 sfisque and couple with a SimpleDateFOrmat object to format the output to what you want
21:47 * sfisque is a big fan of not re-inventing the square wheel
21:49 SoniEx2 but calendar is for dates...
21:49 sfisque Calendar is for time, regardless of granularity
21:49 sfisque and it couples with DateFormat natively
21:51 sfisque create a wrapper that instantiates the Calendar from the factory method and attaches a SimpleDateFormat configured the way you want it
21:52 sfisque you can proxy the methods that you want exposed and hide the methods you want hidden (day, month, year, etc.)
22:04 onr Naros: what about sublime text? :)
22:05 Quest joined ##javaee
22:06 Naros onr: huh?  sorry found that my issue is a compatibility problem with m2eclipse with workspace resolution.  disabling it doesn't give me context errors with aspect woven fragments.
22:08 Quest Naros,  <Naros> WEB-INF/views/images | WEB-INF/views/js | WEB-INF/classes/messages.properties
22:08 Quest so no files in /resources ?
22:08 Naros src/main/resources points to /WEB-INF/classes during a maven build.
22:09 Quest oh
22:09 Quest so only messages would be in resources
22:10 Naros Chances are that won't be the only thing in there.
22:10 onr Naros: hmm
22:10 Naros That is where log4j.xml, struts.xml, and all my applicationContext-*.xml files reside.
22:10 Quest Naros,  what might else be there
22:11 Quest Naros,  let me show you a snap shot then
22:11 Naros Usually I put anything that my java source code may need in /src/main/resources.
22:11 Naros Usually all that ends up in /src/main/webapp is web.xml and any view related artifacts.
22:14 Quest Naros,  http://i39.tinypic.com/2j4vw95.png
22:16 Naros My IDE shows Maven projects differently than yours.
22:16 Quest hm
22:16 Quest your using which ide?
22:17 Naros mine just makes a distinction between the following
22:17 Naros "/src/main/java"
22:17 Naros "/src/main/resources"
22:17 Naros "/src/test/java"
22:17 Naros "/src/test/resources"
22:17 Naros "/src/main/webapp"
22:17 Naros they are all nodes off the project root.
22:17 Quest same here.     java and resources and webapps are both in main
22:18 Quest I just made a dir in between named as web
22:18 Quest its the same as your ides
22:19 Naros http://tinypic.com/r/2ykc2zp/5
22:19 Naros Maybe that might be more helpful to understand what I meant.
22:20 Naros In the end, maven moves things based on directories, regardless how the IDE renders it.
22:20 Quest h
22:20 Quest hm
22:21 Naros anyway, yours is fine the way you have it.
22:22 Naros Anyway, commute time.  I'll be back on in a bit.
23:10 sfisque neat little gotcha. example of how "everything in java is a pointer".  i had a controller holding a List which was displaying in a primefaces table.  when loading the page, i was setting the attribute to a new arraylist with data from a different collection and the PF table was still holding the old arraylist until it got an event to refresh.  so i'd leave and come back in, and get old list, until some ajax fired and it asked for the array list again via t
23:10 sfisque unsurprising once i figured it out, but definitely annoying to track down
23:13 Quest hm
23:15 * SoniEx2 hugs sfisque in an overly cute way ^-^
23:15 SoniEx2 :P
23:17 * sfisque hugs soniex2 back in a cute but platonic way
23:17 sfisque :P
23:18 sfisque sometimes i wish object references were more "durable", like "if i reset this variable, i want all references to it to accept that change"
23:18 sfisque rather than everything is just a pointer
23:18 sfisque or handle
23:20 SoniEx2|2 joined ##javaee
23:24 whartung joined ##javaee
23:25 Quest I have resources dir in my src.main.    but in my war file it only lists  the contents of resources in the src.main       and resources dir dont even exist. why
23:26 whartung lots of time the resrouces dir is simply copied in to the WEB-INF/classes folder
23:26 whartung since most folks want resrouces on their class path, and that's the place to do that
23:28 Quest yes. thats what happened. its in webinf/classes/files         but not in webinf/classes/resources/files
23:29 whartung no, it wouldn't be
23:29 whartung if you want that, put it in resources/resource/file.txt
23:44 Quest_ joined ##javaee
23:45 Quest_ <Quest> hm
23:45 Quest_ <Quest> whartung,  I wonder why the resources dir just got vanished and its contents appeard outside it
23:45 Quest_
23:46 whartung THat's just how the build system have evolved the use of that directory
23:48 Quest hm. ya..
23:48 Quest thanks

| Channels | #javaee index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

Please see http://irclog.greptilian.com/javaee for which days have been logged.