nullcatx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nullcatxxx_ has joined #ocaml
kushal has joined #ocaml
swgillespie has joined #ocaml
Muzer has quit [Ping timeout: 246 seconds]
oriba has quit [Quit: WeeChat 1.3]
ely-se has quit [Quit: sleep]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
manuel__ has quit [Quit: manuel__]
Muzer has joined #ocaml
raphaelss has quit [Remote host closed the connection]
lobo has quit [Quit: leaving]
joncfoo has joined #ocaml
<joncfoo>
http://lpaste.net/142170 - why is it that I get a warning regarding line 7 "this match case is unused"?
rgrinberg1 has joined #ocaml
<Drup>
joncfoo: because the match "| q -> ...." is not a test, it's a binding
<Drup>
if you want to test that something is equal to something else, use "| q' when q = q' -> ..."
<Drup>
(or, in this case, just use an if ...)
ysangkok has left #ocaml [#ocaml]
<joncfoo>
seems a bit strange
<Drup>
Not really, when you look at the language as a whole
rgrinberg1 has quit [Ping timeout: 246 seconds]
<joncfoo>
ok, I'll take your word for it now :)
<joncfoo>
thanks
dsheets has quit [Ping timeout: 240 seconds]
kushal has quit [Quit: Leaving]
toomuchtvrotsurb has quit [Remote host closed the connection]
nullcatxxx_ has joined #ocaml
deavid has quit [Ping timeout: 264 seconds]
Simn has joined #ocaml
Simn has quit [Read error: Connection reset by peer]
smtb has joined #ocaml
smtb has quit [Quit: WeeChat 0.4.2]
nullcatx_ has joined #ocaml
nullcatxxx_ has quit [Ping timeout: 265 seconds]
igoroliveira has quit [Quit: Connection closed for inactivity]
joncfoo has quit [Ping timeout: 246 seconds]
smtb has joined #ocaml
<smtb>
I am running into an error that I am not very familiar with during compilation. Error: '-type-conv' option disabled but some packages require the type_conv syntax to be loaded. I tried adding the type_conv package but it does not fix the error. Anybody familiar with this?
<smtb>
I think it is because I am using cohttp/uri & deriving
manuel__ has joined #ocaml
huza has joined #ocaml
rgrinberg1 has joined #ocaml
<Drup>
that's deriving/eliom
ygrek_ has quit [Ping timeout: 250 seconds]
qdwang has joined #ocaml
qdwang has quit [Remote host closed the connection]
deavid has joined #ocaml
shinnya has quit [Ping timeout: 246 seconds]
nullcatxxx_ has joined #ocaml
nullcatx_ has quit [Ping timeout: 264 seconds]
<smtb>
Yes, I am getting it with an eliom project. I am using another module I wrote that is fairly large and which utilizes Yojson/Cohttp/Uri/Nocrypto. In the opam package docs looks like it could be any of these clashing with the eliom framework.
qdwang has joined #ocaml
<Drup>
it would be cohttp, but it should not require the type conv *syntax*, that's a bug that you should report
<Drup>
(or uri)
qdwang has quit [Remote host closed the connection]
<smtb>
ok, I'll post the bug to github.
mac10688 has quit [Ping timeout: 260 seconds]
qdwang has joined #ocaml
qdwang has quit [Ping timeout: 255 seconds]
tnguyen has quit [Read error: Connection reset by peer]
tnguyen has joined #ocaml
<rgrinberg1>
i switched a medium sized code base from camlp4 to ppx and my build times are even worse
<rgrinberg1>
dafuq :O
<rgrinberg1>
~10k lines and mostly type conv crap
<rgrinberg1>
didn't pay for anything but still feeling ripped off :/
<bitemyapp>
rgrinberg1: what's type conv for anyway?
<bitemyapp>
rgrinberg1: I was looking at it the other day and couldn't quite parse wtf the README was talking about.
huza has quit [Quit: WeeChat 0.3.8]
<rgrinberg1>
bitemyapp: it's like automatic deriving in haskell
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rgrinberg1>
type_conv itself is a camlp4 framework for generating these type driven converters
<bitemyapp>
basically the idea is that you'll have multiple sums of possibilities and you'll want to be able to pick an arbitrary target (rather than fixed, a la functor) and collapse non-matching cases to some adverse condition (empty list, Nothing of Maybe)
<bitemyapp>
so, lens : products :: prisms : sums
<bitemyapp>
traversals are bigger and a bit harder to capture. If you know traversable that's a good place to start, otherwise, let us say it's related to the iterator pattern. I don't have the language for summarizing it in this context.
<rgrinberg>
i'll check prisms out. I have a limited budget for things I can't use :P
<rgrinberg>
how's your book coming along?
<bitemyapp>
rgrinberg: fair enough @ budget. I understand.
<bitemyapp>
rgrinberg: very well, better than expected on all fronts.
<bitemyapp>
rgrinberg: early access is going well, people are happy with the book. Up to Monad chapter & 797 pages in the current public release.
<bitemyapp>
(don't let the length daunt you, we're targeting people who can't program)
<bitemyapp>
nobody that has read the book has complained about the length. Several of our reviewers clear 50+ pages a day.
<bitemyapp>
rgrinberg: I'm a bit confuzzled as to how ppx could take 10 seconds on a no-op file.
<bitemyapp>
that's really strange. Did you file a bug with whitequark?
<rgrinberg>
bitemyapp: i doubt it's ppx. It's likely the build system. no compiler or preprocessor should be ran at all, no?
<rgrinberg>
also before ppx, it was 7s so it wasn't that much better...
<bitemyapp>
rgrinberg: right @ preprocessor.
darkf has joined #ocaml
<rgrinberg>
797 pages :O. How advanced will the book get?
<rgrinberg>
i kind of know some haskell basics...
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bitemyapp>
rgrinberg: if you kind of know some Haskell basics, I think you'd learn a lot.
swgillespie has joined #ocaml
<bitemyapp>
rgrinberg: it's more that it's comprehensive in the stuff it does tackle, rather than being stretched over a lot of topics, the goal is to equip people to be able to learn the rest as easily as possible (foundations focused)
<bitemyapp>
rgrinberg: figure Monad is 2/3s in, we've got foldable, traversable, reader, state, parser combinators, monad transformers, non-strictness (more of a deep dive than earlier chapters like lists and folds), data structures, and some secret final chapters.
<bitemyapp>
(to be released yet, that is)
<rgrinberg>
what about IO?
<rgrinberg>
the streaming kind
<bitemyapp>
we talk about IO, we're not going to cover streaming libraries in this book.
<bitemyapp>
buuuut
<bitemyapp>
we're going to cover most (not all) of the prerequisites required to understand streaming libraries and why/when' you'd want one
<bitemyapp>
rgrinberg: we will probably write something (comprehensive) about streaming libraries after this book, but it'll have this book as a prerequisite.
<rgrinberg>
OK. I find that stuff to be pretty key in "real world" programming
<bitemyapp>
Depends on what you're doing.
<bitemyapp>
I work in ad-tech, so a lot of our stuff is perf sensitive
<bitemyapp>
I think you'd be surprised how little thought/consideration I need to give to lazy/strict/streaming.
<bitemyapp>
basically, we know how to write code that does what we want, so we just keep doing that.
<bitemyapp>
which boils down to, "if it's a queue worker, run it through a Pipe and NFdata at the end"
empyrean has joined #ocaml
<rgrinberg>
yea, my main concern is doing stuff in constant memory
empyrean has quit [Remote host closed the connection]
<bitemyapp>
then yeah, just run everything through a Pipe, lol.
<bitemyapp>
I did some tests with csv data.
<bitemyapp>
7mb of CSV
<bitemyapp>
basic library, no streaming: 30mb peak heap
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bitemyapp>
rgrinberg: io-streams is something else, and I swear to god if io-streams is the library the Ocaml community chooses to mimic I will mock you mercilessly.
<rgrinberg>
oh sorry nvm
<rgrinberg>
i thought it was the io-streams csv lib
<bitemyapp>
io-streams is the slowest streaming library by a rather large margin
<rgrinberg>
bitemyapp: haha i actually have io streams reimplemented in ocaml
<bitemyapp>
sdgfhjknsdrjklgndegr
<rgrinberg>
too ashamed to release though..
<bitemyapp>
it's so terrible.
<bitemyapp>
rgrinberg: you shouldn't be ashamed for having made something
<bitemyapp>
but, at least in Haskell, we can and have done _so much better_
<bitemyapp>
Pipes and Conduit are both faster and better designed.
<rgrinberg>
you can kind of do both in ocaml but making them generic is painful requires a functor
<bitemyapp>
Pipes isn't perfect, I'd drop the bidirectionality if I had my druthers.
<bitemyapp>
rgrinberg: yeah HKTs pay off pretty nicely here.
<rgrinberg>
yes - they seem much less useful in ocaml
<bitemyapp>
well, so do typeclasses IMO, but 8shrug*
<rgrinberg>
i don't care about typeclasses i'll pass my intances myself godammit
smtb has quit [Quit: WeeChat 0.4.2]
* bitemyapp
shrug
<bitemyapp>
old debate, neither of us are going to advance it either.
<bitemyapp>
I will say that making something manual/tedious usually leads to programmers not bothering.
<rgrinberg>
maybe we'll get a solution to that problem though with modular implicits
<bitemyapp>
I did have an experience today with a typeclass that would've been avoided with modules.
<bitemyapp>
rgrinberg: implicits don't really capture the value typeclasses provide.
<bitemyapp>
rgrinberg: I realize from the outside looking in, it seems like that, but it doesn't.
<bitemyapp>
rgrinberg: the key value is in the uniqueness, not being able to ignore provenance.
<bitemyapp>
being able to match a type against uniquely determined behavior and change the instance without having to worry about shadowing/argument passing is _very_ valuable.
swgillespie has joined #ocaml
<bitemyapp>
it means you can do some wild refactors once you're a steady hand with it.
<rgrinberg>
i'll take your word for it :D
<rgrinberg>
and PS i like my readable type signatures
tmtwd has joined #ocaml
<bitemyapp>
De gustibus non est disputandum
<rgrinberg>
haskell needs merlin and ocaml needs stack :/
<rgrinberg>
most of my complaints these days are with the tooling
<rgrinberg>
do they tackle the hard problem of making the tool usable when your code is in an incorrect state? e.g.some type error
* bitemyapp
thinks hard
<rgrinberg>
i find that sucky about ghc-mod. as soon as you have an error, it becomes useless.
<bitemyapp>
yeah I think that was an issue with ghc-mod.
ygrek_ has joined #ocaml
<rgrinberg>
That's when i find i need to ask merlin what the types are the most
<bitemyapp>
rgrinberg: I think a lot of Haskellers have habits like mine
<bitemyapp>
where you bottom out the stuff that doesn't/can't work yet
<bitemyapp>
and use completion in the bits that are coming along. if it cached the last successful known set of completions that would probably be fine 99% of the time.
<bitemyapp>
rgrinberg: how does merlin cope?
<rgrinberg>
def`: are you there? ^^
<bitemyapp>
yeah I'd really like to hear more about this
<bitemyapp>
because if it's tractable, I could patch ide-backend or ghc-mod.
<bitemyapp>
or convince somebody else to.
<rgrinberg>
well, merlin implements its own ocaml parser i'm pretty sure. that seems to handle incorrect code far better
<rgrinberg>
bitemyapp: trying it yourself would be easiest actually
<bitemyapp>
well, most people try to avoid writing their own parsers for Haskell for, uh, reasons.
<bitemyapp>
so I'm pondering where would be best to draw the line.
<bitemyapp>
best effort parsing, parsing but ignoring type-checking, etc.
<rgrinberg>
seems like it's hard but totally worth it if that's the main difference between merlin and ghc-mod
<bitemyapp>
ghc-mod is a multi-tasked beast
<bitemyapp>
it does error highlighting (hlint and type errors), completion, go-to definition, other things.
<rgrinberg>
merlin does those too
<bitemyapp>
ah well, they're about parity then
<bitemyapp>
and merlin's tolerance for ugly is probably the main differentiator then.
<bitemyapp>
rgrinberg: how fast is merlin?
<rgrinberg>
merlin also does some primitive refactoring now and case splitting now
<bitemyapp>
we have something for case-splitting a la Agda, but I forget where it is, lol.
<rgrinberg>
bitemyapp: instant - always.
<rgrinberg>
although i heard it took some effort to get to that point with jsc's massive codebase
* bitemyapp
nods
<rgrinberg>
yeah case splitting is a bit gimmicky i find.
<rgrinberg>
cool party trick though
<bitemyapp>
rgrinberg: tend to agree, particularly when I'm using prisms half the time anyway.
<bitemyapp>
rgrinberg: I take it it daemonizes in order to retain context then?
<rgrinberg>
yes it does
<rgrinberg>
does ghc-mod support TH i forgot..
<bitemyapp>
believe so, yeah
<bitemyapp>
rgrinberg: thanks for the chat, I really enjoyed it.
<bitemyapp>
rgrinberg: always out for things to steal. I'm surprised you think OCaml needs Stack - does OPAM not cache/share dependencies cross-project?
<rgrinberg>
bitemyapp: likewise. good luck with the book!
<rgrinberg>
well stack is more than just opam no?
<rgrinberg>
with stack i can build any haskell project out there without knowing more than a few commands
<rgrinberg>
try that with ocaml
<bitemyapp>
rgrinberg: ah right fair point.
<rgrinberg>
opam ~ cabal install + opam version manager
<rgrinberg>
s/opam version/ocaml version/
<bitemyapp>
well y'all use a greater variety of preprocessors and other things too right?
<rgrinberg>
i think it does that task better than cabal install
<bitemyapp>
we don't really have that. CPP and TH are baked in.
<bitemyapp>
Stack's management of the package databases is pretty impressive though.
<bitemyapp>
the new version shares duplicate dependencies between different snapshots now too, I believe
<rgrinberg>
yes and we also have a separate library manager - findlib
<bitemyapp>
so the caching resolution is now at the level of package-version
<bitemyapp>
so...now I rarely have to rebuild lens :D
<bitemyapp>
rgrinberg: yes thank you! @ book
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tmtwd has quit [Ping timeout: 240 seconds]
klj has quit [Quit: bye...]
AltGr has joined #ocaml
slash^ has joined #ocaml
<def`>
rgrinberg: I was sleeping. Yes lot of work goes into clever parsing, but it is automated
<def`>
(LR parser generator is augmented with mostly automatic recovery and error message generation)
<def`>
That way we can reuse upstream grammar in large parts
<rgrinberg>
bitemyapp: in case your'e interested ^^
<bitemyapp>
def`: thank you
<bitemyapp>
rgrinberg: thank you
<rgrinberg>
def`: excited to try out your new backtraces!
<def`>
np
<def`>
rgrinberg: ah yes I hope that will be useful, there is still a lot of work :)
raphaelss has joined #ocaml
<rgrinberg>
def`: you're solving the most painful parts of OCaml 1 by 1...
<rgrinberg>
you should make assemblage
<def`>
and GUIs :D
<def`>
I am kidding, I am confident in people working on assemblage
<def`>
(and thank you, yes solving painful parts is part of my plan ;), there are various approaches at that)
deavid has quit [Ping timeout: 250 seconds]
deavid has joined #ocaml
<raphaelss>
j #perl
<raphaelss>
ops, sorry guys
deavid has quit [Ping timeout: 256 seconds]
nullcatxxx_ has joined #ocaml
antkong has quit [Quit: antkong]
deavid has joined #ocaml
manuel__ has quit [Quit: manuel__]
obadz has quit [Ping timeout: 244 seconds]
<companion_cube>
rgrinberg: can't we have a look at your io streams?
deavid has quit [Ping timeout: 272 seconds]
deavid has joined #ocaml
obadz has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ggole has joined #ocaml
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
psy_ has quit [Ping timeout: 260 seconds]
ygrek_ has quit [Read error: Connection reset by peer]
ygrek has joined #ocaml
larhat has quit [Quit: Leaving.]
qrvpzvb has joined #ocaml
AltGr has left #ocaml [#ocaml]
antkong_ has joined #ocaml
MercurialAlchemi has joined #ocaml
psy_ has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
qrvpzvb has quit [Ping timeout: 246 seconds]
psy_ has quit [Ping timeout: 250 seconds]
martintrojer has quit [Ping timeout: 244 seconds]
ely-se has joined #ocaml
obadz has quit [Ping timeout: 240 seconds]
Haudegen has quit [Ping timeout: 240 seconds]
obadz has joined #ocaml
Kakadu has joined #ocaml
Haudegen has joined #ocaml
orbifx has joined #ocaml
rgrinberg has quit [Ping timeout: 268 seconds]
ely-se has quit [Quit: Leaving]
slash^ has quit [Read error: Connection reset by peer]
ely-se has joined #ocaml
scriptdevil has joined #ocaml
ely-se has quit [Quit: Leaving]
ely-se has joined #ocaml
rand__ has joined #ocaml
scriptdevil has quit [Ping timeout: 244 seconds]
scriptdevil has joined #ocaml
deavid has quit [Ping timeout: 255 seconds]
qrvpzvb has joined #ocaml
deavid has joined #ocaml
rgrinberg has joined #ocaml
scriptdevil has quit [Ping timeout: 250 seconds]
scriptdevil has joined #ocaml
rj-code has quit [Ping timeout: 256 seconds]
rgrinberg has quit [Ping timeout: 250 seconds]
rj-code has joined #ocaml
scriptdevil has quit [Ping timeout: 268 seconds]
scriptdevil has joined #ocaml
flx has joined #ocaml
jimt has quit [Ping timeout: 256 seconds]
jimt has joined #ocaml
bbc has quit [Ping timeout: 256 seconds]
psy_ has joined #ocaml
flxx has quit [Ping timeout: 256 seconds]
bbc has joined #ocaml
jonludlam has joined #ocaml
ousado has joined #ocaml
deavid has quit [Ping timeout: 240 seconds]
slash^ has joined #ocaml
deavid has joined #ocaml
orbifx has quit [Ping timeout: 240 seconds]
ousado has quit [Quit: --]
rgrinberg has joined #ocaml
jonludlam has quit [Ping timeout: 264 seconds]
rgrinberg has quit [Ping timeout: 268 seconds]
antkong_ has quit [Quit: antkong_]
qdwang has joined #ocaml
qdwang has quit [Remote host closed the connection]
mac10688 has joined #ocaml
jonludlam has joined #ocaml
psy_ has quit [Remote host closed the connection]
mort___ has joined #ocaml
<companion_cube>
hmm, apparently OCaml would fully switch to LGPL? that is nice
dsheets has joined #ocaml
<adrien>
companion_cube: where are you getting that from?
empyrean has quit [Remote host closed the connection]
<manuel__>
is there a way to reload a module in ocamltop / utop? I get something like this The files /Users/manuel/code/wesen/compiler-construction-ml/chap3/_build/lexer.cmo
<manuel__>
and /Users/manuel/code/wesen/compiler-construction-ml/chap3/_build/lexer.cmo
<manuel__>
disagree over interface Lexer
<manuel__>
i am reloading utop but it's a bit tedious
stormogulen has quit [Ping timeout: 264 seconds]
MercurialAlchemi has quit [Ping timeout: 255 seconds]
obadz has quit [Ping timeout: 268 seconds]
SomeDamnBody has joined #ocaml
<SomeDamnBody>
is there anybody who's ever used oasis with ocamlviz?
<SomeDamnBody>
you know, ocamlviz just needs some extra options and stuff in order to automatically instrument your code
<SomeDamnBody>
I'd like to just do that, but the problem is my project uses ocamlbuild and oasis
bbc has joined #ocaml
obadz has joined #ocaml
joncfoo has joined #ocaml
ygrek has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
SomeDamnBody has quit [Ping timeout: 264 seconds]
rgrinberg has joined #ocaml
Someone_ has joined #ocaml
raphaelss has joined #ocaml
scriptdevil has quit [Remote host closed the connection]
qrvpzvb has quit [Ping timeout: 240 seconds]
ketadmin has joined #ocaml
ollehar has joined #ocaml
joncfoo has quit [Ping timeout: 265 seconds]
malc_ has quit [Quit: leaving]
ely-se has quit [Quit: Leaving]
AlexRussia has quit [Ping timeout: 246 seconds]
lopex has joined #ocaml
AlexRussia has joined #ocaml
jonludlam has quit [Ping timeout: 252 seconds]
lobo has quit [Quit: leaving]
Someone_ has quit [Quit: Leaving]
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
ygrek has quit [Ping timeout: 260 seconds]
palomer has joined #ocaml
<palomer>
hey guys
rfv has quit [Ping timeout: 256 seconds]
<palomer>
does anyone have a favourite html templating framework for ocaml?
rfv has joined #ocaml
<companion_cube>
people using ocsigen have tyxml (I think)
<companion_cube>
otherwise there's a mustache thingie
<palomer>
tyxml seems a little heavy for my needs
manuel__ has quit [Quit: manuel__]
Kakadu has quit [Remote host closed the connection]