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
sporkmonger has quit [Connection timed out]
Camarade_Tux has quit ["Leaving"]
prime2 has joined #ocaml
prime2 has quit [Client Quit]
vithos_ has joined #ocaml
vithos_ has quit [Client Quit]
sporkmonger has joined #ocaml
sporkmonger_ has quit [Read error: 104 (Connection reset by peer)]
vithos has quit [Connection timed out]
jm has joined #ocaml
komar_ has quit [Remote closed the connection]
hkBst has quit [Read error: 104 (Connection reset by peer)]
alexyk has joined #ocaml
m3ga has joined #ocaml
julm has quit [Read error: 110 (Connection timed out)]
vithos has joined #ocaml
mlh has joined #ocaml
<jli> I want to write an IRC client or an IRC bot in OCaml. where should I start? there doesn't seem to be an OCaml IRC library. I've heard of ocamlnet. would that be an appropriate starting point?
wli has quit [Read error: 110 (Connection timed out)]
<jm> jli: perhaps you can also see camlquizz: http://www.pps.jussieu.fr/~smimram/
jm is now known as julm
feydr has quit [Read error: 104 (Connection reset by peer)]
feydr has joined #ocaml
Ched has quit [Read error: 110 (Connection timed out)]
ched_ has joined #ocaml
Associat0r has joined #ocaml
alexyk has quit []
cygnus_ has quit [Read error: 60 (Operation timed out)]
cygnus_ has joined #ocaml
alexyk has joined #ocaml
<tsuyoshi> there isn't any irc library, but if you use the event queues in ocamlnet I think it would be a lot easier to write
<jli> does anyone use the revised syntax?
<palomer_> I used it when I wrote a camlp4 language extension
<thelema_> jli: not many people.
<jli> hm, okay.
<jli> some things seem nicer, but other things not
<thelema_> yup.
<jli> is it typical of MLers (or OCamlers) to use exceptions as control statements?
<jli> e.g., to exit early
<thelema_> in situations where it's critical to performance, yes.
<thelema_> another acceptable method of flow control is recursion
<tsuyoshi> are there any other methods?
<thelema_> but often it's just clearer to catch an exception [Exit]
<thelema_> tsuyoshi: yes - batteries provides a module for doing "fast returns"
<thelema_> in the cases that exceptions get used, there's not really another way (that I can think of)
<tsuyoshi> isn't that module implemented with exceptions?
<thelema_> yes. but it has some advantages (for example, polymorphic return values)
sporkmonger has quit []
Associat0r has quit []
kaustuv_ has quit ["ERC Version 5.3 (IRC client for Emacs)"]
ikaros has joined #ocaml
<jbjohns> from batteries, clicking on "parsers, pretty printing": The requested URL /doc.preview:batteries-beta1/html/api/Languages.html was not found on this server.
<palomer_> how do I create a cmxa file?
<flux> ocamlc -a
<palomer_> ocamlfind ocamlopt -a -linkpkg -package unix,oset SEditable.ml (*error: Please specify the name of the output file, using option -o*)
<flux> well, Please specify the name of the output file, using option -o?
<palomer_> ocamlfind ocamlopt -a -o SEditable.cmxa -linkpkg -package unix,oset SEditable.ml (*/usr/lib/ocaml/3.10.2/unix.cmxa is not a compilation unit description. *)
<palomer_> I thought maybe I was doing it wrong
<flux> maybe you shouldn't use -linkpkg htere
<palomer_> thx!
* palomer_ hopes that one day he will understand the ocaml build system
Alpounet has joined #ocaml
* palomer_ is off to bed
<flux> good night
gim has joined #ocaml
* Alpounet just woke up
<kaustuv> gildor: thanks for pointing out visual express yesterday. It has temporarily solved my Windows woes.
ikaros has quit ["Leave the magic to Houdini"]
angerman has joined #ocaml
<cygnus_> angerman good name
alexyk has quit []
m3ga has quit ["disappearing into the sunset"]
komar_ has joined #ocaml
<jli> haha
jbjohns has quit [Read error: 104 (Connection reset by peer)]
jbjohns has joined #ocaml
jbjohns has quit [Read error: 104 (Connection reset by peer)]
ulfdoz has joined #ocaml
marmottine has joined #ocaml
<angerman> cygnus_: I'm getting used to it
julm has quit ["Test"]
hkBst has joined #ocaml
julm has joined #ocaml
seafood has quit []
seafood has joined #ocaml
Associat0r has joined #ocaml
_zack has joined #ocaml
Camarade_Tux has joined #ocaml
verte has joined #ocaml
Yoric[DT] has joined #ocaml
<Camarade_Tux> clutter looks like a nice toolkit : http://www.phoronix.com/scan.php?page=article&item=moblin_v2_ui&num=1 :)
<flux> camarade_tux, when are you going to provide bindings?-)
<Camarade_Tux> flux, pretty soon (tm) ;p
<Camarade_Tux> I'll kill people who use ocaml-reserved names in their C code first (like "new" and "object") :)
<det> Don't even get me start about OpenGL using "begin" :-)
<Yoric[DT]> Camarade_Tux: :)
rwmjones_ has joined #ocaml
rwmjones has quit [Read error: 113 (No route to host)]
rwmjones_ is now known as rwmjones
Snark has joined #ocaml
Narrenschiff has joined #ocaml
angerman has quit []
Associat0r has quit [anthony.freenode.net irc.freenode.net]
Asmadeus has quit [anthony.freenode.net irc.freenode.net]
gl has quit [anthony.freenode.net irc.freenode.net]
sbok has quit [anthony.freenode.net irc.freenode.net]
prigaux has quit [anthony.freenode.net irc.freenode.net]
mfp has quit [anthony.freenode.net irc.freenode.net]
Associat0r has joined #ocaml
Asmadeus has joined #ocaml
gl has joined #ocaml
prigaux has joined #ocaml
sbok has joined #ocaml
mfp has joined #ocaml
sbok has quit [anthony.freenode.net irc.freenode.net]
gl has quit [anthony.freenode.net irc.freenode.net]
prigaux has quit [anthony.freenode.net irc.freenode.net]
Asmadeus has quit [anthony.freenode.net irc.freenode.net]
Associat0r has quit [anthony.freenode.net irc.freenode.net]
mfp has quit [anthony.freenode.net irc.freenode.net]
Associat0r has joined #ocaml
Asmadeus has joined #ocaml
gl has joined #ocaml
prigaux has joined #ocaml
sbok has joined #ocaml
mfp has joined #ocaml
angerman has joined #ocaml
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
Mr_Awesome has joined #ocaml
seafood has quit [Read error: 110 (Connection timed out)]
angerman has quit []
Alpounet has quit ["Ex-Chat"]
seafood has joined #ocaml
itewsh has joined #ocaml
sporkmonger has joined #ocaml
nimred has quit ["leaving"]
nimred has joined #ocaml
itewsh has quit [Read error: 110 (Connection timed out)]
<Camarade_Tux> =)
itewsh has joined #ocaml
<Camarade_Tux> ocamlmakefile is really good when it comes to linking with C :)
Camarade_Tux has quit ["Leaving"]
Camarade_Tux has joined #ocaml
itouch has joined #ocaml
_zack has quit ["Leaving."]
itewsh has quit [Connection timed out]
_zack has joined #ocaml
ched_ has quit [Remote closed the connection]
Narrenschiff_ has joined #ocaml
bombshelter13_ has joined #ocaml
BiDOrD has joined #ocaml
vithos has quit [Success]
itouch has quit [Read error: 110 (Connection timed out)]
itouch has joined #ocaml
Narrenschiff has quit [Read error: 110 (Connection timed out)]
Ched has joined #ocaml
Camarade_Tux has quit ["Quitte"]
Camarade_Tux has joined #ocaml
Narrenschiff_ has quit [Read error: 110 (Connection timed out)]
seafood has quit []
seafood has joined #ocaml
verte has quit ["~~~ Crash in JIT!"]
_andre has joined #ocaml
ikaros has joined #ocaml
<hcarty> Camarade_Tux: It really is a nice tool for small to medium projects... probably easier than either omake or ocamlbuild for something that involves C
alexp__ has joined #ocaml
<Camarade_Tux> I'm currently making ocamlgir produce the build system for each package and with ocamlmakefile I only have two write two lines, plus this is done in a separate file :)
psnively has joined #ocaml
<hcarty> I'm looking forward to ocamlgir-based Clutter bindings - I'm curious to see how easy the toolkit is to work with.
_andre has quit ["leaving"]
alexyk has joined #ocaml
OChameau-bis has quit [Read error: 110 (Connection timed out)]
maxote has left #ocaml []
maxote has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
feydr has quit [Nick collision from services.]
feydr_ has joined #ocaml
feydr has joined #ocaml
seafood has quit []
seafood has joined #ocaml
seafood has quit [Client Quit]
angerman has joined #ocaml
alexyk has quit []
palomer_ has quit [Remote closed the connection]
<Camarade_Tux> I have a problem with ocamlmakefile however : it doesn't seem to get a dependency =/
<thelema> OCaml gets slammed as a waste of time - https://www.code-magazine.com/Article.aspx?quickid=0903131
<Camarade_Tux> I met somebody who thought you'd use Graphics to build graphical interfaces
jeanbon has joined #ocaml
<psnively> There's some truth to that rant, especially on the GUI-binding side.
<thelema> so what's the solution - better win32 bindings?
<Camarade_Tux> gtk would be ok for that but the author doesn't seem to be aware of lablgtk
<Camarade_Tux> as for the win32 bindings, they're already pretty big afaik
rjack has joined #ocaml
rjack has quit [Client Quit]
<flux> but if you're targeting windows, wouldn't F# serve you better than ocaml?
<thelema> "tries to be platform-agnostic and thus relies on other adaptation layers to reach the underlying widget set" - I think that's lablgtk he's talking about
<Camarade_Tux> but I agree there is some truth in that, and most importantly, if that's how people see ocaml, there's something to learn :)
<Camarade_Tux> thelema, I'm not sure, it could be but that's not how I've read it
<psnively> I think we actually need native OS bindings.
<psnively> So, Cocoa on OS X, Win32, GTK+ looks to be in good shape.
<psnively> So maybe actually only OS X is truly lacking.
<psnively> In any case, apart from that, I didn't really see any criticisms that didn't seem quite well addressed by GODI + Batteries Included.
<psnively> But I'm admittedly biased.
<Camarade_Tux> except on windows =/
jonafan has quit ["Leaving"]
_zack1 has joined #ocaml
slash_ has quit [Client Quit]
_zack has quit [Read error: 104 (Connection reset by peer)]
palomer has joined #ocaml
<palomer> err
<palomer> type foo = Bar of int * int is different from type foo = Bar of (int * int) according to camlp4
<palomer> what gives??!
<julm> yep
<julm> the second has two boxes, the first only one
<palomer> boxes?
<palomer> how do I match the first one with camlp4? <:ctyp< ( $tup:tp$ ) >> doesn't cut it
<mrvn> pointer to blocks of memory
<palomer> but, otherwise, it's equivalent to programmers, right?
<mrvn> both are constructed by Foo(a,b)
<mfp> palomer: nope, you cannot match against Bar x in the first case
<mrvn> matters for C stubs too
<palomer> bummer!
<palomer> ok, otherwise than matching, they are identical, right?
<mrvn> Other than all their differences there are not different
<mrvn> let a = (1,2) in [Bar a; Bar a; Bar a; Bar a; Bar a] uses less ram.
komar__ has joined #ocaml
<mfp> palomer: and construction, let x = (1,2) in Bar x only works with Bar of (int * int)
<Camarade_Tux> =)
<palomer> that's so evil
<palomer> why would anyone be evil like this??!?
<julm> palomer: # type t = T of int * int and tt = TT of (int * int);;
<julm> type t = T of int * int
<julm> and tt = TT of (int * int)
<julm> # let t = T (0, 1) and tt = TT (0, 1);;
<julm> val t : t = T (0, 1)
<julm> val tt : tt = TT (0, 1)
<julm> # p t;;
<julm> block : size = 2 - value array (tag = 0) :
<julm> immediate value (0)
<julm> immediate value (1)
<julm> # p tt;;
<julm> block : size = 1 - value array (tag = 0) :
<julm> block : size = 2 (2w) - value array (tag = 0) :
<julm> | immediate value (0)
<julm> | immediate value (1)
<julm> where `p' is a function to analyse ocaml values
<palomer> so tt is more efficient?
<julm> tt is heavier
<julm> efficiency depends on what you wanna do
komar_ has quit [No route to host]
<thelema> tt allows more sharing between values, but uses an extra pointer to do so.
jeanbon has quit ["EOF"]
monadic_kid has joined #ocaml
itouch has quit [Connection timed out]
itouch has joined #ocaml
jamii has quit [Read error: 60 (Operation timed out)]
alexyk has joined #ocaml
Ched has quit [Remote closed the connection]
nickname` has joined #ocaml
Yoric[DT] has joined #ocaml
jeanbon has joined #ocaml
<mrvn> t is 24 bytes, tt is 40 bytes.
angerman has quit []
_zack1 has quit ["Leaving."]
kaustuv_ has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
itouch has quit [Read error: 110 (Connection timed out)]
itouch has joined #ocaml
Amorphous has joined #ocaml
peddie has joined #ocaml
<Camarade_Tux> \o/
<hcarty> Camarade_Tux: Cheering or sinking?
<rwmjones> anyone tried 3.11.1 yet?
<rwmjones> we're planning to bump the newest Fedora to this release over the weekend
<Camarade_Tux> cheering right now but I may be sinking soon : I'll add support for carrying types over different modules (defined in a module, used in another) and I'll probably start screaming :p
<kaustuv_> I've been using 3.11.1+rc0 without any problems for 2 days
<flux> what's changed in .1?
<rwmjones> kaustuv_, are the module MD5 sums different do you know?
<flux> (any highlights?)
* rwmjones should say, any of the module MD5 sums
<kaustuv_> rwmjones: not off the top of my head, but it's easy enough to check
<rwmjones> flux, looks like bug fixes, but some are very important, according to someone from JaneSt I was talking to
itouch has quit [Read error: 110 (Connection timed out)]
itouch has joined #ocaml
<kaustuv_> rwmjones: lots of modules in stdlib/ and otherlibs/ have changed
<flux> I wouldn't mind if the binary compatibility rules were relaxed somehow..
monadic_kid has quit ["Leaving"]
monadic_kid has joined #ocaml
itouch has quit [Connection timed out]
itouch has joined #ocaml
<jli> there is no eval or exec function, is there? e.g., (fun f -> f ())
<mrvn> jli: Lazy.t
angerman has joined #ocaml
jonafan has joined #ocaml
alexyk has quit []
alexyk has joined #ocaml
<flux> suggestions on which library should I use to capture the contents of the <title>-element in a web page?
<flux> ..or using perl4caml and some library for perl..
Rotaerk has joined #ocaml
<Rotaerk> anyone know why the "function" keyword is needed?
<jli> Rotaerk: what do you mean? to define an anonymous function?
<Rotaerk> as far as I can tell, there's no ambiguity if "fun" was used for both a pattern-matching function and a general function
<Rotaerk> I'm really asking this about F#, but I was told it's the same in OCaml
<jli> Rotaerk: hm, how would you pattern match on multiple arguments? stick them in a tuple?
<monadic_kid> jli: yes
<monadic_kid> jli: or mix it with currying
<jli> currying? so: fun | Some firstarg -> (fun | Some secondarg -> ... | None) | None -> (fun ...) ?
<jli> I believe the revised syntax for OCaml only has "fun". I don't know if it does pattern-matching, though. probably not?
<monadic_kid> jli: let foo x y = function ... -> ... | .. -> ...| ... -> ...
<jli> monadic_kid: how do you handle multiple arguments that way?
<jli> seems like just one level of matching
<flux> rotaerk, "function" is nice when you want to write functions without giving a name to the variable
<flux> rotaerk, like, let of_bool = function true -> "true" | false -> "false"
<flux> it has no other advantage over fun+match
<monadic_kid> flux: he knows, he asking is it really necessarrily to have 2 different keywords
<Associat0r> it only handles 1 arg right?
<monadic_kid> jli: use a tuple
<monadic_kid> jli: or pattern match in function arguments
<flux> monadic_kid, well, technically it's not necessary. but it's nice at times.
<flux> something I tried to convey there :)
<Rotaerk> flux, not asking if the mechanism is necessary, just the use of "function" to do it
<Rotaerk> flux, for instance, why would this be ambiguous: let of_bool = fun | true -> "true" | false -> "false"
<Rotaerk> such that they have to replace "fun" there with "function"
<flux> rotaerk, oh, right. well, consider this: match 0 with 0 -> fun _ -> () | _ -> fun _ -> ();;
<flux> but I suppose we could handle that case with parens, as we do embedded matches anyway
<flux> but changing it now could possibly break code
<Rotaerk> flux, it's mostly F# I'm thinking about, which is still a little more changeable
<jli> seems like it's possible, just not that way because of history
<flux> while we're at it, matching multiple arguments that way would be nice too :)
<flux> fun _ 0 -> 42 | 0 _ -> 41 | _ _ -> 0
<flux> but, perhaps a bit too obscure..
<jli> flux: how would that work?
<jli> oh, just a space? hmm.
<flux> now someone go write a syntax extension for that..
<Camarade_Tux> anyone know if "any" is a python type ?
<Camarade_Tux> well, "type"
<flux> "tag"?
<flux> to my original question about a web-pages title-tag: yes, perl4caml+www-mechanizer works great
<mrvn> flux: easy enough if you want fun a b -> match (a,b) with (_, 0) -> 42 | (0, _) -> 41 | _ -> 0
<jli> flux: there's no better way? can't you use nethttp from ocamlnet?
<Camarade_Tux> actually, gobject-introspection is quite dumb : when it doesn't know the python type corresponding to a C type, it just says the type is "any", and sometimes "any*" (the problem is sockaddr)
<flux> mrvn, would do, although I suppose not optimal
<flux> jli, well, add nethtml to the mix (which I'd forgotten) and one might be somewhere
<jli> mrvn: that's not new syntax though
<flux> jli, I think he was suggesting what the conversion would do
<flux> jli, but www-mechanizer gets an url as a parameter and provides a method called title, it can't get much easier than that
<thelema> jli: yes. that's the way.
<flux> with nethtml I'd atleast need to perform a search :)
<flux> (in addition to providing all other kinds of plumbing from nethttp or curl (which I already use) to nethtml)
<jli> thelema: sorry, what are you referring to? :)
Snark has quit ["Ex-Chat"]
<thelema> jli: something way up in my scrollback - ignore freely
<jli> hm, okay :)
itouch has quit [Connection timed out]
<Camarade_Tux> once I am old, rich and famous, I'll write a search engine that will crawl the web to find people who design formats around XML and don't document the format they wrote on purpose because it's XML
<julm> hu
itouch has joined #ocaml
sporkmonger has quit [Read error: 60 (Operation timed out)]
alexp__ has quit [Read error: 110 (Connection timed out)]
kaustuv_ has quit [Remote closed the connection]
komar__ is now known as komar_
Ched has joined #ocaml
marmottine has quit [Remote closed the connection]
itouch has quit [Connection timed out]
itouch has joined #ocaml
itouch has quit [Read error: 60 (Operation timed out)]
itouch has joined #ocaml
<palomer> what's a list of items in revised syntax?
<jli> [1; 2; 3]
feydr has quit ["leaving"]
sporkmonger has joined #ocaml
<palomer> ah, righto
slash_ has joined #ocaml
<Camarade_Tux> hcarty, \o/ <-- sinking this time :)
psnively has quit []
smimou has quit ["bli"]
monadic_kid has quit ["Leaving"]
komar_ has quit [Remote closed the connection]
itouch has quit [Read error: 110 (Connection timed out)]
itouch has joined #ocaml
smimou has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
itouch has quit [Connection timed out]
itouch has joined #ocaml
itouch has quit [Client Quit]
alexyk has quit []
ikaros_ has joined #ocaml
angerman has quit []
<Camarade_Tux> night all
Camarade_Tux has quit ["Leaving"]
ikaros_ has quit ["Leave the magic to Houdini"]
alexyk has joined #ocaml
alexyk has quit []
ikaros has quit [Read error: 110 (Connection timed out)]
Rotaerk has quit ["Leaving"]
hkBst has quit [Read error: 104 (Connection reset by peer)]
monadic_kid has joined #ocaml
thelema__ has joined #ocaml
alexyk has joined #ocaml
jm has joined #ocaml
thelema has quit [Read error: 110 (Connection timed out)]
m3ga has joined #ocaml
julm has quit [Read error: 110 (Connection timed out)]
jm has quit ["WeeChat 0.2.6.2"]
julm has joined #ocaml
vithos has joined #ocaml
travisbrady has joined #ocaml
vithos_ has joined #ocaml
_JFT_ has joined #ocaml
jamii has joined #ocaml
ikaros has joined #ocaml
vithos has quit [Connection reset by peer]
vithos_ has quit [Connection reset by peer]
jonafan has quit [Read error: 104 (Connection reset by peer)]
smimou has quit [Read error: 104 (Connection reset by peer)]
monadic_kid has quit ["Leaving"]
smimou has joined #ocaml
alexyk has quit []