mfp changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.11.2 released | Inscription for OCaml Meeting 2010 is opened http://wiki.cocan.org/events/europe/ocamlmeetingparis2010
slash_ has quit [Quit: leaving]
tmaedaZ is now known as tmaeda
Smerdyakov has quit [Quit: Leaving]
tmaeda is now known as tmaedaZ
yakischloba has joined #ocaml
joewilliams_away is now known as joewilliams
Drk-Sd has quit [Quit: aw]
[df] has quit [Ping timeout: 276 seconds]
joewilliams is now known as joewilliams_away
joewilliams_away is now known as joewilliams
boscop_ has quit [Read error: Connection reset by peer]
suricator has joined #ocaml
<suricator> hi guys! anyone tried out xmlrpc-light?
joewilliams is now known as joewilliams_away
Chile has quit [Ping timeout: 265 seconds]
tmaedaZ is now known as tmaeda
tmaeda is now known as tmaedaZ
jonrafkind has joined #ocaml
<jonrafkind> I have foo.ml in the current directory but when I try 'open Foo' I get unbound module Foo
<jonrafkind> how do I import ocaml modules?
<orbitz> #load
<orbitz> is it compiled/
<jonrafkind> well I have the option of compiling it, but for now its not compiled
<jonrafkind> i have foo.ml and foo.mli
<orbitz> i think you need to compile it first
<orbitz> make a toplevel with it or #load it
<jonrafkind> ok compling it to a cma file makes it work
ski_ has joined #ocaml
jonrafkind has left #ocaml []
<suricator> has anyone tried out the xmlrpc-light library?
<suricator> i am having trouble with running a server
<suricator> even the basic "hello" server
<suricator> any help would be great
maskd has quit [Quit: no reason]
caligula_ has joined #ocaml
caligula__ has quit [Ping timeout: 256 seconds]
tmaedaZ is now known as tmaeda
suricator has quit [Quit: suricator]
bind_return has quit [Quit: Leaving]
mjonsson has quit [Read error: Connection reset by peer]
Gert`m has joined #ocaml
Gertm has quit [Read error: Operation timed out]
jlouis has quit [Ping timeout: 258 seconds]
mjonsson has joined #ocaml
f[x] has joined #ocaml
Amorphous has quit [Ping timeout: 272 seconds]
f[x] has quit [Ping timeout: 240 seconds]
f[x] has joined #ocaml
Amorphous has joined #ocaml
f[x] has quit [Ping timeout: 248 seconds]
sshc has joined #ocaml
eldragon has quit [Ping timeout: 272 seconds]
valross has quit [Remote host closed the connection]
f[x] has joined #ocaml
ulfdoz has joined #ocaml
ulfdoz has quit [Client Quit]
f[x] has quit [Ping timeout: 240 seconds]
f[x] has joined #ocaml
f[x] has quit [Ping timeout: 240 seconds]
dark has quit [Quit: Leaving]
ulfdoz has joined #ocaml
f[x] has joined #ocaml
jlouis has joined #ocaml
Submarine has joined #ocaml
f[x] has quit [Ping timeout: 260 seconds]
f[x] has joined #ocaml
avsm has joined #ocaml
Associat0r has joined #ocaml
yakischloba has quit [Quit: Leaving.]
avsm has quit [Quit: Leaving.]
Yoric has joined #ocaml
Associat0r has quit [Quit: Associat0r]
Gert`m has left #ocaml []
Gertm has joined #ocaml
Yoric has quit [Quit: Yoric]
f[x] has quit [Ping timeout: 260 seconds]
Modius has quit [Ping timeout: 240 seconds]
M| has quit [Ping timeout: 252 seconds]
f[x] has joined #ocaml
M| has joined #ocaml
[df]_ has joined #ocaml
quelqun_dautre has quit [Ping timeout: 256 seconds]
Yoric has joined #ocaml
ma82 has joined #ocaml
_zack has joined #ocaml
<Gertm> I'm trying to use the Netpop library to access a mailserver. I don't understand how to connect.. I need to make a channel, but I only know of those for files, how do I do that?
Submarine has quit [Ping timeout: 264 seconds]
avsm has joined #ocaml
<rwmjones> join #libguestfs
<rwmjones> oops
rwmjones has left #ocaml []
rwmjones has joined #ocaml
ikaros has joined #ocaml
Submarine has joined #ocaml
thelema has quit [Remote host closed the connection]
thelema has joined #ocaml
_andre has joined #ocaml
Alpounet has quit [Read error: Connection reset by peer]
avsm has quit [Quit: Leaving.]
Alpounet has joined #ocaml
avsm has joined #ocaml
suricator has joined #ocaml
Drk-Sd has joined #ocaml
suricator has quit [Client Quit]
maskd has joined #ocaml
yziquel has joined #ocaml
ma82 has quit [Remote host closed the connection]
ikaros has quit [Remote host closed the connection]
slash_ has joined #ocaml
Submarine has quit [Ping timeout: 276 seconds]
pimmhogeling has joined #ocaml
Drk-Sd has quit [Quit: {'EXIT', Drk-Sd, "bye"}]
ski_ has quit [Quit: Lost terminal]
avsm has quit [Quit: Leaving.]
maskd- has joined #ocaml
maskd has quit [Ping timeout: 258 seconds]
maskd- is now known as maskd
tmaeda is now known as tmaedaZ
tmaedaZ is now known as tmaeda
Submarine has joined #ocaml
avsm has joined #ocaml
pimmhogeling has quit [Ping timeout: 248 seconds]
eldragon has joined #ocaml
Submarine has quit [Quit: Leaving]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
rwmjones has quit [Ping timeout: 240 seconds]
rwmjones has joined #ocaml
bzzbzz has joined #ocaml
pimmhogeling has joined #ocaml
pimmhogeling has quit [Ping timeout: 272 seconds]
ikaros has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 248 seconds]
Modius has joined #ocaml
boscop has joined #ocaml
pimmhogeling has joined #ocaml
ccasin has joined #ocaml
<hcarty> Does anyone here have a link to an example using OCaml's first class module support (still in SVN trunk)? I am curious to see what the implications of this are.
<flux> no, but there are plenty of implications :)
<hcarty> flux: Well that's good to know :-)
joewilliams_away is now known as joewilliams
<hcarty> Ah, there is a trunk/test/fstclassmod.ml file which seems to use it, even if the use isn't particularly commented.
<flux> hcarty, you can implement PMap in terms of Map for one without relying on unsafe operations
<flux> (I'm not sure if it's possible even if one did rely on them)
<flux> I suppose that's a yet another level in the support for higher-order-modules, though
<Camarade_Tux> hcarty: I think Alain Frisch sent an example on the caml list a few days again
<hcarty> Camarade_Tux: Thanks, I'll take a look
ikaros has quit [Quit: Leave the magic to Houdini]
<Camarade_Tux> it's in: "Re: [Caml-list] Polymorphic values in local modules", but it's actually pretty short (it's Alain's last message on the caml mailing-list)
<hcarty> Found it, thanks
<Camarade_Tux> hcarty: also, you may want to have a look at http://alain.frisch.fr/soft.html#patches
pimmhogeling has quit [Ping timeout: 272 seconds]
joewilliams is now known as joewilliams_away
<hcarty> It seems that this doesn't work: "let add_one m x = let module M = (val m : M_sig) in M.map (fun i -> i + 1) x"
<hcarty> with "module type M_sig = sig type 'a t val map : ('a -> 'b) -> 'a t -> 'b t end"
<hcarty> It's a scoping issue according to the error message. I wonder if there is a way around that.
<hcarty> Hopefully there will be lots of bright, shiny new toys to try out in the months following the release of 3.12
<flux> shiny...
<mfp> flux: you're actually referring to explicit generic types, the canonical ex being let uniq (type x) ?(compare = compare) l = let module S = Set.Make(struct type t = x let compare = compare end) in S.elements (List.fold_right S.add l S.empty);;
<mfp> or uh both. Found this old codepaste of mine > http://ocaml.pastebin.com/m3a586d5b hcarty: you have to pack both the value and the module inside a 1st class module
itewsh has joined #ocaml
itewsh has quit [Client Quit]
<hcarty> mfp: And then return a module with the result?
<mfp> yes, pack it again in the module
yakischloba has joined #ocaml
<mfp> as done in the abovementioned example (module type PS holding the S module and the S.t value)
joewilliams_away is now known as joewilliams
pimmhogeling has joined #ocaml
<orbitz> Do you think it makes more sense to add lazyenss to a strict language or strictness to a lazy language?
_zack has quit [Quit: Leaving.]
Yoric has quit [Quit: Yoric]
<det> laziness to a strict language
pimmhogeling has quit [Ping timeout: 272 seconds]
smimou has quit [Ping timeout: 246 seconds]
smimou has joined #ocaml
smimou has quit [Changing host]
smimou has joined #ocaml
<thelema> Adding laziness to a strict language makes more sense to me.
<thelema> although I need more laziness right now in my ocaml.
<thelema> and Enum doesn't work for the purpose - looks like batteries' lazy lists are going to get improved.
<flux> enum can bite you in the butt if you forget that it's really imperative and gets consumed :)
<flux> has anyone benchmarked enum vs lazy lists?
<thelema> yup, and you can't match on it nicely.
<thelema> grr, the existing lazy lists won't match with [lazy (h::t) -> ...]
mfp has quit [Read error: Connection reset by peer]
<flux> thelema, you mean the ones in batteries?
<thelema> yes
<thelema> type 'a node_t = | Nil | Cons of 'a * 'a t
<thelema> and 'a t = ('a node_t) Lazy.t
<flux> thelema, do they expose their strcture?
mfp has joined #ocaml
<flux> or why doesn't the existing lazy matching support work..
avsm has quit [Quit: Leaving.]
<thelema> They do expose their structure, but it's not quite as easy as matching a ('a Lazy.t list Lazy.t)
<flux> but impossible as well?
<thelema> not impossible.
<flux> in any case, writing a pattern matching syntax extension with the compiler-assisted lazy matching should be much simpler than before :)
<hcarty> flux: The Batteries.Seq/BatSeq module provides a functional, somewhat Enum-like alternative
<det> I dont really see enum being about laziness, but about genericity
<thelema> the advantage of enum over lazy lists that I see are that enum nodes GCs quickly, and Enum matches the semantics of input channels better
<flux> det, but in a functional setting the destructivity can sometimes be unexpected
<flux> s/setting/environment/
<det> Yeah
<flux> and when you remove that, what you have is lazy lists :)
<det> non-strict
<det> type classes would provide a much nicer solution than what enum gives you
<det> enum devours your types into a existential black whole
ulfdoz_ has quit [Quit: Reconnecting]
ulfdoz has joined #ocaml
Submarine has quit [Quit: Leaving]
* thelema adds enum.forced, which is like Enum.force, but returns the input
mfp has quit [Read error: Connection reset by peer]
yziquel has quit [Ping timeout: 248 seconds]
ikaros has joined #ocaml
mfp has joined #ocaml
M| has quit [Ping timeout: 245 seconds]
<flux> man, BatString.of_list_backwards would be nice right about now.. :)
M| has joined #ocaml
<flux> (while BatString.of_backwards (BatList.enum chars) works, I feel a nasty itch that it's way less efficient than it should be :))
Yoric has joined #ocaml
_Jedai_ has quit [Ping timeout: 248 seconds]
<flux> whee, my first batteries-related piece of software ;): http://modeemi.fi/~flux/software/ocaml/ircParser.ml
_Jedai_ has joined #ocaml
<flux> (but I don't think I'll actually use it for a while, it was related to a discussion on irc protocol on another channel)
Submarine has joined #ocaml
Associat0r has joined #ocaml
<flux> cannot help wondering if some large subset of List could be functorized and reused for Enum, LazyList, Seq and Stream..
<flux> but perhaps it's not worth it, given the code exists already, and the functions are simple anyway :)
Snark has joined #ocaml
<flux> soo, about improving that: what parser combinator libraries are there for ocaml?
<orbitz> flux: ddi you see that link in /r/ocaml today with teh stream parser?
<flux> no
<flux> naah, booring :)
<orbitz> :)
<orbitz> the recursive discent one?
<flux> yes
<flux> it's confusing to switch using batteries toplevel, because now all type signatures are in revised syntax..
ccasin has quit [Quit: Leaving]
Drk-Sd has joined #ocaml
Narrenschiff has joined #ocaml
Submarine has quit [Ping timeout: 272 seconds]
<det> Does anyone here find one of the following 2 syntaxes more readable?
joewilliams is now known as joewilliams_away
Snark has quit [Quit: Ex-Chat]
joewilliams_away is now known as joewilliams
jonrafkind has joined #ocaml
<jonrafkind> question about excuting ocaml code: if I have x.ml, y.ml, and z.ml then I can execute x.ml with 'ocaml' only if I add #load "y.cmo" and #load "z.cmo" to x.ml, but then if I try to compile x.ml with ocamlc I get syntax errors from the #load's
<jonrafkind> so how can I write my files such that I can execute my program with either 'ocaml' or compile it with 'ocamlc' ?
<Camarade_Tux> lines starting with '#' are directives for 'ocaml', they won't work with ocamlc or ocamlopt
<jonrafkind> right
<Camarade_Tux> you could simply call "ocaml y.cmo z.cmo" and remove the #load lines from x.ml
<jonrafkind> oh I see
<jonrafkind> hm, but I still need to compile y.ml to y.cmo
<jonrafkind> it would be nice not to have to invoke the compiler at all if I just want to run the interpreter (or whatever ocaml does)
bjorkintosh has joined #ocaml
<bjorkintosh> it always surprises me that there're THIS many users of ocaml in the world!!
<bjorkintosh> 91's huge.
<Camarade_Tux> jonrafkind: well, I know of no way to mix both seamlessly
<jonrafkind> ok. do people normally do the edit->compile->run cycle then?
<jonrafkind> as opposed to edit->run
<orbitz> bjorkintosh: there are actually more, thi sis justt he IRC channel
<bjorkintosh> bah. more. haha. funny one.
<Camarade_Tux> orbitz: smells of a troll
<Camarade_Tux> jonrafkind: _I_ edit->compile->run for the biggest part of programs and test bits of code in the toplevel
<Camarade_Tux> but I reckon I don't have the best habits
<orbitz> Camarade_Tux: sadly, yes
<bjorkintosh> i'm no troll. i'm just very surprised.
<orbitz> Camarade_Tux: TDD!
<jonrafkind> being a lazy person, I'll probably end up with ocaml $(find . -name .cmo) foo.ml
<orbitz> bjorkintosh: if you seriously aren't torlling, if you consider F# pretty much equivalent to Ocaml, then Ocaml is quite popular in some industires
<Camarade_Tux> jonrafkind: "ocaml *.cmo foo.ml" ;-)
<jonrafkind> sub-directories :p
<Camarade_Tux> **/*.cmo then ? :P
<jonrafkind> i think only zsh supports that, im using bash at the moment
infoe has left #ocaml []
infoe has joined #ocaml
<Camarade_Tux> jonrafkind: yeah, probably ;-)
<jonrafkind> oh wait, bash does support it. neato
* Camarade_Tux still needs to force someone to finish his zsh completion for ocamlfind
<bjorkintosh> orbitz, i just installed f# a few minutes ago on my other box.
<orbitz> bjorkintosh: sweet
<bjorkintosh> do you use it?
<Camarade_Tux> anyone remember the rule to add to a _tags file that is "not hygienic"?
<orbitz> bjorkintosh: no, i don't run windows
Narrenschiff has quit [Quit: Narrenschiff]
<Camarade_Tux> was not_hygienic as I had written but I wasn't applying it to the good path
<bjorkintosh> orbitz, i'm running it over mono on ubuntu.
Anarchos has joined #ocaml
<orbitz> bjorkintosh: Ah, I didn't realize that it ran well on Mono. F# doesn't particularly interest me anyways
<bjorkintosh> it runs. how well, i can't tell yet.
<Camarade_Tux> earlier versions of f# didn't need mono, right?
<bjorkintosh> i have no idea. but i thought mono was the .net something-or-other for *nix.
<Camarade_Tux> can't tell for sure: I only tried f# very quickly and some time ago
yziquel has joined #ocaml
<yziquel> what's arguably the simplest, non-trivial, used by strictly more than one person, camlp4 (not camlp5) syntax extension lying around on the net?
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
jonrafkind has left #ocaml []
yakischloba has quit [Quit: Leaving.]
quelqun_dautre has joined #ocaml
<orbitz> Camarade_Tux: the whole null pointer exceptions in F#, while increidbly super fissial of me really made me think laaaaaam
Associat0r has quit [Quit: Join #fsharp]
<Drk-Sd> « super fissial » ? :D
<Camarade_Tux> well, happens when working with other languages but I agree it's a pity =/
<det> I hear F# doesnt run very well on mono
<Camarade_Tux> hehe :P
Associat0r has joined #ocaml
<orbitz> Camarade_Tux: would be nice if thecompiler could automagically do option conversion
<orbitz> especially now that C# has all these nullable nonsense things (ugh seriously? what's going on in that language)
<det> You'd need convert all objects from .NET world into option
<det> it would be a PITA to use
<det> any instance of a class can be null at any time
<Drk-Sd> personnaly
<Drk-Sd> i've to use C# at school
<Drk-Sd> and i also use F# for a school project and hmm
<Drk-Sd> im on orbitz side
<Drk-Sd> there are some nonsense with all the nullable et option
<Drk-Sd> s/et/and
ikaros_ has joined #ocaml
Anarchos has joined #ocaml
<emias> F# on Mono segfaults all over the place for me.
<Drk-Sd> hum, it didn't for me
<Associat0r> I hear it improved
<Drk-Sd> but mono was still at the version 2 of .net, so i had to shift to windows, and VS, and...
<Associat0r> every language has some nonsense
ikaros has quit [Ping timeout: 256 seconds]
<det> nullable is nonsense, agreed
<orbitz> ithough ti understodo the nullable in C# but i think i was jus thoping it was something that didnt' suck
<infoe> you need it for db work, such as left outer joins
joewilliams has quit [Ping timeout: 260 seconds]
Narrenschiff has joined #ocaml
<Associat0r> det: nullable in F#?
<orbitz> C#
mutew has joined #ocaml
valross has joined #ocaml
yakischloba has joined #ocaml
avsm has joined #ocaml
Anarchos has quit [Ping timeout: 272 seconds]
<det> orbitz, Oh, nullable isnt so bad, but it only applies to value types
Yoric has quit [Quit: Yoric]