malc_` has left #ocaml ["ERC (IRC client for Emacs 25.0.50.2)"]
silver has quit [Quit: rakede]
Heasummn has quit [Ping timeout: 244 seconds]
d0nn1e has quit [Ping timeout: 244 seconds]
d0nn1e has joined #ocaml
NhanH has joined #ocaml
oldmanistan_ has joined #ocaml
msch has joined #ocaml
rfv has joined #ocaml
mrallen1 has joined #ocaml
mbrock has joined #ocaml
jkni has joined #ocaml
bruce_r has joined #ocaml
jmct has joined #ocaml
yunxing has joined #ocaml
rgrinberg has quit [Ping timeout: 250 seconds]
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 276 seconds]
pierpa has quit [Ping timeout: 276 seconds]
TheAuGingembre has quit [Ping timeout: 260 seconds]
TheAuGingembre has joined #ocaml
tmtwd has joined #ocaml
MercurialAlchemi has joined #ocaml
tmtwd has quit [Ping timeout: 258 seconds]
Sorella has joined #ocaml
hcarty has quit [Quit: WeeChat 1.5]
manizzle has quit [Ping timeout: 265 seconds]
manizzle has joined #ocaml
govg has joined #ocaml
mcc has joined #ocaml
shinnya has quit [Ping timeout: 265 seconds]
manizzle has quit [Ping timeout: 265 seconds]
manizzle has joined #ocaml
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
pyon has quit [Quit: fix config]
manizzle has quit [Ping timeout: 258 seconds]
manizzle has joined #ocaml
f[x] has quit [Ping timeout: 244 seconds]
slash^ has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
FreeBirdLjj has joined #ocaml
_whitelogger has joined #ocaml
_whitelogger_ has joined #ocaml
_whitelogger_ has joined #ocaml
Algebr` has joined #ocaml
Algebr` has joined #ocaml
_whitelogger has joined #ocaml
Gueben has joined #ocaml
_whitelogger has joined #ocaml
_whitelogger has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
shinnya has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 244 seconds]
Simn has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
johnf has quit [Read error: Connection reset by peer]
ggole has joined #ocaml
mcc has quit [Quit: Connection closed for inactivity]
govg has quit [Remote host closed the connection]
johnf has joined #ocaml
darkf_ has joined #ocaml
mrallen1_ has joined #ocaml
habnabit has joined #ocaml
jave_ has joined #ocaml
vodkaInferno has quit [Read error: Connection reset by peer]
mrallen1 has quit [Ping timeout: 240 seconds]
jave has quit [Ping timeout: 240 seconds]
vodkaInferno has joined #ocaml
osheeta has quit [Ping timeout: 240 seconds]
darkf has quit [Ping timeout: 240 seconds]
_habnabit has quit [Ping timeout: 240 seconds]
metaglog has quit [Ping timeout: 240 seconds]
metaglog has joined #ocaml
metaglog has joined #ocaml
metaglog has quit [Changing host]
mrallen1_ is now known as mrallen1
vodkaInferno has quit [Ping timeout: 240 seconds]
vodkaInferno has joined #ocaml
osheeta has joined #ocaml
_whitelogger_ has joined #ocaml
_whitelogger_ has joined #ocaml
bruce_r has quit [Ping timeout: 260 seconds]
bruce_r has quit [Ping timeout: 260 seconds]
Reshi has joined #ocaml
Reshi has joined #ocaml
picolino has quit [Ping timeout: 252 seconds]
picolino has quit [Ping timeout: 252 seconds]
Reshi has quit [Client Quit]
Reshi has quit [Client Quit]
slash^ has quit [Read error: Connection reset by peer]
slash^ has quit [Read error: Connection reset by peer]
picolino has joined #ocaml
picolino has joined #ocaml
picolino has quit [Ping timeout: 240 seconds]
picolino has quit [Ping timeout: 240 seconds]
kakadu has joined #ocaml
kakadu has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has joined #ocaml
darkf_ is now known as darkf
darkf_ is now known as darkf
shinnya has quit [Ping timeout: 255 seconds]
shinnya has quit [Ping timeout: 255 seconds]
silver has joined #ocaml
silver has joined #ocaml
_whitelogger_ has quit [Remote host closed the connection]
_whitelogger_ has joined #ocaml
_whitelogger_ has joined #ocaml
_whitelogger_ has quit [Remote host closed the connection]
_whitelogger_ has joined #ocaml
_whitelogger_ has joined #ocaml
_whitelogger has quit [Remote host closed the connection]
Algebr` has quit [Ping timeout: 264 seconds]
_whitelogger has joined #ocaml
_whitelogger has joined #ocaml
Algebr` has joined #ocaml
_whitelogger has joined #ocaml
Algebr` has quit [Ping timeout: 264 seconds]
<flux>
heh, "Forget this message." (on the mailing list)
Distortion has joined #ocaml
<ousado>
about extensible variant types - did anyone experience performance-related issues with them?
<flux>
is there a performance-related issue to expect with them?
<ousado>
I can't think of one
FreeBirdLjj has quit [Remote host closed the connection]
<flux>
I guess in principle pattern matching might be a bit less efficient
<ousado>
I'd guess that probably depends on the number of different "extensions" one is testing for at once (if that's even possible, to use more than one at a time)
<ousado>
one is about to go into a core type of the haxe compiler, and the question about performance came up, so I thought I'd ask here :)
<Drup>
it's almost equally cheap to test, but it's quite a bit bigger in memory
<ousado>
I see, yeah - the extensible type is mostly required to deal with recursive module dependencies, though
<ggole>
Pattern matching on extensible types is a linear check afaict
<ggole>
Because generativity of constructors prevents their values from being predictable
<ggole>
It's probably fine unless you have many (tens)
breitenj has quit [Ping timeout: 260 seconds]
breitenj has joined #ocaml
<flux>
you can still do binary search? or is it too branchy and slow?
<ousado>
I see - I think it's probably still better than the current workarounds using some int in some nested constructor for a lookup in an array or something
<ousado>
an we can have all nullary constructors in the main declaration
<Drup>
why not just do the good old "reference to a function" technique ?
Algebr` has joined #ocaml
<ousado>
I don't know - how does that help?
<ousado>
I think open variants are pretty much optimal for this use
<Drup>
to break dependency cycles between files
<Drup>
well, maybe I misunderstood the problem
rgrinberg has quit [Ping timeout: 260 seconds]
<ggole>
flux: you can't do binary search aiui
<ggole>
Because the constructor values are not statically known
<ousado>
we would like to have some module-specific data that's used for different things in say the type and the analyzer - and we can't add all required constructors in the main declaration because that would introduce mutual dependencies
<flux>
ggole, hmm, so I guess their value isn't inferred from the name like with polymorphic variants?
<ggole>
No, it's calculated at runtime because generativity requires that
<flux>
looking again at drup's link, no they are not
<ggole>
If you have let f () = let module M = struct type t = .. type t += A end in ..., then A should be a different constructor for each call of f
<ousado>
wouldn't it be possible t oreserve a certain range and limit the possible number of extensions to that?
<ggole>
That would be a different language feature, I think
<ousado>
I think that would work for many applications
<ousado>
like ours
<ggole>
Also, it may be possible for the compiler to be more aggressive than it currently is, eg, to compile extensible constructors in top-level modules (which need not be generative aiui) more efficiently
jbrown has joined #ocaml
Gama11_ has joined #ocaml
<ousado>
oh, and could just use regular constructors containing values of extensible types to achieve the limited range thing, I guess ..
<ousado>
*one could
<flux>
there could be some link-time optimizations that would handle the pattern matches. and redo whem when you dynamically load code in ;)
<kakadu>
zozozo: Do people really write something like `Let's add active patterns a la F#` in bug reports?
<zozozo>
not really, but solving bugs is just as important as adding new features I'd say
<kakadu>
I was not asking about solving bugs.
<kakadu>
But it doesn't mean that you are not right.
breitenj has quit [Ping timeout: 258 seconds]
breitenj has joined #ocaml
pyon has joined #ocaml
breitenj has quit [Ping timeout: 264 seconds]
breitenj has joined #ocaml
Algebr` has quit [Ping timeout: 240 seconds]
breitenj has quit [Ping timeout: 264 seconds]
zpe has quit [Remote host closed the connection]
breitenj has joined #ocaml
breitenj has quit [Ping timeout: 265 seconds]
soupault has quit [Remote host closed the connection]
breitenj has joined #ocaml
breitenj has quit [Ping timeout: 244 seconds]
breitenj has joined #ocaml
breitenj has quit [Ping timeout: 276 seconds]
breitenj has joined #ocaml
Algebr` has joined #ocaml
breitenj has quit [Ping timeout: 255 seconds]
Algebr` has quit [Ping timeout: 276 seconds]
breitenj has joined #ocaml
Algebr` has joined #ocaml
breitenj has quit [Ping timeout: 265 seconds]
breitenj has joined #ocaml
breitenj has quit [Ping timeout: 260 seconds]
breitenj has joined #ocaml
breitenj has quit [Ping timeout: 255 seconds]
kakadu has quit [Remote host closed the connection]
breitenj has joined #ocaml
tristero has quit [Ping timeout: 264 seconds]
tristero has joined #ocaml
breitenj has quit [Ping timeout: 240 seconds]
breitenj has joined #ocaml
zpe has joined #ocaml
FreeBirdLjj has joined #ocaml
breitenj has quit [Ping timeout: 258 seconds]
zpe has quit [Remote host closed the connection]
shinnya has joined #ocaml
breitenj has joined #ocaml
breitenj has quit [Ping timeout: 265 seconds]
breitenj has joined #ocaml
breitenj has quit [Ping timeout: 258 seconds]
copy` has joined #ocaml
blubber has joined #ocaml
<blubber>
How can I get this kind of code to compile without having to repeat the module signatures? http://pastebin.com/6TUTtW5d
<blubber>
Currently it gives me "Error: Unbound module SS"
breitenj has joined #ocaml
<blubber>
I've also tried "module rec A: (S with type t = int).A" but that's a syntax error.
breitenj has quit [Ping timeout: 264 seconds]
<Drup>
blubber: since you already have the constraint on X, why do you want to write this ?
<Drup>
the constraints are redondant
<lyxia>
I get "Error: Recursive modules require an explicit module type."
<blubber>
My real situation is a bit more complicated: mutable and mutable versions of a hash table where Hash.Mut has a 'freeze' function returning a Hash.Frozen.t.
<Drup>
you could simple hoist the module type of A and B out of the signature S: "module type AA = ... " and "module A : AA" in S
<blubber>
So the modules need to share internal implementation details, thus the need for a signature.
<blubber>
And they share the same underlying structure so I want Hash.Mut to be able to include all the functions in Hash.Frozen.
<blubber>
All I had to do was to avoid explicitly writing the type of `freeze`. Turns out of the recursive type dependency is inferred you don't need the `rec` keyword.
<blubber>
Thanks for the help though @Drup
<Drup>
but .. that's because there is no recursive dependency in your case
breitenj has quit [Ping timeout: 258 seconds]
<Drup>
just a normal dependency
pierpa has joined #ocaml
<blubber>
Mut has a function returning a value of type Frozen.t; Frozen uses functions defined in Mut
<blubber>
I guess you could say there's a one-way type dependency and a one-way function dependency, thus they are in reverse order in the signature vs the implementation
<Drup>
Yes, but those are at two different levels
<blubber>
I had originally written the type of 'freeze' at its location rather than out in the signature, hence my assumption that I needed recursive modules
zpe has joined #ocaml
breitenj has joined #ocaml
breitenj has quit [Ping timeout: 240 seconds]
LiamGoodacre has joined #ocaml
zpe has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
breitenj has joined #ocaml
shinnya has quit [Ping timeout: 252 seconds]
breitenj has quit [Ping timeout: 255 seconds]
breitenj has joined #ocaml
MercurialAlchemi has joined #ocaml
breitenj has quit [Ping timeout: 255 seconds]
breitenj has joined #ocaml
breitenj has quit [Ping timeout: 252 seconds]
tmtwd has joined #ocaml
breitenj has joined #ocaml
breitenj has quit [Ping timeout: 258 seconds]
Algebr` has quit [Read error: Connection reset by peer]
breitenj has joined #ocaml
d0nn1e has quit [Ping timeout: 244 seconds]
bruce_r has joined #ocaml
d0nn1e has joined #ocaml
blubber has quit [Quit: Leaving]
breitenj has quit [Ping timeout: 264 seconds]
agarwal1975 has joined #ocaml
breitenj has joined #ocaml
breitenj has quit [Ping timeout: 258 seconds]
Algebr` has joined #ocaml
breitenj has joined #ocaml
breitenj has quit [Ping timeout: 240 seconds]
agile_cyborg has joined #ocaml
Algebr` has quit [Ping timeout: 240 seconds]
breitenj has joined #ocaml
antipsychiatry has joined #ocaml
<antipsychiatry>
Fuck mossad : mind reading tech !!!!!!!!!!!!! Must be jailed all Mossad and CIA!
<Heasummn>
Can I unpack a tuple into three arguments somehow?
<Heasummn>
oh nvm, just pattern matching
Algebr` has quit [Ping timeout: 244 seconds]
breitenj has quit [Ping timeout: 255 seconds]
kakadu has joined #ocaml
tane has joined #ocaml
tmtwd has quit [Ping timeout: 240 seconds]
tmtwd has joined #ocaml
shinnya has joined #ocaml
rgrinberg has quit [Ping timeout: 260 seconds]
copy` has quit [Quit: Connection closed for inactivity]
breitenj has joined #ocaml
breitenj has quit [Ping timeout: 244 seconds]
rand__ has joined #ocaml
Algebr` has joined #ocaml
breitenj has joined #ocaml
<zozozo>
Heasummn: also, let (x, y, z) = tuple in ...
<Heasummn>
Isn't that pattern matching?
<Heasummn>
I mean there's match ... with ...
<Heasummn>
but isn't let also considered matching?
<flux>
yes
<Heasummn>
yeah that's what I did
Algebr` has quit [Ping timeout: 260 seconds]
breitenj has quit [Ping timeout: 258 seconds]
soupault has joined #ocaml
breitenj has joined #ocaml
breitenj has quit [Ping timeout: 258 seconds]
Algebr` has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
Algebr` has quit [Ping timeout: 240 seconds]
tane_ has joined #ocaml
tane is now known as Guest49975
tane_ is now known as tane
Guest49975 has quit [Killed (wilhelm.freenode.net (Nickname regained by services))]
breitenj has joined #ocaml
bruce_r has joined #ocaml
breitenj has quit [Ping timeout: 252 seconds]
LiamGoodacre has quit [Quit: Leaving]
copy` has joined #ocaml
breitenj has joined #ocaml
breitenj has quit [Ping timeout: 258 seconds]
manizzle has quit [Ping timeout: 255 seconds]
Orion3k has quit [Ping timeout: 265 seconds]
Orion3k has joined #ocaml
breitenj has joined #ocaml
breitenj has quit [Ping timeout: 255 seconds]
f[x] has joined #ocaml
antipsychiatry has joined #ocaml
manizzle has joined #ocaml
zpe has joined #ocaml
manizzle has quit [Ping timeout: 250 seconds]
breitenj has joined #ocaml
gumchum has joined #ocaml
breitenj has quit [Ping timeout: 244 seconds]
yegods has joined #ocaml
<gumchum>
Hi, I've got a beginner's question around compilation units. It's a bit different than what I've seen because I don't have a 1-to-1 between interface and implementation. In short, I've defined an interface 'module type FRAME = sig ... end' and I'd like to define a module 'Frame' that I can define to point to another module that satisfies the FRAME
<flux>
you're not usually going to make multiple instances of Frame in a dynamic fashion
<flux>
but all what I wrote doesn't actually relate to the error indicating missing frame.cmi
<flux>
do you have frame.mli around? probably not?
<flux>
perhaps the error comes somehow from ocamldep finding a phantom dependency. it's not a precise tool. (I guess ocamlbuild uses ocamldep to find dependencies.)
manizzle has joined #ocaml
<flux>
gumchum, I was able to compile that exact piece of code (though I added an empty main.ml)
<gumchum>
I do not. I've tried moving the stuff in FRAME's signature body into an mli. That's fine, but I was lost getting my implementation in the corresponding frame.ml "delegate" to my Mips_frame module.
<flux>
maybe ocamlbuild -clean helps
breitenj has quit [Ping timeout: 258 seconds]
<flux>
oops, of course I needed to add some more code to actually build frame.ml
<flux>
but after adding minimal code, it still works
<gumchum>
Thanks, that seems to get me farther, now I just get "Unbound type constructor Frame.frame" when I try to reference it... I think that's what originally got me confused and trying to change how I was defining things.
<flux>
gumchum, reference from where?
<flux>
the key is now that your type is called Frame.Frame.frame from outside the frame.ml
<flux>
asdf.ml creates module Asdf that has all the stuff that you mention inside asdf.ml
<flux>
so if you say module Bash = .. inside asdf.ml, you end up with module Asdf.Bash
<gumchum>
I see, that makes sense. It works now that I reference it properly. Thanks! But is there a way to define the frame module so that I don't have to reference it as Frame.Frame?
<gumchum>
I guess I can 'open Frame' but maybe there's something cleaner?
<flux>
you can include Frame
<flux>
ie 'include Frame' :)
<flux>
or you can out the module type =.. stuff to frame.mli and then just put include Mips_frame inside frame.ml
<flux>
though it does seem quite weird. is Frame like a narrower view of what Mips_frame offers?
MercurialAlchemi has quit [Ping timeout: 244 seconds]
<gumchum>
Not quite... to be honest I'm translate some SML code in a book and I guess for pedagogical reasons they alias Frame to MipsFrame to have to abstract that away.
<gumchum>
translating*
<gumchum>
I really like the suggestion about including Mips_frame inside frame.ml. I think it accomplishes what's needed. Thanks!
breitenj has joined #ocaml
breitenj has quit [Ping timeout: 260 seconds]
zpe has quit [Remote host closed the connection]
tane_ has joined #ocaml
tane is now known as Guest39809
tane_ is now known as tane
Guest39809 has quit [Ping timeout: 244 seconds]
breitenj has joined #ocaml
breitenj has quit [Ping timeout: 264 seconds]
ggole has quit []
breitenj has joined #ocaml
breitenj has quit [Ping timeout: 244 seconds]
rand__ has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
yegods has quit [Remote host closed the connection]