companion_cube changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.05.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.05/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
mnemem has quit [Ping timeout: 255 seconds]
_whitelogger has joined #ocaml
profan has joined #ocaml
rand__ has quit [Quit: leaving]
marcux has joined #ocaml
pierpa has quit [Quit: Page closed]
Soni has quit [Read error: Connection reset by peer]
Soni has joined #ocaml
_whitelogger has joined #ocaml
enterprisey has joined #ocaml
_whitelogger has joined #ocaml
_whitelogger has joined #ocaml
_whitelogger has joined #ocaml
_whitelogger has joined #ocaml
yawaramin has quit [Remote host closed the connection]
rdavison has quit [Quit: rdavison]
_whitelogger has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
cbot has quit [Ping timeout: 240 seconds]
cbot has joined #ocaml
mnemem has joined #ocaml
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0_ has joined #ocaml
infinity0 has quit [Killed (hobana.freenode.net (Nickname regained by services))]
samrat has joined #ocaml
cbot has quit [Quit: Leaving]
_whitelogger has joined #ocaml
Soni has quit [Ping timeout: 258 seconds]
Soni has joined #ocaml
jonasen has joined #ocaml
mnemem has quit [Ping timeout: 248 seconds]
jnavila has joined #ocaml
_whitelogger has joined #ocaml
argent_smith has joined #ocaml
shinnya has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ocaml
eni has joined #ocaml
eni is now known as Guest68796
samrat has quit [Ping timeout: 240 seconds]
jnavila has joined #ocaml
antismap has joined #ocaml
dejanr has joined #ocaml
slash^ has joined #ocaml
mengu has joined #ocaml
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
mengu has quit [Read error: Connection reset by peer]
mengu_ has joined #ocaml
Guest68796 has quit [Quit: Leaving]
bacam has quit [Quit: reboot]
bacam has joined #ocaml
mfp__ has joined #ocaml
nullifidian_ is now known as nullifidian
TheLemonMan has joined #ocaml
dejanr has quit [Ping timeout: 240 seconds]
dejanr has joined #ocaml
dejanr_home has joined #ocaml
dejanr has quit [Ping timeout: 255 seconds]
dejanr_home has quit [Read error: No route to host]
dejanr has joined #ocaml
argent_smith has quit [Quit: Leaving.]
Anarchos has joined #ocaml
ShalokShalom has joined #ocaml
ShalokShalom_ has quit [Ping timeout: 248 seconds]
marcux has joined #ocaml
argent_smith has joined #ocaml
kerrhau has quit [Ping timeout: 240 seconds]
igstan has joined #ocaml
mengu_ has quit [Remote host closed the connection]
igstan has quit [Quit: igstan]
snhmib has joined #ocaml
igstan has joined #ocaml
Anarchos has quit [Quit: must go, real life calls in....]
igstan has quit [Client Quit]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
Soni has quit [Ping timeout: 240 seconds]
Soni has joined #ocaml
jonasen has quit [Read error: Connection reset by peer]
marcux has quit [Read error: Connection reset by peer]
marcux has joined #ocaml
malina has joined #ocaml
marcux has quit [Ping timeout: 248 seconds]
mengu has joined #ocaml
mengu has quit [Ping timeout: 260 seconds]
ShalokShalom_ has joined #ocaml
ShalokShalom has quit [Ping timeout: 240 seconds]
nightmared has quit [Ping timeout: 246 seconds]
nightmared has joined #ocaml
mengu has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
freusque has quit [Ping timeout: 255 seconds]
samrat has joined #ocaml
freusque has joined #ocaml
mengu has joined #ocaml
mengu has quit [Ping timeout: 260 seconds]
Fardale_ is now known as Fardale
ShalokShalom_ is now known as ShalokShalom
mengu has joined #ocaml
cthuluh has quit [Remote host closed the connection]
mengu has quit [Ping timeout: 264 seconds]
<infinity0> would have saved me some time yesterday if this had been googleable
<infinity0> for some reason i thought the (type a) syntax was equivalent to the ": type a." syntax, when it's not
<infinity0> Drup: btw i don't suppose it's possible to encode a diff-tree using your trick?
<infinity0> instead of a list with different types, you have a tree with different types. the child types of a given parent might be the same, but the grandchildren (between different children) would have different types
jnavila has quit [Ping timeout: 240 seconds]
<Drup> hmm
<Drup> So, there is this paper by Sam lindley: http://homepages.inf.ed.ac.uk/slindley/papers/many-holes.pdf
<Drup> which does something relevant
<Drup> it was written before we had GADT in OCaml, though
<Drup> Let me try to write you a small version
marcux has joined #ocaml
Anarchos has joined #ocaml
mengu has joined #ocaml
samrat has quit [Ping timeout: 248 seconds]
<infinity0> ah cool
mengu has quit [Ping timeout: 248 seconds]
<Drup> Basically, instead of writing concat as an operator, we embed it as a constructor, with exactly the same type
<infinity0> "let t" causes Error: The type of this expression, (int -> int -> string -> string -> '_a, '_a) tree, contains type variables that cannot be generalized
<infinity0> i'm on 4.05.0 though
<Drup> Sure, that's the usual problem that is described in my post :)
<infinity0> and, didn't know about the type = .. type += syntax, never seen that before
<Drup> Ah, that's extensible types, it's not really relevant, you can use any type you want for the holes
<Drup> You can even put holes in the nodes, or anything you want. The important part is that you "chain" the types of the left and right subtrees
marcux has quit [Quit: leaving]
marcux has joined #ocaml
mengu has joined #ocaml
<infinity0> ah right that error is just the top-level monomorphism thing or whatever it's called? works if you convert it into a function then apply it in a non-top-level expression
<infinity0> let t c = ((i ++ i) ++ (s ++ c)) ++ s
<infinity0> let f x = let t0 = t nil in failwith "not implemented"
<Drup> Yes
mengu has quit [Ping timeout: 248 seconds]
<infinity0> Drup: but if i understand right, the chaining loses the tree structure so a tree like ((a, b), (c, d)) would unify with a tree like ((a, b, c), d) right
jonasen has joined #ocaml
jonasen has quit [Remote host closed the connection]
jonasen has joined #ocaml
<Drup> infinity0: that's the point, isn't it ? You get a list of the holes
<Drup> regardless of the structure
<Drup> if you want the exact structure, diff-lists are useless, you can simply use "Node : 'a tree * 'b tree -> ('a* 'b) tree
hjshf has joined #ocaml
<thizanne> about diff-list, is there a difference between (a -> b -> c) list and ((a * b) * c) list, apart from ( -> ) being easier to read due to right associativity ?
marcux has quit [Quit: leaving]
<thizanne> (a * (b * c)) list *
marcux has joined #ocaml
<Drup> thizanne: not really
<Drup> (as long as you have the free variable at the end
<thizanne> (I guess something with covariance could happen, but anyway it doesnt play with gadt so)
<thizanne> anyway thanks for answering
<Drup> (there is a difference between (a * (b *c)) t and (a * (b * (c * 'a)), 'a) t, though, obviously :p)
<thizanne> sure, what I had in mind what the exact same encoding as in your blogpost, but s/->/*/
<Drup> Yeah, that's exactly the same, just with many more parens
mayhew has joined #ocaml
<infinity0> Drup: when you say "Node : 'a tree * 'b tree -> ('a * 'b) tree" to encode the tree structure, do you mean instead "('tya, 'v) tree * ('tyb, 'v) tree -> (('tya * 'tyb), 'v) tree"
<infinity0> i actually didn't have the "holes" part of diff-lists in mind when i was asking the original question about diff-trees
<Drup> what's the 'v for ?
<infinity0> but yes, of course to encoding trees in a type you can just bracket up the branches which for some reason i wasn't thinking of originally
<infinity0> Drup: the same thing it's for in diff-lists
<Drup> Except if you don't use it, it's not useful :p
<Drup> in diff-list, it's to make concatenation possible
mengu has joined #ocaml
<Drup> here, you do concatenation differently, by using tuples, so you don't need it
<infinity0> ah, right i see ok
<infinity0> it's only needed because "a -> b" doesn't "collapse" the constituent types of a
<infinity0> sorry, i was thrown off by the intro of the post which talked about extracting elements and avoiding the "escape its scope" error
mengu has quit [Ping timeout: 255 seconds]
<infinity0> "There are mostly two approaches when we want to put things of different types in a list: hide all the types or manage (somehow) to show all the types." -- so for diff-lists we are indeed doing the latter strategy
<infinity0> just in a clever way that lets you append two types (a1 -> a2 -> a3) and (b1 -> b2 -> b3) that unwraps the brackets
<Drup> yes
mengu has joined #ocaml
mengu has quit [Ping timeout: 260 seconds]
shinnya has quit [Ping timeout: 264 seconds]
pmetzger has joined #ocaml
rdavison has joined #ocaml
<pmetzger> Is there an arbitrary precision floating point package (by analogy to Z?)
mengu has joined #ocaml
<pmetzger> Also, I note that the docs still seem to list "num" as part of the standard library which I believe is no longer the case?
<companion_cube> there is Q
<companion_cube> also in zarith
<companion_cube> it's not FP though, but rationals
mengu has quit [Ping timeout: 255 seconds]
samrat has joined #ocaml
<octachron> pmetzger, num will be separated from the compiler distribution in 4.06, the 4.06 version of the manual has been updated; which doc mentionned num?
<pmetzger> ah, it was 4.05
<pmetzger> so you're right, I'm wrong.
<pmetzger> Q isn't good enough for me. I need to handle arbitrary precision floats for a compiler toolchain.
<pmetzger> I should probably just create appropriate bindings to the LLVM arbitrary float/arbitrary int types since I'm ultimately converting into those anyway.
<Drup> pmetzger: are arbitrary floating point really complicated to do on top of Q ?
<Drup> It seems like it's just a very simple overlay
<pmetzger> Not even remotely simple on top of rationals.
<pmetzger> Arbitrary precision IEEE floats are hard to do and aren't much like rationals at all.
<pmetzger> There's a couple of good C libraries that do it.
<Drup> Ah, there is an IEEE norm, so of course it's probably horribly complicated, fair enough
<Drup> (does it still has de-normalized and other horrible things ?)
<pmetzger> Also, representations of mantissas as bit strings have different computational properties than as ratios. An arbitrary precision float is not the same as an infinite precision float.
<pmetzger> 1/3 has an exact representation as a rational but not in the mechanisms of most arbitrary precision float systems.
<Drup> urg
<pmetzger> arbitrary ≠ infinite, it just means you can pick any large mantissa and exponent size you like.
<Drup> Actually, I don't want to know :D
<pmetzger> btw, is Z going to be part of the standard library instead of num, or will there now be no standard arbitrary precision integer but it will be understood new applications will pick Z?
<Drup> the later
<Drup> zarith depends on GMP, it can't be in the stdlib
<pmetzger> There are BSD licensed GMP-like things out there. Might be nice to build on one of those.
mnemem has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.1]: i've been blurred!]
mengu has joined #ocaml
rdavison has quit [Quit: rdavison]
rdavison has joined #ocaml
mengu has quit [Ping timeout: 258 seconds]
rdavison has quit [Client Quit]
mengu has joined #ocaml
<pmetzger> BTW, I have to say, the rules for what is and isn't allowed inside a (* *) block have bitten me repeatedly recently. Had an unpleasant problem caused by a single " inside a comment last night.
mengu has quit [Ping timeout: 248 seconds]
<pmetzger> I'm starting to see the wisdom of dumb comment syntax (like C block comments.)
<pmetzger> It's convenient to be able to nest comments so you can comment out code that has comments in it, but things like that happening are very irritating and unpleasant to debug.
<pmetzger> If I ever design a language, I think my solution will be to have two block comment types, one that you use normally and one that you use only for commenting out large blocks of code, so that you usually don't care about nesting.
Associat0r has quit [Read error: Connection reset by peer]
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
Associat0r has joined #ocaml
<Drup> pmetzger: https://wiki.haskell.org/Wadler's_Law
tg has quit [Quit: Leaving]
<pmetzger> hahahah! you know the term "bikeshedding" I presume?
<Drup> of course :)
<pmetzger> (That people will argue endlessly about what color to paint the bikeshed but not about important things?)
superherointj has joined #ocaml
mnemem has quit [Read error: Connection reset by peer]
johnelse has joined #ocaml
johnelse has quit [Client Quit]
mnemem has joined #ocaml
hjshf has quit [Quit: Connection closed for inactivity]
mengu has joined #ocaml
mengu has quit [Ping timeout: 255 seconds]
<superherointj> Hello. I was using the ubuntu repository ppa:avsm/ppa and it was fine, but now ubuntu was upgraded and it stopped working for current ubuntu version. Is there any other current ubuntu repository?
<superherointj> (for installing ocaml/opam)
<superherointj> +camlp4-extra
mayhew has quit [Ping timeout: 248 seconds]
FreeBirdLjj has joined #ocaml
<pmetzger> Mostly once you have opam installed at all, you can pretty much just upgrade everything you want using it.
<pmetzger> i.e. you can upgrade an old ocaml to a new one, replace old packages, etc.
shinnya has joined #ocaml
<superherointj> If I install the official ubuntu version I have trouble with conf-m4.1 it says it is missing.
yawaramin has joined #ocaml
jbrown has joined #ocaml
<pmetzger> what says it is missing?
<superherointj> When I try to install a specific package (reason) opam complains about the lack of an external dependency. `opam depext conf-m4.1`
<superherointj> And install of package is aborted.
jnavila has joined #ocaml
<pmetzger> and if you try to install the missing package?
<superherointj> When I was using that PPA I would get no error and things would just work out okay.
<superherointj> Like how?
<pmetzger> with say opam? :)
<pmetzger> or by figuring out what is missing and manually installing it.
<pmetzger> I don't know specifically what's wrong. I'm partially asking what you've tried to do to work around the issue.
<Drup> superherointj: `opam depext ...` is a command that opam tells you to run, which tries to install non-opam software on your system
<superherointj> I see. I'll try running the command.
mengu has joined #ocaml
yawaramin has quit [Ping timeout: 264 seconds]
mengu has quit [Ping timeout: 248 seconds]
mengu has joined #ocaml
ziyourenxiang has quit [Ping timeout: 248 seconds]
mengu has quit [Ping timeout: 248 seconds]
mengu has joined #ocaml
sz0 has joined #ocaml
mengu has quit [Ping timeout: 248 seconds]
mengu has joined #ocaml
dakk has joined #ocaml
yawaramin has joined #ocaml
superherointj2 has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
superherointj has quit [Ping timeout: 248 seconds]
mnemem has quit [Read error: Connection reset by peer]
mnemem has joined #ocaml
yawaramin has quit [Ping timeout: 255 seconds]
yawaramin has joined #ocaml
mnemem has quit [Read error: Connection reset by peer]
profan has quit [Remote host closed the connection]
mnemem has joined #ocaml
mengu has quit [Remote host closed the connection]
superherointj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
kolko has joined #ocaml
superherointj2 has quit [Ping timeout: 240 seconds]
malina has quit [Read error: Connection reset by peer]
kerrhau has joined #ocaml
kerrhau has quit [Changing host]
kerrhau has joined #ocaml
TheLemonMan has joined #ocaml
Associat0r has quit [Ping timeout: 255 seconds]
profan has joined #ocaml
webshinra has quit [Remote host closed the connection]
webshinra has joined #ocaml
samrat has quit [Ping timeout: 255 seconds]
malina has joined #ocaml
andreas__ has joined #ocaml
marcux has quit [Ping timeout: 248 seconds]
malina has quit [Ping timeout: 246 seconds]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
copy_ has quit [Quit: Connection closed for inactivity]
marcux has joined #ocaml
mnemem_ has joined #ocaml
mnemem has quit [Ping timeout: 255 seconds]
mnemem has joined #ocaml
tg has joined #ocaml
mnemem_ has quit [Ping timeout: 260 seconds]
mengu has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
enterprisey has joined #ocaml
profan has quit [Remote host closed the connection]
_zap_ has joined #ocaml
pmetzger has quit []
_zap_ has quit [Quit: Verlassend]
jonasen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mnemem has quit [Ping timeout: 248 seconds]
mnemem has joined #ocaml
yawaramin has quit [Remote host closed the connection]
argent_smith has quit [Quit: Leaving.]
mnemem has quit [Ping timeout: 255 seconds]
pierpa has joined #ocaml
profan has joined #ocaml
Soni has quit [Ping timeout: 240 seconds]
malina has joined #ocaml
Soni has joined #ocaml
superherointj has quit [Quit: Leaving]
mengu has quit [Remote host closed the connection]
marcux has quit [Quit: Lost terminal]
mengu has joined #ocaml
cbot has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
micro_ has quit [Remote host closed the connection]
sz0 has quit [Quit: Connection closed for inactivity]
marcux has joined #ocaml
dakk has quit [Ping timeout: 240 seconds]
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
Associat0r has joined #ocaml
marcux has quit [Ping timeout: 248 seconds]
enterprisey has quit [Read error: Connection reset by peer]
mnemem has joined #ocaml
snhmib has quit [Ping timeout: 248 seconds]
cbot_ has joined #ocaml
cbot has quit [Ping timeout: 248 seconds]
marcux has joined #ocaml
mcspud has quit [Quit: mcspud]
mcspud has joined #ocaml