[e-lang] New E user
Kevin Reid
kpreid at mac.com
Tue May 16 18:26:29 EDT 2006
Someone new showed up in Freenode #erights yesterday, and here's a
transcript so far.
http://meme.b9.com/cview.html?channel=erights&date=060515
http://meme.b9.com/cview.html?channel=erights&date=060516
(included here for the e-lang archives)
[10:48] redwyrm (n=redwyrm at adsl-70-250-179-138.dsl.rcsntx.swbell.net)
joined #erights
[12:11] <kpreid> hello, redwyrm
[12:11] <redwyrm> hi
[12:11] <redwyrm> the E language looks pretty interesting
[12:12] <redwyrm> I just came across it
[12:12] <redwyrm> so how widely deployed is it?
[12:12] <redwyrm> like, what state is developement in?
[12:24] <kpreid> deployment? about zero
[12:24] <kpreid> it's still essentially experimental
[12:25] <kpreid> but you can certainly write useful programs in it
[12:25] <redwyrm> :)
[12:25] <kpreid> it's just a little bit patchy, as in you might not
be able to do X with it
[12:25] <redwyrm> ah
[12:25] <kpreid> try the CapDesk demos, for example
[12:26] <redwyrm> I haven't installed it yet. I'm still trying to
decipher the makeMint example in the wikipedia page
[12:26] <redwyrm> (the page for the E language)
[12:28] <kpreid> feel free to ask questions
[12:28] <redwyrm> ah, ok
[12:28] <redwyrm> I'm sure I will :)
[12:28] <kpreid> you can also try out the language right here
[12:28] <kpreid> ? def makeMint(_) {} # stub
[12:28] <eel> # value: <makeMint>
[12:28] <redwyrm> O_O
[12:28] <redwyrm> awesome!
[12:28] <redwyrm> you have an eval bot?
[12:29] <kpreid> hey, if E *couldn't* support safe evaluation from
whoever, it would not be very good at its own principles :)
[12:29] <kpreid> yeah, I wrote the bot
[12:29] <redwyrm> I think I'll be spending a lot of time in #erights
from now on :D
[12:30] <kpreid> welcome
[12:30] <redwyrm> ? def makeMint(_) {def x := 5}
[12:30] <eel> # value: <makeMint>
[12:30] <redwyrm> ? def makeMint(_) {println("blah")}
[12:30] <eel> # value: <makeMint>
[12:30] <redwyrm> ?makeMint()
[12:30] <eel> # problem: <NoSuchMethodException: <a makeMint>.run/0>
[12:30] <redwyrm> ? makeMint()
[12:30] <eel> # problem: <NoSuchMethodException: <a makeMint>.run/0>
[12:31] <kpreid> you defined it with run/1 (1 parameter), not 0
[12:31] <redwyrm> oh
[12:31] <redwyrm> ? makeMint(1234)
[12:31] <eel> blah -- redwyrm
[12:31] <kpreid> oh, by the way, eel evaluates code under the easy-
return syntax variant (which is probably going to become official,
but there are lots of un-updated examples)
[12:31] <redwyrm> easy-return as opposed to...?
[12:32] <kpreid> the old style
[12:32] <kpreid> how much detail do you want? :)
[12:32] <redwyrm> not much, heh
[12:32] <redwyrm> I'm just starting with this
[12:33] <redwyrm> what does _ mean?
[12:33] <kpreid> _ here is a pattern meaning "ignore the value"
[12:33] <kpreid> if you see code like "to foo(x) :any { x + 1 }" it's
in the oldest style
[12:34] <kpreid> the problem with that style was it's easy to forget
the :any and wonder why nothing is being returned
[12:34] <kpreid> then it was changed to require the result guard
(":any" there) and that was too verbose
[12:35] <redwyrm> when you say oldest style, how old would that be?
[12:35] <kpreid> so easy-return makes a result returned only if you
write an explicit "return"; it's "easy" because you don't have to
write the result guard somewhere else
[12:35] <kpreid> I can't say, I have a bad memory for that sort of
thing :)
[12:35] <redwyrm> how would I declare a function with no arguments?
[12:36] <kpreid> ? def f() { return timer.now() }
[12:36] <eel> # value: <f>
[12:36] Action: redwyrm realizes he should probably read the tutorial
first
[12:39] <kpreid> I'll be right back
[12:39] kpreid (n=kpreid at 24-52-49-37.bflony.adelphia.net) left irc:
[12:39] kpreid (n=kpreid at 24-52-49-37.bflony.adelphia.net) joined
#erights
[12:39] <redwyrm> o
[12:39] <redwyrm> ok*
[12:41] <kpreid> by the way, if something is bad about the tutorials
*or* the language itself, please let us know (on the mailing list, if
you don't mind); we don't get nearly enough Actual User Feedback (or
even Actual Users)
[12:41] <redwyrm> ah
[12:41] <redwyrm> so it's mostly developers?
[12:42] <kpreid> yes
[12:49] <redwyrm> hmm
[12:50] <redwyrm> can eel be made to evaluate code in PM's to it?
[12:50] <kpreid> no
[12:50] <kpreid> that's a design decision
[12:50] <kpreid> (er, let me say that better:)
[12:50] <kpreid> that's deliberate
[12:51] <redwyrm> oh
[12:51] <redwyrm> I just didn't want to flood the channel
[12:52] <kpreid> well, it's not like we say much :)
[12:52] <kpreid> on the other hand, you can download E :)
[12:52] <redwyrm> yeah, was just about to
[12:52] <redwyrm> what version would I download?
[12:52] <redwyrm> or should?
[12:53] <kpreid> 0.8.35f is the latest Actual Release
[12:54] <kpreid> the 0.8.36 series is still changing frequently
[12:54] <kpreid> eel uses 35f
[12:55] <kpreid> there is no significant improvement in 36 that you'd
care about, I think, so get 35f because it's less likely to have bugs
[12:55] <redwyrm> any security bugs? :P
[12:58] <kpreid> not that I know of, or I wouldn't be running eel on
it :)
[12:58] <redwyrm> I mean, have there been security bugs encountered
in the past?
[12:58] <redwyrm> (whether or not they've been fixe)
[12:59] <kpreid> uh, yes
[12:59] <kpreid> hm
[13:00] <kpreid> mostly minor ones, as in "this lets you do something
you shouldn't, but we don't see how to take over the system from"
[13:00] <kpreid> there certainly haven't been very many "take over
the system" ones but I don't recall how many, if any
[13:05] <redwyrm> ah
[13:06] <redwyrm> I'm looking at the Den page on your site
[13:07] <redwyrm> ? def square {to run(x) {return x*x}}
[13:07] <eel> # value: <square>
[13:07] <redwyrm> ? square.run(3)
[13:07] <eel> # value: 9
[13:08] <redwyrm> it's OO style is... weird
[13:08] <redwyrm> so you declare objects, not classes?
[13:08] <kpreid> yes/no
[13:09] <kpreid> the key is, you don't ever *declare* anything at all
[13:09] <kpreid> or, to look at it another way, the *source code* is
your declaration
[13:11] <kpreid> I need to go now; I'll be back in around 45 minutes
[13:12] <redwyrm> ? def makeMessageHolder() {def messageHolder {def
message := "<none>"; to printMessage() {print message}};return mh}
[13:12] <eel> # syntax error:
[13:12] <eel> # def makeMessageHolder() {def messageHolder {def
message := "<none>"; to printMessage() {print message}};return mh}
[13:12] <eel> # ^
[13:12] <eel> # @ <irc://chat.freenode.net/erights?redwyrm#:span::
1:47::1:47>
[13:18] <kpreid> you can't mix expressions and methods
[13:18] <kpreid> the "def message" must go outside the "def
messageHolder"
[13:19] <redwyrm> ? def makeMessageHolder() {def messageHolder {to
printMessage() {print message}};def mh.message := "<none>"; return mh}
[13:19] <eel> # syntax error:
[13:19] <eel> # def makeMessageHolder() {def messageHolder {to
printMessage() {print message}};def mh.message := "<none>"; return mh}
[13:19] <eel> # ^
[13:19] <eel> # @ <irc://chat.freenode.net/erights?redwyrm#:span::
1:76::1:76>
[13:19] <kpreid> print(message)
[13:19] <redwyrm> ? def makeMessageHolder() {def messageHolder {to
printMessage() {println(message)}};def mh.message := "<none>"; return
mh}
[13:19] <eel> # syntax error:
[13:19] <eel> # def makeMessageHolder() {def messageHolder {to
printMessage() {println(message)}};def mh.message := "<none>"; return
mh}
[13:19] <eel> # ^
[13:19] <eel> # @ <irc://chat.freenode.net/erights?redwyrm#:span::
1:99::1:99>
[13:20] <kpreid> objects don't have fields
[13:20] <redwyrm> now that is _very_ weird :D
[13:20] <kpreid> try the first one, but put "def message ... " before
"def messageHolder"
[13:21] <redwyrm> ? def makeMessageHolder() {def message ... def
messageHolder {to printMessage() {print message}};def mh.message :=
"<none>"; return mh}
[13:21] <eel> # syntax error:
[13:21] <eel> # def makeMessageHolder() {def message ... def
messageHolder {to printMessage() {print message}};def mh.message :=
"<none>"; return mh}
[13:21] <eel> # ^
[13:21] <eel> # @ <irc://chat.freenode.net/erights?redwyrm#:span::
1:39::1:39>
[13:21] <redwyrm> lol
[13:21] <kpreid> um
[13:21] <redwyrm> ? def makeMessageHolder() {def message := "<init>";
def messageHolder {to printMessage() {print message}};def
mh.message := "<none>"; return mh}
[13:21] <eel> # syntax error:
[13:21] <eel> # def makeMessageHolder() {def message := "<init>"; def
messageHolder {to printMessage() {print message}};def mh.message :=
"<none>"; return mh}
[13:21] <eel> # ^
[13:21] <eel> # @ <irc://chat.freenode.net/erights?redwyrm#:span::
1:101::1:101>
[13:21] <kpreid> ? def makeMessageHolder() {def message := "<none>";
def messageHolder {to printMessage() {print(message)}}; return mh}
[13:21] <eel> # problem: Failed: Undefined variable: mh
[13:22] <kpreid> ? def makeMessageHolder() {def message := "<none>";
def messageHolder {to printMessage() {print(message)}}; return
messageHolder}
[13:22] <eel> # value: <makeMessageHolder>
[13:22] <kpreid> there
[13:22] Action: kpreid is really gone noww
[13:22] <redwyrm> lol, bye
[13:24] <redwyrm> ? def makeMessageHolder() {def message := "<none>";
def messageHolder {to printMessage() {print(message)}};return mh}
[13:24] <eel> # problem: Failed: Undefined variable: mh
[13:24] <redwyrm> ? def makeMessageHolder() {def message := "<none>";
def messageHolder {to printMessage() {print(message)}};return
messageHolder}
[13:24] <eel> # value: <makeMessageHolder>
[13:24] <redwyrm> ? def mh := makeMessageHolder()
[13:24] <eel> # value: <messageHolder>
[13:25] <redwyrm> ? mh.printMessage()
[13:25] <eel> <none> -- redwyrm
[13:25] <redwyrm> ? mh.message = blah
[13:25] <eel> # syntax error: use ':=' for assignment, or '==' for
equality
[13:25] <eel> # mh.message = blah
[13:25] <eel> # ^
[13:25] <eel> # @ <irc://chat.freenode.net/erights?redwyrm#:span::
1:12::1:12>
[13:26] <redwyrm> ? mh.message := "blah"
[13:26] <eel> # syntax error: Assignment can only be done to nouns
and collection elements
[13:28] <redwyrm> ? mh.aoueoue := "blah"
[13:28] <eel> # syntax error: Assignment can only be done to nouns
and collection elements
[13:38] <redwyrm> ? def makeMessageHolder() {def message := "<none>";
def messageHolder {to printMessage() {print(message)};to setMessage
(newMsg) {message := newMsg};to getMessage() :string {return
message}};return messageHolder}
[13:38] <eel> # syntax error:
[13:38] <eel> # def makeMessageHolder() {def message := "<none>"; def
messageHolder {to printMessage() {print(message)};to setMessage
(newMsg) {message := newMsg};to getMessage() :string {return
message}};return messageHolder}
[13:38] <eel> # ^
[13:38] <eel> # @ <irc://chat.freenode.net/erights?redwyrm#:span::
1:104::1:104>
[13:39] <redwyrm> ? def makeMessageHolder() {def message := "<none>";
def messageHolder {to printMessage() {print(message)};to setMessage
(newMsg) {message := newMsg};to getMessage() :str {return
message}};return messageHolder}
[13:39] <eel> # syntax error:
[13:39] <eel> # def makeMessageHolder() {def message := "<none>"; def
messageHolder {to printMessage() {print(message)};to setMessage
(newMsg) {message := newMsg};to getMessage() :str {return
message}};return messageHolder}
[13:39] <eel> # ^
[13:39] <eel> # @ <irc://chat.freenode.net/erights?redwyrm#:span::
1:104::1:104>
[13:39] <redwyrm> ? def makeMessageHolder() {def message := "<none>";
def messageHolder {to printMessage() {print(message)};to setMessage
(newMsg) {message := newMsg};to getMessage() :any {return
message}};return messageHolder}
[13:39] <eel> # syntax error:
[13:39] <eel> # def makeMessageHolder() {def message := "<none>"; def
messageHolder {to printMessage() {print(message)};to setMessage
(newMsg) {message := newMsg};to getMessage() :any {return
message}};return messageHolder}
[13:39] <eel> # ^
[13:39] <eel> # @ <irc://chat.freenode.net/erights?redwyrm#:span::
1:104::1:104>
[13:42] <redwyrm> 0 1 2 3 4 5 6 7 8 9
[13:43] <redwyrm> ? def makeMessageHolder() {def message := "<none>";
def messageHolder {to printMessage() {print(message)};to setMessage
(newMsg) {message := newMsg} to getMessage() :any {return
message}};return messageHolder}
[13:43] <eel> # syntax error:
[13:43] <eel> # def makeMessageHolder() {def message := "<none>"; def
messageHolder {to printMessage() {print(message)};to setMessage
(newMsg) {message := newMsg} to getMessage() :any {return
message}};return messageHolder}
[13:43] <eel> # ^
[13:43] <eel> # @ <irc://chat.freenode.net/erights?redwyrm#:span::
1:104::1:104>
[14:14] <kpreid> I'm back
[14:14] <redwyrm> hey
[14:15] <kpreid> you need to remove the ";" between printMessage and
setMessage
[14:15] <redwyrm> I think I tried that
[14:15] <kpreid> no, you removed a different one
[14:15] <kpreid> semicolons are used only in expressions
[14:15] <redwyrm> oh, so it's just "} to ..."?
[14:15] <kpreid> the method list in an object definition is something
completely different
[14:15] <kpreid> yes
[14:16] <redwyrm> ? def makeMessageHolder() {def message := "<none>";
def messageHolder {to printMessage() {print(message)} to setMessage
(newMsg) {message := newMsg} to getMessage() :any {return
message}};return messageHolder}
[14:16] <eel> # problem: Failed: May not assign to final variable
message
[14:16] <redwyrm> _what_ may not assign to message?
[14:16] <kpreid> this is done so that variables that can change are
marked
[14:16] <kpreid> you need to write "def var message" or "var message"
[14:16] <kpreid> variables are not assignable by default
[14:17] <kpreid> your "message := newMsg"
[14:17] <redwyrm> oh, var is mutable, def isn't?
[14:17] <kpreid> yes
[14:17] <redwyrm> ? def makeMessageHolder() {var message := "<none>";
def messageHolder {to printMessage() {print(message)} to setMessage
(newMsg) {message := newMsg} to getMessage() :any {return
message}};return messageHolder}
[14:17] <eel> # value: <makeMessageHolder>
[14:17] <redwyrm> messageHolder.getMessage()
[14:17] <redwyrm> ? messageHolder.getMessage()
[14:17] <eel> # problem: Failed: Undefined variable: messageHolder
[14:17] <redwyrm> just testingf
[14:17] <kpreid> (actually, 'var message := "none"' is a shortcut,
but you don't need to worry about that)
[14:17] <kpreid> (yet)
[14:18] <redwyrm> ? mh.getMessage()
[14:18] <eel> # problem: <NoSuchMethodException: <a
messageHolder>.getMessage/0>
[14:18] <redwyrm> ? mh = makeMessageHolder()
[14:18] <eel> # syntax error: use ':=' for assignment, or '==' for
equality
[14:18] <kpreid> mh is still an instance of your older definition
[14:18] <eel> # mh = makeMessageHolder()
[14:18] <eel> # ^
[14:18] <eel> # @ <irc://chat.freenode.net/erights?redwyrm#:span::
1:4::1:4>
[14:18] <redwyrm> ? mh := makeMessageHolder()
[14:18] <eel> # problem: Failed: Final variables may not be changed
[14:18] <kpreid> ? def mh := makeMessageHolder()
[14:18] <eel> # value: <messageHolder>
[14:18] <redwyrm> kpreid, I know, I was just testing
[14:18] <redwyrm> mh.setMessage("blah")
[14:18] <redwyrm> ? mh.setMessage("blah")
[14:19] <redwyrm> ? mh.printMessage()
[14:19] <eel> blah -- redwyrm
[14:19] <redwyrm> ? mh.getMessage()
[14:19] <eel> # value: "blah"
[14:20] <redwyrm> a while ago, I was thinking a really useful program
to be written in E would be a VMWare-type thing
[14:21] <kpreid> if something seems peculiar, feel free to ask why it
is that way, or suggest a difference...
[14:21] <redwyrm> alright
[14:22] <kpreid> we have lots of theories about the Right Thing but
not so much user feedback. help us get it right!
[14:22] <redwyrm> alright
[14:22] <redwyrm> how hard would it be to port an E interpreter to C?
[14:26] <kpreid> an E interpreter is pretty simple
[14:26] <kpreid> much more complex is the libraries
[14:27] <kpreid> (*every* language these days has a complex standard
library...)
[14:27] <redwyrm> ah
[14:27] <redwyrm> and presumably, most of the bugs that exist on the
E platform exist in the library
[14:27] <redwyrm> ?
[14:27] <kpreid> http://www.erights.org/enative/index.html
[14:28] <kpreid> here's pages about a (dead) project to implement E
on C++
[14:28] <kpreid> yes, I would say so
[14:28] <kpreid> "the library" is of course everything *but* the
language, which is minimal
[14:33] <redwyrm> the download page for E-on-java says that linux-gtk-
x86 "Doesn't yet work with SWT"
[14:33] <kpreid> that's fine; you can use everything but the SWT apps
[14:34] <redwyrm> ok. are there a lot of those ATM?
[14:34] <kpreid> not many, I think (anything named *.e-swt); but I
can't run them either :)
[14:35] <redwyrm> oh, ok
[14:36] <redwyrm> how would one GUI code without SWT?
[14:36] <redwyrm> one write*
[14:36] <kpreid> with AWT/Swing
[14:36] <redwyrm> also, the download links don't work
[14:37] <kpreid> works for me. what link?
[14:37] <redwyrm> http://www.cypherpunks.to/erights/...35/E-linux-gtk-
x86-0.8.35f.tar.gz
[14:38] <kpreid> ooh.
[14:38] <kpreid> right. I've seen that before. I'll complain about
the lack of that
[14:38] <kpreid> just download the 'purej' variant
[14:40] <redwyrm> brb, dog had something in his mouth other than food
>:(
[14:41] <redwyrm> back
[14:42] <redwyrm> also, the file unpacks to the directory it's in,
rather than a new directory
[14:43] <redwyrm> fortunately, that didn't hurt anything
[14:43] <kpreid> fyi, I don't work with the Java releases
[14:43] <redwyrm> ah
[14:43] <redwyrm> lisp?
[14:43] <kpreid> I can pass it on, but if you could write up your
experience and post it to e-lang, that would be great
[14:43] <kpreid> yes
[14:43] <kpreid> http://paste.lisp.org/display/9446 is the script I
use to download and install E-on-Java and its source the way I like it
[14:49] <redwyrm> is the default install technique annoying?
[14:50] <kpreid> you mean inst-e.sh?
[14:50] <kpreid> I think I wrote this before that existed
[14:51] <kpreid> also, I know my script does only what I want, since
I wrote it :)
[14:51] <redwyrm> what's a caplet?
[14:52] <kpreid> applications written to run in the CapDesk environment
[14:53] <kpreid> or, more generally, the equivalent of an "applet",
as in Java, except that it's more useful because you can give it
authorities it didn't start with, unlike Java applet sandboxing
[14:53] <redwyrm> what's CapDesk like?
[14:53] <kpreid> very small
[14:53] <redwyrm> lol
[14:53] <kpreid> you have a simple file browser, and you can install
caplets and use them to view/edit files
[14:54] <kpreid> you can also browse other computers' files using E's
networking, and copy and so on, but I've never tried that myself
[14:55] <redwyrm> hmm
[14:55] <redwyrm> how does the networking layer work?
[14:55] <kpreid> um, can you ask a more specific question? :)
[14:56] <redwyrm> ok, does it use TCP or UDP, and what port(s)?
[14:56] <kpreid> TCP
[14:57] <kpreid> pluribus 3469/tcp Pluribus -- http://www.iana.org/
assignments/port-numbers
[14:58] <kpreid> but it can work on any port number, in the usual way
[14:58] <kpreid> there's a setting in eprops.txt for what port to
listen on by default
[14:59] <redwyrm> so in what sense is it P2P?
[15:01] <redwyrm> is it analogous to Gnutella, with ultra-peer, leaf
nodes, web caches of peer IPs?
[15:01] <kpreid> in that communication between any two objects is
nearly always directly between their hosts, rather than going through
a server to which both are connected
[15:01] <kpreid> it's p2p in the sense that the Internet itself is
p2p by default
[15:02] <redwyrm> I think I get what you mean
[15:02] <redwyrm> so if user A has object X, and user B has object Y
that needs to access object X, how would this happen?
[15:03] <kpreid> well, they have to be introduced somehow
[15:03] <kpreid> one answer is that a SturdyRef for X is somehow
passed to B
[15:04] <kpreid> a SturdyRef can be written as a URL, so you can pass
it any way you like
[15:04] <kpreid> and it contains sufficient information to open a TCP
connection
[15:04] <kpreid> the other way is that something that already knows X
and Y does Y <- foo(X)
[15:04] <redwyrm> oh
[15:04] <kpreid> in which case Y's vat recieves, again, sufficient
information to open a connection
[15:05] <redwyrm> what would a SturdyRef look like in URL form?
[15:05] <redwyrm> I'm just trying to visualize this
[15:07] <kpreid> here's one
[15:07] <kpreid> captp://
*fs2fiioflvj227ijpow736rffrcsposo at 192.168.0.6:58929,fe80:0:0:0:211:24ff:
fe78:4ec4%4:58929/zztuywbgylwn2pdianendaw27hhopobr
[15:07] <kpreid> the part between @ and / is the search path, which
indicates what to connect to
[15:08] <kpreid> the *... is the public key fingerprint of the vat,
and the /... is the object's identifier (Swiss Number)
[15:08] <redwyrm> that looks like base-32 encoding
[15:08] <kpreid> it probably is. I don't know the full details of
captp: myself
[15:09] <redwyrm> do you know what CAPTP stands for?
[15:09] <kpreid> Capability Tr<something> Protocol
[15:09] <redwyrm> oh
[15:13] <kpreid> here's one that will actually work
[15:14] <kpreid> ? def sr := <captp://
*qrvefqxzv4pp2wskjyol2x4ygav7gdym at www.slimy.com:35045/
zyo7h7whpddbghivuvoo6di4b4cmhsxp>
[15:14] <eel> # value: <***a SturdyRef throws a SecurityException
when printed***>
[15:14] <kpreid> uh
[15:14] <kpreid> oh, right.
[15:14] <kpreid> ? introducer
[15:14] <eel> # value: <Off The Air>
[15:14] <kpreid> ? introducer.onTheAir()
[15:14] <eel> # value: ["3DES_SDH_M2", "3DES_SDH_M"]
[15:14] <kpreid> ? def sr := <captp://
*qrvefqxzv4pp2wskjyol2x4ygav7gdym at www.slimy.com:35045/
zyo7h7whpddbghivuvoo6di4b4cmhsxp>
[15:14] <eel> # value: <SturdyRef>
[15:14] <kpreid> ? def remoteSlot := sr.getValue()
[15:14] <eel> # problem: <NoSuchMethodException: <a
SturdyRef>.getValue/0>
[15:14] <kpreid> ? def remoteSlot := sr.getRcvr()
[15:14] <eel> # value: <Remote Promise>
[15:15] <kpreid> ? Ref.whenResolved(remoteSlot <- getValue(), println)
[15:15] <eel> # value: <Promise>
[15:15] <eel> 1 -- kpreid
[15:15] <kpreid> ? remoteSlot <- setValue(2)
[15:15] <eel> # value: <Remote Promise>
[15:15] <kpreid> ? Ref.whenResolved(remoteSlot <- getValue(), println)
[15:15] <eel> # value: <Promise>
[15:15] <eel> 2 -- kpreid
[15:15] <kpreid> and if you have E installed, you can do the same
thing yourself
[15:16] <redwyrm> I'm still trying to decide where the root of the
installation should be
[15:16] <redwyrm> like, maybe I should put it in my home directory
for now?
[15:16] <kpreid> sure
[15:16] <kpreid> for a simple install, the only thing that actually
needs to be in a particular location is 'rune'
[15:17] <redwyrm> just in $PATH?
[15:17] <kpreid> yes
[15:17] <redwyrm> ah
[15:25] <redwyrm> is ./dist important?
[15:25] <kpreid> hm
[15:25] <kpreid> I believe that's something that only exists if you
build from source
[15:26] <kpreid> looks like inst-e.bash is making assumptions it
shouldn't
[15:27] <redwyrm> yep
[15:30] <redwyrm> wow, this script is really hard on the eyes!
[15:31] <redwyrm> for example,
[15:31] <redwyrm> DATA=${DATA/\$\{\{e.javacmd\}\}/${JCMD}}
[15:32] <kpreid> well, half bash's fault, half the choice of
placeholder syntax...
[15:32] <kpreid> my get-e.sh uses the substProps.e tool to do it instead
[15:34] <redwyrm> I don't feel like I'm on the same wavelength as the
people developing this
[15:34] <redwyrm> are they Smalltalk people?
[15:35] <kpreid> not particularly
[15:35] <kpreid> http://www.erights.org/history/overview.html might
be interesting and/or alarming
[15:36] <redwyrm> yeah, both!
[15:37] <redwyrm> Twisted Matrix is descended from E???
[15:37] <kpreid> the concurrency and distribution parts, yes
[15:37] <redwyrm> ah
[15:48] <redwyrm> lol, I got side-tracked from the install process
[15:49] <kpreid> E's most direct ancestry is as a 'cleaned up'
version of Java
[15:51] <redwyrm> ...yet its object model doesn't look much like
Java's OM
[15:52] <kpreid> just take Java and throw out fields, type-based
overloading, and static checking
[15:52] <kpreid> then you have the way in which objects interact
[15:53] <kpreid> E tries to distinguish the language from the objects
[15:53] <kpreid> ELib : JVM :: E language : Java
[15:53] <kpreid> "absorb apply"
[15:59] <redwyrm> alright, I have no clue how to install
[16:00] <kpreid> the minimal procedure is: unpack E-purej, copy rune-
template to $PATH, copy eprops-template to eprops.txt, edit the
placeholders in rune and eprops.txt
[16:09] <redwyrm> what do I do with rune-template?
[16:09] <redwyrm> oh, nvm
[16:09] <redwyrm> :)
[16:11] <redwyrm> ok, I just ran ./rune:
[16:11] <redwyrm> Exception in thread "main"
java.lang.NoClassDefFoundError: org/erights/e/elang/interp/Rune
[16:11] <kpreid> that means you didn't replace EHOME in rune
[16:12] <redwyrm> yeah, I did
[16:12] <kpreid> with what?
[16:12] <redwyrm> /home/aaron/prog/e/ehome
[16:12] <kpreid> it should be the directory in which e.jar is located
[16:13] <redwyrm> ah
[16:13] <redwyrm> anything else needed there?
[16:13] <kpreid> no
[16:13] <kpreid> fix e.home in eprops.txt too
[16:13] <redwyrm> ok, I'm up and running!
[16:13] <redwyrm> :D
[16:17] <redwyrm> now to relocate
[16:17] <redwyrm> which means disconnecting from the Internet :(
[16:17] <kpreid> ?
[16:17] <redwyrm> catch ya later
[16:18] Action: kpreid waves
[16:18] redwyrm (n=redwyrm at adsl-70-250-179-138.dsl.rcsntx.swbell.net)
left irc: "Leaving"
Tuesday, 16 May, 2006
[05:03] redwyrm (n=redwyrm at ppp-70-247-167-139.dsl.rcsntx.swbell.net)
joined #erights
[05:03] <redwyrm> hi
[05:15] <redwyrm> ? def sr := <captp://
*qrvefqxzv4pp2wskjyol2x4ygav7gdym at www.slimy.com:35045/
zyo7h7whpddbghivuvoo6di4b4cmhsxp>
[05:15] <eel> # value: <SturdyRef>
[05:16] <redwyrm> def remoteSlot := sr.getRcvr()
[05:16] <redwyrm> ? def remoteSlot := sr.getRcvr()
[05:16] <eel> # value: <Remote Promise>
[05:16] <redwyrm> when(remoteSlot <- getValue()) -> done(val) {
[05:17] <redwyrm> ? when(remoteSlot <- getValue()) -> done(val)
{println(val) } catch prob {println("Error: " + prob)}
[05:17] <eel> # value: <Promise>
[05:17] <eel> All your slots are belong to me! -- redwyrm
[05:32] <redwyrm> ? when(remoteSlot <- getValue()) -> done(val)
{println(val) } catch prob {println("Error: " + prob)}
[05:32] <eel> # value: <Promise>
[05:32] <eel> Error: problem: <IOException:
java.net.ConnectException: Connection refused -- redwyrm
[05:32] <eel> > -- redwyrm
[05:34] <redwyrm> var redwyrmFunc := null
[05:34] <redwyrm> ? var redwyrmFunc := null
[05:34] <redwyrm> ? redwyrmFunc
[05:35] <redwyrm> ? help
[05:35] <eel> # value: ? help
[05:35] <eel> # Shows this message.
[05:35] <eel> # ? help(<expression>)
[05:35] <eel> # Shows what messages the expression's value responds to.
[05:35] <eel> # ? rune(["--help"])
[05:35] <eel> # For help on running external commands
[05:35] <eel> ...
[05:36] <redwyrm> ? when(remoteSlot <- getValue()) -> done(val)
{redwyrmFunc := val} catch prob {println("Failed to get value: "+prob)}
[05:36] <eel> # value: <Promise>
[05:36] <eel> Failed to get value: problem: <IOException:
java.net.ConnectException: Connection refused -- redwyrm
[05:36] <eel> > -- redwyrm
[05:38] <redwyrm> ? increment
[05:38] <eel> # problem: Failed: Undefined variable: increment
[05:39] <redwyrm> ? def increment(num: int) :int {return num + 1}
[05:39] <eel> # value: <increment>
[05:39] <redwyrm> ? increment(3)
[05:39] <eel> # value: 4
[05:40] <redwyrm> ? when(remoteSlot <- setValue(increment)) -> done
(_) {println("Successfully set value to increment")} catch prob
{println("Failed to set value: "+prob)}
[05:40] <eel> # value: <Promise>
[05:40] <eel> Successfully set value to increment -- redwyrm
[06:24] <redwyrm> anybody home?
[08:31] <redwyrm> ? Ref.whenResolved(remoteSlot <- getValue(), println)
[08:31] <eel> # value: <Promise>
[08:31] <eel> <increment> -- redwyrm
[08:58] <redwyrm> ? def makeIncrementObject() {var accumulator := 0;
def incrementObject { to increment() { accumulator += 1 } to
getAccumulator() :int {return accumulator}}; return incrementObject}
[08:58] <eel> # value: <makeIncrementObject>
[08:58] <redwyrm> def incObj := makeIncrementObject()
[08:59] <redwyrm> ? def incObj := makeIncrementObject()
[08:59] <eel> # value: <incrementObject>
[09:00] <redwyrm> Ref.whenResolved(remoteSlot <- setValue(incObj),
def inform(_) { println("successful")})
[09:00] <redwyrm> ? Ref.whenResolved(remoteSlot <- setValue(incObj),
def inform(_) { println("successful")})
[09:00] <eel> # value: <Promise>
[09:00] <eel> successful -- redwyrm
[09:01] <redwyrm> ? Ref.whenResolved((remoteSlot <- getValue()) <-
increment(), def inform(_) { println("successful")})
[09:01] <eel> # value: <Promise>
[09:01] <eel> successful -- redwyrm
[09:02] <redwyrm> incObj.getAccumulator()
[09:02] <redwyrm> ? incObj.getAccumulator()
[09:02] <eel> # value: 1
[09:03] <redwyrm> ? incObj.getAccumulator()
[09:03] <eel> # value: 2
[09:07] <redwyrm> ? incObj.getAccumulator()
[09:07] <eel> # value: 12
[09:20] lisppaste2 (n=lisppast at common-lisp.net) left irc: Read error:
104 (Connection reset by peer)
[09:20] lisppaste2 (n=lisppast at common-lisp.net) left irc: Read error:
104 (Connection reset by peer)
[09:24] lisppaste2 (n=lisppast at common-lisp.net) joined #erights
[10:07] <redwyrm> anybody around?
[10:07] <redwyrm> ? def sr2 := makeSturdyRef.temp(incObj)
[10:07] <eel> # problem: Failed: Undefined variable: makeSturdyRef
[10:12] idnar (i=mithrand at unaffiliated/idnar) left irc: Nick
collision from services.
[10:12] idnar (i=mithrand at unaffiliated/idnar) left irc: Nick
collision from services.
[10:12] idnar_ (i=mithrand at unaffiliated/idnar) joined #erights
[10:20] <redwyrm> hi
[10:28] <redwyrm> ? def sr := <captp://
*wpxuaygqqdnt6otis7ohxj6fnaijybwq at 70.247.167.139:50378/
y4stbmlp6nkuxfrshjosye4olbkqgvcc>
[10:28] <eel> # value: <SturdyRef>
[10:29] <redwyrm> def remote := sr.getRcvr()
[10:29] <redwyrm> ? def remote := sr.getRcvr()
[10:29] <eel> # value: <Remote Promise>
[10:30] <redwyrm> remote <- incr()
[10:31] <redwyrm> ? when(remote <- incr()) -> done(_) { println
("done.")}
[10:31] <eel> # value: <Promise>
[10:31] <eel> done. -- redwyrm
[10:37] <redwyrm> ? when(remote <- incr()) -> done(acc) { println
("incremented, value == " + acc)}
[10:37] <eel> # value: <Promise>
[10:37] <eel> incremented, value == 3 -- redwyrm
[10:37] <redwyrm> ? when(remote <- incr()) -> done(acc) { println
("incremented, value == " + acc)}
[10:37] <eel> # value: <Promise>
[10:37] <eel> incremented, value == 4 -- redwyrm
[10:40] <redwyrm> ? when(remote <- incr()) -> done(acc) { println
("incremented, value == " + acc)}
[10:40] <eel> # value: <Promise>
[10:40] <eel> incremented, value == 5 -- redwyrm
[10:44] <redwyrm> ? when(remote <- incr()) -> done(acc) { println
("incremented, value == " + acc)}
[10:44] <eel> # value: <Promise>
[10:44] <eel> incremented, value == 6 -- redwyrm
[10:45] <redwyrm> ? when(remote <- incr()) -> done(acc) { println
("incremented, value == " + acc)}
[10:45] <eel> # value: <Promise>
[10:45] <eel> incremented, value == 7 -- redwyrm
[10:49] redwyrm_ (n=redwyrm at ppp-70-247-163-138.dsl.rcsntx.swbell.net)
joined #erights
[10:49] redwyrm (n=redwyrm at ppp-70-247-167-139.dsl.rcsntx.swbell.net)
left irc: Read error: 104 (Connection reset by peer)
[10:50] <redwyrm_> ? when(remote <- incr()) -> done(acc) { println
("incremented, value == " + acc)}
[10:50] <eel> # value: <Promise>
[10:51] <redwyrm_> ? def remote := sr.getRcvr()
[10:51] <eel> # value: <Remote Promise>
[10:51] <redwyrm_> ? when(remote <- incr()) -> done(acc) { println
("incremented, value == " + acc)}
[10:51] <eel> # value: <Promise>
[10:53] <redwyrm_> sr
[10:53] <redwyrm_> ? sr
[10:53] <eel> # value: <SturdyRef>
[10:53] <redwyrm_> ? help(sr)
[10:53] <eel> # value: a net.captp.jcomm.SturdyRef
[10:53] <eel> # /** Missing docComment */
[10:53] <eel> # interface "net.captp.jcomm.SturdyRef" {
[10:53] <eel> #
[10:53] <eel> # /** Instance method*/
[10:53] <eel> # to getRcvr() :any
[10:53] <eel> ...
[10:56] <redwyrm_> ? introducer.sturdyToURI(sr)
[10:56] <eel> # value: "captp://
*wpxuaygqqdnt6otis7ohxj6fnaijybwq at 70.247.167.139:50378/
y4stbmlp6nkuxfrshjosye4olbkqgvcc"
[12:13] <kpreid> redwyrm_: hi
[12:13] <kpreid> yes, makeSturdyRef isn't available
[12:14] <redwyrm_> hey!
[12:14] <kpreid> I forget exactly why, but I must have designed it
that way...
[12:15] <kpreid> by the way, what's your time zone?
[12:15] <redwyrm_> Central
[12:16] <redwyrm_> how do I use lisppaste2?
[12:16] <redwyrm_> I want to show you my latest toy script
[12:16] <kpreid> lisppaste2: URL?
[12:16] <lisppaste2> To use the lisppaste bot, visit http://
paste.lisp.org/new/erights and enter your paste.
[12:17] <redwyrm_> thanks
[12:18] -!- redwyrm_ is now known as redwyrm
[12:18] redwyrm (n=redwyrm at ppp-70-247-163-138.dsl.rcsntx.swbell.net)
left irc: "Leaving"
[12:19] redwyrm (n=redwyrm at ppp-70-247-163-138.dsl.rcsntx.swbell.net)
joined #erights
[12:19] <lisppaste2> redwyrm pasted "toy-script" at http://
paste.lisp.org/display/20066
[12:20] <redwyrm> the main thing I'm hung up on is working around
firewalls
[12:20] <kpreid> looks good!
[12:20] <redwyrm> :)
[12:20] <kpreid> Theoretically™, that's handled by the comm system :)
[12:20] <redwyrm> ah
[12:21] <kpreid> intermediating servers that just pass through the
encrypted data stream
[12:21] <kpreid> such servers are also used for contacting a vat
whose TCP-level address has changed
[12:21] <kpreid> since a vat's key fingerprint is sufficient to
identify it
[12:22] <kpreid> none of this is actually implemented yet
[12:22] <redwyrm> oh
[12:22] <redwyrm> I'm wondering how much time I'll be able to apply
to this
[12:24] <redwyrm> I definitely want to improve this stuff
[12:24] <redwyrm> or at least write E apps
[12:24] <kpreid> great
[12:25] <kpreid> if you want to know about the comm system
implementation, ask on the list - I haven't studied that part of the
implementation
[12:25] <redwyrm> hmm, ok
[12:27] <redwyrm> where could I read up on capletsL
[12:27] <redwyrm> ?
[12:27] <redwyrm> or is it just not documented yet?
[12:28] <kpreid> I haven't looked
[12:30] <kpreid> I've done E GUI apps but no caplets
[12:36] <redwyrm> I'm trying to subscribe to the mailing list...
[12:42] <redwyrm> ok, I think it's done
[12:45] <redwyrm> ? timer
[12:45] <eel> # value: <a Timer>
[12:46] <redwyrm> what does thunk { ... } do?
[12:46] <redwyrm> I'm guessing it creates an anonymous function with
no arguments
[12:47] <kpreid> yes
[12:47] <kpreid> there is a new function syntax being considered
[12:47] <kpreid> fn <args> {...}
[12:48] <kpreid> so, like thunk, but generalized to any number of
arguments (arity)
[12:48] <redwyrm> ? timer.whenPast(timer.now() + 1000, thunk { printf
("time's up") })
[12:48] <eel> # problem: Failed: Undefined variable: printf
[12:48] <redwyrm> ? timer.whenPast(timer.now() + 1000, thunk { println
("time's up") })
[12:48] <eel> # value: <Promise>
[12:48] <eel> time's up -- redwyrm
[12:48] <kpreid> ? fn a, b { [b, a] }(1, 2)
[12:48] <eel> # value: [2, 1]
[12:49] <redwyrm> that syntax rubs me the wrong way...
[12:49] <redwyrm> not sure why
[12:49] <kpreid> which, thunk? fn?
[12:49] <redwyrm> so would fn be a keyword?
[12:49] <kpreid> yes
[12:49] <redwyrm> the latter
[12:51] <redwyrm> I think it bothers me because fn doesn't jump out
at me as a keyword
[12:51] <kpreid> ah
[12:51] <redwyrm> it looks more like a variable name
[12:52] <redwyrm> why not thunk a, b { [b, a] }(1, 2)
[12:52] <redwyrm> ?
[12:52] <kpreid> because thunk *means* 0ary
[12:52] <kpreid> at least, in some definitions
[12:52] <kpreid> also, one reason to move away from 'thunk' is that
if you haven't heard of thunks already, it's a funny keyword
[12:53] Action: redwyrm makes thunking noises
[12:53] <redwyrm> :)
[12:54] <kpreid> ? def sub(t :String) { return t.replaceAll("f", "th") }
[12:54] <eel> # value: <sub>
[12:55] <redwyrm> ? sub("foo")
[12:55] <eel> # value: "thoo"
[12:55] <redwyrm> oh kay...
[12:59] <redwyrm> what's a brand?
[13:18] <kpreid> what's the context?
[13:18] <kpreid> I mean, I can tell you, but it might help to explain
it in context
[13:19] <redwyrm> heh, never mind, I figured out how to use it
[13:19] <redwyrm> but I'm not sure why it's called a brand
[13:20] <kpreid> as in identifying mark
[13:20] <redwyrm> brand as in branding iron, or as in brand of cereal?
[13:20] <redwyrm> ah
[13:20] <kpreid> well, they're the same root...
[13:20] <redwyrm> true, but the meaning has diverged
[13:20] <kpreid> in the Sealer/Unsealer/Brand set the Brand carries
no authority and serves equally well to identify the set
[13:23] <redwyrm> I'm trying to picture how I would implement this if
I had to write Sealer/Unsealer/Brand from scratch
[13:24] <kpreid> def make() { def sealer {...}; def unsealer {...};
def brand {...}; return [sealer, unsealer] }
[13:25] <redwyrm> thanks for the hint ;-)
[13:32] <redwyrm> ok, I'm back. I was helping my room mate find his
keys so he could go to work
[13:41] <redwyrm> hmm, the rune REPL's error reporting prints out an
obnoxious amount of information
[13:43] <lisppaste2> redwyrm pasted "obnoxious error messages" at
http://paste.lisp.org/display/20067
[13:51] <kpreid> hm
[13:51] <kpreid> once upon a time that happened only if it can't open
the tracelog, but recent E versions seem to do it anyway
[13:52] <kpreid> or rather: that is the format of a tracelog entry. I
don't know why it's being printed there
[13:52] <kpreid> since I've seen that too, it's probably a bug
[13:59] <redwyrm> strange
[14:00] <redwyrm> I was thinking about writing a front-end for rune
that would use readline
[14:00] <redwyrm> maybe the front-end could filter it out until the
bug is fixed
[14:01] <kpreid> I use rlwrap
[14:03] <redwyrm> ooh, where can I get it?
[14:04] <kpreid> I installed it through DarwinPorts but `port info
rlwrap` says http://utopia.knoware.nl/~hlub/uck/rlwrap/
[14:05] kpreid (n=kpreid at 24-52-49-37.bflony.adelphia.net) left irc:
[14:06] kpreid (n=kpreid at 24-52-49-37.bflony.adelphia.net) joined
#erights
[14:12] <redwyrm> this is nifty!
[14:12] Action: redwyrm <3 rlwrap
[14:21] -!- idnar_ is now known as idnar
[14:21] -!- idnar_ is now known as idnar
[14:46] <redwyrm> the list returned by introducer.onTheAir() suggests
that 3DES is being used as a cipher
[14:46] <redwyrm> why not something like AES or Twofish?
[14:47] <redwyrm> or Blowfish?
[14:47] <redwyrm> I'm sure it's not a big deal, though :)
[15:04] <kpreid> I have no better answer than 'search the mailing
list archives'
[15:04] <kpreid> (Google term site:eros-os.org works well)
[15:05] <redwyrm> ah, thanks!
[15:22] <redwyrm> inconclusive :/
[15:22] <redwyrm> I did see an anouncement about NIST's selection of
Rijndael as AES
[15:22] <redwyrm> around 2000
[15:23] <redwyrm> so maybe 3DES is being used to stay backwards-
compatible, since AES wasn't around when E came into being
[15:23] <redwyrm> maybe...
[16:18] <zooko> hi!
[16:19] <zooko> I'm the author of inst-e.bash, but I haven't used it
since 0.8.26 or earlier, which is something on the order of years ago.
[16:19] <zooko> Sorry it didn't work for you.
[16:19] <zooko> The E protocol was implemented before AES was invented.
[16:19] <zooko> Probably inst-e.bash assumes you are starting from
the source tarball and you were starting from a binary package...
[16:21] <kpreid> yes
[16:21] <kpreid> I believe to work from the binary inst-e should
ignore dist/ and assume the copy has already happened
[16:22] <kpreid> or (I'm not sure about this) assume that its source
(copy-from) directory might be a binary package *OR* a dist/ dir
[16:22] Action: zooko adds "install E again and fix inst-e script"
onto his list of possible activities...
[16:22] <kpreid> but I'm not that familiar with the E build process
[16:23] <zooko> I'm kind of loathe to deal with E-on-Java any more.
I'm allergic to Java.
[16:24] <kpreid> I dislike Java-the-language but find Java-the-
platform useful
[16:24] <kpreid> E makes a decent replacement for Java-the-language
when I want to use libraries that happen to be in Java
[16:26] <CIA-18> 03kpreid * r554 10cl-e/lib/org/erights/e/elib/
serial/DeepFrozenAuthor.emaker: DeepFrozenAuthor.emaker avoids
using || and && (boolean flow operators), in preparation for
expansions which may use DeepFrozen.
[16:26] <zooko> I guess it is the platform that bugs me wrt E. For
example, installation. For another example, SWT stopped working a
year or two ago on both of my platforms (linux, mac), which killed my
interest in the GUI game that I was working on...
[16:27] <zooko> That latter is more E's fault than Java's.
[16:28] <zooko> Sorry to complain. It's mostly just a political
thing. Grumble grumble Java grumble.
[17:00] redwyrm (n=redwyrm at ppp-70-247-163-138.dsl.rcsntx.swbell.net)
left irc: Read error: 110 (Connection timed out)
[17:01] <zooko> I've been hacking on Dungeon Crawl. Roguelike,
written in amateurish C++.
[18:10] zooko (n=user at blk-215-95-202.eastlink.ca) left irc: Remote
closed the connection
[19:00] redwyrm (n=redwyrm at ppp-70-251-148-11.dsl.rcsntx.swbell.net)
joined #erights
[19:00] <redwyrm> hey
--
Kevin Reid <http://homepage.mac.com/kpreid/>
More information about the e-lang
mailing list