flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.0 out now! Get yours from http://caml.inria.fr/ocaml/release.html
yziquel has joined #ocaml
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
yziquel has quit [Remote closed the connection]
|jedai| has quit [Read error: 60 (Operation timed out)]
|jedai| has joined #ocaml
ozzloy has quit ["leaving"]
ozzloy has joined #ocaml
johnnowak has joined #ocaml
ched has quit [Remote closed the connection]
yziquel has joined #ocaml
yziquel has quit [Remote closed the connection]
iwannalog has quit [Client Quit]
willb has joined #ocaml
johnnowak has quit []
buluca has joined #ocaml
buluca has quit ["leaving"]
buluca has joined #ocaml
ivan_ has joined #ocaml
ivan_ has quit ["ChatZilla 0.9.84 [Firefox 3.0.5/2008120122]"]
johnnowak has joined #ocaml
jeddhaberstro has quit []
pango has quit [Remote closed the connection]
pango has joined #ocaml
mjonsson has joined #ocaml
prime2 has joined #ocaml
johnnowak has quit [Remote closed the connection]
johnnowak has joined #ocaml
ygrek has joined #ocaml
prime2 has quit ["leaving"]
Snark has joined #ocaml
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
Camarade_Tux has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
jeremiah has joined #ocaml
seafood has quit []
seafood has joined #ocaml
marmotine has joined #ocaml
_jedai_ has joined #ocaml
|jedai| has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has joined #ocaml
_zack has joined #ocaml
vixey has joined #ocaml
ikaros has joined #ocaml
ikaros has quit [Client Quit]
sidewinder128 has joined #ocaml
<sidewinder128> one question, why ocaml popularity have declined, I listen about the language 4 years ago and it was very popular but lately not, Also GUI bindings for Qt framework seems abandoned.
<flux> I didn't know there were bindings for Qt in the first place..
<flux> however there is a project to make that happen now
<flux> but they expect the first release at september..
<sidewinder128> ah thats sounds great
<sidewinder128> do you have the site where is happen this effort?
seafood has quit []
<sidewinder128> thanks
<Yoric[DT]> sidewinder128: I believe it's a side-effect of the main authors of the language moving to different main preoccupations -- and not releasing control upon the language.
<Yoric[DT]> However, there are several community projects to help with this.
* Yoric[DT] has to go, though.
<sidewinder128> ah ok i understand
<sidewinder128> thanks
<mattam> I didn't see any decline in popularity. The competition (F#, Haskell,...) has clearly grown in the meantime though.
<sidewinder128> yeah F# and Haskell are doing pretty well but Im interested in ocaml and I see the decline
sidewinder128 has quit ["ChatZilla 0.9.84 [Firefox 3.0.5/2008120121]"]
e-mmortal has joined #ocaml
<flux> the recent news on qt going to lgpl does increase my interest in qt-caml happening, I wonder if this is common..
_jedai_ has quit [Connection timed out]
|jedai| has joined #ocaml
K-Yo has joined #ocaml
<K-Yo> hmmm
<K-Yo> I have a strange issue
<K-Yo> # let mot_code = code arbre mot;;
<K-Yo> Characters 20-25:
<K-Yo> let mot_code = code arbre mot;;
<K-Yo> ^^^^^
<K-Yo> This expression has type char arbre but is here used with type char arbre
<K-Yo> how can this even happen?
<Yoric[DT]> K-Yo: chances are that you have two types called "arbre".
<K-Yo> nope
<Yoric[DT]> This happens often in the toplevel when you copy and paste twice the same code.
<K-Yo> hmmm
<K-Yo> maybe then
<K-Yo> I should clear the buffer
<Camarade_Tux> or just rebinding one of the variable without rebinding the other one
<K-Yo> hmmm ok
<K-Yo> thanks :)
<Yoric[DT]> You're welcome
e-mmortal has quit ["Leaving"]
jeremiah has quit [Read error: 104 (Connection reset by peer)]
johnnowak has quit []
seafood has joined #ocaml
seafood has quit [Client Quit]
|jeremiah has joined #ocaml
_zack has left #ocaml []
<K-Yo> yeah, I got huffman working :)
<vixey> huffman is really neat
<K-Yo> is there a function that could give me how a char is stored?
<K-Yo> yeah
<K-Yo> for e.g. it gives me the binary code of the char
<vixey> K-Yo, do you know te list with all the ocaml built in stuff?
<K-Yo> vixey, not by heart
jlouis has quit [Remote closed the connection]
<vixey> haha
<K-Yo> :p
<K-Yo> what do you mean by "built in" ?
<K-Yo> all the list, string, array etc functions?
<vixey> most things are in there ...
<vixey> but if not there are various other ones
<K-Yo> sweet :)
<vixey> val int_of_char : char -> int
<vixey> Return the ASCII code of the argument.
<Camarade_Tux> Char.code is faster to type ;p
<K-Yo> cool
pstickne has joined #ocaml
_jedai_ has joined #ocaml
|jedai| has quit [Read error: 110 (Connection timed out)]
<Yoric[DT]> The other day, I was wondering about the benefits of using Prolog as a type system.
<Yoric[DT]> (rather than a programming language)
jlouis has joined #ocaml
ched has joined #ocaml
<vixey> Yoric[DT], I hink that is a nice idea.. something like, you run hindley milner or whatever, but at the same time you collect up type constraints and run them like a logic program
<vixey> (i.e. like type classes in haskell except actually useful)
<mfp> vixey: why aren't type classes in Haskell actually useful in your opinion?
* mfp thought the main problem with type classes was their global scope and the fact that you can only have 1 instance
<vixey> you can have multiple instances
<mfp> overlapping instances yes, but two "identical" instances in effect at the same time?
<mfp> (iow. how do you choose one then?)
ofaurax has joined #ocaml
ikaros has joined #ocaml
* Yoric[DT] actually likes type classes.
<vixey> I think typeclasses are a great /idea/
<Yoric[DT]> Well, if someone is willing to work on this, I'll be interested in pursing the idea, at some point.
smimram has quit [Read error: 110 (Connection timed out)]
<Yoric[DT]> (although not right now, I'm between deadlines)
<mfp> vixey: what makes them not "actually useful" in practice then, following your previous statement?
<vixey> Yoric[DT], more than just 'prolog' what did you mean?
<vixey> mfp, I should put it a different way.. the only uses of them I know are cosmetic
<vixey> i.e. it lets you write + instead of +.
<vixey> but you can't do stuff like.. implement a lattice of numeric types
<vixey> (or it lets you write do ... instead of do <name of a monad> ..., which is again just cosmetic)
<vixey> but with something like Prolog (but changed in a lot of ways..) it seems like it could be really useful
<vixey> (there would probably be lots of problems that come with it too, like module boundries..)
<K-Yo> Another question: I can't find a function that goes from a base to another (I'd like to convert some integer from decimal to binary) does it exist in CamL or do I have to code it?
<Yoric[DT]> vixey: Not quite sure. Prolog looks very much like Hindley-Milner but with more pattern-matching, more recursion, facts and cuts.
<K-Yo> maybe on the module Int32?
<Yoric[DT]> K-Yo: not quite sure what you mean, but chances are that you have to code it.
<mfp> vixey: I see, so the "Prolog for types" would go beyond ad-hoc polymorphism
<Yoric[DT]> K-Yo: Integers are integers, regardless of how they are expressed. Do you mean their string representations?
<vixey> Yoric[DT], yes I think it was mentioned in some paper that you can write the rules of HM directly in Prolog and it's a proper typecheck (assuming occurs check)
<Yoric[DT]> K-Yo: If so, you can probably get away with Scanf and Printf but I wouldn't suggest that particular solution.
* mfp gtg
<Yoric[DT]> vixey: interesting.
<vixey> mfp, it seems like a nice idea.. but I can't be sure if it would work in practice
* vixey (got to check what Coq typeclass dispatch is)
<K-Yo> I'm not fond of using C functions
<Yoric[DT]> vixey: feel free to summarize your results :_)
<Yoric[DT]> vixey: feel free to summarize your results :)
<K-Yo> I don't know them enough :P
<Yoric[DT]> K-Yo: Well, I meant OCaml's Printf and Scanf module but they are quite tricky to use at first.
<Yoric[DT]> K-Yo: Int.of_string seems to do the trick.
<Yoric[DT]> You just have to prefix the string with "0x" for hexadecimal, "0o" for octal, "Ob" for binary.
<Yoric[DT]> (that's for the string representation -> int part)
<K-Yo> I couldn't find the Int help page :P
ikaros has quit [".quit"]
<Yoric[DT]> Hum.
<Yoric[DT]> It's perhaps not part of OCaml :)
<K-Yo> hehe
<Yoric[DT]> (but of OCaml Batteries Included)
<Yoric[DT]> Still, it's the same function as [int_of_string].
<mattam> vixey: you should see how Coq's classes can be used to reimplement setoid_rewrite :) I'll have a draft on it soon. Basically class dispatch is prolog resolution.
<Yoric[DT]> Well, that "solves" the issue :)
* Yoric[DT] wonders privately what a setoid might be.
<mattam> A type plus an equivalence relation. Kind of a quotient.
<mattam> gtg. I'll be happy to talk about that later :)
<vixey> mattam, oh cool, looking forward to read it
<Yoric[DT]> mattam: with pleasure :)
ofaurax_ has joined #ocaml
<K-Yo> Yoric[DT], where could I download this module?
<K-Yo> (I'm under windows btw :/)
<Yoric[DT]> K-Yo: if you're using Godi, you can download it from Godi.
<Yoric[DT]> Ah.
<Yoric[DT]> Then you probably can't :/
<K-Yo> argh
<K-Yo> :P
<Yoric[DT]> But if you want to help people who are trying to get it to work under Windows, I can give you their e-mail :)
<K-Yo> the module Int?
<K-Yo> hmm
<Yoric[DT]> Nah, the whole of OCaml Batteries Included.
<K-Yo> I won't have time for that
<K-Yo> not this year
ikaros has joined #ocaml
<K-Yo> I might get active and try to help, ... but later :P
<Yoric[DT]> sure :)
<Yoric[DT]> Well, at that point, ping thelema (on this channel).
ikaros has quit [Remote closed the connection]
Nazz has quit [kornbluth.freenode.net irc.freenode.net]
bohanlon has quit [kornbluth.freenode.net irc.freenode.net]
haelix has quit [kornbluth.freenode.net irc.freenode.net]
gaja has quit [kornbluth.freenode.net irc.freenode.net]
Nazz has joined #ocaml
gaja has joined #ocaml
bohanlon has joined #ocaml
haelix has joined #ocaml
ofaurax has quit [Read error: 113 (No route to host)]
_jedai_ has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
<K-Yo> One last problem
<K-Yo> I would like to code a file with the command: "cat file | ocaml huffman.ml"
<K-Yo> how in caml can I take the input as a string?
<olegfink> K-Yo: read_line?
<K-Yo> hmmm
<K-Yo> I did not try that
<K-Yo> works :) though it takes only the first line
<olegfink> it takes _next_ line
<K-Yo> I see
<K-Yo> so I need to use a while?
<K-Yo> would while line = read_line() do work?
<olegfink> doesn't look correct to me.
<flux> it would work but not likely the way you want
<kig> try while true do let line = read_line () in do_stuff_with line; done with End_of_file -> ()
<K-Yo> aaah
<K-Yo> the exception raised is End_of_file? great :)
<olegfink> it's documented right in Pervasives.
<Yoric[DT]> Is there anyone here from the University of Edinburgh?
<Yoric[DT]> (or Glasglow)?
* Yoric[DT] is a bit too shy on #haskell to ask around for people from Glasgow.
<Yoric[DT]> (they probably do roam over there, though)
smimou has joined #ocaml
<steg> Yoric[DT]: i'm an edinburgh undergrad ;)
<Yoric[DT]> :)
<Yoric[DT]> I'm wondering if I should call Don Sannella or Ian Stark from out of the blue or if I should attempt to get introduced to them first.
<Yoric[DT]> We used to do research on the same topic but I don't think I've met either of them in conferences.
<Yoric[DT]> And now, I'd like to get some work done with them, but I'm not sure how to approach the topic.
|jeremiah has quit [Read error: 104 (Connection reset by peer)]
<kig> should binary_of_int, octal_of_int and hex_of_int have roundtrip equality with int_of_string (i.e. int_of_string (int_of_hex 17) = 17)?
sporkmonger has joined #ocaml
* Yoric[DT] assumes you meant [int_of_string (hex_of_int 71)].
<Yoric[DT]> I don't think equality is necessary: you can prefix your string with as many "0" as you want without changing the integer value.
sporkmonger has quit [Client Quit]
<steg> Yoric[DT]: oh, i have no idea :P
<Yoric[DT]> :)
<steg> Yoric[DT]: They seem like nice people though :)
<Yoric[DT]> Thanks :)
<steg> Ian Stark is lecturing one of my courses this year, and his enthusiasm is palpable
<Yoric[DT]> Good to know.
<kig> Yoric[DT]: right, hex_of_int. but what i mean is should it produce "0x28FFAD" or "28FFAD"
<Yoric[DT]> I tend to believe that "0x" is less ambiguous.
<kig> it is
<kig> hmm, what's the intended use for hex_of_int though. printing out html colors? can't remember using it for much anything else
<kig> which'd mean, pad to even width, no 0x
<flux> whenever you need to dump binary data in a debuggable form
<flux> however, it's much easier to add a 0x to a hex string than it is to remove it from it
<kig> ("#" ^ hex r ^ hex g ^ hex b)
<flux> kig, so you want leading zeroes then too
<kig> yeah
<flux> and if you have hex_of_int you might also want octal_of_int and binary_of_int too :)
|jeremiah has joined #ocaml
<flux> or base_of_int ~base:2 ..
<kig> base_of_int would be the right solution
<mrvn> Printf.sprintf "#%x%x%x" r g b
<mrvn> %0.2x or something for leading 0
<kig> except base_of_int doesn't readily do two's complement. i guess i'll have a dedicated bin_of_int for that
smimou has quit [Read error: 110 (Connection timed out)]
ched has quit [Read error: 104 (Connection reset by peer)]
itewsh has joined #ocaml
ched has joined #ocaml
ygrek has quit [Remote closed the connection]
buluca has quit [Read error: 110 (Connection timed out)]
Smerdyakov has joined #ocaml
|jedai| has quit [Read error: 60 (Operation timed out)]
|jedai| has joined #ocaml
ygrek has joined #ocaml
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
loufoque has joined #ocaml
<loufoque> i haven't used caml in a while, just a quick question
<loufoque> what is the equivalent of "void" in caml?
<Camarade_Tux> the closer is unit or (), depending on the context
itewsh has joined #ocaml
ikaros has joined #ocaml
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
|jedai| has quit [Read error: 145 (Connection timed out)]
|jedai| has joined #ocaml
K-Yo has quit ["Quitte"]
pango has quit [Remote closed the connection]
yziquel_ has joined #ocaml
pango has joined #ocaml
smimou has joined #ocaml
ikaros has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
sporkmonger has joined #ocaml
|jeremiah has quit [Connection reset by peer]
|jeremiah has joined #ocaml
prime2 has joined #ocaml
yziquel_ is now known as yziquel
Yoric[DT] has quit ["Ex-Chat"]
_jedai_ has joined #ocaml
|jedai| has quit [Read error: 110 (Connection timed out)]
sporkmonger has quit []
smimou has quit ["bli"]
smimou has joined #ocaml
<loufoque> Camarade_Tux: "unit" was what I was looking for. Thanks and sorry for the late reply
silentbicycle has joined #ocaml
ofaurax_ is now known as ofaurax
prime2 has quit ["leaving"]
prime2 has joined #ocaml
|jedai| has joined #ocaml
_jedai_ has quit [Read error: 110 (Connection timed out)]
ofaurax has quit [Read error: 110 (Connection timed out)]
|jedai| has quit [Read error: 60 (Operation timed out)]
|jedai| has joined #ocaml
purple_ has quit [Read error: 60 (Operation timed out)]
prime2 has quit ["leaving"]
yziquel has quit [Remote closed the connection]
mjonsson has quit [Remote closed the connection]
ygrek has quit [Remote closed the connection]
ofaurax has joined #ocaml
ofaurax has quit [Client Quit]
ofaurax has joined #ocaml
|jedai| has quit [Read error: 110 (Connection timed out)]
schme has quit ["leaving"]
|jedai| has joined #ocaml
|jedai| has quit [Read error: 60 (Operation timed out)]
|jedai| has joined #ocaml
oriba has joined #ocaml
smimou has quit [Read error: 110 (Connection timed out)]
seafood has joined #ocaml
ikaros has quit [".quit"]
ikaros has joined #ocaml
schme has joined #ocaml
munificent has joined #ocaml
munificent has left #ocaml []
seafood has quit []
Snark has quit ["Ex-Chat"]
Anarchos has joined #ocaml
ofaurax has quit ["Leaving"]
ofaurax has joined #ocaml
smimou has joined #ocaml
Associat0r has joined #ocaml
marmotine has quit [kornbluth.freenode.net irc.freenode.net]
marmotine has joined #ocaml
|jedai| has quit [Read error: 60 (Operation timed out)]
|jedai| has joined #ocaml
<Camarade_Tux> loufoque, np, and I just came back anyway :p
ikaros has quit [".quit"]
ikaros has joined #ocaml
ikaros has quit [Remote closed the connection]
ikaros has joined #ocaml
vovkaii has joined #ocaml
silentbicycle has left #ocaml []
ikaros has quit [Remote closed the connection]
ikaros has joined #ocaml
ikaros has quit [Read error: 104 (Connection reset by peer)]
ikaros has joined #ocaml
middayc has joined #ocaml
ikaros has quit [Remote closed the connection]
|jedai| has quit [Connection timed out]
mjonsson has joined #ocaml
det is now known as [LCC]det[CA]
|jedai| has joined #ocaml
[LCC]det[CA] is now known as [RoX]Tobi
[RoX]Tobi is now known as SJ
SJ is now known as det
oriba has quit ["Verlassend"]
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
<Anarchos> why is it no semaphore used in caml_{enter|leave}_blocking_section ?
<mrvn> afaik it unlocks/locks the main mutex
<Anarchos> yes but how is it done without semaphore ?
<Anarchos> and another question : how to use unix commands in a toplevel when you have no dynlink ?
sporkmonger has joined #ocaml
|jeremiah has quit [Read error: 104 (Connection reset by peer)]
Nazz has quit [kornbluth.freenode.net irc.freenode.net]
haelix has quit [kornbluth.freenode.net irc.freenode.net]
bohanlon has quit [kornbluth.freenode.net irc.freenode.net]
gaja has quit [kornbluth.freenode.net irc.freenode.net]
Nazz has joined #ocaml
gaja has joined #ocaml
bohanlon has joined #ocaml
haelix has joined #ocaml
bohanlon has quit [SendQ exceeded]
gaja has quit [Read error: 104 (Connection reset by peer)]
Anarchos has quit ["Vision[0.8.5-0418]: i've been blurred!"]
gaja has joined #ocaml
Yoric[DT] has joined #ocaml
|jeremiah has joined #ocaml
ekole has joined #ocaml
johnnowak has joined #ocaml
_jedai_ has joined #ocaml
ekole has left #ocaml []
|jedai| has quit [Read error: 110 (Connection timed out)]
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml