Hopbot log for 2008-05-02 - Helma IRC channel: #helma on irc.freenode.net

2008-05-02:

[1:36] <bslivka> Ah hah heh hello
[1:42] <midnightmonster> ?
[1:42] <midnightmonster> hello
[2:08] <bslivka> Ah sorry
[2:08] <bslivka> Have you figured out a solution to your database problem yet?
[2:16] <midnightmonster> which?
[2:16] <midnightmonster> of all the issues I've had today, here are where they stand:
[2:17] <midnightmonster> ?db transactions: Helma doesn't use 'em. It probably should. For the moment it doesn't really cause me any problems
[2:18] <bslivka> and the order thing?
[2:18] <midnightmonster> arbitrary order of inserts during commit(): this breaks my foreign key constraints. I think there's a very straightforward fix to be made in the Helma source which I've proposed in a message on the list. for the moment, I've just removed my constraints
[2:19] <bslivka> You could also add the parents, commit() then add the children
[2:19] <midnightmonster> probably. but that'd be a PITA.
[2:20] <bslivka> software engineering isn't always pretty
[2:20] <bslivka> Though it should be, that's what we're all striving for, anyway.
[2:20] <midnightmonster> nope. I figure with my constraints missing I'm with the grand company of MySQL users through the ages
[2:21] <bslivka> I hear PostgreSQL is pretty nice, neither here nor there though.
[2:21] <bslivka> that's neither here nor there though
[2:22] <bslivka> err.. friday. Shouldn't be talking, crap comes out.
[2:22] <midnightmonster> I don't actually use MySQL. for my PHP stuff I use Postgres, and here I'm using h2. I just mean the mysql users are getting by without them (and usually none the wiser)
[2:22] <midnightmonster> them=foreign key constraints
[2:22] <bslivka> yeah.
[2:23] <bslivka> in my own experiences I haven't really had a lot of fun trying to use DB constraints with helma
[2:23] <midnightmonster> have you tried h2?
[2:23] <midnightmonster> what do you use with helma?
[2:23] <bslivka> At the moment I'm just using the built in DB
[2:23] <bslivka> which has its own fun little joys, which make me want to stop using it at some point in the future
[2:23] <midnightmonster> the only project I've finished in helma I used the built-in, too. and the other spare time one I'm doing uses the built-in.
[2:24] <bslivka> but on the whole its flexibility is nice to have while you're still undecided about the exact structure of the application
[2:24] <midnightmonster> yup
[2:24] <bslivka> it's like a pencil drawing before you ink things in
[2:24] <midnightmonster> it would be nice if there were a good way to switch an existing data set from one to the other
[2:25] <bslivka> Yeah, at the moment I'm not entirely sure how I'm going to go about that.
[2:25] <midnightmonster> the thing that really screwed me up today was the documentation for HopObject.get() (and the docs for helma.Aspects.addBefore, and a few mental errors)
[2:25] <bslivka> The helma documentation is just a mess
[2:26] <bslivka> I'd contribute to fixing it myself, but I'm afraid I still don't have much of a clue as to exactly how helma works.
[2:26] <bslivka> so i'd only add to the confusion
[2:26] <midnightmonster> apparently the problem with HopObject.get doc came up 5 years ago on the mailing list. it still says the same wrong thing.
[2:27] <bslivka> As I understand Helma NG is doing away with .get altogether
[2:27] <bslivka> don't quote me on that, I might be wrong
[2:27] <midnightmonster> first I knew of Helma NG was when I started browsing source to track down my issues today
[2:27] <midnightmonster> I guess I should subscribe to the dev list
[2:28] <bslivka> instead it's going to be direct property accesses
[2:28] <bslivka> I look forward to seeing what the unintended consequences of that are.
[2:29] <midnightmonster> as in animals['llama'] instead of animals.get('llama') ?
[2:29] <bslivka> that's right.
[2:29] <midnightmonster> a small but pleasing bit of syntactic sugar
[2:30] <bslivka> well it's also animals.llama = new Animal();
[2:30] <midnightmonster> I think it's JSAdapter or one of the related sorts of things that makes overloading member access in general (instead of only pre-named members) possible. I did see something about that
[2:30] <bslivka> instead of var a = new Animal; a.name="llama"; animals.add(a)
[2:30] <bslivka> That's right.
[2:31] <midnightmonster> btw, if you write constructors for your types you can do that a bit faster already, e.g., animals.add(a = new Animal('llama'));
[2:31] <bslivka> As I understand it though, in Helma NG, jsadaptor is employed automatically, when you define the accessor properties of an object
[2:32] <midnightmonster> makes sense
[2:32] <bslivka> So it looks like native objects just work like hopobjects
[2:32] <bslivka> sortakinda
[2:32] <midnightmonster> it's funny to me that overloading general member access is the one "dynamic" thing PHP can do that JavaScript can't.
[2:33] <bslivka> I didn't know php could do that.
[2:33] <bslivka> is that a php5 thing?
[2:34] <bslivka> Nevertheless Javascript2 will be able to do it.
[2:34] <midnightmonster> yeah, php5
[2:35] <bslivka> Ecmascript4 specifies the ability to define general get and set accessor methods on a class
[2:35] <midnightmonster> but not an unclassed object?
[2:36] <bslivka> Nah, I don't think so.
[2:36] <midnightmonster> ?at some point I'll maybe learn how to use the JSAdaptor stuff. or maybe I'll just wait for Helma NG to do it for me or JS2.
[2:36] <bslivka> helma 1.6.2 has JSAdaptor in it, you can download that now.
[2:36] <bslivka> and it's actually pretty easy.
[2:37] <midnightmonster> I'm using 1.6.2 now.
[2:37] <midnightmonster> just not jsadaptor
[2:37] <bslivka> a = new JSAdaptor();
[2:37] <bslivka> and then you just define a.__get=function(name){/*code here*/ return object }
[2:38] <bslivka> I think that's the name of the getter function
[2:38] <bslivka> and the same deal with set, you've got a.__set=function(name, value) {};
[2:38] <midnightmonster> (?between dontEnum and all Java libraries at my fingertips, server-side JS is quite the different and better experience already)
[2:40] <midnightmonster> that's straightforward. I can't think what I'd need it for yet, though
[2:40] <bslivka> Maybe i got it backwards there.
[2:41] <midnightmonster> ?
[2:41] <bslivka> I haven't actually done it myself so it might actually be that you define an object with those methods first
[2:41] <bslivka> and then a= new JSAdaptor(o);
[2:42] <bslivka> I only saw a colleague using it.
[2:44] <midnightmonster> it's closer to the latter.
[2:44] <midnightmonster> just looked up the blog post introducing it back in 2005
[2:44] <midnightmonster> http://blogs.sun.com/sundararajan/entry/self_javascript_and_jsadapter
[2:45] <midnightmonster> his syntax is actually a little off (missing commas in object definitions, misplaced paren in last example, but the idea's clear
[2:46] <midnightmonster> looks quite powerful
[2:49] <bslivka> My head reels from the possibilities
[2:49] <bslivka> it would be easy to get carried away and use it for things that don't really need it.
[3:08] <midnightmonster> (I just killed eclipse trying to open a 3.7MB XHTML file)
[8:44] <zumbrunn> thanks midnightmonster, I changed the docs
[8:44] <zumbrunn> http://helma.zumbrunn.com/reference/helma.Aspects.html#helma.Aspects.addBefore
[8:44] <zumbrunn> http://helma.zumbrunn.com/reference/HopObject.html#HopObject.get
[18:09] <midnightmonster> zumbrunn, I've done some more tests, and the .get() documentation still isn't quite right.
[18:09] <midnightmonster> I'll email a corrected version
[18:09] <zumbrunn> ok
[18:09] <zumbrunn> or use the pastbin
[18:09] <zumbrunn> pastebin
[18:14] <midnightmonster> here's wacky stuff: hopobject properties are case insensitive
[18:15] <midnightmonster> this is with arbitrary properties on an object-db-backed site
[18:17] <zumbrunn> yes, that's right
[18:17] <midnightmonster> that was unexpected
[18:17] <zumbrunn> not sure why things ended up that way
[18:21] <zumbrunn> http://helma.org/pipermail/helma-user/2006-June/006574.html
[18:28] <midnightmonster> here's something else: the children of a hopobject and the hopobject's named-in-type.properties properties that point to HopObjects share a single namespace
[18:29] <midnightmonster> but not properties created dynamically that point to a HopObject, not properties defined in type.properties that point to plain values
[18:31] <midnightmonster> so hop.get('spork') gets the pre-defined property 'spork' whose value is another hopobj if that property exists, or the member of _children named (by accessname) 'spork' if that exists.
[18:31] <midnightmonster> there can never be both
[18:32] <midnightmonster> if spork is defined in type.properties but contains a plain value, it will never be retrieved by hop.get and doesn't interfere with having a child named 'spork'.
[18:38] <midnightmonster> If I dynamically create a property 'spork' that refers to a hopobject, if I'm using the object db that value will be persisted but it will not be retrieved by hop.get('spork'), only by hop.spork
[18:39] <zumbrunn> huh? when you create that property how?
[18:39] <midnightmonster> I mean just by setting an arbitrary property
[18:40] <midnightmonster> one not previously noted in type.properties
[18:40] <zumbrunn> this.foo = new HopObject() ?
[18:40] <midnightmonster> e.g., this.someRandomName = anyReferenceToAHopObjectExistingOrNew
[18:40] <midnightmonster> yeah
[18:41] <zumbrunn> hmmm wild
[18:41] <midnightmonster> ?slightly confusingly, this.get('objReferringPropDefinedInTypeDotProperties') and ?this.objReferringPropDefinedInTypeDotProperties both work and return the same thing, but only the first of these works: this.get('nameOfAChild') and this.nameOfAChild
[18:43] <midnightmonster> and the behavior of strings and numeric strings as arguments to get is the same for object db- and rdbms-backed collections
[18:43] <midnightmonster> and numbers, for that matter
[18:46] <zumbrunn> not wild, actually
[18:47] <zumbrunn> I read more into what you were saying than I should have
[18:47] <zumbrunn> I know the embedded db persists hopobject properties
[18:47] <midnightmonster> it actually does make sense now I've explored all the corner cases, but it's not obvious
[18:48] <zumbrunn> but they are not available via hobj.get() since they are not "children"
[18:49] <midnightmonster> but something defined like this in type.properties:
[18:49] <midnightmonster> spork = Object(HopObject)
[18:49] <midnightmonster> hop.get('spork') *will* return the spork property
[18:49] <zumbrunn> then they become a "child", yes
[18:50] <midnightmonster> sort of. they're not accessible by hop.get(0) or any other number
[18:50] <midnightmonster> unlike the objects actually stored in _children
[18:51] <zumbrunn> didn't know that
[18:51] <midnightmonster> ???a weird consequence of the shared namespace for pre-defined, object-pointing properties and children is that, e.g., if I have a WikiPage type whose children are pages one level deeper in the url path like /Page+1/A+Child+Of+Page+1, and WikiPages have a defined property history = mountpoint(WikiPageHistory), then I can never have a WikiPage with name='history'
[18:52] <zumbrunn> yes, the same was true with actions, until recently
[18:53] <zumbrunn> (now the tailing '/' makes the difference )
[18:53] <midnightmonster> from what I've heard, the plan with helma ng is to completely collapse the namespace so that regular properties, object properties, and children are all accessed by the same obj['whatever'] method
[18:54] <midnightmonster> JSAdapter makes that possible, and it's certainly simpler, but I'm not sure it's desireable.
[18:54] <zumbrunn> I'm sure we'll talk about that next week at the Helma Meeting Spring 2008
[18:54] <midnightmonster> alas, I'm not going to make it
[18:54] <zumbrunn> to bad!
[18:55] <midnightmonster> I'd have to be travelling 6 days to get non-insane airfare.
[18:55] <midnightmonster> and it's too long to be away right now
[19:05] <zumbrunn> should we try to connect you virtually into the meeting?
[19:06] <zumbrunn> or should we just discuss things online afterwards?
[19:07] <zumbrunn> I guess you'll be sleeping during the prime time of the meeting
[19:08] <zumbrunn> and so will be bslivka and maks
[19:08] <midnightmonster> what time is it again?
[19:09] <zumbrunn> starting about 10 CET
[19:09] <zumbrunn> open end, I guess
[19:10] <midnightmonster> what's CET?
[19:10] <midnightmonster> Central Europe?
[19:10] <zumbrunn> EST -6
[19:10] <zumbrunn> yes
[19:10] <midnightmonster> that's EST +6
[19:11] <zumbrunn> right :-)
[19:12] <midnightmonster> if you guys would be willing to go to the trouble of doing some kind of virtual something, I would definitely wake up early for it
[19:12] <zumbrunn> where are you? EST, PST or what?
[19:12] <midnightmonster> EST
[19:12] <midnightmonster> so that's 4 AM here
[19:13] <zumbrunn> yes, so maybe the best time to connect would be at the beginning of the afternoon
[19:14] <zumbrunn> depending on what kind of virtual something we could get off the ground
[19:14] <zumbrunn> 2pm here is 8am for you
[19:15] <zumbrunn> and by that time we probably would have some things to tell you and get feedback on
[19:15] <zumbrunn> if we just do it via irc or so
[19:15] <zumbrunn> but maybe we could do something with video/audio
[19:15] <midnightmonster> anyone with a mac they could just leave on and pointing at people? I've never actually used ichat, but the video thing is supposed to be easy and effective
[19:16] <zumbrunn> yes, could work fine
[19:18] <midnightmonster> do you know if any attendees have a convenient mac? or maybe I should ask on the list
[19:18] <midnightmonster> (I assume there's good net access there?)
[19:18] <zumbrunn> I think so, yes
[19:19] <zumbrunn> many will have macs, I'm sure
[19:19] <zumbrunn> I know I will
[19:19] <zumbrunn> so we don't have to go looking far for that
[19:21] <midnightmonster> it would be great if anybody had a spare one (or spouse/partner/child one) that could be dedicated to the purpose for a while, 'cause I'd love to at least listen in as much as possible
[19:23] <zumbrunn> I could bring my isight camera, so I wouldn't need to point the macbook around the room
[19:23] <midnightmonster> lol
[19:23] <midnightmonster> that'd probably be nicer
[19:24] <zumbrunn> afk, bbl

 

 

In the channel now:

Logs by date: