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
shon has joined #ocaml
bruce_r has quit [Ping timeout: 264 seconds]
haesbaert has quit [Quit: Lost terminal]
ygrek has quit [Ping timeout: 244 seconds]
lol-icon is now known as pyon
Axle has joined #ocaml
Axle has quit [Client Quit]
sillyotter has joined #ocaml
sillyotter has quit [Client Quit]
al-damiri has joined #ocaml
fraggle_ has quit [Ping timeout: 264 seconds]
agile_cyborg has quit [Quit: Leaving]
fraggle_ has joined #ocaml
pierpa has quit [Ping timeout: 244 seconds]
bruce_r has joined #ocaml
fluter has quit [Ping timeout: 258 seconds]
ansiwen has quit [Read error: Connection reset by peer]
shon has quit [Remote host closed the connection]
ansiwen has joined #ocaml
fluter has joined #ocaml
pyon has quit [Quit: Fix <strike>life</strike> config.]
pyon has joined #ocaml
shon has joined #ocaml
FreeBirdLjj has joined #ocaml
shon has quit [Ping timeout: 240 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
copy` has quit [Quit: Connection closed for inactivity]
al-damiri has quit [Quit: Connection closed for inactivity]
FreeBirdLjj has quit [Remote host closed the connection]
tmtwd has joined #ocaml
FreeBirdLjj has joined #ocaml
MercurialAlchemi has joined #ocaml
govg has quit [Ping timeout: 258 seconds]
manizzle has quit [Ping timeout: 244 seconds]
govg has joined #ocaml
tmtwd has quit [Ping timeout: 250 seconds]
shon has joined #ocaml
shon has quit [Ping timeout: 244 seconds]
silver has quit [Quit: rakede]
slash^ has joined #ocaml
shon has joined #ocaml
shon has quit [Ping timeout: 240 seconds]
TheLemonMan has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 250 seconds]
Heasummn has quit [Ping timeout: 276 seconds]
slash^ has quit [Read error: Connection reset by peer]
slash^ has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
slash^ has joined #ocaml
ollehar has joined #ocaml
dexterph has joined #ocaml
shon has joined #ocaml
shon has quit [Ping timeout: 240 seconds]
Anarchos has joined #ocaml
bruce_r has quit [Ping timeout: 250 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
copy` has joined #ocaml
silver has joined #ocaml
Anarchos has joined #ocaml
shon has joined #ocaml
shon has quit [Ping timeout: 240 seconds]
tane has joined #ocaml
ggole has joined #ocaml
pierpa has joined #ocaml
redpoppies has joined #ocaml
jackweirdy has joined #ocaml
redpoppies has quit [Quit: redpoppies]
jackweirdy has quit [Client Quit]
redpoppies has joined #ocaml
redpoppies has quit [Client Quit]
redpoppies has joined #ocaml
redpoppies has quit [Client Quit]
AlexRussia has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
AlexRussia has quit [Ping timeout: 276 seconds]
sdothum has joined #ocaml
AlexRussia has joined #ocaml
fluter has quit [Ping timeout: 250 seconds]
tricksy has joined #ocaml
<tricksy> It looks like the extensible variant types don't have anything like extensible functions on them? https://sites.google.com/site/ocamlopen/
<tricksy> I want to say something like `type t = ..;; let name: t -> string = ..;; t += Foo;; name += | Foo -> "Foo"`.
<ggole> They don't, no. You can sort of do something like that with polymorphic variants (or objects).
<ggole> Although, not as ergonomically as you wrote it there.
LiamGoodacre has joined #ocaml
<tricksy> How do I do it with polymorphic variants?
<ggole> A bit like that
<tricksy> Interesting. But that would require any implementation of `name` to know what the "last" implementation was so that it could use it as its fallback.
<tricksy> And if I did dozens of that it would probably start to hurt performance.
<tricksy> In my situation I don't really need the open types. Just thought it would be neater to not have to define everything in one place. So I'll probably use an ordinary variant.
<tricksy> Thanks for the help though!
<ggole> Yeah, everything in one place isn't really all that bad
<tricksy> I currently have a 400 line "types.ml" due to the fact that my types mutually refer to each other, so I'm used to it...
<ggole> Oh yeah, that's always fun
<ggole> I regularly bitch about how file-level modules can't mutually refer to each other
TheLemonMan has quit [Quit: Lost terminal]
manizzle has joined #ocaml
lolisa has joined #ocaml
ollehar has quit [Ping timeout: 260 seconds]
antoro is now known as antoro_
TRUMP-PENCE has quit [Remote host closed the connection]
TRUMP-PENCE has joined #ocaml
TRUMP-PENCE has quit [Max SendQ exceeded]
julienXX has quit [Quit: ZNC - http://znc.in]
bruce_r has joined #ocaml
tricksy has quit [Quit: Leaving]
TRUMP-PENCE has joined #ocaml
zpe has joined #ocaml
antoro_ is now known as antoro
wtetzner has joined #ocaml
shon has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
fluter has joined #ocaml
govg has quit [Quit: leaving]
thizanne has quit [Ping timeout: 252 seconds]
shon has quit [Remote host closed the connection]
ollehar has joined #ocaml
shon has joined #ocaml
thizanne has joined #ocaml
seangrove has joined #ocaml
pierpa has quit [Ping timeout: 276 seconds]
govg has joined #ocaml
benzrf has joined #ocaml
<benzrf> yo!
<benzrf> i wanna build an ocaml project using nix - does anybody here know about that?
seangrov` has joined #ocaml
MercurialAlchemi has joined #ocaml
seangrove has quit [Ping timeout: 265 seconds]
Armael has joined #ocaml
<Armael> does anyone have experience with merlin+atom?
<Armael> I installed merlin and the atom plugins
<Armael> syntax error reporting works, type error reporting also works
<Armael> but I can't get atom to display the type of expressions; hovering stuff just produces an empty popup
wtetzner has quit [Remote host closed the connection]
riveter has quit [Quit: ZNC - http://znc.in]
lolisa|2 has joined #ocaml
riveter has joined #ocaml
ontologiae has joined #ocaml
jeffmo has joined #ocaml
bruce_r has quit [Ping timeout: 250 seconds]
lolisa has quit [Ping timeout: 260 seconds]
zpe has quit [Remote host closed the connection]
jeffmo has quit [Ping timeout: 276 seconds]
shon has quit [Remote host closed the connection]
cdidd has quit [Remote host closed the connection]
cdidd has joined #ocaml
lolisa has joined #ocaml
lolisa|2 has quit [Ping timeout: 260 seconds]
ontologiae has quit [Ping timeout: 276 seconds]
shon has joined #ocaml
picolino has quit [Ping timeout: 264 seconds]
picolino has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
hay207_ has quit [Ping timeout: 240 seconds]
agarwal1975 has joined #ocaml
unbalancedparen has joined #ocaml
tmtwd has joined #ocaml
govg has quit [Quit: leaving]
govg has joined #ocaml
mcc has joined #ocaml
wtetzner has joined #ocaml
wtetzner has quit [Ping timeout: 240 seconds]
SpiceGuid has joined #ocaml
shon has quit [Remote host closed the connection]
AlexRussia has quit [Ping timeout: 258 seconds]
bruce_r has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
jackweirdy has joined #ocaml
agarwal1975 has joined #ocaml
bruce_r has quit [Ping timeout: 250 seconds]
tristero has quit [Ping timeout: 250 seconds]
tmtwd has quit [Ping timeout: 260 seconds]
bruce_r has joined #ocaml
Heasummn has joined #ocaml
octachron has joined #ocaml
pyon has quit [Quit: Fix <strike>life</strike> config.]
slash^ has quit [Read error: Connection reset by peer]
soupault has joined #ocaml
pyon has joined #ocaml
yomimono has joined #ocaml
yomimono has quit [Client Quit]
Xizor has joined #ocaml
jackweirdy has quit [Quit: Textual IRC Client: www.textualapp.com]
soupault has quit [Remote host closed the connection]
soupault has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
bruce_r has quit [Remote host closed the connection]
soupault has quit [Remote host closed the connection]
soupault has joined #ocaml
agarwal1975 has joined #ocaml
unbalancedparen has quit [Quit: WeeChat 1.5]
soupault has quit [Remote host closed the connection]
soupault has joined #ocaml
kakadu has joined #ocaml
soupault has quit [Remote host closed the connection]
tane_ has joined #ocaml
tane is now known as Guest95605
Guest95605 has quit [Killed (weber.freenode.net (Nickname regained by services))]
tane_ is now known as tane
lolisa|2 has joined #ocaml
lolisa has quit [Ping timeout: 260 seconds]
tane has quit [Ping timeout: 252 seconds]
ygrek has joined #ocaml
tane has joined #ocaml
AlexRussia has joined #ocaml
al-damiri has joined #ocaml
shon has joined #ocaml
wtetzner has joined #ocaml
bruce_r_ has joined #ocaml
SpiceGuid has quit [Quit: ChatZilla 0.9.92 [SeaMonkey 2.40/20160120202951]]
pierpa has joined #ocaml
ggole_ has joined #ocaml
ggole has quit [Ping timeout: 265 seconds]
seangrov` has quit [Ping timeout: 276 seconds]
rgrinberg has joined #ocaml
wtetzner has quit [Remote host closed the connection]
<rgrinberg> Drup: congrats on tyre \o/
AlexRussia has quit [Ping timeout: 265 seconds]
<Drup> :)
<Drup> next step, make re streaming, and we can replace ocamllex :3
<rgrinberg> Drup: the part about compiling it to js native regex, i kind of wish re could just do that
<Drup> I don't think it's too difficult
<rgrinberg> yeah, but i've been thinking about how to structure the dependency and it seems like we'd need a compromise
<rgrinberg> you want the js backend optional, but you need to expose the re ast type to do that in an optional lib
<Drup> Actually, I think we should just expose the re ast type
<Drup> (somewhere in a submodule, like I do in tyre)
<Drup> (with type aliases, it works fine)
<rgrinberg> the core style would be to add a "raw_re" module for this purpose
<Drup> I usually do an "Internal" submodule
<Drup> so that everything is tucked away in a submodule that you put at the very end of the .mli
<rgrinberg> yeah that's fine too.
<rgrinberg> All ocaml ci is broken everywhere b/c of that findlib failure :O
<Drup> yeah, it's annoying
wtetzner has joined #ocaml
Xizor has quit [Read error: Connection reset by peer]
<Drup> rgrinberg: the danger about having re export js regex is that it might constraint future evolutions of re
<Drup> (and last time I looked, javascript regexps where kind of terrifyingly badly designed)
<rgrinberg> Drup: well we can't support the full re interface anyway though, right?
<rgrinberg> how do you marks in js re's
<Drup> oh, that makes tyre impossible to implement
<Drup> x)
<Drup> Didn't though of that
<Drup> wonder if it's emulable with lot's of groups
shon has quit [Remote host closed the connection]
kev has joined #ocaml
shon has joined #ocaml
struk|desk2 is now known as struk|desk
MercurialAlchemi has quit [Ping timeout: 258 seconds]
lolisa|2 has quit [Ping timeout: 260 seconds]
<rgrinberg> Drup: https://github.com/ocaml/ocaml-re/pull/110 nb_groups it is for now
<rgrinberg> I think we can ninja rename it later anyway, i don't expect people to use this function
<rgrinberg> Although i'm wondering if it's worth marking it as "experimental" or something in the doc
silver has quit [Quit: rakede]
shon has quit [Remote host closed the connection]
<mrvn> always
LiamGoodacre has quit [Ping timeout: 250 seconds]
antoro is now known as antoro_
ggole_ has quit []
shon has joined #ocaml
shon has quit [Ping timeout: 240 seconds]
shon has joined #ocaml
octachron has quit [Quit: Leaving]
<Heasummn> If I have a bunch of data types that all take 2 arguments, and I'd like to do the exact same thing with those two arguments, is there any syntactic construct that makes it easier to match against them?
<Heasummn> For example:
shon has quit [Remote host closed the connection]
<Heasummn> Add(e1, e2), Sub(e1, e2), Div(e1, e2), Mult(e1, e2) Are all datatypes. In which e1 and e2 are all of the same type.
AlexRussia has joined #ocaml
<Heasummn> A match like (Add | Sub | Mult | Div) (e1, e2), or something like that, if it exists
dexterph has quit [Ping timeout: 240 seconds]
<Heasummn> The simplest method I could conjure is: match expr with | Add (e1, e2) | Sub(e1, e2) | Mult (e1, e2) | Div (e1, e2) -> blah
<Heasummn> I'm not even sure if tha tworks though
wtetzner has quit [Remote host closed the connection]
wtetzner has joined #ocaml
shon has joined #ocaml
AlexRussia has quit [Ping timeout: 258 seconds]
octachron has joined #ocaml
<octachron> Heasummn, matching over an or pattern Add(e1,e2) | ... | Div(e1,e2) would work
<octachron> another option might be to split the type in a BinOp of bin_op * expr * expr and type bin_op = Add | ...| Div
<octachron> then, you could match over BinOp( _, e1, e2)
<Heasummn> I plan to do that later. It'll make overloading operators easier too
kev has quit [Ping timeout: 264 seconds]
<Heasummn> I'll do it in the next commit, I have to fix some errors in this one
tane has quit [Quit: Leaving]
<Heasummn> I've got a bug in my code and I think it has to do with equality testing
<Heasummn> If I have a variant tp = Tint | Tfloat
<Heasummn> I can do if (x = Tint) and assume that is true if x is a variant of type Tint?
<octachron> yes?
<Heasummn> alright
<Heasummn> Because = and == are two different levels of comparison
<Heasummn> I was unsure
<Heasummn> This is getting really fucking annoying then. Everything I check tells me that these two items are the same, but my if expression always results to the else case
<pierpa> paste a snippet
<Heasummn> one sec
<Heasummn> That's weird
<Heasummn> I was using a function to abstract away the messy if checking. If I don't use that function, then it's all fine
<pierpa> have you any nested ifs? or nested anything?
<Heasummn> yeah
<Heasummn> nested ifs
<Heasummn> in that faulty function
<pierpa> hmmmm
<Heasummn> I wasn't focusing on that function, let me debug it
<pierpa> try the following: program as if the syntax of if was: if e0 then begin e1 end else begin e2 end
<pierpa> with begin/end mandatory
<Heasummn> Changing some parenthesis around fixed it
<Heasummn> I was stuck debugging the wrong thing for about 30 minutes
<pierpa> parenthesis work to, but I like begin/end more
kakadu has quit [Remote host closed the connection]
octachron has quit [Quit: Leaving]