Camelia, the Perl 6 bug

IRC log for #cdk, 2011-04-05

| Channels | #cdk index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
03:59 sneumann joined #cdk
04:09 sneumann left #cdk
05:35 egonw joined #cdk
06:47 egonw left #cdk
06:49 egonw joined #cdk
06:50 egonw_ joined #cdk
06:50 egonw left #cdk
06:54 egonw_ left #cdk
06:54 egonw_ joined #cdk
07:00 egonw_ left #cdk
07:01 egonw_ joined #cdk
07:05 egonw_ left #cdk
07:05 egonw_ joined #cdk
07:06 Gpox joined #cdk
07:08 sneumann joined #cdk
07:13 egonw_ left #cdk
07:13 egonw_ joined #cdk
07:18 sneumann left #cdk
07:21 egonw_ left #cdk
07:28 egonw_ joined #cdk
07:32 egonw__ joined #cdk
07:32 egonw_ left #cdk
07:36 egonw__ is now known as egonw
07:39 jonalv joined #cdk
07:43 egonw_ joined #cdk
07:45 egonw left #cdk
07:48 jonalv egonw_: ping
07:48 egonw_ left #cdk
07:48 jonalv hm...
07:50 jonalv so I get this on standard out: "Cannot percieve atom type for the 20th atom: Re" but CDK just happily plows on. What exatly happend to my data here? I mean something did go wrong, but it did not stop running...
07:55 jonalv left #cdk
07:57 egonw joined #cdk
07:58 Conrad left #cdk
07:58 Conrad joined #cdk
08:04 egonw left #cdk
08:05 egonw joined #cdk
08:06 Gpox left #cdk
08:18 egonw left #cdk
08:19 jonalv joined #cdk
08:19 Gpox joined #cdk
08:20 sneumann joined #cdk
08:21 jonalv ping
08:25 sneumann left #cdk
08:37 jonalv left #cdk
08:42 egonw joined #cdk
08:44 jonalv joined #cdk
08:57 Conrad left #cdk
09:00 Conrad joined #cdk
09:16 sunpoet joined #cdk
09:16 sneumann joined #cdk
09:27 sneumann left #cdk
09:36 egonw_ joined #cdk
09:37 egonw left #cdk
09:40 egonw__ joined #cdk
09:40 egonw_ left #cdk
09:55 jonalv is anyone here at all?
09:55 Gpox I am here
09:55 jonalv I would like to talk about rows 265 and 266 of S,ilesParser.java...
09:55 jonalv |SmilesParser
10:01 maclean joined #cdk
10:01 sunpoet left #cdk
10:02 maclean hi
10:02 zarah hi maclean
10:03 maclean hi jonalv : what about lines 256-266?
10:04 jonalv maclean: it prints to standard out
10:04 jonalv when there is a logger around
10:04 jonalv + it catches Exception
10:04 jonalv the base class
10:04 * jonalv is working on a patch
10:04 maclean Ah, right.
10:05 jonalv gtg
10:05 jonalv afk @ lunch
10:05 maclean Ok.
10:44 egonw__ left #cdk
11:08 egonw__ joined #cdk
11:12 egonw__ is now known as egonw
11:25 maclean left #cdk
11:26 * jonalv is back
11:26 jonalv egonw: around?
11:27 egonw yes
11:27 jonalv cool
11:27 jonalv I fotgot my question
11:28 egonw thanx
11:28 jonalv fail lol
11:28 egonw [2011-04-05 11:56] <jonalv> I would like to talk about rows 265 and 266 of S,ilesParser.java...
11:28 egonw ?
11:28 jonalv yea, or rather I was wonering how to detect atom typing errors
11:28 jonalv I am working on a patch for those two rows
11:37 jonalv egonw: do you know why I don't get any logging output when I run the CDK tests in Eclipse?
11:37 sneumann joined #cdk
11:41 maclean joined #cdk
11:43 egonw jonalv: no, because I am not psychic
11:43 jonalv egonw: it's because the default behavior of CDK is to not output anything at alla even if I calla logger.errror
11:43 jonalv cause the logger.error method only outputs errros if we are doing debug
11:44 egonw -Dcdk.debugging=true
11:44 jonalv that ure is nonstandard
11:44 egonw beats configuration files
11:44 egonw -Dcdk.debugging=true -Dcdk.debug.stdout=true
11:44 egonw if you like to dump to STDOUT
11:44 jonalv egonw: yea but I think we are intrested in errors even if we are not running debug
11:45 jonalv and warnings
11:45 sneumann left #cdk
11:45 egonw for that you do need a log4j config file
11:46 jonalv egonw: so basicly I can not use the cdk logging for telling the user that something went wrong?
11:46 jonalv and that is why you are writing things to Standard out in that parser?
11:46 egonw me?
11:46 egonw perhaps... if you tell me the line, I'll do the git blame
11:46 jonalv well anyone who knows but I am guessing you should be able to answer...
11:47 egonw System.out is not supposed to be used
11:47 egonw [2011-04-05 13:46] <jonalv> egonw: so basicly I can not use the cdk logging for telling the user that something went wrong?
11:47 jonalv I would like to talk about rows 265 and 266 of
11:47 jonalv S,ilesParser.java...
11:47 egonw what makes you say that? what makes that impossible?
11:47 * maclean sometimes tries to set the logging level in code, but it don't work.
11:48 egonw well, I'm at a conference today... so don't have time really
11:48 jonalv egonw: cause the defualt is that debug is off and when debug ios off nothing get's written
11:48 egonw then turn debugging on??
11:48 jonalv see LogginTool row 237
11:48 egonw jonalv: not everytone like debugging...
11:48 jonalv egonw: ah sorry wrong line
11:49 jonalv my point is that logger.error is only printed if debuging is turned on
11:49 jonalv but people who do not want debug output might want error output...
11:50 jonalv how does such a thing work in the cdk framework?
11:50 egonw yes, you said that...
11:50 egonw that's when I said that both can be configured separately
11:50 egonw which is when you concluded that it can't be done
11:50 jonalv ah I must have missed that, but then considering row 314 of LoggingTool.java I am sliglty sceptical
11:51 egonw ok, let me check
11:51 egonw which branch?
11:51 jonalv master
11:51 egonw 314 is public void error() here...
11:51 egonw ok...
11:52 egonw mom, changing branch
11:52 jonalv oh sry
11:52 jonalv 315 then
11:52 maclean it's like : "public void error(Obj) { if (doDebug) { errorString(obj) } }"
11:52 jonalv exactly
11:52 jonalv so unless we are doing debug then error does nothing
11:53 egonw well, now you understand my fetish about good variable names...
11:53 egonw it's indeed a bit of a misnomer
11:53 jonalv oh?
11:53 egonw read: doOutput
11:53 egonw s/doDebug/doOutput/g
11:54 jonalv you lost me now? What do you mean?
11:54 egonw that's Perl talk
11:54 egonw s/ -> substitute
11:54 egonw /g -> globally
11:54 maclean So, if doOutput is false, you get no error or debug output.
11:54 jonalv yea, oh okey
11:55 maclean If true, you get whatever is less than the set level?
11:55 egonw right
11:55 egonw and right again
11:55 egonw anyone who wants to make that rename patch?
11:55 jonalv ah that was not so easy for a bear of very litttle brain to understand
11:55 egonw or review?
11:56 egonw jonalv: yes, which makes it important to not jump to conclusions like "ah, so it cannot be done"
11:56 jonalv egonw: well yea that's why I asked you... Maybe I did so i na clumsy way though...
11:56 egonw I got to reboot into win7 first now
11:56 maclean Well, I've always been stumped by logging :)
11:56 egonw no worries :) you found a stupid bit of code
11:56 egonw and that name is by me, I guess
11:57 egonw well, it's very historical code...
11:57 jonalv but good, then my original patch still makes sense
11:57 egonw it's been refactored numerous times
11:57 egonw jonalv: that's up to the reviewer to decide :)
11:57 egonw anyway's...
11:57 egonw will try to be back on IRC in some minutes
11:57 jonalv egonw: at least it maekls sense to me...
11:57 egonw left #cdk
12:01 jonalv yey found another bug
12:02 maclean er, yay?
12:03 jonalv it's a corner case in the logger and yea I was a bit ironic...
12:05 egonw joined #cdk
12:10 egonw jonalv++ (for being critical)
12:10 jonalv egonw: wb
12:10 jonalv I found another bug while you were gone :)
12:10 jonalv egonw: Which way is prefered for patches?
12:11 egonw depends on several things
12:11 egonw clean patches typically does well
12:12 jonalv pull requests on github?
12:13 egonw if the patch is small, and depends on whom you like to review it
12:14 jonalv I get to choose? :)
12:18 jonalv Is there a reason why debugging is not turned on by default when running tests?
12:19 maclean Well, most of the time the tests are just there to pass.
12:19 egonw yes, otherwise ant output gets flooded
12:20 jonalv oh it can get flooded?
12:20 jonalv intresting
12:20 egonw oh, you have not turned it on yet?
12:20 jonalv I did not figure out how to do it without changing the base class for tests
12:20 jonalv probably not the right way...
12:21 jonalv I tried giving cdk that paramater you wrote to me but had no efect
12:21 jonalv or was that a param for the jvm?>
12:23 maclean JVM, I think.
12:23 jonalv ah that explains it... :)
12:23 maclean If you're talking about the -D flags...
12:24 jonalv yup
12:24 maclean In eclipse you can alter the run configuration for a class.
12:24 jonalv that's it, maclean++
12:24 jonalv oh, tell me how?
12:24 jonalv or uhm
12:25 jonalv yea I think I know what you mean
12:25 maclean Menu : Run->Run Configurations.
12:25 jonalv I was hoping I could change the general run confgiuration for al lclasses extending the base test class...
12:25 maclean Then the Arguments tab, in the VM arguments... er not that I know of.
12:25 jonalv now I have to add that line for each test class I run...
12:26 maclean Yeah, and it looks like I have 900 Junit configurations in that window :(
12:26 maclean No wonder eclipse takes all my memory.
12:26 jonalv lol
12:27 maclean that and the project I'm working on that has like 900 jarfiles.
12:29 jonalv yiekes
12:30 egonw btw, modules have dedicated suites...
12:30 egonw core -> McoreTests
12:30 jonalv so I have another question
12:30 egonw io -> MioTests
12:30 egonw etc
12:31 jonalv Say that the SmilesParser have detected that it can't atomtype when creating one molecule
12:31 jonalv how can I easyily see that my molecule has not been atomtyped completely?
12:31 jonalv or rather How can I see on my molecule that atom typin failed?
12:33 maclean Well, that bit of code you pointed too earlier set the atomTypeName to "X" when it failed.
12:33 maclean So, that could be a way to check - print out (somewhere) the atom type names, and check for Xs.
12:35 jonalv yea I was hoping for something a bit less messy...
12:35 jonalv :)
12:36 maclean Well, what do you mean by "see", then?
12:36 maclean As in : is this a user-level warning, or a developer level debugging?
12:36 jonalv hm, I guess in the best of worlds there would be some sort of flag on the molecule telling me that I can't trust anything from it that is based on atomtyping...
12:37 maclean Yeah, seems like a good use of flags for once (I don't like flags much). A sort of "UNTYPED" flag on an atom. Or the atom container, by extension.
12:37 jonalv use case is the following, I am parsing a long list of molecules as SMILES and need to throw away the ones that CDK can't handle
12:38 egonw jonalv: while you're at that code
12:38 jonalv egonw: how do you mean?
12:38 egonw pelase use ',' rather than + in logger.foo() calls
12:38 egonw and add a logger.debug(exception)
12:38 jonalv egonw: ooh, good point *lol*
12:38 egonw and replace 'e' with 'exception'
12:38 jonalv egonw: replace e with exception?
12:39 maclean "Exception e" with "Exception exception"
12:39 egonw well, at least three chars for a variable other than i in for loops
12:39 jonalv yea and e in catches...
12:39 jonalv but sure you guys are the bosses
12:40 maclean heh. not really.
12:41 egonw logger.debug(exception) causes the dump of a stacktrace
12:42 egonw so, maybe just for the general Exception, not for the more anticipated NoAtomTypeDetectedExceptino
12:42 egonw maclean: what do you think?
12:42 jonalv that's actually rather handy, now I see why the logger.debug method takes an Object
12:42 jonalv who do I give the karma?
12:43 maclean egonw : Er, are we talking about this patch? I haven't looked at it yet.
12:43 jonalv egonw: yea that's what I was thinking too, it's only needed for the general exception I agree
12:44 jonalv right, how do I switch to the new verion of the patch?
12:45 egonw maclean: sorry... yes, wat looking at the patch
12:45 egonw switch?
12:45 egonw jonalv: not sure what you mean
12:45 maclean Oh, and "percieve" is mispelt.
12:45 maclean jonalv : on s/f delete and re-upload.
12:45 jonalv maclean: okey I deleted the file
12:46 jonalv how do I reupload it now?
12:46 maclean just add the new patch like what you did with the old one.
12:46 jonalv there is no such field :(
12:46 maclean Well, that's weird.
12:47 maclean I mean - it worked the first time?
12:47 jonalv oh hang on
12:47 jonalv I could click on a bit of balck text
12:47 maclean The css on s/f is weird, the buttons don't look like buttons.
12:47 jonalv talk about unintuitive interfaces
12:47 maclean yeah, totally.
12:48 jonalv okey new version uploaded now
12:48 maclean compared to github, which lets you diff images with a slider.
12:48 maclean cool.
12:52 jonalv so, cdk has some sort of general flags or something that can be used for showing that atomtyping failed?
12:58 maclean Well, all CDK objects (ChemObjects) have properties. So you could stuff it in there.
12:59 maclean like atomContainer.setProperty(AtomTyping.FAILED, true) ?
13:00 jonalv yea, only to do that I would have to change the atomtyping code
13:00 jonalv SO I don't think I should be the one doing such changes...
13:00 jonalv maclean: it looks like a good idea though don't you think?
13:00 maclean No, no you're right. I just meant some flag that you define somewhere.
13:01 maclean Like Jonalv_MyCustomClass.MY_FLAG, only with better names.
13:01 maclean I think it's a good idea in general, considering how important atom typing is.
13:02 jonalv something for the mailing list perhaps?
13:03 maclean I think so, yes.
13:20 jonalv maclean: I am confused, did you upload the wrong file?
13:20 maclean Er, maybe, why?
13:21 maclean I thought that I signed off the patch.
13:21 jonalv it is about a typo in the PDBReader...
13:21 maclean oh fuk,
13:21 maclean will alter.
13:21 jonalv :)
13:23 maclean it's all a bloody convoluted process if you ask me.
13:24 jonalv yea I guess but it's also good, but maybe using github would be better?
13:26 jonalv so I have one more thing I want to talk about
13:26 maclean well, it doesn't have quite the same capabilities of tracking things.
13:26 maclean Oh?
13:26 jonalv Is it very important the CDK give no output whatsoever if the debug flag is not set?
13:26 jonalv cause he initialisation of the LoggingTool class is a bit funny
13:27 maclean Funny how?
13:27 maclean (like a clown, do I amuse you, etc)
13:27 jonalv if tries to read the setting from the System property but if it fails it writes an debug output to the logger, only since we failed it is not working...
13:27 egonw CDKConstants.ATOMTYPINGFAILED
13:27 egonw see reply
13:28 jonalv or rather the default value is not to print anything
13:28 egonw nicer than the 'X' atom type
13:28 jonalv so if we get for example taht security exception from the applet runner we will not get any erro message about that
13:28 egonw ok, I am going offline for a few hours
13:28 maclean ok cu.
13:29 maclean jonalv : lines 166-167?
13:29 jonalv maclean: yea
13:29 jonalv maclean: those two lines are always a no op
13:30 maclean Also, it is catching Exception again...
13:30 jonalv yea but that sort of makes sense
13:30 jonalv regardless of what goes wrong in setting up the logging we should always try to run on wihtout logging
13:31 jonalv it is not a mission critical feature
13:31 jonalv it would be nice to write something to standard error though about it failing I think
13:31 maclean true.
13:31 jonalv hence my question if it is very important that CDK doesn't write anything if the debug flag is not set
13:31 jbrefort joined #cdk
13:32 jonalv cause if the flag is not set but we fail to read it we would get an error message on standard error
13:32 jonalv but IO think that is what we want
13:32 jonalv thoguth I should bounce it by someone before writing the patch though...
13:32 maclean If the flag is not set, we don't care if the debugging isn't working, though?
13:32 jonalv bingo
13:32 egonw left #cdk
13:33 jonalv but we can't know can we?
13:33 maclean Well, no, but it seems a reasonable guess.
13:33 jonalv so if we can\t check the flag is it okey to complain about that or should we be silent?
13:33 jonalv right now we are silent but when reading the code it looks like the intent was to not be silent...
13:34 maclean Oh, right arrrgh. We don't know if the debug flag is set, because we can't read the system property. Gah.
13:34 jonalv exactly :)
13:35 jonalv I still think it is reasonable behavior to complain on standard out in this situation
13:36 maclean No, wait. logger.debug doesn't depend on doDebug.
13:36 jonalv maclean: sure it does
13:37 maclean oh, it's a ref to this.
13:37 jonalv maclean: the first row is: "if (foDebug)
13:37 jonalv |doDebug
13:37 maclean The logging facade is confusing to me.
13:38 jonalv unless the doDebug boolean is set to true it does nothing and the default value for it is false
13:42 maclean So the only problem I can see is testing this - can the unit test be set to have the System property set/unset.
13:42 jonalv yea sure, you can set the Ssytem.property but I don't know if you can make it throw an exception when accessing it though
13:43 jonalv I am guesssing this might be one of the more difficult things to test...
13:43 maclean set security policy or somesuch
13:43 jonalv no idea
13:44 jonalv I will file a patch for it and then we can have the discussion there
13:44 maclean okey.
13:45 maclean Heh. Naturally enough, there is no System.setSecurityPolicy method :)
13:45 maclean (now that I think about it)
13:45 maclean System.makeEverythingInsecure()
13:46 jonalv :)
13:57 maclean left #cdk
14:02 egonw joined #cdk
14:06 Gpox left #cdk
16:03 egonw left #cdk
16:19 egonw joined #cdk
16:23 egonw left #cdk
16:24 egonw joined #cdk
16:38 egonw left #cdk
16:39 egonw joined #cdk
16:43 egonw left #cdk
16:50 _ilbot joined #cdk
16:50 Topic for #cdk is now The Chemistry Development Kit (http://cdk.sf.net) | JUnit CDK 1.2.7: 15690, 76 fails + 15 errors (0.58%) | Logs at http://moritz.faui2k3.org/​irclog/out.pl?channel=cdk | CDK News Feed: http://friendfeed.com/rooms​/chemistry-development-kit
16:50 zarah joined #cdk
17:03 zarah left #cdk
17:11 jonalv left #cdk
17:22 egonw_ left #cdk
17:25 egonw_ joined #cdk
17:28 egonw_ left #cdk
17:28 egonw_ joined #cdk
18:02 egonw_ left #cdk
18:02 egonw_ joined #cdk
18:18 egonw_ left #cdk
18:18 egonw_ joined #cdk
21:04 jbrefort left #cdk
21:15 egonw_ left #cdk

| Channels | #cdk index | Today | | Search | Google Search | Plain-Text | summary