adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Upcoming OCaml MOOC: https://huit.re/ocamlmooc | OCaml 4.03.0 release notes: http://ocaml.org/releases/4.03.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
timclassic has joined #ocaml
FreeBirdLjj has joined #ocaml
mfp has quit [Ping timeout: 265 seconds]
FreeBirdLjj has quit [Ping timeout: 265 seconds]
<Bluddy[m]> hey randomA, how's it going?
wu_ng has quit [Ping timeout: 244 seconds]
<Bluddy[m]> randomA: hey
<dxtr> So, when using the Command module
<dxtr> How do I pass multiple flags?
<dxtr> Say I want a flag that is optional no_arg bool
nicholas_ has joined #ocaml
nicholasf has quit [Ping timeout: 244 seconds]
nicholas_ has quit [Ping timeout: 264 seconds]
nicholasf has joined #ocaml
<dxtr> Oh
<dxtr>
<dxtr> I get it!
johnelse has quit [Ping timeout: 276 seconds]
johnelse has joined #ocaml
nicholasf has quit [Read error: Connection reset by peer]
fluter has quit [Ping timeout: 265 seconds]
nicholasf has joined #ocaml
Reshi has joined #ocaml
fluter has joined #ocaml
Reshi has quit [Quit: WeeChat 1.5]
FreeBirdLjj has joined #ocaml
smondet has quit [Remote host closed the connection]
mg- has quit [Ping timeout: 265 seconds]
mg- has joined #ocaml
pyon has quit [Quit: Reality is multi-dimensional. More precisely, two-dimensional.]
pyon has joined #ocaml
struk|desk has joined #ocaml
tmtwd has quit [Ping timeout: 260 seconds]
tmtwd has joined #ocaml
Denommus has joined #ocaml
fraggle_ has quit [Ping timeout: 265 seconds]
tmtwd has quit [Ping timeout: 244 seconds]
fraggle_ has joined #ocaml
MercurialAlchemi has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
sdothum has quit [Quit: ZNC 1.6.3 - http://znc.in]
Denommus has quit [Quit: going to sleep]
pierpa has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
jao has quit [Ping timeout: 272 seconds]
FreeBirdLjj has joined #ocaml
rpip has quit [Ping timeout: 255 seconds]
jonasen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
low-profile has quit [Quit: low-profile]
nicholasf has quit [Ping timeout: 260 seconds]
MercurialAlchemi has quit [Ping timeout: 255 seconds]
DuoSRX has quit [Quit: Connection closed for inactivity]
tmtwd has joined #ocaml
Algebr` has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
ayys has joined #ocaml
AlexDenisov has joined #ocaml
shinnya has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
hhx has joined #ocaml
hhx has quit [Quit: WeeChat 1.5]
jonasen has joined #ocaml
MercurialAlchemi has joined #ocaml
pootler has quit [Remote host closed the connection]
Algebr` has quit [Ping timeout: 265 seconds]
valexey has quit [Quit: Leaving]
tmtwd has quit [Ping timeout: 264 seconds]
Algebr` has joined #ocaml
FreeBirdLjj has joined #ocaml
ggole has joined #ocaml
Algebr` has quit [Ping timeout: 264 seconds]
copy` has quit [Quit: Connection closed for inactivity]
Simn has joined #ocaml
ggole_ has joined #ocaml
ggole has quit [Ping timeout: 240 seconds]
orbifx has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tmtwd has joined #ocaml
pootler has joined #ocaml
pootler has quit [Remote host closed the connection]
orbifx has quit [Ping timeout: 250 seconds]
ggole__ has joined #ocaml
ggole_ has quit [Ping timeout: 264 seconds]
p_nathan has joined #ocaml
AlexRussia has quit [Ping timeout: 244 seconds]
kamog has joined #ocaml
sfri has quit [Remote host closed the connection]
tmtwd has quit [Ping timeout: 260 seconds]
AlexDenisov has joined #ocaml
sfri has joined #ocaml
p_nathan has quit [Ping timeout: 240 seconds]
Student has joined #ocaml
<Student> Hello. Does anyone know where can I get the documentation for the | conditional syntax?
<companion_cube> you mean `match x with | a->b | c->d` ?
<companion_cube> !manual
<reynir> cube_bot: good bot
freusque has joined #ocaml
<reynir> How does cube_bot do persistent storage?
<companion_cube> a mere json file
<Student> Yes I meant that
<companion_cube> reynir: http://vrac.cedeela.fr/factoids.json
<Student> But sometimes I see function instead of match X with
<companion_cube> Student: look at "core language" in the manual
<Student> Okay, thank you ^^
<companion_cube> `function | a->b | c->d` is the same as `fun x -> match x with | a->b | c->d`
<reynir> Ah, interesting
<companion_cube> it's a shortcut when you take an argument and match on it immediately
<companion_cube> !icfp2106=
<cube_bot> done.
<companion_cube> (was a stupid typo)
<companion_cube> !search manual
<cube_bot> [!stdlib_manual; !ocamlbuild; !manual; !lwt; !_tags]
Student has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
jonasen has quit [Ping timeout: 272 seconds]
ggole__ is now known as ggole
FreeBirdLjj has quit [Remote host closed the connection]
jonasen has joined #ocaml
Student has joined #ocaml
Student has quit [Client Quit]
pootler has joined #ocaml
FreeBirdLjj has joined #ocaml
mfp has joined #ocaml
rpip has joined #ocaml
jwatzman|work has joined #ocaml
larhat has joined #ocaml
pootler has quit [Read error: Connection reset by peer]
Algebr` has joined #ocaml
gregoire has joined #ocaml
jonasen has quit [Ping timeout: 244 seconds]
<balod> !help
<cube_bot> !help: commands are [search; reload; see; tell; coucou; factoids]
Reshi has joined #ocaml
balod has quit [Remote host closed the connection]
balod has joined #ocaml
<Algebr`> the bot gets better and better
<Algebr`> !see
<cube_bot> not found.
<Algebr`> !see lwt
<Algebr`> !lwt
<Algebr`> !coucou
<cube_bot> Algebr` est un coucouteur niveau 1
<companion_cube> :D
<Algebr`> what is that
<companion_cube> sorry I must remove this
<Algebr`> !factoids
<Algebr`> !tell
<Algebr`> !exit 0
<companion_cube> tell is for sending messages to people not there currently
<balod> !tell
<companion_cube> (if you want to try stuff, you can query the bot)
<Algebr`> !tell companion_cube Hello
<cube_bot> OK.
<companion_cube> heh
<cube_bot> companion_cube: (from Algebr`): Hello
cube_bot has quit [Remote host closed the connection]
cube_bot has joined #ocaml
loxs has joined #ocaml
shinnya has quit [Quit: ZNC - http://znc.in]
<loxs> could someone please explain what's going on on lines 9-11 https://github.com/realworldocaml/examples/blob/master/code/parsing/lexer.mll#L9
<Algebr`> looks like a mutation
<loxs> that part I get
<Algebr`> setting a new record
<loxs> but what's inside the curly braces I don't
<Algebr`> pos is a record and its making a new record with just those fields updated
<Algebr`> pos_bol and pos_lnum being new field values leaving the others as they were in pos
shinnya has joined #ocaml
<loxs> right, will read more on records, thanks
sfri has quit [Remote host closed the connection]
<loxs> what bugs me here is the `with`. I don't seem to find any explanation with regards on using with records
<loxs> (not very google-able)
<companion_cube> look into the core syntax, in the manual
<companion_cube> !manual
<Khady> !coucou
<Khady> </3
<companion_cube> :p
<companion_cube> that's what happens when you recycle code from a channel to another
jonasen has joined #ocaml
<companion_cube> I should make another repository actually
<Khady> I'd be curious to know on which channel I can improve my coucouteur level
sfri has joined #ocaml
<Khady> And I have this song in the head now https://www.youtube.com/watch?v=TbFbDg1v7l4
pootler has joined #ocaml
<Khady> no thanks to you
<companion_cube> lolol :D
loxs has quit [Quit: Leaving]
jstolarek has joined #ocaml
Reshi has quit [Quit: WeeChat 1.5]
<reynir> what does hibou mean
<companion_cube> owl
Merv_ has joined #ocaml
<companion_cube> (also, "coucou" is the cuckoo bird)
<Algebr`> oh
<companion_cube> it's a children's song obviously :)
<freehck> People, good question! Do somebody know how Core_list.reduce behaves with list of exactly one argument? :)
<freehck> *with list of exactly one element? :)
<Algebr`> look at the source, it will reveal all
<freehck> List.reduce ~f:(+) [1];; --> 1
<freehck> List.reduce ~f:(-) [1];; --> 1
<freehck> Algebr`: yep, you're right. :)
<reynir> I'm thinking it just returns the single element
pootler has quit [Ping timeout: 248 seconds]
<freehck> do opam save sources somewhere so I can unpack them and learn the code?
<freehck> Ah i see. repo/default/archives...
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dxtr> What does 'int * tsring' mean?
<dxtr> err
<dxtr> int * string
<Algebr`> a tuple where first thing is int, second thing is string
<freehck> dxtr: returnes tuple
<dxtr> Oh
<rightfold> The type of such a tuple, rather
<reynir> It's the type for a pair of int and string, e.g. (1, "two"). Or it's two badly named int-variables that are being multiplied :)
<dxtr> Is it a stupid question to ask why the type is not simply (int, string)? :p
<rightfold> Because (a, b) map would be a map from a to b
<rightfold> This syntax is used for passing multiple type arguments
<freehck> reynir: seems you to be right. It calls fold with hd as init value.
<freehck> dxtr: it's a link to a cartesian product.
<reynir> dxtr: not an answer, but in OCaml, »() : unit«
<freehck> A*B is a set of all possible tuples which are (a,b) where a from A and b from B.
FreeBirdLjj has quit [Remote host closed the connection]
rpip has quit [Ping timeout: 248 seconds]
FreeBirdLjj has joined #ocaml
<Algebr`> where's the /dev/null descriptor in unix module?
<Algebr`> I don't care about stderr
<Algebr`> or I guess I need to grab a handle myself....sigh
<freehck> Algebr`: While stdout and stderr / stdin are always opened for any program, the /dev/null device could be not opened at all. So yes, you need to open it yourself.
<Algebr`> I meant as a convience in unix module
<companion_cube> hmm, maybe the bot could have a stackoverflow query command
nicoo has quit [Ping timeout: 268 seconds]
nicoo has joined #ocaml
<Drup> !cube_bot
<Drup> hum, the bot doesn't know himself
<companion_cube> indeed
jonasen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_andre has joined #ocaml
zpe has joined #ocaml
cube_bot has quit [Remote host closed the connection]
ocabot has joined #ocaml
<companion_cube> !manual
<companion_cube> ok, perfect
<companion_cube> !ocabot = https://github.com/c-cube/ocabot
<ocabot> done.
jstolarek has quit [Ping timeout: 276 seconds]
<reynir> Algebr`: I'd find it annoying if a library was using up my file descriptor limit for 'convenience'
<Algebr`> you can have 65k
<Algebr`> one used up for /dev/null is not a big deal
letaris has quit [Ping timeout: 244 seconds]
<reynir> It depends on your platform. 256 is not unheard of
<Algebr`> on something tiny?
<reynir> Solaris
<Algebr`> wow that's surprising
<reynir> Hmm, I wonder what it is in Macintosh (can anyone check?) :)
<ggole> A paranoid administrator can also reduce it
<dxtr> openbsd have like 128 by default
freehck has quit [Remote host closed the connection]
<dxtr> Okay, 512
<dxtr> Algebr`: I have never heard of anything automatically opening up /dev/null "for convenience"
<dxtr> That sounds like an awful idea
<dxtr> Especially when it takes you literally one line of code to do it yourself
<dxtr> Also taking the file descriptor issue into consideration :)
jstolarek has joined #ocaml
AlexDenisov has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
sepp2k has joined #ocaml
letaris has joined #ocaml
profmaad has quit [Quit: leaving]
jonasen has joined #ocaml
profmaad has joined #ocaml
profmaad has quit [Client Quit]
profmaad has joined #ocaml
quicquid has joined #ocaml
Geekingfrog has joined #ocaml
<companion_cube> so, I can't update my PR on iterators, because I can't get it to build -_-
jstolarek has quit [Ping timeout: 255 seconds]
letaris has quit [Ping timeout: 244 seconds]
letaris has joined #ocaml
jao has joined #ocaml
<Bluddy[m]> companion_cube: how so?
<companion_cube> I don't know, it fails because iter.cmo is not linked somewhere
jstolarek has joined #ocaml
<Bluddy[m]> so flambda related?
<companion_cube> no, it's based on trunk, but I don't know where the build error comes from
octachron has joined #ocaml
sdothum has joined #ocaml
<companion_cube> yeah, well, everyone is waiting but there is no expected date
<chelfi> it sounds a bit like wishful thinking
freehck has joined #ocaml
<chelfi> I mean, everyone seems to agree modular implicits are cool, but AFAICT nobody is actively working on it at the moment
ayys has quit [Quit: Page closed]
zpe has quit [Remote host closed the connection]
<octachron> companion_cube, moving iter.cmo before list.cmo in stdlib/Makefile.shared OTHERS variable and fixing stdlib/.depend seems to solve the build problem for me
kolko has quit [Read error: Connection reset by peer]
kolko has joined #ocaml
freusque has quit [Ping timeout: 250 seconds]
<companion_cube> chelfi: I think def` is working on it
<companion_cube> octachron: I'm trying it, thanks
freehck has quit [Quit: rcirc on GNU Emacs 24.4.1]
agarwal1975 has joined #ocaml
sh0t has joined #ocaml
ygrek has joined #ocaml
AlexRussia has joined #ocaml
fraggle-boate has quit [Remote host closed the connection]
fraggle-boate has joined #ocaml
copy` has joined #ocaml
freehck has joined #ocaml
<freehck> Hello everyone.
ygrek has quit [Ping timeout: 265 seconds]
<zozozo> hi
<freehck> Do functor always need to have a module it's based on?
<quicquid> hiya
<freehck> *Does
<freehck> F.e. I want to have 2 abstract types: TypeId and ServiceId.
<freehck> I mean TypeId.t and ServiceId.t.
<freehck> They both must be (for now) strings.
<zozozo> freehck: well, as you did in your code, you can take an empty module as fonctor argument
<freehck> The trick is: I want to have functor StrId which creates a new module. But it does not need to have a class it builds a new module on.
<Drup> if you use ocaml >= 4.02 (iirc), you can just use StrId ()
<freehck> zozozo: well It was just as an experiment. I'd like to write something like "module TypeId = StrId ()"
<Drup> lookup generative functors in the manual
<freehck> Drup: cool, thank you.
<freehck> Well I'm still stuck with 4.01.0 if you remember.
<freehck> So it's more reasons to look how to upgrade to 4.02.1.
<freehck> Drup: Don't you know if it's omitten in RWO book?
<freehck> I didn't find Generative Functors there.
<ggole> You could just name an empty functor and use that
<ggole> module Z = struct end module Foo = Make (Z)
<Drup> ggole: except if you dou Foo = Make(Z) and Bar = Make(Z), with generative behaviors, Foo=Bar
<ggole> Oh, hmm
<ggole> That's right :/
<Drup> you can use abstraction to solve all that, of course
<freehck> Drup: already have read
<Drup> ah, ok, you said you didn't found it
<freehck> but not in Read World Ocaml. :)
<freehck> So the question is: do RWO need an update here?
<zozozo> I think generative functors came after RWO was written
<Drup> RWO is not the reference manual, I don't think it ever aimed at covering the whole language in all the details
ygrek has joined #ocaml
Algebr` has quit [Ping timeout: 244 seconds]
<freehck> Btw, isn't it bad to make such abstractions like I made in that snippet? Well, I know that functor application is a runtime event, so how about performance of such abstractions in a real program?
<ggole> You can probably make it a bit cheaper if you're willing to use %identity
MercurialAlchemi has quit [Ping timeout: 276 seconds]
<freehck> ggole: well the question is how much it costs. I just don't know.
<Drup> freehck: one function application, at the beginning of your program
<ggole> You can also use private types and coercions instead of from_string
<Drup> so, inconsequential
<Drup> ggole: I fail to see how %identity would help you.
<ggole> Because it would guarantee that of_string was free?
<Drup> don't do that, it's useles
<Drup> even the old inliner was good enough to inline the identity function
<freehck> ggole: doesn't ocamlopt remove such of_string calls while optimisation?
<freehck> Of course it's not about -inline 0
<freehck> *optimization
<ggole> Does it do that even through module boundaries?
AlexRussia has quit [Ping timeout: 260 seconds]
<ggole> OK, it does. Never mind.
FreeBirdLjj has joined #ocaml
<Drup> freehck: from a cost point of view, applying a functor has a similar cost has applying a function. This code is not in a hot path, so from an optimization point of view, it's inconsequential, don't even bother :)
<freehck> Ok. Good.
<Drup> (that analysis, surprisingly, is valid for most optimization concerns: "It's inconsequential, don't even bother" :p)
pierpa has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
AlexRussia has joined #ocaml
ee_ks has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
<freehck> I found that I don't need generative functors to separate types with equal realization.
<freehck> All I really need is to use type coercion.
<freehck> What are differences between this code and my previous snippet?
<Drup> yes, that's what I meant by "you can solve all that by abstraction"
<freehck> Previous: http://pastebin.com/jdpeLfAF
<freehck> Drup: aaah... I didn't notice.
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
ygrek has quit [Read error: Connection reset by peer]
ygrek has joined #ocaml
ygrek has quit [Read error: Connection reset by peer]
ygrek_ has joined #ocaml
ygrek_ has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
loxs has joined #ocaml
<loxs> can someone give me example of _oasis config for working with/compiling .mll and .mly files?
zv has quit [Read error: Connection timed out]
<Drup> you shouldn't have anything to do, it should just work™
<loxs> it does not, it spits an error:
<Drup> (please use pastebin)
<loxs> here it is: http://pastebin.com/QYcd3yiP
<loxs> that's because on line 3 I have "open Parser"
MercurialAlchemi has joined #ocaml
<loxs> and here is my lexer.mll: http://pastebin.com/QMj86tp3
<freehck> I found strange thing in Core_kernel: "type 'a t = 'a option with bin_io, sexp, compare"
<Drup> loxs: and where is your Parser file ?
<freehck> What is "with" in this type definition?
<ggole> That's a camlp4 extension
<loxs> Drup, oh, that would explain it... thanks
<freehck> ggole: where can I read about it?
<freehck> Is it a part of Core?
<ggole> Better to pretend it doesn't exist, since the OCaml ecosystem seems to be moving towards ppx instead of camlp4
<freehck> ggole: well what does this syntax do?
<ggole> It generates a bunch of code based on the data type
jwatzman|work has quit [Quit: jwatzman|work]
<freehck> Drup: But shortly: is this the thing that make Option.t comparable?
<ggole> Yeah, pretty much
FreeBirdLjj has quit [Remote host closed the connection]
<freehck> Got the thing! When I use "type xxx = ... with show" it will generate functions like pp_xxx and show_xxx.
<freehck> And the same thing with sexp, compare and so on?
quicquid has left #ocaml [#ocaml]
jstolarek has quit [Ping timeout: 244 seconds]
al-damiri has joined #ocaml
zv has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<benmachine> freehck: type blah = ... with sexp generates both blah_of_sexp and sexp_of_blah
<benmachine> etc.
<benmachine> but yeah, nowadays it's type blah = ... [@@deriving sexp]
loxs has quit [Quit: This computer has gone to sleep]
ygrek_ has joined #ocaml
Leonidas_ has joined #ocaml
Leonidas_ is now known as Leonidas
sepp2k has quit [Quit: Leaving.]
agarwal1975 has quit [Quit: agarwal1975]
fraggle-boate has quit [Quit: Quitte]
fraggle-boate has joined #ocaml
shinnya has quit [Ping timeout: 265 seconds]
AlexDenisov has joined #ocaml
igt0 has quit [Quit: Connection closed for inactivity]
ygrek_ has quit [Ping timeout: 244 seconds]
octachron has quit [Quit: Page closed]
ygrek has joined #ocaml
Merv_ has quit [Remote host closed the connection]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
veggie_ has joined #ocaml
larhat has quit [Quit: Leaving.]
ee_ks has quit [Ping timeout: 255 seconds]
johnf has joined #ocaml
nojb has quit [Read error: Connection reset by peer]
ygrek has quit [Ping timeout: 244 seconds]
srcerer has joined #ocaml
srcerer has quit [Client Quit]
srcerer has joined #ocaml
fraggle_ has quit [Ping timeout: 265 seconds]
pootler has joined #ocaml
NingaLeaf has joined #ocaml
FreeBirdLjj has joined #ocaml
ee_ks has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
jlouis has quit [Read error: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number]
jlouis has joined #ocaml
Anarchos has joined #ocaml
ee_ks has quit [Ping timeout: 240 seconds]
pootler has quit [Read error: Connection reset by peer]
ohama has quit [Ping timeout: 265 seconds]
ohama has joined #ocaml
llamatarianism has joined #ocaml
monod has joined #ocaml
jstolarek has joined #ocaml
jstolarek has quit [Remote host closed the connection]
noze has joined #ocaml
<noze> i need to compute some things with geodata that i got in json format (nothing very fancy, distances mostly)
<noze> is there a lib for me?
Algebr` has joined #ocaml
fraggle_ has joined #ocaml
veggie_ has quit [Ping timeout: 265 seconds]
ee_ks has joined #ocaml
octachron has joined #ocaml
<Algebr`> why would this happen Exception: Unix.Unix_error (Unix.EINTR, "read", "").
<Algebr`> yes, there's a signal
<ggole> That's normal for read
<ggole> If it gets interrupted before any data is read, it can't return 0 or you'll think the file is empty
<Algebr`> really? isn't it weird to say that something normal is to raise an exception?
<ggole> The caml behaviour reflects the underlying system call in a pretty obvious way, is what I mean
<ggole> (The system call sets errno rather than raising an exception, but that's a minor difference.)
jstolarek has joined #ocaml
<Algebr`> I don't understand what I'm doing wrong, made some fds with pipe (), then used them for create_process and I'm write to a pipe and then trying to read
<ggole> If you get EINTR you probably just need to try again
jstolarek has quit [Remote host closed the connection]
<Algebr`> ggole: http://pastebin.com/x16AF0Wy if I read again in the excpetion handler then it just hangs
<Algebr`> a simple approx
<ggole> Why are you ignoring half the result of pipe? You can't do that, you need to close those.
<Algebr`> because I don
<Algebr`> need them
<ggole> Um.
<Algebr`> I kinda thought they'd be closed since they'd be gc'ed
<ggole> You need to use both ends of a pipe: bytes are written to one end, and they appear at the other.
<Drup> noze: yojson, I would say
<Algebr`> yea, I initially tried used both ends of the pipe for the stdin stdout of the create_process but that didn't work correctly either
<Algebr`> so I thought each one needed a separate pipe
<ggole> They do, but you need to read on the end that the inferior process is writing to.
<ggole> Whereas your code just drops that on the floor.
<Algebr`> ah
<ggole> And if you aren't going to write anything to stdin, close the write half of it
<ggole> Otherwise any reads on the other end will block forever.
natimic has joined #ocaml
kamog` has joined #ocaml
kamog has quit [Ping timeout: 240 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
orbifx has joined #ocaml
jstolarek has joined #ocaml
<Algebr`> ggole: but now this just returns instantly, no printing http://pastebin.com/14njiFzs
<Algebr`> with a bad exit code of 141
<Algebr`> which seems to be a pipe failure
CuriousErnestBro has quit [Read error: Connection reset by peer]
CuriousErnestBro has joined #ocaml
<ggole> I'm pretty sure you've got them backwards
<Algebr`> I think so too
jstolarek has quit [Ping timeout: 260 seconds]
orbifx has quit [Ping timeout: 240 seconds]
annoymouse has joined #ocaml
<annoymouse> I heard that Jane Street Core allows for operator overloading. Could someone point me to some docs/source code for this feature?
orbifx has joined #ocaml
<orbifx> are there any articles covering the different build systems?
<orbifx> i think I've seen one
<orbifx> Want to pick one for logarion
loxs has joined #ocaml
AlexDenisov has joined #ocaml
<octachron> annoymouse, function overloading is not possible (by design) in OCaml, you may have misinterpreted something else
jonasen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
veggie_ has joined #ocaml
noze has quit [Remote host closed the connection]
pootler has joined #ocaml
sh0t has quit [Ping timeout: 265 seconds]
blubberdiblub has joined #ocaml
<annoymouse> octachron: I believe you can change the behavior of the eqauls operator depending on the types that it is called with using Core.
<annoymouse> This is what my professor told me today.
<Drup> either you misunderstood, or your prof is wrong. What you can do is have several = operators in different modules, that would apply to different types
<Drup> that's quite different than overloading
<orbifx> annoymouse: you can also override a function
<orbifx> and maybe that is what Core does
<blubberdiblub> hi, i just wanted to say thank you for OMake. it makes building my project so much easier
<rightfold> did 4.03 get parallelism?
<orbifx> anyone anything on build systems
<orbifx> rightfold: not that I know of
<rightfold> aww :(
loxs has quit [Quit: Leaving]
<orbifx> do consider the alternative mechanisms
<annoymouse> Drup: Let me give you some context. We were implementing signatures for an abstract datatype called set. We wrote a function called equals that takes in two sets and returns a bool. I wanted to know if we could overload the = operator to use our test for equality when comparing two sets. He said that there is going to be something similar to that in an
<annoymouse> upcoming version of OCaml and that currently there is a way to pretty much do it using Core.
<octachron> rightfold, 4.03 got flambda. Getting both multicore support and a new compiler middle end in the same release would probably have been overly ambitious
<rightfold> ok :p
<octachron> annoymouse, a important point to be aware is that there is a big difference between redefining a function/operator (always possible) and overloading it
pyon has quit [Quit: restart]
<annoymouse> octachron: So is there a way to override/shadow the function such that it will use our custom definition of equality for sets if the operands are sets and otherwise use the default definition?
<octachron> orbifx, for a simple project oasis/ocamlbuild are relatively fine
<orbifx> what is the least noisy octachron ?
<orbifx> polluting I mean
<orbifx> I used one before, may have been oasis, and it was creating an extra folder. Was also doing my head in with a _tags file :P
pyon has joined #ocaml
sh0t has joined #ocaml
<octachron> annoymouse, having the function selected by the type is not possible (and is also considered anti-modular)
veggie_ has quit [Ping timeout: 244 seconds]
<annoymouse> octachron: So what do you think my professor was referring to then?
<octachron> annoymouse, what your prof might have been talking about is modular implicit.
<octachron> orbifx, ocamlbuid does create a _build directory and can require to edit the _tags file
<orbifx> is oasis less intrusive and demanding? also what of OMake? is being sidelined?
<octachron> orbifx, oasis provides a higher level description of package but uses itself either ocamlbuild or OMake to build package
<octachron> the omake option is quite recent and I have not tested it myself
<orbifx> so you use oasis over ocamlbuild?
<octachron> annoymouse, modular implicit allows to select a function/operator depending on the implictely available module within the current context
<annoymouse> that might be what he meant
<annoymouse> I'll need to go to office hours to discuss it with him
<annoymouse> thanks octachron
MercurialAlchemi has quit [Ping timeout: 248 seconds]
<octachron> orbifx, for simple enough projects, quite often.
<orbifx> for advanced projects octachron ?
<orbifx> wft? How can a later version come 3 years before a later version? http://omake.metaprl.org/index.html
<orbifx> Version 0.9.8.6 Release Candidate 1 (October 26, 2010)
<orbifx> Version 0.9.9 Prerelease (June 20, 2007)
veggie_ has joined #ocaml
<octachron> orbifx, honestly I don't really do complex project (more bizarre and barocco ones)
<orbifx> finally what about ocamldoc?
<octachron> for my limited needs, ocamlbuild with custom myocamlbuild.ml has been enough
<orbifx> I just don't want to have to write all the rules manually in my makefile
<Drup> orbifx: what about ocamldoc ?
<octachron> orbifx, the right question may be: are you expecting to have a (very) complex build process right from the start?
<veggie_> what is the backtick in [`a; `b; `c]
<octachron> veggie_, `a, `b … are polymorphic variants
<orbifx> octachron: no
<orbifx> Drup: something which handles ocamldoc builds too
<octachron> (they should start with a capital, but a historical mistake has left this syntax valid )
<octachron> orbifx, then start simple with the build system too
<veggie_> octachron: even if it's not being used in a type declaration? (just a list literal)
<octachron> yep: [`a;`b;`c] has type [> `a | `b | `c ] list
<veggie_> interesting, thanks
<orbifx> octachron: I have, but writing makefile rules is a bit tedious
<orbifx> but I think I might just go on with that way
<Drup> orbifx: everything decents handle ocamldoc, so that includes oasis and vanilla ocamlbuild
pyon has quit [Quit: Reality is multi-dimensional. More precisely, two-dimensional.]
<Drup> (also, "something simple" ≠ "writing your own makefile rules")
<veggie_> by the way, are there any recommended ways of learning ocaml? the tutorial articles on the ocaml website are kinda.. not so great
<Drup> veggie_: on monday the OCaml MOOC is starting !
<veggie_> is it free?
<Drup> Yep, link in the motd
<veggie_> awesome thanks
<Drup> (there are 2500 people registered now, it's gonna be great)
pyon has joined #ocaml
<octachron> orbifx, I agree with Drup that writing your own makefile rules does not really qualify as simple for OCaml
rpip has joined #ocaml
<orbifx> Drup: writing Makefiles is simple for me because of my experience
<orbifx> but yes it's tedious
shinnya has joined #ocaml
_andre has quit [Quit: leaving]
jstolarek has joined #ocaml
<Drup> it's not a question of tediousness, it's that given ocaml's compilation scheme, it's extremly likely to be wrong
jstolarek has quit [Remote host closed the connection]
<Drup> I'm just saying you're bad at makefile, I'm saying that a lot of people have rolled their own makefiles before, and they were all more or less broken in one way or another. OCamlMakefile seems to be the only one non broken, and it's ... a bit complex, let's say
kamog` is now known as kamog
ggole has quit []
struk|work has quit [Quit: Page closed]
Algebr` has quit [Ping timeout: 255 seconds]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Denommus has joined #ocaml
NingaLeaf_ has joined #ocaml
Denommus` has joined #ocaml
NingaLeaf has quit [Ping timeout: 276 seconds]
<orbifx> Drup: OCamlMakefile is "non-broken" as a build system in general, or tends to make less broken implementations?
<orbifx> brb
orbifx has quit [Quit: WeeChat 1.5]
orbifx-m has joined #ocaml
veggie_ has quit [Ping timeout: 240 seconds]
Denommus has quit [Ping timeout: 265 seconds]
<regnat> orbifx-m: OCamlMakefile is a Makefile template for ocaml, not a build system itself
<orbifx-m> Back
<regnat> (OCamlMakefile ≠ OMake)
veggie_ has joined #ocaml
NingaLeaf has joined #ocaml
<orbifx-m> Thanks regnat
NingaLeaf_ has quit [Ping timeout: 264 seconds]
<orbifx-m> And Drup and octachron
orbifx has joined #ocaml
monod has quit [Quit: Sto andando via]
orbifx has quit [Ping timeout: 244 seconds]
johnf has quit [Remote host closed the connection]
blubberdiblub has quit [Quit: Leaving]
pierpa` has joined #ocaml
pierpa has quit [Ping timeout: 276 seconds]
rgrinberg has joined #ocaml
NingaLeaf has quit [Quit: Leaving]
maurer has joined #ocaml
FreeBirdLjj has joined #ocaml
<maurer> Does anyone know if there's a way to ask opam not to run tests?
<maurer> (I want to opam install something that is going to fail some tests due to the tests being fragile to a dependency version, but it does what I'd like)
<rgrinberg> maurer: i don't think that opam runs tests by default unless you tell it to
<maurer> Hm, when I do an opam pin add, it's definitely running tests and failing. I'll check if the project just turned them on as part of the build
FreeBirdLjj has quit [Ping timeout: 272 seconds]
<struk|desk> has anyone switched their projects from core to base yet? if so, pleasant experience?
<maurer> Ah, make test is part of the install action
<rgrinberg> maurer: yeah that is wrong. make test should be part of build-test:
Algebr` has joined #ocaml
Algebr` has quit [Ping timeout: 260 seconds]
sh0t has quit [Ping timeout: 255 seconds]
<llamatarianism> hullo
<llamatarianism> does anyone know if (and how) it's possible to get autocompletion in utop inside emacs?
<llamatarianism> like, in an actual terminal, I can do M-tab and it'll autocomplete stuff
sh0t has joined #ocaml
pierpa` is now known as pierpa
<Bluddy[m]> struk|desk: base doesn't seem to be in opam yet
<struk|desk> doh
<struk|desk> guess it's still being surveyed
orbifx has joined #ocaml
octachron has quit [Quit: Leaving]
kamog has quit []
llamatarianism has quit [Quit: Page closed]
pierpa` has joined #ocaml
orbifx has quit [Ping timeout: 265 seconds]
pierpa has quit [Ping timeout: 244 seconds]
veggie_ has quit [Ping timeout: 265 seconds]
Denommus` has quit [Quit: going home]
Sorella has joined #ocaml
ee_ks has left #ocaml [#ocaml]
pierpa`` has joined #ocaml
pierpa` has quit [Ping timeout: 260 seconds]
veggie_ has joined #ocaml