Log of the #nice channel on irc.freenode.net

Using timezone: Central European Time
* bonniot leaves04:14
* arjanb leaves05:58
* grom358 joins09:56
hey there
* bonniot joins11:04
* arjanb joins12:08
* ArtemGr joins13:44
what's new?13:48
<ArtemGr>i want to make an embedded ObjectDB. : /
(almost) ODBMS, that is.
<CIA-3>03bonniot * 10Nice/testsuite/compiler/expressions/arrays/asCollections.testsuite: Known bugs: wrong conversions from array to List.13:49
<ArtemGr>don't know about time, but i'll try, with some cut corners
<bonniot>lots of effort into framework code, right?13:50
no satisfying solution exist?
<CIA-3>03bonniot * 10Nice/testsuite/compiler/typing/polymorphism.testsuite: Known bug: polymorphic anonymous function on arrays.13:52
<raboof>hm, the `non-local variables' section of http://nice.sourceforge.net/cgi-bin/twiki/view/Doc/OptionTypes nicely shows how a proper static typing system can prevent some non-obvious errors :)13:53
<ArtemGr>nay, databases either try to implement ACID, which is too complicated and is not suitable for objects, or they have some half solutions, like the need to implicitly update objects (instead of marking them dirty). and there is only _single_ free ODBMS: Ozone.
most open-source commertial databases are in fact half-relational, btw.13:55
<bonniot>raboof: indeed. on the other hand, it's a bit annoying when you are not using threads ;-/
<ArtemGr>i mean most object databases are half-relational.
<raboof>bonniot: true13:56
<ArtemGr>what's so annoying?
<raboof>having to create the local copy of the package variable
<bonniot>raboof: actually, if there is no synchronization, it should be legal for the compiler to do the copy for you, so you would get both benefits13:57
<raboof>hmmm. so `if (s != null) { ... }' would silently use a copy of s inside the block? that might lead to some unexpected behaviours. 13:59
<bonniot>in what case?14:00
<raboof>well, when someone tries to do `if (s != null) { wait untill s becomes null }'
<ArtemGr>in fact, the JVM is allowed to make a local copy, if it isn't volatile, so there can't be unexpected behaviours there...14:01
<bonniot>yes, the idea would be to follow what the JVM is allowed to do anyway
<raboof>i'm not very good with java, don't know what the JVM may or may not do :)14:02
<bonniot>raboof: wouldn't that be while (s == null) { wait } , which is OK
or how do you wait?
<raboof>not sure.... (note that i'd be quite ok with `if (s == null)' making a local copy, i'm just trying to think of hypotetical future programmers getting bitten by it :))14:03
* grom358 leaves
<bonniot>indeed, it's very helpful to think of such cases14:04
the rules for the JVM have limits which were durely designed to prevent such surprises
like no copy across a synchronization
so they should be at least a good starting point14:05
<raboof>yeah, shoulders of giants and everything ;)
<bonniot>ArtemGr: i once read about a database-in-memory system in java, can't find it now, does that strike a chord?14:06
raboof: .-)
<ArtemGr>bonniot: Prevailer?
<raboof>(i believe libsqlite is a database-in-memory for C which might have Java bindings)14:07
<bonniot>i think that was prevailer indeed
what do you think about it?
<ArtemGr>sqlite is a conventional embedded database, it's not "in memory". sqlyte have good (underlying) storage engine, but it's not Java.14:08
looked intriguing to be, but I have little experience with databases14:10
s/to be/to me/14:12
<ArtemGr>to me the point of ODBMS database is to transparently "swap out" objects to free memory, and keep consistency and durability in that, by the way. i like my problems to be small while working on large data sets. Prevayler is not _generally_ useful, but it's useful for _particular_ projects where you know that data set is not that large and you have a dedicated server. I don't like slow full save/re
store on Prevayler, though. Overall, Prevailer is a (sometimes smart) point ov fiew, but not a "smart" library.
<raboof>is there a complete (bnf or so) description of nice syntax? (question at hand: can i have a class be generic in 2 types?)14:13
<bonniot>class Foo<T,U> { ... }14:15
arjan wrote an antlr grammar, which could be transformed automatically into html grammar
if i remember correctly14:16
arjanb: ?
ArtemGr: i'm looking at your overloading resolution bug14:17
it's really a corner case
because of the Object return type, field accesses viewed as functions are valid candidates!
i should find a simple solution14:18
i hope ;-)
why do you have to use Object?
raboof: was that what you needed?14:20
<raboof>bonniot: jep!
<CIA-3>03bonniot * 10Nice/src/bossa/syntax/overloadedsymbol.nice: Whitespace cleanup.14:22
<ArtemGr>bonniot: i use Object becouse it can be any object, it is used for "synchronize( this.dbLock() ){ ... }". I understand why Nice looks at those "candidates", but i don't understand why the right one can be silently choosed.14:24
<bonniot>oh, it's a bug alright14:25
i understand the problem, thinking about the cleanest way to handle this
trying a one-liner ;-)14:27
ok, it's working. i'll add an assert to the testcase to make sure the right value is returned ;-)14:32
<ArtemGr>yes : )
<bonniot>running a bootstrap for testing...14:36
i'll have to go, so i will commit when i'm back, provided it passes ;-)14:37
<CIA-3>03bonniot * 10Nice/src/nice/tools/testsuite/TestNice.java: Don't force an exit from the VM when the test is a success.14:38
<bonniot>ArtemGr: any reason you put the new testcase at the top of fields.testsuite?14:39
<ArtemGr>to be executed first?14:45
<bonniot>i see14:47
i usually have a temp.testsuite to contain the few testcases i'm interested at a certain time14:48
<ArtemGr>btw, shouldn't assertions accept any object as a message? currently only String seems to be accepted.14:51
<bonniot>so, the problems with prevayler is that it might not scale to huge data, and that save/restore is slow?
ArtemGr: if you find it useful, I don't mind14:52
<ArtemGr>about Prevayler: yes, you've summed me up right : )
some applications have gigabytes of data, with only a small subsent needed at the time.
some should work in poor environment (client machine can be old, cheap and multitasking).
<bonniot>do OO DBs that allow transparent use of the objects? or you need special handling (transactions, ...)14:55
<ArtemGr>transactions are useful anyway, to differentiate a consistent state from a intermediate one, (but ACID transactions are overkill and have more problems than pluses: deadlocks, broken encapsulation, additional problems in implementing transparency).14:59
Good ODBMSes have _almost_ transparent object persistance (Ozone have). Solutions to transparency are: to use proxy objects (implementing the same interface as the real object); force the user to use ObjectID instead of direct references; bytecode modifications / dynamic object modifications.15:00
<raboof>hm. as a small excercise, i'm trying to implement a generic binary search tree16:30
(no, i'm not the guy from the forum :))
http://wiki.wxwidgets.org/paste.cgi?id=931 stopped working after i added the constraint `Comparable' to the IntTree
am I using it in the wrong way? Or maybe my construction goes wrong: `IntTree<Number> mytree = new IntTree();'16:31
<bonniot>hum, that paste service is not practical, you can't copy paste without the line numbers?17:41
it compiles here
<raboof>oh. then it's probably my way of constructing it?17:49
<bonniot>yes, checking that
it doesn't look right indeed17:52
i'll commit the bugfix for artem first, then i'll look at ti17:53
<raboof>sure, no problem ;)
<CIA-3>03bonniot * 10Nice/ (2 files in 2 dirs): 17:56
Fix overloading resolution for instance fields when all field accesses are
also be valid candidates.
<bonniot>raboof: http://rafb.net/paste/results/BSGvyh81.html18:04
it looks like you found a bug in the implementation of class constraints
<raboof>aha ok, yay :)
<bonniot>the above paste is a workaround: put the constraint on the method only, not on the whole class18:05
<raboof>will you make sure it gets into the bugtrackingsystem? i'm sure you can describe it much better than me :)
<bonniot>i could reproduce the problem on a self-contained testcase
raboof: yeah, OK
btw, did you see my thoughts on Comparable in the forum? what do you think?18:06
(is IntTreeNode necessary in your design?)18:08
<raboof>i agree the effect you describe is desirable, but i can't really judge about how you do it ;)18:09
not sure. i created it because i think an IntTree without any nodes is still an IntTree18:10
without the IntTreeNode the distinction between no tree, a tree with zero elements and a tree with one element gets akward18:11
but there might be a solution for that i'm overlooking :)
another option is to have subclasses
not saying it's better
<raboof>eh, not sure how that solves it18:12
<bonniot>make EmptyIntTree a subclass18:13
ah, but you want them modifiable?
then forget it
<raboof>yeah, i want an `insert' later, too :)
* Artem joins18:55
* ArtemGr leaves
* Artem leaves
* ArtemGr joins
<bonniot>arjanb: is there a reason why the nullness markes in monotype.nice are not named constants, or enums?19:12
raboof: i think i have a fix for the class constraint bug. i have to leave now, so i'll launch a full check to make sure it is OK19:13
<raboof>wow, that's fast
<arjanb>bonniot: no, i have done only minimal conversion at that time19:28
the antlr grammar isn't complete and outdated for a year19:33
i will wait till antlr 3 beta release to make a new grammar19:34
* ArtemGr leaves19:48
* Bluelive joins21:13
return with a void typed argument for a void returning function, daring21:17
allways on assertions give a risk of using assertions for input validation ?21:19
* Bluelive leaves22:08

Generated by Sualtam