gl has quit ["La foule est une somme d'erreurs qu'il faut corriger."]
gl has joined #ocaml
gl has quit [Read error: 113 (No route to host)]
bobov has quit [Remote closed the connection]
merriam_ has joined #ocaml
mkfort has joined #ocaml
<mkfort>
hi, anyone here? I have a question
<mkfort>
is there a way to make 2 mutually recursive variant types? This this make sense?
<mkfort>
ah never mind
<mkfort>
I type mutually recursive variant types into google and I find out how to do this, nice
<mkfort>
well I'm still having a little trouble so if anyone is here it would be nice
<merriam_>
i'm here, but i probably can't help much
<mkfort>
oh I just mispelled
<mkfort>
I'm figuring it out
<merriam_>
ah :)
<mkfort>
hehe, those spelling mistakes kill ya
<mkfort>
i'm doing type state = State of string * transitions and transitions = Empty | Transitions of char * state *transitions;;
<mkfort>
ml is so nice
<mkfort>
so now that I've got my data structure thats half the work right
<mkfort>
time for a cigarrette hehe
<mkfort>
this is going to blow away my theory of computation class, they are using C++ but screw that
<mkfort>
I don't see how anyone can *think* in c++
<merriam_>
a us student using ocaml -- quite rare, i think :)
<mkfort>
it like you can either take 3 pages to write some ugly ass hack that doesn't do anything or you can take less than a page to write a solution that *solves the problem*
<merriam_>
skylan looks possibly usan, but then it's just you and him here
<mkfort>
well I don't think my professor has ever heard of it but he will learn hehe
<mkfort>
caml is the best thing the french have ever done, take ML, which is quite possibly one of the best languages , and then extend it, and then write completely awesome tools and compilers, its incredible. I mean ML should be slow and its a feat of man that they have made something so incredible
<mkfort>
that can actually be *faster* than C, it boggles the mind
<merriam_>
not sure about "should be slow", but i agree its speed is impressive
<mkfort>
well of course I'm not serious but people expect functional languages to be slower, if nothing else because its very high level
<mkfort>
caml is much more expressive than Java and thats slow as beans and its made by some of the largest computer companies in the world
<mkfort>
ah, you are Deutsch, I'm studying German now, but its just like my 2nd week in the class. Another structured but expressive language so to say
<merriam_>
actually i'm english, and i don't know much german :)
<mkfort>
Warum, Warum, Warum. Warum ist das Banana krumm? Darum
<mkfort>
ah
<merriam_>
but i understand that :)
<mkfort>
well english is a nice language but its more like perl don't you think haha
<mkfort>
nice, my prof was talking about that actually, I'll definitely read it
<mkfort>
thanks
<merriam_>
especially "the Tale of the Fishwife and its Sad Fate" :)
<mkfort>
at any rate it is much more regular than english, but thats not saying anything
<mkfort>
do you know how I can set 2 vals that are mutually recursive in a lazy way so that it doesn't evaluate the recursion when its defined?
<mkfort>
maybe I'm not thinking about this right
<mkfort>
I see
<mkfort>
just have the transition hold a string I think not the whole thing
<mkfort>
val q1 : state =
<mkfort>
State ("q1", Transition ('0', "q1", Transition ('1', "q2", Empty)))
<mkfort>
so forth
<mkfort>
yes I think this should be able to work
karryall has quit ["Client Exiting"]
<mrvn_>
mkfort: you can use mutable or references.
<mkfort>
I see
<mkfort>
This expression has type state ref but is here used with type state ref
<mkfort>
I do not understand this error
<mkfort>
I made the type state ref, and then when I used the Transition constructor i did ref q1 (q1 is a state)
<mrvn_>
no_maam: prosper kann nach und nach Punkte zu nem Slide hinzufuegen.
<mrvn_>
ups
<mkfort>
but it seems that 'ref q1' is of type state ref
<mkfort>
which is what the error says but why does it error?
<mrvn_>
paste the error
<mkfort>
# let q1 = State ("q1",Transition('0', ref q1, Transition('1', ref q2, Empty))) and q2 = State ("q2", Transition('1', ref q2, Transition('0', ref q1, Empty)));;
<mkfort>
This expression has type state ref but is here used with type state ref
<mkfort>
that is the error
<mkfort>
makes little sense to me
<mkfort>
I want this thing but I want the same thing
<mkfort>
type state = State of string * transition
<mkfort>
and transition = Empty | Transition of char * state ref * transition;;
<mkfort>
that is the type declaration
<mrvn_>
let rec q1 ... ?
<mrvn_>
Otherwise your ref q1 is for the old q1 and not the onw your defining.
<mkfort>
hmm, if I do that, I get a big recursion
mrvn_ is now known as mrvn
<mkfort>
which is what I was trying to avoid with the references
<mrvn>
You want recursion.
<mkfort>
okay, but this isn't infinite?
<mrvn>
no, its circular.
SYStems has joined #ocaml
<mkfort>
okay, its just that when I type that it fills up the screen with the recursion, which is maybe what I want
<mkfort>
but doesn't seem quite right to do that
<mrvn>
shouldn't fill up anything.
<mkfort>
it is evaluating the recursion
<mrvn>
Thats just the output.
<mkfort>
okay, that just sort of through me off, I thought it was like an error without being an error
<mkfort>
danke
<mkfort>
threw me off
<mrvn>
The pretty_print follows the reerences and never sees the end.
<mkfort>
ah, Ich verstehe
<mkfort>
I think that my original way is probably okay then
<mrvn>
works without the ref too.
<mrvn>
But then you have to define it all in one big let rec.
<mkfort>
yes, thats what I want, the pretty_print just confused me because I was testing things out in the interactive mode just to make sure my syntax was correct
<mkfort>
and it doesn't look good to scroll the screen for 300 lines but I see that it doesn't matter
SYStems has left #ocaml []
<mrvn>
confusing.
<mkfort>
oh wow, I didn't realize that the entire o-reilly book is online, that makes it much easier
<mrvn>
mkfort: url?
mkfort has quit [card.freenode.net irc.freenode.net]
mkfort has joined #ocaml
mkfort has quit [Read error: 110 (Connection timed out)]
TachYon25 has joined #ocaml
gl has joined #ocaml
gl has quit [Remote closed the connection]
gl has joined #ocaml
mrvn_ has joined #ocaml
mrvn has quit [Read error: 110 (Connection timed out)]
<xtrm>
is there an irc ocaml lib ?
<xtrm>
somewhere?
Dalroth has joined #ocaml
lam_ has quit ["leaving"]
SYStems has joined #ocaml
Good^2B^Free has joined #ocaml
SYStems has quit [Killed (NickServ (Nickname Enforcement))]
Good^2B^Free is now known as SYStems
Good^2B^Free has joined #ocaml
Good^2B^Free has quit [Remote closed the connection]
lam has joined #ocaml
TachYon25 has quit [Remote closed the connection]
gl has quit [No route to host]
SYStems has quit [No route to host]
gl has joined #ocaml
eivuokko has joined #ocaml
gl has quit [Read error: 104 (Connection reset by peer)]
gl has joined #ocaml
gl has quit [Read error: 113 (No route to host)]
gl has joined #ocaml
eivuokko has quit ["."]
mrvn_ is now known as mrvn
gl has quit [No route to host]
merriam_ has quit [Remote closed the connection]
merriam_ has joined #ocaml
Dalroth has quit []
urth^ has joined #ocaml
<urth^>
does anyone know anything about the suitability of ocaml for implementing a neural network?