ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | http://www.ocaml.org | OCaml 4.01.0 announce at http://bit.ly/1851A3R | Logs at http://irclog.whitequark.org/ocaml
lewis1711 has joined #ocaml
<lewis1711> what's the correct syntax for line 25? am getting "Error: Parse error: "}" expected after [label_patt_list] (in [patt])"
<Drup> You didn't link any code.
<lewis1711> yes, I'm off to a great start aren't I :/
<Drup> :)
<Drup> on line 25, = instead of :
<Drup> "{closure= v_table}"
<lewis1711> ahhh, I didn't read the docs carefully enough. thanks Drup.
<Drup> no problem :)
ontologiae has joined #ocaml
WraithM has quit [Ping timeout: 240 seconds]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ontologiae has quit [Ping timeout: 255 seconds]
manizzle has quit [Read error: Connection reset by peer]
manizzle has joined #ocaml
dapz has joined #ocaml
jludlam has quit [Remote host closed the connection]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
philtor_ has joined #ocaml
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dapz has joined #ocaml
dapz has quit [Client Quit]
dapz has joined #ocaml
alexst has quit [Ping timeout: 245 seconds]
hhugo has quit [Quit: Leaving.]
philtor_ has quit [Ping timeout: 255 seconds]
philtor has quit [Ping timeout: 240 seconds]
racycle has quit [Quit: ZZZzzz…]
ustunozgur has joined #ocaml
ustunozgur has quit [Remote host closed the connection]
ustunozgur has joined #ocaml
distantunclebob has quit [Quit: Leaving.]
distantunclebob1 has joined #ocaml
WraithM has joined #ocaml
frozendevil has quit [Quit: Leaving.]
alexst has joined #ocaml
alexst has quit [Ping timeout: 240 seconds]
ustunozgur has quit [Remote host closed the connection]
ustunozgur has joined #ocaml
distantunclebob1 has quit [Quit: Leaving.]
ustunozgur has quit [Ping timeout: 240 seconds]
distantunclebob has joined #ocaml
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
q66 has quit [Quit: Leaving]
alexst has joined #ocaml
distantunclebob has quit [Quit: Leaving.]
manizzle has quit [Remote host closed the connection]
tnguyen has joined #ocaml
alexst has quit [Ping timeout: 256 seconds]
ustunozgur has joined #ocaml
dapz has joined #ocaml
dapz has quit [Client Quit]
lewis1711 has quit [Ping timeout: 248 seconds]
shinnya has quit [Ping timeout: 248 seconds]
SethTisue has joined #ocaml
ustunozgur has quit [Ping timeout: 255 seconds]
jpdeplaix has quit [Ping timeout: 272 seconds]
ygrek_ has joined #ocaml
cdidd has quit [Read error: Connection reset by peer]
distantunclebob has joined #ocaml
cdidd has joined #ocaml
jpdeplaix has joined #ocaml
penglingbo has joined #ocaml
lewis1711 has joined #ocaml
alexst has joined #ocaml
distantunclebob has quit [Quit: Leaving.]
BitPuffin has quit [Read error: Connection reset by peer]
isBEKaml has joined #ocaml
BitPuffin has joined #ocaml
alexst has quit [Ping timeout: 264 seconds]
kongtomorrow has quit []
dapz has joined #ocaml
ustunozgur has joined #ocaml
racycle has joined #ocaml
studybot_ has quit [Remote host closed the connection]
SethTisue has quit [Quit: SethTisue]
ustunozg_ has joined #ocaml
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ustunozgur has quit [Ping timeout: 248 seconds]
yacks has quit [Remote host closed the connection]
yacks has joined #ocaml
ustunozg_ has quit [Ping timeout: 245 seconds]
distantunclebob has joined #ocaml
alexst has joined #ocaml
jao has quit [Ping timeout: 255 seconds]
alexst has quit [Ping timeout: 240 seconds]
siddharthv_away is now known as siddharthv
ustunozgur has joined #ocaml
distantunclebob has quit [Quit: Leaving.]
dapz has joined #ocaml
ustunozgur has quit [Ping timeout: 264 seconds]
dapz has quit [Client Quit]
dapz has joined #ocaml
dapz has quit [Client Quit]
dapz has joined #ocaml
axiles has joined #ocaml
<lewis1711> is there anyway to break type safety? like a (void *) in C or Object in java. or do i just have to make a big union type of all the types I might want
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
philtor has joined #ocaml
dapz has joined #ocaml
isBEKaml has quit [Quit: leaving]
alexst has joined #ocaml
ustunozgur has joined #ocaml
ustunozgur has quit [Ping timeout: 240 seconds]
<axiles> <lewis1711>: There is Obj.magic but it can create a Segfault
<axiles> in your case you might be more interested in a universal type https://blogs.janestreet.com/a-universal-type/
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<lewis1711> axiles, there seems to be one in jane street core but I find the interface hard to grok. looks like it's the right way to go though
dapz has joined #ocaml
dapz has quit [Client Quit]
dapz has joined #ocaml
dapz has quit [Client Quit]
dapz has joined #ocaml
struktured has quit [Ping timeout: 240 seconds]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ustunozgur has joined #ocaml
ygrek_ has quit [Ping timeout: 240 seconds]
dapz has joined #ocaml
ustunozgur has quit [Ping timeout: 240 seconds]
studybot_ has joined #ocaml
racycle has quit [Quit: ZZZzzz…]
divyanshu has joined #ocaml
divyanshu has quit [Client Quit]
parcs has quit [Ping timeout: 245 seconds]
parcs has joined #ocaml
ustunozgur has joined #ocaml
ygrek_ has joined #ocaml
philtor has quit [Ping timeout: 240 seconds]
Eyyub has quit [Ping timeout: 240 seconds]
AltGr has joined #ocaml
ustunozgur has quit [Ping timeout: 240 seconds]
cago has joined #ocaml
Arsenik has joined #ocaml
ia0 has quit [Quit: leaving]
Simn has joined #ocaml
ia0 has joined #ocaml
Kakadu has joined #ocaml
Nevor has joined #ocaml
divyanshu has joined #ocaml
ustunozgur has joined #ocaml
dapz has quit [Quit: Textual IRC Client: www.textualapp.com]
WraithM has quit [Ping timeout: 240 seconds]
alexst has quit [Ping timeout: 240 seconds]
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
maattdd has joined #ocaml
alexst has joined #ocaml
sagotch has joined #ocaml
sagotch has quit [Ping timeout: 240 seconds]
ustunozgur has quit [Ping timeout: 256 seconds]
_whitelogger has joined #ocaml
arj has joined #ocaml
sagotch has joined #ocaml
sagotch_ has joined #ocaml
sagotch has quit [Ping timeout: 240 seconds]
mcclurmc has quit [Ping timeout: 240 seconds]
ontologiae has joined #ocaml
thomasga has joined #ocaml
mcclurmc has joined #ocaml
hhugo has joined #ocaml
demonimin has quit [Remote host closed the connection]
demonimin has joined #ocaml
ontologiae has quit [Ping timeout: 256 seconds]
ustunozgur has joined #ocaml
ggole has joined #ocaml
alexst has quit [Ping timeout: 240 seconds]
jludlam has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
jludlam is now known as jonludlam
fraggle_ has joined #ocaml
manizzle has joined #ocaml
alpounet has joined #ocaml
ustunozgur has quit [Ping timeout: 245 seconds]
claudiuc has quit [Ping timeout: 240 seconds]
huza has joined #ocaml
ustunozgur has joined #ocaml
alexst has joined #ocaml
huza has quit [Quit: WeeChat 0.3.8]
huza has joined #ocaml
huza has quit [Client Quit]
alexst has quit [Ping timeout: 240 seconds]
huza has joined #ocaml
lewis1711 has quit [Quit: Leaving]
Arsenik has quit [Remote host closed the connection]
divyanshu has quit [Quit: Computer has gone to sleep.]
ontologiae has joined #ocaml
divyanshu has joined #ocaml
avsm has joined #ocaml
hhugo has quit [Quit: Leaving.]
<companion_cube> o/
hhugo has joined #ocaml
alexst has joined #ocaml
<Kakadu> \o
<whitequark> companion_cube: so um
<whitequark> i was going to make a kube
<whitequark> but the people who assembled my mill forgot to lubricate the ball bearings and they somewhat... self-destructed
<companion_cube> :s
<companion_cube> at least you've not been hurt?
<whitequark> um, of course not
<whitequark> I mean, it's not exploded or anything
alexst has quit [Ping timeout: 248 seconds]
<whitequark> it was actually fairly minor until I decided to finally figure out why the Z position is off by as much as ±0.5mm
<companion_cube> sounds pretty technical
<whitequark> hm?
<companion_cube> the details you give on the stackexchange thread
<ggole> Chinese machinery, wcpgw?
<whitequark> companion_cube: um, yeah, is that a problem?
thomasga has quit [Quit: Leaving.]
<companion_cube> no! Just beyond my knowledge
<whitequark> ah! I just posted it for the photos
<whitequark> the first and second one. The balls at 2nd one have made the grooves in the hardened stainless steel rails on 1st one
<whitequark> which is *not* how it is supposed to work :S
<whitequark> ggole: "wcpgw"?
<whitequark> did you forget to change layout? :)
<ggole> What could possibly go wrong
<whitequark> oh. well. it's $250 (without delivery)
<ggole> Good for learning on I guess
<whitequark> and in fact if they actually bothered to assemble it properly, it would have amazing bang for buck
<ggole> Wonder how much they save on lubricant?
<whitequark> no, it's actually not a bad design. The electronics somewhat sucks, but electronics is easy. The frame is very rigid.
<whitequark> I don't think they *saved* on lubricant. I think it was an assembly error.
<whitequark> Other rails and the leadscrews are properly lubricated.
<ggole> Ah, that would make more sense
<ggole> Cos the cost of the lube would be in the cents range, I imagine
<whitequark> cents? not even cents
<whitequark> tenths or hundredths of cents
<whitequark> they buy it in bulk and deposit tiny amounts. it costs nothing, especially compared to assembly time.
<ggole> So it's the cost of the guy who is clueful enough to remember the lube that they are saving on?
<whitequark> yes
<whitequark> they also sheared another screw during assembly and covered up that mistake badly
<whitequark> instead of fixing it properly
<whitequark> so I guess someone was out of time or something.
bnwr has joined #ocaml
bnwr has left #ocaml [#ocaml]
avsm has quit [Quit: Leaving.]
bjorkintosh has quit [Ping timeout: 260 seconds]
Nevor has quit [Ping timeout: 240 seconds]
avsm has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
zarul has joined #ocaml
ustunozgur has quit [Remote host closed the connection]
rand000 has joined #ocaml
maattdd has joined #ocaml
dsheets has quit [Ping timeout: 255 seconds]
maattdd has quit [Ping timeout: 240 seconds]
sagotch_ has quit [Remote host closed the connection]
avsm has quit [Quit: Leaving.]
ygrek_ has quit [Ping timeout: 248 seconds]
alexst has joined #ocaml
jonludlam has quit [Ping timeout: 240 seconds]
alexst has quit [Ping timeout: 240 seconds]
dsheets has joined #ocaml
maattdd has joined #ocaml
_andre has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
ustunozgur has joined #ocaml
jonludlam has joined #ocaml
ontologiae has quit [Ping timeout: 240 seconds]
sagotch has joined #ocaml
SethTisue has joined #ocaml
siddharthv is now known as siddharthv_away
SethTisue has quit [Quit: SethTisue]
SethTisue has joined #ocaml
alexst has joined #ocaml
avsm has joined #ocaml
alexst has quit [Ping timeout: 248 seconds]
maattdd has joined #ocaml
arj has quit [Quit: Leaving.]
maattdd has quit [Ping timeout: 240 seconds]
avsm has quit [Quit: Leaving.]
hhugo has quit [Quit: Leaving.]
SethTisue has quit [Quit: SethTisue]
SethTisue has joined #ocaml
penglingbo has quit [Ping timeout: 248 seconds]
SethTisue has quit [Quit: SethTisue]
SethTisue has joined #ocaml
numeo has joined #ocaml
SethTisue has quit [Client Quit]
huza has quit [Quit: WeeChat 0.3.8]
SethTisue has joined #ocaml
hhugo has joined #ocaml
SethTisue has quit [Client Quit]
<numeo> i am attempting to follow Real World Ocaml
<numeo> i am stumbling upon an issue when installing Core
<numeo> it fails to install anything
<numeo> *.err files in ~/.opam/logs says that it does not find an 'aspcud' command
<numeo> this is not a dependency documented in the installation instructions
<numeo> this is on Fedora
bjorkintosh has joined #ocaml
alexst has joined #ocaml
alexst has quit [Ping timeout: 248 seconds]
divyanshu has quit [Quit: Computer has gone to sleep.]
maattdd has joined #ocaml
<numeo> applying the --no-aspcud command does not help
<numeo> i do not know where i can find more complete compilation logs
ontologiae has joined #ocaml
<def`> numeo: hmm, I got opam working without problem without aspcud
<numeo> on fedora?
<numeo> i suspect aspcud is not the problem
<def`> not fedora, arch
<numeo> it just checks whether it is there, and happens to output the result to stderr
<def`> there is the line "no aspcud" in .err file too, but it's mostly a warning, it works well without
maattdd has quit [Ping timeout: 264 seconds]
<def`> yep
<numeo> do you know where i can find the compilation logs?
<def`> no
ontologiae has quit [Ping timeout: 240 seconds]
<numeo> i will attempt to apply the --verbose and --debug options
Kakadu has quit [Ping timeout: 246 seconds]
ontologiae has joined #ocaml
thomasga has joined #ocaml
Nevor has joined #ocaml
hhugo has quit [Quit: Leaving.]
penglingbo has joined #ocaml
<numeo> it suggests that i am missing tools like 'ocamldoc' and 'camlp4'
<numeo> i presumed that fedora's ocaml package would be sufficient
huza has joined #ocaml
<adrien_oww> fedora probably has them split
<adrien_oww> like ocaml-camlp4 or something like that
<numeo> i can't find any such packages
huza has quit [Client Quit]
<adrien_oww> "or something like that" :P
<numeo> oh right is see them now
ustunozgur has quit [Remote host closed the connection]
Kakadu has joined #ocaml
ustunozg_ has joined #ocaml
<numeo> that didn't help
<numeo> i have other things to do
<numeo> bye
cago has quit [Quit: cago]
Arthur_R` has joined #ocaml
patronus_ has joined #ocaml
divyanshu has joined #ocaml
darkf has quit [Quit: Leaving]
hcarty has joined #ocaml
petterw_ has joined #ocaml
vbmithr_ has joined #ocaml
xaimus_ has joined #ocaml
MasseR_ has joined #ocaml
kerneis_ has joined #ocaml
gargawel_ has joined #ocaml
_andre_ has joined #ocaml
binarybi1me has joined #ocaml
Derander_ has joined #ocaml
alex_nx_ has joined #ocaml
Druup has joined #ocaml
_andre has quit [*.net *.split]
fold has quit [*.net *.split]
ivan\ has quit [*.net *.split]
waneck has quit [*.net *.split]
hcarty_ has quit [*.net *.split]
Derander has quit [*.net *.split]
mfp has quit [*.net *.split]
binarybitme has quit [*.net *.split]
PM has quit [*.net *.split]
dinosaure has quit [*.net *.split]
alex_nx has quit [*.net *.split]
adrien has quit [*.net *.split]
kerneis has quit [*.net *.split]
petterw has quit [*.net *.split]
ttm has quit [*.net *.split]
_2can has quit [*.net *.split]
vbmithr has quit [*.net *.split]
contempt has quit [*.net *.split]
samebchase has quit [*.net *.split]
ddosia has quit [*.net *.split]
xaimus has quit [*.net *.split]
Drup has quit [*.net *.split]
patronus has quit [*.net *.split]
rks` has quit [*.net *.split]
fx has quit [*.net *.split]
cross has quit [*.net *.split]
companion_cube has quit [*.net *.split]
Snark has quit [*.net *.split]
ousado has quit [*.net *.split]
Arthur_Rainbow has quit [*.net *.split]
brendan has quit [*.net *.split]
maufred has quit [*.net *.split]
diginux has quit [*.net *.split]
MasseR has quit [*.net *.split]
ktos has quit [*.net *.split]
gargawel has quit [*.net *.split]
ousado has joined #ocaml
contempt has joined #ocaml
srcerer has quit [Ping timeout: 272 seconds]
fx has joined #ocaml
waneck has joined #ocaml
fold has joined #ocaml
rks` has joined #ocaml
diginux has joined #ocaml
samebchase has joined #ocaml
cross has joined #ocaml
adrien has joined #ocaml
Snark has joined #ocaml
ktos has joined #ocaml
_2can has joined #ocaml
companion_cube has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
The_third_man has joined #ocaml
maattdd has joined #ocaml
maufred has joined #ocaml
hhugo has joined #ocaml
maattdd has quit [Ping timeout: 245 seconds]
dinosaure has joined #ocaml
mfp has joined #ocaml
brendan has joined #ocaml
ddosia has joined #ocaml
libertas has quit [Quit: Lost terminal]
avsm has joined #ocaml
jsvgoncalves has quit [Ping timeout: 264 seconds]
hhugo has quit [Quit: Leaving.]
slash^ has joined #ocaml
icicled has quit [Ping timeout: 240 seconds]
thomasga has quit [Quit: Leaving.]
hhugo has joined #ocaml
thomasga has joined #ocaml
jludlam has joined #ocaml
icicled has joined #ocaml
rand000 has quit [Quit: leaving]
Eyyub has joined #ocaml
ygrek has joined #ocaml
jonludlam has quit [Read error: Connection reset by peer]
jludlam has quit [Remote host closed the connection]
racycle has joined #ocaml
jludlam has joined #ocaml
jludlam is now known as jonludlam
jonludlam is now known as Guest69507
Guest69507 is now known as jonludlam
shinnya has joined #ocaml
<whitequark> Druup: I updated the ppx PR
ontologiae has quit [Ping timeout: 240 seconds]
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 260 seconds]
PM has joined #ocaml
mrvn has quit [Ping timeout: 252 seconds]
libertas has joined #ocaml
philtor_ has joined #ocaml
sgnb` has joined #ocaml
sgnb` has quit [Remote host closed the connection]
ontologiae has joined #ocaml
sagotch has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
avsm has quit [Quit: Leaving.]
mrvn has joined #ocaml
avsm has joined #ocaml
typedlambda has quit [Ping timeout: 252 seconds]
jprakash has joined #ocaml
thomasga has quit [Quit: Leaving.]
typedlambda has joined #ocaml
philtor_ has quit [Ping timeout: 240 seconds]
Hannibal_Smith has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Client Quit]
kerneis_ is now known as kerneis
cantstanya has joined #ocaml
cantstanya has left #ocaml ["WeeChat 0.4.3"]
cantstanya has joined #ocaml
<algoriddle> numeo: I use Fedora (mostly), and I got it working, no problem. I suggest you execute "opam switch 4.01.0" as per the instructions, so that the entire compiler and toolset is installed with opam. That way you can ignore (mostly) what is packaged with Fedora.
shinnya has quit [Ping timeout: 264 seconds]
stevej has joined #ocaml
thomasga has joined #ocaml
S11001001 has joined #ocaml
S11001001 has quit [Changing host]
S11001001 has joined #ocaml
maattdd has joined #ocaml
ustunozg_ has quit [Remote host closed the connection]
manizzle has quit [Ping timeout: 240 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
hhugo has quit [Quit: Leaving.]
hhugo has joined #ocaml
Nevor has quit [Read error: Connection reset by peer]
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
thomasga has quit [Quit: Leaving.]
jwatzman|work has joined #ocaml
pminten has joined #ocaml
WraithM has joined #ocaml
Kakadu has quit [Ping timeout: 246 seconds]
pminten has quit [Quit: Leaving]
ustunozgur has joined #ocaml
jonludlam has quit [Ping timeout: 240 seconds]
frozendevil has joined #ocaml
AltGr has left #ocaml [#ocaml]
maattdd has quit [Ping timeout: 245 seconds]
ustunozgur has quit [Ping timeout: 240 seconds]
q66 has joined #ocaml
avsm has quit [Quit: Leaving.]
ontologiae has quit [Ping timeout: 272 seconds]
ustunozgur has joined #ocaml
hhugo has quit [Quit: Leaving.]
tane has joined #ocaml
maattdd has joined #ocaml
ustunozgur has quit [Ping timeout: 240 seconds]
dsheets has quit [Ping timeout: 240 seconds]
ustunozgur has joined #ocaml
<frozendevil> Hey, I'm trying to work through the book Types and Programming Languages, and all the code exercises are in OCaml which I have beginner-at-best familiarity with… the exercise I'm trying to work through now is to convert an eval method from small-step semantics to big-step semantics and I have the sensation that what I'm doing is very unidiomatic I was wondering if maybe I could get some pointers? https://gist.github.com/frozendevil/071a83dd
<frozendevil> the whole program is here http://www.cis.upenn.edu/~bcpierce/tapl/
avsm has joined #ocaml
<frozendevil> er, that uses frames, here http://www.cis.upenn.edu/~bcpierce/tapl/checkers/arith/
manizzle has joined #ocaml
alexst has joined #ocaml
cantstanya has quit [Quit: WeeChat 0.4.3]
<S11001001> frozendevil: 404 on your gist
ygrek has quit [Ping timeout: 256 seconds]
maattdd has quit [Ping timeout: 245 seconds]
<frozendevil> ah, http://paste.lisp.org/display/143132 does that work?
<S11001001> frozendevil: possibly the url got cut off by the IRC char limit
<frozendevil> ahh
<S11001001> frozendevil: yeah
<frozendevil> "I was wondering if maybe I could get some pointers? https://gist.github.com/frozendevil/071a83dd4dfd528d51ea (eval1 is the provided small-step implementation and evail2 is my big-step version)"
<ggole> when (match ...) is a bit strange
tnguyen has quit [Ping timeout: 240 seconds]
<S11001001> frozendevil: I think the point is to recursively [tail] call eval1 in each matching step, passing in the one-step reduced form, and in the fallback just give back the argument.
ustunozg_ has joined #ocaml
<def`> and inefficient, eval2 t1 will be computed twice. You probably shouldn't use a when guard, but instead do a second match inside the branch
<frozendevil> S11001001: I'm not sure I follow?
<def`> (by doing a computation twice in a recursive position, the runtime goes from linear to exponential, not good :))
tnguyen has joined #ocaml
<frozendevil> that makes sense
<S11001001> frozendevil: I don't quite recall the exact reduction rules in Pierce. But, you can think of the small-step implementation as a sort of bouncy thing: the caller of eval1 manages the iterative application of eval1. In the big-step variant, the eval1 function itself handles the recursive calls.
ustunozgur has quit [Ping timeout: 272 seconds]
<frozendevil> http://i.imgur.com/nanIk7I.png that's what I'm working off of
<ggole> A pattern like Foo(_) is probably better written Foo _, too
maattdd has joined #ocaml
<frozendevil> def`: so I just changed the first TmIf branch to look like https://gist.github.com/frozendevil/70b3033f54f5c13e9fe3, is that what you meant?
<frozendevil> well, I guess that's both of the TmIf branches now
<def`> frozendevil: yes
<frozendevil> awesome, thanks
<frozendevil> that definitely "feels" better
ygrek has joined #ocaml
Khady_ has joined #ocaml
Khady_ has quit [Quit: Quit.]
pgomes has joined #ocaml
Khady has quit [Quit: WeeChat 0.4.0]
Khady has joined #ocaml
Khady has joined #ocaml
Khady has quit [Changing host]
avsm has quit [Quit: Leaving.]
tnguyen has quit [Quit: tnguyen]
Kakadu has joined #ocaml
<frozendevil> so it's telling me my pattern match isn't exhaustive, which makes sense… is adding `| _ -> raise NoRuleApplies` a reasonable thing to do?
manizzle has quit [Ping timeout: 240 seconds]
<frozendevil> I guess that's less of an OCaml question
araujo has quit [Ping timeout: 240 seconds]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
alpounet has quit [Remote host closed the connection]
alpounet has joined #ocaml
<ggole> There's two ways to handle exhaustiveness: muffle it with a | _ -> ..., or handle each case.
<ggole> The second can be more verbose, but tends to catch more errors.
<def`> for larger programs, you can also handle other cases by matching and raising
bernardo1pc is now known as bernardofpc
<ggole> (Particularly for types that might undergo changes, although that is probably not much of a concern here.)
<def`> so that you have a default case, but you'll still be notified of unhandled cases if you extend the type
alpounet has quit [Ping timeout: 245 seconds]
<ggole> Yeah.
<ggole> I'd actually like a nice way to say "don't care about these" that would still catch new legs.
<frozendevil> right, I get the idea of exhaustive matching in general, it's just in this case it would require matching the entire grammar in each nested match (which seems a little silly)
<frozendevil> or am I missing something?
<ggole> Usually you'd just match each leg, not each possible argument as well
<ggole> It really depends on which cases you are catching.
<frozendevil> right, I guess I meant "the entire set of tokens" not "the entire grammar"
jwatzman|work has quit [Quit: jwatzman|work]
alexst has quit [Ping timeout: 256 seconds]
<ggole> Well, pick and choose a bit I guess.
claudiuc has joined #ocaml
_tca_ is now known as _tca
_tca has quit [Changing host]
_tca has joined #ocaml
_tca has quit [Changing host]
_tca has joined #ocaml
frozendevil has quit [Quit: Leaving.]
rand000 has joined #ocaml
frozendevil has joined #ocaml
ustunozgur has joined #ocaml
libertas has quit [Ping timeout: 272 seconds]
ustunozg_ has quit [Ping timeout: 240 seconds]
maattdd has quit [Ping timeout: 255 seconds]
avsm has joined #ocaml
manizzle has joined #ocaml
maattdd has joined #ocaml
isBEKaml has joined #ocaml
_andre_ has quit [Quit: leaving]
ygrek has quit [Ping timeout: 256 seconds]
claudiuc has quit [Remote host closed the connection]
ontologiae has joined #ocaml
jprakash has quit [Quit: leaving]
ontologiae has quit [Ping timeout: 272 seconds]
claudiuc has joined #ocaml
philtor has joined #ocaml
oriba has joined #ocaml
Hannibal_Smith has quit [Quit: Sto andando via]
thomasga has joined #ocaml
isBEKaml has quit [Quit: leaving]
alpounet has joined #ocaml
<Druup> ggole: "| Foo _ | Bar _ | Baz _ -> do_something ()" ?
<Druup> it will still catch new legs, and it's a bit more verbose than "_", but unless your sum type is gigantic, not so much
Druup is now known as Drup
<ggole> When you have thirty constructors, it sucks pretty hard :(
<Drup> whitequark: just saw it, will merge in the evening :)
RenRenJuan has joined #ocaml
divyanshu has quit [Ping timeout: 255 seconds]
ontologiae has joined #ocaml
<Drup> ggole: yeah, thirty is a lot :/
divyanshu has joined #ocaml
<ggole> Well, that's a bit of an exaggeration... even ten or fifteen can be pretty tedious.
<ggole> I dunno how you'd do it differently though
slash^ has quit [Read error: Connection reset by peer]
<ggole> I had a half-baked idea along the lines of generating a short alphabetical hash from the type structure, which would clash when the type structure changed and have to be updated
<ggole> But that seems weird, and I'm not sure how you'd do it in practice anyway.
<ggole> Abstraction over patterns might help a bit, since you'd be able to name potentially large parts of the type easily and readably
<Drup> funilly, you can do that already with poly variants
<ggole> Yeah, but you don't get the exhaustiveness then
jwatzman|work has joined #ocaml
<Drup> actually, you do, if you force them to be closed
<Drup> you need to add annotation, though
<ggole> Don't you have to annotate then?
<ggole> Right
<ggole> Yeah, I guess that could work.
jprakash has joined #ocaml
axiles has quit [Remote host closed the connection]
jprakash has quit [Quit: leaving]
divyanshu has quit [Ping timeout: 264 seconds]
philtor_ has joined #ocaml
maattdd has quit [Ping timeout: 260 seconds]
penglingbo has quit [Ping timeout: 240 seconds]
<RenRenJuan> i'm considering dumping haskell in favor of ocaml
<Drup> Welcome to the not-lazy world :D
divyanshu has joined #ocaml
thomasga has quit [Quit: Leaving.]
<RenRenJuan> ty
avsm has quit [Quit: Leaving.]
ontologiae has quit [Ping timeout: 240 seconds]
fold has quit [Quit: WeeChat 0.4.3]
stevej has quit [Quit: baby time]
ontologiae has joined #ocaml
<icicled> Hi, I wrote a tiny program (http://pastebin.com/XqQPUN16) that is demonstrated at the end of Ch 1 of realworldocaml.org and was wondering why the size of the binary is 13MB?
<adrien> Core is large
<adrien> includes lots of stuff
<whitequark> in 4.02 it would be smaller
<icicled> is there a way to tell the compiler to strip out things that are not being referenced?
<adrien> everything is being "reference" actually
<adrien> (due to how Core is architectured)
<adrien> if you care about size, Core might be a poor choice
<adrien> I doubt Chapter 1 of RWO really does things that require that library though
<adrien> it's just that the authords have decided to use from the beginning to be consistent with the other chapters
<def`> icicled: you shouldn't care about that at the beginning
<icicled> def`, I don't really but was curious as to why
<icicled> even haskell & go have large binaries for trivial programs but ocaml comes out ahead :P
araujo has joined #ocaml
<adrien> hello world in ocaml is 170KB iirc
<icicled> gotcha, so it's the overhead by Core that drags in 11.x MB
thomasga has joined #ocaml
<adrien> it's more a library issue than a language one (even though ocaml isn't perfect in this regard, proof being that hello world is 170KB)
<icicled> got it
<def`> adrien: the 170k binary embeds the garbage collector. with the bytecode runtime it's only 12k :)
<adrien> but then you need ocamlrun :D
<icicled> is there a reason that the authors chose to use Core instead of the default stdlib equivalent?
<adrien> the ocaml stdlib is terse
<adrien> and API is not consistent between modules
<adrien> s/between/across/
<Drup> not consistent ?
<icicled> got it
<Drup> It's consistent, just not very nice
<adrien> Drup: order of parameters for List.map, Queue.map, Hashtbl.map, ...
<Drup> they are not always the same ?
<adrien> :D
S11001001 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<adrien> hold on
<adrien> (there's no Queue.map, my example was flawed)
alpounet has quit [Remote host closed the connection]
<Drup> and there is not Hashtbl.map either.
<Drup> no*
<adrien> (which makes sense :) )
<Drup> but Array.map and Map.S.map are the same order :p
<adrien> add
<adrien> val add : 'a -> 'a t -> unit
<adrien> val add : ('a, 'b) t -> 'a -> 'b -> unit
<adrien> one is Map, the other is Hashtbl
<Drup> hum, ok
<adrien> there's a logic (fold mostly iirc)
ivan\ has joined #ocaml
ivan\ has quit [Changing host]
ivan\ has joined #ocaml
<adrien> but sometimes you'd prefer to have the same order always and write a fun x y -> f y x rather than wonder what the order is
<adrien> (but it depends on whether the data structure is mutable or persistant)
<ggole> folds are pretty inconsistent
<ggole> It's almost random which argument is the accumulator :/
<ggole> And Foo.mem, some are elt -> container -> bool and others container -> elt -> bool
thomasga has quit [Quit: Leaving.]
maattdd has joined #ocaml
Submarine has quit [Remote host closed the connection]
<philtor> How much will 4.02 help with the binary size issue when using Core?
claudiuc has quit [Read error: Connection reset by peer]
<adrien> module X = List
<adrien> used to create a new modules
<adrien> it doesn't anymore
claudiuc has joined #ocaml
<adrien> it just creates a new name for it
ivan\ has quit [*.net *.split]
thomasga has joined #ocaml
<ggole> Although I don't think that goes into the concete numbers
Hannibal_Smith has joined #ocaml
<frozendevil> thanks again for the help everyone, this is what I ended up with https://gist.github.com/frozendevil/fc0e228e27c4c9e8332f
shinnya has joined #ocaml
thomasga has quit [Quit: Leaving.]
<ggole> frozendevil: A minor thing, usually the redundant parens in f(arg) are elided
<frozendevil> ah, thanks. I'm still pretty inconsistent about that
<ggole> And when matching, Foo (_, _) can be shortened to Foo _
<ggole> (Bit of a special case, that.)
<frozendevil> ooo
<Drup> (not necessarily a good thing to do :p)
<ggole> Right, it'll still match should you happen to change the arity of Foo
<frozendevil> so is the logic there "if there's one _, you can omit the parens, and if all arguments are _ they can be collapsed to one"?
<Drup> one _ is "anything, regardless of arity"
<frozendevil> ah, ok
divyanshu has quit [Quit: Textual IRC Client: www.textualapp.com]
ivan\ has joined #ocaml
ivan\ has quit [Max SendQ exceeded]
Guest4485 has joined #ocaml
ivan\ has joined #ocaml
Guest4485 has quit [Excess Flood]
Guest4485 has joined #ocaml
Guest4485 has quit [Excess Flood]
philtor_ has quit [Ping timeout: 256 seconds]
shinnya has quit [Ping timeout: 256 seconds]
ontologiae has quit [Ping timeout: 264 seconds]
shinnya has joined #ocaml
ggole has quit []
<numeo> algoriddle: thanks that seems to have fixed it
thomasga has joined #ocaml
<samebchase> Hello #ocaml, with your help, I was able to write this walkthrough: http://www.reddit.com/r/programming/comments/2a9q6u/finding_the_kmost_frequent_lines_in_a_log_file/
<samebchase> Thanks for all the help and guidance! :-)
ontologiae has joined #ocaml
q66_ has joined #ocaml
thomasga has quit [Client Quit]
q66 has quit [Ping timeout: 252 seconds]
Kakadu has quit [Quit: Konversation terminated!]
q66_ is now known as q66
philtor_ has joined #ocaml
oriba has quit [Quit: oriba]
jao has quit [Ping timeout: 272 seconds]
pgomes has quit [Quit: Leaving]
alexst has joined #ocaml
Simn has quit [Quit: Leaving]
Hannibal_Smith has quit [Quit: Sto andando via]
RenRenJuan has quit [Quit: This computer has gone to sleep]
distantunclebob has joined #ocaml
ontologiae has quit [Ping timeout: 240 seconds]
avsm has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
mort___ has joined #ocaml
alexst_ has joined #ocaml
tane has quit [Quit: Verlassend]
struktured has joined #ocaml
Mandus has joined #ocaml
alexst has quit [Ping timeout: 245 seconds]
rand000 has quit [Quit: leaving]
RenRenJuan has joined #ocaml
distantunclebob has quit [Quit: Leaving.]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
RenRenJuan has quit [Read error: Connection reset by peer]
SethTisue has joined #ocaml
Lycurgus has joined #ocaml
darkf has joined #ocaml
frozendevil has quit [Quit: Leaving.]
maattdd has joined #ocaml
SethTisue has quit [Quit: SethTisue]
libertas has joined #ocaml
ustunozgur has quit [Remote host closed the connection]
philtor_ has quit [Ping timeout: 240 seconds]
madroach has quit [Ping timeout: 252 seconds]
madroach has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
SethTisue has joined #ocaml
SethTisue has quit [Client Quit]
SethTisue has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
rand000 has joined #ocaml
meteo2 has joined #ocaml
NoNNaN has joined #ocaml
jwatzman|work has joined #ocaml
SethTisue has quit [Client Quit]
racycle has quit [Quit: ZZZzzz…]
Lycurgus has quit [Quit: This computer has gone to sleep]
avsm has quit [Quit: Leaving.]
Lycurgus has joined #ocaml
maattdd has quit [Ping timeout: 272 seconds]