cjeris changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/
mikeX has quit ["leaving"]
<Optikal__>
can you close a "let ... in" statement like in SML?
jwt_ has quit [zelazny.freenode.net irc.freenode.net]
desertbot has quit [zelazny.freenode.net irc.freenode.net]
flux has quit [zelazny.freenode.net irc.freenode.net]
TaXules has quit [zelazny.freenode.net irc.freenode.net]
Nutssh has quit [zelazny.freenode.net irc.freenode.net]
tsuyoshi has quit [zelazny.freenode.net irc.freenode.net]
svenl has quit [zelazny.freenode.net irc.freenode.net]
love-pingoo has quit [zelazny.freenode.net irc.freenode.net]
ulfdoz has quit [zelazny.freenode.net irc.freenode.net]
z__z has quit [zelazny.freenode.net irc.freenode.net]
mbishop has quit [zelazny.freenode.net irc.freenode.net]
mrvn has quit [zelazny.freenode.net irc.freenode.net]
Hadaka has quit [zelazny.freenode.net irc.freenode.net]
Demitar has quit [zelazny.freenode.net irc.freenode.net]
tsuyoshi has joined #ocaml
mbishop has joined #ocaml
ulfdoz has joined #ocaml
z__z has joined #ocaml
mrvn has joined #ocaml
tsuyoshi has quit [Client Quit]
tsuyoshi has joined #ocaml
pants1 has joined #ocaml
sourcerror has joined #ocaml
jwt_ has joined #ocaml
desertbot has joined #ocaml
flux has joined #ocaml
TaXules has joined #ocaml
Nutssh has joined #ocaml
svenl has joined #ocaml
twobitsprite has left #ocaml []
Demitar has joined #ocaml
Hadaka has joined #ocaml
<postalchris>
Optikal: 'let ... in begin ... end"?
twobitsprite has joined #ocaml
<twobitsprite>
where does one find documentation on the full Stream module? it seem the docs are leaving out some important parts...
b00t has joined #ocaml
benny_ has joined #ocaml
benny has quit [Read error: 110 (Connection timed out)]
G_ has joined #ocaml
G has quit [Connection timed out]
_blackdog has quit [Remote closed the connection]
<dark_light>
(Unix.times()).Unix.tms_utime is specified in some unit or is just arbitrary? (I am using an tms_utime difference for comparing run time of algorithms)
<dark_light>
it's like C's clock()?
* Smerdyakov
learns of channel ##logic
<tsuyoshi>
I assume it's in seconds
<tsuyoshi>
yeah
<tsuyoshi>
clock_t times(struct tms *buf);
<tsuyoshi>
All times reported are in clock ticks.
<tsuyoshi>
times() returns the number of clock ticks that have elapsed since an arbitrary point in the past. For Linux 2.4 and earlier this point is the moment the system was booted. Since Linux 2.6, this point is (2^32/HZ) - 300 (i.e., about 429 million) seconds before system boot time.
<tsuyoshi>
ok, not seconds
<tsuyoshi>
hmm but ocaml is giving it as a float
malune__ has joined #ocaml
malune_ has quit [Read error: 110 (Connection timed out)]
b00t has quit ["Leaving"]
b00t has joined #ocaml
the_dormant has joined #ocaml
LeCamarade has joined #ocaml
Optikal__ has quit [Read error: 104 (Connection reset by peer)]
<LeCamarade>
@uptime
<desertbot>
Uptime: 8 hours, 51 minutes and 32 seconds
<Smerdyakov>
LeCamarade, not everyone agrees, but I think it is a breach of IRC etiquette to bring any bot into any channel without taking some sort of survey first to see who is in favor.
<LeCamarade>
Smerdyakov: I can take him down right now. He is meant to work particularly with evaluating OCaml statements.
<LeCamarade>
I am yet to add that plugin, though.
<LeCamarade>
Because of the security considerations.
<LeCamarade>
I figured it was fine with everyone to have a bot that could do for #ocaml what lambdabot does for #haskell. I could be wrong, in which case I'll take the bot to another channel, which we'd have to enter to evaluate statements.
<LeCamarade>
Nobody had complained, though, so I assumed it was okay with everyone.
desertbot has quit [Remote closed the connection]
<Smerdyakov>
Bot testing tends to eat up channel bandwidth while benefiting no one but the tester, who could just as well use a separate channel.
<Smerdyakov>
But feel free to ignore me if others disagree.
<LeCamarade>
Smerdyakov: I test on another channel and deploy here.
<LeCamarade>
Smerdyakov: They don't necessarily agree. They just went along with the idea, and we were discussing ways to sandbox the expressions well not to cause security risks.
<mbishop>
LeCamarade: btw, I hope "tobtresed" isn't desertbot's actual password :)
<LeCamarade>
So, maybe until someone asks me about it. Meanwhile, I work on this statement evaluation module, and I'll be using it in a tutorial channel if I can't use it here.
<LeCamarade>
mbishop: I just used ... no! You changed it?
<LeCamarade>
By the way, the source has changed lots. The modules especially. And I added some trivial ones.
<LeCamarade>
String.reverse "desertbot";;
* LeCamarade
wishes the bot was around to evaluate that ... yes, it will have additional functions.
<LeCamarade>
mbishop: You must be laughing at how crappy my code is, but I changed it a lot. :o)
<mbishop>
actually, it was pretty nice
<ulfdoz>
I wonder, whether lambdabot hasn't the better backend for this purpose, actually OCaml allows side-effects which in theorie could control global state.
<LeCamarade>
ulfdoz: You mean to write our bot as a front-end to lambdabot?
<LeCamarade>
And I don't doubt that lambdabot has a better back-end.
jwt_ has quit ["Ex-Chat"]
<ulfdoz>
LeCamarade: No, but you have to consider a bit more in ocaml.
<LeCamarade>
mbishop: It is overdosed on Haskell idioms, which simply don't work in many cases (treating strings as char list ? WTF?).
<LeCamarade>
ulfdoz: I have the basic framework working. My biggest problem, at the moment, is how to evaluate statements safely. Maybe I can't escape inserting the statement in a file and evaluating that...
<ulfdoz>
Actually you must reset all state keeping variables, when leaving scope of the evaluation of statement, else side-effects could influence the next one.
<LeCamarade>
I don't think I'll have a running ocaml system to do the evaluations. I think every statement will incur startup overhead so as to have a fresh state and any necessary libs we may have written to make things easier (or for security).
<mbishop>
Might want to check out how the SML guys do it with smlbot
<LeCamarade>
I think it is what lambdabot uses too. (Never got lambdabot's source, though.)
<LeCamarade>
mbishop: Aye.
<Smerdyakov>
smlbot uses HaMLet, which is an interpreter that applies the language Definition literally.
<Smerdyakov>
Completely safe. Ways out of the sandbox aren't even implemented.
<Smerdyakov>
For those who don't know the Definition, what I mean is essentially that evaluation proceeds by applying operational semantics rules to syntax.
<LeCamarade>
Smerdyakov: Wow. That's more work that we are willing to put in for a bot. :o) Since OCaml doesn't seem to ... can Campl4 be useful here?
* LeCamarade
is nealry clue-less about campl4
<Smerdyakov>
HaMLet was already implemented as a project of independent interest.
<Smerdyakov>
OCaml doesn't even have a definition, so it's not even possible to contemplate creating a similar tool for it.
<mbishop>
Smerdyakov: is smlbot's source available anywhere?
<Smerdyakov>
I have no information on that. It's not exactly a community effort, as far as I know; just Andreas Rossberg's pet project.
bluestorm_ has joined #ocaml
<Smerdyakov>
...but I bet all the interesting stuff is in HaMLet, which is easy to find on the web.
* mbishop
nods
Smerdyakov has quit ["Leaving"]
the_dormant has quit ["Au revoir"]
malune_ has joined #ocaml
bluestorm_ has quit ["Konversation terminated!"]
LeCamarade has quit ["Boss has some work for me"]
malune__ has quit [Read error: 110 (Connection timed out)]
bluestorm_ has joined #ocaml
Ai_Itai has joined #ocaml
jlouis has quit [Remote closed the connection]
jlouis has joined #ocaml
sourcerror has quit ["Quit"]
sourcerror has joined #ocaml
G__ has joined #ocaml
G__ is now known as G
pants2 has joined #ocaml
pants1 has quit [Read error: 110 (Connection timed out)]
G_ has quit [Read error: 110 (Connection timed out)]
malune__ has joined #ocaml
Demitar has quit [Read error: 104 (Connection reset by peer)]
Demitar_ has quit [Read error: 104 (Connection reset by peer)]
Demitar__ has joined #ocaml
Demitar has joined #ocaml
malune_ has quit [Read error: 110 (Connection timed out)]