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
hilquias has quit [Ping timeout: 245 seconds]
yminsky has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yminsky has quit [Client Quit]
yminsky has joined #ocaml
yminsky has quit [Quit: yminsky]
badkins has quit []
AltGr has joined #ocaml
travisbrady has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
rgrinberg has joined #ocaml
<rgrinberg> Is there an example of using ppx from oasis somewhere?
<Drup> using or defining ,
<rgrinberg> using
<Drup> using is literally trivial, just list the ocamlfind ppx package in your dependency, there is nothing to do
milosn has quit [Ping timeout: 255 seconds]
<rgrinberg> Drup: I did not expect that :D, thanks. seems to work.
<Drup> too simple to work ? :p
NaCl has left #ocaml [#ocaml]
<rgrinberg> especially with oasis you expect much more fucking around
<Drup> well, adding dependencies never was something difficult with oasis
travisbrady has quit [Quit: travisbrady]
<Drup> adding dependencies *conditionally*, on the other hand ...
<rgrinberg> well i remember with oasis 0.2 camlp4 wasn't really integrated so there was some black magic involved
<rgrinberg> although i could be misremembering
<Drup> oasis 0.2 ? how long ago is that ?
<rgrinberg> before opam was out, please don't make me remember
<Drup> ahah :D
<rgrinberg> oh wow, sedlex completely borks merlin
<Drup> ah
milosn has joined #ocaml
<Drup> didn't remember any issue
<rgrinberg> do you use master or last release?
<rgrinberg> I use master
<Drup> I think I tried with the branch when def` told me to, but didn't retried since
ghostpl_ has joined #ocaml
<rgrinberg> "Sedlex: the last branch must a catch-all error case" can't sedlex insert some assert false for you there?
ollehar has quit [Ping timeout: 264 seconds]
<Drup> blerg.
reem has quit [Remote host closed the connection]
<rgrinberg> Also, is it possible to use sedlex just on bytes? I mean without choosing any encoding
<Drup> yes
reem has joined #ocaml
<Drup> just use the main module (Sedlexing) instead of one of the submodules
<Drup> and regardless of the encoding, you can still put the ints in the "pattern match", it will work as expected
<rgrinberg> wtf, did you guys design this thing or what? :D
<Drup> ?
<rgrinberg> it makes sense :D
<Drup> I don't understand the question x)
<rgrinberg> Anyway, I couldn't find Sedlex.from_string or Sedlex.from_bytes so that threw me off
<rgrinberg> it was rhetorical haha, I meant that it's well organized
<Drup> well, if you don't want any encoding, you can't take from a string ...
<rgrinberg> what about from_bytes though
<Drup> it could be added
lordkryss has quit [Quit: Connection closed for inactivity]
SomeDamnBody has joined #ocaml
nullcat has joined #ocaml
pyon-tinuation is now known as defini-pyon-ally
ollehar has joined #ocaml
<rgrinberg> How come sedlex copies the string if you use from_string? :O
<Drup> hum ?
<Drup> the internal representation is an array of codepoint
<Drup> this could be improved with some work, it's on my todo list
ghostpl_ has quit [Ping timeout: 272 seconds]
<Drup> (in particular in relation to the mirage stuff for no-copy parsers)
reem has quit [Read error: No route to host]
<rgrinberg> yeah this is what's been occupying my mind lately in OCaml
reem has joined #ocaml
<rgrinberg> Drup: on bigstrings in particular.
<Drup> yes
c74d has quit [Quit: c74d]
<Drup> contribution on this are very welcome and I might give a hand :p
<rgrinberg> adding bigstrings to sedlex should be trivial I think. Although since sedlex does plenty of its own copying its hard to see the point
<Drup> well, the point would be to remove/decrease the amount of copying done by sedlex
<Drup> note that you can always provide your own Sedlexing module that do things completely differently
reem has quit [Remote host closed the connection]
dav has quit [Ping timeout: 240 seconds]
dav has joined #ocaml
reem has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
reem has quit [Remote host closed the connection]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
r_ has quit [Quit: Leaving]
darkf has joined #ocaml
ollehar has quit [Quit: ollehar]
ygrek has joined #ocaml
WraithM has quit [Quit: leaving]
bjorkintosh has quit [Ping timeout: 255 seconds]
<rgrinberg> hmm you should be able to get lexeme as bytes as well
SomeDamnBody has quit [Ping timeout: 256 seconds]
bjorkintosh has joined #ocaml
SomeDamnBody has joined #ocaml
bjorkintosh has quit [Max SendQ exceeded]
bjorkintosh has joined #ocaml
bjorkintosh has quit [Ping timeout: 264 seconds]
bjorkintosh has joined #ocaml
ggole has joined #ocaml
reem has joined #ocaml
rand000 has quit [Quit: leaving]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bjorkintosh has quit [Read error: Connection timed out]
ghostpl_ has joined #ocaml
bjorkintosh has joined #ocaml
ab3 has joined #ocaml
<ab3> hi
<rgrinberg> hello
nullcat has joined #ocaml
hilquias` has quit [Ping timeout: 272 seconds]
_5kg has quit [Ping timeout: 246 seconds]
ghostpl_ has quit [Ping timeout: 252 seconds]
c74d has joined #ocaml
ab3 has quit [Ping timeout: 246 seconds]
SomeDamnBody has quit [Ping timeout: 264 seconds]
c74d has quit [Quit: c74d]
c74d has joined #ocaml
nullcat has quit [Ping timeout: 246 seconds]
nullcat has joined #ocaml
bjorkintosh has quit [Ping timeout: 265 seconds]
reem has quit [Remote host closed the connection]
c74d has quit [Remote host closed the connection]
bjorkintosh has joined #ocaml
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
WraithM has joined #ocaml
c74d has joined #ocaml
struktured has quit [Ping timeout: 265 seconds]
bjorkintosh has quit [Quit: Leaving]
bjorkintosh has joined #ocaml
_5kg has joined #ocaml
_5kg has quit [Ping timeout: 244 seconds]
WraithM has quit [Quit: leaving]
reem has joined #ocaml
<seliopou> just occurred to me to ask, but why is cohttp called that?
struktured has joined #ocaml
_5kg has joined #ocaml
_5kg has quit [Ping timeout: 245 seconds]
reem has quit [Remote host closed the connection]
reem has joined #ocaml
ghostpl_ has joined #ocaml
_5kg has joined #ocaml
_5kg has quit [Ping timeout: 245 seconds]
_5kg has joined #ocaml
_5kg has quit [Ping timeout: 240 seconds]
ygrek has quit [Ping timeout: 240 seconds]
_5kg has joined #ocaml
_5kg has quit [Ping timeout: 265 seconds]
ghostpl_ has quit [Ping timeout: 252 seconds]
_5kg has joined #ocaml
_5kg has quit [Ping timeout: 255 seconds]
AlexRussia has joined #ocaml
_5kg has joined #ocaml
keen__________83 has joined #ocaml
keen__________82 has quit [Ping timeout: 250 seconds]
_5kg has quit [Ping timeout: 246 seconds]
rgrinberg1 has joined #ocaml
rgrinberg has quit [Ping timeout: 264 seconds]
mcc has quit [Quit: This computer has gone to sleep]
_5kg has joined #ocaml
ygrek has joined #ocaml
reem has quit [Remote host closed the connection]
brendan has joined #ocaml
reem has joined #ocaml
ghostpl_ has joined #ocaml
marynate has joined #ocaml
oscar_toro has quit [Quit: Lost terminal]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xificurC has joined #ocaml
axiles has quit [Quit: Quitte]
ghostpl_ has quit [Ping timeout: 265 seconds]
Bhavya has joined #ocaml
Haudegen has quit [Ping timeout: 245 seconds]
kakadu has joined #ocaml
axiles has joined #ocaml
MercurialAlchemi has joined #ocaml
Haudegen has joined #ocaml
rgrinberg1 has quit [Ping timeout: 245 seconds]
xinau has joined #ocaml
reem has quit [Remote host closed the connection]
ebzzry has quit [Remote host closed the connection]
reem has joined #ocaml
ebzzry has joined #ocaml
tane has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
ghostpl_ has joined #ocaml
reem has quit [Remote host closed the connection]
bjorkintosh has quit [Ping timeout: 244 seconds]
zpe has joined #ocaml
mal`` has quit [*.net *.split]
Bhavya has quit [Ping timeout: 264 seconds]
mal`` has joined #ocaml
ghostpl_ has quit [Ping timeout: 256 seconds]
Simn has joined #ocaml
lordkryss has joined #ocaml
rgrinberg1 has joined #ocaml
<companion_cube> o/ rgrinberg1
matason has joined #ocaml
* adrien_znc feels unloved by companion_cube
<companion_cube> \o adrien_znc
larhat has quit [Quit: Leaving.]
<adrien_znc> \o/
* adrien_znc hugs companion_cube
<companion_cube> yay!
Bhavya has joined #ocaml
rgrinberg1 has quit [Ping timeout: 265 seconds]
marynate has quit [Quit: Leaving]
ollehar has joined #ocaml
dsheets has quit [Ping timeout: 246 seconds]
Bhavya has quit [Ping timeout: 256 seconds]
testcocoon has quit [Quit: Coyote finally caught me]
testcocoon has joined #ocaml
mort___ has joined #ocaml
ghostpl_ has joined #ocaml
ghostpl_ has quit [Ping timeout: 246 seconds]
octachron has joined #ocaml
ocp has joined #ocaml
AltGr has left #ocaml [#ocaml]
dsheets has joined #ocaml
ghostpl_ has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
ghostpl_ has joined #ocaml
Haudegen has quit [Ping timeout: 246 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
johnelse has quit [Quit: leaving]
zpe has quit [Read error: Connection reset by peer]
Haudegen has joined #ocaml
rand000 has joined #ocaml
yminsky has joined #ocaml
johnelse has joined #ocaml
defini-pyon-ally is now known as noyp-esrever
rgrinberg1 has joined #ocaml
rgrinberg1 has quit [Ping timeout: 245 seconds]
yomimono has joined #ocaml
axiles has quit [Ping timeout: 272 seconds]
matason has quit [Ping timeout: 250 seconds]
yminsky has quit [Quit: yminsky]
govg has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
Bhavya has joined #ocaml
_andre has joined #ocaml
waneck has quit [Ping timeout: 252 seconds]
axiles has joined #ocaml
yminsky has joined #ocaml
`eeks has joined #ocaml
sdothum has joined #ocaml
axiles has quit [Ping timeout: 240 seconds]
axiles has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
yminsky has quit [Quit: yminsky]
yomimono has quit [Ping timeout: 256 seconds]
ebzzry has quit [Remote host closed the connection]
dsheets has quit [Ping timeout: 250 seconds]
ghostpl_ has joined #ocaml
yomimono has joined #ocaml
rgrinberg1 has joined #ocaml
rgrinberg1 has quit [Ping timeout: 246 seconds]
pii4 has quit [Quit: [-.-]...]
WraithM has joined #ocaml
dsheets has joined #ocaml
noyp-esrever is now known as direct-pyon
mort___ has left #ocaml [#ocaml]
yomimono has quit [Ping timeout: 252 seconds]
TheLemonMan has joined #ocaml
direct-pyon has quit [Quit: I'm sorry but... I don't have any interest in three-dimensional girls.]
arj has joined #ocaml
pii4 has joined #ocaml
martintrojer has quit [Max SendQ exceeded]
dsheets has quit [Ping timeout: 240 seconds]
martintrojer has joined #ocaml
badkins has joined #ocaml
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
shinnya has joined #ocaml
matason has joined #ocaml
<xificurC> hey, what would you recommend as a start to OCaml? I know several languages (which doesn't mean I'm proficient with them, but I understand them and most of their concepts), including Haskell
<MercurialAlchemi> xificurC: Real World OCaml
<MercurialAlchemi> and then read the manual
<`eeks> + choose a project you have in mind and decide to write it in OCaml.
<adrien_znc> (but not mldonkey)
<TheLemonMan> I found the 'learn' section in the ocaml site to be more clear than RWO
<xificurC> thanks for the suggestions, will look around. is the type system similar to haskell's?
<xificurC> or more broadly, what are the key differences
<MercurialAlchemi> no HKT
<MercurialAlchemi> no typeclasses
<MercurialAlchemi> (yet)
<MercurialAlchemi> no parallelism
<MercurialAlchemi> a module system, and polymorphic variants
<MercurialAlchemi> better pattern-matching
<rks`> MercurialAlchemi: the parallelism is related to the type system??
<rks`> pattern matching too?
<octachron> +functor
<MercurialAlchemi> rks`: I'm taking "more broadly" broadly
<rks`> :D
<rks`> alright
<rks`> and how is the pattern matching better?
<xificurC> MercurialAlchemi: you're saying no typeclasses, is there a different solution to ad-hoc polymorphism implemented then?
<MercurialAlchemi> you can combine with guards for 100% more awesomeness
<rks`> xificurC: not yet
<TheLemonMan> oh, so there are plans to implement typeclasses ?
<octachron> not exactly
<rks`> look for "modular implicits"
<xificurC> hm, I saw some monad packages lying around, how are those implemented then?
<rks`> (on reddit ocaml or wherever)
<MercurialAlchemi> OCaml is also missing the namespacing issues so painful in Haskell
<MercurialAlchemi> so you can use records without shooting yourself in the head
<haesbaert> btw, isn't there a current project in cambridge to provide paralellism in ocaml ?
rgrinberg1 has joined #ocaml
<Drup> haesbaert: yes
<xificurC> hm, I'm gonna miss some of those I guess. HKT is planned or not?
<Drup> not really
<Drup> you rarelly need HKT outside of typeclasses
ebzzry has joined #ocaml
<Drup> rarely*
JuggleTux has quit [Remote host closed the connection]
<xificurC> Drup: and typeclasses are being worked at or close to being included in a next release :)
<Drup> hum, I highly doubt next release :p
<TheLemonMan> oh what a wonderful time to be alive :D
<Drup> (already plenty of awesomeness in next OCaml release anyway :D)
<TheLemonMan> is there an early changelog or something like that ?
rgrinberg1 has quit [Ping timeout: 246 seconds]
Bhavya has quit [Quit: Quit the channel]
xinau has quit [Ping timeout: 240 seconds]
<companion_cube> oh, custom index operations have been merged? neat
<xificurC> still don't understand how come there's monad libraries in OPAM if typeclasses are not implemented
yminsky has joined #ocaml
<Drup> xificurC: the monad system allows you to do several interesting things :)
<tane> xificurC, because monads have nothing to do with typeclasses, only abstractions over monads and monad syntax sugar do
<Drup> the module system*
<Drup> =')
<companion_cube> well, I agree it's a bit weird to deal with monads in general without HKT
<tane> and those abstractions can be modeled using the module system as well
axiles has quit [Read error: Connection reset by peer]
<companion_cube> I'm disappoint my bugfix/change to Buffer hasn't cut it yet
<companion_cube> disappointed
<xificurC> tane: I see. One day I hope to understand that
<tane> xificurC, if you look at ocamls monads, that may become clearer
<tane> as those are not as interwoven with the whole program structure as in haskell
larhat has joined #ocaml
paradoja has joined #ocaml
paradoja has quit [Remote host closed the connection]
xinau has joined #ocaml
axiles has joined #ocaml
jao has quit [Ping timeout: 244 seconds]
vfoley- has quit [Remote host closed the connection]
pyon has joined #ocaml
dsheets has joined #ocaml
yomimono has joined #ocaml
ygrek has joined #ocaml
<xificurC> only now it struck me I heard what's missing but not really what's here, compared to haskell. MercurialAlchemi said module system and polymorphic variants (don't know what that means yet). So what makes you choose OCaml over haskell?
<companion_cube> it's strict, it allows to write many things in a concise fashion using a few side effects
<companion_cube> the module system is far superior to any other module system (well except SML since it's the same)
<Drup> hey, I discovered recently that SML doesn't have high order functors !
<Drup> (okay, I see already people telling me it's a good thing)
igstan has joined #ocaml
<rks`> (naaaah)
<Drup> they also only have the generative behavior, which must be quite annoying at time (but safer)
<xificurC> companion_cube: thanks
<Drup> xificurC: polymorphic variants (and the objects system) are quite useful when you need subtyping relationships
<companion_cube> Drup: oh
<Drup> which are quite hard to encode in Haskell without a good amount of sophisticated type trickery.
<companion_cube> also, private types/private aliases are very nice
<Drup> (also know as "drive yourself insane with type families")
<companion_cube> type-driven insanity
<Drup> {-# LANGUAGE CTHULHU #-}
olibjerd has joined #ocaml
olibjerd2 has joined #ocaml
antkong has joined #ocaml
travisbrady has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
ghostpl_ has joined #ocaml
Algebr has joined #ocaml
mcclurmc has joined #ocaml
NaCl has joined #ocaml
travisbrady has quit [Quit: travisbrady]
yminsky has quit [Quit: yminsky]
rand000 has quit [Ping timeout: 240 seconds]
igstan has quit [Quit: igstan]
ghostpl_ has quit [Remote host closed the connection]
<Algebr> Is there any special name for making types like printf's, for example like type ('first, 'second, 'third) foo
<Drup> "type ('foo,'bar) t = ..." ?
<Drup> (or I don't understand the question)
ghostpl_ has joined #ocaml
travisbrady has joined #ocaml
<Algebr> just like if there is a name for making these kinds of types, if they are known as some kind of pattern
<Drup> not really, they just have multiple arguments, nothing fancy
ghostpl_ has quit [Remote host closed the connection]
ghostpl_ has joined #ocaml
<ggole> Just 6 arguments, nbd
<ggole> You know your code is elegant when you have 6 type arguments
ghostpl_ has quit [Remote host closed the connection]
mhi^ has left #ocaml [#ocaml]
<Drup> :D
<octachron> which makes writing the type of service a *little* bit annoying in eliom
<ggole> Nope.
ygrek has quit [Ping timeout: 255 seconds]
struktured has quit [Ping timeout: 265 seconds]
<companion_cube> Drup: in the code, I assume it uses "constraint" ?
dsheets has quit [Ping timeout: 244 seconds]
<TheLemonMan> I stumbled across the monad module and started writing a simple implementation for option (http://ix.io/gOk) but I'm puzzled by the fact I have to do Amodule.bind/return to compose the actions…am I missing something ?
ygrek has joined #ocaml
<tane> TheLemonMan, you can define your own infix functions
paradoja has joined #ocaml
<TheLemonMan> tane, as in let (>>=) = Amonad.bind;; ?
<tane> yes
<tane> if you're looking for general syntax sugar: there is none
rgrinberg1 has joined #ocaml
<tane> gtg now, bye :)
tane has quit [Quit: Verlassend]
<TheLemonMan> the next question is about how to pattern-match an instance of Amonad
rgrinberg1 has quit [Ping timeout: 246 seconds]
zpe has joined #ocaml
ccomp has joined #ocaml
<ccomp> is there a generally accepted best way of getting outside code that you're trying to prove things about into Coq?
<ccomp> I've been looking into different lexing and parsing tools, but pretty much everything is in Ocaml and I don't know of an easy way to load Ocaml types/data into Coq.
darkf has quit [Quit: Leaving]
<seliopou> so InternalModules in an _oasis file. That shouldn't expose those modules when linking with other packages, right?
<rks`> ccomp: just extract your coq parts to ocaml
<rks`> and #coq would probably be more suited for this kind of questions
<ccomp> rks`: Here's the problem, though: I have to lex and parse code to prove it. It's far easier to lex and parse in Ocaml. I have to prove in Coq. Extraction is Coq -> Ocaml and I need to go Ocaml -> Coq
<rks`> well
ghostpl_ has joined #ocaml
<rks`> your parser will produce an ast
<rks`> just make it produce values from the ast extracted from coq
<rks`> and then call your coq extracted functions on it
rgrinberg1 has joined #ocaml
<ccomp> rks`: "just make it produce values from the ast extracted from coq" Can you clarify this? What's being extracted? Where is the boundary between Coq and Ocaml?
<companion_cube> seliopou: I think it shouldn't, indeed
<ccomp> Oh, you mean write the lexer and parser in Coq?
<ccomp> I could, but then I'd have to write a lexer and parser in Coq...
MrScout has joined #ocaml
ptc has joined #ocaml
<seliopou> companion_cube: thought so, but unfortunately it seems to be conflicting for me. package-a (not packed) has a Util InternalModule. package-b has a Util InternalModule and depends on pacakge-a. Linking to produce a binary produces the conflict. :/
<seliopou> pacakge-b is not packed as well
ptc is now known as Guest97801
<seliopou> just gonna prefix the util modules and move on D:
ghostpl_ has quit [Remote host closed the connection]
ghostpl_ has joined #ocaml
<companion_cube> yes, I think that's better
<companion_cube> sadly
badkins_ has joined #ocaml
<seliopou> The Dream will just have to live in our hearts for now.
badkins has quit [Ping timeout: 245 seconds]
fedjo is now known as fedjo_living_fig
fedjo_living_fig is now known as fedjo_fighter
ghostpl__ has joined #ocaml
ghostpl_ has quit [Read error: Connection reset by peer]
ocp has quit [Ping timeout: 256 seconds]
<rks`> ccomp: no that's not what I mean
<rks`> maybe I didn't understand what you're trying to do
<rks`> but I thought you wanted to write some "language manipulation function", and prove some property about them
<rks`> what I'm telling you is, do that in coq
<rks`> extract the whole lot to ocaml
<rks`> and then call and ocaml parser, and the ocaml library extracted from coq
<_obad_> oasis question. when invoking make install, how can I override the destdir dynamically?
<companion_cube> have oasis generate a configure script, I think
<companion_cube> and use the configure script to change directories
<_obad_> companion_cube: but that's the thing, I'm fine with the install being ~/.opam for libraries but for executables I'd like /usr/local/bin, but then sudo fkcs up my ~/.opam
<companion_cube> then you need to tell opam where you want stuff to get installed (if that's doable at all...)
<_obad_> companion_cube: that's my question. there is stuff about variables in setup.ml but I don't know how they can be overridden
<_obad_> there is a destdir variable, but I don't know if I can override it from the env or the command line
badkins_ has quit []
Algebr has quit [Remote host closed the connection]
<TheLemonMan> duh, I can't seem to get this right, the compiler claims that 'a Amonad.t a different type from 'a option
dsheets has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
<ccomp> rks`: I want to be able to prove correctness properties about code written in a certain language. A validator, basically.
<ccomp> rks`: Does that make sense? I'm still very new to this.
braibant has joined #ocaml
robink has quit [Ping timeout: 244 seconds]
olibjerd2 has quit [Remote host closed the connection]
<companion_cube> Drup: I didn't follow closely, how is the common result type going to be integrated then?
<companion_cube> I hope there is a compat package
<rks`> ccomp: ah
<rks`> you can probably do it, and people on #coq will certainly help you
ghostpl__ has quit [Remote host closed the connection]
rand000 has joined #ocaml
ghostpl_ has joined #ocaml
<TheLemonMan> I had to modify the module declaration to "module Amonad : Basic with type 'a t = 'a option", but don't really know why
olibjerd_ has joined #ocaml
robink has joined #ocaml
<octachron> TheLemonMan: probably because 'a t was abstract in the module type Basic
rgrinberg1 has quit [Ping timeout: 272 seconds]
<octachron> i.e. module type Basic = sig type 'a t end
<TheLemonMan> octachron, I assumed that having 'type 'a t = 'a option' in the struct would be enough
<octachron> no, the structure defines the implementation, the signature defines the interface
<octachron> so, if you write sig type 'a t end, you are saying that the module contains a type 'a t, whose implementation is abstract , i.e hidden from outside the module
<TheLemonMan> I know, but if you see here (http://ix.io/gOk) you'll get what I mean
rgrinberg1 has joined #ocaml
<octachron> when you write Amonad: Basic, you are giving the signature Basic (where 'a t is abstract) to the module Amonad
<ccomp> rks`: Thanks. I'm also going to email the author of the CompCert verified parser briefly. It would be a lot easier if that were separately packaged and more modular
robink has quit [Remote host closed the connection]
<TheLemonMan> octachron, right. but why do I have to repeat the parametrization for option twice ?
<octachron> TheLemonMan: note that another way to make your code works is to delete the signature annotation of Amonad
<TheLemonMan> deleting the signature annotation makes it virtually impossible to pattern match an Amonad-returned object
<octachron> TheLemonMan: when you add "with type 'a t= 'a option", you are informing the compiler that 'a t is equal to 'a option, otherwise as far as the compiler knows the two type are different
<octachron> TheLemonMan: what do you mean with pattern match an Amonad-returned object?
<TheLemonMan> octachron, but doesn't 'type 'a t = 'a option;;' do the same ?
<TheLemonMan> octachron, eg Amonad.return (3)
oriba has joined #ocaml
<TheLemonMan> which is int option, but without the annotation the compiler treats it as different from int Amonad.t
<octachron> TheLemonMan: type 'a t = 'a option inside the structure is an implementation detail; in the signature it is a a type equality
<TheLemonMan> ooh, I assumed the compiler would infer that from the implementation of t
<octachron> TheLemonMan: (match Amonad.return 3 with Some x -> x | None -> 0) works perfectly fine for me in the toplevel?
<TheLemonMan> octachron, indeed it does when it's declared as "module Amonad : Basic with type 'a t = 'a option"
<octachron> TheLemonMan: if you don't add a signature to Amonad, the compiler will infer the equality. Adding the signature gives you the option to *hide* the type equality.
<octachron> TheLemonMan: it works also without the signature annotation (:Basic)
<Drup> companion_cube: yes, there going to be one
<Drup> of a form similar to Byte
<Drup> Return.t
<Drup> Bytes*
<Drup> well, that's the current state of the discussion at least
jwatzman|work has joined #ocaml
<Drup> octachron: did you ever got the need to spell out the complete type of a service ?
<TheLemonMan> octachron, http://ix.io/gOp still fails for me
MrScout_ has joined #ocaml
<Drup> TheLemonMan: "it works also **without the signature annotation** (:Basic) "
dsheets has quit [Ping timeout: 265 seconds]
AlexRussia has quit [Ping timeout: 252 seconds]
<TheLemonMan> oh, I've read that as "take out everything but :Basic"
MrScout has quit [Ping timeout: 265 seconds]
<octachron> Drup: yes, once or twice, but probably due to bad design in my code
<Drup> well, I'm sure you can find use case that makes it necessary/useful, I just would be interested in knowing what it is ;)
slash^ has joined #ocaml
slash^ has left #ocaml [#ocaml]
slash^ has joined #ocaml
badkins has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
ghostpl_ has joined #ocaml
ccomp has quit [Ping timeout: 246 seconds]
ghostpl_ has quit [Ping timeout: 245 seconds]
ghostpl_ has joined #ocaml
MrScout_ has quit [Remote host closed the connection]
MrScout has joined #ocaml
MrScout has quit [Read error: Connection reset by peer]
MrScout has joined #ocaml
MrScout has quit [Read error: No route to host]
martintrojer has quit [Max SendQ exceeded]
MrScout has joined #ocaml
martintrojer has joined #ocaml
olibjerd_ has quit [Remote host closed the connection]
MrScout has quit [Client Quit]
dsheets has joined #ocaml
MrScout has joined #ocaml
<nicoo> TheLemonMan: The compiler cannot infer the “'a t = 'a option” from the implementation, because it cannot know whether you mean for the implementation of 'a t to be exposed or not
TheLemonMan has quit [Quit: leaving]
ghostpl_ has quit [Remote host closed the connection]
arj has quit [Quit: Leaving.]
jao has joined #ocaml
oriba has quit [Quit: Verlassend]
jao has quit [Changing host]
jao has joined #ocaml
ccomp has joined #ocaml
octachron has quit [Quit: Leaving]
SomeDamnBody has joined #ocaml
travisbrady has quit [Quit: travisbrady]
antkong has quit [Quit: antkong]
jwatzman|work has quit [Quit: jwatzman|work]
ccomp has quit [Quit: WeeChat 1.1]
ccomp has joined #ocaml
`eeks has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
`eeks has joined #ocaml
<ccomp> can anyone with better Makefile skills than me tell me why this has an error? It isn't my code, but it seems like something pretty simple and fixable is going wrong.
ghostpl_ has joined #ocaml
<Drup> ah, the infamous custom makefile that never works.
<ccomp> it's telling me "/bin/sh: ne-line *.mli *.ml >.depend: bad option"
<ccomp> Drup: What do you mean exactly? Not challenging you, just curious.
<Drup> let's call it experimental conclusion
<Drup> when you see someone who wrote his own custom makefile in an OCaml project
<ccomp> It seems like it should make, too. It's an acceptably mature and publicly listed project.
<Drup> the makefile is almost always broken.
<ccomp> Drup: what's the alternative?
<Drup> if you want to stick with makefiles, OCamlMakefile is at least relatively resilient.
<ccomp> Oh, I forgot that that existed
<ccomp> Anyway, do you have any idea how I can fix this?
<Drup> none whatsoever
<Drup> I'm not very good with makefiles either :p
travisbrady has joined #ocaml
<Drup> also, hum, not sure how you ended up on this project, but the documentation returns 404, it's not on opam and I personally stay away from people who use "+" as commit messages.
nullcat has joined #ocaml
<ccomp> Drup: Heh, true. He's an active researcher in the area, though, and there are only so many options out there for formally verified Coq parser generators.
<ccomp> By which I mean three, maximum. And I can only find code for one. And that code is undocumented
rgrinberg1 has quit [Ping timeout: 264 seconds]
<Drup> :researchers:
<ccomp> I really wish there were more of a culture of publishing and documenting code in the Coq community
<Drup> ccomp: but the Coq part is not included here
<Drup> so the fact that it's verified is worthless
matason has quit [Ping timeout: 256 seconds]
Submarine has joined #ocaml
Submarine has joined #ocaml
<ccomp> Drup: True. I'm pretty sure I know which one it's in, though. There's a link at the bottom of this: http://www.tom-ridge.com/2011-12-01_verified_parsing.html
<ccomp> there's also a make error there...
<ccomp> I think I'm jumping ship on this project
jao has left #ocaml ["Using Circe, the loveliest of all IRC clients"]
<Drup> anyway, isn't the usual method to parse out of Coq and use the result in Coq ?
<Drup> iirc, it's how it's done in compcert (or at least, was done, for quite a long time)
<Drup> ppx js_of_ocaml, here I go
ollehar has quit [Ping timeout: 256 seconds]
Haudegen has quit [Ping timeout: 264 seconds]
rgrinberg1 has joined #ocaml
<companion_cube> ccomp: it might get better once Coq users put their code on opam
Haudegen has joined #ocaml
dsheets has quit [Ping timeout: 265 seconds]
olauzon has joined #ocaml
<ccomp> Drup: I worked with the CompCert code for a very long time yesterday and was stuggling to get it to work
<ccomp> Drup: There's actually an undocumented --coq option for Menhir, which they use
<Drup> ahah
<Drup> well, use that :)
<ccomp> Drup: are you talking about this, or what preceded it? http://gallium.inria.fr/~scherer/gagallium/verifying-a-parser-for-a-c-compiler/index.html
<Drup> menhir is robust and documented (well, appart from the undocumented option, that is :D)
<ccomp> before that they just used an unverified parser, IIRC
<Drup> I was thinking of the unverified parser, yes
yomimono has quit [Ping timeout: 250 seconds]
<ccomp> The problem is, *none* of it's documented, including how to hook the lexer (which is to be written in Ocaml) into it. very confusing. And they use a stream or something instead of just a lexbuf (the Lexing default) because of difficulties with the proof
slash^ has quit [Read error: Connection reset by peer]
SomeDamnBody has quit [Ping timeout: 252 seconds]
<Drup> I see
paradoja has quit [Ping timeout: 272 seconds]
<ccomp> so you end up with 20,000+ lines of extracted Ocaml and have to figure out how to use it
<Drup> call for help on the compcert mailing list ? ^^'
<ccomp> and in the actual CompCert source code, there's all this line number and error checking stuff, much of which seems to be necessary only because of the warts of the C spec that need a state store
<ccomp> I probably should
<Drup> good luck =)
ghostpl_ has quit [Remote host closed the connection]
<ccomp> There doesn't seem to be a mailing list. I think I'll just start with the author of the CompCert/Menhir parser
<ccomp> anyway, thanks for the help Drup
ghostpl_ has joined #ocaml
rgrinberg1 has quit [Ping timeout: 252 seconds]
travisbrady has quit [Quit: travisbrady]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zpe has quit [Remote host closed the connection]
axiles has quit [Ping timeout: 272 seconds]
Denommus has joined #ocaml
travisbrady has joined #ocaml
nullcat has joined #ocaml
SomeDamnBody has joined #ocaml
zpe has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
ollehar has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
mort___ has joined #ocaml
axiles has joined #ocaml
Haudegen has joined #ocaml
regnat has quit [Quit: ZNC - http://znc.in]
dsheets has joined #ocaml
matason has joined #ocaml
kakadu has quit [Ping timeout: 246 seconds]
badkins has quit []
rand000 has quit [Ping timeout: 252 seconds]
kakadu has joined #ocaml
matason has quit [Ping timeout: 272 seconds]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ghostpl_ has quit [Remote host closed the connection]
SomeDamnBody has quit [Ping timeout: 252 seconds]
Anarchos has joined #ocaml
mort___ has quit [Quit: Leaving.]
MrScout has quit [Ping timeout: 256 seconds]
rand000 has joined #ocaml
rgrinberg1 has joined #ocaml
govg has quit [Ping timeout: 265 seconds]
nullcat has joined #ocaml
govg has joined #ocaml
MrScout has joined #ocaml
badkins has joined #ocaml
ggole has quit []
rgrinberg1 has quit [Ping timeout: 252 seconds]
nullcat_ has joined #ocaml
nullcat has quit [Ping timeout: 250 seconds]
nullcat_ has quit [Read error: Connection reset by peer]
rgrinberg1 has joined #ocaml
ghostpl_ has joined #ocaml
Haudegen has quit [Ping timeout: 272 seconds]
antkong has joined #ocaml
mort___ has joined #ocaml
olibjerd has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
mort___ has quit [Client Quit]
Haudegen has joined #ocaml
govg has quit [Ping timeout: 264 seconds]
govg has joined #ocaml
larhat has quit [Quit: Leaving.]
ccomp has quit [Quit: WeeChat 1.1]
Nijikokun has joined #ocaml
Nijikokun has quit [Max SendQ exceeded]
claudiuc has joined #ocaml
claudiuc has quit [Remote host closed the connection]
Nijikokun has joined #ocaml
claudiuc has joined #ocaml
bjorkintosh has joined #ocaml
bjorkintosh has quit [Read error: Connection reset by peer]
bjorkintosh has joined #ocaml
axiles has quit [Ping timeout: 246 seconds]
axiles has joined #ocaml
MrScout has quit [Remote host closed the connection]
mort___ has joined #ocaml
MrScout has joined #ocaml
matason has joined #ocaml
<Drup> ppx_tools for 4.03 √
<Drup> lwt ppx for 4.03 √
<Drup> whitequark: cppo for lwt ?
rgrinberg1 is now known as rgrinberg
<companion_cube> what fo?
<companion_cube> for*
<Drup> handling the changes in ppx
TheLemonMan has joined #ocaml
<companion_cube> awww.
antkong has quit [Quit: antkong]
<companion_cube> you mean the precedence stuff that is being discussed?
<Drup> no
<whitequark> just use cppo
<whitequark> oh, wait, nevermind, i misread
<Drup> companion_cube: changes of representation of labels in the parsetree
<Drup> you can thanks def` ;)
<Drup> (and I really mean thanks, it's a good change)
_andre has quit [Quit: leaving]
reem has joined #ocaml
nullcat has joined #ocaml
mridul_seth has joined #ocaml
<companion_cube> but, what's that have to do with lwt? do you mean every ppx extension will have to deal withthe chnge?
<Drup> yes.
<companion_cube> -_-
<whitequark> that's the nature of ppx
nullcat has quit [Ping timeout: 264 seconds]
rgrinberg has quit [Ping timeout: 256 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
`eeks has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
badkins has quit []
<def`> yeah \o/
oscar_toro has joined #ocaml
MrScout has quit [Remote host closed the connection]
yomimono has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
jwatzman|work has joined #ocaml
<xificurC> batteries vs corem
<whitequark> containers
<Drup> fight !
<xificurC> core* - should I care as a newcomer?
Haudegen has quit [Ping timeout: 240 seconds]
oriba has joined #ocaml
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
<xificurC> I'm getting an error on opam installing camlp4 - ./check-camlp4.sh: line 3: camlp4orf: command not found . Anyone knows what might I be doing wrong? I see an issue open on github with this but they are discussing homebrew, I'm on arch
<whitequark> I think
<whitequark> fix by doing: opam switch 4.02.1
<xificurC> whitequark: that recompiles ocaml right? I have (had) ocaml installed through pacman
<whitequark> yes
<whitequark> it appears to be broken in arch, you're second or third this week with that problem
Haudegen has joined #ocaml
<xificurC> whitequark: thank you for your quick help
matason has quit [Ping timeout: 240 seconds]
<xificurC> so are batteries and core 2 different choices for a standard lib or are they used in conjunction
<Drup> the former
<Drup> they are not strictly incompatible though, you can use both, but it's rather pointless
<Drup> (except if you want a library using core and one using batteries, no problem with that)
<xificurC> Drup: any advice for a newcomer regarding these 2 libs
mort___ has quit [Quit: Leaving.]
<Drup> If you plan to read Real World OCaml, it uses Core, so go with that
<Drup> just keep in mind it's not everyone's choice, but it's find to learn with it
<xificurC> Drup: thanks. I hope it's not too hard to switch if one feels the need
avsm has joined #ocaml
<Drup> no, it shouldn't be
<xificurC> core sure needs more libs to install
<xificurC> (or packages or whatever the correct term is)
<Drup> yes, that's the main issue
<Drup> core is big
<xificurC> Drup: was an easy guess even before installing since core is backed by a company and batteries by a community
<Drup> no, that's not really the reason
MrScout has joined #ocaml
<xificurC> oh?
claudiuc has quit [Remote host closed the connection]
<xificurC> a wrong idea led to the correct conclusion then
MrScout has quit [Remote host closed the connection]
MrScout_ has joined #ocaml
<Drup> well, maybe it played a bit, but it's also a design decision
MrScout_ is now known as MrScout
antkong has joined #ocaml
ericwa has joined #ocaml
<Drup> (and batteries is already mostly too big)
<xificurC> so both are bloated?
<xificurC> heh
<Drup> there are other choices, it doesn't matter
SomeDamnBody has joined #ocaml
<Drup> to each its own
<xificurC> well core is taking damn long to install
<xificurC> sometimes I get amazed, like haskell package install fails with _not enough memory_, or rust needing 1.5 GB RAM to just install
<Drup> :D
<Drup> I think I never compiled full core, so I don't know about it :)
<xificurC> it just finished, not that bad I guess
<Drup> core_kernel already takes far too long, and that's as far as I'm going to go
kakadu has quit []
<xificurC> hm, open Core.Std;; gives me Unbound module Core
<Drup> in the top level ?
<Drup> #require "core"
<xificurC> yeah, in utop
<Drup> ;;
<ericwa> I got that too, there's some extra installation steps you need to do
<xificurC> the book says nothing about that ^
<Drup> not really installation, just loading ;)
<Drup> linked from https://realworldocaml.org/
reem has quit [Remote host closed the connection]
<xificurC> thanks
robink has joined #ocaml
Guest97801 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Simn has quit [Quit: Leaving]
zpe has quit [Remote host closed the connection]
yomimono has quit [Ping timeout: 246 seconds]
oscar_toro has quit [Ping timeout: 244 seconds]
matason has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
claudiuc has joined #ocaml
claudiuc has quit [Remote host closed the connection]
pyon is now known as idem-pyon-tent
claudiuc has joined #ocaml
SomeDamnBody has quit [Quit: Leaving]
rand000 has quit [Quit: leaving]
struktured has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 244 seconds]
avsm has quit [Quit: Leaving.]
matason has quit [Quit: Leaving...]
jwatzman|work has quit [Quit: jwatzman|work]
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
reem has joined #ocaml
zpe has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
olauzon has quit [Quit: olauzon]
zpe has quit [Ping timeout: 264 seconds]
ghostpl_ has joined #ocaml
rgrinberg has joined #ocaml
ghostpl_ has quit [Ping timeout: 246 seconds]
dav has quit [Ping timeout: 246 seconds]
dav has joined #ocaml
mridul_seth has quit [Ping timeout: 245 seconds]
moei has quit [Quit: Leaving...]
xificurC has quit [Ping timeout: 256 seconds]
TheLemonMan has quit [Quit: leaving]
rgrinberg has quit [Ping timeout: 244 seconds]
oriba has quit [Quit: Verlassend]
tnguyen has joined #ocaml
jave has quit [Ping timeout: 240 seconds]