On Mon, Sep 1, 2008 at 15:53, Eric Iverson <[EMAIL PROTECTED]> wrote:
> The way to go with these devices is a web server that provides J execution,
> state,
Or an irc server.
> and display with the device browser as the front end.
There must be an irc client for those devices.
> This is not too difficult to do.
> The main complications come from trying to support multiple
> users
Works well in my bot, only not really documented, so the only way to
know how to use it is to ask me.
> and issues such as security
Yeah, that's the hard part.
> and resource consumption.
That's easier.
> Those complications go away if you simply host your own J server that is 
> dedicated
> to your own use.
Sure, resource usage is so limited that you can't try examples
requiring lots of cpu time or memory or session dump size in my
jevalbot.  For that, you need your own machine.

Short instructions.  Take an irc client.  Make it join the
irc.freenode.net server.  There are two evaluator bot instances using
different versions of the same codebase.  The one called jeval is
almost always up, is hosted by metaperl, but is running j601.  The one
called evalj is running in my home computer so is up only when I start
it.  You can find both of these in the #jsoftware channel (which is a
general j discussion channel.  (Alternately, if you don't want to
flood the channel with your evaluation session, you can talk to the
bots on the #ijx channel or in irc private message.)

To evaluate an expression in a clean session, join the #jsoftware
channel, and there say 'jeval: foo' (without the quotes, foo is any j
fret, jeval is the nick of the bot, leave out the nick but keep the
colon if in private message, never start the line with a space).  Then
the bot answers with the output (truncated if it's too long) or an
error message.  If you want persistency, use a double colon, eg.
'jeval:: foo'.  In this case, the bot stores the values of names in
the main locale and restores them when you do the next evaluation with
double colon.  If you mess something up, 'jeval new:' clears the
persistent session so you start anew.  Every irc users gets a separate
persistent session, can use more sessions and can share it with others
(this is where it gets really undocumented, but some statements apart
from new are load, save, cd, pwd).  (There's also a way to enter more
than one lines at once, eg. 'evalj:.. f =: 3 :0' then 'evalj:.. 2 * y'
then 'evalj:: )' then 'evalj:: f 5'.  There are also various short
forms and the syntax rules are really random, so try replacing
'evalj::' with ']::' or look at the source.)

Ambrus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to