<Smerdyakov>
What's the proper way to let ocamlopt know about the interface of a library I want to use?
Riastrad1 has joined #ocaml
Riastradh has quit [Read error: 60 (Operation timed out)]
Riastrad1 is now known as Riastradh
polin8 has joined #ocaml
jdrake has joined #ocaml
jdrake has quit [Read error: 104 (Connection reset by peer)]
jdrake has joined #ocaml
rpr has joined #ocaml
<jdrake>
could anyone explain to me how a nested function such as 'let sum i = let sum2 j = i + j in sum;;' could actually work when passed two parameters?
<whee>
that one won't
<whee>
I think you mean let sum = function i -> function j -> i + j or some such
<whee>
or, maybe that would work
<jdrake>
i am looking in that book.pdf that is 109 pages long
<whee>
what you typed wouldn't work because of scoping issues, though
<jdrake>
oops, problem.. change it to 'in sum2;;'
<whee>
okay, that makes more sense then
<whee>
you're defining a function sum that accepts one argument, and returns a function sum2, which also accepts one argument, and evalulates to an int when it's all over
<jdrake>
i think i am seeing it sort of now
<whee>
functions are just like anything else
<whee>
you could sortof type sum as (int) -> (int -> int) if that helps you see it in this situation better
<whee>
I don't know if that's valid, but whatever :)
<jdrake>
no! DON'T break down my 'C' wall!
<teratorn>
yes!
<jdrake>
that is sort of better whee
<whee>
haha, oh boy
<whee>
# let rec sum i = let sum2 j = i + j in sum;;
<whee>
val sum : int -> 'a as 'a = <fun>
<whee>
I don't even know what this could possibly do :P
<whee>
just seems to continuously return int -> 'a functions :(
<jdrake>
i am trying to gradually get upto the point where I can write simple ocaml programs
<Smerdyakov>
Can I get at the C tmpnam() function easily in OCaml?
<Smerdyakov>
As in, is there already an OCaml version in the standard library?
<Smerdyakov>
whee, that code won't compile for me. I think you have some bizarre extra-permissive settings in effect. :P
buggs is now known as buggs|afk
Xcal has joined #ocaml
Xcalibor has quit [Read error: 60 (Operation timed out)]
polin8 has quit [Read error: 110 (Connection timed out)]
mrvn__ has joined #ocaml
mrvn has quit [Read error: 110 (Connection timed out)]
mrvn has joined #ocaml
jdrake has quit ["Oops. This machine just fell asleep"]
mrvn has quit [Read error: 60 (Operation timed out)]
mrvn__ has quit [Read error: 110 (Connection timed out)]
mrvn has joined #ocaml
rpr has quit [Remote closed the connection]
__DL__ has joined #ocaml
mattam_ has quit [zelazny.freenode.net irc.freenode.net]
teratorn has quit [zelazny.freenode.net irc.freenode.net]
Riastradh has quit [zelazny.freenode.net irc.freenode.net]
foxster has quit [zelazny.freenode.net irc.freenode.net]
Hipo has quit [zelazny.freenode.net irc.freenode.net]
Nate1975 has quit [zelazny.freenode.net irc.freenode.net]
brwill_zzz has quit [zelazny.freenode.net irc.freenode.net]
rox has quit [zelazny.freenode.net irc.freenode.net]
whee has quit [zelazny.freenode.net irc.freenode.net]
vegai has quit [zelazny.freenode.net irc.freenode.net]
vect has quit [zelazny.freenode.net irc.freenode.net]
buggs|afk has quit [zelazny.freenode.net irc.freenode.net]
Xcal has quit [zelazny.freenode.net irc.freenode.net]
__DL__ has quit [zelazny.freenode.net irc.freenode.net]
srv has quit [zelazny.freenode.net irc.freenode.net]
jdmarshall has quit [zelazny.freenode.net irc.freenode.net]
Maddas has quit [zelazny.freenode.net irc.freenode.net]
cm has quit [zelazny.freenode.net irc.freenode.net]
wax has quit [zelazny.freenode.net irc.freenode.net]
karryall has quit [zelazny.freenode.net irc.freenode.net]
__DL__ has joined #ocaml
Xcal has joined #ocaml
Riastradh has joined #ocaml
buggs|afk has joined #ocaml
foxster has joined #ocaml
whee has joined #ocaml
mattam_ has joined #ocaml
karryall has joined #ocaml
Hipo has joined #ocaml
srv has joined #ocaml
Nate1975 has joined #ocaml
jdmarshall has joined #ocaml
teratorn has joined #ocaml
rox has joined #ocaml
brwill_zzz has joined #ocaml
vect has joined #ocaml
vegai has joined #ocaml
cm has joined #ocaml
wax has joined #ocaml
Maddas has joined #ocaml
jdmarshall has quit []
Kinners has joined #ocaml
teratorn has quit [zelazny.freenode.net irc.freenode.net]
teratorn has joined #ocaml
<Xcal>
hiyas
det has joined #ocaml
polin8 has joined #ocaml
det has quit ["TE) (Swing them udders"]
Kinners has left #ocaml []
atom-z has joined #ocaml
<atom-z>
does ocaml have monads?
themus has joined #ocaml
<Smerdyakov>
There is no monad support in the standard library or language, but you're free to code such yourself.
<atom-z>
ah ok
<atom-z>
thanks
<atom-z>
(to be honest i dont like monads (yet))
<Smerdyakov>
You don't like to know by looking at the type of a function whether it will have "side effects" when you call it?
karryall has quit [Read error: 110 (Connection timed out)]
<atom-z>
Smerdyakov: probably, but when i was trying to learn haskell, monads seemed to get in the way and stop me from using things i was used to (i.e. head and tail)
* Xcal
is learning about monads right now... they seem to be very powerful
Xcal is now known as Xcalibor
Xcalibor has quit [Read error: 54 (Connection reset by peer)]
Xcalibor has joined #ocaml
<Maddas>
Hm. Is there any way to use ncurses with O'Caml?
<Maddas>
Or any other way to create something similar?
<Xcalibor>
no idea, sorry
<Maddas>
Dang. There is something which stopped being compatible with O'Caml since 3.04, isn't maintained and stalled at version 0.0
<Xcalibor>
Maddas: there you have a nice project for you to take ;-)
<Maddas>
heh, I hardly know any C at all.
<Maddas>
:-(
<Maddas>
I wanted to write one or two things with ncurses though, to get a hang of it and ocaml.
<Maddas>
does ocaml support Closures?
<Maddas>
O'Caml, even
<Maddas>
Ugh, I'm pretty sure, but I'm doing something wrong trying to replicate simple code from an other language.
<Maddas>
Anybody mind giving me a helping hand?
<Riastradh>
Yes, OCaml has closures.
<Riastradh>
No decent functional language doesn't.
<Riastradh>
No decent functional language that has lambda, that is.
<Maddas>
Yes, I understand that. I'm doing something very simple very wrong though.