Hopbot log for 2007-10-03 - Helma IRC channel: #helma on irc.freenode.net

2007-10-03:

[13:45] <CVertex> hi guys
[13:45] <CVertex> anyone here?
[14:02] <zumbrunn> hi CVertex
[14:05] <CVertex> hi zumbrunn
[14:05] <CVertex> how are you this evening?
[14:05] <zumbrunn> fine :-)
[14:05] <CVertex> /morning/afternoon
[14:06] <CVertex> delightful!
[14:06] <zumbrunn> 16:08 here
[14:06] <CVertex> 8 past midnight here, i should get some sleep, but this bug is .....bugging me
[14:06] <zumbrunn> ;-)
[14:07] <CVertex> what platform do you run helma?
[14:08] <zumbrunn> locally sometimes on macosx
[14:08] <zumbrunn> freebsd mostly
[14:10] <CVertex> i just started using rhino to write desktop scripts for my OS X box
[14:10] <CVertex> i'm loving it
[14:10] <CVertex> i really dig javascript for quick hack scripting
[14:11] <CVertex> which is strange, cos i C# at work
[14:12] <CVertex> do u use helma on it's own, or do you bundle a stack of other libraries too on OS X?
[14:13] <zumbrunn> For developing web apps I use java libraries depending on what that particular app needs, of course
[14:13] <zumbrunn> otherwise pretty much just helma
[14:14] <CVertex> on OS X, do u use just dump your libraries into /Library/Java/Extensions?
[14:15] <zumbrunn> yes, that works, anyway
[14:15] <zumbrunn> but you can also just drop them into the lib/ext/ sub dir of your helma install
[14:16] <CVertex> i'm writing a js lib wrapper for a wordnet java package i found, but when i put the jar into /Lib/Java/Extensions i get the evil error when I try to importPackage()
[14:16] <CVertex> js: "<stdin>", line 4: uncaught JavaScript runtime exception: ReferenceError: "mit" is not defined.
[14:17] <CVertex> i have nooo idea why that happens
[14:17] <CVertex> is rhino not properly scouring the java.class.path system property?
[14:17] <zumbrunn> what if you try to access the package directly through the Packages object in rhino?
[14:18] <CVertex> do u have an example?
[14:18] <rjb> .
[14:18] <zumbrunn> Pakkages.org.foo.whatever
[14:19] <zumbrunn> http://helma.zumbrunn.net/intro/javapackages
[14:19] <zumbrunn> *Packages*
[14:20] <CVertex> is Packages part of rhino?
[14:20] <CVertex> or a helma extension?
[14:20] <zumbrunn> I believe so
[14:20] <rjb> rhino
[14:20] <zumbrunn> part of rhino
[14:20] <CVertex> cool
[14:20] <CVertex> i'll try that
[14:21] <CVertex> bam!!
[14:21] <CVertex> thanks guys
[14:21] <zumbrunn> :-)
[14:21] <CVertex> rhino is woefully under documented
[14:21] <CVertex> i didn't even know importPackage() existed till i found a blogpost using it
[14:21] <rjb> it's not that bad really
[14:22] <rjb> there's quite a bit on mozilla.org
[14:22] <CVertex> i sniffed around the rhino source code when i wrote my own interpreter
[14:22] <CVertex> where is the packages thing documented?
[14:22] <rjb> http://www.mozilla.org/rhino/ScriptingJava.html
[14:22] <zumbrunn> http://www.mozilla.org/rhino/ScriptingJava.html
[14:22] <rjb> hehe
[14:25] <CVertex> okay, why does importPackage(java.lang) work, but importPackage(my.package) not?
[14:25] <CVertex> ah, that's why
[14:25] <zumbrunn> why?
[14:25] <CVertex> Packages == java
[14:26] <zumbrunn> don't think so
[14:26] <CVertex> nope, maybe java.* is special cased
[14:27] <rjb> don't importPackage(java.lang)
[14:27] <CVertex> yeah, conflicts with ECMAScript base classes
[14:27] <rjb> you'll lose String, Object etc. (the JS objects)
[14:27] <CVertex> just as an example
[14:28] <rjb> own interpreter, of what?
[14:28] <rjb> (java == Packages.java actually)
[14:28] <CVertex> so importPackage(java.*) is special cased
[14:29] <CVertex> that's fair
[14:29] <CVertex> basic scripting runtime for embedded environment
[14:29] <CVertex> not terribly exciting or innovative
[14:29] <rjb> an own runtime?
[14:30] <CVertex> yeah, it was for work.... in a team of 10
[14:31] <rjb> and why not use something that already exists?
[14:31] <CVertex> good question.... ask the architect
[14:32] <rjb> a good scripting runtime is no small job i think
[14:33] <CVertex> we ended up using javascript and stripping out alot of fat
[14:33] <CVertex> prototypes, base object types, and just get continuations, closures,
[14:33] <CVertex> get==kept
[14:34] <CVertex> yaaaay! i can search the wordnet dictionary on my desktop!
[14:34] <CVertex> in javascript
[14:35] <rjb> given some time i think i'd like to hack rhino a bit
[14:35] <rjb> the shell especially
[14:35] <rjb> i could use making it read some config on startup
[14:36] <CVertex> that's what i'm trying to do now for my OS X desktop. i've never been into bash scripting, python or anything else. javascript is my favourite scripting language now that i've been doing web for too long
[14:37] <rjb> and it would be real nice to have Object.dontEnum like in helma
[14:37] <CVertex> just write a prototype for it?
[14:37] <rjb> i greatly miss any sort of framework for js modules or packages
[14:38] <CVertex> this is my favourite j library, http://osteele.com/sources/javascript/functional/
[14:38] <rjb> uh dontEnum can't be done w/o some java hacking
[14:38] <rjb> i'm not terribly good at that
[14:39] <CVertex> i'm not a big java fan either. i prefer C# for OO and javascript everywhere else
[14:39] <CVertex> i started to use scheme for day to day things, but i couldn't maintain anything i wrote
[14:40] <CVertex> i forgot the language too quickly...
[14:41] <rjb> if you use the rhino shell in a terminal, you really want to have rlwrap or some equivalent
[14:41] <CVertex> rlwrap? lemme google that
[14:41] <rjb> for command-line editing, history and so on
[14:41] <CVertex> jline?
[14:42] <rjb> jline is pretty lame compared to the real readline
[14:43] <CVertex> i do miss better console input... is there a java readline port?
[14:43] <rjb> well that's jline, but you don't really need it
[14:43] <rjb> rlwrap works just fine, as a wrapper for launching the rhino shell
[14:44] <CVertex> how do i use it in the rhino shell?
[14:44] <rjb> ok i'm in a hurry right now, ping me later for a sample shellscript to launch rhino
[14:45] <rjb> c.u.
[14:46] <CVertex> thanks zumbrunn for your help
[21:50] <rjb_> __lookupGetter__ and __lookupSetter__ : what are they supposed to do?

 

 

In the channel now:

Logs by date: