ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.1 announcement at http://ocaml.org/releases/4.02.html | Public channel logs at http://irclog.whitequark.org/ocaml
axiles has joined #ocaml
vanila has quit [Quit: Leaving]
pyon is now known as idem-pyon-tent
rand000 has quit [Quit: leaving]
Simn has quit [Quit: Leaving]
ghostpl_ has joined #ocaml
ghostpl_ has quit [Ping timeout: 250 seconds]
ptc has joined #ocaml
jao has joined #ocaml
ptc is now known as Guest28508
jao has quit [Changing host]
jao has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
Guest28508 has quit [Ping timeout: 256 seconds]
madroach has joined #ocaml
ptc_ has joined #ocaml
skinkitten has joined #ocaml
idem-pyon-tent has quit [Quit: fix config]
mabino-pyon has joined #ocaml
Algebr has joined #ocaml
reem has joined #ocaml
rgrinberg has quit [Ping timeout: 264 seconds]
swgillespie has joined #ocaml
swgillespie has quit [Max SendQ exceeded]
swgillespie has joined #ocaml
rgrinberg has joined #ocaml
Algebr has quit [Ping timeout: 245 seconds]
ollehar1 has quit [Quit: ollehar1]
cdidd has quit [Remote host closed the connection]
Thooms has quit [Quit: WeeChat 1.0.1]
rgrinberg has quit [Ping timeout: 264 seconds]
darnuria has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
darnuria has joined #ocaml
reem has quit [Remote host closed the connection]
raphaelss has quit [Ping timeout: 250 seconds]
reem has joined #ocaml
darnuria has quit [Remote host closed the connection]
mcclurmc has quit [Remote host closed the connection]
darnuria has joined #ocaml
darnuria has quit [Client Quit]
darnuria has joined #ocaml
reem has quit [Remote host closed the connection]
darkf has joined #ocaml
reem has joined #ocaml
rgrinberg1 has joined #ocaml
BitPuffin has joined #ocaml
kcking has joined #ocaml
jao has quit [Ping timeout: 245 seconds]
rgrinberg has quit [Ping timeout: 250 seconds]
badon has quit [Quit: Leaving]
nullcat has joined #ocaml
ptc_ has quit [Ping timeout: 246 seconds]
reem has quit [Remote host closed the connection]
ghostpl_ has joined #ocaml
ghostpl_ has quit [Ping timeout: 244 seconds]
ygrek has joined #ocaml
badon has joined #ocaml
struktured has joined #ocaml
rgrinberg1 has quit [Ping timeout: 250 seconds]
rgrinberg has joined #ocaml
darnuria has quit [Quit: WeeChat 1.2-dev]
darnuria has joined #ocaml
skinkitten has quit [Quit: Leaving]
enitiz has quit [Ping timeout: 250 seconds]
BitPuffin has quit [Ping timeout: 244 seconds]
rgrinberg has quit [Ping timeout: 252 seconds]
MooseAndCaml has joined #ocaml
<MooseAndCaml> Hi, can someone take a look at this: https://gist.github.com/caseybasichis/194bd79e7ac3a8942851 My function is compiling thought the emacs toplevel font is different for part and is reports an error expecting another type when it runs... is the color signaling somthing?
<MooseAndCaml> I retyped that due to the horrible grammar - sorry for the repeat : My function is compiling, though the emacs toplevel font is different exactly over the broken function. It reports an error expecting another type when it runs... is the color signaling something?
rgrinberg has joined #ocaml
ptc has joined #ocaml
ptc is now known as Guest78016
rgrinberg has quit [Ping timeout: 244 seconds]
rgrinberg has joined #ocaml
enitiz has joined #ocaml
<struktured> either I don't understand qtest or qtest is lying to me
rgrinberg has quit [Ping timeout: 252 seconds]
oriba has quit [Quit: Verlassend]
Algebr has joined #ocaml
ghostpl_ has joined #ocaml
ghostpl_ has quit [Ping timeout: 240 seconds]
yminsky has joined #ocaml
q66 has quit [Quit: Leaving]
yminsky has quit [Quit: yminsky]
MrScout has quit [Ping timeout: 265 seconds]
yminsky has joined #ocaml
kcking has quit [Quit: kcking]
badkins has quit [Remote host closed the connection]
Guest78016 has quit [Ping timeout: 245 seconds]
ygrek has quit [Ping timeout: 245 seconds]
Algebr has quit [Ping timeout: 252 seconds]
reem has joined #ocaml
monoprotic has quit [Ping timeout: 255 seconds]
yminsky has quit [Quit: yminsky]
reem has quit [Ping timeout: 264 seconds]
monoprotic has joined #ocaml
ebzzry has quit [Remote host closed the connection]
enitiz has quit [Ping timeout: 245 seconds]
ghostpl_ has joined #ocaml
ghostpl_ has quit [Ping timeout: 245 seconds]
ygrek has joined #ocaml
mcclurmc has joined #ocaml
MrScout has joined #ocaml
badkins has joined #ocaml
badkins has quit [Ping timeout: 250 seconds]
AlexRussia has quit [Ping timeout: 244 seconds]
rgrinberg has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
moei has quit [Quit: Leaving...]
moei has joined #ocaml
AlexRussia has joined #ocaml
ygrek has quit [Ping timeout: 264 seconds]
slash^ has joined #ocaml
Kakadu has joined #ocaml
mort___ has joined #ocaml
ygrek has joined #ocaml
ghostpl_ has joined #ocaml
ghostpl_ has quit [Ping timeout: 264 seconds]
hilquias has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
mort___ has quit [Quit: Leaving.]
Submarine has joined #ocaml
reem has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
ghostpl_ has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mort___ has joined #ocaml
ghostpl_ has quit [Ping timeout: 252 seconds]
ygrek has joined #ocaml
Simn has joined #ocaml
LordBrain has joined #ocaml
<LordBrain> Hello
keen__________70 has joined #ocaml
<LordBrain> this notation got me: [|1; 3|] a.(i)
<Kakadu> morning,
<LordBrain> hi kakadu
<Kakadu> can I write something like include Map.S with type key = Pos.t and type 'a t = string list t ?
<Kakadu> LordBrain: So, what is the issue?
keen__________69 has quit [Ping timeout: 264 seconds]
<LordBrain> i am trying to adapt my haskell knowledge to see if i can learn caml in a hurry
<Kakadu> [| .. |] constructs and array
<LordBrain> but i didn't understand that, what is the 1 and 3 doing there? this is supposedly equivalent to haskell readArray a i
<Kakadu> a.(i) is access
<LordBrain> oh
<LordBrain> so he just left out hte haskell equivalent on that line, confusing me
<Kakadu> yep
MooseAndCaml has quit [Ping timeout: 246 seconds]
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
<dmbaturin> LordBrain: Also, typography for polymorphic variants is wrong there. The constructors should be `Foo, not 'Foo
<LordBrain> oh
<LordBrain> type 'a tree = Node of 'a * 'a tree * 'a tree | Leaf;;
<LordBrain> is that wrong?
<LordBrain> should they be backticks?
<Kakadu> It's OK
<dmbaturin> No, this is right. [> 'Integer of int | 'Real of float] is wrong.
<LordBrain> ok
reem has quit [Remote host closed the connection]
<dmbaturin> Single apostrophe in front of a name signifies a type variable.
reem has joined #ocaml
<LordBrain> so the polymorphic type variables get a forward tick, but these Constructors get a back tick
<LordBrain> now, those back-ticked constructors, i haven't pieced together yet how they are different from regular constructors
<LordBrain> as in the data constructors i am used to in haskell
<LordBrain> or in this case i suppose type constructors
<LordBrain> or is that it? backtick for type constructor and bare for data constructor?
<dmbaturin> Data constructors of open sum types (aka polymorphic variants) get a backtick.
<LordBrain> ok
<dmbaturin> Sadly, no direct links to sections. :)
<dmbaturin> Also, ;; is only needed in the REPL.
captain_furious has joined #ocaml
<LordBrain> ok, the difference basically is that its open, as in other constructors might be accepted as well, haskell doesnt quite have an equivalent to that.
<LordBrain> well, type families i suppose
cdidd has joined #ocaml
<dmbaturin> Yep. Normal sum types can't be expanded, just like in haskell, while backticked ones can.
<adrien> open types, soon! :P
<dmbaturin> yojson is a good example of a library that uses them.
<LordBrain> i'm familiar with the word sum type and product type, the haskell people don't use the word variant, although i vaguely recall something called a variant in perl 6?
mort___ has quit [Quit: Leaving.]
<dmbaturin> LordBrain: Another thing, ocamlc -i can dump inferred types of the bindings. ocamlc -i ./file.ml > ./file.mli is the easiest way to produce a .mli
<LordBrain> yes i need that, thankyou
<dmbaturin> I think the term stems from "variant records" in older languages, in particular those designed by Wirth.
<LordBrain> i'm looking at source code to hlvm, and i notice he defines variants with backtick constructors but he did not use the > symbol when he opened the bracket
<LordBrain> type t = [ `Unit (* ... *)
<LordBrain> the link you gave me i only skimmed, but i saw that they said the > means these and maybe more constructors while a < means no more than these.
<LordBrain> so what if neither as above?
<Kakadu> exactly like these?
<LordBrain> you used a question mark... are you unsure?
<LordBrain> wouldnt that make type Color = | Red | Blue ;; exactly the same as type Color = [`Red | `Blue ] ;; ?
<Kakadu> sort of
avsm has joined #ocaml
<LordBrain> well, what is the difference?
<Kakadu> Having [> and [< without [= would be weird
pgomes has joined #ocaml
<Kakadu> difference is tricky
avsm1 has joined #ocaml
<Kakadu> for one hand there is no one
<Kakadu> for another if you have [ `A|`B ] you can use it and upcast to [`A|`B|`C] if needed
<LordBrain> i think it is sort of a hint that this is polymorphic
<Kakadu> for classical variants you can get some warnings during matching 1st ones
<Kakadu> about exhaustiveness
rgrinberg has quit [Quit: Leaving.]
* Kakadu hopes that it should be written like that
avsm has quit [Ping timeout: 244 seconds]
<LordBrain> ok
<dmbaturin> type 'a foo = [> `Foo of 'a | `Bar of 'a ] as 'a;; (* This won't work without > *)
<dmbaturin> But I never used this kind of types in practice yet.
<dmbaturin> Or maybe it will.
<LordBrain> i suspect it will because thats what i see in HLVM source
<dmbaturin> I should read relevant docs carefully in case I'll need complicated polymorphic variants. :)
<LordBrain> without the as 'a
<LordBrain> i don't suppose anyone has built a ocaml to haskell translator?
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dmbaturin> I don't think so. The difference between the two is big enough to make only a small subset mechanically translatable.
<dmbaturin> Although it could make a good course project. :)
<LordBrain> i really miss having toplevel type signatures
<LordBrain> even tho they're not required in haskell, they are the convention
<dmbaturin> Merlin can show you them.
<LordBrain> what's that?
<LordBrain> what if the file does not compile, can it show them then?
<LordBrain> ocamlc -i did not work
pgomes has quit [Ping timeout: 265 seconds]
reem has quit [Remote host closed the connection]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
avsm1 has quit [Ping timeout: 252 seconds]
avsm has joined #ocaml
Haudegen has quit [Ping timeout: 246 seconds]
avsm1 has joined #ocaml
avsm1 has quit [Client Quit]
avsm has quit [Ping timeout: 245 seconds]
Haudegen has joined #ocaml
badkins has joined #ocaml
<dmbaturin> LordBrain: Yes, it can show type of any expression within a file.
badkins has quit [Ping timeout: 246 seconds]
<dmbaturin> Also, you can use type annotations (let foo (x: int) (y: int) = ...).
larhat has joined #ocaml
<LordBrain> well i was hoping to understand someone elses code here
<LordBrain> getting maybe too mantally fatigued tho
<LordBrain> mentally
<LordBrain> been up all night
<LordBrain> His code doesnt compile and maybe it would if i just got an older llvm
<LordBrain> but just getting it to compile isn't hte ultimate goal anyway
tane has joined #ocaml
ghostpl_ has joined #ocaml
pgomes has joined #ocaml
LordBrain has quit [Quit: Leaving]
lordkryss has joined #ocaml
ghostpl_ has quit [Ping timeout: 252 seconds]
reem has joined #ocaml
psy_ has quit [Ping timeout: 252 seconds]
psy_ has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
reem has quit [Remote host closed the connection]
rand000 has joined #ocaml
reem has joined #ocaml
captain_furious has quit [Ping timeout: 250 seconds]
reem has quit [Remote host closed the connection]
leowzukw has joined #ocaml
reem has joined #ocaml
reem has quit [Remote host closed the connection]
leowzukw has quit [Client Quit]
MercurialAlchemi has quit [Ping timeout: 246 seconds]
destrius_ has joined #ocaml
destrius has quit [Ping timeout: 245 seconds]
MrScout has quit [Remote host closed the connection]
haesbaert has joined #ocaml
<haesbaert> heya, is there a better idiom for this ?
<haesbaert> ignore (copyloop (In_channel.create file) Out_channel.stdout (Bytes.create 4096));;
<haesbaert> I just want to discard the return, force a unit type for the expression
yomimono has joined #ocaml
<tane> haesbaert, that's exactly what ignore does
dav has quit [Ping timeout: 250 seconds]
<haesbaert> I've just noticed adding the ;; in the end, without the ignore, seems to work as well
dav has joined #ocaml
<tane> without a warning?
<haesbaert> indeed
<dmbaturin> let () = ignore ...
<haesbaert> this in fact does not produce a warning: https://pbot.rmdir.de/99Y1tI-z-ArqYXZ-4PyE-A
<haesbaert> copyloop (In_channel.create file) Out_channel.stdout (Bytes.create 4096);;
<dmbaturin> Ah, inside a function. ignore is probably the best option.
<haesbaert> ah disregard, I've just noticed I changed the type of the expression after a last change in copylook.
<haesbaert> *loop
<haesbaert> dmbaturin: thanks
<haesbaert> sorry for the noise
<dmbaturin> ;; will likely screw it up if you want more than one statement there.
<haesbaert> what does ;; actually do ?
<dmbaturin> The alternative is "foo x; bar y; ()"
<haesbaert> in that context is the sequence operator called twice ?
<dmbaturin> ;; is a single token that is used as an expression separator of a sort. It should not be used outside of the REPL.
ghostpl_ has joined #ocaml
<haesbaert> REPL == toplevel ?
<dmbaturin> The interactive interpreter.
<haesbaert> ack
<dmbaturin> The word "toplevel" does create misunderstanding sometimes. :)
<haesbaert> I've just finished my way in "Real World Ocaml", so I'm quite virgin in ocaml
<haesbaert> just trying to write some basic unix utilities as an exercise.
vanila has joined #ocaml
<dmbaturin> haesbaert: Note: you don't have to use Core if you don't want to. :)
captain_furious has joined #ocaml
<dmbaturin> Whether you use it or not is your preference, but the reason RWO author used it is _their_ preference, not that it's required.
<haesbaert> I see, it just seemed the natural approach given the text, I realize what I'm using is in the stdlib
<haesbaert> oh except for the Command stuff.
ghostpl_ has quit [Ping timeout: 250 seconds]
captain_furious has quit [Quit: Leaving.]
kapil___ has joined #ocaml
<ousado> is there an option to enable a warning for unused functions?
<ousado> or a way to dump dead code elimination logs
<adrien> well
<adrien> you'd first need a ptch to make dead code elimination
<adrien> then you could have logs for it :)
rand000 has quit [Ping timeout: 252 seconds]
ygrek has joined #ocaml
<apache2> haesbaert: check out "commandliner"
ontologiae_ has joined #ocaml
ontologiae_ has quit [Ping timeout: 256 seconds]
Submarine has quit [Quit: Leaving]
ollehar1 has joined #ocaml
q66 has joined #ocaml
ollehar1 has quit [Ping timeout: 255 seconds]
larhat has quit [Read error: Connection reset by peer]
larhat has joined #ocaml
Kakadu has quit [Ping timeout: 264 seconds]
ggole has joined #ocaml
<nicoo> apache2, haesbaert : It is cmdliner :þ
<apache2> cmdliner is not part of Core
yminsky has joined #ocaml
<ousado> adrien: huh, I seem to remember avsm saying dead code elimination had been improved, and that significantly reduces the binary sizes of openmirage unikernels
<ousado> *that it
<mrvn> dead module elimination when using aliases has been implemented
<ousado> oh I see
<ousado> .. and how that can lead to significantly smaller binaries, too :)
rand000 has joined #ocaml
yminsky has quit [Quit: yminsky]
ghostpl_ has joined #ocaml
Kakadu has joined #ocaml
<Leonidas> cmdliner is well, not that easy to grasp, imho
ghostpl_ has quit [Ping timeout: 250 seconds]
badkins has joined #ocaml
badkins has quit [Ping timeout: 250 seconds]
MercurialAlchemi has joined #ocaml
MrScout has joined #ocaml
rand000 has quit [Ping timeout: 245 seconds]
MrScout has quit [Ping timeout: 250 seconds]
darkf has quit [Quit: Leaving]
reynir has quit [Quit: brb]
yminsky has joined #ocaml
reynir has joined #ocaml
reynir is now known as Guest59973
reem has joined #ocaml
Guest59973 has quit [Changing host]
Guest59973 has joined #ocaml
yminsky has quit [Client Quit]
kcking has joined #ocaml
reem has quit [Ping timeout: 246 seconds]
rand000 has joined #ocaml
Guest59973 is now known as reynir
yminsky has joined #ocaml
mcclurmc has joined #ocaml
reynir has quit [Quit: WeeChat 1.1.1]
reynir has joined #ocaml
yminsky has quit [Client Quit]
reynir has quit [Client Quit]
reynir has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
reynir has quit [Client Quit]
reynir has joined #ocaml
ontologiae_ has joined #ocaml
pgomes has quit [Quit: Leaving]
ontologiae_ has quit [Ping timeout: 246 seconds]
madroach has quit [Quit: leaving]
<nicoo> apache2: Oh, there is a "commandliner" in Core ?
<nicoo> Leonidas: Meh. It's just an applicative
reynir has quit [Quit: WeeChat 1.1.1]
<nicoo> Oh ... wait
kapil___ has quit [Quit: Connection closed for inactivity]
reynir has joined #ocaml
<nicoo> (More seriously, it is a bit strange at first, but has a rather clean and consistent design)
<apache2> Leonidas: what's your preferred lib?
<Leonidas> apache2: Cmdliner
<Leonidas> Arg is easy to use but I think its ugly how it handles references.
reynir has quit [Client Quit]
reynir has joined #ocaml
<tokenrove> i like cmdliner, too, but i have to admit that every time i use it it takes more time than i'm comfortable admitting to figure out how to use it again
mort___ has joined #ocaml
<dmbaturin> What may cause "OCaml and preprocessor have incompatible versions" if versions of ocaml and camlp4 are actually the same?
<dmbaturin> I'm trying to install lablgtk on windows.
ygrek has quit [Ping timeout: 264 seconds]
ontologiae_ has joined #ocaml
<MercurialAlchemi> dmbaturin: some path issue? you think they the same but they are not ?
Anarchos has joined #ocaml
<dmbaturin> Well, I checked that by hand.
<MercurialAlchemi> hmm
Anarchos has quit [Client Quit]
<dmbaturin> Maybe I should try building it completely from source.
Thooms has joined #ocaml
<reynir> tokenrove: I feel the same way about cmdliner
ontologiae_ has quit [Ping timeout: 252 seconds]
<adrien> dmbaturin: hmmm, what are you doing exactly?
<dmbaturin> adrien: Running build.ml in site-libs\lablgtk2 dir.
<adrien> why?
<adrien> site-libs looks like it's a lablgtk2 installed through godi or similar
<adrien> and therefore already installed
<dmbaturin> adrien: Because the installation instructions tell me to.
<adrien> let me check
<adrien> README.win32?
<dmbaturin> Yep.
<adrien> ah, I see
<adrien> Jacques always prepares the win32 distributions but I've never tracked what he does exactly
<adrien> dmbaturin: which environment btw?
<adrien> yeah, no idea what this script does and I don't really feel like take time to learn that today
<dmbaturin> adrien: In this case, winxp. I can find a win7 machine too.
<adrien> (especially since I definitely wouldn't be doing it the way this scripts seems to do it)
<adrien> XP!
<adrien> KILL!
<adrien> FIRE!
<adrien> DESTROY!
<adrien> seriously, get rid of that OS
<dmbaturin> That's a throaway VM that I resurrect from ancient snapshot once in a while.
<adrien> it's way too old and I personnaly don't "support" it
<adrien> imagine a libc from 1999
<adrien> it's lacking too many things
<dmbaturin> Ok, I'll try on a less ancient win32.
slash^ has quit [*.net *.split]
mearnsh has quit [*.net *.split]
justinjaffray has quit [*.net *.split]
ygu_ has quit [*.net *.split]
rom1504 has quit [*.net *.split]
tianon has quit [*.net *.split]
frankjeager has quit [*.net *.split]
adrien has quit [*.net *.split]
tcpc has quit [*.net *.split]
Drup has quit [*.net *.split]
jerith has quit [*.net *.split]
welterde has quit [*.net *.split]
Asmadeus has quit [*.net *.split]
n0v has quit [*.net *.split]
fold has quit [*.net *.split]
Khady has quit [*.net *.split]
gasche has quit [*.net *.split]
weykent has quit [*.net *.split]
mattrepl has quit [*.net *.split]
bbc has quit [*.net *.split]
Khady has joined #ocaml
Khady has joined #ocaml
jerith has joined #ocaml
ygu has joined #ocaml
justinjaffray has joined #ocaml
Asmadeus has joined #ocaml
adrien has joined #ocaml
frankjeager has joined #ocaml
tianon has joined #ocaml
gasche has joined #ocaml
weykent has joined #ocaml
tcpc has joined #ocaml
n0v has joined #ocaml
mattrepl has joined #ocaml
Drup has joined #ocaml
rom1504 has joined #ocaml
bbc has joined #ocaml
fold has joined #ocaml
martintrojer has quit [Quit: ZNC - http://znc.in]
ghostpl_ has joined #ocaml
slash^ has joined #ocaml
welterde has joined #ocaml
martintrojer has joined #ocaml
ghostpl_ has quit [Ping timeout: 252 seconds]
BitPuffin has joined #ocaml
AlexRussia has quit [Quit: WeeChat 1.2-dev]
BitPuffin has quit [Remote host closed the connection]
martintrojer has quit [Max SendQ exceeded]
AlexRussia has joined #ocaml
martintrojer has joined #ocaml
ygrek has joined #ocaml
BitPuffin has joined #ocaml
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
<dmbaturin> adrien_znc: Trying on a win7 machine now.
<adrien> it will probably fail quite similarly but at least it's an OS from which we can work on
BitPuffin has quit [Ping timeout: 244 seconds]
AlexRussia has quit [Quit: WeeChat 1.2-dev]
AlexRussia has joined #ocaml
<haesbaert> I keep coming across this idiom: https://pbot.rmdir.de/tYcMgoGpO-aIYqWr8Qlx6g
<haesbaert> I want ic to be bound, after the last match, so that I can close the channel
<adrien> this doesn't parse right for me
<haesbaert> oh sorry,it is incorrect
<haesbaert> I don't know how to fix it
<MercurialAlchemi> you want a finally?
<adrien> http://pastebin.notk.org/pastebin.php?show=d573ed466 would be how I'd indent it
<haesbaert> MercurialAlchemi: yes
<MercurialAlchemi> there is one in lwt
<tane> it seems haesbaert just wants to sequence operations
<tane> there is nothing to close in case of throw
<haesbaert> a finally would do, but I was trying to sequence I believe
<haesbaert> I'm not cathing the throw, on purpose
<haesbaert> it's fine for the program to die at that point
<tane> haesbaert, let () = expr in next_expr OR (expr); next_expr, if expr involves match etc
<haesbaert> leme try
<tane> otherwise it's not clear whether the ';' sequences the last pattern or the whole match
<dmbaturin> adrien_znc: http://pastie.org/private/cor0pbxe40wdmwk8cqqndw This is better. Where is said assembler binary usually comes from, and does it want it native or cygwin?
AlexRussia has quit [Read error: Connection reset by peer]
AlexRussia has joined #ocaml
<haesbaert> tane: great, got it !
<tane> haesbaert, that
<haesbaert> adrien: I'll change the indentation as you suggested
<haesbaert> so let () = .. is a common idiom for sequencing expressions ?
<tane> besides expr; next_expr, yes
<dmbaturin> haesbaert: Semicolon is used for sequences of expressions, but a sequence can evaluate to a value of any type.
leowzukw has joined #ocaml
<dmbaturin> let () = <expression> means just "match evaluated expression with the value of unit type", which is essentially "do nothing with its result".
<dmbaturin> let x = ignore <some expression> would bind x to (), which it not very useful.
<Simn> Is `let _ = <expression>` any different? That's what I normally use when I want to ignore the result.
<dmbaturin> But something like "let result = do_side_effect (); check_if_it_worked ()" matching might be useful is check_if_it_worked returns e.g. error code of do_side_effect.
<dmbaturin> Simn: Well, matching on () will catch if the type of the expression is not unit, while matching on _ will always succeed.
<Simn> Ah, so <expression> is of unit anyway, I see. Thanks!
<haesbaert> great, I had the same doubt concerning _ and ()
<dmbaturin> I think I switched to matching all stuff called for side effects with () after I did something like "let _ = some_fun x" where some_fun was 'a -> 'b -> 'c rather than 'a -> 'b and was very surprised by blank output. :)
<dmbaturin> Matching with () would be a type error.
<Leonidas> def`: isn't merlin available for sublime text too, somehow?
enitiz has joined #ocaml
<struktured> curse you qtest! you lie!
<struktured> I take the printed output of my failed test, run it in utop and it works. frustrating.
<dmbaturin> struktured: Prove your code correct, then publish a paper about it. That's what all cool people do. ;)
waneck has quit [Remote host closed the connection]
<struktured> dmbaturin: uh yeah a little outside the scope of my problem but provably correct code would be nice a compilation feature
jleroux has joined #ocaml
thomasga has joined #ocaml
captain_furious has joined #ocaml
<struktured> touche qtest, I was missing a critical line of the test
AlexRussia_ has joined #ocaml
AlexRussia has quit [Read error: Connection reset by peer]
AlexRussia_ has quit [Client Quit]
AlexRussia has joined #ocaml
ebzzry has joined #ocaml
ghostpl_ has joined #ocaml
<johnelse> noob GADT question - can anyone tell me why this doesn't compile? https://github.com/johnelse/gadt-experiments/blob/master/phantom/phantom.ml#L21-26
<johnelse> File "phantom.ml", line 23, characters 6-9:
<johnelse> Error: This pattern matches values of type foo but a pattern was expected which matches values of type a
<johnelse> which I kinda understand...but not sure where to go from here
<johnelse> basically I want to construct a container from a string and a type variable, eventually with some validation on the contents of the string
ghostpl_ has quit [Ping timeout: 255 seconds]
<ggole> You pretty much have to put Foo, Bar, Baz into a type
<johnelse> ok, rather than having them as three separate types?
<ggole> Yeah
<ggole> Well, you could keep them separate but have another (GADT) type that wrapped them
<ggole> type _ mark = FooM : foo mark | etc
<johnelse> ok, I'll give that a go, thanks :)
<ggole> And then let make_container : type a . a mark -> string -> a container = ...
nullcat_ has joined #ocaml
<johnelse> ggole: works perfectly, thank you!
snikkers has quit [Read error: No route to host]
nullcat_ has quit [Ping timeout: 264 seconds]
<ggole> Do you actually use the constructors, or are they just for tags?
<johnelse> ggole: I was thinking that the constructors would not be part of the public interface, so to create a container type you'd have to go through make_container
MrScout has joined #ocaml
MrScout has quit [Remote host closed the connection]
<ggole> I see
<ggole> But this way you've exposed other constructors in their place
kcking has quit [Quit: kcking]
<ggole> An alternative is to have make_foo, make_bar, etc
MrScout has joined #ocaml
<johnelse> ah, good point
<johnelse> then the mark type is redundant
kcking has joined #ocaml
MrScout has quit [Remote host closed the connection]
madroach has joined #ocaml
MrScout has joined #ocaml
MrScout has quit [Remote host closed the connection]
<struktured> man this randomized sampling of inputs feature in qtest is quite useful. ppx_test I understand can do the same though right?
MrScout has joined #ocaml
MrScout has quit [Remote host closed the connection]
MrScout has joined #ocaml
Intensity has joined #ocaml
MrScout has quit [Remote host closed the connection]
zpe has joined #ocaml
<Drup> I would advise against ppx qtest :x
<Drup> ppx_test*
zpe has quit [Remote host closed the connection]
Algebr has joined #ocaml
<struktured> Drup: why is that?
Anarchos has joined #ocaml
<Drup> it's ... properly well done.
<Drup> +not
<Drup> dmbaturin: just a note , open sum types ≠ polymorphic variant
<Drup> you're not the first one to use one term for the other, but they are different. :)
<Algebr> Drup: For lambda term, for the event handler functions, what is the meaning of the bool that they return? Some kind of successful event handling?
<Drup> It's the same than in javascript's Dom events, I think (except the semantic is reversed, iirc)
<dmbaturin> Drup: I knew someone will point it out. :)
Haudegen has quit [Ping timeout: 244 seconds]
<dmbaturin> Also, are open types already in mainline?
<Drup> yes
Haudegen has joined #ocaml
ghostpl_ has joined #ocaml
leowzukw has quit [Quit: Lost terminal]
ghostpl_ has quit [Ping timeout: 252 seconds]
mcclurmc has quit [Remote host closed the connection]
lopex has quit [Quit: Connection closed for inactivity]
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
mcclurmc has joined #ocaml
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
mearnsh has joined #ocaml
martintrojer has quit [Max SendQ exceeded]
<dmbaturin> adrien_znc: Ok, I've figured it out, seems to work now. Also, the readme doesn't tell you where to put the .dll's from bin (maybe it's obvious to windows users, not sure, but I had to try several locations before placing them in site-lib/lablgtk2).
martintrojer has joined #ocaml
mcclurmc has quit [Ping timeout: 250 seconds]
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
<Simn> I don't think there's anything that's obvious to windows users.
<Simn> (I'm a Windows user)
The_Mad_Pirate has quit [Read error: Connection reset by peer]
The_Mad_Pirate has joined #ocaml
waneck has joined #ocaml
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
<dmbaturin> * stublibs, not bin
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
lopex has joined #ocaml
kcking has quit [Quit: kcking]
martintrojer has quit [Max SendQ exceeded]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
tani has joined #ocaml
martintrojer has joined #ocaml
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
kcking has joined #ocaml
tane has quit [Ping timeout: 265 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<adrien> dmbaturin: .dll files go in bin
ggole has quit []
<dmbaturin> Hhm. Still, readme doesn't mention it. Should I send a patch against it?
<adrien> that would be appreciated
<def`> Leonidas: it is
Submarine has joined #ocaml
<adrien> oh, I thought open types weren't mainline yet
<adrien> very interesting :)
larhat has quit [Quit: Leaving.]
<Drup> adrien: that's because you are living in the past, also known as OCaml 3.12
<dmbaturin> I'm living in the past as well, known as 4.01
<dmbaturin> But I should fix it.
BitPuffin has joined #ocaml
<dmbaturin> adrien: Also, is there a manual on distributing binaries linked against lablgtk?
ptc has joined #ocaml
ptc is now known as Guest83135
captain_furious has quit [Ping timeout: 252 seconds]
slash^ has quit [Read error: Connection reset by peer]
Guest83135 has quit [Ping timeout: 265 seconds]
swgillespie has joined #ocaml
mcclurmc has joined #ocaml
ptc_ has joined #ocaml
<adrien> dmbaturin: same as for GTK+
<adrien> Drup: don't tell me you've managed to use all the new features introduced between 4.00.0 and 4.02.1 :)
<whitequark> I did
<adrien> for real-life stuff* :P
<whitequark> yes
mcclurmc has quit [Ping timeout: 244 seconds]
<adrien> but unlike you, Drup sometimes sleep :D
oskarth has quit [Read error: Network is unreachable]
S11001001 has quit [Read error: Connection reset by peer]
rfv has quit [Read error: Connection reset by peer]
andreypopp has quit [Read error: Connection reset by peer]
ggherdov has quit [Read error: Connection reset by peer]
regnat has quit [Ping timeout: 265 seconds]
flx has joined #ocaml
<Drup> let's see
<Drup> GADT: yes certainly
<Drup> exception in pattern matching: yes
mawuli has quit [Ping timeout: 265 seconds]
alpen has quit [Ping timeout: 265 seconds]
myyst has quit [Write error: Connection reset by peer]
<Drup> ppx: yes
<Drup> Generative functors: I considered the usage, but wanted to stay retro-compatible
struktured has quit [Remote host closed the connection]
myyst has joined #ocaml
ghostpl_ has joined #ocaml
rossberg has quit [Ping timeout: 265 seconds]
whitequark has quit [Ping timeout: 265 seconds]
<adrien> open types?
<Drup> extensible: yes, but I probably wouldn't qualify as real life :(
<Drup> it*
<adrien> :)
thegameg has quit [Ping timeout: 265 seconds]
myyst has quit [Read error: Connection reset by peer]
whitequark has joined #ocaml
welterde has quit [Ping timeout: 265 seconds]
Thooms has quit [Ping timeout: 265 seconds]
rbocquet has quit [Ping timeout: 265 seconds]
_habnabit has quit [Ping timeout: 265 seconds]
jonh has quit [Ping timeout: 265 seconds]
myyst has joined #ocaml
lordkryss has joined #ocaml
sgnb` has joined #ocaml
rfv has joined #ocaml
sgnb has quit [Ping timeout: 265 seconds]
flxx has quit [Ping timeout: 265 seconds]
rbocquet has joined #ocaml
jonh has joined #ocaml
Thooms has joined #ocaml
_habnabit has joined #ocaml
thegameg has joined #ocaml
rossberg has joined #ocaml
<reynir> solaris 11.2 ships OCaml 3.11.2
ghostpl_ has quit [Ping timeout: 264 seconds]
S11001001 has joined #ocaml
andreypopp has joined #ocaml
regnat has joined #ocaml
alpen has joined #ocaml
mawuli has joined #ocaml
enitiz has quit [Quit: Leaving]
enitiz has joined #ocaml
enitiz has quit [Read error: Connection reset by peer]
oskarth has joined #ocaml
welterde has joined #ocaml
<Leonidas> def`: where is the sublime text-glue code?
ggherdov has joined #ocaml
eventualbuddha has quit [Read error: Connection reset by peer]
eventualbuddha has joined #ocaml
mcclurmc has joined #ocaml
reem has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
kcking has quit [Quit: kcking]
mcclurmc has joined #ocaml
bitbckt has quit [Ping timeout: 250 seconds]
mcclurmc has quit [Ping timeout: 252 seconds]
<Leonidas> def`: ah. thanks
bitbckt has joined #ocaml
<Leonidas> companion_cube: I wonder, how do I get QCheck to work with multiple Arbitrary arguments?
c74d has quit [Read error: Connection reset by peer]
<Leonidas> e.g. I want to have a test that takes two QCheck.Arbitrary.float?
c74d has joined #ocaml
manud has joined #ocaml
<Leonidas> I settled for Arbitrary.pair for not
<Leonidas> *now
<adrien> Drup: oh, btw: next version of yypkg is moving to 4.01.0 ;-)
<Drup> :D
captain_furious has joined #ocaml
c74d has quit [Read error: Connection reset by peer]
reem has quit [Remote host closed the connection]
c74d has joined #ocaml
reem has joined #ocaml
reem has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 240 seconds]
Algebr has quit [Ping timeout: 252 seconds]
Algebr has joined #ocaml
manud has quit [Ping timeout: 264 seconds]
MrScout has joined #ocaml
Algebr has quit [Ping timeout: 265 seconds]
ghostpl_ has joined #ocaml
c74d has quit [Read error: Connection reset by peer]
c74d has joined #ocaml
ghostpl_ has quit [Ping timeout: 252 seconds]
struktured has joined #ocaml
swgillespie has quit [Quit: Textual IRC Client: www.textualapp.com]
Haudegen has quit [Ping timeout: 246 seconds]
Anarchos has joined #ocaml
Haudegen has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 244 seconds]
badkins has joined #ocaml
mort___ has quit [Read error: Connection reset by peer]
mort___1 has joined #ocaml
reem has joined #ocaml
manud has joined #ocaml
ontologiae_ has joined #ocaml
captain_furious has quit [Quit: Leaving.]
tani has quit [Quit: Verlassend]
yminsky has joined #ocaml
yminsky has quit [Quit: yminsky]
Kakadu has quit [Remote host closed the connection]
flux has quit [Remote host closed the connection]
flux has joined #ocaml
Algebr has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
lordkryss has quit [Quit: Connection closed for inactivity]
struktured has quit [Ping timeout: 265 seconds]
reem has quit [Remote host closed the connection]
ontologiae_ has quit [Ping timeout: 240 seconds]
reem has joined #ocaml
struktured has joined #ocaml
Guest76167 has joined #ocaml
<Guest76167> No matter what I try to install with opam I always get the error message "No package named _____ found."
Guest76167 is now known as Wormflakes
<Wormflakes> and list -a doesn't do anything :/
<Wormflakes> Can anyone think of anything to fix this?
<Drup> what does "opam remote" ?
<Wormflakes> 0 [local] default /Users/Zach/4.01.0+ocp-bin
<Wormflakes> how do I change that lol
<Drup> I'm wondering how you did that.
<Wormflakes> idk :(
<Drup> do you have things installed in opam already ?
<Wormflakes> I originally installed it with macport, then removed everything and installed with home-brew to try and get it working to no avail
<Wormflakes> No I don't
<Drup> the nuke it and restart from scratch
<Drup> remove .opam
<Drup> and do "opam init" and follow the docs
<Wormflakes> Thank you!
<Drup> then*
<Wormflakes> removing it and opam init got list to work
<Wormflakes> What do you mean by follow docs?
<Wormflakes> Thank you so much
<struktured> Drup: you don't recommend ppx_test, so what do you recommend that supports (polymorphic )sampling of inputs?
ptc_ has quit [Ping timeout: 250 seconds]
<Drup> doesn't qtest do exactly that ?
<Drup> my wrath with ppx_test are only with the ppx part.
<struktured> Drup: my problem with qtest is mostly that it's in comments, which breaks syntax highlighting, merlin, etc. really annoys me
<struktured> Drup: also, I didn't see support for complex datatypes, but maybed I missed that
ghostpl_ has joined #ocaml
<struktured> Drup: is your argument against ppx in general, or something specific about ppx test?
badkins has quit [Remote host closed the connection]
<Drup> it's specific
<whitequark> oh. camlspotter
<Drup> it's abusing regular ocaml syntax
<struktured> ok
<Drup> it's completely useless here, and that's ... really not clean
<whitequark> you could say ppx_test is Contaminated
<struktured> hmm this is disconcerting. was looking forward to some of ppx_test's features
Algebr has quit [Ping timeout: 264 seconds]
ghostpl_ has quit [Ping timeout: 245 seconds]
<Wormflakes> What do you guys use ocaml for?
<whitequark> mobile apps
<Drup> struktured: well, you can use it, you don't need my approval :D
<struktured> so is this source tainted or something? https://bitbucket.org/camlspotter/ppx_random
<struktured> I try to make good choices when possible, it's nice to have community support
<Drup> struktured: what is it doing ?
<whitequark> it's creating ... classes?
ontologiae has joined #ocaml
<struktured> I can't claim to understand this code but I have no ppx authoring experience. it does seem a little more OO than I originally anticipated, but that's not sufficient for me to disregard it
avsm has joined #ocaml
<Drup> well, I don't care much about how the code looks
struktured has left #ocaml ["Konversation terminated!"]
struktured has joined #ocaml
<Wormflakes> compilation of cop-build failed D:
<Wormflakes> ocp*
<whitequark> do you /need/ ocp-build?
<whitequark> if not, don't touch it
<Wormflakes> while installing it
<Wormflakes> i want ocp indent
<struktured> Drup: another qtest pet peeve is forgetting to put "\" at the end of a line
mort___1 has quit [Ping timeout: 265 seconds]
badkins has joined #ocaml
<Drup> Wormflakes: what's the error ?
jneen is now known as jneen|afk