adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org and http://caml.inria.fr | http://ocaml.org/releases/4.02.0.html | Public channel logs at http://irclog.whitequark.org/ocaml
nojb has quit [Quit: nojb]
xaimus has joined #ocaml
mcclurmc_ has joined #ocaml
mcclurmc has quit [Ping timeout: 255 seconds]
chambart has joined #ocaml
nop0x07bc has quit [Quit: WeeChat 1.0.1]
madroach has quit [Ping timeout: 250 seconds]
darkf_ has joined #ocaml
madroach has joined #ocaml
struktured has joined #ocaml
darkf has quit [Ping timeout: 272 seconds]
darkf_ is now known as darkf
jwatzman|work has quit [Quit: jwatzman|work]
badon_ has joined #ocaml
badon has quit [Disconnected by services]
ljs___ has joined #ocaml
badon_ is now known as badon
badkins has quit [Remote host closed the connection]
chambart has quit [Ping timeout: 256 seconds]
thomasga has quit [Quit: Leaving.]
kyun has joined #ocaml
serge has joined #ocaml
manud has joined #ocaml
serge has quit [Ping timeout: 255 seconds]
rgrinberg has joined #ocaml
badkins has joined #ocaml
badkins has quit [Client Quit]
sheijk has quit [Quit: .]
jonludlam has quit [Quit: Coyote finally caught me]
q66[lap]_ has quit [Changing host]
q66[lap]_ has joined #ocaml
hausdorff has joined #ocaml
hausdorff has quit [Remote host closed the connection]
taion809 has joined #ocaml
samrat has joined #ocaml
shinnya has quit [Ping timeout: 244 seconds]
artagnon has left #ocaml [#ocaml]
claudiuc has quit [Remote host closed the connection]
serge has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
WraithM has quit [Ping timeout: 244 seconds]
serge has quit [Ping timeout: 245 seconds]
Submarine has quit [Quit: Leaving]
serge has joined #ocaml
appd has joined #ocaml
MrScout has joined #ocaml
MrScout has joined #ocaml
huza has joined #ocaml
struktured has quit [Ping timeout: 240 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
struktured has joined #ocaml
araujo has quit [Quit: Leaving]
AlexRussia has quit [Ping timeout: 244 seconds]
AlexRussia has joined #ocaml
appd has quit [Remote host closed the connection]
huza has quit [Quit: WeeChat 0.3.8]
appd has joined #ocaml
manud has quit [Quit: manud]
samrat has joined #ocaml
pyon has quit [Ping timeout: 245 seconds]
samrat has quit [Ping timeout: 245 seconds]
manud has joined #ocaml
manud has quit [Client Quit]
samrat has joined #ocaml
struktured has quit [Ping timeout: 245 seconds]
pyon has joined #ocaml
AlexRussia has quit [Ping timeout: 272 seconds]
serge has quit [Remote host closed the connection]
serge has joined #ocaml
Submarine has joined #ocaml
Submarine has joined #ocaml
serge has quit [Ping timeout: 258 seconds]
AlexRussia has joined #ocaml
taion809 has quit [Remote host closed the connection]
lostman has joined #ocaml
govg has joined #ocaml
serge has joined #ocaml
larhat has quit [Quit: Leaving.]
kyun has quit [Ping timeout: 244 seconds]
ljs___ has quit [Quit: None]
everyonemines has joined #ocaml
everyonemines has quit [Client Quit]
everyonemines has joined #ocaml
serge has quit [Remote host closed the connection]
serge has joined #ocaml
serge has quit [Ping timeout: 264 seconds]
oscar_toro has joined #ocaml
tnguyen has joined #ocaml
BitPuffin has quit [Ping timeout: 258 seconds]
tnguyen has quit [Read error: Connection reset by peer]
tnguyen1 has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
appd has quit [Quit: Leaving...]
rgrinberg has joined #ocaml
nop0x07bc has joined #ocaml
MercurialAlchemi has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
everyonemines has quit [Quit: everyonemines]
tnguyen1 has quit [Ping timeout: 256 seconds]
rgrinberg has joined #ocaml
arj has joined #ocaml
badon has quit [Ping timeout: 264 seconds]
rgrinberg has quit [Quit: Leaving.]
siddharthv_away is now known as siddharthv
_5kg has quit [Ping timeout: 245 seconds]
lostman has quit [Quit: Connection closed for inactivity]
jonludlam has joined #ocaml
zpe has joined #ocaml
nojb has joined #ocaml
nojb has quit [Client Quit]
larhat has joined #ocaml
serge has joined #ocaml
pyon has quit [Quit: stupid emacs]
pyon has joined #ocaml
serge has quit [Ping timeout: 256 seconds]
_5kg has joined #ocaml
hhugo1 has joined #ocaml
larhat1 has joined #ocaml
larhat has quit [Ping timeout: 245 seconds]
weykent has quit [Ping timeout: 272 seconds]
samrat has quit [Ping timeout: 260 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
hhugo1 has quit [Quit: Leaving.]
zpe has quit [Ping timeout: 265 seconds]
hhugo1 has joined #ocaml
oscar_toro has quit [Ping timeout: 258 seconds]
hhugo1 has quit [Client Quit]
samrat has joined #ocaml
psy_ has quit [Remote host closed the connection]
thomasga has joined #ocaml
oscar_toro has joined #ocaml
Simn has joined #ocaml
jgjl has joined #ocaml
kakadu has joined #ocaml
SomeDamnBody has joined #ocaml
govg has quit [Quit: leaving]
jgjl has quit [Read error: Connection reset by peer]
lordkryss has joined #ocaml
zpe has joined #ocaml
serge has joined #ocaml
oscar_toro1 has joined #ocaml
oscar_toro has quit [Ping timeout: 258 seconds]
jonludlam has quit [Quit: Coyote finally caught me]
serge_ has joined #ocaml
serge has quit [Read error: No route to host]
samrat has quit [Quit: Computer has gone to sleep.]
badon has joined #ocaml
chambart has joined #ocaml
_andre has joined #ocaml
dsheets has joined #ocaml
_weykent has joined #ocaml
evert_ has quit [Ping timeout: 245 seconds]
evert has joined #ocaml
contempt has quit [Remote host closed the connection]
Submarine has quit [Remote host closed the connection]
contempt has joined #ocaml
jonludlam has joined #ocaml
rand000 has joined #ocaml
rand000 has quit [Remote host closed the connection]
rand000 has joined #ocaml
MrScout has quit [Remote host closed the connection]
jgjl has joined #ocaml
serge_ has quit [Remote host closed the connection]
chambart has quit [Ping timeout: 256 seconds]
serge has joined #ocaml
arj has quit [Quit: Leaving.]
oscar_toro1 has quit [Ping timeout: 265 seconds]
ggole has joined #ocaml
serge has quit [Ping timeout: 264 seconds]
rand000 has quit [Quit: leaving]
arj has joined #ocaml
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
govg has joined #ocaml
oscar_toro has joined #ocaml
MrScout has joined #ocaml
oscar_toro has quit [Client Quit]
oscar_toro has joined #ocaml
MrScout has quit [Ping timeout: 272 seconds]
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pyon has quit [Quit: And the battle will rage until only the Raichu prevail!]
amirmc has joined #ocaml
thomasga has quit [Quit: Leaving.]
arj has quit [Quit: Leaving.]
nojb has joined #ocaml
amirmc has quit [Quit: Leaving.]
amirmc has joined #ocaml
jgjl has joined #ocaml
chambart has joined #ocaml
zpe has quit [Remote host closed the connection]
samrat has joined #ocaml
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Thooms has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
amirmc has quit [Quit: Leaving.]
jgjl has joined #ocaml
thomasga has joined #ocaml
siddharthv is now known as siddharthv_away
jgjl has quit [Ping timeout: 264 seconds]
amirmc has joined #ocaml
thomasga has quit [Quit: Leaving.]
eizodo has joined #ocaml
samrat has joined #ocaml
mort___ has joined #ocaml
amirmc has quit [Quit: Leaving.]
thomasga has joined #ocaml
Thooms has quit [Quit: WeeChat 1.0.1]
thomasga has quit [Client Quit]
serge has joined #ocaml
AlexRussia has quit [Ping timeout: 244 seconds]
serge has quit [Ping timeout: 264 seconds]
pyon has joined #ocaml
zpe has joined #ocaml
arj has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
elfring has joined #ocaml
mort___ has left #ocaml [#ocaml]
darkf has quit [Quit: Leaving]
AlexRussia has joined #ocaml
amirmc has joined #ocaml
psy_ has joined #ocaml
amirmc has quit [Quit: Leaving.]
bytbox has quit [Remote host closed the connection]
olauzon_ has joined #ocaml
chambart has quit [Ping timeout: 240 seconds]
_obad_ has joined #ocaml
chambart has joined #ocaml
tnguyen has joined #ocaml
thomasga has joined #ocaml
<_obad_> hi there. what's the latest on the lwt syntax extension? I'm still using the camlp4 one under 4.01.0, and ocp-indent doesn't really support it.
<Drup> ocp-indent supports it, you need to add a little option to your .ocp-indent, that's all
<Drup> but if you want the latest, you can use the ppx :]
<_obad_> I don't see anything in my documentation... what version do I need?
<Drup> I think it works since quite some time
<_obad_> no lwt mentioned in the --help output... :(
<Drup> you only need to put "syntax = lwt"
<_obad_> oh
<_obad_> I'll try that
<_obad_> oh yey that works
<_obad_> thanks :)
<_obad_> while we're at it... does that work for sexp as well?
<Drup> No.
<_obad_> damn
<_obad_> unknown preset sexp. that sucks.
<_obad_> I have a "type t with sexp" and in a module sig and the indentation is fucked up
<_obad_> usual tricks like putting it on a single line don't work
<Drup> unfortunate
<Drup> use ppx_deriving ? :]
<_obad_> too much code
<_obad_> schedules too tight
<_obad_> is there even sexplib support for ppx_deriving?
<whitequark> no
<Drup> you have Show, it's pretty much the same purpose
<Drup> (or Yojson)
<whitequark> oh, if you don't actually need sexp format, then yeah
<_obad_> no I've decided on using sexplib syntax
<_obad_> started training the rest of the team on it
<whitequark> that's unfortunate.
<whitequark> Drup: what should I replace camlp4 stream match syntax in llvm tutorial with?
<whitequark> preferably not lalr(1), because I don't want to rewrite half of the tutorial
bytbox has joined #ocaml
<Drup> Hum.
<Drup> tbh, the right tool for the job is menhir
<Drup> no lalr :/
yomimono has joined #ocaml
<whitequark> what about writing recursive descent parsers using match syntax?
taion809 has joined #ocaml
<Drup> I though you wanted a nice tutorial on llvm, not on parsing techniques and certainly not ugly ones.
<Drup> especially since it's for beginners
<Drup> whitequark: I can write the menhir parser for you, if you want :p
<Drup> (for some weird reason, I find writing parsers quite enjoyable)
<nojb> whitequark: why not stick with camlp4, but update it so that it work with the *current* camlp4 ?
<whitequark> nojb: because fuck camlp4
<whitequark> and fuck camlp4 stream syntax in particular
<whitequark> it works with current camlp4, it just gives people starting to write their languages *very bad ideas*
<Drup> nojb: Stream is a terrible part of the stdlib, nobody should use it
<whitequark> like the idea that use of camlp4 is acceptable at all
bytbox has quit [Remote host closed the connection]
<Drup> whitequark: you might be a bit extreme on the no-camlp4 position :]
<Drup> nojb: but really, it's just a bad tool to write a parser
* whitequark drives a stake through camlp4's heart and finishes the job with a bunch of silver nails
taion809 has quit [Ping timeout: 250 seconds]
elfring has quit [Quit: Konversation terminated!]
<nojb> actually some of the features of the llvm tutorial would be hard to replicate with menhir
<Drup> like ?
<nojb> (if I remember correctly at some point the author dynamically extends the grammar)
<rks`> where's that tutorial at?
taion809 has joined #ocaml
<rks`> ty
shinnya has joined #ocaml
<Drup> nojb: well, you shouldn't do that in a tutorial for beginners ...
amirmc has joined #ocaml
<companion_cube> _obad_: you can probably write a ppx_deriving_sexplib by looking at ppx_deriving_yojson
yomimono has quit [Ping timeout: 244 seconds]
<whitequark> companion_cube: if I understand correctly his problem is organizational
<whitequark> I certainly wouldn't recommend someone on a tight deadline to write ppx_deriving_sexp.
<_obad_> companion_cube: I probably could, and then I would have to update all the code... or I could stick with camlp4 for now. I'd rather wait for someone else to do it and polish the rough edges.
<companion_cube> sure.
<companion_cube> _obad_: just by curiosity, do you use Sexplib's syntax comments?
badkins has joined #ocaml
<_obad_> what are those? I only use with sexp and with default(...)
badkins has quit [Client Quit]
<_obad_> plus a few custom converters but those aren't special syntax
<companion_cube> ok, if you never write Sexps by hand then the answer is no
yomimono has joined #ocaml
ggherdov_ has joined #ocaml
ggherdov_ has joined #ocaml
ggherdov_ has quit [Changing host]
ggherdov_ has quit [Changing host]
ggherdov_ is now known as ggherdov
<_obad_> oh I see.. no. I mostly load config files
badkins has joined #ocaml
<whitequark> oh, bleargh, it also uses camlp4 for lexing
<Drup> whitequark: come on, have a menhir :3
<whitequark> Drup: okay
<whitequark> and sedlex, right?
<Drup> if you want utf8, ocamllex otherwise
<Drup> I don't care much, the only thing to consider is that sedlex is 4.02 only
<whitequark> the good thing about sedlex is that it doesn't require a separate file or something
<Drup> yeah
<whitequark> 4.02 requirement is not problematic
<whitequark> LLVM already requires 4.00, and 4.02 can be used everywhere 4.00 is
<Drup> ok
<whitequark> (well, it requires 4.00 *now*, after I went and removed all workarounds for pre-4.00 :>_
<companion_cube> :>
serge has joined #ocaml
<Drup> the other issue with sedlex is that the syntax for regex is not the nicest ever
Haudegen has quit [Remote host closed the connection]
<Drup> but ocamllex's syntax is not nice either, so ...
Haudegen has joined #ocaml
<Drup> (that could be fixed quite easily, for sedlex)
<whitequark> I think sedlex can accept {r| |r} as regexps
<whitequark> or just Re {| |}
<Drup> really ? I didn't saw it in the doc
Haudegen is now known as Guest13838
tane has joined #ocaml
<whitequark> it's not there
<whitequark> I mean
<whitequark> it could be patched to accept that
<Drup> ah, okay
<Drup> yes, it could, clearly
yomimono has quit [Ping timeout: 244 seconds]
serge has quit [Ping timeout: 250 seconds]
serge has joined #ocaml
yomimono has joined #ocaml
Guest13838 is now known as Haudegen
xaimus has quit [Ping timeout: 245 seconds]
Thooms has joined #ocaml
arj has quit [Quit: Leaving.]
govg has quit [Ping timeout: 272 seconds]
amirmc has quit [Quit: Leaving.]
BitPuffin has joined #ocaml
yomimono has quit [Ping timeout: 256 seconds]
<whitequark> what the hell
<whitequark> static struct compare_item compare_stack_init[COMPARE_STACK_INIT_SIZE];
jonludlam has quit [Quit: Coyote finally caught me]
bytbox has joined #ocaml
<Leonidas> whitequark: You should get yourself a t-shirt with "Camlp4 is not a crime", with the "not" striked out ;)
<whitequark> Leonidas: !!!
<whitequark> I'm so getting one.
<companion_cube> in the french army, "P4" is a (bad) psychological ranking
<companion_cube> so I guess using camlp4 is only for mad people
<whitequark> caml pee-four
<whitequark> in unrelated news I'm looking at libcamlrun
<whitequark> and it is full of shit
<companion_cube> what is it?
<whitequark> ocaml c runtime
<companion_cube> I'm probably late on the subject, but ppx_deriving doesn't seem to work in utop, is it normal?
<whitequark> stuff in byterun/ or asmrun/
<whitequark> companion_cube: update to utop 1.15 and 4.02.1
<whitequark> (at least)
<companion_cube> I do have 1.16 :/
<companion_cube> #require "ppx_deriving.eq";;
<companion_cube> type foo = Foo of int [@deriving eq];;
<whitequark> ok, the ocaml compiler version is key
<whitequark> is it 4.02.1?
<whitequark> 4.02.0 doesn't work
<companion_cube> 4.02.1
<whitequark> ppx_deriving 1.0?
<companion_cube> oh, no, older
* companion_cube upgrades now
<whitequark> here you are
<companion_cube> :D
shinnya has quit [Ping timeout: 250 seconds]
<reynir> shouldn't it also be [@@deriving eq]?
<whitequark> yes
olauzon_ has quit [Quit: olauzon_]
araujo has joined #ocaml
<whitequark> [@ in that context is a syntax error though
<companion_cube> I think it annotates the "int" type
elfring has joined #ocaml
<whitequark> oh, right
* whitequark tested it as "type t [@deriving eq]"
<reynir> Hm
sepp2k has joined #ocaml
<reynir> you can't derive things for empty types, it seems
<companion_cube> whitequark: I think no one would use ppx if you weren't there :3
<whitequark> possibly
<reynir> are empty types considered abstract?
<whitequark> empty?
<companion_cube> ah, nice, it works now
<companion_cube> uh, I just have a Warning 11: this match case is unused.
<reynir> Yes, a type without any constructors
mcclurmc_ has quit [Ping timeout: 272 seconds]
<kaustuv> Dear PPX Santa, I would like a -ppx version of Bolt please
yomimono has joined #ocaml
<whitequark> bolt?
<companion_cube> bolt?
<whitequark> oh, the logging thing
amirmc has joined #ocaml
<whitequark> use Lwt_log ?
mcclurmc has joined #ocaml
<kaustuv> that still uses Camlp4, no?
<whitequark> not if you -package lwt.ppx
<whitequark> the ppx santa delivered, I guess?
<companion_cube> :D
<kaustuv> Interesting.
<companion_cube> whitequark: you should have a wiki on github, listing ppx extensions people ask you^W Santa
<companion_cube> kind of like a wishlist
<whitequark> I think I already implemented everything except sexplib
<whitequark> and every time I want to implement sexplib, I open its source and then throw my hands up in the air in disgust
<SomeDamnBody> What's the best way to do the following:
<def`> whitequark: I am not sure what you ask about the runtime being multithreaded. there is a global lock and that's it :)
<whitequark> def`: say you have a caml_local_roots
<whitequark> which the GC uses to look at the roots on the C stack
<whitequark> it's per-thread, or rather it must be per-thread
<companion_cube> I wish sexplib would use `Atom and `List, like json libraries do
<SomeDamnBody> I have a poll function that accepts sockets and events to listen for. And I want to call a function if the event is triggered
<whitequark> def`: so, yeah, I assume on every thread switch the runtime swaps that stuff manually
<SomeDamnBody> basically, when I call poll, it returns with an recv_arr that should be the same size as the # socket event tuples passed to it
<whitequark> companion_cube: but SPEEDZ
<whitequark> hm, though, these are unary anyway
<companion_cube> I'd like some benchs first
<SomeDamnBody> I need to loop over the returned array and the set of functions, which should also be equal in size and call...
<whitequark> so no difference
<companion_cube> I mean, jsonm looks fast
<companion_cube> my own sexp library parses at decent rates, even though it uses `Atom and `List
<kaustuv> whitequark: I've been wanting a ppx_deriving module that derives functional forms for non-nullary constructors
<SomeDamnBody> how can I do Array fold left over two arrays equal in size, where fold left rececives it's current elemnt as a tuple of the respective arrays
<whitequark> kaustuv: can you elaborate?
<def`> whitequark: hmm, not sure. I'll have to check (I don't much details about that)
<whitequark> like type t = A of int*int ;; let a x y = A (x, y) ?
<kaustuv> type 'a list = Nil | Cons of 'a * 'a list [@@deriving functions] would produce Cons_fn : 'a -> 'a list -> 'a list
<companion_cube> oh, yes, please
<whitequark> I have that lying around somewhere.
<def`> whitequark: but you're right, there is some mystery there :)
<companion_cube> kaustuv: I'd rather have mk_Cons
<companion_cube> :>
<whitequark> s/mystery/very bad coding practices/
<whitequark> kaustuv: companion_cube: just "cons" (first letter lowercase)
<kaustuv> The name is immateral as long as it's predictable from the constructor name
<whitequark> maybe it could also replace A-Z with _ a-z
<whitequark> to handle both Under_score and CamelCase
<whitequark> I should also document Drup's record constructor thing
amirmc has quit [Quit: Leaving.]
<whitequark> (try: type r = { a : int; b : int option } [@@deriving create];;)
<companion_cube> I could still use a ppx_deriving_random somewher
<companion_cube> e
<def`> bad coding practices… :D and some legacy there, it has been a long time since the last time I saw "register" storage specifier, at least on PC
<companion_cube> ohhh, or a visitor generator
<whitequark> companion_cube: you mean [@@deriving iter] ?
<companion_cube> no, something with open recursion, à la Ast_mapper
<companion_cube> (unless I missed something)
<whitequark> oh
<companion_cube> something that annoys me is that algebraic types break modularity
<companion_cube> you can't functorize a module that uses the structure of values, because pattern-matching
amirmc has joined #ocaml
<kaustuv> for deriving.iter can you specify the order in which subtrees are visited?
<companion_cube> otoh, with a proper visitor pattern, that could be possible
<whitequark> kaustuv: no
<def`> companion_cube: I would like to see a nice proposal to abstract over patterns (some encoding of pattern calculus?!)
<whitequark> it's lexical
<companion_cube> def`: I think gasche already proposed that some time ago
<whitequark> companion_cube: go write @@deriving random
<whitequark> nao
<companion_cube> :D
dav_ has joined #ocaml
<whitequark> it should take like half an hour
<whitequark> at most
<companion_cube> nao I should be working on something else
<def`> (nao, ça veut dire maintenant en anglais. Nao!)
<reynir> what would deriving random do?
<companion_cube> reynir: make a random generator for the given type
<ggole> Abstraction over patterns would be nice
<reynir> Oh, for qcheck? :D
<companion_cube> reynir: of course
<reynir> That would be neat
<kaustuv> As long as we're tossing ideas, for signatures there should be a deriving mock
<companion_cube> this + deriving.show would make it much easier to use
<reynir> Yea
<companion_cube> oh well, I'm not very productive anyway, let's try
<companion_cube> whitequark: I doubt it will take 1/2h, I don't know much how ppx_deriving works
dav has quit [Ping timeout: 264 seconds]
Thooms has quit [Quit: WeeChat 1.0.1]
<whitequark> companion_cube: just start with an existing deriver
<companion_cube> yes
<companion_cube> I'll give it a try, and ask you if I get stuck
<kaustuv> For module types deriving a module containing only the types defined in the signature would be useful (optionally removing all private annotations), so I don't have to repeat the types in two places
WraithM has joined #ocaml
<kaustuv> Is it possible to write something like [@inline] that would take f [@inline] x and inline the definition of f (assuming the source of f is in some visible place like earlier in the same file)?
govg has joined #ocaml
<companion_cube> that's something that would be ugly to do at the level of parsetree, I think
<whitequark> kaustuv: have you seen https://github.com/whitequark/ppx_import ?
govg is now known as Guest6965
Guest6965 has quit [Client Quit]
govg_ has joined #ocaml
<kaustuv> whitequark: I was just looking at it, but it requires the .cmi to be available meaning that the module types must come from a different compilation unit, right?
<whitequark> from your own .mli works as well
eizodo has quit [Quit: Page closed]
<kaustuv> Ah, sweet!
dav_ has quit [Remote host closed the connection]
dav_ has joined #ocaml
vfoley- has joined #ocaml
<vfoley-> Can anyone explain (1) why the type of Map.Make is '+a t and not simply 'a t, (2) why I can do `type 'a t = 'a MyMap.t` (i.e. removing the variance indicator) without an error?
<def`> 1) A map is covariant in the value parameter, so that's fine? This brings more polymorphism, subtyping, etc.
<def`> 2) In this case the variance can be computed from the definition (= it's the same as the one from 'a MyMap.t)
<def`> Specifying variance is useful for abstract type when you want or need the flexibility from (1) without exposing the representation
amirmc has quit [Quit: Leaving.]
taion809 has quit [Ping timeout: 245 seconds]
<vfoley-> def`: ah, so although I wrote 'a t, it's really '+a t during type checking?
taion809 has joined #ocaml
amirmc has joined #ocaml
<def`> vfoley-: yes
amirmc has quit [Read error: Connection reset by peer]
amirmc1 has joined #ocaml
oscar_toro has quit [Ping timeout: 265 seconds]
<vfoley-> cool, thanks!
<def`> Specifying variances is also useful to let the compiler confirm variances match your expecations
<def`> expectations*
<kaustuv> So something I don't fully understand about ppx_deriving: if I say type t = ... [@@deriving whatever] in the module file, do I have to take the generated values and put their types in the .mli by hand or can I say type t = ... [@@deriving whatever] in the .mli as well to get these declarations automatically?
<whitequark> you can
octachron has joined #ocaml
amirmc1 has quit [Quit: Leaving.]
amirmc has joined #ocaml
amirmc has quit [Client Quit]
slash^ has joined #ocaml
<kaustuv> Hmm. Is there online ocamldoc for stuff like Parsetree, Asttypes, etc.?
<whitequark> not really
<whitequark> there will be some when 4.02.1 doc get published
contempt has quit [Ping timeout: 272 seconds]
<kaustuv> Is there some guarantee that deriving.structure and deriving.signature are coherent?
<kaustuv> err s/deriving/deriver/g
olauzon_ has joined #ocaml
avsm has joined #ocaml
hausdorff has joined #ocaml
jwatzman|work has joined #ocaml
snyp has joined #ocaml
<snyp> Hello I have a question about "include Module_intf with type = ... " syntax.
kaustuv has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
<snyp> "include Module_intf with type t = ... " actually
<snyp> It seems I can't do something like "include Module_intf with type t = { id: int; name: string }"
<snyp> I have to have "type t = {id:int; name:string}" and then do "include Module_intf with type t = t"
<snyp> Utop shows a parse error.
<snyp> in the former situation
avsm has quit [Quit: Leaving.]
<ggole> Does include support with? I didn't think it did.
dav_ has quit [Remote host closed the connection]
<snyp> ggole: http://paste.debian.net/129605/ this is from real world ocaml.
dav has joined #ocaml
<ggole> Oh, in signatures.
<snyp> seems so
yomimono has quit [Ping timeout: 258 seconds]
<snyp> ggole: anyway, this looks like a well-known hack/idiom for making modules conform to an interface, isn't it?
dav has quit [Ping timeout: 260 seconds]
<snyp> i mean, since you can't refer to the module inside itself, you need to create a submodule implementing the interface required by the functor, and include that submodule and the module generated by applying the functor..
<snyp> just making sure.
<snyp> (albeit using destructive substitution for the type t, or otherwise there would be a redefinition of t)
<snyp> hmmmmm?
<ggole> Seems reasonable: I'm not sure I would go so far as to call it an idiom
<snyp> i see i see.
<ggole> Maybe an idiom within Core/Jane St.
bytbox has quit [Remote host closed the connection]
<ggole> You don't really need to do anything special to make modules work with a functor: just put all the things it wants in there with the right types
<snyp> ah
<ggole> I believe this is just shorthand for the stuff you'd otherwise write explicitly.
psy_ has quit [Ping timeout: 256 seconds]
<Drup> snyp: you can't have a type definition here, only a type equality
<snyp> Drup: oh.
<Drup> by "here", I mean "after a with"
<snyp> i see
<snyp> i see
<snyp> thanks
dav has joined #ocaml
octachron has quit [Quit: Leaving]
xaimus has joined #ocaml
SomeDamnBody has quit [Ping timeout: 245 seconds]
psy_ has joined #ocaml
serge has quit [Remote host closed the connection]
serge has joined #ocaml
snyp has quit [Quit: WeeChat 1.0.1]
oscar_toro has joined #ocaml
<companion_cube> whitequark: it's work in progress, ppx_deriving_random should eventually work!
thomasga has quit [Ping timeout: 260 seconds]
serge has quit [Ping timeout: 244 seconds]
psy_ has quit [Ping timeout: 256 seconds]
samrat has quit [Ping timeout: 244 seconds]
samrat has joined #ocaml
mort___ has joined #ocaml
bytbox has joined #ocaml
bytbox has quit [Remote host closed the connection]
araujo has quit [Ping timeout: 265 seconds]
MrScout has joined #ocaml
MrScout has quit [Changing host]
MrScout has joined #ocaml
brendan has quit [Quit: leaving]
brendan has joined #ocaml
avsm has joined #ocaml
thomasga has joined #ocaml
hausdorff has quit [Remote host closed the connection]
hausdorff has joined #ocaml
zpe has quit [Remote host closed the connection]
dav has quit [Remote host closed the connection]
sepp2k has quit [Quit: Konversation terminated!]
dav has joined #ocaml
nojb has quit [Quit: nojb]
samrat has quit [Ping timeout: 264 seconds]
samrat has joined #ocaml
psy_ has joined #ocaml
kakadu has quit [Quit: Page closed]
lyles has joined #ocaml
wwilly has joined #ocaml
avsm has quit [Ping timeout: 264 seconds]
claudiuc has joined #ocaml
dsheets has quit [Ping timeout: 258 seconds]
SomeDamnBody has joined #ocaml
<adrien> whitequark: GC's lock in the runtime protects everything
paddymahoney has joined #ocaml
paddymahoney has quit [Max SendQ exceeded]
nojb has joined #ocaml
paddymahoney has joined #ocaml
thomasga has quit [Quit: Leaving.]
reventlov has quit [Ping timeout: 258 seconds]
thomasga has joined #ocaml
samrat has quit [Ping timeout: 250 seconds]
dav has quit [Ping timeout: 250 seconds]
dav has joined #ocaml
taion809 has quit [Remote host closed the connection]
samrat has joined #ocaml
thomasga has quit [Quit: Leaving.]
thomasga1 has joined #ocaml
thomasga1 has quit [Client Quit]
thmslld has quit [Remote host closed the connection]
thomasga1 has joined #ocaml
kakadu has joined #ocaml
dav has quit [Remote host closed the connection]
Guest42500 has joined #ocaml
zpe has joined #ocaml
serge has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
serge has quit [Ping timeout: 245 seconds]
oscar_toro has quit [Ping timeout: 240 seconds]
samrat has quit [Quit: Computer has gone to sleep.]
Anarchos has joined #ocaml
cdidd has quit [Remote host closed the connection]
contempt has joined #ocaml
wwilly has quit [Quit: This computer has gone to sleep]
cdidd has joined #ocaml
contempt has quit [Ping timeout: 256 seconds]
__marius_____ has quit [Ping timeout: 272 seconds]
__marius______ has joined #ocaml
larhat1 has quit [Quit: Leaving.]
nojb has quit [Quit: nojb]
contempt has joined #ocaml
claudiuc_ has joined #ocaml
claudiuc has quit [Remote host closed the connection]
larhat has joined #ocaml
ggole has quit []
_andre has quit [Quit: leaving]
araujo has joined #ocaml
reventlov has joined #ocaml
nojb has joined #ocaml
bytbox has joined #ocaml
thomasga1 has quit [Quit: Leaving.]
<Unhammer> Error: Unbound value Format.asprintf
<Unhammer> after
<Unhammer> utop # type d = float * float [@@deriving show];;
cdidd has quit [Remote host closed the connection]
<Unhammer> I can do [@@deriving eq] though …
<gasche> Format.asprintf is @since 4.01.0
<gasche> are you compiling the code with an older OCaml version? (which is strange as you wouldn't have -ppx then)
larhat has quit [Quit: Leaving.]
<Drup> gasche: ppx is only with 4.02 :)
<gasche> or maybe you use some library that shadows the Format module and doesn't provide this definition
<gasche> Drup: but you can preprocess code and then compile separately
<Drup> gasche: in utop ? :p
<gasche> (and -ppx was included in 4.01 I believe, but ppx.deriving is recent)
cdidd has joined #ocaml
<Drup> ppx yes, not the extension syntax
<Unhammer> 4.02.1; I just did opam upgrade
<gasche> I'd check if eg. Core shadows the Format module
<Drup> Unhammer: no core or batteries thingy in your .ocamlinit ?
BitPuffin has quit [Ping timeout: 264 seconds]
<Unhammer> aha
<Unhammer> mv .ocamlinit .nocamlinit
<Unhammer> fixed it
<Unhammer> probably because I had
<Unhammer> Toploop.use_silently
<Unhammer> Format.err_formatter (Filename.concat (Findlib.package_directory
<Unhammer> "batteries") "battop.ml");;
<gasche> (I just checked and Batteries doesn't have asprintf either)
<gasche> could you send a bugreport to the Batteries issue tracker?
<Unhammer> okidoke
amirmc has joined #ocaml
amirmc has quit [Client Quit]
tnguyen has quit [Quit: tnguyen]
cdidd has quit [Remote host closed the connection]
cdidd has joined #ocaml
araujo has quit [Quit: Leaving]
nojb has quit [Quit: nojb]
cdidd has quit [Remote host closed the connection]
Guest42500 has quit [Ping timeout: 265 seconds]
cdidd has joined #ocaml
nojb has joined #ocaml
dav has joined #ocaml
hausdorff has quit [Remote host closed the connection]
shinnya has joined #ocaml
thomasga has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
hausdorff has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
SomeDamnBody has quit [Ping timeout: 240 seconds]
chambart has quit [Ping timeout: 264 seconds]
sheijk has joined #ocaml
sheijk has quit [Client Quit]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
Arsenik has joined #ocaml
robink has quit [Ping timeout: 244 seconds]
thomasga has quit [Quit: Leaving.]
robink has joined #ocaml
dav has quit [Ping timeout: 256 seconds]
serge has joined #ocaml
serge has quit [Ping timeout: 244 seconds]
dav has joined #ocaml
dav has quit [Changing host]
dav has joined #ocaml
bytbox has quit [Remote host closed the connection]
MrScout has quit [Remote host closed the connection]
MrScout has joined #ocaml
MrScout has joined #ocaml
MrScout has quit [Remote host closed the connection]
MrScout has joined #ocaml
larhat has joined #ocaml
hausdorff has quit [Remote host closed the connection]
MrScout has quit [Ping timeout: 255 seconds]
hausdorff has joined #ocaml
MrScout has joined #ocaml
MrScout has joined #ocaml
dav has quit [Remote host closed the connection]
hausdorff has quit [Ping timeout: 240 seconds]
MrScout_ has joined #ocaml
mort___ has quit [Quit: Leaving.]
MrScout has quit [Ping timeout: 264 seconds]
MrScout_ has quit [Ping timeout: 272 seconds]
hausdorff has joined #ocaml
dav has joined #ocaml
SomeDamnBody has joined #ocaml
MrScout has joined #ocaml
MrScout has joined #ocaml
hausdorff has quit [Remote host closed the connection]
paddymahoney has quit [Ping timeout: 244 seconds]
olauzon_ has quit [Quit: olauzon_]
chambart has joined #ocaml
MrScout has quit [Remote host closed the connection]
hhugo1 has joined #ocaml
MrScout has joined #ocaml
MrScout has joined #ocaml
amirmc has joined #ocaml
chambart has quit [Ping timeout: 256 seconds]
MercurialAlchemi has quit [Remote host closed the connection]
nojb has quit [Quit: nojb]
kakadu has quit [Quit: Konversation terminated!]
kakadu has joined #ocaml
hhugo1 has quit [Quit: Leaving.]
nojb has joined #ocaml
struktured has joined #ocaml
rgrinberg has joined #ocaml
elfring has quit [Quit: Konversation terminated!]
dav has quit [Ping timeout: 256 seconds]
chambart has joined #ocaml
serge has joined #ocaml
tane has quit [Quit: Verlassend]
Arsenik has quit [Remote host closed the connection]
dav has joined #ocaml
serge has quit [Ping timeout: 258 seconds]
vfoley- has quit [Ping timeout: 245 seconds]
amirmc has quit [Quit: Leaving.]
jonludlam has joined #ocaml
tnguyen has joined #ocaml
sheijk has joined #ocaml
jwatzman|work has joined #ocaml
dav has quit [Remote host closed the connection]
Guest28594 has joined #ocaml
Simn has quit [Read error: Connection reset by peer]
wwilly has joined #ocaml
hausdorff has joined #ocaml
bytbox has joined #ocaml
MrScout has quit [Remote host closed the connection]
MrScout_ has joined #ocaml
WraithM has quit [Ping timeout: 256 seconds]
Guest28594 has quit [Ping timeout: 250 seconds]
kakadu has quit [Quit: Konversation terminated!]
hausdorff has quit [Remote host closed the connection]
govg_ has quit [Ping timeout: 244 seconds]
badkins has quit []
bytbox has quit [Remote host closed the connection]
dav_ has joined #ocaml
hausdorff has joined #ocaml
larhat has quit [Quit: Leaving.]
dav_ has quit [Ping timeout: 245 seconds]
dav_ has joined #ocaml
WraithM has joined #ocaml
mseve has joined #ocaml
mseve has quit [Client Quit]
<whitequark> adrien: it's not about protecting...
<whitequark> it's about having several variants of the variables
<whitequark> sigh, for all the time I talked about this on IRC, I could just look at the damn source
<whitequark> yeah, right, struct caml_thread_struct. exactly what I thought of.
jonludlam has quit [Quit: Coyote finally caught me]
chambart has quit [Quit: Quitte]
WraithM has quit [Ping timeout: 260 seconds]