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

2007-07-23:

[0:12] <jsp> henplus looks nice, but have you seen h2's built-in web console? it's really surprisingly good
[0:12] <jsp> and it's easy to configure it to run in-process with Helma so you can use it in embedded (fastest) mode and get the console
[0:30] <rjb> yes
[0:31] <rjb> i'm using henplus with h2 in embedded mode right now
[0:32] <rjb> i tried the in-browser console, but it feels kind of awkward for some things
[0:33] <rjb> maybe i'm just spoiled by mysql's excellent command-line client
[0:44] <rjb> oops
[0:44] <rjb> i'm trying to insert 46479 rows of numbers into a h2 table
[0:45] <rjb> it's taking an incredibly long time:/
[0:51] <rjb> must be doing something wrong - this really shouldn't be still running
[0:58] <rjb> ok found my mistake
[0:59] <rjb> 46479 commands in 14.657 sec; avg. time 315 µsec; 3171 per second
[0:59] <rjb> looks kind of reasonable now
[1:00] <rjb> ok, will go on playing later. goodnite
[1:00] <jsp> you won't be able to simultaneously access the db with henplus and helma if it's embedded unless they are running in the same process
[3:31] <jsp> welcome rnst
[3:34] <rnst> thanks, jsp ;)
[3:34] <jsp> new to helma?
[3:35] <rnst> yeap, zumbrunn give me the reference to this channel
[3:36] <jsp> (same thing I ask everybody) what did/do you use before/other than helma?
[3:38] <rnst> I haven't helma yet, nor use other framework, I'm still reading about frameworks
[3:38] <rnst> I'm just capable of coding valid html / css acording to webstandars, heh, that's all
[3:38] <jsp> cool
[3:39] <rnst> jsp, sorry for not being able to give you the feedback :P
[3:40] <jsp> no, that is feedback. I can't really remember how I got started (or rather, what it felt like to be getting started) with programming/scripting. I have no idea if Helma's a good place to get started or no
[3:42] <rnst> well, have you tried other frameworks?
[3:43] <jsp> worked in PHP for several years, which really isn't a framework
[3:43] <jsp> but is a dynamic(-ish) server-side scripting language
[3:44] <rnst> yeah
[3:44] <rnst> heh, so you can't really tell me why should I use helma instead other frameworks?
[3:44] <jsp> sure I can:
[3:44] <jsp> learn only one language
[3:45] <jsp> you need javascript on the client, you might as well use it on the server
[3:45] <jsp> and save the constant mental shifts
[3:45] <rnst> heh
[3:46] <rnst> can I see some website using helma?
[3:47] <jsp> helma.org of course, and antville.org/blogger.de/twoday.net are all running the same high-volume-oriented Helma-based blogging engine
[3:47] <jsp> I don't know about many others, though
[3:48] <jsp> I'm building my first production helma site now, but it's nothing to look at yet
[3:48] <jsp> if you're wondering what Helma sites "look like", they don't. There's no stock helma templates or look that's even suggested, much less defaulted
[3:50] <rnst> heh, yeah
[3:55] <jsp> I'm pseudo-blogging my progress at http://letterblock.com/intheopen , but I don't know how meaningful much of it will be if you've never done programming before
[3:56] <jsp> another reason to go Helma is JavaScript considered in itself. It's at least as powerful as Python or Ruby and better-defined than Ruby at least (not sure about Python)
[4:01] <jsp> as far as libraries, Python has more than Ruby has more than Javascript, but in Helma you're running on the JVM and you have access to any Java library you drop in, so even more (by a wide margin) than Python. On the downside, Java is a verbose language, and using Java libraries doesn't feel completely natural from a JavaScript standpoint, so if you do a lot of work with a Java class you end up wanting to wrap it up in JavaScript for
[4:03] <jsp> but you likely won't need any for a while anyway. this site I'm building now probably won't need to go beyond what Helma provides, and I can't think of many projects I've done that would
[4:05] <rnst> heh, yeah, but cool though
[4:05] <rnst> I wan't to learn ruby on rails too, it has is own framework, or include one
[4:06] <jsp> ruby is the language, rails is the framework
[4:06] <rnst> I mean js framework
[4:06] <rnst> rails has a js framework
[4:06] <jsp> includes prototype for the client side
[4:06] <jsp> but you don't write rails code in javascript
[4:06] <rnst> oh, its prototype
[4:07] <jsp> yeah
[4:07] <rnst> Yeah, I learn any web dev yet, so I don't where should I start, but helma is looking good for all you said
[4:08] <rnst> and rails is also a powerful weapon
[4:08] <rnst> heh
[4:08] <jsp> rails is certainly buzzy
[4:08] <rnst> damn, I skips words
[4:08] <rnst> don't you like rails?
[4:08] <jsp> eh.
[4:09] <jsp> a few fairly basic decisions I don't love, but I don't think it's bad or anything
[4:09] <jsp> and I'm not an expert with it or even a beginner. I only know what I read elsewhere
[4:10] <rnst> because all of what I have read is very good, you can create a blog in 15 mins and so heh
[4:10] <rnst> and it's very agile
[4:10] <rnst> agile programming
[4:10] <jsp> (a lousy blog, yes, using the scaffolding which no one recommends actually using in production apps)
[4:10] <rnst> why=
[4:11] <rnst> ?
[4:12] <jsp> I don't actually know the full answer--not an environment I work in, so I have limited brain space for the rationale behind its best practices. but I do know that actually using the scaffolding is frequently listed as a newbie mistake. baseline reason may be just because it's ugly.
[4:13] <rnst> lol
[4:15] <jsp> IIRC, it doesn't do any input validation either
[4:17] <rnst> but you can add javascript to that I guess
[4:17] <rnst> or what you mean?
[4:17] <jsp> (ack! no!)
[4:19] <jsp> there are two fundamental problems you're trying to solve with input validation. 1 is that you can't trust users--they may try to send your application all kinds of bad data to crash it or hack it or just fill it up with crap. 2 is that most users are lovely, friendly people who aren't trying to hurt your app, so you want to help them create valid input as conveniently as possible.
[4:20] <jsp> javascript in the browser is great for 2, but can't help you at all for 1, because it requires only very minimal cleverness to completely circumvent any client-side restrictions
[4:21] <rnst> I see your point
[4:21] <rnst> but how can rails doesnt have a input validation
[4:21] <rnst> I mean shoudl be basic build-in right?
[4:22] <jsp> it does, but the scaffolding doesn't
[4:22] <rnst> php have it right?
[4:24] <jsp> if anything, PHP is worse. PHP DB access (which is related to data validation) got 'done right' (and really amazingly right) in php 5, but most devs are still using 4.x and most people have no idea. They just (in 5.2, I believe) introduced a feature/extension that makes input validation easier and more fundamental, but practically no one's using it yet, including me, so I don't know if it's as good as the new DB access or not worth t
[4:25] <jsp> but PHP has no scaffolding feature, so there's no instamatic way to make forms that won't actually serve you in production. of course it's still faster to do it wrong than right, but at least wrong isn't instant
[4:26] <rnst> heh :|
[4:29] <rnst> Personally, You would choose helma over rails any day?
[4:31] <jsp> I am choosing Helma over rails
[4:31] <jsp> I got tired of PHP and this what I went with
[4:32] <rnst> interesting
[4:32] <rnst> and can you make a blog easily ?
[4:32] <jsp> but a helma chat room isn't a great place to hang out for a diversity of views on that topic
[4:32] <jsp> ya know ;-)
[4:32] <rnst> yeah :P
[4:32] <rnst> but #rubyonrails isn't either
[4:32] <rnst> hehe
[4:33] <rnst> well I have a friend that is rails addict, and he talk me how wonderfull it is all day
[4:33] <jsp> hang on...someone here has been using rails for a while, too. he wrote up a comparison
[4:33] <jsp> let me find it
[4:33] <rnst> ok
[4:33] <rnst> is it hopbot?
[4:33] <rnst> :P lol
[4:35] <jsp> http://technomancy.us/85/
[4:36] <jsp> (just noticed that, amusingly, the author did write a blog app in helma as his trial app)
[4:38] <jsp> and yes, I could write a blog app easily, but I'm not interested in a basic blog app. after this first app I'll be working on a wiki/blog/cms-type thing that will power a group knowledgebase site and my own blog. at least that's the idea.
[4:39] <rnst> very interesting
[4:39] <rnst> that would be lots of work :P
[4:39] <jsp> well, yes :-P
[4:39] <rnst> aren't you happy with the current blog/wiki/cms systems?
[4:40] <rnst> Have yout tried any?
[4:40] <rnst> I haven't tried any yet
[4:42] <jsp> I'm not happy with existing ones. I figure that my community (that will use the knowledge-base site) and my self have our own unique-ish styles of relating and working, and I want technology that supports the community, not to which the community must conform. and I want the ability to mutate the software as necessary when I want to try something new or find that something isn't working
[4:42] <jsp> so that requires, if I were going to use an existing one, that it be written in a language I know with an accessible and comprehensible code base and that it at least start off near what I want
[4:43] <jsp> PHP before version 5 is barely tolerable to me anymore, and most popular PHP software still supports 4, which means ignoring all the advantages of 5.
[4:44] <rnst> :), so helma might be the next big thing heh
[4:48] <jsp> also in Helma's favor, but with a large caveat... E4X. It's a newish feature of JavaScript that makes XML (including XHTML, if you like) a first-class citizen of the language. Normal languages have, e.g., numbers, booleans (true/false), strings (text), arrays (sort of a list of other types of data), hash tables (a list of things that offers fast access by a word indexing each item instead of sequentially), objects and others as firs
[4:50] <jsp> with E4X, XML is a first-class thing. you can type it right into your code and mix it in lots of interesting and incredibly useful ways with code. you can access its structure like you access the structure of other objects in JavaScript. you can modify it like you would modify other objects. they built-in all kinds of new syntax to support XML all the way through, and it is *brilliant*
[4:53] <jsp> but the caveat is, it's practically the best kept secret in programming. I don't know anyone other than me who's doing anything useful with it (I'm sure there are others, I just don't know them). Helma has it because it runs on the Rhino javascript engine that has it, and they mention it in their release notes, but hardly anyone uses it. They shipped Helma 1.6 with a version of Rhino that has a major E4X bug, and no one noticed. (It'
[4:53] <jsp> but at least I'm hanging around the IRC channel and mailing list trying to evangelize it :-)
[4:53] <rnst> I noted , lol
[4:54] <jsp> I had heard about E4X but never tried anything with it myself until last week. and I'm totally blown away.
[4:55] <jsp> but it's 1 AM here, so I'm going to go to bed. some PHP work to do first thing tomorrow (*sigh*), but if I get it done quickly I can go back to helma.
[4:55] <rnst> heh, lol :(
[4:55] <rnst> 1 am here too
[4:55] <rnst> were are you?
[4:56] <jsp> near baltimore, md
[4:56] <rnst> oh..
[4:56] * rnst googling
[4:56] <jsp> where are you?
[4:57] <rnst> near hell, close to purgatory :S
[4:57] <rnst> lol
[4:57] <rnst> Im from Paraguay
[4:57] <rnst> :S
[4:58] <jsp> :-o
[4:58] <jsp> what language do you speak there?
[4:59] <rnst> spanish, and many stills speaks the natives language 'guarani', that is awful by the way, has the ugliest sounds, and we should learn it by law
[4:59] <rnst> http://en.wikipedia.org/wiki/Paraguay
[4:59] <rnst> The "great river" is the Paraná River, which produces the greatest amount of hydroelectric power in the world. 
[5:00] <rnst> and we still have blackouts
[5:00] <jsp> lol
[5:00] <jsp> just ask californians about that in the USA here
[5:00] <rnst> ask what?
[5:02] <jsp> blackouts. a few years ago they deregulated the electric industry in california and they suffered from rolling blackouts across the state for quite some time. california is the alpha testing area of the US. they're always passing slightly wacky laws there, and some of it works out. some not so well.
[5:04] <jsp> but now I'm really going to walk away from the computer. goodnight.
[5:04] <rnst> ok, nite
[13:48] <zumbrunn> http://stephan.reposita.org/archives/2007/07/23/comparing-helma-and-grails/
[13:48] <zumbrunn> yes, yes, we need to work on the documentation
[14:09] <jsp> pretty nice writeup, though
[15:37] <leobm> can I have form names e.g. names[] like in php ?
[15:38] <leobm> or simmilar ?
[15:38] <jsp> yup
[15:38] <jsp> recently added
[15:39] <zumbrunn> http://dev.helma.org/wiki/New+HTTP-related+Features+in+Helma+1.6/
[15:39] <zumbrunn> (parameter grouping)
[15:39] <zumbrunn> Helma allows HTTP parameters to be grouped into objects using a objectid[partid] syntax in the parameter name. For example, a parameter name of foo[bar] will result in a req.data.foo object being created. The actual parameter value will be available at req.data.foo.bar.
[15:39] <zumbrunn> This feature can be used recursively, meaning that a parameter named foo[bar][dong] will result in req.data.foo.bar.dong.
[15:42] <leobm> ah, ok see my problem.
[15:42] <leobm> works not simmilar how in php
[15:43] <leobm> in php you can define an empty key
[15:44] <zumbrunn> what does an empty key do?
[15:44] <zumbrunn> can you give an example?
[15:44] <leobm> for names[] you get in $_POST['names'] = array(name1,...name_n');
[15:45] <zumbrunn> "Before version 1.6, Helma only set the req.data.paramname_array array value if a parameter value actually had more than one value. With Helma 1.6, it is always possible to access parameter values as arrays, even if they only have one value. This makes handling multi-valued parameters much easier, because it is no longer necessary to handle the one-value case separately."
[15:46] <zumbrunn> in other words...
[15:46] <leobm> in helma I must use names[list] and get a structure like req.data.x.list = [name1....name_n]
[15:46] <zumbrunn> if multiple form fields have the same name, you get them as an array
[15:47] <zumbrunn> I'm not sure yet if we are talking about the same thing
[15:47] <leobm> ok. but I come from php. because I tried the php variant.
[15:48] <leobm> and the php variant don't work in helma
[15:49] <jsp> call it "names", just use a bunch of them with the same name, and access it in req.data.names_array
[15:49] <jsp> leave off the [] on the end
[15:49] <leobm> yes, ok
[15:49] <leobm> but the php variant looks first nicer.
[15:50] <leobm> you see in the html document that the server await multiply values / a group of data
[15:51] <leobm> I use now names[list]
[15:53] <leobm> ?
[15:54] <leobm> jsp: the variant without [] is not working..
[15:54] <leobm> a bug ?
[15:56] <jsp> checking...
[15:56] <leobm> I get only the first value
[15:57] <jsp> if you access req.data.names, you will. If you access req.data.names_array, you should get all
[15:59] <leobm> ahh.. ok, now I understand it.
[16:00] <leobm> mh.. don't like this
[16:00] <leobm> why can't I not get an array or object.
[16:00] <leobm> automatical.
[16:00] <zumbrunn> backwards compatibility
[16:00] <leobm> ok, that is an argument
[16:01] <jsp> moreover, the helma way makes sense and doesn't lose data
[16:01] <jsp> PHP loses data
[16:02] <jsp> in Helma you can get all the values submitted for any form name no matter what. PHP simply discards them if you didn't name the field with a [] at the end
[16:04] <jsp> also, unlike PHP an empty array is true, not false, in javascript, so it's helpful to be able to say: if(req.data.names) { /* do things with req.data.names_array */ }
[16:04] <leobm> ok, some more good arguments
[16:05] <zumbrunn> req.data.names could be false, though
[16:05] <zumbrunn> '0' for example
[16:05] <zumbrunn> so, better to check for req.data.names_array.length
[16:06] <leobm> if php I would check (isset($_POST['names']) && $_POST['names']!='') or so
[16:07] <jsp> zumbrunn, string '0' is true
[16:07] <zumbrunn> don't think so
[16:07] <jsp> in PHP it's false, but true in javascript
[16:07] <jsp> at least in spidermonkey
[16:09] <jsp> leobm, that's verbose even in PHP. (@$_POST['names']!='') will do it with less code and no function call
[16:10] <leobm> yes, first I mean (isset($_POST['names']) && sizeof($_POST['names']))
[16:10] <jsp> ('0' is true in rhino, too--of course it would be fairly serious if rhino and spidermonkey disagreed)
[16:11] <leobm> second I think the @ is not godd coding style. with this you oppress only error messages
[16:11] <zumbrunn> if I do '0' == false in Firebug or the helma shell, I get true
[16:12] <jsp> but if you do "if('0') 5;" you get 5
[16:12] <jsp> type coercion strikes again
[16:12] <zumbrunn> :-)
[16:13] <jsp> so even though in some contexts '0'==false, it is safe to say if(req.data.names) even if names might be '0'
[16:14] <zumbrunn> yep, seems to be that way
[16:16] <jsp> leobm, re: @ in PHP, yes, it suppresses error messages, but the only possible kind of error message when accessing $_POST['names'] is a strict warning if $_POST['names'] doesn
[16:16] <jsp> 't exist
[16:16] <jsp> so it's safe to suppress, and it makes the code shorter and faster-running
[16:23] <leobm> ok, cu.. see you later. have a date
[16:23] <leobm> bye
[18:17] <asdx> rails ftw!
[18:19] <asdx> hello
[18:19] <jsp> hi
[18:20] <asdx> what is helma, a web framework?
[18:20] <asdx> i read some people saying that helma is better than rails
[18:20] <asdx> how is that
[18:20] <asdx> it's js only?
[18:21] <asdx> or use some server side language
[18:21] <jsp> yes, yes, and yes
[18:21] <asdx> im a ruby fan
[18:21] <jsp> and yes
[18:21] <jsp> it uses javascript on the server side
[18:21] <asdx> interesting
[18:22] <jsp> on the JVM, so has access to all the libraries in Java (==a whole lot of libraries)
[18:23] <jsp> Even Ola Bini (of JRuby fame) gives JavaScript a nod: http://ola-bini.blogspot.com/2007/07/will-javascript-be-next-big-language.html
[18:23] <asdx> oh, it's a framework for the java language
[18:23] <asdx> nice
[18:24] <asdx> i've been also reading about groovy
[18:24] <jsp> well, not really. you don't write in Java unless you have to drop down to it for performance (as you might have to drop to C in Ruby)
[18:24] <asdx> jruby/rails
[18:24] <asdx> etc
[18:24] <jsp> Helma itself is written partly in Java, partly in JavaScript
[18:25] <jsp> groovy looks like a good idea if you're used to Java--otherwise why bother?
[18:25] <jsp> Helma could also be a good idea if you're used to Java, but I'm not coming to it from that direction (PHP myself)
[18:26] <asdx> heh
[18:26] <asdx> i've also read about cake
[18:26] <asdx> django, etc
[18:26] <asdx> lot of frameworks these days
[18:27] <jsp> cake is just a rails clone in PHP, so I really can't think of a reason for a rails dev to go that way
[18:27] <jsp> unless you want to be able to distribute your stuff for use on shared hosts everywhere.
[18:27] <jsp> or all that scalability stuff comes to bite you in rails
[18:29] <asdx> heh
[18:30] <asdx> i use rails because i like mvc, activerecord, and ruby
[18:31] <asdx> i been doing php before
[18:31] <asdx> but then i found ruby... and i was like "this is pretty"
[18:31] <asdx> it's a nice language
[18:31] <rnst> lol
[18:32] <rnst> is 'pretty' enought reason to switch?
[18:32] <rnst> heh
[18:32] <rnst> j/k
[18:32] <asdx> :)
[18:32] <jsp> almost. that's part of why I'm switching to Helma
[18:33] <jsp> Ruby and Javascript are both considerably more expressive languages than PHP
[18:33] <asdx> yeah
[18:34] <asdx> ruby feels very natural to me
[18:34] <jsp> I don't know much Rails, but it seems to me that Helma is rather different as far as orm and also the whole mvc thing.
[18:34] <asdx> i haven't tried helma yet
[18:35] <asdx> nice
[18:35] <asdx> python to me doesn't feel that natural like ruby
[18:36] <asdx> but i know it's a great language too
[18:36] <jsp> JavaScript has a few major stupidities in the language design, but I'm used to them, and the only one that you can't trivially work around is fixed for you in Helma. Other than those issues, I love JavaScript. and having only one language between client and server seems like a very nice thing.
[18:36] <jsp> gtg for now though. good luck
[18:37] <asdx> yeah, that is a good thing
[18:37] <asdx> :)
[18:37] <asdx> same
[18:37] <asdx> i also like the japanese style of ruby
[18:37] <asdx> ;P
[18:38] <asdx> is neat i think
[18:44] <asdx> im happy myself with the progress of languages and frameworks in the open source world
[18:45] <asdx> some years ago was a bit more limited, now there is a plenty of choice
[19:00] <jsp> true that
[19:08] <asdx> dhh is an asshole
[19:08] <asdx> lol
[19:08] <asdx> http://flickr.com/photos/eugevon/130610241/
[19:08] <asdx> but great developer i think
[19:08] <asdx> matz is cool
[19:09] <asdx> polite
[19:09] <jsp> yes, I've read a bit of matz stuff--seems like a nice guy
[19:09] <jsp> I like brendan eich, too.
[19:09] <asdx> :)
[19:09] <jsp> (creator of javascript and now member of the ecma committee that's moving it forward)
[19:10] <asdx> nice
[19:10] * asdx reading about him
[19:10] <asdx> js is great
[19:11] <asdx> he looks cool
[19:14] <jsp> e.g., a bug report of mine about the mozilla javascript engine https://bugzilla.mozilla.org/show_bug.cgi?id=388234
[19:14] <jsp> in which brendan spent rather a bit of time explaining why my expectation about how the code should have worked was incorrect.
[19:15] <asdx> nice, i feel stupid myself for the "rails ftw" when i come here, didn't mean to be an idiot
[19:15] <asdx> :p
[19:15] <jsp> lol
[19:15] * asdx apologizes
[19:15] <jsp> what's ftw mean? I looked it up, but there wasn't a clear answer
[19:16] <jsp> (I figured not "free the whales")
[19:16] <asdx> "for the win" lol
[19:16] <rnst> jsp http://en.wikipedia.org/wiki/For_The_Win_%28Internet_slang%29
[19:16] <jsp> that's actually what I thought, but it wasn't one of the 23 or so definitions I found.
[19:16] <asdx> i tried javascript once, i liked it
[19:17] <rnst> jsp, http://justfuckinggoogleit.com/ lol
[19:17] <asdx> :)
[19:17] <asdx> so, helma is a javascript vm for server-side written in java?
[19:17] <rnst> > helma.org
[19:18] <jsp> rnst, I did! google gave me 23 choices, none
[19:18] <jsp> "for the win"
[19:18] <rnst> then you should google wiki it
[19:18] <rnst> lol
[19:18] <rnst> i.e ftw wiki
[19:18] <rnst> heh
[19:18] <rnst> :D
[19:18] <rnst> wait a minute
[19:19] <rnst> jsp, what google are you using?
[19:19] <rnst> just google.com?
[19:19] <rnst> or googl.com.xx
[19:19] <rnst> some domain in other language
[19:19] <rnst> lol
[19:19] <rnst> http://www.google.com/search?q=ftw&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
[19:19] <jsp> helma is a framework for writing web apps in javascript which runs on the java virtual machine by way of Rhino, a javascript engine in Java written by the Mozilla folks and worked on by many.
[19:19] <rnst> I have the resutls
[19:21] <jsp> (ok, seriously this is way too much effort about my failure to properly interpret google, but... I searched "acronym ftw" on google.com. first result had 22 meanings offered, and I now see that one was "for the win", but I missed it the first time.)
[19:21] <asdx> nice
[19:21] <asdx> lol
[19:21] <jakehow> hey.. so i just downloaded helma and trying to run on os x, but the manage app has an error in it
[19:21] <jakehow> is this a known issue?
[19:22] <jsp> what's the error?
[19:22] <jakehow> org.mozilla.javascript.RhinoException.getScriptStackTrace(Ljava/io/FilenameFilter;)Ljava/lang/String;
[19:22] <jakehow> is it tied to a specific version of rhino ?
[19:22] <jsp> no. but that doesn't indicate a rhino error
[19:23] <jsp> (probably)
[19:23] <jsp> what java version do you have/
[19:23] <jsp> ?
[19:24] <jakehow> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164)
[19:24] <jsp> (hm--that should certianly be adequate)
[19:25] <jsp> dunno, sorry. I'm just running on Linux and Windows
[19:25] <jsp> did you get helma 1.6?
[19:26] <jakehow> jsp: yeah
[19:27] <jakehow> any idea where i should start looking?
[19:27] <jsp> if you post to the users mailing list someone may be able to help.
[19:28] <jsp> also, if I understand correctly, Java for Mac has 1.4.x and 1.5.x... maybe try editing the start file to point to the 1.4 version and see if it's any different?
[19:29] <jakehow> k will do
[19:29] <jsp> also if you want to try a different Rhino, I have a more recent Rhino build that fixes a bug with E4X (not used in the manage app) mirrored at http://letterblock.com/rhino.jar
[19:30] <jsp> it's less than two weeks different from the one that ships with helma 1.6, though, so even if it is a rhino problem that may not help
[19:45] <jakehow> oh.. i installed rhino myself also
[19:45] <jakehow> wonder if i should use the one helma ships w/
[19:46] <jsp> yeah, but it would be odd if you weren't
[19:46] <jsp> Helma includes its own rhino in lib
[19:47] <jsp> but, yeah, if there's a chance that it's not helma's rhino being used, I'd try temporarily removing yours
[19:48] <jsp> helma's been using nightlies of rhino for a while and has at least one patch of their own included right now. if you have the last stable rhino release, that could be the problem
[20:16] <jsp> (any luck, jake?)
[20:18] <jsp> chessguy, I wacky-parsed your name and almost asked you whether you liked cheddar or swiss
[20:18] <chessguy> you wouldn't believe how often i get that :)
[20:19] <jsp> so, knights or bishops?
[20:19] <chessguy> does helma provide a way to specify some kind of security level for what methods on an object can be called by what users?
[20:19] <jsp> lookup onRequest
[20:19] <jsp> HopObject.onRequest, that is
[20:20] <jsp> I'm using it for very basic access control, but I expect it could be used for more. all you'd need beyond what's obvious would be the name of the action being called. I'm not sure where to grab that from.
[20:21] <chessguy> hmm, so i'd have to define that method, and do the authetication myself
[20:21] <jsp> well, sort of?
[20:22] <jsp> here's a super-simple example:
[20:23] <jsp> I have only admin users, and so far just a couple of objects that only they can touch at all (so I don't have to check any properties of the user or what action is being invoked, just that there is a user logged in if it's either of the two admin-only objects.
[20:23] <jsp> so I have one line in a .js file in Global:
[20:23] <jsp> User.prototype.onRequest = UserMgr.prototype.onRequest = function () { if(!session.data.user) res.redirect(root.href('login')+'?return=/'+req.path); }
[20:23] <jsp> oops... that's with my earlier goofed up user handling. make that:
[20:23] <jsp> User.prototype.onRequest = UserMgr.prototype.onRequest = function () { if(!session.user) res.redirect(root.href('login')+'?return=/'+req.path); }
[20:24] <chessguy> hm
[20:24] <jsp> and I have a login action on root that displays a login form and passes the info to Helma's built-in session.login
[20:25] <jsp> (and logs them in and fwd's to whatever was set in ?return or gives an error if the username/password didn't work)
[20:25] <chessguy> interesting
[20:26] <jsp> req.action contains the name of the action being invoked, though, so it would be easy to make slightly more sophisticated versions
[20:27] <chessguy> interesting
[20:27] <chessguy> oops, i said that :)
[20:27] <chessguy> what are you using helma for, if i may ask?
[20:27] <jsp> hopefully, everything from here out
[20:27] <jsp> but realistically I'll still have to do some PHP
[20:28] <jsp> (not b/c Helma can't do whatever, but to maintain existing apps and do work on other people's sites already running on PHP)
[20:29] <chessguy> i see
[20:29] <jsp> e.g., PrototypeWithSelectiveAccess.prototype.onRequest = function() { if(req.action=='special' || req.action=='private'){ if(!session.user || !session.user.admin) { res.message = "You do not have access rights."; res.redirect(...); } } };
[20:30] <chessguy> yeah
[20:31] <jsp> if you like you can read about the work I'm doing on my current site at my helma dev pseudo-blog http://letterblock.com/intheopen
[20:32] <jsp> and of course you could put the access stuff into a hash once it got more complicated. and you could set flags on your objects if some objects of the same type have different access rights
[20:32] <chessguy> ah, cool. i'll definitely check it out
[20:34] <chessguy> my company has basically canibalized helma for its own application, including a cms, and other functionality.
[20:34] <jsp> weird
[20:35] <jsp> of course I'm planning to build a cms/wiki/blog thing, too. just like everyone else :-)
[20:35] <chessguy> oh we already have a large, fully-featured cms
[20:36] <jsp> but you're lacking authentication?
[20:36] <chessguy> not exactly
[20:36] <chessguy> the authentication used to be tied to the CMS, but it's not any more
[20:37] <chessguy> but now i'm not sure how it's done, because they haven't documented it yet. so i wanted to see how helma does it
[20:38] <jsp> helma has built-in handling of sessions and users. access control could be done in the individual methods or with aspect-oriented additions thereto, but for most cases onRequest probably makes the most sense
[20:39] <chessguy> yes, we have built-in sessions and users too, and we've added a shopping cart
[20:39] <jsp> but this is just me inferring good practices from the documentation of what features are provided and my years of experience building web apps in php.
[20:39] <chessguy> we have access control, it's just not documented
[20:39] <chessguy> basically it's a separate file like type.properties, or whatever you call it
[20:39] <jsp> I don't know if I'm speaking for anyone else.
[20:40] <jsp> yeah--that could easily be done. something like what I meant about putting it in a hash
[20:40] <chessguy> so we'd have a file called security.properties and then in there we'd put lines like 'method = @AcessLevel
[20:41] <jsp> hm. that's sounds like it would have required modifying helma
[20:41] <chessguy> i think they pretty much re-wrote helma from scratch
[20:41] <jsp> but you could get the same effect by just defining a hash in security.js and adding some methods to HopObject, which is the way I would have gone
[20:42] <jsp> alas. server-side javascript is niche enough without making your own incompatible framework just for one company. but it's rather late to complain about that now
[20:42] <chessguy> i'm still sorting out what they got from helma and what they wrote themselves
[20:43] <chessguy> what issue did you run into with session.login()?
[20:44] <jsp> I wasn't creating my users properly
[20:44] <jsp> session.login is fine, I just didn'
[20:44] <jsp> t register my users right
[20:44] <chessguy> ah, ko
[20:44] <chessguy> ok
[20:45] <jsp> Application has several methods for creating and retrieving users, but I didn't realize that 'cause the User documentation didn't/doesn't link to those
[20:45] <jsp> and remember my page is in reverse chronological order. so you're reading the problem after the solution if you read down
[20:45] <chessguy> yeah, those are handy
[21:04] <jsp> btw, what's your company?
[21:27] <chessguy> sorry, i got distracted
[21:27] <chessguy> www.siteworx.com
[21:28] <jsp> so Axiom = Helma +stuff ?
[21:28] <jsp> or is that something else?
[21:31] <chessguy> no, that's it
[21:32] <chessguy> but we're working on a totally new version
[21:32] <chessguy> i'm not sure if the old version is based on helma or not
[21:32] <jsp> ah. that's cool. I think I've even seen siteworx before
[21:32] <chessguy> they're a fast-growing company, very good at what they do
[21:33] <chessguy> anyway, i'm outta here. catch you later

 

 

In the channel now:

Logs by date: