adrien 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/
darkf has joined #ocaml
emmanuelux has quit [Quit: emmanuelux]
emmanuelux has joined #ocaml
emmanuelux has quit [Quit: emmanuelux]
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 255 seconds]
ulfdoz_ is now known as ulfdoz
ontologiae has joined #ocaml
mattrepl has quit [Quit: mattrepl]
tane has quit [Quit: Verlassend]
caligula_ has joined #ocaml
caligula__ has quit [Ping timeout: 246 seconds]
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
ahokaomaeha has joined #ocaml
ontologiae has quit [Ping timeout: 245 seconds]
yacks has joined #ocaml
q66 has quit [Quit: Quit]
mattrepl has joined #ocaml
pango_ has joined #ocaml
pango has quit [Ping timeout: 264 seconds]
travisbrady has quit [Quit: travisbrady]
<ollehar> Skolem: You don't have to declare it, it's infered.
<Skolem> I know… but I'm learning and wanted to explicitly declare the types to make sure I had it right.
<Skolem> Thank you though.
ollehar has quit [Ping timeout: 252 seconds]
ahokaomaeha has quit [Ping timeout: 276 seconds]
mattrepl has quit [Quit: mattrepl]
mattrepl has joined #ocaml
tane has joined #ocaml
Yoric has joined #ocaml
mattrepl has quit [Quit: mattrepl]
ahokaomaeha has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
tane has quit [Quit: Verlassend]
Skolem_ has joined #ocaml
Skolem_ has quit [Client Quit]
Skolem has quit [Ping timeout: 245 seconds]
cdidd has joined #ocaml
tac has joined #ocaml
yacks has quit [Remote host closed the connection]
tac has quit [Ping timeout: 245 seconds]
gnuvince has quit [Ping timeout: 248 seconds]
Yoric has joined #ocaml
Kakadu has joined #ocaml
axiles has joined #ocaml
Yoric has quit [Ping timeout: 276 seconds]
nimred has quit [Quit: leaving]
cfy has joined #ocaml
yacks has joined #ocaml
ttamttam has joined #ocaml
mye has joined #ocaml
Yoric has joined #ocaml
<orbitz> If I have a string that represents the byte value sof a float, how can I construct a float from it
<julm> orbitz: hmm, Int32.float_of_bits on an int32 constructed with String.get and lsl/lor/land ?
<orbitz> julm: ocaml doesn't ahve 64(63) bit floats?
<orbitz> ah, Core's Int64 has float_of_bits, thanks!
ttamttam has left #ocaml []
ollehar has joined #ocaml
gour has joined #ocaml
osa1 has joined #ocaml
<osa1> I'm looking for implementations of row polymorphic type inferencers, does anyone know any ?
leoncamel has joined #ocaml
tcsc has joined #ocaml
mye has quit [Quit: mye]
srcerer has joined #ocaml
srcerer_ has quit [Ping timeout: 256 seconds]
<Kakadu> My oasis configure scripts can't find correct ocaml executable. http://paste.in.ua/8010/#9 Have you ever seen same behaviour?
mye has joined #ocaml
Yoric has quit [Remote host closed the connection]
Yoric has joined #ocaml
milosn has quit [Ping timeout: 244 seconds]
srcerer has quit [Ping timeout: 252 seconds]
srcerer has joined #ocaml
<Kakadu> or maybe you can say something useful about this error message?
milosn has joined #ocaml
ollehar has quit [Ping timeout: 255 seconds]
osa1 has quit [Ping timeout: 256 seconds]
mye_ has joined #ocaml
mye has quit [Ping timeout: 252 seconds]
mye_ is now known as mye
gour has quit [Disconnected by services]
gour_ has joined #ocaml
ollehar has joined #ocaml
SanderM has joined #ocaml
gour_ is now known as gour
ttamttam has joined #ocaml
q66 has joined #ocaml
ttamttam has quit [Remote host closed the connection]
tane has joined #ocaml
tcsc has quit [Quit: computer sleeping]
Anarchos has joined #ocaml
ontologiae has joined #ocaml
anderse has joined #ocaml
anderse has quit [Quit: anderse]
cfy` has joined #ocaml
cfy has quit [Ping timeout: 264 seconds]
mye has quit [Quit: mye]
nimred has joined #ocaml
Icarot has joined #ocaml
Kakadu has quit []
Icarot has quit [Client Quit]
Icarot has joined #ocaml
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
cfy` is now known as cfy
cfy has quit [Changing host]
cfy has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
Icarot has quit [Remote host closed the connection]
Yoric has quit [Ping timeout: 246 seconds]
axiles has quit [Ping timeout: 248 seconds]
gour has left #ocaml []
ftrvxmtrx has quit [Quit: Leaving]
ftrvxmtrx has joined #ocaml
axiles has joined #ocaml
<orbitz> how come opam needs its own special ocamlfind?
<avsm> a long and painful story. there's no reliable way to override the env variables
<avsm> consider a port which overrides one param, but doesnt pass through the OPAM overrides either
mattrepl has joined #ocaml
<orbitz> ah
* orbitz just trying to figure out how to get nix and opam to play nice
<orbitz> i've sorted out most things, only thing left is i'm getting annoying warnings:
<orbitz> findlib: [WARNING] Package dynlink has multiple definitions in /home/mmatalka/.nix-profile/lib/ocaml/3.12.1/site-lib/dynlink/META, /home/mmatalka/.opam/system/lib/dynlink/META
<orbitz> not a show stopper , just annoying
<orbitz> holy moly that was an annoying bug to find
<orbitz> reefininig (+) while using bitstring!
<adrien> :D
<orbitz> what are ones option when dealing with unsigned 32bit and 64bit integers in Ocaml/Core?
<adrien> how many of them?
<adrien> actually I thought bigarray did unsigned for 32bit and 64bit too
<orbitz> single ones, I'm writing some code to handle protobufs wire protocol and it supports unsigned 32bit and 64bit values
<adrien> I think there's a library on the ocaml forge that should help you
<orbitz> ok
emmanuelux has joined #ocaml
darkf has quit [Quit: Leaving]
<mfp> hmm, if you have several threads, the finalizer attached to a value with Gc.finalise can be run in any of them (since it's invoked when a major GC run is performed), right?
<mfp> if that holds, isn't Lwt_gc.finalise quite dangerous? you could end up running code in the Lwt monad outside the main thread
travisbrady has joined #ocaml
<mfp> seems to me it's pretty easy to run into deadlocks when you have any non-trivial finalizer that acquires a lock, since the caml runtime lock should be held while the GC run is being performed (no preemption in the middle of a finalizer, I assume)
Yoric has joined #ocaml
Cyanure has joined #ocaml
Kakadu has joined #ocaml
<avsm> orbitz: you might find cstruct useful. github.com/mirage/ocaml-cstruct
andreypopp has joined #ocaml
andreypopp has quit [Excess Flood]
andreypopp has joined #ocaml
andreypopp has quit [Excess Flood]
andreypopp has joined #ocaml
andreypopp has quit [Excess Flood]
andreypopp has joined #ocaml
ollehar has quit [Ping timeout: 255 seconds]
andreypopp has quit [Excess Flood]
<adrien> I wonder if his internet connection ever worked
ollehar has joined #ocaml
<adrien> actually it's definitely working but he floods freenode and gets kicked
<mfp> after a look at the sources, I'm fairly sure some of the above was wrong: finalisers can be preempted
<mfp> the issue wrt lwt threads remains, though
<pippijn> adrien: popp*
<pippijn> ah
<pippijn> you fixed it
ttamttam has joined #ocaml
Anarchos has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 264 seconds]
gnuvince has joined #ocaml
ftrvxmtrx has joined #ocaml
Yoric has quit [Ping timeout: 276 seconds]
Yoric has joined #ocaml
cfy has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
Yoric has quit [Ping timeout: 246 seconds]
ftrvxmtrx has quit [Ping timeout: 264 seconds]
<Reventlov> Hello
<Reventlov> One of my function output a big num: <num 1234823696260717036961083297157374589511909122373996737448195351996056752390891239022838543147/7625888691733961111322034614285898328196636383584381506752606466887629787704926403090445101059>
<Reventlov> but when I try to pass this big num to another function, I get:
<Reventlov> Error: Integer literal exceeds the range of representable integers of type int
<adrien> that's a compile-time error iirc; how's the code?
<Reventlov> well, I use the interpreter
<Reventlov> Can I dcc you the whole code ?
<Reventlov> (it's ugly)
<adrien> Reventlov: not over dcc please :P
<adrien> any pastebin website
<adrien> that makes it visible to others too
<Reventlov> ok :D
<Reventlov> yeah, I know
<adrien> woah, you know you don't have to write everything on a single line
anderse has joined #ocaml
<Reventlov> what ?
<Reventlov> oh, the decompresse part
<Reventlov> (I hope not the whole code is on a single line)
<adrien> not a single line, no
<adrien> but not many either
<adrien> a "when" clause??
<adrien> what are you coding in?
<adrien> ah, no, sorry
<adrien> I really need to rest
* adrien misthought as "where"...
<Qrntz> that looks rather… unusual
<adrien> first, you don't need to put spaces around function arguments
<Reventlov> it's the arithmetic compression
<adrien> write "f 2" instead of "f(2)"
<Reventlov> well, ok
pango_ is now known as pango
<adrien> but, yeah, anyway, the integer you've input is too big
<adrien> that's, well
<Reventlov> but but but
<Reventlov> the integer I've input is the output of another programm
<adrien> but this is code: you're feeding something to the ocaml compiler
<Reventlov> and, well, not really an integer, it's a "num" (the other programm output num, and this one take num)
<Reventlov> yes
<Reventlov> I'm feeding a num, no ?
<adrien> I need to check some syntax stuff
<adrien> I don't think <num 0> is valid
<adrien> that's how it's prett-printed
ttamttam has quit [Quit: ttamttam]
<adrien> not how it can be input
ttamttam has joined #ocaml
<Reventlov> oh. ok.
anderse has quit [Quit: anderse]
<adrien> first, instead of <num 0>, why not do:
<adrien> let zero = num_of_int 0
<adrien> decompress [| zero; zero; ... |]
<adrien> as for your big fraction, you need to find a way to send its output value to the input of decompresse with something else than copy-paste
<adrien> typically, a variable
<Reventlov> maybe i can use Num.num_of_string
<adrien> that would work too, yes
ftrvxmtrx has joined #ocaml
Snark has joined #ocaml
emmanuelux has quit [Ping timeout: 245 seconds]
mcclurmc has quit [Read error: Operation timed out]
Yoric has joined #ocaml
jamii has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
emmanuelux has joined #ocaml
anderse has joined #ocaml
Yoric has joined #ocaml
anderse has quit [Quit: anderse]
Kakadu has quit [Quit: Konversation terminated!]
sysopfb has joined #ocaml
anderse has joined #ocaml
sysop_fb has quit [Ping timeout: 245 seconds]
trep has joined #ocaml
sysopfb has quit [Ping timeout: 276 seconds]
trep is now known as sysop_fb
ahokaomaeha has joined #ocaml
Kakadu has joined #ocaml
<Kakadu> Any ideas how to fix error about generaliation? http://paste.in.ua/8014/raw/
<thelema> Kakadu: give an explicit type if you don't want it to be polymorphic
<thelema> s/want/need/
<Kakadu> heh. how?
<Kakadu> I've tried `let (_: Parser.meth) = meth in` without success
<Kakadu> 2nd element of the pair is typed correctly, but 1st dont
ttamttam has left #ocaml []
yacks has quit [Quit: Leaving]
ahokaomaeha has quit [Ping timeout: 256 seconds]
ppseafield has joined #ocaml
ahokaomaeha has joined #ocaml
ollehar has quit [Ping timeout: 240 seconds]
emmanuelux has quit [Ping timeout: 256 seconds]
Snark has quit [Quit: Quitte]
tac has joined #ocaml
SanderM has quit [Remote host closed the connection]
emmanuelux has joined #ocaml
Guest80781 has joined #ocaml
Guest80781 has quit [Quit: Guest80781]
cdidd has quit [Remote host closed the connection]
Cyanure has quit [Ping timeout: 264 seconds]
axiles has quit [Quit: Quitte]
Yoric has quit [Ping timeout: 252 seconds]
Kakadu has quit []
tac has quit [Quit: Page closed]
ottbot has joined #ocaml
<orbitz> Why is 'assert false' special cased?
darinmorrison has joined #ocaml
jamii has quit [Ping timeout: 260 seconds]
<pippijn> orbitz: because it can be used to return 'a
<pippijn> like raise
<orbitz> but I can't turn it off
<pippijn> hmm
<pippijn> what about assert (not true)?
<pippijn> # assert (not true);;
<pippijn> - : unit = ()
ppseafield has quit [Quit: Leaving.]
mattrepl has quit [Quit: mattrepl]
mcclurmc has joined #ocaml
<orbitz> weeee, pb support coming along
<pippijn> pb?
<orbitz> protobufs
<pippijn> ah
<pippijn> you're making it?
<orbitz> yes
<pippijn> nice
<orbitz> all i could find for ocaml was something called 'piq' which was way more complicated than what I wanted
<orbitz> with bitstring it's not so bad, mostly it's a matter of adding reasonable APIs on top
<Anarchos> orbitz what are you looking for ?
<orbitz> Anarchos: protobuf support
<pippijn> orbitz: I made a perl-style pack/unpack
<pippijn> using camlp4
<pippijn> type-safe scanf style
<orbitz> pippijn: oh nice, i have only used camlp4 never written for it
<orbitz> pippijn: sexy
<pippijn> it's a very simple and small module, but very useful for binary protocols
<pippijn> it doesn't do sub-bytes, though
<pippijn> unlike bitstring
<orbitz> bitstring is a lot of fun, coming from Erlang
<thelema> orbitz: assert false is different from assert(condition)
<thelema> orbitz: assert false means that always when this is reached, it will fail
Zerker has joined #ocaml
mattrepl has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
mattrepl has quit [Client Quit]
Zerker has quit [Remote host closed the connection]
tane has quit [Quit: Verlassend]
fasta has quit [Remote host closed the connection]
fasta has joined #ocaml
ontologiae has quit [Ping timeout: 256 seconds]
Zerker has joined #ocaml
Zerker has quit [Client Quit]
<ousado> pippijn: do you have a github repo?
mattrepl has joined #ocaml
gnuvince has quit [Ping timeout: 256 seconds]
caligula_ has quit [Read error: Connection reset by peer]
caligula_ has joined #ocaml
pm_ has joined #ocaml
<pm_> I have been using ocaml for literally ones of hours and have a question: If I define:
<pm_> # type 'a asdf = 'a * int ;;
<pm_> can I (ignoring "should I") force an expression to be recognized as this type? I tried:
<pm_> ((3.14,1):asdf);;
<pm_> but was told "Error: The type constructor asdf expects 1 argument(s), but is here applied to 0 argument(s)"
<pm_> This 'asdf' type won't automatically be used, since:
<pm_> # (3.14,1) ;;
<thizanne> ((3.14, 1) : float asdf)
<pm_> - : float * int = (3.14, 1)
<pm_> Thanks thizanne. I see that it works, now I'll go and find out why.
<thizanne> pm_: do you know lists ?
<pm_> A bit, I think: their literal representation ([1;2;3]), how to destructure them (first::rest) in pattern matching...
<thizanne> and hat is the yype of [1; 2; 3] ?
<thizanne> what is the type*
<pm_> int list