kaustuv changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.1 out now! Get yours from http://caml.inria.fr/ocaml/release.html
aldebrn has joined #ocaml
jeddhaberstro has joined #ocaml
alexyk has quit []
<aldebrn> Google gave me some good results, thought I'd ask here too: anyone have any experience using a distributed iterative linear solver (preconditioned conjugate gradient) from Ocaml? either a stand-alone 3rd party solver or one directly in ocaml?
<yziquel> hi. i'd like to have a type 'a t = 'a option ref * ('b * ('b -> 'a)). But I'd like the type to be only 'a t, and not 'a 'b t... is it possible?
Associat0r has joined #ocaml
<Alpounet> existential types may be of help yziquel
willb has quit [Connection timed out]
alexyk has joined #ocaml
willb has joined #ocaml
ched_ has joined #ocaml
Ched has quit [Read error: 110 (Connection timed out)]
<yziquel> Alpounet: type t = exists 'b. ('b -> int) gives me a syntax error. How do you write an existential type?
<Alpounet> I've only seen them in record types, so far
<Alpounet> there are message on the ML with pretty good explanations
<Alpounet> hold on
<Alpounet> should be enough to get it
<Alpounet> gotta go now
<Alpounet> g'night
ivanst has joined #ocaml
Alpounet has quit ["Quitte"]
willb has quit [Read error: 104 (Connection reset by peer)]
* ivanst is very sad. i've been trying to add a feature to an OCaml program for the last five hours and i'm almost done.
<ivanst> but i need to defocus for a while
willb has joined #ocaml
seafood has joined #ocaml
<ivanst> and i can't even program in OCaml. i know some Haskell and am mostly faking it along with a tutorial
mpwd has joined #ocaml
seafood_ has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood_ has quit [Read error: 60 (Operation timed out)]
seafood has joined #ocaml
willb1 has joined #ocaml
willb1 has quit [Read error: 104 (Connection reset by peer)]
willb1 has joined #ocaml
willb has quit [Read error: 60 (Operation timed out)]
Lomono has quit ["Don't even think about saying Candlejack or else you wi"]
seafood_ has joined #ocaml
seafood has quit [Read error: 110 (Connection timed out)]
willb1 has quit [Connection timed out]
willb1 has joined #ocaml
marius has joined #ocaml
marius is now known as Guest70298
mgodshall has joined #ocaml
mpwd has quit [Read error: 60 (Operation timed out)]
Guest70298 is now known as __marius__
willb1 has quit [Read error: 110 (Connection timed out)]
willb1 has joined #ocaml
willb1 has quit [Read error: 104 (Connection reset by peer)]
willb1 has joined #ocaml
mpwd has joined #ocaml
authentic has joined #ocaml
jeddhaberstro has quit []
seafood_ has quit [Read error: 60 (Operation timed out)]
seafood has joined #ocaml
seafood has quit [Read error: 60 (Operation timed out)]
mpwd_ has joined #ocaml
yziquel has quit [Remote closed the connection]
willb2 has joined #ocaml
* palomer is back
mpwd__ has joined #ocaml
mpwd___ has joined #ocaml
sporkmonger has quit []
mpwd has quit [Read error: 110 (Connection timed out)]
willb1 has quit [Read error: 110 (Connection timed out)]
mpwd_ has quit [Read error: 110 (Connection timed out)]
mpwd has joined #ocaml
mpwd__ has quit [Read error: 110 (Connection timed out)]
mpwd___ has quit [Read error: 110 (Connection timed out)]
seafood has joined #ocaml
mpwd has quit [Connection timed out]
Snark has joined #ocaml
Yoric[DT] has joined #ocaml
<Yoric[DT]> hi
ulfdoz has joined #ocaml
seafood has quit []
Yoric[DT] has quit ["Ex-Chat"]
ulfdoz has quit [Read error: 110 (Connection timed out)]
mpwd has joined #ocaml
jknick has joined #ocaml
mpwd has quit []
alexyk has quit []
Associat0r has quit []
<palomer> high
palomer has quit [Read error: 104 (Connection reset by peer)]
shazam has joined #ocaml
_zack has joined #ocaml
Camarade_Tux has joined #ocaml
ikaros has joined #ocaml
eevar2 has joined #ocaml
mpwd has joined #ocaml
ivanst has left #ocaml []
hkBst has joined #ocaml
mpwd has quit []
mpwd has joined #ocaml
seafood has joined #ocaml
mpwd has quit []
seafood has quit []
seafood has joined #ocaml
Lomono has joined #ocaml
marmottine has joined #ocaml
ikaros has quit ["Leave the magic to Houdini"]
mpwd has joined #ocaml
_zack1 has joined #ocaml
_zack has quit [Read error: 113 (No route to host)]
Yoric[DT] has joined #ocaml
dileep has joined #ocaml
dileep has quit [Client Quit]
<wysek> hi
<wysek> I have a problem
<wysek> I get:
<wysek> Type (int * abcast_msg) list is not compatible with type consensus_value = abcast_msg Abcast.proposal
<julm> wysek: what is the definition of [Abcast.proposal]?
<wysek> type 'a Abcast.proposal = 'a bcast_msg list
<wysek> type 'a bcast_msg = int * 'a
mpwd has quit []
<Camarade_Tux> wysek, it would be compatible if it were : int * (abcast_msg list), not (int * abcast_msg) list
<wysek> hmmm
<julm> wysek: works well for me: http://ocaml.pastebin.com/d3091a399
* Camarade_Tux checks
<wysek> it does not work because of some other code
<wysek> :)
<julm> could you pastebin it?
<Camarade_Tux> wysek, gah, sorry, I was wrong, must still be too tired here
<wysek> actually it's too big
<wysek> :(
<julm> could you reduce it to a sample that still fails?
<wysek> ok, it works now
<julm> okay :)
<wysek> seems like Camarade_Tux has pointed me to the right direction
<wysek> thanks
<wysek> :)
<wysek> just to make sure you don't die of curiosity:
<wysek> in some .mli I had:
<wysek> val decide : 'a abcast_instance -> int -> (int * 'a) list -> unit
<wysek> it compiles now after I changed to:
<wysek> val decide : 'a abcast_instance -> int -> 'a proposal -> unit
<wysek> ('a here is abcast_msg)
<julm> ok
<wysek> actually I'm not sure why there was an error. I think these types are the same
<wysek> aren't they?
* Camarade_Tux was most probably wrong, eyes failing
<Yoric[DT]> They definitely look similar.
<Camarade_Tux> Yoric[DT], btw, is batteries' List.concat tail-rec ?
<Camarade_Tux> the documentation says : "Tail-recursive (length of the argument + length of the longest sub-list)." but why the comment in parens then ?
<Yoric[DT]> iirc, it is
<Yoric[DT]> Well, even a tail-recursive function has its complexity :)
<Camarade_Tux> ok, I was wondering because it's the same comment as in inria's List.concat ;)
<Camarade_Tux> "Not tail-recursive (length of the argument + length of the longest sub-list)."
_zack1 has quit ["Leaving."]
<Camarade_Tux> argh, it uses non-regular lists, I can't just steal the code ='(
marmottine has quit ["mv marmotine Laurie"]
<Yoric[DT]> Yeah, the code is somewhat hacky.
<Yoric[DT]> Inherited from extlib.
th5 has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
Associat0r has joined #ocaml
sporkmonger has joined #ocaml
sporkmonger_ has joined #ocaml
komar__ has joined #ocaml
Associat0r has quit []
<Camarade_Tux> seems to be working but it's too short to be real
<Camarade_Tux> (my list_concat btw)
eevar2 has quit [Remote closed the connection]
eevar2 has joined #ocaml
_andre has joined #ocaml
sporkmonger has quit [Read error: 113 (No route to host)]
mpwd has joined #ocaml
Narrenschiff has joined #ocaml
willb2 has quit [Read error: 104 (Connection reset by peer)]
willb2 has joined #ocaml
Alpounet has joined #ocaml
sporkmonger_ has quit []
komar__ has quit [Read error: 113 (No route to host)]
<Camarade_Tux> tested it on pretty long lists and seems to work ok, if anyone wants to have a look at it : http://paste.lisp.org/display/82127
<Camarade_Tux> (I should have lowered the stack limit because instead of managing to get stack overflows, I managed to get out of memory killers)
<Camarade_Tux> it even seems to be faster than inria's List.concat
komar__ has joined #ocaml
sporkmonger has joined #ocaml
seafood_ has joined #ocaml
Associat0r has joined #ocaml
seafood has quit [Read error: 110 (Connection timed out)]
Associat0r has quit []
Associat0r has joined #ocaml
komar__ has quit ["WeeChat 0.2.6.2-ohshi"]
komar_ has joined #ocaml
Associat0r has quit []
schme has joined #ocaml
Associat0r has joined #ocaml
Associat0r has quit [Client Quit]
willb2 has quit ["Leaving"]
_zack has joined #ocaml
willb has joined #ocaml
eevar2 has quit ["Leaving"]
bombshelter13_ has joined #ocaml
jmou has joined #ocaml
julm has quit [Read error: 60 (Operation timed out)]
th5 has quit []
<Camarade_Tux> List.rev must be terribly slow, in my list_concat, a final call to List.rev is responsible for 60% of the total runtime :o
alexyk has joined #ocaml
<thelema> Camarade_Tux: it's as fast as it can be, but there's a lot of allocation & GC involved in reversing a list and throwing away the old one.
<thelema> especially if your old list doesn't fit in the minor heap - major collections are expensive
<Camarade_Tux> thelema, I profiled it and... gprof tells me 90.4% of the time is spent in the gc :o
mpwd has quit []
<thelema> yup, that's the problem with reversing big lists. normally short-lived data stays in the minor heap, but a big list won't fit
<thelema> Bluestorm and I built a version of List.fold_right that works around this problem. Maybe you could implement List.concat in a similar way
<thelema> in the limit, the performance isn't changed, but the constant factos is much reduced for medium-big lists
seafood_ has quit []
<thelema> http://git.ocamlcore.org/cgi-bin/gitweb.cgi?p=batteries/batteries.git;a=blob;f=examples/benchmark/t_list.ml;h=a15fb8bde22e24c42c7070462b39fe129e20dd2d;hb=HEAD
<thelema> It's fold_right3 here
<thelema> yes, that's the code.
<thelema> I'm surprised you found it in ocaml-community
<thelema> I didn't know anyone paid attention.
<Camarade_Tux> thelema, google :)
<Camarade_Tux> I knew it from before though
<thelema> :)
Yoric[DT] has joined #ocaml
alexyk has left #ocaml []
willb has quit [Read error: 110 (Connection timed out)]
willb has joined #ocaml
eevar2 has joined #ocaml
willb has quit [Read error: 54 (Connection reset by peer)]
willb has joined #ocaml
alexyk has joined #ocaml
ikaros has joined #ocaml
eevar2 has quit ["This computer has gone to sleep"]
Yoric[DT] has quit ["Ex-Chat"]
mishok13 has quit ["Stopping IRC chat... [OK]"]
Narrenschiff has quit []
jmou has quit [Read error: 60 (Operation timed out)]
ary1 has joined #ocaml
ary1 has left #ocaml []
jmou has joined #ocaml
willb has quit [Read error: 104 (Connection reset by peer)]
willb has joined #ocaml
_zack has quit ["Leaving."]
alexyk has quit [Read error: 113 (No route to host)]
mpwd has joined #ocaml
_zack has joined #ocaml
alexyk has joined #ocaml
jeanbon has joined #ocaml
alexyk has quit []
jeanbon has quit ["."]
jlouis_ has quit ["leaving"]
jlouis has joined #ocaml
jlouis has quit [Client Quit]
jlouis has joined #ocaml
_zack has quit ["Leaving."]
willb has quit [Read error: 104 (Connection reset by peer)]
willb has joined #ocaml
jeanbon has joined #ocaml
jeddhaberstro has joined #ocaml
jmou is now known as julm
Amorphous has quit [Read error: 104 (Connection reset by peer)]
willb has quit [Read error: 110 (Connection timed out)]
willb has joined #ocaml
Amorphous has joined #ocaml
Snark has quit ["Ex-Chat"]
stmi has joined #ocaml
Ched has joined #ocaml
ched_ has quit [Read error: 104 (Connection reset by peer)]
stmi has quit [Remote closed the connection]
stmi has joined #ocaml
willb has quit [Read error: 104 (Connection reset by peer)]
willb has joined #ocaml
psnively has joined #ocaml
psnively has left #ocaml []
jeff_s_ has left #ocaml []
<shazam> what's the easiest way to find out if a string is a substring of another?
<shazam> ahh, ExtString.String.exists
ikaros has quit ["Leave the magic to Houdini"]
Narrenschiff has joined #ocaml
Associat0r has joined #ocaml
* shazam wonders if it's UTF8 friendly
<julm> shazam: according to rfc2279 « The Boyer-Moore fast search algorithm can be used with UTF-8 data. »; and if [ExtString.String.exists] is serious, it uses Boyer-Moore
Narrenschiff has quit []
authentic has quit [hubbard.freenode.net irc.freenode.net]
aij has quit [hubbard.freenode.net irc.freenode.net]
gl has quit [hubbard.freenode.net irc.freenode.net]
aij has joined #ocaml
authentic has joined #ocaml
gl has joined #ocaml
alexyk has joined #ocaml
alexyk has left #ocaml []
Associat0r has quit []
Yoric[DT] has joined #ocaml
<kaustuv> Before searching in Unicode, you had better make sure all your
<kaustuv> ... strings are normalized
<shazam> normalized? what does that mean?
willb has quit [Read error: 104 (Connection reset by peer)]
<julm> nfkc is fine
<kaustuv> Unicode has combining characters, variant forms, etc. etc. etc.
<mrvn> shazam: you can write ö and ö or o with two dots on top. normalized brings both of them into a common form.
<mrvn> s/and/as/
jeddhaberstro has quit [Read error: 104 (Connection reset by peer)]
jeddhaberstro has joined #ocaml
Associat0r has joined #ocaml
BiDOrD has joined #ocaml
<kaustuv> > Also, none of the normalization forms are closed under string concatenation
<kaustuv> Ugh!
<shazam> ah, I see, characters have a canonical form
<Yoric[DT]> Yeah, Unicode is really a pain.
willb has joined #ocaml
<shazam> why not force people to always use the canonical form?
<mrvn> That would be too easy.
<Camarade_Tux> it would make things too easy to be funny
<kaustuv> Force people? What are you, a fascist?
<kaustuv> (says a guy who uses strongly typed programming languages)
Associat0r has quit []
<hcarty> kaustuv: http://cgit.freedesktop.org/~hcarty/cairo-ocaml/ -- an attempt at cleaning up the CVS -> git import of Cairo
<mrvn> kaustuv: it doesn't force one to write type annotations.
<kaustuv> hcarty: Awesome!
<hcarty> The "official" repo should be live soon, once I track down a strange error in the web interface
<kaustuv> You joined the cairo team?
<hcarty> kaustuv: And Olivier has patches to add and is interested in staying involved
<kaustuv> This is great news. Thanks!
<hcarty> Yes, more or less. I have an account at fd.o now and commit access for the cairo-ocaml repo
<hcarty> You're welcome. I am excited about it as well.
<hcarty> It would be wonderful to get this in to good shape (update to support recent-ish Cairo; add findlib support officially) and make a proper release
Associat0r has joined #ocaml
<Yoric[DT]> That would be nice.
<Yoric[DT]> And a proper graphics combinator library on top of Cairo, too :)
<Camarade_Tux> and an ice cream too :)
Associat0r has quit []
mgodshal1 has joined #ocaml
<julm> Camarade_Tux: instead of screaming, what about doing that ohloh stuff?
<Camarade_Tux> julm, hmm, right
<Camarade_Tux> I have to admit I'm heavily slacking, I'm planning an internet game of duke nukem 3D now...
<shazam> I always wondered...can cairo be used for making a game?
<shazam> like a side scroller?
shazam is now known as palomer
<hcarty> palomer: It probably could
* Yoric[DT] wonders about the performance.
<hcarty> It would likely require a LOT of pre-rendering
Ched has quit [Read error: 104 (Connection reset by peer)]
Ched has joined #ocaml
mgodshall has quit [Read error: 110 (Connection timed out)]
<julm> Camarade_Tux: who's in a hurry for this after all ;)
<hcarty> It is used for some if not all of the Gnome games. But I don't think any of those have significant animation.
<hcarty> Yoric[DT]: I'm finding my way though FrGui now, and it has an FrCairo library
<palomer> so you can't just can't just constantly flip the buffer?
<Yoric[DT]> Sounds good :)
<hcarty> It's very basic, just enough for FrGui interaction. But hopefully it will grow in to more :-)
<palomer> s/can't just/
<hcarty> palomer: I doubt it, unless one or more of the proposed hardware-accelerated backends make it in to Cairo
<hcarty> You could use Cairo for the initial rendering and keep those rendered sprites around.
<hcarty> If it were combined with OpenGL, SDL or something similar then it could probably be made fast enough.
slash_ has joined #ocaml
* Camarade_Tux think Yoric[DT] can't live that close to him in Paris
komar_ has quit ["WeeChat 0.2.6.2-ohshi"]
<Camarade_Tux> (checking the ohloh map)
komar_ has joined #ocaml
* Yoric[DT] is trying to locate Camarade_Tux.
<Camarade_Tux> I'm not on the map (quite surprised btw), but near Port-Royal ;)
<kaustuv> where is this ohloh map?
<Yoric[DT]> Ah, ok :)
<Yoric[DT]> Well, Port-Royal is quite close.
<Camarade_Tux> actually we're three of the channel to live in a 500m radius ;p
sporkmonger has quit [Connection timed out]
<palomer> how do I add myself?
<hcarty> thelema: You're in MO?
<Yoric[DT]> Camarade_Tux: there's smimou
<Yoric[DT]> Is that the third one?
* Yoric[DT] hasn't spotted anyone else.
komar_ has quit ["WeeChat 0.2.6.2-ohshi"]
komar_ has joined #ocaml
komar_ has quit [Client Quit]
<Camarade_Tux> Yoric[DT], yeah
<Camarade_Tux> actually I think we're *at least* three in this area
komar_ has joined #ocaml
<Yoric[DT]> :)
<kaustuv> Bah, no one lives close to me.
<Camarade_Tux> yet ;)
hkBst has quit [Read error: 104 (Connection reset by peer)]
_andre has quit ["leaving"]
stmi has quit [Remote closed the connection]
bombshelter13_ has quit []
<palomer> how does one become a "user" ?
komar_ has quit ["WeeChat 0.2.6.2-ohshi"]
komar_ has joined #ocaml
komar_ has quit [Client Quit]
<kaustuv> find a steady dealer, start slow, reorganize life around newfound addiction
komar_ has joined #ocaml
komar_ has quit [Client Quit]
<Camarade_Tux> hehe :P
<Camarade_Tux> palomer, you have to register ar ohloh, look for the ocaml project and click on "I use it"
ikaros has joined #ocaml
komar_ has joined #ocaml
kaustuv has left #ocaml []
schme has quit [Read error: 113 (No route to host)]
<Alpounet> damn !
<Alpounet> it sucks, I'm the only one not-being in Paris, ftm
<Camarade_Tux> we'll see how it goes ;)
<Camarade_Tux> I don't know if people will subscribe to ohloh though
Associat0r has joined #ocaml
<Yoric[DT]> 'night everyone
ikaros has quit ["Leave the magic to Houdini"]
<Camarade_Tux> night Yoric[DT]
Yoric[DT] has quit ["Ex-Chat"]
willb has quit [Read error: 110 (Connection timed out)]
willb has joined #ocaml
<Camarade_Tux> sleepy too, night :)
<julm> \o_
<palomer> ftm?
<julm> for the moment
bzzbzz has joined #ocaml
Camarade_Tux has quit [Read error: 113 (No route to host)]
sgnb` is now known as sgnb
sgnb has quit [Remote closed the connection]
sgnb has joined #ocaml
sgnb has quit [Remote closed the connection]
sgnb has joined #ocaml
komar_ has quit ["WeeChat 0.2.6.2-ohshi"]
aym has joined #ocaml
BiDOrD has quit [Read error: 104 (Connection reset by peer)]
Associat0r has quit []
aym has quit []
jeanbon has quit [Read error: 104 (Connection reset by peer)]
Associat0r has joined #ocaml
mgodshal1 has quit ["leaving"]
Associat0r has quit []