adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org and http://caml.inria.fr | http://ocaml.org/releases/4.02.0.html | Public channel logs at http://irclog.whitequark.org/ocaml
manud has joined #ocaml
yotam is now known as Bluddy
manud has quit [Quit: manud]
darkf has joined #ocaml
ontologiae has quit [Ping timeout: 246 seconds]
AltGr has joined #ocaml
manud has joined #ocaml
zpe has joined #ocaml
ygrek has joined #ocaml
waneck has quit [Read error: No route to host]
zpe has quit [Ping timeout: 258 seconds]
WraithM has quit [Ping timeout: 272 seconds]
sheijk has quit [Ping timeout: 255 seconds]
marynate has joined #ocaml
eikke has quit [Ping timeout: 244 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
WraithM has joined #ocaml
claudiuc_ has quit [Remote host closed the connection]
malc_ has joined #ocaml
cesar has joined #ocaml
cesar is now known as Guest35279
SomeDamnBody has joined #ocaml
Guest35279 has quit [Ping timeout: 246 seconds]
manud has quit [Quit: manud]
ygrek has quit [Ping timeout: 260 seconds]
manud has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
manud has quit [Quit: manud]
alexst has joined #ocaml
alexst has quit [Client Quit]
alexst has joined #ocaml
WraithM has quit [Ping timeout: 250 seconds]
manud has joined #ocaml
SomeDamnBody has quit [Ping timeout: 272 seconds]
ygrek has joined #ocaml
ygrek has quit [Ping timeout: 258 seconds]
manud has quit [Quit: manud]
ygrek has joined #ocaml
manud has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
cesar has joined #ocaml
cesar is now known as Guest28649
ygrek_ has joined #ocaml
tnguyen1 has quit [Quit: tnguyen1]
tnguyen has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
jao has quit [Ping timeout: 240 seconds]
ygrek_ has quit [Ping timeout: 244 seconds]
ygrek has joined #ocaml
ontologiae has joined #ocaml
ontologiae has quit [Ping timeout: 260 seconds]
alexst has quit [Quit: leaving]
ygrek has quit [Ping timeout: 272 seconds]
zpe has joined #ocaml
bytbox has quit [Ping timeout: 246 seconds]
malo has quit [Remote host closed the connection]
ygrek has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
SomeDamnBody has joined #ocaml
malc_ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
arquebus has joined #ocaml
manud has quit [Quit: manud]
abbe_ has joined #ocaml
yotam has joined #ocaml
xaimus_ has joined #ocaml
rfv_ has joined #ocaml
_twx__ has joined #ocaml
msch_ has joined #ocaml
MasseR_ has joined #ocaml
AlexRussia_ has joined #ocaml
jzelinskie_ has joined #ocaml
teiresia1 has joined #ocaml
hyperbor1ean has joined #ocaml
misv_ has joined #ocaml
iorivur_ has joined #ocaml
andreypopp__ has joined #ocaml
Ptival_ has joined #ocaml
milosn_ has joined #ocaml
arquebus has quit [Quit: Konversation terminated!]
__marius______ has joined #ocaml
abbe has quit [Disconnected by services]
abbe_ is now known as abbe
zozozo_ has joined #ocaml
gustav__1 has joined #ocaml
diethyl_ has joined #ocaml
rom1504_ has joined #ocaml
bytbox has joined #ocaml
Leonidas_ has joined #ocaml
manud has joined #ocaml
stux has joined #ocaml
bitbckt_ has joined #ocaml
Bluddy has quit [*.net *.split]
struktured has quit [*.net *.split]
rfv has quit [*.net *.split]
_twx_ has quit [*.net *.split]
iorivur has quit [*.net *.split]
AlexRussia has quit [*.net *.split]
tobiasBora has quit [*.net *.split]
milosn has quit [*.net *.split]
diethyl has quit [*.net *.split]
olasd has quit [*.net *.split]
whitequark has quit [*.net *.split]
jzelinskie has quit [*.net *.split]
mekaj has quit [*.net *.split]
msch has quit [*.net *.split]
gereedy has quit [*.net *.split]
jpdeplaix has quit [*.net *.split]
hyperboreean has quit [*.net *.split]
__marius_____ has quit [*.net *.split]
andreypopp_ has quit [*.net *.split]
iZsh has quit [*.net *.split]
majoh has quit [*.net *.split]
teiresias has quit [*.net *.split]
stux|away has quit [*.net *.split]
Ptival has quit [*.net *.split]
burgobianco has quit [*.net *.split]
MasseR has quit [*.net *.split]
averell has quit [*.net *.split]
zozozo has quit [*.net *.split]
vbmithr has quit [*.net *.split]
dinosaure has quit [*.net *.split]
gustav___ has quit [*.net *.split]
gperetin has quit [*.net *.split]
esden has quit [*.net *.split]
mawuli has quit [*.net *.split]
rom1504 has quit [*.net *.split]
Asmadeus has quit [*.net *.split]
xaimus has quit [*.net *.split]
bitbckt has quit [*.net *.split]
Leonidas has quit [*.net *.split]
misv has quit [*.net *.split]
inr has quit [*.net *.split]
yotam is now known as Bluddy
rfv_ is now known as rfv
gperetin has joined #ocaml
averell has joined #ocaml
iZsh has joined #ocaml
__marius______ is now known as __marius_____
esden has joined #ocaml
vbmithr has joined #ocaml
msch_ is now known as msch
Asmadeus has joined #ocaml
darkf has quit [Read error: Connection reset by peer]
jzelinskie_ is now known as jzelinskie
andreypopp__ is now known as andreypopp_
badkins has quit []
darkf has joined #ocaml
dinosaure has joined #ocaml
tobiasBora has joined #ocaml
olasd has joined #ocaml
jpdeplaix has joined #ocaml
burgobianco has joined #ocaml
whitequark has joined #ocaml
lilred has joined #ocaml
<lilred> I'm wondering if there is a good solution for parsing unicode in Ocaml
<whitequark> Uutf
<lilred> it only does lexing though
<whitequark> huh?
<whitequark> unicode doesn't include a CFG, that would be insane
<lilred> nvm I was thinking of ulex by the same author
<whitequark> oh
<whitequark> ulex is not dbuenzli's
<lilred> o_O
iorivur_ has quit [Ping timeout: 272 seconds]
<whitequark> also it's deprecated, use sedlex instead. https://github.com/alainfrisch/sedlex
<lilred> what do you mean unicode doesn't include a CFG
<whitequark> unicode encoding can be described with a regular grammar
<whitequark> that's how ulex/sedlex implement utf8 decoding, in fact
<whitequark> oh, scratch that, they don't
<lilred> u_u
<lilred> this is all very confusing
<whitequark> sorry
<lilred> np I appreciate the help
<whitequark> can you elaborate on what were you asking initially, exactly?
<whitequark> I feel like I didn't understand your question
mawuli has joined #ocaml
_twx__ has quit [Remote host closed the connection]
inr has joined #ocaml
gereedy has joined #ocaml
<lilred> I'm doing some exploration on writing a compiler in ocaml, and I'd like the source code to be UTF-8 or similar, but Ocaml lacks first-class support for it
larhat has joined #ocaml
mekaj has joined #ocaml
<lilred> so what I'm wondering is - are there parser generators, etc. that can be made to parse unicode
<whitequark> if you use a separate lexer and parser, you can do that with sedlex and menhir
<lilred> that sounds good to me
<lilred> Forgive me, I'm pretty new at this - I'd like my compiler to report ambiguity from left to right, does this conflict with the idea of a rightmost derivation?
<lilred> ambiguity, errors, etc
<lilred> more generally I'm wondering about the impact of using a rightmost derivation for error reporting
iorivur has joined #ocaml
zpe has joined #ocaml
<whitequark> well, it's somewhat well-known that LALR(1) parser generators don't give you very good error reporting
<whitequark> in case of menhir there's merr, which gives quite a good result with minimal effort
<lilred> thanks!
<lilred> I feel like LR grammars are more popular than LL ones, any idea why?
majoh has joined #ocaml
<whitequark> tradition, I would say
<whitequark> apparently in america LR is popular and in europe it's LL
zpe has quit [Ping timeout: 250 seconds]
<lilred> that's interesting
<lilred> well thanks a lot
larhat has quit [Quit: Leaving.]
<lilred> I figure I'll probably use ulex + planck or something
<whitequark> backtracking :<
kyun has joined #ocaml
marynate has quit [Read error: Connection reset by peer]
marynate has joined #ocaml
marynate has quit [Client Quit]
marynate has joined #ocaml
bytbox has quit [Remote host closed the connection]
manud has quit [Quit: manud]
cdidd has joined #ocaml
tnguyen has quit [Ping timeout: 258 seconds]
tnguyen has joined #ocaml
jao has joined #ocaml
ontologiae has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
jao has quit [Ping timeout: 255 seconds]
ontologiae has quit [Ping timeout: 272 seconds]
taion809_ has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
bytbox has joined #ocaml
iorivur has quit [Ping timeout: 246 seconds]
AlexRussia_ has quit []
koderok has joined #ocaml
koderok has quit [Client Quit]
kyun has quit [Read error: Connection reset by peer]
kyun has joined #ocaml
kyun has quit [Ping timeout: 244 seconds]
axiles has joined #ocaml
zz_adgtl is now known as anildigital
siddharthv_away is now known as siddharthv
mcclurmc has joined #ocaml
ggole has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
marynate has quit [*.net *.split]
Asmadeus has quit [*.net *.split]
kaustuv has quit [*.net *.split]
Snark has quit [*.net *.split]
vincom2 has quit [*.net *.split]
mfp has quit [*.net *.split]
brendan has quit [*.net *.split]
IbnFirnas has quit [*.net *.split]
hbar has quit [*.net *.split]
ysz has joined #ocaml
ebzzry has quit [Ping timeout: 240 seconds]
ebzzry has joined #ocaml
marynate has joined #ocaml
mfp has joined #ocaml
brendan has joined #ocaml
vincom2 has joined #ocaml
Asmadeus has joined #ocaml
kaustuv has joined #ocaml
Snark has joined #ocaml
hbar has joined #ocaml
IbnFirnas has joined #ocaml
ysz has quit [Quit: This computer has gone to sleep]
MercurialAlchemi has joined #ocaml
iorivur has joined #ocaml
Guest28649 has quit [Remote host closed the connection]
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 260 seconds]
ygrek has quit [Ping timeout: 255 seconds]
samrat has joined #ocaml
samrat has quit [Client Quit]
samrat has joined #ocaml
iorivur_ has joined #ocaml
iorivur has quit [Ping timeout: 260 seconds]
anildigital is now known as zz_anildigital
ontologiae has joined #ocaml
Submarine has joined #ocaml
Submarine has joined #ocaml
ontologiae has quit [Ping timeout: 250 seconds]
darkf_ is now known as darkf
WraithM has joined #ocaml
zpe has joined #ocaml
ysz has joined #ocaml
MercurialAlchemi has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 250 seconds]
MercurialAlchemi has joined #ocaml
oscar_toro has joined #ocaml
cesar_ has joined #ocaml
hhugo has joined #ocaml
cesar_ is now known as Guest10168
Guest10168 has quit [Ping timeout: 272 seconds]
MercurialAlchemi has quit [Quit: Lost terminal]
MercurialAlchemi has joined #ocaml
zpe has joined #ocaml
Ptival_ is now known as Ptival
<kaustuv> Anyone else get warnings about dev-repo whenever you do opam update?
divyanshu has joined #ocaml
Submarine has quit [Remote host closed the connection]
larhat has joined #ocaml
ygrek has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 272 seconds]
<kaustuv> [ppx] What am I doing wrong here? http://pastebin.com/zyyRJJm3
MercurialAlchemi has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
dsheets_ has quit [Ping timeout: 245 seconds]
hhugo has quit [Quit: Leaving.]
eikke has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
tianon has quit [Ping timeout: 272 seconds]
zpe has quit [Ping timeout: 245 seconds]
tianon has joined #ocaml
<flux> I seem to recall that there were some issues with PPX and toplevel, there was some mantis bug about that with the hopes that it would be integrated to 4.02.1
<flux> but I don't really recall if the issue was what you're facing
teiresia1 has quit [Changing host]
teiresia1 has joined #ocaml
teiresia1 is now known as teiresias
divyanshu has quit [Quit: Computer has gone to sleep.]
divyanshu has joined #ocaml
divyanshu has quit [Client Quit]
<AltGr> kaustuv, what warning exactly ?
samrat has quit [Quit: Computer has gone to sleep.]
samrat has joined #ocaml
araujo has quit [Ping timeout: 240 seconds]
tane has joined #ocaml
kakadu has joined #ocaml
Leonidas_ is now known as Leonidas
jao has quit [Ping timeout: 272 seconds]
pyon has quit [Ping timeout: 240 seconds]
araujo has joined #ocaml
divyanshu has joined #ocaml
nojb has joined #ocaml
dsheets has joined #ocaml
Simn has joined #ocaml
ontologiae has joined #ocaml
vogler has joined #ocaml
octachron has joined #ocaml
ontologiae has quit [Ping timeout: 250 seconds]
lordkryss has joined #ocaml
tani has joined #ocaml
tane has quit [Ping timeout: 244 seconds]
Bluddy has quit [Quit: Connection closed for inactivity]
cesar_ has joined #ocaml
cesar_ is now known as Guest23297
<Unhammer> OCalm
<Unhammer> oh oh title idea for whoever is writing the batteries-version of RWO:
<Unhammer> Little Book of OCaml
<Unhammer> "A serene introduction to …"
siddharthv is now known as siddharthv_away
zpe has joined #ocaml
<dmbaturin> Someone should write "The little ocamler".
MercurialAlchemi has quit [Ping timeout: 245 seconds]
Guest23297 has quit [Ping timeout: 272 seconds]
<Unhammer> The little ocaml that could
jonludlam has joined #ocaml
MercurialAlchemi has joined #ocaml
pyon has joined #ocaml
<tani> RWO is a good book, even you use batteries :)
<tani> +if
<Unhammer> true, I just wish there were more examples online of batteries-usage
<dmbaturin> tani: It happened to be my first ocaml book, and its coreness was confusing because I had no idea what core is at the time.
<tani> well, afair they explained that at the beginning
<Unhammer> it is a bit hard to tell throughout the book what requires Core and what does not
<Unhammer> perhaps a good and up-to-date "batteries vs core (vs plain ocaml) would help
<tani> yeah
<Unhammer> (what is the term for not using batteries/core/extlib?)
<reynir> Masochist? ;)
kakadu has quit [Ping timeout: 246 seconds]
<kaustuv> flux: yeah, it seems that there is some magic #ppx directive needed for ppx_deriving to work. Anyway I can't seem to figure it out.
<kaustuv> I guess I can wait until the documentation for ppx is written
<Unhammer> reynir, haha :)
<Unhammer> well, plain ocaml (guess I'll call it that) does give smaller binaries so I guess it has its pros
Thooms has joined #ocaml
tianon has quit [Quit: brb]
tianon has joined #ocaml
marynate has quit [Ping timeout: 244 seconds]
<Unhammer> if I do something like "Map.Make(…)" – can I add a function to my newly Make'd module afterwards?
<def`> module M = struct include Map.Make(…) let what'i'added = 42 end
AlexRussia has joined #ocaml
<Unhammer> oh sweet
<Unhammer> thanks, def` :)
iorivur_ has quit [Ping timeout: 244 seconds]
iorivur has joined #ocaml
siddharthv_away is now known as siddharthv
<AlexRussia> how to do in ocaml thing simular to 'x % 2' in C?
<adrien> "mod"
<adrien> builtin operator
<AlexRussia> ok
srcerer has joined #ocaml
srcerer_ has quit [Ping timeout: 272 seconds]
marynate has joined #ocaml
<AlexRussia> hm
<AlexRussia> things like 'a list -> 'a list -> 'a list
<AlexRussia> means function take 2 lists type a and return one list type a?
<companion_cube> yes
<companion_cube> lists of elements of type 'a
<companion_cube> e.g., (@) (append) has this type
<AlexRussia> so, everything except last thing is arguments of function, right?
<companion_cube> kind of, yes
<companion_cube> it's sugar for 'a list -> ('a list -> 'a list)
<AlexRussia> hm
<companion_cube> a binary function is just a unary function, that returns a unary function
<AlexRussia> companion_cube: @_@
<companion_cube> :D
<companion_cube> that's the essence of currying
<AlexRussia> companion_cube: i've read about currying
<AlexRussia> companion_cube: Curry Haskell, yep?
<companion_cube> yes
<AlexRussia> no, Haskell isn't my favorite language which i've tried to understand :/
<dmbaturin> Did Haskell Curry have a middle name? We could use it to name something else. ;)
<AlexRussia> dmbaturin: lol
<companion_cube> dmbaturin: :D
<AlexRussia> dmbaturin: yep, it should be father name, yep? after that we could use father middle name and last name etc etc ;)
<AlexRussia> dmbaturin: last if it different
<dmbaturin> Sometimes it's quite arbitrary.
<AlexRussia> D:
<companion_cube> AlexRussia: Haskell isn't the only language with currying though
<AlexRussia> names my Grandmother and my father was same and my mom say my name is about GM, not father :D trolling trolling trolling
<AlexRussia> companion_cube: thanks to explain me it :D
<AlexRussia> has*
<companion_cube> I didn't do anything, currying is something you learn yourself ;)
<AlexRussia> companion_cube: @_@
<AlexRussia> companion_cube: hm
<dmbaturin> AlexRussia: Do "let f (x, y) = x + y" and look at the type signature. Compare to the type signature of "let f x y = x + y".
<companion_cube> well, think a while about a -> (b -> c) and a -> b -> c :p
<AlexRussia> companion_cube: its interesting, function love take two arguments and return one, but....its too could be curring? @_@
<companion_cube> sorry, which function?
<AlexRussia> companion_cube: love
<AlexRussia> companion_cube: :D
<companion_cube> I'm not sure it's defined in OCaml :p
<AlexRussia> companion_cube: its something like man -> (man -> man) :D
<companion_cube> it could be human -> (human -> bool), love doesn't have to be exclusive !
<AlexRussia> wait
<AlexRussia> oh
<companion_cube> a binary relation
<dmbaturin> AlexRussia: To make it return anything, it should be 'f human -> 'm human -> 'a human
<AlexRussia> then love(human) return love(human) which return bool?
<AlexRussia> dmbaturin: 'f and 'm scared me :P
ygrek_ has joined #ocaml
<dmbaturin> Or you can have 'm human -> 'm human -> () and 'f human -> 'f human -> ()
<AlexRussia> dmbaturin: its seems like 'f can be male and female same time ;)
<dmbaturin> Well, list can be a list of ints or a list of floats.
<dmbaturin> So stuff like List.map has 'a list in its signatures.
<AlexRussia> lol
<AlexRussia> dmbaturin: so, ' mean list?
<dmbaturin> No, 'a ('b, ...) is "type variable".
<AlexRussia> okay
<companion_cube> love : [`male|`female] human -> [`female|`male] human -> bool
<dmbaturin> 'a list is "list of anything of type 'a". A concrete type could be "int list", or "float list", or...
<companion_cube> anyway, AlexRussia, I'd suggest you start with more conventional functions :p
<AlexRussia> does we have come function for get random?
<dmbaturin> On a side note, those 'a, 'b, ... are commonly pronounced and written in TeX as alpha, beta, ...
<AlexRussia> companion_cube: convention in which sense? 'm + 'f instead of 'm and 'm or 'f and 'f?
ygrek has quit [Ping timeout: 260 seconds]
<AlexRussia> dmbaturin: @_@
<dmbaturin> So if you see something like "α list" in a textbook, its ASCII version is 'a list.
<companion_cube> AlexRussia: I mean with functions on integers, lists, etc.
<reynir> Haskell Curry's middlename is Brooks, apparently
<AlexRussia> companion_cube: ah :D
<dmbaturin> reynir: Brb, writing a Brooks compiler. :)
<AlexRussia> reynir: Brooks....sounds like street
<reynir> dmbaturin: make it a php-- compiler for the giggles :D
koderok has joined #ocaml
<AlexRussia> if i come to like this language, maybe i will write something like that https://github.com/denisshevchenko/ohaskell
<AlexRussia> hm
<AlexRussia> how to i could write many commands in things like if-else?
<AlexRussia> for me is not to clean here like in C :D
<dmbaturin> reynir: PHP--?
<dmbaturin> AlexRussia: If you want a sequence, if ... then begin foo; bar; baz; end
<AlexRussia> dmbaturin: what mean begin word?
<AlexRussia> keyword*
<dmbaturin> If you want a composition, you can use the |> operator, or do nested binding (let foo = 1 in let bar = 2 in foo + bar).
<dmbaturin> begin means just what it says. It's pretty much the same to { } in C.
<dmbaturin> foo x |> bar | baz is just a sugar for baz( bar( foo x)) of course.
<AlexRussia> okay
sheijk has joined #ocaml
<AlexRussia> hm
<AlexRussia> i guess some time ago i asked about funtion to get access to random!
<dmbaturin> There's "let foo = 1 and bar = 2" binding form too. The main difference is that it allows mutually recursive definitions.
<dmbaturin> let () = Random.self_init () ;; Random.rand_int 42 ;;
<AlexRussia> val int : int -> int
<AlexRussia> Random.int bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0 and less than 230.
<AlexRussia> oh
<AlexRussia> lol
<AlexRussia> idk why, in browser i see 2 instead 230
ontologiae has joined #ocaml
<dmbaturin> It's actually 2^30
<AlexRussia> ah
<AlexRussia> 2^30
<AlexRussia> lol
<AlexRussia> its written too much bad by default :/
Thooms has quit [Quit: WeeChat 1.0.1]
<AlexRussia> hm
<AlexRussia> could list include other list?
<dmbaturin> Sure. 'a list list
<dmbaturin> [[1;2]; [3;4]]
<AlexRussia> could i define local variable(into function) with same name as function argument?
cesar_ has joined #ocaml
<dmbaturin> Sure. let f f = f + f ;;
cesar_ is now known as Guest52942
iorivur has quit [Ping timeout: 260 seconds]
<AlexRussia> hm
<AlexRussia> dmbaturin: help me understand my mistake please!
<AlexRussia> let rec gen_row bound =
<AlexRussia> let x = bound+1 in
<AlexRussia> if x > 0 then (Random.int x) + 1 :: gen_row (bound-1)
<AlexRussia> else [];;
<AlexRussia> why gen_row 1;; return list size 2?
<AlexRussia> i want i
<AlexRussia> 1*
<asmanur_> because 1+1 is 2
<AlexRussia> ?
<AlexRussia> ou
<AlexRussia> lol
<def`> asmanur_: prove it!
<asmanur_> reflexivity.
<rks`> #party-hard
<asmanur_> why do you do bound + 1 AlexRussia ?
<def`> I feel there is some reduction involved inbetween
<AlexRussia> hm
<AlexRussia> i guess i am stupid :D
<dmbaturin> Proof. simple. reflexivity. Qed.
Guest52942 has quit [Ping timeout: 245 seconds]
<AlexRussia> i want to get random number between 1...bound(... mean include bound in range)
oscar_toro has quit [Ping timeout: 272 seconds]
<asmanur_> dmbaturin: the simpl is not needed as Coq will normalize the types before applying reflexivity
<dmbaturin> Good point.
iorivur has joined #ocaml
<AlexRussia> that's just:
<AlexRussia> let rec gen_row bound =
<AlexRussia> if bound > 0 then (let rand = Random.int (bound + 1) in if rand = 0 then 1 else rand) :: gen_row (bound-1)
<AlexRussia> else [];;
<AlexRussia> dammit, it seems really fun
<Unhammer> is there a common idiom for where you want to map through a list but have access to both the first and second element? (not that it's hard to let rec, just wondering)
nojb has quit [Ping timeout: 250 seconds]
<AlexRussia> Unhammer: who you're asking? :)
badon has quit [Ping timeout: 272 seconds]
<AlexRussia> strange
<AlexRussia> i use after this gen_row(renamed to gen_columns) in gen_rows and i got wrong thing: [] at the end of list :/
samrat has quit [Quit: Computer has gone to sleep.]
samrat has joined #ocaml
AltGr has left #ocaml [#ocaml]
<AlexRussia> oh
<AlexRussia> i got just wrong logic i think
<AlexRussia> hm
<AlexRussia> dmbaturin: can i have variable which save value between recursive calls?
<dmbaturin> You can use references, but before that try making it an additional argument and passing it around.
ggole has quit [Ping timeout: 240 seconds]
<AlexRussia> dmbaturin: lol, idk why, but it anyway insert list in the end of list, even if i want to have sth like http://en.wikipedia.org/wiki/Special:Search?go=Go&search=1,2,3
<AlexRussia> lol
<AlexRussia> dmbaturin: lol, idk why, but it anyway insert list in the end of list, even if i want to have sth like [ [1,2,3] ]
<AlexRussia> dmbaturin: haha
<AlexRussia> dmbaturin: i've got it, its cause i return [ [ ] ] in else(bound less than zero) and that fun
bjorkintosh has joined #ocaml
ggole has joined #ocaml
kaustuv has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
tani has quit [Quit: Verlassend]
_andre has joined #ocaml
Plazma has quit [Remote host closed the connection]
Plazma has joined #ocaml
hhugo has joined #ocaml
MercurialAlchemi has quit [K-Lined]
badon has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
koderok has quit [Quit: koderok]
samrat has quit [Quit: Computer has gone to sleep.]
<flux> FoCaLiZe seems interesting. saying this as someone who hasn't quite found the time to get onto Coq :-)
nojb has joined #ocaml
oscar_toro has joined #ocaml
badon has quit [Ping timeout: 255 seconds]
<dmbaturin> flux: What is it?
<flux> it's a programming language from where you can extract both ocaml programs and Coq proofs
<flux> not completely automatically, though, but it looks like it's less of an effort than to use Coq directly
<flux> Coq on the other hand is a proof assistant, it helps you to prove statements
<flux> in this case it's used for checking the proofs generated by the FoCaLiZe pipeline
divyanshu has joined #ocaml
hhugo has quit [Quit: Leaving.]
<dmbaturin> I tried to read the "Software foundations" but it only caused massive headache. :)
<flux> try aspirin :)
<dmbaturin> I tried "Certified programming with dependent types" instead.
koderok has joined #ocaml
siddharthv is now known as siddharthv_away
<dmbaturin> Part of the problem, of course, is that my formal CS education didn't exactly suck, but it didn't include any of those topics either.
jonludlam is now known as jonludlam^lunch
samrat has joined #ocaml
larhat has quit [Read error: No route to host]
larhat1 has joined #ocaml
BitPuffin has joined #ocaml
hhugo has joined #ocaml
hhugo has quit [Ping timeout: 246 seconds]
<gasche> dmbaturin: moving from "Software Foundations" to the CPDT cannot be a good strategy if you want to minimize headaches
<gasche> you must perservere with Software Foundations, it is the most beginner-friendly material on Coq
<gasche> CPDT, on the contrary, is quite advanced and it's unreasonable to attack it before mastering the main parts of SF
divyanshu has quit [Quit: Computer has gone to sleep.]
<gasche> if you want to try verified programming without the proof assistants parts, you should look at Why3 as well
<gasche> (but if you want to learn about really formal proofs, the use of *some* proof assistant is a must-have)
divyanshu has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest79840
ygrek_ has quit [Ping timeout: 272 seconds]
<dmbaturin> gasche: I think I should get back to software foundations for the rest of material. First chapters of CPDT sort of reduced the WTF feeling though.
<gasche> I would bet that's a second-encounter effect and not really related to the respective content of the two books
<dmbaturin> Hhm, good point, that's possible.
<gasche> (not that I think any ill of CPDT; it's an excellent book, for more advanced and/or highly autonomous users)
SomeDamnBody has quit [Ping timeout: 240 seconds]
hhugo has joined #ocaml
hhugo has quit [Client Quit]
Guest79840 has quit [Ping timeout: 250 seconds]
<dmbaturin> gasche: The funniest part is that my encounter with software foundations was absolutely random. Moreover, it was before I started with ocaml.
Thooms has joined #ocaml
<dmbaturin> (And ocaml is the first functional language I started actively using)
Thooms has quit [Client Quit]
<dmbaturin> Sometimes blindly following links people share gives you shock sites, or software foundations, or other things you wouldn't find on your own. :)
Thooms has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
divyanshu has quit [Quit: Computer has gone to sleep.]
bytbox has quit [Remote host closed the connection]
tane has joined #ocaml
<gasche> knowing a bit about statically typed functional programming definitely helps to work with dependently-typed proof assistants
sepp2k has joined #ocaml
ontologiae has quit [Ping timeout: 244 seconds]
igstan has joined #ocaml
ygrek_ has joined #ocaml
darkf has quit [Quit: Leaving]
badkins has joined #ocaml
Thooms has quit [Ping timeout: 260 seconds]
ysz has quit [Quit: This computer has gone to sleep]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
SethTisue has joined #ocaml
nojb has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
avsm has joined #ocaml
bytbox has joined #ocaml
divyanshu has joined #ocaml
koderok has quit [Quit: koderok]
sheijk has quit [Quit: .]
ontologiae has joined #ocaml
Thooms has joined #ocaml
fraggle-boate has quit [Remote host closed the connection]
Thooms has quit [Client Quit]
koderok has joined #ocaml
samrat has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
fraggle-boate has joined #ocaml
shinnya has joined #ocaml
SethTisue has quit [Quit: SethTisue]
bytbox has quit [Remote host closed the connection]
SethTisue has joined #ocaml
koderok has quit [Quit: koderok]
ontologiae has quit [Ping timeout: 244 seconds]
thomasga has joined #ocaml
jonludlam^lunch is now known as jonludlam
tnguyen has quit [Ping timeout: 240 seconds]
_5kg has quit [Read error: Connection reset by peer]
cesar_ has joined #ocaml
cesar_ is now known as Guest54598
SethTisue has quit [Quit: SethTisue]
samrat has quit [Quit: Computer has gone to sleep.]
<ollehar> gasche: such a pitty there's no physical copy of SF
Guest54598 has quit [Ping timeout: 246 seconds]
ygrek_ has quit [Ping timeout: 240 seconds]
lordkryss has joined #ocaml
<whitequark> Drup: yay, all my patches accepted to findlib
<whitequark> now I only need 4.02 :]
Thooms has joined #ocaml
<whitequark> 4.02.1*
<rks`> so you're the kind of guy making us recompile all our opam packages
<rks`> alright
<whitequark> rks`: you won't have to, after opam 1.2
<rks`> wow, ok
<rks`> (cool)
<whitequark> depends: ["ocamlfind" {build}
<rks`> and err, what are your patches against findlib about?
<whitequark> I added OCAMLFIND_TOOLCHAIN env variable that is equivalent to -toolchain, to aid cross compilling
<rks`> ok
<whitequark> and I added some moderately obscure ppxopt mechanism to META files
<whitequark> so that the expressive power of ppx extension packages is on par with camlp4
<whitequark> like, I would have a package "ppx_deriving_json" ( requires = "ppx_deriving" ppxopt = "ppx_deriving,./ppx_deriving_json.cma" )
<whitequark> and package "ppx_deriving" ( ppx = "./ppx_deriving" )
<whitequark> so ppx_deriving_json would add another argument to the invocation of ppx_deriving
samrat has joined #ocaml
amirmc has joined #ocaml
mcclurmc has joined #ocaml
<reynir> is there an example of how to use ppx_deriving with ocamlbuild?
thomasga has quit [Quit: Leaving.]
<Drup> foo.ml : package(ppx_deriving)
bytbox has joined #ocaml
morphles has joined #ocaml
ollehar has quit [Ping timeout: 260 seconds]
<reynir> I get "Unrecognized [@@deriving] annotation syntax"
<reynir> Oh
<reynir> show should be Show
<whitequark> reynir: sorry, ppx_deriving is in a bit of a transition period right now. I will make a new release very soon™
<AlexRussia> can i am define function with dynamic length of arguments?
<whitequark> yes, in 0.3 it's Show
ygrek_ has joined #ocaml
<AlexRussia> something like int foo(...) {/* ... */ return 0;} in C
<Drup> AlexRussia: maybe, but probably not what you will want, and it's complicated.
<AlexRussia> Drup: but that may be recursive! :D
thomasga has joined #ocaml
igstan has quit [Quit: igstan]
<reynir> whitequark: OK, thanks. I got it working for now. :)
ggole has quit [Ping timeout: 260 seconds]
araujo has quit [Ping timeout: 240 seconds]
<whitequark> ooooooo
<whitequark> "We have the pleasure of announcing the release of OCaml version 4.02.1. This is all about speed: not only this release fixes a large slowdown in the compiler, but today is also the anniversary of the first time a man broke the sound barrier with an airplane.
ggole has joined #ocaml
araujo has joined #ocaml
Bluddy has joined #ocaml
zpe has quit [Remote host closed the connection]
<companion_cube> whitequark: can you say "now I only need 5.00.0 :]" just to check something?
<whitequark> now I only need 5.00.0
roelof has joined #ocaml
<roelof> Hello, Is this (http://ocaml-book.com ) a good book for a absolute beginner ?
oscar_toro has quit [Ping timeout: 250 seconds]
<companion_cube> whitequark: aww, didn't work
<companion_cube> maybe it's because you forgot the ":]"
<smondet> roelof: yes, I've heard good feedback from beginners (but they had some prog experience in some other language like python or JS)
<whitequark> now I only need 5.00.0 :]
<roelof> smondet: thanks, Im looking the whole day for a good book with exercises
bytbox has quit [Remote host closed the connection]
<roelof> smondet: which step or book can I follow after the book that im now following
marynate has quit [Quit: Leaving]
<reynir> Ah, ppx_deriving_yojson is strict
<whitequark> reynir: what do you mean?
cesar has joined #ocaml
<whitequark> companion_cube: still doesn't work
<companion_cube> yes, too bad :/
<whitequark> what was it supposed to be?
<companion_cube> I really wanted modular implicits! ^^
cesar is now known as Guest66967
<whitequark> lol
<companion_cube> trigger a mail from Damien to announce the OCaml version you wished for
ysz has joined #ocaml
<companion_cube> it worked like 1 hour ago!
<whitequark> oooooh
<whitequark> :D
<reynir> whitequark: "Objects are deserialized strictly; that is, all keys in the object have to correspond to fields of the record." :)
<companion_cube> for a while I thought you were a OCaml release wizard :)
ollehar has joined #ocaml
<reynir> Unfortunately, I have to deal with a web service that may add additional fields any time :/
<whitequark> reynir: well, yeah. I suppose I could add an option for that.
Guest66967 has quit [Ping timeout: 260 seconds]
<whitequark> reynir: you'll have to wait a bit, so that I could sort out the 4.02.1-related stuff
<reynir> No problem at all! :)
<roelof> anyone else who knows a good book for a beginner with exercises ??
<Drup> roelof: real world ocaml ?
<whitequark> ^
<roelof> Drup : Does that one has exercises. I did not find them , That's why I know read this book (http://ocaml-book.com/ )
<reynir> I kind of liked Jason Hickey's book
<smondet> roelof: you saw that: http://ocaml.org/learn/books.html ?
<reynir> but it's somewhat old, I guess
<Drup> don't know about exercises, but you can find lot's of them on http://ocaml.org/learn/tutorials/99problems.html
larhat1 has quit [Quit: Leaving.]
<smondet> Jason Hickey's content was supposed to be merged into RWO, dunno how much that happened
<roelof> smondet: yes, I saw that page. But I find it hard to find out which one are for beginners and which one not
divyanshu has quit [Quit: Computer has gone to sleep.]
<smondet> (I did those in, like, 2004 … feeling young)
<roelof> thanks
<roelof> enough to do the next few weeks
thomasga has quit [Ping timeout: 260 seconds]
<whitequark> Drup: !!!!!
<whitequark> Reintegrate-merge constructors_with_record5 branch.
<whitequark> git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15556 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
<Drup> !
<Drup> wooo
<whitequark> crap, now I want 4.03.
<whitequark> truly, there is no bliss in software
oscar_toro has joined #ocaml
bytbox has joined #ocaml
tnguyen has joined #ocaml
divyanshu has joined #ocaml
ysz has quit [Quit: This computer has gone to sleep]
roelof has quit [Quit: Page closed]
amirmc has quit [Quit: Leaving.]
ontologiae has joined #ocaml
ysz has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
tnguyen has quit [Ping timeout: 240 seconds]
ontologiae has quit [Ping timeout: 245 seconds]
bytbox has quit [Ping timeout: 258 seconds]
mort___ has joined #ocaml
zpe has joined #ocaml
jwatzman|work has joined #ocaml
divyanshu has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 240 seconds]
mcclurmc has joined #ocaml
Anarchos has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
kakadu has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
vogler has quit [Ping timeout: 258 seconds]
<Bluddy> whitequark: opam to the rescue!
octachron has quit [Quit: Leaving]
zpe has joined #ocaml
<ggole> We record constructors now?
<ggole> Or soon?
shinnya has quit [Ping timeout: 255 seconds]
<Bluddy> it's in trunk
ollehar has quit [Ping timeout: 244 seconds]
* ggole tries
thomasga has joined #ocaml
srcerer has quit [Quit: ChatZilla 0.9.90.1 [Firefox 32.0.2/20140917194002]]
ysz has quit [Quit: This computer has gone to sleep]
tnguyen has joined #ocaml
ysz has joined #ocaml
slash^ has joined #ocaml
<ggole> Delicious.
srcerer has joined #ocaml
<whitequark> I want to try it :<
ysz has quit [Quit: This computer has gone to sleep]
mort___ has quit [Ping timeout: 255 seconds]
malo has joined #ocaml
eikke has quit [Ping timeout: 258 seconds]
<ggole> whitequark: so try it, opam switch makes it easy
<whitequark> ggole: it's just that at least five people need my immediate attention
<ggole> Oh, right. Stupid real life.
ontologiae has joined #ocaml
<Bluddy> just tried it. pretty cool.
<Bluddy> but utop doesn't build, so you have to use ocaml toplevel to play with it
cesar has joined #ocaml
<whitequark> I'll fix utop in a moment
cesar is now known as Guest43247
<maurer> How do I set ocamlfind's libdir priority? It seems to be prefering /usr/lib over /usr/local/lib, and I'd like to reverse that behavior
<whitequark> there is findlib.conf
<maurer> I've got path="/usr/local/lib/ocaml/4.01.0:/usr/lib/ocaml:/usr/lib/ocaml/METAS"
<maurer> which I thought would make ocamlfind query foo return foos from the first path first
<maurer> but it doesn't seem to be doing so
Guest43247 has quit [Ping timeout: 272 seconds]
<maurer> (it's returning a /usr/lib/ocaml path, which is the system version rather than the patched version)
<whitequark> maybe the direction is wrong?
<ggole> Hmm, doesn't seem to work for exceptions: things are a bit different than Frisch's original blog post
<whitequark> ggole: it was *heavily* changed
<ggole> Guess I should poke around for the discussion thread
<whitequark> hhhahahaha
<maurer> whitequark: I changed it to /usr/local/lib/ocaml/4.01.0:/usr/lib/ocaml:/usr/lib/ocaml/METAS:/usr/local/lib/ocaml/4.01.0
<whitequark> the letters mantis sends me are like a kilometer long
<maurer> whitequark: still no dice
<ggole> Still, almost everything I want is there ♥
<whitequark> ggole: what's not there?
<whitequark> records?
<whitequark> maurer: can you strace it?
<ggole> And the t.A type stuff
<maurer> whitequark: that was how I found ocamlfind.conf in the first place :P
<maurer> but yeah, I'll look
<maurer> ...and I found the issue
<maurer> the guy patching it silently switched from foo-bar as a package name to foo_bar
<maurer> >_>
<maurer> sorry for bothering you
<whitequark> sure, no problem
<ggole> Ah, the good old trivial-name-change-in-the-back.
<ggole> Never see it coming.
ygrek_ has quit [Ping timeout: 240 seconds]
<whitequark> gasche: ping
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
tristero has quit [Read error: Connection reset by peer]
Thooms has quit [Quit: WeeChat 1.0.1]
<Leonidas> 4.02.1 installed and guess what, Core fails to build
<companion_cube> so surprising
<Leonidas> I suppose I need to sacrifice a goat or something.
mcclurmc has joined #ocaml
<Bluddy> ggole: the t.A type stuff was deemed too complex/controversial and was dropped
dsheets has quit [Ping timeout: 255 seconds]
<Bluddy> for the sake of integration, the proposal was simplified
ggherdov has quit [Ping timeout: 260 seconds]
<companion_cube> what's t.A ?
<whitequark> the type of record embedded in the constructor A of variant type t
<companion_cube> oh, ok
dwoos has quit [Ping timeout: 260 seconds]
AlexRussia has quit [Ping timeout: 240 seconds]
AlexRussia has joined #ocaml
dwoos has joined #ocaml
mcclurmc has quit [Ping timeout: 255 seconds]
ollehar has joined #ocaml
mcclurmc has joined #ocaml
bitbckt_ is now known as bitbckt
bitbckt has quit [Changing host]
bitbckt has joined #ocaml
thomasga has quit [Quit: Leaving.]
ontologiae has quit [Ping timeout: 260 seconds]
ggherdov has joined #ocaml
vfoley- has quit [Ping timeout: 240 seconds]
thomasga has joined #ocaml
<Unhammer> hmm, tried porting a program from python to ocaml to see if I could get a speed-up – pretty much the same code (where the bottleneck is a hash table iteration) performs 1.15x better in ocaml than pypy on my 64-bit xubuntu laptop, 1.15x worse in ocaml than pypy on a 32-bit ubuntu server
<Unhammer> (conclusion: upgrade the server to 64-bit? heh)
<whitequark> interesting
<whitequark> is pypy's hash table implemented in python?
<Unhammer> what I read is that they implement the pypy interpreter in python and then have a general python-to-C compiler for all of their stuff
<ggole> It's a meta-tracing thing with a bunch of strange layers
<ggole> Very interesting approach
<whitequark> yeah, it's not as simple as that
<whitequark> very interesting indeed
<whitequark> I wish Topaz (Ruby on PyPy) would have survived
<Unhammer> (for comparison, standard python2 is 4.1x slower than pypy on the same code)
<whitequark> Unhammer: you're benchmarking the C hash table impl in CPython though, so it's not very relevant
<whitequark> if surprising
<whitequark> OCaml has Hashtbl implemented in OCaml.
<ggole> My incomplete understanding is that you write an interpreter in a subset of Python called RPython, and they have tooling to compile that into a JIT compiler that is generated C.
<ggole> And the JIT compiler has a bunch of runtime specialisation machinery to make data structures less awful than they are in CPython.
<whitequark> they also seem to have pretty powerful on-stack replacement stuff
<whitequark> which was the most impressive part for me
<whitequark> like unboxing that can be deoptimized when needed
<ggole> Allocation sinking?
<whitequark> yeah
<ggole> That's just a special case of PRE as I understand it.
<Leonidas> I suppose I need to sacrifice a goat or something.
<ggole> Not really particular to JITs
<Leonidas> sorry, mistyped
<ggole> (Probably particularly *useful* for JITs that are running dynamic langs, though)
<whitequark> PRE?
<ggole> Partial redundancy elimination... you know what loop invariant code motion is?
<Unhammer> o__O
<whitequark> yeah, I know about LICM. never heard about PRE though
<ggole> You take an operation that is available everywhere in the loop as the same value and hoist it above the loop
<ggole> Allocation sinking is the inverse operation: you take code that is useless everywhere in the loop (the allocation) and sink it below the loop
<whitequark> oh
<whitequark> no, it's not like that
<ggole> PRE is basically both of those things at once.
<whitequark> I mean when you have, say, a class and you unbox it and put it on stack (or even in registers) as its constituent ivars
<whitequark> and then some fucker does eval() and you see, whoa, you need the class back.
<ggole> Yes, that's allocation sinking.
<whitequark> ah.
<whitequark> I see.
<ggole> It's really nice, but you don't need a JIT for it.
<whitequark> you need a JIT to deopt, don't you?
<whitequark> or well, you could just add slow paths everywhere
<whitequark> but that absolutely explodes your code size
<ggole> Yes, so if you want to change your code based on various assumptions, then you need a JIT and deopt and all of that stuff.
<ggole> But PRE/sinking/hoisting are orthogonal to that.
<whitequark> I see your point, yes
<ggole> Sinking is related in that deopt is going to require those values in their most conservative forms, eg, everything in memory in nice objects as the programmer specified them.
<ggole> So JIT compilers with deopt are particularly motivated to implement that.
ollehar has quit [Ping timeout: 245 seconds]
manizzle has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
yomimono has joined #ocaml
ollehar has joined #ocaml
MercurialAlchemi has joined #ocaml
wwilly has joined #ocaml
WraithM has quit [Ping timeout: 240 seconds]
ontologiae has joined #ocaml
SethTisue has joined #ocaml
samrat has quit [Ping timeout: 250 seconds]
macdice has joined #ocaml
tnguyen has quit [Ping timeout: 260 seconds]
cesar has joined #ocaml
tane has quit [Quit: Verlassend]
cesar is now known as Guest51018
Guest51018 has quit [Ping timeout: 240 seconds]
claudiuc has joined #ocaml
claudiuc has quit [Read error: Connection reset by peer]
claudiuc has joined #ocaml
SethTisue has quit [Quit: SethTisue]
tac_ has joined #ocaml
vfoley- has joined #ocaml
manud has joined #ocaml
tnguyen has joined #ocaml
yomimono has quit [Ping timeout: 272 seconds]
ggole has quit []
malo has quit [Remote host closed the connection]
axiles has quit [Remote host closed the connection]
MercurialAlchemi has quit [Ping timeout: 258 seconds]
morphles has quit [Ping timeout: 258 seconds]
jonludlam has quit [Ping timeout: 260 seconds]
Hannibal_Smith has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
lordkryss has quit [Quit: Connection closed for inactivity]
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
Hannibal_Smith has quit [Quit: Sto andando via]
lordkryss has joined #ocaml
_andre has quit [Quit: leaving]
<Leonidas> are there known issues with gprof and ocaml 4.02.1?
<Leonidas> my executable runs for ~10 seconds, yet gprof displays cumulative times of 0.01s
manud has quit [Quit: manud]
ollehar has quit [Quit: ollehar]
<whitequark> try `perf record` instead
fraggle-boate has quit [Read error: No route to host]
<Leonidas> that seems to work much better
<Leonidas> but that does not display which functions were called and how often. meh, profiling sucks
<Drup> Leonidas: "perf report"
<Leonidas> Drup: that only displays the "overhead", command, shared obj and symbol
<Leonidas> not the callcounts or cumulative time
<whitequark> perf is a sampling profiler
<whitequark> it doesn't have a precise callcount, much less cumulative time
<Drup> Leonidas: if you want the callgraph, compile your code with the opam switch -fp
<Leonidas> okay, then I want gprof, but without the odd results
<Leonidas> ah!
<Drup> "+fp" in fact
<Drup> it should exist for all compiler since 4.00.0
fraggle-boate has joined #ocaml
<Leonidas> Drup: wait, you don't mean 4.02.1+fp?
<Drup> yes, I do
<Leonidas> okay, because this doesn't exist
<Leonidas> need to go with 4.01.0+fp
<Drup> maybe the 4.02.1+fp was not done yet
<Leonidas> 4.02.0+fp neither
<Drup> hum, weird, should do a pr on opam-repo for that
<Leonidas> not a problem atm, I'll just go with 4.01.0
<Drup> Leonidas: it's quite easy to compile on your own, it's just an option to add when compiling the compiler
jonludlam has joined #ocaml
<Leonidas> First I'll try the existing compiler and if that helps me with debugging, I'll do a PR
mcclurmc has quit [Read error: Connection reset by peer]
manud has joined #ocaml
<Drup> it allows to get the call graph in perf, that's all
mcclurmc has joined #ocaml
<Leonidas> perf or gprof?
<Drup> perf
zpe has quit [Remote host closed the connection]
<Drup> gprof already got the callgraph
zpe has joined #ocaml
<Leonidas> that looks… incorrect
nojb has joined #ocaml
<Drup> gprof is not precise, yes :)
<Drup> (that's why you want to use perf instead :p)
<Leonidas> the issue I have is that my code is a some orders of magnitude slower than similar Python code, which is rather surprising
<Drup> indeed
zpe has quit [Ping timeout: 250 seconds]
SomeDamnBody has joined #ocaml
bytbox has joined #ocaml
BitPuffin has quit [Ping timeout: 255 seconds]
dav_ has joined #ocaml
nojb has quit [Ping timeout: 240 seconds]
sepp2k has quit [Quit: Konversation terminated!]
manud has quit [Quit: manud]
manud has joined #ocaml
dav_ has quit [Quit: leaving]
gereedy has quit [Ping timeout: 260 seconds]
jao has quit [Ping timeout: 272 seconds]
oriba has joined #ocaml
thomasga has quit [Quit: Leaving.]
avsm has quit [Quit: Leaving.]
tnguyen has quit [Ping timeout: 240 seconds]
manud has quit [Quit: manud]
badon has joined #ocaml
cesar has joined #ocaml
cesar is now known as Guest50614
tnguyen has joined #ocaml
<Drup> :|
Guest50614 has quit [Ping timeout: 272 seconds]
<whitequark> Drup: um, well, yes.
<whitequark> LLVM went full C++11.
<whitequark> imagine you had to target OCaml 3.00 today and you will understand.
<Drup> oh, I understand
Submarine has quit [Remote host closed the connection]
<Drup> the annoying part is that ... well, llvm 3.5 is on the system, we don't need gcc, and I'm not going to compile llvm
<Drup> I'm just compiling the binding.
<whitequark> well, make it compile with clang!
kakadu has quit [Quit: Konversation terminated!]
<Drup> jpdeplaix: you heard the man. :p
<Drup> whitequark: how do I modify the opam package to do that ? :p
<whitequark> ./configure CC=clang CXX=clang++
<jpdeplaix> Drup: I'm currently doing that
<Drup> oh
<Drup> then the configure script is really bitching for nothing
<jpdeplaix> well, requiring clang is painful
<jpdeplaix> it requires a new dependency
<Drup> when you have llvm installed, not really
<jpdeplaix> and we don't need that because it compiles only the ocaml part
<Drup> no C stubs that uses ~fancy~ features ?
<jpdeplaix> Drup: nope, it can come without clang
<jpdeplaix> I don't thing so
<jpdeplaix> and it's C, not C++
<Drup> jpdeplaix: ping me when you have a package with the gcc check disabled and I will try
jonludlam has quit [Quit: Coyote finally caught me]
eikke has joined #ocaml
Simn has quit [Quit: Leaving]
madroach has quit [Ping timeout: 250 seconds]
WraithM has joined #ocaml
madroach has joined #ocaml
oscar_toro has quit [Ping timeout: 258 seconds]
eikke has quit [Ping timeout: 240 seconds]
<Leonidas> what can I use if I want to divide two big_ints/Z.t?
<Leonidas> I mean, to get something with arbitrary precision, that is.
<Drup> Z.div ?
<Leonidas> Drup: but that returns an integer value?
<Drup> well, a Z.t, but yes, it's integer division
<Drup> if you want more than an integer, well, cast to a Q.t
<Leonidas> oh, there is Q. Great
<Drup> (there is even Q.(///) that takes two Z.t and produce a Q.t)
<Leonidas> yep, that's nice.
<Leonidas> but it doesn't seem to be able to print a float value :-(
<Drup> zarith is great with local open
<Leonidas> yeah, I'll test it, it might be faster than Big_int, too
<Drup> it is
<Drup> because "small" ints are represented as machine integers
<Drup> so operation on small ints have barely any overhead
<Drup> the only annoying thing is that undef (0/0) is a value
<Drup> it's not gonna raise an exception on undef. I think that's a big mistake :/
darkf has joined #ocaml
mcclurmc has quit [Remote host closed the connection]