descender has quit ["int main() { return main(); }"]
descender has joined #ocaml
Gueben has quit [Remote closed the connection]
mlh_ has joined #ocaml
znutar has quit [Read error: 110 (Connection timed out)]
mlh_ has quit [Remote closed the connection]
mlh_ has joined #ocaml
batdog is now known as batdog|gone
vezenchio has quit [""The law, in its majestic equality, forbids the rich as well as the poor to sleep under bridges, to beg in the streets, and to"]
tom_p has quit [Read error: 113 (No route to host)]
Korollary has joined #ocaml
batdog|gone has quit [Read error: 104 (Connection reset by peer)]
batdog|gone has joined #ocaml
cjohnson has joined #ocaml
cjohnson has quit [Client Quit]
batdog6 has joined #ocaml
batdog6 is now known as batdog
batdog|gone has quit [Read error: 110 (Connection timed out)]
Smerdyakov has joined #ocaml
juri has quit [zelazny.freenode.net irc.freenode.net]
pango_ has joined #ocaml
interferon has joined #ocaml
Herrchen has joined #ocaml
pango has quit [Read error: 110 (Connection timed out)]
Herrchen_ has quit [Read error: 110 (Connection timed out)]
interferon has quit [Remote closed the connection]
threeve has quit []
_shawn has quit [Connection timed out]
_shawn has joined #ocaml
zhouwei_e has joined #ocaml
Snark has joined #ocaml
zhouwei_e is now known as zhouwei_
zhouwei_ is now known as zhouwei_e
avlondono has quit [Remote closed the connection]
avlondono has joined #ocaml
Submarine has joined #ocaml
<ulfdoz>
re
pango_ has quit [Remote closed the connection]
Snark has quit ["Leaving"]
pangoafk has quit ["Leaving"]
pango has joined #ocaml
twobitsprite has joined #ocaml
<twobitsprite>
someone in here earlier today gave me a really good tutorial on the camlp4 system and I seem to have lost the link... anyone know what that might be?
pango is now known as pangoafk
__DL__ has joined #ocaml
Korollary has quit [Read error: 60 (Operation timed out)]
ejt has joined #ocaml
mlh_ has quit [Client Quit]
Skal has joined #ocaml
vodka-goo has joined #ocaml
mfurr has quit [Read error: 110 (Connection timed out)]
Amorphous has quit [Read error: 110 (Connection timed out)]
revision17 has quit [Read error: 110 (Connection timed out)]
Skal has quit [Read error: 60 (Operation timed out)]
<Codename_V>
hi there. I'm kinda confused as to why ocaml is complaining.
<Codename_V>
here's my function: let succ x = x + 1;;
<Codename_V>
and if I try that on -55, it tells me this:
<Codename_V>
This expression has type int -> int but is here used with type int
<haakonn>
succ (-55)
<Codename_V>
hmm. right. but I thought I was reading somewhere that I shouldn't use parenthesis like that, since that's how you do a list and all. or something along those lines
<Codename_V>
and besides, the error is telling me it thinks it's an int, so why is it complaining still?
<haakonn>
you need them because of the precedence rules, otherwise ocaml thinks you're trying to subtract 55 from succ :)
<Codename_V>
ah, ok, I gotcha. it thinks the -55 is int -> int then.
<haakonn>
no, it knows succ is int -> int, but to needs to be int in order to have 55 subtracted from it
<haakonn>
s/to/it/
<Codename_V>
I see
<Codename_V>
thanks
<haakonn>
no prob
<haakonn>
ocaml is a bit "different" sometimes, but it all fits into the grand scheme i think :)
<Codename_V>
yeah, I just need to buckle down on this stuff I think and it will start to make more sense
<Codename_V>
hmm, I'm not sure I follow this book I'm reading. would someone be able to explain briefly what the difference is between a pure and impure functional language?
<Codename_V>
the book says with pure there's no change of state. whereas with impure there can be change of state.
<Schmurtz>
pure : only immutable variables
<Schmurtz>
impure : use of mutable vrariables
<Codename_V>
ah, ok. so those that ref stuff makes ocaml impure then?
<Schmurtz>
ref & mutable keywords
<Codename_V>
I see. thanks.
<Schmurtz>
Codename_V, I'm not 100% of what I say
<Schmurtz>
100% sure
<Codename_V>
hehe, ok. noted.
threeve has joined #ocaml
<Codename_V>
seems like I vaguely recall that you're right though. I studied this stuff in a class once upon a time.
<haakonn>
also, the unit type i guess
<Codename_V>
unit type?
<haakonn>
side effects. "pure" functional languages don't have them
yeknoMizU has joined #ocaml
<pango>
you don't get side effects as a result of the unit type...
<vodka-goo>
strings, object layers make it "impure" too, and many modules in the standard lib are not purely functionnal
<Schmurtz>
vodka-goo, all use the mutable keyword in their implementation
<Schmurtz>
in fact a functionnal language use functions as defined in maths
<Schmurtz>
same arguments => same result
<Schmurtz>
and there's no concept of state
<pango>
which excludes I/O, too
<pango>
s/which/so that/
<Schmurtz>
pango, yes
vezenchio has joined #ocaml
yeknoMizU has quit [":q"]
revision17 has joined #ocaml
robajs has joined #ocaml
<robajs>
hello
<Schmurtz>
hello robajs
<mflux>
you can still model IO in a purely functional manner, for example with monads
<Schmurtz>
I don't want to know ;)
<Codename_V>
hmm. so I'm having a hard time getting == to produce a false. from what I understand, it means that thing things both point to the same memory location, no? so why would two references be equal? don't they point to different memory locations?
<robajs>
is ocaml sufficient for "gluing language"? and GUI programming?
<mflux>
it's not a gluing language as something like tcl is, but I suppose it could be used for that too
<mflux>
there's gtk bindings for ocaml, they are quite nice
<mflux>
(although I wouldn't mind better documentation, something that wouldn't depend on knowing gtk as much)
<Schmurtz>
some people use python
<Codename_V>
yeah, bash or python spring to mind when I hear gluing language.
<Schmurtz>
bash ?
<Codename_V>
umm...yeah. bash. you know. bourne again shell
<robajs>
I have seen some ocaml performance benchmarks and its pretty fast :-) but when its come to GUI programming, what about that?
<Schmurtz>
with bash you can't manage internal objects
<ulfdoz>
ocaml.org down?
<Schmurtz>
robajs, there's bindings to Gtk, Tk, Qt, OpenGL
<Codename_V>
Schmurtz: hehe, say what? I thought we were talking gluing languages. as in taking one app and another app and throwing them together to do some junk.
<Schmurtz>
-s+re
Submarine has joined #ocaml
<Schmurtz>
Codename_V, I speak about a library with many features writen in C
<Schmurtz>
in this case a gluing language must be able to retain information about states
<Schmurtz>
it's much a mean to create a very high level API, and use it in the gluing language
<Codename_V>
hehe, ya lost me, but ok.
<robajs>
what is main target area for ocaml?
<Demitar>
France.
<Demitar>
:)
<Schmurtz>
:)
<Schmurtz>
computer researchers
<Codename_V>
mldonkey. =)
<Schmurtz>
(or the intersection : french computer researchers)
<Demitar>
I'd say it's a good general programming language.
<pango>
Codename_V: # "blah" == "blah" ;;
<pango>
- : bool = false
<Schmurtz>
Codename_V, mldonkey is written with caml ???
<pango>
Schmurtz: and small bits of C and asm
<Codename_V>
pango: oops, yeah, nevermind. I just figured that out. seems ints aren't structured types or whatever.
<Schmurtz>
"blah" = "blah"
<Codename_V>
structured values rather.
<Schmurtz>
asm...
<Codename_V>
Schmurtz: ocaml even.
<pango>
Schmurtz: for speed (hashing)
<Schmurtz>
good C code is often sufficient
<Codename_V>
I don't suppose an irc client written in ocaml exists anywhere?
<pango>
Codename_V: there's (a minimal) one in mldonkey
<pango>
Codename_V: mlim
<Codename_V>
ah, cool. thanks
<pango>
Schmurtz: there's a C implementation of the same algorithms as a fallback
<Schmurtz>
I think they have good reasons to do that
<pango>
Schmurtz: for unlisted architectures
<Schmurtz>
that = use of asm ;)
<pango>
the asm code to compute md5 probably already existed (the C code to do the same also, probably)
<Schmurtz>
the C code exists
<Schmurtz>
and the openssl lib export it
<Schmurtz>
(every body should have openssl installed)
threeve has quit [Read error: 113 (No route to host)]
Snark has joined #ocaml
Korollary has joined #ocaml
Boojum has joined #ocaml
threeve has joined #ocaml
Snark has quit [Nick collision from services.]
Boojum is now known as Snark
gim__ is now known as gim
Korollary has quit [Read error: 110 (Connection timed out)]
TeXitoi has quit ["Lost terminal"]
pango has quit ["Leaving"]
demitar_ has joined #ocaml
pango has joined #ocaml
Demitar has quit [Read error: 110 (Connection timed out)]
natv has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
mikeX has joined #ocaml
<mikeX>
hello, how come I can't open a module in a custom toplevel if that module was linked with a -I +path_to_module? (unix)
mfurr has joined #ocaml
<Snark>
did you also add the module itself, not just its path?
meren[N\A] is now known as meren
<mikeX>
Snark, yes
<Snark>
:-/
<Snark>
could you show me the command line you used, so I try here
<Snark>
?
booyaa has joined #ocaml
<mikeX>
ocamlmktop -I +mad mad.cma -o top
<mikeX>
then when I try to open the module Mad, I get "Unbound module Mad"
<mikeX>
this module is available with the libmad-ocaml-dev package in debian
<mikeX>
but the same thing happens for other modules as well
Submarine has quit ["in Soviet Russia, Céline Dion owns you"]
<Snark>
mikeX: and no complaint about problems at link-time?
<mikeX>
nope, if I remove the "-I +..." parameter though, it does complain about not finding the module mad.cma
<Snark>
:-/
* Snark
installs libmad-ocaml-dev
<mikeX>
btw, ocaml version is 3.08.3
<Snark>
mikeX: ubuntu breezy here -- same version
Purice has joined #ocaml
Purice has quit [Connection reset by peer]
<mikeX>
oh I forgot to mention, that if i chdir in the directory which contains the module, and run the top from there, it works
Purice has joined #ocaml
<Snark>
mikeX: yes, I noticed that too
Purice has quit [Read error: 104 (Connection reset by peer)]
<Snark>
rrraaahhh
<Snark>
I hate it when things don't work and I don't understand why!?
<mikeX>
:/ me too
natv has quit [Read error: 110 (Connection timed out)]
mikeX has quit ["Leaving"]
natv has joined #ocaml
Submarine has joined #ocaml
Amorphous has joined #ocaml
dan2 has joined #ocaml
Snark has quit ["Leaving"]
zigong has joined #ocaml
<twobitsprite>
does Ocaml's tail optimizations apply to all function calls that happen to be at the tail of an expression, or just ones that are explicitly recursive?
<twobitsprite>
s/does/do/
ptolomy has quit ["Leaving"]
natv has quit ["Leaving"]
<haakonn>
all recursion in ocaml is explicit (rec keyword)
Submarine has quit ["Leaving"]
UziMonkey has quit [SendQ exceeded]
<pango>
twobitsprite: try ocamlopt -S and have a look at generated asm code...
<twobitsprite>
interesting... I didn't realize that was possible, though I guess it would be reasonable...