flux changed the topic of #ocaml to: Yes, inria.fr is back up! | Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.0beta1 available from http://caml.inria.fr/pub/distrib/ocaml-3.11/ | Or grab OCaml 3.10.2 from http://caml.inria.fr/ocaml/release.html
vixey has quit [Connection timed out]
<svref> okay, I found another guy who thinks its a broken package:https://bugs.launchpad.net/ubuntu/+source/unison/+bug/297896
svref has quit ["Client exiting"]
<Yoric[DT]> 'night
Yoric[DT] has quit ["Ex-Chat"]
netx has quit [Read error: 110 (Connection timed out)]
Kerris4 has joined #ocaml
code17 has quit ["Leaving."]
Kopophex has joined #ocaml
jlouis has quit [Remote closed the connection]
netx has joined #ocaml
halberd has joined #ocaml
apples` has quit ["Leaving"]
halberd is now known as nullity
nullity is now known as halberd
Kerris4 has quit [Read error: 54 (Connection reset by peer)]
tomh has quit ["http://www.mibbit.com ajax IRC Client"]
apples` has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
ulfdoz has quit ["deprecated"]
Amorphous has joined #ocaml
jeddhaberstro_ has quit []
marmotine has quit ["mv marmotine Laurie"]
jeddhaberstro has joined #ocaml
dabd has quit [Client Quit]
threeve has joined #ocaml
Kopophex has quit ["Leaving"]
alexyk has joined #ocaml
apples` has quit ["Leaving"]
reillyeon has joined #ocaml
netx has quit ["This computer has gone to sleep"]
apples` has joined #ocaml
alexyk has quit []
halberd has quit ["This computer has gone to sleep"]
netx has joined #ocaml
jeddhaberstro has quit []
jeddhaberstro has joined #ocaml
threeve has quit []
LeCamarade has joined #ocaml
jeddhaberstro has quit []
LeCamarade has quit [Read error: 110 (Connection timed out)]
netx has quit ["This computer has gone to sleep"]
reillyeon has left #ocaml []
mfp has quit [Read error: 104 (Connection reset by peer)]
ygrek has joined #ocaml
mfp has joined #ocaml
struktured has joined #ocaml
code17 has joined #ocaml
apples` has quit ["Leaving"]
<flux> svenl, well, it should be already be a bug that unison has been compiled as bytecode..
<flux> a native binary should not say such a thing
<svenl> flux: huh ?
<svenl> ah, i think it was for svref, not me :)
<gildor> flux: what arch for unison ?
_zack has joined #ocaml
<flux> gildor, right, I was assuming x86
<flux> ubuntu 8.04 has a natively compiled unison
<flux> (unison 2.13.16)
<gildor> flux: i am not sure
<gildor> lpia seems to be an arch
<gildor> lpia <> i386
* Camarade_Tux thought ubuntu only had x86/x86-64
<gildor> and look for "dh_strip"
<gildor> I think ubuntu guy decided to override my setting of dh_strip
<gildor> which was dh_strip -punison -X unison-2.13.16 -X unison-2.13.16-gtk
<gildor> for not removing bytecode data from unison
<Camarade_Tux> they stripped a bytecode bin ? =D
<gildor> Camarade_Tux: yes they do
<gildor> and it doesn't work anymore
<gildor> suprising ?
<Camarade_Tux> yes, surprising they still do ;)
cyrilRomain has joined #ocaml
<flux> ..surprising that they don't simply, well, run the resulting binary after building the package..
<Camarade_Tux> I remember this precise problem has been raised on the mailing-list, and I think it was because of ubuntu broken packsges...
<Camarade_Tux> s/packsges/packages
<gildor> flux: I have no power about this kind of problem, you must directly see with ubuntu maintainer
<flux> gildor, sure, I didn't think you'd have any part in this, infact I didn't even know you were related to unison before this :)
<flux> I actually use unison to keep two machines in sync. I haven't yet implemented backupping to this yet. (storing older versions that is)
<gildor> gildor: I am the debian unison maintainer, ubuntu backport unison package from debian (and many other ocaml package I maintain in debian)
Mr_Awesome has joined #ocaml
Camarade_Tux has quit [Read error: 110 (Connection timed out)]
Camarade_Tux has joined #ocaml
Yoric[DT] has joined #ocaml
foo_ has joined #ocaml
<foo_> Hi! I defined <| infix operator, something like $ in haskell. How to set it's precedence? In default precedence I cannot have two <| in row.
vixey has joined #ocaml
<Yoric[DT]> hi
<Yoric[DT]> foo_: you should take a look at pa-do
<foo_> thanks, I'll take a look
<foo_> okey, it' an extension. But in common ocaml there is + operator which behaves exacly like I want <| to behave, is + built-in?
tomh has joined #ocaml
<Yoric[DT]> +?
<Yoric[DT]> + doesn't do function composition
<foo_> so precedece depends on characters in operator?
<Yoric[DT]> Yes.
<flux> yes
<Yoric[DT]> It's a little dirty hack.
<flux> so you could define +<|
<foo_> thanks, that's what i needed
<flux> I think it's actually a decent idea
<flux> the reader needs to know the precedency of a few characters and off he can go with any code with any operators
<flux> it has the downside that at times the precedencies are less than convenient, though :)
<Yoric[DT]> :)
<Yoric[DT]> Are you sure + is right-associative?
<foo_> it's not, you are right
<Yoric[DT]> @ and ^ are
<flux> these things are easy to test in the toplevel
<flux> type tree = V of int | S of (tree * tree) let (^) a b = S (a, b) let expr = V 4 ^ V 2 ^ V 1 ^ V 2;;
Kerris4 has joined #ocaml
<mfp> too much work
<flux> :)
<mfp> let ( *** ) x y = (x, y);;
<mfp> 1 *** 2 *** 3;;
<mfp> - : int * (int * int) = (1, (2, 3))
<flux> gives better readability to boot
<mfp> (**, the other right-associative prefix)
asabil has joined #ocaml
<vixey> why only 3 stars?
<foo_> I saw much nicer |> operator which is backward pipe
<vixey> you could do like let ( *************** ) x y even better!
ulfdoz has joined #ocaml
<foo_> friend of mine gave me ocaml puzzles. given a list I have to split it on two parts.
<foo_> but restrictions are:
<foo_> I cannot count list's length
<foo_> so take (n/2) @ drop (n/2) is not possible
<foo_> and after merge this parts I should have the same list
<foo_> so taking x::y::rest and put x to first and y to second is not possible
<foo_> do you have any ideas on it?
<foo_> the best I've done is putting a list to binary tree and first is dfs root's left subset and second is dfs root's right
<foo_> but it works only with 2^n lengths
<ski_> "merge" ?
hkBst has joined #ocaml
<foo_> after append one list to another
<foo_> yes, merge was bad word
<ski_> ok. yes, then
<ski_> (though maybe my solution is regarded as counting length .. not sure)
<foo_> if it's without + or any arithmetic it's correct
<ski_> (.. what's arithmetic ?)
<ski_> anyway .. are you looking for a hint ?
<foo_> yes
<foo_> to be honest I thought you are writing some at the moment :)
<ski_> first, i suppose given a list `[0;1;2;3;4]' you should yield `[0;1],[2;3;4]' (or maybe the other way around)
<ski_> yes ?
<foo_> yes
<foo_> but when length is odd
<foo_> there are two good answers
<foo_> [0;1;2] , [3;4] is also good
<ski_> presumably you could give either
<ski_> so, how would you know at which point to split the list in two ?
marmotine has joined #ocaml
<foo_> it's half, but I cannot count it.
<ski_> well .. how about if you ran two fingers across the list ..
<foo_> reverse?
<ski_> .. maybe one at double the speed of the other ?
<foo_> hell yeah, you are good
<ski_> (this is btw, a variation of "rabbit-tortoise chase")
<foo_> thanks, that works
<ski_> np
jlouis has joined #ocaml
foo_ has quit ["Ex-Chat"]
<vixey> foo_, half? :)
<vixey> foo_, so you have a list of 7 elements and you want to get a list of 4 paired with a list of 3 elements
<vixey> oh you got an even better solution than mine
* ski_ is curious
<ski_> what solution did you have ?
* vixey would have done odd :: even :: odd :: even :: nil
<vixey> ~~> (odd :: odd :: nil, even :: even :: nil)
<ski_> well, that's my first thought, too .. but foo_ advanced the requirement of insisting that appending the two resulting lists should yield the original input
* vixey just wrote that in a different language btw.. except I do take the lengths as input
<ski_> to what end ?
<vixey> labelling nodes of a tree with fresh variables for a typechecking
rby has joined #ocaml
mohbana has joined #ocaml
<mohbana> would you say the majority of ocaml code in written in a functional/imperative style?
<vixey> mohbana, yes
<mohbana> FP?
<vixey> mohbana, FP
Jedai has quit ["KVIrc 3.4.0 Virgo http://www.kvirc.net/"]
Jedai has joined #ocaml
<flux> would a characterisation ocaml "in the small" is functional, while "in the large" it is imperative, be fair?
<flux> perhaps "furely functional" in that context. for example first class functions are widely used always.
<thelema> a good programmer uses ocaml's functional style when possible and its iterative style when needed.
mfp has quit [Read error: 104 (Connection reset by peer)]
<vixey> what's so good about functional compared to imperative/
<vixey> ?
<flux> unfortunately no one can be told how much better it is, you need to experience it yourself.. ?
<thelema> it's generally safer and more flexible
mfp has joined #ocaml
<Camarade_Tux> I'm having problems converting from yacc to ocamlyacc =/
rwmjones has quit ["Closed connection"]
Amorphous has quit ["shutdown"]
<Yoric[DT]> vixey: there are plenty of opinions on this.
<Yoric[DT]> My personal experience is that it's often closer to specifications, more flexible (as in "I can easily write a pseudo-DSL which looks like the domain involved") and more reusable (as in [iter]).
<Yoric[DT]> That and the fact that you can extract more properties through static analysis.
<mellum> I think one of the strongest argument is "more debuggable"
<mellum> you can examine a function completely on its own
Amorphous has joined #ocaml
mfp has quit [Read error: 104 (Connection reset by peer)]
jeremiah has quit [Read error: 104 (Connection reset by peer)]
mfp has joined #ocaml
jeremiah has joined #ocaml
bluestorm has joined #ocaml
threeve has joined #ocaml
netx has joined #ocaml
<mohbana> what's in ocaml that isn't in haskell. any particular document that highlights the changes?
jeremiah has quit [Read error: 104 (Connection reset by peer)]
<vixey> mohbana, variant types obect syste
<vixey> :=
<vixey> disjunctive pattern matching
pango has quit [Remote closed the connection]
pango has joined #ocaml
jeremiah has joined #ocaml
mohbana has quit [Remote closed the connection]
threeve has quit []
ygrek has quit [Remote closed the connection]
fschwidom has joined #ocaml
bombshelter13_ has joined #ocaml
jeddhaberstro has joined #ocaml
mfp has quit [Read error: 110 (Connection timed out)]
mfp has joined #ocaml
struktured has quit [Read error: 60 (Operation timed out)]
alexyk has joined #ocaml
fschwidom has quit [Read error: 60 (Operation timed out)]
struktured has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
threeve has joined #ocaml
Snark_ has joined #ocaml
fschwidom has joined #ocaml
threeve has quit []
bombshelter13_ has quit [Client Quit]
jeremiah has joined #ocaml
bombshelter13_ has joined #ocaml
Axle has joined #ocaml
alexyk has quit []
tomh has quit ["http://www.mibbit.com ajax IRC Client"]
mfp has quit [Read error: 104 (Connection reset by peer)]
dejj has joined #ocaml
mfp has joined #ocaml
Camarade_Tux has quit ["Leaving"]
struktured has quit [Read error: 60 (Operation timed out)]
holoed has quit [Read error: 60 (Operation timed out)]
fschwidom has quit [Remote closed the connection]
holoed has joined #ocaml
threeve has joined #ocaml
itewsh has joined #ocaml
struktured has joined #ocaml
itewsh has quit [Remote closed the connection]
Snark_ has quit ["Ex-Chat"]
tomh has joined #ocaml
bombshelter13_ has quit [Read error: 104 (Connection reset by peer)]
bombshelter13_ has joined #ocaml
itewsh has joined #ocaml
dejj has left #ocaml []
damg has joined #ocaml
alexyk has joined #ocaml
alexyk_ has joined #ocaml
pumpkin_ has joined #ocaml
_zack has quit ["Leaving."]
alexyk has quit [Read error: 110 (Connection timed out)]
alexyk_ has quit [Read error: 110 (Connection timed out)]
Axle has quit [Remote closed the connection]
dnolen has joined #ocaml
dnolen has left #ocaml []
alexyk has joined #ocaml
alexyk has quit []
middayc has joined #ocaml
marmotine has quit ["mv marmotine Laurie"]
Yoric[DT] has quit ["Ex-Chat"]
asabil has quit ["Ex-Chat"]
damg has left #ocaml []
velco has joined #ocaml
fschwidom has joined #ocaml
hkBst has quit [Read error: 54 (Connection reset by peer)]
bzzbzz has joined #ocaml
itewsh has quit ["KTHXBYE"]
fschwidom has quit [Remote closed the connection]
Asmadeus has quit [Read error: 110 (Connection timed out)]
Asmadeus has joined #ocaml
apples` has joined #ocaml
cyrilRomain has quit ["leaving"]
velco has quit ["Ex-Chat"]
Asmadeus has quit [Read error: 110 (Connection timed out)]
alexyk has joined #ocaml
jonafan_ has joined #ocaml