Camelia, the Perl 6 bug

IRC log for #bioclipse, 2007-09-21

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

All times shown according to UTC.

Time Nick Message
04:34 CIA-31 joined #bioclipse
05:55 thomas_ku joined #bioclipse
07:55 claes_a joined #bioclipse
07:59 EskilA joined #bioclipse
08:06 jonalv joined #bioclipse
08:33 egonw joined #bioclipse
08:53 claes_a joined #bioclipse
09:25 steinbeck joined #bioclipse
09:40 EskilA_ joined #bioclipse
10:09 olas joined #bioclipse
10:10 olas hi all
10:10 CIA-31 bioclipse: jonalv * r3798 /trunk/playground/plugins/​net.bioclipse.structuredb/ (5 files in 5 dirs): Now the setupTestEnvironment (create the tables for dao testing) is beginning to work.
10:10 jonalv hi olas
10:38 CIA-31 bioclipse: jonalv * r3799 /trunk/playground/plugins/​net.bioclipse.structuredb/ (6 files in 3 dirs): Moved table creation code from testservermanager to a Tablecreator which can be used booth when testing and when deploying
12:19 jonalv anyone good at java patterns (regexps)?
12:19 jonalv I want to match a finishinf ;
12:20 thomas_ku what do you want to match?
12:20 jonalv I thought it woulfd be $;
12:21 jonalv or $\;
12:21 jonalv but neither does the job
12:21 thomas_ku no it is $
12:21 thomas_ku how looks your regex?
12:21 jonalv But I want to match a line finishing with a ';'
12:21 thomas_ku AH ok than I think it is ;$
12:22 jonalv oh
12:22 * jonalv testing
12:22 thomas_ku the $ has to be at the end!!
12:22 jonalv nope didn't work
12:22 thomas_ku http://www.fileformat.info/tool/regex.htm
12:22 thomas_ku this is a good site were you can test your regex and play with it
12:24 thomas_ku If I test it on the website with blblblblb; and the regex is ;$ than the java regex will find it
12:24 jonalv Well it won't for me so there is something I am not understanding...
12:25 jonalv test string: "asdf;"
12:25 jonalv regexp: ";$"
12:25 jonalv no match
12:25 thomas_ku do you use the matcher.matches or the matcher.find method?
12:26 jonalv I am using the string.match
12:26 jonalv But it is not working on the webpage either...
12:26 jonalv so it's not the way to match a ';' at the end
12:28 thomas_ku with the your teststring asdf; and the ;$ as regex I get a positive find on the webpage!
12:28 thomas_ku did you entered there also the " with your test string?
12:28 jonalv no no "
12:29 thomas_ku ok than I do not understand it...
12:29 jonalv are you kidding with me? Did it work for you?
12:29 thomas_ku I can sent you a screenshot
12:29 thomas_ku one moment
12:32 jonalv hm that's not working. But thanks anyway
12:32 jonalv Maybee I can commit my code and you can check it out and help me?
12:32 thomas_ku sorry that I couldn't help
12:33 thomas_ku I havent a bioclipse version checked out sorry
12:33 jonalv :(
12:33 jonalv This is crazy...
12:33 thomas_ku but you can commit it and I will look on the code
12:34 egonw jonalv: http://www.fileformat.info/tool/regex.htm
12:34 egonw and see:
12:34 egonw http://java.sun.com/j2se/1.5.0/doc​s/api/java/util/regex/Pattern.html
12:34 egonw \z is what you need
12:34 egonw instead of $
12:34 egonw Java regexp != Perl regexps
12:35 egonw ah, no...
12:35 egonw incorrect... sorry
12:35 CIA-31 bioclipse: jonalv * r3800 /trunk/playground/plugins/net.bioc​lipse.structuredb/src/net/bioclips​e/structuredb/persistency/tables/ (BaseObject.sql TableCreator.java): TableCreator code with a (strangely) broken regexp
12:35 egonw it does use $
12:35 * egonw makes note: input != line
12:36 egonw jonalv: I'll look at the code
12:36 jonalv egonw,  great!
12:39 thomas_ku jonalv: the problem is that the .matches method only gives true back if it matches the whole string and not parts of the string!
12:39 jonalv oh
12:39 jonalv Oeky thanks
12:39 jonalv so I need to create a matcher then...
12:39 thomas_ku If you want to match parts of a string you have to use the .find() or .lookingAt method of the Matcher class
12:39 thomas_ku yes
12:40 egonw thomas_ku: ha, you gave that link too...
12:40 thomas_ku yes
12:40 thomas_ku this site is really greate
12:40 thomas_ku -e
12:46 CIA-31 bioclipse: jonalv * r3801 /trunk/playground/plugins/net.bioclipse.​structuredb/src/net/bioclipse/structured​b/persistency/tables/TableCreator.java: Changed from string.match to creating a Matcher from Pattern but I still can't match a ';' at the end of a line...
12:46 jonalv egonw, that didn't do it...
12:48 olas have you seen the regexp plugins: http://regex-util.sourceforge.net and http://www.bastian-bergerhoff.com/ec​lipse/features/web/QuickREx/toc.html
12:48 olas eclipse plugins for createn regular expressions
12:49 olas left #bioclipse
12:49 egonw jonalv: where did you put net.bioclipse.hsqldb?
12:49 jonalv it's still in playground
12:49 egonw ack
12:50 egonw jonalv: and which class contains the regexp?
12:50 jonalv net.bioclipse.structuredb.per​sistency.tables.TableCreator
12:51 jonalv so that's in net.bioclipse.structuredb (which is also in playground)
12:52 jonalv To testrun I think you might need the Keyring aswell since I am using the passwordencryptor from it. Guess we should move the JAsypt jar out of the keyring and in to a plugin of it's own but noone has needed the Jasypt without the keyring yet I think...
12:53 jonalv This plugin strucure keeping needs a firm hand and I am not (yet) that person
12:54 thomas_ku jonalv
12:54 thomas_ku you have to use the matcher.find() method and not the matcher.matches method!!!
12:54 jonalv thomas_ku
12:54 jonalv oh
12:54 jonalv okey
12:54 egonw not the use of Scanner...
12:55 egonw not=note
12:55 egonw why are you using Scanner?
12:55 jonalv It pooped in to my head
12:55 jonalv What would you use+
12:55 jonalv hm popped
12:55 egonw yeah, figured that :))
12:56 jonalv there is no find method on a Pattern...
12:56 egonw right: read this example:
12:56 egonw Pattern p = Pattern.compile("a*b");
12:56 egonw Matcher m = p.matcher("aaaaab");
12:56 egonw boolean b = m.matches();
12:56 egonw so you would probably want:
12:57 egonw Pattern sqlStatementEnd = Pattern.compile(";$");
12:57 jonalv ah there is a find method on a mathcer
12:57 egonw Matcher m = p.matcher(line);
12:57 egonw m.matches()
12:57 egonw but what are you actually trying to do?
12:57 thomas_ku matches only works if it matches the whole string
12:57 jonalv I want to write my sql-statements one statement per file
12:58 jonalv But the alter table statements need to be run after all create table statemtns
12:58 thomas_ku if you want to match parts of the string you have to use m.find();
12:58 jonalv so I am filtering them out to run after the create statements
12:58 egonw thomas_ku: Pattern.compile(".;$"); then :)
12:58 jonalv Not one statement per file on table per file
12:58 egonw ummm ".*;$"
12:59 jonalv so you can get a view of the hole table at one place just the one table nothing more nothing less
12:59 egonw jonalv: I don't understand that...
12:59 thomas_ku egonw: yes that would work too
12:59 jonalv egonw, which part? :) (or all of it?)
13:00 egonw all
13:00 egonw it's Friday afternoon...
13:00 jonalv Okey so let's take it from the begiining
13:00 jonalv The Tablecreator reads the .sql files and creates those tables
13:00 jonalv There is one sql file for each table
13:01 jonalv foreign key stuff need to be added after all tables are created right? (otherwise they will complain about referencing a none existing table)
13:01 jonalv right?
13:01 egonw ok, sounds right
13:01 egonw what's next...
13:02 jonalv so I read each statement in the tables and sort them dependiong on if ther begin with alter or create
13:02 egonw the statement in the tables?
13:02 jonalv first I run the create statementds and then I run the alter statements
13:02 egonw which tables? the ones you just created?
13:03 jonalv The ones defined in the .sql files yes
13:03 egonw why not fix the sql files?
13:03 egonw they sounds broken to me
13:03 jonalv because I want one sql file per table
13:03 jonalv that makes them easy to read
13:03 jonalv and easy to manage
13:03 egonw that's fine
13:04 egonw but why do you expect an ALTER before the CREATE?
13:04 jonalv I don't but I read all files one after anothe
13:04 jonalv so in each file I expect create to be before alter but I need to collect all create statementd from all files
13:05 egonw you mean some 1.sql may call an ALTER on a create in 2.sql ?
13:05 jonalv not really
13:06 jonalv more like an alter on table one might add a foreign key to table 2 which hasn't been created yet
13:06 egonw if the ALTER in x.sql only effects the CREATE in the same file, which is actually earlier in the file, then what is the problem?
13:06 egonw ah, ok
13:06 egonw so there are dependencies between the .sql files...
13:06 egonw why try to keep them separate then?
13:06 egonw as they clearly not independent?
13:07 jonalv Bacause I am designing an object oriented api and wants to think about the whole structure based upon the objects. That is separate things
13:07 jonalv And automate the the other stuff
13:08 jonalv It's just about building a nice devlopment environment...
13:08 egonw then make properly defind dependencies...
13:08 egonw add some comment in the file, indicating the deps
13:09 egonw then do it the proper OOP way
13:09 jonalv "the proper OOP way"? You have a patent soltuion to all my problems? Hit me!
13:10 egonw no, but if you make an OOP design, that includes the inheritence
13:11 egonw if 'table X' links to 'table Y' then the object 'table X' depends on 'table Y'
13:11 egonw and therefore, you need to define that dependency
13:11 jonalv yes?
13:12 jonalv And in what way are you saying that I should define that dependency?
13:12 jonalv I don't think I follow...
13:12 egonw add something like this in the first few lines of the file:
13:12 egonw # tableID: something
13:13 egonw # depends: somethingElse, blaToo
13:13 egonw then your code knows that it must load somethingElse and blaToo first
13:13 egonw before it can load something
13:13 jonalv in the sql file?
13:15 jonalv (I still can't get that matcher to match btw)
13:16 egonw a much simpler approach is to split up CREATE and ALTER statements...
13:16 egonw tableX.create.sql
13:16 egonw and
13:16 jonalv yep
13:16 egonw tableX.alter.sql
13:16 jonalv But I wanted to get some training on regexps aswell...
13:17 jonalv And it is nice to get to write the way you want to when writing the sql
13:17 jonalv I think sql is enough of a headache anyway...
13:18 jonalv However the point was taht I wanted to be able to overlook the complete table all at once...
13:18 jonalv not having to open two files
13:19 jonalv Then I could just awell write all create statements in one file and the alter in another or just write one big file with all the create statamts first and the alter statamnts last...
13:20 jonalv What I can't figure out is how to match a string finishing with ;
13:23 egonw endsWith() ?
13:24 jonalv yey it worked
13:25 jonalv finally
13:25 jonalv :)
13:30 CIA-31 bioclipse: jonalv * r3802 /trunk/playground/plugins/net.bioclipse.​structuredb/src/net/bioclipse/structured​b/persistency/tables/TableCreator.java: The TableCreator seems to be working according to my evil plans... :)
13:46 CIA-31 bioclipse: jonalv * r3803 /trunk/playground/plugins/net.bioc​lipse.structuredb/src/net/bioclips​e/structuredb/persistency/tables/ (5 files): Wrote the sql for all the tables. Next step will be to create dao tests and start performing the iBatis mapping
13:56 EskilA joined #bioclipse
13:58 CIA-31 bioclipse: jonalv * r3804 /trunk/playground/plugins/net.bioclipse.structured​b/tests/net/bioclipse/structuredb/persistency/dao/ (LibraryDaoTest.java StructureDaoTest.java UserDaoTest.java): Created dao tests. They fail nicely.
14:31 CIA-31 bioclipse: biocoder * r3805 /trunk/plugins/net.bioclipse.statistics/src/​net/bioclipse/editors/MatrixGridEditor.java: Working on MatrixGridEditor context menu
14:43 CIA-31 bioclipse: jonalv * r3806 /trunk/playground/plugins/​net.bioclipse.structuredb/ (10 files in 5 dirs):
14:43 CIA-31 bioclipse: added a few jars needed by the framework.
14:43 CIA-31 bioclipse: Began writing on Spring config file applicationcontext.xml.
14:43 CIA-31 bioclipse: And created sqlMapConfig file and the actual mappings. Run into trouble with resource loader which doesn't find the mapping files. Something is wrong with the path to them.
14:44 jonalv Trouble again... aLways trouble when doing anything even remotaly related to classpath's....
15:01 CIA-31 bioclipse: jonalv * r3807 /trunk/playground/plugins/net.bioclip​se.structuredb/src/sqlMapConfig.xml: Now the resource references to the mapping files are correct.
15:29 CIA-31 bioclipse: jonalv * r3808 /trunk/playground/plugins/net.bioc​lipse.structuredb/src/net/bioclips​e/structuredb/persistency/mapping/ (Library.xml Structure.xml): Wrote some mappings. It seems as if the mappings don't know about stuff written in other files. Maybe all of it will have to move into one file instead.
17:40 Nout joined #bioclipse

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