adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.2 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
damason has quit [Ping timeout: 246 seconds]
damason has joined #ocaml
swgillespie has joined #ocaml
<Drup> jrslepak: great, thanks!
ryanartecona has quit [Quit: ryanartecona]
ncthom91 has joined #ocaml
keen__________10 has joined #ocaml
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
keen___________9 has quit [Ping timeout: 260 seconds]
sqweek has quit [Ping timeout: 244 seconds]
tennix has joined #ocaml
larhat has quit [Quit: Leaving.]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SomeDamnBody has quit [Ping timeout: 250 seconds]
Cardoe has joined #ocaml
pyon is now known as IceFireXD
IceFireXD has quit [Disconnected by services]
pyon has joined #ocaml
grouzen has quit [Ping timeout: 240 seconds]
tmtwd has joined #ocaml
Cardoe has quit [Quit: Cardoe]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
troydm has quit [Quit: What is hope? That all of your wishes and all of your dreams come true? (C) Rau Le Creuset]
damason_ has joined #ocaml
damason has quit [Ping timeout: 264 seconds]
troydm has joined #ocaml
MrScout has joined #ocaml
MrScout has quit [Read error: Connection reset by peer]
MrScout has joined #ocaml
bendiken has quit [Ping timeout: 264 seconds]
struk|work has quit [Ping timeout: 246 seconds]
ncthom91 has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 244 seconds]
[[mark]] has joined #ocaml
ygrek has quit [Ping timeout: 255 seconds]
abbe_ has joined #ocaml
abbe has quit [Read error: Connection reset by peer]
ncthom91 has quit [Quit: Textual IRC Client: www.textualapp.com]
abbe_ is now known as abbe
enquora has quit [Quit: enquora]
bendiken has joined #ocaml
darkf has joined #ocaml
Cardoe has joined #ocaml
Cardoe has quit [Client Quit]
jao has quit [Ping timeout: 268 seconds]
damason_ has quit [Ping timeout: 264 seconds]
damason has joined #ocaml
demonimin has quit [Ping timeout: 240 seconds]
johnf_ has joined #ocaml
samrat has joined #ocaml
Algebr has joined #ocaml
native_killer has joined #ocaml
MercurialAlchemi has joined #ocaml
mcclurmc_ has joined #ocaml
mcclurmc has quit [Read error: Connection reset by peer]
<Algebr> Can C side code arbitrary change the value of a value argument in a C binding? I guess that would mean Seg fault? I'm just wondering about having a record with a mutable field, then that should be fine to mutable from C side?
kushal has joined #ocaml
swgillespie has joined #ocaml
tmtwd has quit [Ping timeout: 246 seconds]
native_killer has quit [Quit: Leaving]
<dsheets> Algebr, the ocaml gc can change the location of values so you can't keep pointers to them over a gc cycle
<dsheets> gc cycles can occur at any allocation
<dsheets> if you don't hold the runtime lock then another thread can run the gc
* dsheets falls asleep
<Algebr> say I have an ocaml side record of {mutable thing = bool}, Can't I just set it to false or true on the C side?
<Algebr> oh darn
<flux> "Assignments to the fields of structured blocks must be done with the Store_field macro (for normal blocks) or Store_double_field macro (for arrays and records of floating-point numbers). Other assignments must not use Store_field nor Store_double_field. "
<flux> you can assign it, as long as you do it the way Store_field does it.
<flux> algebr, ..did you read the "Interfacing C with OCaml" from the manual?-)
<Algebr> then the mutable keyword makes no difference on the C side?
<Algebr> yea, I have read it over and over but this is a nuanced topic
<flux> my understanding is that it's only for constraining the ocaml program
<flux> C program is pretty much able to break those constraints
<flux> of course, if you do break them, your OCaml program may work wrong in presence of optimizations
<flux> ..in some point of future perhaps :)
<Algebr> So like the labels in a record are gone by runtime, since a record and a tuple are the same
samrat has quit [Ping timeout: 272 seconds]
<flux> yes
<Algebr> then why use tuples at all, since there's no performance hit vs a record, might as well.
<Algebr> use records all the time you use a tuple currently
<flux> well, tuples don't have labels for one :)
<flux> when you just want to have a pair or triple of values, it's nice!
<flux> but you could replace all them with type ('a, 'b) pair = { first : 'a; second : 'b }
NingaLeaf has quit [Quit: Leaving]
<Algebr> sigh, I keep getting a seg fault in caml_modify
NingaLeaf has joined #ocaml
slash^ has joined #ocaml
<Algebr> found it, my own stupidity. I am coding spoiled by a type system.
jeffmo has quit [Quit: jeffmo]
damason has quit [Ping timeout: 252 seconds]
damason has joined #ocaml
lolisa has joined #ocaml
NingaLeaf has quit [Quit: Leaving.]
Submarine has quit [Read error: Connection reset by peer]
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
damason has quit [Ping timeout: 255 seconds]
MrScout has quit [Ping timeout: 244 seconds]
raichoo has joined #ocaml
obadz has quit [Ping timeout: 240 seconds]
obadz has joined #ocaml
bendiken has joined #ocaml
bendiken has quit [Ping timeout: 240 seconds]
Algebr has quit [Ping timeout: 264 seconds]
tmtwd has joined #ocaml
bjorkintosh has quit [Ping timeout: 272 seconds]
jeffmo has joined #ocaml
teiresias has quit [Ping timeout: 250 seconds]
teiresias has joined #ocaml
raichoo has quit [Ping timeout: 256 seconds]
Algebr has joined #ocaml
ely-se has joined #ocaml
elfring has joined #ocaml
<elfring> Do you know any analysis tools which can display call graphs for OCaml source files?
<flux> no, but at least it's not difficult to create module dependency graphs
<flux> with ocamldep and a bit scripting.
raichoo has joined #ocaml
<flux> oh, and I guess ocamldoc does that already
<flux> the tool you are proposing would be interesting, though, but it might be a bit difficult to implement in presence of ie. functors
<mrvn> no more than first class modules
<Algebr> Why would stuff like that mess up a dependency graph
<mrvn> hardest would be local modules opened from global values.
<mrvn> module refs
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<flux> mrvn, I think yes more, but it depends where you would want to draw the line to
swgillespie has joined #ocaml
<flux> mrvn, in case of first class modules you would draw the dependency from where the first class modules is created at, not where it's used at
<flux> doing the latter would be basically impossible anyway
<flux> unless you create the dependency graphi in a dynamic fashion at runtime (that would be cool too, though)
<mrvn> flux: normaly a first class module is the same as a record with functions.
<mrvn> it only gets difficult when it gets mutable.
<flux> mrvn, and if I pass a record I would expect the dependencies to point to the place where I create the record, so pretty much the same.
swgillespie has quit [Client Quit]
<mrvn> flux: in a call graph you need the method getting called
<flux> mrvn, the dependency would then be drawn from the call site to the signature definition
<flux> mrvn, it would be impossible to draw it actually to the implementation (if doing it statically)
<mrvn> depends on the case. most would probably trivial and you could trace which module gets passed and then point to the concret function.
<flux> foo (if Random.bool () then (module1) else (module2)) - but you still need to handle that, even if you have a secret sauce to handle special cases
larhat has joined #ocaml
<mrvn> flux: that problem at least doesn't exist with functors.
<mrvn> or can you do it there too without involving local modules?
<flux> but same piece of code can be instantiated with multiple different functors
<flux> hmm, I suppose that's not the problem
<flux> same problem with anything :-)
<Algebr> What is the most modern/maintained utf library? Camomile was deprecated, right
<flux> camomile was deprecated?
<mrvn> worst case is: let m = ref (M);
<Algebr> I thought it was?
<flux> well, it's news to me :)
Haudegen has quit [Ping timeout: 264 seconds]
<flux> but if you don't need full unicide support, there are smaller alternatives
<Algebr> I want emojis
tmtwd has quit [Ping timeout: 240 seconds]
<Algebr> I remember being able to do it with camomile
<flux> what does it mean to be able to do it?
<flux> is it different from being able to do the letter ä?
<Algebr> I think it means I was able to figure out how to use the libary =P
<flux> find an emoji unicode character, copy and paste :-)
<Algebr> lol
<flux> what camomile I understand really provides, is things like case-insensitive string comparisons, uppercase/lowercase, ordering comparisons, etc..
<flux> unicode-compatible regexp-matching, all 8-, 16-, and 32-bit encodings, unicode substrings, unicode character map/set, .. and that's maybe it
<flux> algebr, I can print emojis without any unicode library: Printf.printf "\xF0\x9F\x98\x81"
Haudegen has joined #ocaml
slash^ has left #ocaml [#ocaml]
<flux> so a bit better approach is to get the unicode symbol number and convert that to string
<flux> well, I'm not sure how it's better. perhaps cleaner.
<Algebr> yea but I mean I want something to handle stuff like I give a unicode code adn you print it out
<Algebr> ah, yea, you said that
MercurialAlchemi has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
<flux> I think this is the reason why other unicode libraries are a bit more popular nowadays:
<flux> let b = UTF8.Buf.create 10 in UTF8.Buf.add_char b (UChar.chr 0x1f601); Printf.printf "%s\n" (UTF8.Buf.contents b)
<flux> or maybe there's a shorter way..
larhat has quit [Quit: Leaving.]
MercurialAlchemi has joined #ocaml
octachron has joined #ocaml
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 244 seconds]
xet7_ has quit [Remote host closed the connection]
xet7_ has joined #ocaml
moei has quit [Quit: Leaving...]
bjorkintosh has joined #ocaml
darkf_ is now known as darkf
ely-se has quit [Quit: leaving]
ely-se has joined #ocaml
moei has joined #ocaml
demonimin has joined #ocaml
demonimin has joined #ocaml
oriba has joined #ocaml
<oriba> there is some new stuff in OCaml (?), ppx-extensions. Whats that about? Is this for OCaml-AST-parsing? Is this OCaml-internal replacement for the external CamlP4/5?
lolisa has quit [Quit: meow]
<oriba> companion_cube: thx
ely-se is now known as heavy_duty_super
heavy_duty_super is now known as ely-se
<ely-se> aww
<ely-se> wanted to change my nickname to heavy_duty_super_colliding_super_button so I could be closer to companion_cube
<companion_cube> as long as you don't change for aperture_science_emergency_incinerator
Algebr has quit [Ping timeout: 265 seconds]
mea-culp` has joined #ocaml
mea-culpa has quit [Ping timeout: 240 seconds]
grouzen has joined #ocaml
Kakadu has joined #ocaml
tibor has quit [Ping timeout: 246 seconds]
[[mark]] has quit [Quit: ChatZilla 0.9.92 [Firefox 40.0.3/20150826023504]]
kushal has quit [Quit: Leaving]
ely-se has quit [Quit: leaving]
ely-se has joined #ocaml
bendiken has joined #ocaml
oriba has quit [Quit: WeeChat 1.3]
zpe has quit [Remote host closed the connection]
BhavyaM has joined #ocaml
<elfring> How often do you stumble on a message like "Error: Unbound value <Module>.<function>" during software development?
<elfring> How do you try to resolve such difficulties around function name binding?
<flux> 1) rarely 2) use the right function :)
ely-se has quit [Quit: leaving]
<elfring> Would anybody like to try here if such an error message can be reproduced for another bit of free software on a test system?
browncodes has quit [Ping timeout: 256 seconds]
mea-culp` is now known as mea-culpa
mea-culp` has joined #ocaml
mea-culpa has quit [Ping timeout: 252 seconds]
demonimin has quit [Remote host closed the connection]
demonimin has joined #ocaml
rand000 has joined #ocaml
psy_ has quit [Ping timeout: 252 seconds]
zpe has joined #ocaml
julienXX has quit [Max SendQ exceeded]
julienXX has joined #ocaml
kolko has quit [Quit: ZNC - http://znc.in]
zpe has quit [Read error: Connection reset by peer]
kolko has joined #ocaml
zpe has joined #ocaml
AlexRussia has quit [Read error: Connection reset by peer]
elfring has quit [Quit: Konversation terminated!]
elfring has joined #ocaml
mea-culp` has quit [Read error: Connection reset by peer]
ely-se has joined #ocaml
kolko has quit [Remote host closed the connection]
slash^ has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ely-se has quit [Client Quit]
bendiken has joined #ocaml
mea-culpa has joined #ocaml
nicoo_ has joined #ocaml
jeffmo_ has joined #ocaml
Khady_ has joined #ocaml
kolko has joined #ocaml
nicoo has quit [Read error: Connection reset by peer]
Khady has quit [Quit: No Ping reply in 180 seconds.]
jeffmo has quit [Read error: Connection reset by peer]
jeffmo_ is now known as jeffmo
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
Khady_ is now known as Khady
NingaLeaf has joined #ocaml
kushal has joined #ocaml
NingaLeaf has left #ocaml [#ocaml]
ely-se has joined #ocaml
tennix has quit [Ping timeout: 255 seconds]
kushal has quit [Ping timeout: 240 seconds]
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ely-se has quit [Client Quit]
_andre has joined #ocaml
bendiken has joined #ocaml
picachu has joined #ocaml
jeffmo has quit [Quit: jeffmo]
dsheets has quit [Ping timeout: 244 seconds]
kushal has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
teiresias has quit [Ping timeout: 250 seconds]
bendiken has joined #ocaml
nicoo_ is now known as nicoo
teiresias has joined #ocaml
yomimono has joined #ocaml
BitPuffin has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
ely-se has joined #ocaml
ollehar has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
igoroliveira has joined #ocaml
zpe has joined #ocaml
ely-se has quit [Quit: leaving]
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
ely-se has joined #ocaml
Simn has joined #ocaml
mort___ has joined #ocaml
ely-se has quit [Quit: leaving]
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
nicoo has quit [Ping timeout: 260 seconds]
bendiken has quit [Read error: Connection reset by peer]
bendiken has joined #ocaml
octachron has quit [Quit: Leaving]
Haudegen has quit [Ping timeout: 272 seconds]
yomimono has quit [Ping timeout: 244 seconds]
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
tennix has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
Haudegen has joined #ocaml
ryanartecona has joined #ocaml
ely-se has joined #ocaml
tennix has quit [Ping timeout: 244 seconds]
picachu has quit [Read error: Connection reset by peer]
grouzen has quit [Ping timeout: 244 seconds]
ely-se has quit [Client Quit]
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
nicoo has joined #ocaml
nicoo has quit [Client Quit]
nicoo has joined #ocaml
tennix has joined #ocaml
tennix has quit [Ping timeout: 272 seconds]
enjolras_ has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
kushal has quit [Quit: Leaving]
BhavyaM has quit [Quit: Quit the channel]
tennix has joined #ocaml
Cardoe has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
tennix has quit [Ping timeout: 264 seconds]
tennix has joined #ocaml
ely-se has joined #ocaml
ely-se has quit [Client Quit]
tennix has quit [Ping timeout: 264 seconds]
kushal has joined #ocaml
tennix has joined #ocaml
mort___1 has joined #ocaml
tennix has quit [Ping timeout: 246 seconds]
mort___ has quit [Ping timeout: 250 seconds]
Muzer has quit [Excess Flood]
Muzer has joined #ocaml
yomimono has joined #ocaml
tennix has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
kdas_ has joined #ocaml
tennix has quit [Ping timeout: 252 seconds]
kushal has quit [Ping timeout: 264 seconds]
ryanartecona has quit [Ping timeout: 264 seconds]
enquora has joined #ocaml
enjolras_ has left #ocaml [#ocaml]
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
kdas_ is now known as kushal
kushal is now known as Guest56188
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
Guest56188 is now known as kushal
kushal has quit [Changing host]
kushal has joined #ocaml
tomboy64 is now known as tomboy64|beginne
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
samrat has joined #ocaml
bendiken has joined #ocaml
Denommus has quit [Ping timeout: 246 seconds]
kdas_ has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kdas_ has quit [Read error: Connection reset by peer]
bendiken has joined #ocaml
kushal has quit [Ping timeout: 250 seconds]
tennix has joined #ocaml
ousado has quit [Ping timeout: 264 seconds]
Denommus has joined #ocaml
ollehar has quit [Ping timeout: 240 seconds]
tennix has quit [Ping timeout: 250 seconds]
ousado has joined #ocaml
ousado has quit [Changing host]
ousado has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
yomimono has quit [Ping timeout: 264 seconds]
tennix has joined #ocaml
kushal has joined #ocaml
raichoo has quit [Ping timeout: 244 seconds]
tennix has quit [Ping timeout: 240 seconds]
jwatzman|work has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
tennix has joined #ocaml
ely-se has joined #ocaml
yomimono has joined #ocaml
tennix has quit [Ping timeout: 250 seconds]
_whitelogger has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
tennix has joined #ocaml
yomimono has quit [Ping timeout: 264 seconds]
Denommus` has joined #ocaml
Denommus has quit [Read error: Connection reset by peer]
picachu has joined #ocaml
tennix has quit [Ping timeout: 250 seconds]
Wickoo has joined #ocaml
Wickoo has quit [Client Quit]
ely-se has quit [Quit: leaving]
grouzen has joined #ocaml
ely-se has joined #ocaml
tennix has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
BitPuffin has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
ely-se is now known as ravraa
tennix has quit [Ping timeout: 250 seconds]
sh0t has joined #ocaml
samrat has quit [Ping timeout: 264 seconds]
tennix has joined #ocaml
yomimono has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
tennix has quit [Ping timeout: 240 seconds]
elfring has quit [Quit: Konversation terminated!]
samrat has joined #ocaml
tennix has joined #ocaml
ravraa has quit [Quit: leaving]
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
raichoo has joined #ocaml
yomimono has quit [Ping timeout: 256 seconds]
yomimono has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
tennix has quit [Ping timeout: 260 seconds]
tennix has joined #ocaml
sh0t has quit [Remote host closed the connection]
rand000 has quit [Ping timeout: 244 seconds]
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tennix has quit [Ping timeout: 246 seconds]
bendiken has joined #ocaml
Denommus` is now known as Denommus
tennix has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yomimono has quit [Ping timeout: 250 seconds]
bendiken has joined #ocaml
mort___1 has quit [Quit: Leaving.]
yomimono has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
enquora has quit [Quit: enquora]
oriba has joined #ocaml
jao has joined #ocaml
raichoo has quit [Ping timeout: 244 seconds]
grouzen has quit [Ping timeout: 250 seconds]
yomimono has quit [Ping timeout: 265 seconds]
yomimono has joined #ocaml
obadz- has joined #ocaml
ollehar has joined #ocaml
obadz has quit [Ping timeout: 240 seconds]
Guest38 has joined #ocaml
Guest38 has quit [Client Quit]
Guest38 has joined #ocaml
ollehar has quit [Ping timeout: 255 seconds]
samrat has quit [Ping timeout: 244 seconds]
samrat has joined #ocaml
ollehar has joined #ocaml
samrat has quit [Ping timeout: 252 seconds]
slash^ has left #ocaml [#ocaml]
picachu has quit [Ping timeout: 246 seconds]
grouzen has joined #ocaml
Muzer has quit [Excess Flood]
tibor has joined #ocaml
<tibor> Hi
<tibor> May I have a question?
<ollehar> tibor: shoot
<tibor> Can someone tell me, how can I have a pattern match to check the list elements for example "match a with | (El a) :: (El b) -> ..."
Muzer has joined #ocaml
tomboy64|beginne is now known as tomboy64
<tibor> I would like to check the elements type
<tibor> Is it posible?
rom1504 has left #ocaml [#ocaml]
<zozozo> tibor: well, first, lists in OCaml are homogeneous, meaning that all the elements of the lists have the same type
<companion_cube> no, types are checked at compile time
<mrvn> zozozo: except for type _ el = El : 'a -> unit el
picachu has joined #ocaml
Muzer has quit [Excess Flood]
<mrvn> But that is usualy a useless type because its like a black hole. things go in but they never come out
<mrvn> tibor: if you want different types in a list then you need to combine them into a single variant type and then put that into the list.
ollehar has quit [Ping timeout: 246 seconds]
<mrvn> tibor: then you can match on the variants constructors as well as the list.
Muzer has joined #ocaml
psy_ has joined #ocaml
<tibor> How can I match the variant constructors? Which is the syntax?
darkf has quit [Ping timeout: 246 seconds]
<tibor> I'm sorry, I'm very busy now :(
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ncthom91 has joined #ocaml
bendiken has joined #ocaml
raichoo has joined #ocaml
ingsoc has joined #ocaml
<dmbaturin> tibor: match xs with (`Foo _) :: (`Bar _) -> ...
<dmbaturin> * (`Foo _) :: (`Bar _) :: _
<zozozo> mrvn: sure, but even then, the list elements technically have the same type, ^^
<dmbaturin> Polymorphic variant constructors are prefixed with ` and they are checked at runtime. You don't have to declare those types even, it will be automatically inferred as [> `Foo of something | `Bar of something]
ryanartecona has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jeffmo has joined #ocaml
tennix has quit [Ping timeout: 272 seconds]
bendiken has joined #ocaml
tennix has joined #ocaml
<tibor> dmbaturin: thank you
jeffmo has quit [Ping timeout: 264 seconds]
obadz- is now known as obadz
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
picachu has quit [Quit: Saliendo]
tennix has quit [Ping timeout: 240 seconds]
tennix has joined #ocaml
larhat has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
Kakadu has quit [Quit: Page closed]
jeffmo has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
BitPuffin has quit [Ping timeout: 264 seconds]
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
kdas_ has joined #ocaml
kushal has quit [Ping timeout: 240 seconds]
ygrek has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
tane has joined #ocaml
zpe has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kdas_ is now known as kushal
kushal has quit [Changing host]
kushal has joined #ocaml
bendiken has joined #ocaml
moei has quit [Quit: Leaving...]
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
tennix has quit [Ping timeout: 272 seconds]
tennix has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Algebr has joined #ocaml
bendiken has joined #ocaml
rand000 has joined #ocaml
zpe has quit [Remote host closed the connection]
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yomimono has quit [Ping timeout: 265 seconds]
bendiken has joined #ocaml
ollehar has joined #ocaml
Kakadu has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
ollehar has quit [Ping timeout: 246 seconds]
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
Simn has quit [Quit: Leaving]
MrScout has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
sinelaw has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
sinelaw has quit [Ping timeout: 272 seconds]
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
MercurialAlchemi has quit [Ping timeout: 252 seconds]
bendiken has joined #ocaml
sinelaw has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
_andre has quit [Quit: leaving]
<sinelaw> what's a good reference to the type theory behind optional arguments?
ollehar has joined #ocaml
<mrvn> sinelaw: there is non
<mrvn> e
<mrvn> optional argument are syntactic suggar for 'a option
ygrek has quit [Ping timeout: 264 seconds]
<mrvn> and default values are more syntactic suggar for "let name = match name with None -> default | Some x -> x in"
<oriba> intersting! :)
LnL has quit [Quit: ZNC - http://znc.in]
<Drup> mrvn: it's not completely true, there are some interesting bits about the heuristic for function application
ollehar has quit [Ping timeout: 256 seconds]
<mrvn> Drup: heuristic? Isn't the labeled argument a sure thing?
<sinelaw> why won't this compile?
<sinelaw> let f ?(x=1) y = x * y;;
<sinelaw> let g h x y = h x y;;
<sinelaw> let foo = g f;; <--- error
tane has quit [Quit: Verlassend]
<mrvn> Error: This expression has type int -> int but an expression was expected of type int -> 'a -> 'b Type int is not compatible with type 'a -> 'b
<Drup> mrvn: yes, but it has a bias
<mrvn> sinelaw: labeled argument
<Drup> like the fact that sinelaw's example doesn't work, because arrows don't unify exactly the same way
<mrvn> arguments with label always need the label. Don't see any heuristic there.
<sinelaw> mrvn, what label?
<sinelaw> Drup, exactly
<Drup> mrvn: except that's false
<mrvn> sinelaw: ?(x=1) is a labeled argument
<Drup> if the application is complete, you don't need the label
<sinelaw> Drup, so where are these points documented or discussed? is there a paper?
<mrvn> # f 1 2;;
<mrvn> Error: The function applied to this argument has type ?x:int -> int
<mrvn> This argument cannot be applied without label
<mrvn> Drup: still needs a label
<mrvn> Drup: what case are you thinking about?
<sinelaw> thanks
<Drup> mrvn: let f ~x ~y = x + y in f 3 4 ;;
<Drup> no labels.
<Drup> works just fine
<mrvn> Drup: ahh, because you have only labeled arguments, not a mixture.
<mrvn> didn't know that would work.
<Drup> let f ~x y = x + y in f 3 4 ;;
<Drup> still working.
kushal has quit [Quit: Leaving]
<mrvn> Drup: I stand corrected. What I said only applies to optional/default arguments because they can be skipped.
<Drup> the manual explains the heuristic that is used
<Drup> mrvn: even for optional argument, it's more complicated
yomimono has joined #ocaml
Guest38 has quit [Read error: Connection reset by peer]
Guest38 has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
Algebr has quit [Remote host closed the connection]
cball has quit [Quit: Leaving]
sinelaw has quit [Quit: Leaving]
cball has joined #ocaml
damason has joined #ocaml
ingsoc has quit [Remote host closed the connection]
cball has quit [Ping timeout: 244 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
ryanartecona has joined #ocaml
Haudegen has quit [Ping timeout: 260 seconds]
jabesed has joined #ocaml
jabesed has quit [Client Quit]
jabesed has joined #ocaml
jabesed has quit [Client Quit]
jabesed has joined #ocaml
jabesed has quit [Client Quit]
Haudegen has joined #ocaml
jabesed has joined #ocaml
jabesed has quit [Client Quit]
BitPuffin|osx has joined #ocaml
<apache2> if I have a `type x = bytes` that is opaque (`type x` in the .mli), how do I write a "bytes_of_x" function (in the library)?
ollehar has joined #ocaml
tg has quit [Ping timeout: 264 seconds]
Cardoe has quit [Quit: Cardoe]
tg has joined #ocaml
shinnya has joined #ocaml
raichoo has quit [Ping timeout: 256 seconds]
raichoo1 has joined #ocaml
ryanartecona has quit [Ping timeout: 268 seconds]
mcc has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
tmtwd has joined #ocaml
ncthom91 has quit [Quit: Textual IRC Client: www.textualapp.com]
cball has joined #ocaml
Muzer has quit [Excess Flood]
Muzer has joined #ocaml
Kakadu has quit [Remote host closed the connection]
MrScout has quit [Remote host closed the connection]
theblatt1 has joined #ocaml
theblatte has quit [Ping timeout: 264 seconds]
yomimono has quit [Ping timeout: 246 seconds]
clog has quit [Ping timeout: 256 seconds]
mcclurmc_ has quit [Remote host closed the connection]
ollehar1 has joined #ocaml
ollehar has quit [Ping timeout: 252 seconds]
ollehar1 is now known as ollehar
Haudegen has quit [Ping timeout: 264 seconds]
raichoo1 has quit [Ping timeout: 250 seconds]
larhat has quit [Quit: Leaving.]
Haudegen has joined #ocaml
mcclurmc has joined #ocaml
oriba has quit [Quit: WeeChat 1.3]
tmtwd has quit [Ping timeout: 265 seconds]
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
jeffmo has quit [Quit: jeffmo]
ygrek has joined #ocaml