adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Current MOOC: https://huit.re/ocamlmooc | OCaml 4.04.0 release notes: http://ocaml.org/releases/4.04.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
richi235 has quit [Ping timeout: 268 seconds]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
average has quit [Ping timeout: 245 seconds]
average has joined #ocaml
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
somenick has joined #ocaml
ryanartecona has joined #ocaml
eh_eff has quit [Ping timeout: 276 seconds]
nomicflux has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
average has quit [Quit: leaving]
somenick has quit [Quit: Page closed]
average has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
shinnya has joined #ocaml
ryanartecona has joined #ocaml
nullcatxxx_ has quit [Ping timeout: 268 seconds]
spew has quit [Ping timeout: 240 seconds]
ryanartecona has quit [Quit: ryanartecona]
eh_eff has joined #ocaml
nomicflux has quit [Quit: nomicflux]
nomicflux has joined #ocaml
eh_eff has quit [Ping timeout: 276 seconds]
wagle has quit [Read error: Connection reset by peer]
wagle has joined #ocaml
nomicflux has quit [Quit: nomicflux]
hashpuppy has quit [Quit: Connection closed for inactivity]
jao has quit [Ping timeout: 240 seconds]
nomicflux has joined #ocaml
nomicflux has quit [Quit: nomicflux]
spew has joined #ocaml
shinnya has quit [Ping timeout: 276 seconds]
_whitelogger has joined #ocaml
_whitelogger has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
kamog has quit [Remote host closed the connection]
<keep_learning> During the compilation ( ocamlbuild -package ppx_deriving.std -use-menhir main.native
<keep_learning> )
<keep_learning> I am getting Error: Unbound value show_bool
<keep_learning> Could some one please tell me what is wrong with this. I remember doing something like in this in past and it worked https://github.com/mukeshtiwari/Compilers/blob/master/whileinterocaml/main.ml#L19
<smondet[m]> keep_learning: can you try with the `-use-ocamlfind` option of ocamlbuild?
kamog has joined #ocaml
eh_eff has joined #ocaml
infinity0 has joined #ocaml
MercurialAlchemi has joined #ocaml
eh_eff has quit [Ping timeout: 240 seconds]
ryanartecona has quit [Quit: ryanartecona]
<keep_learning> smondet[m]: Thank you.
ryanartecona has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 260 seconds]
<keep_learning> I think it is more or less related to similar name of Ocaml list ? https://ocaml.org/learn/tutorials/common_error_messages.html
<keep_learning> Any idea how to resolve this
p_nathan has quit [Read error: Connection reset by peer]
shinnya has joined #ocaml
p_nathan has joined #ocaml
richi235 has joined #ocaml
MercurialAlchemi has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
richi235 has quit [Ping timeout: 276 seconds]
AlexDenisov has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
eh_eff has joined #ocaml
<keep_learning> Any idea about how to do this in Ocaml
eh_eff has quit [Ping timeout: 276 seconds]
spew has quit [Quit: foobar]
TarVanimelde has joined #ocaml
TarVanimelde has quit [Client Quit]
NJBS has joined #ocaml
Simn has joined #ocaml
nullcatxxx_ has joined #ocaml
NJBS has quit [Quit: Catastrophic failure.]
nullcatxxx_ has quit [Ping timeout: 255 seconds]
nullcatxxx_ has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nullcatxxx_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AlexDenisov has joined #ocaml
eh_eff has joined #ocaml
freusque has joined #ocaml
eh_eff has quit [Ping timeout: 240 seconds]
sheijk_ has joined #ocaml
sheijk has quit [Ping timeout: 264 seconds]
aggelos__ has quit [Ping timeout: 264 seconds]
aggelos_ has joined #ocaml
AltGr has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<keep_learning> Hi everyone,
<keep_learning> I am kind to stuck with this problem and could not figure out any solution https://gist.github.com/mukeshtiwari/78531fefaf1b4d77ea8b26bad57fb1c9
<keep_learning> Any hint would be great help given the fact that I am new to OCaml
<keep_learning> Please leave your comment in gist link
<keep_learning> Thank you
alqatari has joined #ocaml
<def`> keep_learning: you have to write by hand let show_cound show_cand = function ...
AlexDenisov has joined #ocaml
<keep_learning> and ppx_deriving would take my show_cand as printing function for type 'cand ballot = 'cand -> nat ?
<def`> yes
<keep_learning> def`: Thank you very much
<def`> (it is syntactic, if the function has the same name it will be picked)
richi235 has joined #ocaml
alqatari has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mengu has joined #ocaml
mfp has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eh_eff has joined #ocaml
eh_eff has quit [Ping timeout: 240 seconds]
l1x has quit [Remote host closed the connection]
vinoski has quit [Remote host closed the connection]
sz0 has quit [Read error: Connection reset by peer]
banjiewen has quit [Remote host closed the connection]
strmpnk has quit [Remote host closed the connection]
vinoski has joined #ocaml
l1x has joined #ocaml
strmpnk has joined #ocaml
banjiewen has joined #ocaml
sz0 has joined #ocaml
kamog has quit [Remote host closed the connection]
AlexDenisov has joined #ocaml
<orbifx[m]> How is everyone today?
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<orbifx[m]> How does one join https://github.com/orgs/ocaml/people ?
<Drup> why would you want to join it ? you don't need to to contribute
<orbifx[m]> Just wondering what it represents, what it's goal is.
<orbifx[m]> Is it a loose group of ocamlers, or is it core developers?
<Drup> it's mostly admin stuff
<Drup> it's not related to either core devs or contributions, just who administrates the github org
<orbifx[m]> Ok. I was interested in contributing more in the community and those trying to cultivate it.
<Drup> there are lot's of ways to do that, contributing to the website for example :)
<orbifx[m]> Any guides?
alqatari has joined #ocaml
<Drup> I'm not sure, it should be on the github or the website itself
<orbifx[m]> k
<orbifx[m]> Any significant performance differences between prerr_endline and fprintf?
<adrien> for a constant string I guess?
<def`> buffering
<def`> prerr_endline causes a flush at each call, with fprintf it is explicit
eh_eff has joined #ocaml
<orbifx[m]> adrien: I'm contructing a string from a couple of other strings
<orbifx[m]> def`: let's say I use %! in fprintf
<orbifx[m]> basically, what's a faster concatenator to output? if there 2-3 string parameters
eh_eff has quit [Ping timeout: 240 seconds]
<def`> If I had to guess, I would say fprintf can do some batching that manual concatenation cannot.
<def`> But 1) minor gc is so fast that allocating small string is free
<def`> 2) The context switched involved in writing to output is magnitude order higher
<orbifx[m]> reasonable
<orbifx[m]> thanks def`
_andre has joined #ocaml
struk|desk has joined #ocaml
AlexDenisov has joined #ocaml
struk|desk has quit [Client Quit]
struk|desk has joined #ocaml
average has quit [Ping timeout: 245 seconds]
average has joined #ocaml
alfredo has joined #ocaml
nomicflux has joined #ocaml
balod has quit [Remote host closed the connection]
sepp2k has joined #ocaml
kakadu has joined #ocaml
nomicflux has quit [Quit: nomicflux]
oo6 has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AlexDenisov has joined #ocaml
yomimono has joined #ocaml
miggsd has joined #ocaml
eh_eff has joined #ocaml
sh0t has joined #ocaml
eh_eff has quit [Ping timeout: 260 seconds]
tobiasBora has quit [Ping timeout: 258 seconds]
Fistine has quit [Ping timeout: 260 seconds]
MercurialAlchemi has quit [Ping timeout: 268 seconds]
sh0t has quit [Remote host closed the connection]
sh0t has joined #ocaml
miggsd has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tobiasBora has joined #ocaml
Fistine has joined #ocaml
sh0t has quit [Remote host closed the connection]
hashpuppy has joined #ocaml
pzp has joined #ocaml
sh0t has joined #ocaml
<rixed_> Hello! Is there a way to print the address of an object without resorting to C?
<rixed_> Was expecting to find that in Obj but can't find it.
<thizanne> doesn't (Obj.magic foo) : int do that ?
<_y> i would try casting to int via Obj.magic
<def`> let cast x = let addr : int = Obj.magic x in let x = Nativeint.of_int addr in Nativeint.mul x 2n;;
<thizanne> (with maybe some shifting to get the pointer bit right)
jmct has quit [Ping timeout: 264 seconds]
nahra has quit [Remote host closed the connection]
<rixed_> Oh ok. So I guess obj.magic will but the int bit then?
nahra has joined #ocaml
ome has quit [Ping timeout: 264 seconds]
shakalaka has quit [Ping timeout: 264 seconds]
riveter has quit [Ping timeout: 264 seconds]
dave_tucker has quit [Ping timeout: 264 seconds]
strmpnk has quit [Ping timeout: 276 seconds]
<_y> yes, Obj.magic does nothing but fooling the type system
banjiewen has quit [Ping timeout: 276 seconds]
trevorriles_ has quit [Ping timeout: 255 seconds]
ziyourenxiang has joined #ocaml
tautologico has quit [Ping timeout: 255 seconds]
gomjabbar_ has joined #ocaml
GomJabbar has quit [Ping timeout: 264 seconds]
littleli has quit [Ping timeout: 264 seconds]
grandy___ has quit [Ping timeout: 255 seconds]
rjungemann has quit [Ping timeout: 255 seconds]
pote_ has quit [Ping timeout: 268 seconds]
S11001001 has quit [Ping timeout: 264 seconds]
vodkaInferno has quit [Ping timeout: 264 seconds]
n4323 has quit [Ping timeout: 258 seconds]
<Drup> rixed_: what do you want to use it for ? :p
kandu has quit [Ping timeout: 240 seconds]
yunxing has quit [Ping timeout: 264 seconds]
strmpnk has joined #ocaml
riveter has joined #ocaml
sheijk_ has quit [Ping timeout: 268 seconds]
n4323 has joined #ocaml
vodkaInferno has joined #ocaml
sheijk has joined #ocaml
ome has joined #ocaml
kandu has joined #ocaml
vinoski has quit [Ping timeout: 276 seconds]
banjiewen has joined #ocaml
oo6 has quit [Quit: Leaving]
tane has joined #ocaml
groovy2shoes has quit [Ping timeout: 255 seconds]
pote_ has joined #ocaml
<rixed_> Drup: just debugging
<rixed_> (as I'm using == here and there, I want to check my assumptions)
trevorriles_ has joined #ocaml
dave_tucker has joined #ocaml
vinoski has joined #ocaml
rjungemann has joined #ocaml
grandy___ has joined #ocaml
shakalaka has joined #ocaml
yomimono has quit [Ping timeout: 276 seconds]
spew has joined #ocaml
groovy2shoes has joined #ocaml
yomimono has joined #ocaml
yunxing has joined #ocaml
jmct has joined #ocaml
tautologico has joined #ocaml
al-damiri has joined #ocaml
jao has joined #ocaml
gomjabbar_ has quit [Changing host]
gomjabbar_ has joined #ocaml
gomjabbar_ is now known as GomJabbar
Fistine has quit [Ping timeout: 255 seconds]
MercurialAlchemi has joined #ocaml
tobiasBora has quit [Ping timeout: 255 seconds]
tobiasBora has joined #ocaml
richi235 has quit [Ping timeout: 258 seconds]
ojmb has joined #ocaml
<ojmb> Flushing stdout seems to place cursor on a new line. Anyway to avoid this?
<companion_cube> did you print a newline?
<ojmb> No
<companion_cube> weird
alqatari has quit [Quit: Textual IRC Client: www.textualapp.com]
<companion_cube> are you in the toplevel?
<ojmb> no
<companion_cube> wiht http://vrac.cedeela.fr/truc.ml , when I `ocaml truc.ml`, the flush does not return to a newline
jack5638 has quit [Ping timeout: 240 seconds]
alqatari has joined #ocaml
<ojmb> Ok. Thanks. The problem: I was flushing by using Format.printf "@."
ryanartecona has joined #ocaml
jack5638 has joined #ocaml
Fistine has joined #ocaml
<companion_cube> ah!
<companion_cube> @? for only flushing
<ojmb> Interesting. Many Thanks
<companion_cube> no pb
<companion_cube> rixed_: you know that objects can move in memory, right? :)
jabroney has joined #ocaml
<mrvn> I always use %! for flushing
<companion_cube> not with format
alfredo has quit [Quit: Textual IRC Client: www.textualapp.com]
<mrvn> no, Printf.printf "show this line now%!"
<companion_cube> yeah
<companion_cube> useful for progress bars and the likes
<mrvn> carefull, Microsoft has patents on them :)
<companion_cube> :D
<companion_cube> I don't indicate ETA by sampling /dev/random
<companion_cube> so it's fine
<Drup> companion_cube: %! also work with format
<companion_cube> really??
<Drup> hum, actually, it's not exactly the same thing
<Drup> " @?: flush the pretty printer as with print_flush (). This is equivalent to the conversion %!."
<Drup> but it's represented slightly differently in the format type, weird
<Drup> Ah, so that printf doesn't recognize @?, right
<companion_cube> I think @? also closes the boxes
<Drup> %! too
<companion_cube> oh!
<Drup> it's equivalent, really
maarhart_ has joined #ocaml
copy` has joined #ocaml
maarhart_ has quit [Ping timeout: 255 seconds]
<rixed_> companion_cube: yes I do know objects move in memory. That's fine, as long as the GC updates all the ref atomically :)
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fraggle_ has quit [Read error: Connection reset by peer]
AlexDenisov has joined #ocaml
fraggle_ has joined #ocaml
peddie has left #ocaml ["WeeChat 1.7"]
eh_eff has joined #ocaml
richi235 has joined #ocaml
pzp has quit [Quit: Connection closed for inactivity]
S11001001 has joined #ocaml
littleli has joined #ocaml
ziyourenxiang has quit [Quit: Leaving]
ryanartecona has quit [Quit: ryanartecona]
AltGr has left #ocaml [#ocaml]
nullcatxxx_ has joined #ocaml
jack5638 has quit [Ping timeout: 276 seconds]
jack5638 has joined #ocaml
micro_ has joined #ocaml
micro_ is now known as Guest51477
Guest51477 is now known as `micro
ryanartecona has joined #ocaml
srcerer_ is now known as srcerer
ryanartecona has quit [Quit: ryanartecona]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alqatari has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Leonidas> why can't optional params at the end of a function not be discarded? From the labeled lambda paper the rule seems to be easy.
<Leonidas> "discard any ? params from the head of a type"
ryanartecona has joined #ocaml
yomimono has quit [Ping timeout: 255 seconds]
<Drup> what do you mean ?
<flux> leonidas, well, how then would you pass the function as a parameter then?
<mrvn> Leonidas: how should ocaml know wether you want to discard it or curry it?
<flux> s/ then//2
<Leonidas> flux: it needs at least one parameter to be applied, so whenever it is passed as an argument it wouldn't need to fill up the ? params with None but pass as-is
<Leonidas> mrvn: it would always discard them on application when they are at the front.
<mrvn> Leonidas: let x = [f; g; h]; Should it discard them or not?
<Leonidas> that works in ocaml but only if you flip the order of n and ?base and since the paper is written by the same people who implemented it
<Leonidas> mrvn: no, since none of these functions are being applied
<Leonidas> mrvn: in let x = [f y; g y; h y] then yes
<flux> hmm, let x = [f ~zoops:not_default_value; g; h] would then apply f fully?
<Drup> Leonidas: I think it uses the opposite criteria than OCaml's, that's all
<Leonidas> flux: according to the paper, it would apply f till the first non-labeled argument, so any ?args would be None.
<mrvn> Leonidas: what if I don't want them discarded? What if I want a (?int -> float) list?
zaquest has quit [Quit: Leaving]
<Leonidas> mrvn: that's just not possible then, so you'd need a unit argument at the front, just as you need one now at the back.
<Leonidas> (or any other non-optional argument of course)
<Leonidas> I'm just wondering why they chose to do it this way, since it seems a bit inelegant
<mrvn> Leonidas: you would also need one at the back to apply something to it
<mrvn> or at least have one somethere in there
<mrvn> Leonidas: An arg at the end lets you arange the optional / labeles args any way you want while your way would require non optional args before optional args.
<Leonidas> yeah, the downside of having it in the front would be weird behaviour, as in unit -> ?int -> float being aplied a () would result in float directly
zaquest has joined #ocaml
yomimono has joined #ocaml
<mrvn> Leonidas: what about unit -> ?int -> 'a? Where 'a can be (?int -> unit). Does that give 'a or unit?
<mrvn> polymorphic functions wouldn't know how many args to apply.
<mrvn> actually in your way there never could ba a (?int -> unit)
<mrvn> In ocamls way that only gives a warning
<mrvn> never mind, your way could have that too.
<mrvn> anyway. I would find it odd that " unit -> ?int -> ..." would require the int arg to be applied before the unit.
TheLemonMan has joined #ocaml
ojmb has quit [Ping timeout: 260 seconds]
sh0t has quit [Ping timeout: 260 seconds]
strykerkkd has joined #ocaml
sh0t has joined #ocaml
alqatari has joined #ocaml
larhat has joined #ocaml
zpe has joined #ocaml
slash^ has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 255 seconds]
sh0t has quit [Ping timeout: 240 seconds]
larhat has quit [Quit: Leaving.]
Simn has quit [Ping timeout: 260 seconds]
nullcatxxx_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Madars has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
eh_eff has quit [Ping timeout: 240 seconds]
moei has quit [Quit: Leaving...]
larhat has joined #ocaml
jabroney1 has joined #ocaml
jabroney has quit [Ping timeout: 255 seconds]
Simn has joined #ocaml
eh_eff has joined #ocaml
nullcatxxx_ has joined #ocaml
eh_eff has quit [Ping timeout: 276 seconds]
slash^ has quit [Read error: Connection reset by peer]
jnavila has joined #ocaml
zpe has quit [Remote host closed the connection]
ryanartecona has quit [Quit: ryanartecona]
nullcatxxx_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ryanartecona has joined #ocaml
bronsen has quit [Remote host closed the connection]
Simn has quit [Read error: Connection reset by peer]
Simn has joined #ocaml
sh0t has joined #ocaml
sh0t has quit [Ping timeout: 255 seconds]
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
larhat has quit [Client Quit]
jnavila has quit [Remote host closed the connection]
eh_eff has joined #ocaml
sh0t has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
ia0 has quit [Quit: reboot]
ia0 has joined #ocaml
nullcatxxx_ has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
sepp2k has quit [Quit: Leaving.]
strykerkkd has quit [Quit: Leaving]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
_andre has quit [Quit: leaving]
tane has quit [Quit: Leaving]
spew has quit [Ping timeout: 276 seconds]
nullcatxxx_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ojmb has joined #ocaml
sillyotter has joined #ocaml
nullcatxxx_ has joined #ocaml
mengu has quit [Remote host closed the connection]
nullcatxxx_ has quit [Client Quit]
zpe has joined #ocaml
sillyotter has quit [Quit: WeeChat 1.4]
moei has joined #ocaml
zaquest has quit [Quit: Leaving]
zaquest has joined #ocaml
yomimono has quit [Ping timeout: 255 seconds]
richi235 has quit [Remote host closed the connection]
jimt has quit [Ping timeout: 258 seconds]
spew has joined #ocaml
cdidd has quit [Quit: Leaving]
sh0t has quit [Remote host closed the connection]
mengu has joined #ocaml
Simn has quit [Quit: Leaving]
nullcatxxx_ has joined #ocaml
mengu has quit [Ping timeout: 264 seconds]
moei has quit [Quit: Leaving...]
moei has joined #ocaml
ryanartecona has joined #ocaml
<orbifx[m]> I can't use module name Path?
richi235 has joined #ocaml
<orbifx[m]> Error: Files src/path.cmx
<orbifx[m]> and ~/.opam/4.03.0/lib/ocaml/compiler-libs/ocamlcommon.cmxa
<orbifx[m]> both define a module named Path
<orbifx[m]> ?
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0 is now known as Guest61055
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]