<Smerdyakov>
I think your original uses the right style.
<seafoodX>
So did I.
<Smerdyakov>
(I personally like to put 'in's at line ends, not line beginnings.)
<seafoodX>
Smerdyakov: I actually put the 'in' at the beginning only when I get to what I call the "body" of the function.
<seafoodX>
(Which we discussed before...)
<mbishop>
I suppose the first is correct, yes, just looks weird on multiple lines, mine are usually single lines, and the let's line up
<seafoodX>
Anyway, I recently started using an IDE called OcaIDE for Eclipse. It's pretty cool. It has an outline window which shows a tree-like structure of functions. It's really handy for jumping to different parts of the function. Unfortunately, it puts nest1_1 at a deeper level of indentation than nest1_0, even though I think of them as being at the same level of nesting.
<seafoodX>
(This is for the first example.)
<seafoodX>
The only way to get nest1_0 and nest1_1 to appear at the same level is to use the second variant I pasted above.
<seafoodX>
But that forces me to make the functions mutually recursive.
<seafoodX>
(I may not want that.)
<seafoodX>
I've spoken to the developer, but as yet have failed to communicate exactly what I mean about nesting. Do you guys think I have a case for changing the indentation scheme?
<seafoodX>
(For the outline window)
<Smerdyakov>
I think the change you are asking for is a good idea.
mphill22 has joined #ocaml
<mphill22>
how do i exit the console if i run ocaml lol
Submarine has quit [Remote closed the connection]
<seafoodX>
Smerdyakov: Actually I'm only hoping that he'll provide it as an extra option so that users can select between one of two nesting styles. That way everyone is happy.
<Smerdyakov>
mphill22, send end-of-file.
<mphill22>
how??
<seafoodX>
The funny thing is his auto-indent package already indents in the style I wrote in my first paste.
<seafoodX>
mphill22: Ctrl-d will often do it.
<mphill22>
there we go. thankyou
<seafoodX>
mphill22: Depends on your terminal package of course. But glad that did the trick.
<seafoodX>
Okay guys, I've got another observation about OCaml. Doing arbitrary precision integer arithmetic in OCaml is syntactically verbose. Any way around this?
<seafoodX>
Perhaps using the module system?)
Smerdyakov has quit ["Leaving"]
piggybox__ is now known as piggybox
slipstream-- has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
CosmicRay has joined #ocaml
USACE_ has quit [Client Quit]
piggybox has quit [Read error: 104 (Connection reset by peer)]
piggybox has joined #ocaml
shrimpx has joined #ocaml
<shrimpx>
anyone know how to force mlyacc to parse "a b c" as "(a b) c" ?
<shrimpx>
ocamlyacc that is
CosmicRay has quit ["Client exiting"]
m3ga has joined #ocaml
cmeme has quit ["Client terminated by server"]
cmeme has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
m3ga has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
Hadaka has quit [anthony.freenode.net irc.freenode.net]
Hadaka has joined #ocaml
cmeme has quit ["Client terminated by server"]
cmeme has joined #ocaml
Mr_Awesome has quit ["time to get a new keyboard..."]
thesoko has quit [Remote closed the connection]
<tsuyoshi>
seafoodX: you can define operators
<seafoodX>
tsuyoshi: True. But what if you want two forms of arithmetic in the same module?
<tsuyoshi>
like
<seafoodX>
I dunno, int32s and big_ints
<shrimpx>
tsuyoshi: ya fixed it
<tsuyoshi>
let (+@) = Num.add_num
<tsuyoshi>
goddamn
<tsuyoshi>
I am not yet used to where they put punctuation on a japanese keyboard
<tsuyoshi>
and then you can do
<tsuyoshi>
bignum1 +@ bignum2
<tsuyoshi>
or whatever
<seafoodX>
That's very nice. But you would have to define other operators like +@@ for int32s if you wanted to use them in the same file.
<seafoodX>
I suppose that works...
<tsuyoshi>
yeah, no overloading
<tsuyoshi>
because of the type inference
<shrimpx>
seafoodX: is your nick really seafoodX or are you making fun of mine
<seafoodX>
tsuyoshi: Or because of the lack of type classes.
<seafoodX>
shrimpx: It doesn't seem credible, but my answer is yes, my name is really seafoodX.
<seafoodX>
But I will tell you about the etymology.
<tsuyoshi>
type classes? I don't know what those are
<seafoodX>
tsuyoshi: Haskell feature.
<shrimpx>
seafoodX: sweet
<seafoodX>
seafood is me too.
<seafoodX>
seafood is a lurker.
<tsuyoshi>
haskell makes my head hurt
<seafoodX>
tsuyoshi: But it's so much like OCaml!
<tsuyoshi>
maybe after I finish learning japanese I will try learning it again
<seafoodX>
shrimpx: So, my real name is Sean Seefried. Seefried -> sea fried -> seafood.
<tsuyoshi>
haskell seems like the new lisp
<shrimpx>
wasn't there a proposal to add haskell-like typeclasses to ocaml?
<seafoodX>
seafoodX is the sporadically connecting version of seafood.
<seafoodX>
It's the real me.
<shrimpx>
and people say that caml functors are better than typeclasses anyway something something
<seafoodX>
shrimpx: Wouldn't know about type class proposal since I've only been part of the OCaml community for a short while.
<seafoodX>
shrimpx: If someone can show me how you use functors to simulate type classes then I'm all ears.
<tsuyoshi>
like all the people who learn new languages even when they don't need to for work, are all flocking to haskell
<seafoodX>
He visited us in Sydney for a few months.
<shrimpx>
ah
<shrimpx>
is that where univ of south wales is?
<seafoodX>
Yup
<seafoodX>
shrimpx: The paper looks interesting. (That's what they were working on when he visited.) But the functionality of type classes only comes if the proposed extension to the module language is implemented.
<seafoodX>
So for now I have to do without ....
<shrimpx>
manuel chakravary knows all about typeclsses<->functors =)
<Smerdyakov>
You can add your own printing function for a particular type, and it could play naughty and output to a file instead of the requested file.
<Smerdyakov>
s/requested file/requested channel
<alfredr_>
uh for one, there are 320,000 lists for a certain space
<Smerdyakov>
But, seriously, you should easily find out how to increase printing depth by reading the manual page. I knew nothing about how to do this, and I found it in a minute.
<alfredr_>
my man page for ocaml is like 1 page and doesn't say anything about anything useful