flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
eikke has quit [Ping timeout: 248 seconds]
darkf has joined #ocaml
tane has quit [Read error: Operation timed out]
q66 has quit [Remote host closed the connection]
hcarty has quit [Ping timeout: 264 seconds]
tane has joined #ocaml
ulfdoz has quit [Ping timeout: 248 seconds]
astrobunny has quit [Read error: Connection reset by peer]
ollehar has joined #ocaml
dtg has joined #ocaml
leoncamel has joined #ocaml
gnuvince has joined #ocaml
ollehar has quit [Ping timeout: 246 seconds]
mattrepl has quit [Quit: mattrepl]
emmanuelux has quit [Remote host closed the connection]
r126l_ is now known as r126l
hcarty has joined #ocaml
madroach has quit [Ping timeout: 245 seconds]
madroach has joined #ocaml
troydm has quit [Quit: What is hope? That all of your wishes and all of your dreams come true? (C) Rau Le Creuset]
paddymahoney has quit [Remote host closed the connection]
walter has joined #ocaml
walter has quit [Client Quit]
walter has joined #ocaml
mikurubeam has joined #ocaml
cdidd has quit [Ping timeout: 240 seconds]
dezzy_ has joined #ocaml
dezzy has quit [Read error: Connection reset by peer]
yacks has joined #ocaml
mattrepl has joined #ocaml
kulakowski has joined #ocaml
kulakowski has quit [Remote host closed the connection]
ggole has joined #ocaml
Cyanure has joined #ocaml
yacks has quit [Read error: Operation timed out]
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
osa1 has joined #ocaml
<osa1> can anyone help me, I have a function with manually annotated type 'a someType -> 'a someType (it type checks fine), I can call it with x someType but I can't call with y someType, any ideas why could it be ?
yacks has joined #ocaml
<osa1> hm wait
yacks has quit [Max SendQ exceeded]
frogfoodeater has quit [Ping timeout: 252 seconds]
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
yacks has joined #ocaml
<ggole> ?
yacks has quit [Max SendQ exceeded]
yacks has joined #ocaml
ttamttam has joined #ocaml
Cyanure has quit [Remote host closed the connection]
yacks has quit [Ping timeout: 252 seconds]
yacks has joined #ocaml
yacks has quit [Read error: Connection reset by peer]
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
frogfoodeater has joined #ocaml
Snark has joined #ocaml
<osa1> how can I debug ocaml programs by putting breakpoints ?
<osa1> I want to stop at some place and inspect the scope
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
ttamttam has quit [Quit: ttamttam]
frogfoodeater has quit [Ping timeout: 248 seconds]
mcclurmc has joined #ocaml
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
Nahra has quit [Remote host closed the connection]
<orbitz> osa1: I don't think many people have actaully used the ocaml debugger
Nahra has joined #ocaml
zpe has joined #ocaml
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
yacks has joined #ocaml
icarot has joined #ocaml
djcoin has joined #ocaml
yacks has quit [Max SendQ exceeded]
icarot has quit [Remote host closed the connection]
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
zpe has quit [Ping timeout: 248 seconds]
hkBst has joined #ocaml
<def-lkb> osa1: maybe you can try oqamldebug, a gui frontend to the debugger. I never used it but it looks user-friendly…
ttamttam has joined #ocaml
anderse has joined #ocaml
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
zpe has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
mika1 has joined #ocaml
anderse has quit [Quit: anderse]
Kakadu has joined #ocaml
thomasga has joined #ocaml
thomasga1 has joined #ocaml
thomasga has quit [Ping timeout: 252 seconds]
ontologiae has joined #ocaml
mfp has quit [Ping timeout: 272 seconds]
zpe has joined #ocaml
ottbot has joined #ocaml
osa1 has quit [Ping timeout: 245 seconds]
thomasga has joined #ocaml
mfp has joined #ocaml
thomasga1 has quit [Ping timeout: 264 seconds]
zpe has quit [Ping timeout: 264 seconds]
Yoric has joined #ocaml
mikurubeam has quit [Ping timeout: 252 seconds]
awm22 has quit [Ping timeout: 248 seconds]
ulfdoz has joined #ocaml
zpe has joined #ocaml
sivoais has quit [Ping timeout: 276 seconds]
sivoais has joined #ocaml
ivan\ has quit [Ping timeout: 255 seconds]
destrius has quit [Quit: Leaving.]
ivan\ has joined #ocaml
sivoais has quit [Ping timeout: 246 seconds]
sivoais has joined #ocaml
awm22 has joined #ocaml
dezzy_ has quit [Remote host closed the connection]
sivoais has quit [Ping timeout: 252 seconds]
sivoais has joined #ocaml
sivoais has quit [Ping timeout: 240 seconds]
sivoais has joined #ocaml
ollehar has joined #ocaml
sivoais has quit [Ping timeout: 264 seconds]
sivoais has joined #ocaml
troydm has joined #ocaml
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
sivoais has quit [Ping timeout: 256 seconds]
cago has joined #ocaml
sivoais has joined #ocaml
sivoais has quit [Ping timeout: 252 seconds]
sivoais has joined #ocaml
sivoais has quit [Ping timeout: 240 seconds]
sivoais has joined #ocaml
leoncamel has quit [Ping timeout: 248 seconds]
leoncamel has joined #ocaml
sivoais has quit [Ping timeout: 248 seconds]
sivoais has joined #ocaml
frogfoodeater has joined #ocaml
frogfoodeater has quit [Ping timeout: 240 seconds]
sivoais has quit [Ping timeout: 240 seconds]
sivoais has joined #ocaml
<hcarty> thelema: I can submit a ticket on Mantis to see if rpath and static linking could be included upstream.
<hcarty> thelema: I'd certainly like to see it happen.
rixed_ is now known as rixed
sivoais has quit [Ping timeout: 264 seconds]
Neros has joined #ocaml
sivoais has joined #ocaml
sivoais has quit [Ping timeout: 245 seconds]
sivoais has joined #ocaml
mort___ has joined #ocaml
_andre has joined #ocaml
sivoais has quit [Ping timeout: 248 seconds]
sivoais has joined #ocaml
ollehar1 has joined #ocaml
martin_ has joined #ocaml
martin_ is now known as __emj
__emj has quit [Client Quit]
martin_ has joined #ocaml
martin_ is now known as _emj
sivoais has quit [Ping timeout: 240 seconds]
sivoais has joined #ocaml
sivoais has quit [Ping timeout: 264 seconds]
eikke has joined #ocaml
sivoais has joined #ocaml
_emj has quit [Remote host closed the connection]
mort___ has quit [Quit: Leaving.]
sivoais has quit [Ping timeout: 264 seconds]
sivoais has joined #ocaml
sivoais has quit [Ping timeout: 245 seconds]
sivoais has joined #ocaml
darkf has quit [Quit: Leaving]
groovy2shoes has joined #ocaml
sivoais has quit [Ping timeout: 256 seconds]
sivoais has joined #ocaml
yacks has joined #ocaml
sivoais has quit [Ping timeout: 245 seconds]
yacks has quit [Max SendQ exceeded]
sivoais has joined #ocaml
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
yacks has joined #ocaml
ocp has joined #ocaml
yacks has quit [Read error: Connection reset by peer]
groovy2shoes has quit [Quit: Computer has gone to sleep]
sivoais has quit [Ping timeout: 245 seconds]
sivoais has joined #ocaml
jonafan_ has quit [Ping timeout: 240 seconds]
eikke has quit [Ping timeout: 245 seconds]
Neros has quit [Ping timeout: 240 seconds]
mika2 has joined #ocaml
sivoais has quit [Ping timeout: 248 seconds]
sivoais has joined #ocaml
mika1 has quit [Ping timeout: 256 seconds]
ulfdoz has quit [Ping timeout: 246 seconds]
sivoais has quit [Ping timeout: 245 seconds]
jonafan has joined #ocaml
romildo has joined #ocaml
sivoais has joined #ocaml
<romildo> I am trying to use typerex for the first time on my gentoo linux system.
<romildo> Following instructions found at http://www.typerex.org/manual-ide.html, I have added to myocamlbuild.ml: Options.ocamlc := S [ A "ocp-ocamlc.opt"];
Neros has joined #ocaml
<romildo> When building the project at the command line I am getting the error:
<romildo> + ocp-ocamlc.opt -c -g -I +camomile -o driver.cmo driver.ml
<romildo> File "driver.ml", line 36, characters 2-27:
<romildo> Warning 10: this expression should have type unit.
<romildo> File "driver.ml", line 1:
<romildo> Error: /usr/lib64/ocaml/pervasives.cmi
<romildo> is not a compiled interface
<romildo> ocp-type exited with code 2
<romildo> Why is /usr/lib64/ocaml/pervasives.cmi not being considered a compiled interface?
mcclurmc has quit [Ping timeout: 248 seconds]
sivoais has quit [Ping timeout: 264 seconds]
sivoais has joined #ocaml
ulfdoz has joined #ocaml
sivoais has quit [Ping timeout: 245 seconds]
sivoais has joined #ocaml
romildo has quit [Quit: Leaving]
sivoais has quit [Ping timeout: 264 seconds]
sivoais has joined #ocaml
_emj has joined #ocaml
<ggole> Sounds like a question for the typerex mailing list.
<ggole> Unless you get a similar message from the OCaml toolchain.
_emj has left #ocaml []
sivoais has quit [Ping timeout: 240 seconds]
sivoais has joined #ocaml
<ollehar1> could I use phantom types to emulate the state of a stack?
<rks> ollehar1: hm?
<ollehar1> e.g., phantom types can type file handler as open or closed
<ollehar1> and prevent closed file handlers to be read from
<rks> right, so?
<ollehar1> I want to prevent certain stack operations depending on the state of the stack
<rks> like
<rks> flagging a stack as empty or not?
<rks> sure you can
<ollehar1> I want the flag to actually correspond the the stack
<ollehar1> *to the
<rks> hm?
<ollehar1> e.g, when communicating with the lua state, I only want to pop, when this or that value is on the stack
<ollehar1> (communicating with lua state from ocaml/c is done via a stack)
<rks> well, if you have a finite (known in advance) list of states you probably can?
sivoais has quit [Ping timeout: 240 seconds]
<rks> I don't know how you manipulate your stack so.
cdidd has joined #ocaml
<ollehar1> is it possible using something like polymorhpic variant types where order matter?
<ollehar1> [`Int, `String, ...]
martin_ has joined #ocaml
sivoais has joined #ocaml
martin_ is now known as _emj
ttamttam has quit [Quit: ttamttam]
<rks> ollehar1: interrupt me if I'm wrong
<rks> but it seems to me you want to an "heterogenous" list (your values are probably boxed but it doesn't matter) which type is the list of the types of its elements
<rks> +have
_emj has left #ocaml []
<rks> if that's really what you want (brrr) I'd recommand nesting tuples, it's just simpler.
<rks> "stack : (int t * (string t * (int t * (float t * float t))))" for exemple :-'
<rks> example*
<rks> (and you can probably directly unbox!
<rks> )
sivoais has quit [Read error: Connection reset by peer]
<rks> ollehar1: did I understand what you wanted or am I completly wrong?
<ollehar1> yes, that nested tuple thing could work :)
<ollehar1> the stack won't be that deep, only a couple of values
eikke has joined #ocaml
sivoais has joined #ocaml
<ollehar1> thanks!
<rks> sure, no problem
* Kakadu come to the surface from cgdb and looks around
Uvs has joined #ocaml
zbroyar has joined #ocaml
mikurubeam has joined #ocaml
smondet has joined #ocaml
Neros has quit [Ping timeout: 245 seconds]
mcclurmc has joined #ocaml
wwilly has quit [Remote host closed the connection]
mattrepl has quit [Quit: mattrepl]
mikurubeam has quit [Quit: +1 (Yes). -1 (No). i (What I have been trying to tell you all along).]
q66 has joined #ocaml
paddymahoney has joined #ocaml
mika2 has quit [Quit: Leaving.]
mattrepl has joined #ocaml
jbrown has quit [Remote host closed the connection]
mika1 has joined #ocaml
ollehar has quit [Ping timeout: 264 seconds]
dwmw2_gone is now known as dwmw2
eikke has quit [Read error: Operation timed out]
cago has left #ocaml []
ollehar1 has quit [Ping timeout: 240 seconds]
tane has quit [Read error: Connection reset by peer]
mika1 has quit [Quit: Leaving.]
Uvs has quit [Ping timeout: 240 seconds]
Uvs has joined #ocaml
dezzy has joined #ocaml
karswell has joined #ocaml
hkBst has quit [Ping timeout: 248 seconds]
Kakadu has quit []
tane has joined #ocaml
eikke has joined #ocaml
hto has quit [Read error: Connection reset by peer]
hto has joined #ocaml
eikke has quit [Ping timeout: 240 seconds]
ttamttam has joined #ocaml
oriba has joined #ocaml
ollehar has joined #ocaml
thomasga has quit [Quit: Leaving.]
eikke has joined #ocaml
<thelema> hcarty: nice; I'll pay attention to what comes of this.
ttamttam has quit [Remote host closed the connection]
Yoric has quit [Ping timeout: 252 seconds]
ttamttam has joined #ocaml
cdidd has quit [Read error: Connection reset by peer]
cdidd has joined #ocaml
awm22 has quit [Quit: Leaving.]
leoncamel has quit [Ping timeout: 252 seconds]
zbroyar has left #ocaml []
Kakadu has joined #ocaml
ontologiae has quit [Ping timeout: 245 seconds]
thomasga has joined #ocaml
eikke has quit [Read error: Operation timed out]
ocp has quit [Ping timeout: 245 seconds]
<wmeyer`> hello
<companion_cube> world
<wmeyer`> :-)
<companion_cube> it's quiet here...
<wmeyer`> yes
watermind has joined #ocaml
hcarty has quit [Ping timeout: 252 seconds]
ollehar has quit [Ping timeout: 256 seconds]
dezzy has quit [Remote host closed the connection]
hcarty has joined #ocaml
eikke has joined #ocaml
emmanuelux has joined #ocaml
* adrien cat /dev/urandom > /dev/snd
hcarty has quit [Ping timeout: 245 seconds]
Snark has quit [Ping timeout: 246 seconds]
hcarty has joined #ocaml
Snark has joined #ocaml
vbmithr_ has joined #ocaml
ggole has quit []
hcarty has quit [Ping timeout: 252 seconds]
hcarty has joined #ocaml
hcarty has quit [Ping timeout: 256 seconds]
ottbot has quit [Ping timeout: 240 seconds]
Tobu has joined #ocaml
mcclurmc has quit [Ping timeout: 252 seconds]
q66 has quit [Remote host closed the connection]
testcocoon has joined #ocaml
q66 has joined #ocaml
Yoric has joined #ocaml
watermind has quit [Quit: Konversation terminated!]
ottbot has joined #ocaml
awm22 has joined #ocaml
Cyanure has joined #ocaml
ttamttam has quit [Remote host closed the connection]
zpe has quit [Remote host closed the connection]
mattrepl has quit [Quit: mattrepl]
mattrepl has joined #ocaml
_andre has quit [Quit: leaving]
mikurubeam has joined #ocaml
Uvs has quit [Quit: Uvs]
ottbot has quit [Ping timeout: 245 seconds]
mcclurmc has joined #ocaml
ollehar has joined #ocaml
vbmithr has quit [Ping timeout: 264 seconds]
ollehar1 has joined #ocaml
anderse has joined #ocaml
Kakadu has quit []
bobry has quit [Remote host closed the connection]
lopex has quit [Remote host closed the connection]
IbnFirnas has quit [Remote host closed the connection]
anderse has quit [Quit: anderse]
ottbot has joined #ocaml
frogfoodeater has joined #ocaml
frogfoodeater has quit [Ping timeout: 272 seconds]
ottbot has quit [Ping timeout: 258 seconds]
lopex has joined #ocaml
bobry has joined #ocaml
smondet has quit [Ping timeout: 240 seconds]
IbnFirnas has joined #ocaml
frogfoodeater has joined #ocaml
hcarty has joined #ocaml
Hel0ck has joined #ocaml
ollehar has quit [Quit: ollehar]
<Hel0ck> Hi all
mcclurmc has quit [Read error: Operation timed out]
<Hel0ck> In the context of my ocaml project in my school, I must to be create my own big_int but i don't have ideas how i do that :s
<Hel0ck> I don't want the solution, just help
<Hel0ck> please
darkf has joined #ocaml
brendan has quit [Ping timeout: 256 seconds]
<adrien> computations often won't be fast
dezzy has joined #ocaml
<companion_cube> Hel0ck: you need some kind of array of int
<companion_cube> the first int is for bits from 0 to 63, the second int for 64 to 123, and so on
<Hel0ck> why the first int for bits from 0 to 63 etc ?
<Hel0ck> can you explain me please
<companion_cube> it's if you're on a 64 bits machine
<companion_cube> in which case ints are 63 bits-wide on ocaml
<companion_cube> in*
<Hel0ck> ok.. so i just need the array of int ?
<Hel0ck> if i have 123455678921236489, each number is in the case of my array, right ?
<companion_cube> if you want some efficiency, you would rather use a binary encoding
<companion_cube> so you cut the number in slices of 63 bits
<companion_cube> and use regular ints to represent those slices
<companion_cube> that said, maybe there are subtleties about remainders...
<Hel0ck> hum..
AlexBeaulne has joined #ocaml
frogfoodeater has quit [Ping timeout: 252 seconds]
<companion_cube> can you read about bigints on wikipedia, or are you supposed to be on your own?
<Hel0ck> I admit, i don't understand how to cut my number in slice of bit
<companion_cube> you divide it by 2^63; the remainder is the first int; the quotient gives you a number that you can again divide in slices
AlexBeaulne has quit [Client Quit]
<companion_cube> and that until the quotient is 0
<Hel0ck> i see
<Hel0ck> for each digit ?
ollehar1 has quit [Ping timeout: 272 seconds]
<companion_cube> I'm not sure of how to do it from a string
Snark has quit [Quit: Quitte]
Neros has joined #ocaml
Cyanure has quit [Ping timeout: 258 seconds]
eikke has quit [Ping timeout: 240 seconds]
ollehar has joined #ocaml
<Cypi> I guess you'd do it from a string as for any integer: you keep in a big_int what you already read, then multiply it by 10, add the next digit and so on. That's not the hard part
eikke has joined #ocaml
<companion_cube> the part I'm wondering about is for addition/multiplication, you need ternary operations on slices
<companion_cube> so to be able to represent the carry, maybe slices should be 31 bits and not 63
<Hel0ck> Cypi, I can't use the native big_int
<Cypi> If you don't care about memory efficiency, yes, it's way easier to take only 31 bits
<Cypi> Hel0ck : I know, but once you've got your own big_int, parsing a string to get a big_int isn't hard
<companion_cube> Cypi: but how do you add 2^63 and 2^63?
frogfoodeater has joined #ocaml
<Cypi> If you take slices of 31 bits, there isn't any problem.
<Hel0ck> ok, so each digit of my string, must to be put in each case of my array ?
Pantoufle has quit [Ping timeout: 240 seconds]
Cyanure has joined #ocaml
Yoric has quit [Ping timeout: 245 seconds]
mattrepl has quit [Quit: mattrepl]
djcoin has quit [Quit: WeeChat 0.3.9.2]
<ollehar> can I define |> for functions that takes two arguments?
<companion_cube> I'm not sure you can write infix functions with 3 args
<Cypi> let (|>) x y z = x + y + z in (1 |> 2) 3;;
<Cypi> Not really the expected syntax though
<companion_cube> maybe let (<|) f x y = f x y in ((+) <| 1) 2;;
<companion_cube> but, hmm, not very useful
yroeht has quit [Ping timeout: 256 seconds]
The_third_man has quit [Ping timeout: 256 seconds]
<wmeyer`> you could do if OCaml had a notation for that
<wmeyer`> usual Agda's example is "if _ then _ else _ "
<ollehar> let (|>) x f y = f x y
<wmeyer`> but you get the argument curried
<companion_cube> ollehar: right
<ollehar> yes, I have to use paranthesis to evaluate f...
<companion_cube> wmeyer`: for the if then else you need lazyness, don't you?
<Cypi> ollehar : isn't writing that exactly the same as "let (|>) x f = f x" actually?
<ollehar> Cypi: hm yes
<Cypi> (Well ok, it's more restrictive)
yroeht has joined #ocaml
The_third_man has joined #ocaml
<companion_cube> haskell has arrows, with special syntax, too
<companion_cube> x -< f <- y or something like this
<Cypi> ollehar : you could try something like "let (|>) x y = fun f -> f x y;;". But it's kind of weird
<Cypi> (1 |> 2) (+);;
<Cypi> hum
<wmeyer`> companion_cube: yes
<wmeyer`> I suppose some light syntactical code generation techniques would work well as Coq does
ottbot has joined #ocaml
Hel0ck has quit [Quit: Quitte]
<ollehar> it's possible to combine |> and <|
<ollehar> # newtable s |> pushindex <| "a"
<ollehar> where s = state
<ollehar> pushindex : state string
<thizanne> some library uses it I think, I don't remember which one
<ollehar> let <| f x = f x
<ollehar> common in f#, says stackoverflow :)
<companion_cube> like ($) in haskell
<thizanne> like `rather
<thizanne> let (/*) x f = f x and (*/) f x = f x in 1 /* max */ 2
<companion_cube> -_-
<companion_cube> the `` thingy would be nice in ocaml, actually
mfp has quit [Ping timeout: 248 seconds]
<thizanne> the ($) too
<thizanne> standard, I mean
<companion_cube> indeed :)
<wmeyer`> just camlp4 does some "weird" things with $ but also it does not have right precedence
<thizanne> I actually prefer the ocaml precedence
<thizanne> which allow me to use $ to separate the arguments of the function