flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
walter has joined #ocaml
asmanur has quit [Ping timeout: 246 seconds]
asmanur has joined #ocaml
walter has quit [Read error: Connection reset by peer]
walter has joined #ocaml
Nahra has joined #ocaml
mfp has quit [Ping timeout: 276 seconds]
pkrnj has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
walter has quit [Quit: This computer has gone to sleep]
madroach has joined #ocaml
q66 has quit [Quit: Leaving]
breakds has quit [Quit: Konversation terminated!]
manud has joined #ocaml
ygrek has joined #ocaml
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
lifeng has quit [Ping timeout: 264 seconds]
darkf has joined #ocaml
piotrm has joined #ocaml
weie has joined #ocaml
weie_ has quit [Ping timeout: 256 seconds]
weie_ has joined #ocaml
weie has quit [Ping timeout: 264 seconds]
asmanur has quit [Ping timeout: 245 seconds]
asmanur has joined #ocaml
weie has joined #ocaml
weie_ has quit [Ping timeout: 264 seconds]
weie_ has joined #ocaml
weie has quit [Ping timeout: 276 seconds]
bobry has quit [Ping timeout: 240 seconds]
ggherdov has quit [Ping timeout: 246 seconds]
lopex has quit [Ping timeout: 264 seconds]
IbnFirnas has quit [Ping timeout: 276 seconds]
davekong has quit [Ping timeout: 264 seconds]
cdidd has joined #ocaml
piotrm has quit [Remote host closed the connection]
walter has joined #ocaml
walter has quit [Client Quit]
darkf has quit [Quit: Leaving]
darkf has joined #ocaml
Snark has joined #ocaml
bobry has joined #ocaml
ggole has joined #ocaml
yacks has joined #ocaml
<gasche> I implemented something to detect probably-typos in ocamlbuild tags
<gasche> more precisely, I warn on all tags that are present in the configuration files, but not used by any tag declaration
manud has quit [Quit: manud]
<gasche> the funny thing, of course, is that I got half a dozen warnings for the part of the compiler distribution that use ocamlbuild
<gasche> *uses
<gasche> (ocamlbuild itself and camlp4)
<gasche> I'll need to go through them and fix them, but once it's ironed out I think that can be a fairly useful feature
ygrek has quit [Ping timeout: 245 seconds]
asmanur has quit [Ping timeout: 264 seconds]
ben_zen has quit [Quit: sleeeeep]
asmanur has joined #ocaml
zpe has joined #ocaml
davekong has joined #ocaml
lopex has joined #ocaml
IbnFirnas has joined #ocaml
Yoric has joined #ocaml
zpe has quit [Ping timeout: 268 seconds]
ggherdov has joined #ocaml
Drup has quit [Quit: Leaving.]
thomasga has joined #ocaml
zpe has joined #ocaml
zRecursive has left #ocaml []
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
<whitequark> gasche: oh, that is very nice. I was always surprised when ocamlbuild didn't barf on undefined tags
ygrek has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
Simn has joined #ocaml
librarian has joined #ocaml
<librarian> Hi all! Recently I asked one of my friends to help me with code to my program and he write this: let (@@) f x = f x. It was used in List.map () @@ some_func. I google a little and found this article http://stackoverflow.com/questions/4242263/change-application-order-in-ocaml and suggest that this is the same thing. But when I try to explain it to my friend, he said that let (@@) is composition, and let (@@@) is application.
<librarian> Could you say where I could read about such structures?
vpit3833` has joined #ocaml
Yoric has quit [Ping timeout: 246 seconds]
vpit3833 has quit [Ping timeout: 240 seconds]
eikke has joined #ocaml
asmanur has quit [Ping timeout: 246 seconds]
<gasche> librarian: I'm not quite sure what your question is
<gasche> is it about what the words "composition" and "application" mean, or about the choice of infix symbols used to represent them?
<gasche> the definition of (@@) that you have given is application
<gasche> you're free to define any of these useful operations to any infix symbol you like, and in practice people have used all sorts of (@@), ($), (@$), (|>), (|!), (|-) etc.
<gasche> that said, the next release of OCaml will use (@@) for aplication, so it's probably a good idea to respect this choice
zpe has joined #ocaml
<gasche> (and (|>) for reverse application: fun x f -> f x)
asmanur has joined #ocaml
<gasche> (one important difference between application and composition is that composition is associative, so the associativity of the infix symbol chosen doesn't matter; while for application left-associative and right-associative operators are very different)
<gasche> (in OCaml, associativity and precedence of infix symbols is determined by their first few characters, according to a fixed table that can be found in the manual)
<gasche> (everything beginning with "@" is right-associative, most other things are left-associative)
<whitequark> gasche: when will that next release be? :]
<gasche> the beta version was released a few days ago
<gasche> usually there is only a few weeks between the beta and the release
<gasche> (there are only?)
thomasga has quit [Quit: Leaving.]
<whitequark> I see
csakatoku has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
cdidd has quit [Remote host closed the connection]
cdidd has joined #ocaml
ocp has joined #ocaml
<librarian> gasche: Thanks for explanation, I will read and translate it a bit later to be sure, that I all understand correctly
<gasche> you're welcome
weie has joined #ocaml
weie_ has quit [Ping timeout: 245 seconds]
djcoin has joined #ocaml
zpe has joined #ocaml
osa1 has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
zpe has joined #ocaml
Kakadu has joined #ocaml
ocp has quit [Ping timeout: 256 seconds]
ontologiae has joined #ocaml
ontologiae has quit [Client Quit]
mcclurmc has joined #ocaml
Kakadu has quit [Read error: Connection reset by peer]
Kakadu has joined #ocaml
shinnya has quit [Quit: ZNC - http://znc.in]
mika1 has joined #ocaml
Yoric has joined #ocaml
<whitequark> gasche: I was reading 4.01 changelog and noticed this:
<whitequark> - ocamlopt now uses clang as assembler on OS X if available, which enables CFI support for OS X.
<whitequark> is it possible to also use clang on linux (optionally?)?
Anarchos has joined #ocaml
thomasga has joined #ocaml
Neros has joined #ocaml
shinnya has joined #ocaml
mfp has joined #ocaml
shinnya has quit [Ping timeout: 268 seconds]
dnm has joined #ocaml
carleastlund has quit [Quit: carleastlund]
dnm has quit [Ping timeout: 264 seconds]
x-s4nd3r has joined #ocaml
x-s4nd3r has quit [Changing host]
x-s4nd3r has joined #ocaml
<Kakadu> hi
<Kakadu> Somebody have mentioned there some experience about GADTs and parser-combinators
<Kakadu> CAn you explain why GADTs are used? Some typing problems without it?
mcclurmc has quit [Quit: Leaving.]
<Kakadu> Ah, it seem I understand
<ygrek> wow, 10 minutes to grok gadts
<ygrek> scores for the world record
mcclurmc has joined #ocaml
q66 has joined #ocaml
Fullma has quit [Ping timeout: 260 seconds]
<whitequark> gadts are such a confusing concept :/
<whitequark> I still have no idea why a variant would have a "return type"
Fullma has joined #ocaml
<Kakadu> If I have a EBNF tree definition and action code in my ast
<Kakadu> I should connect somehow type of action code with type of AST
<Kakadu> because Ast introduces variables which are transmitted into action code to use them there
<Kakadu> So
<Kakadu> If my parser is
<Kakadu> p1: x:IDENT { x }
<Kakadu> then Ast should be something like
malo has joined #ocaml
<Kakadu> List [(LexerItem "IDENT", Some "x")], Some (fun x -> x)
<Kakadu> maybe this example is not the best one
<Kakadu> probably I should Try something with arithmetic expressions
Neros has quit [Ping timeout: 248 seconds]
ollehar has joined #ocaml
Neros has joined #ocaml
mcclurmc has quit [Quit: Leaving.]
<whitequark> so I was trying to do something strange with ocaml
<whitequark> # let f () : type a. unit -> 'a * ('a -> unit) = "foo", print_endline;;
<whitequark> Error: Assertion failed, file "camlp4/Camlp4/Struct/Camlp4Ast2OCamlAst.ml", line 284, char 8
<Anarchos> whitequark what means the "type a." ?
<Anarchos> it gives me a syntax error on the "type" keyword (here version 4.02+dev0-201306-13)
<whitequark> hm.
<whitequark> I was doing that with utop
<whitequark> indeed, regular toplevel emits a syntax error
<Anarchos> whitequark the manual mentions parentheses around the "type"...
<whitequark> see the last section
<whitequark> regardless; why cannot I do this?
<whitequark> # let f () : 'a. unit -> 'a * ('a -> unit) = "foo", print_endline;;
<whitequark> Error: This expression has type 'b * 'c but an expression was expected of type 'a. unit -> 'a * ('a -> unit)
<whitequark> is it unsound somehow? or are there other difficulties?
<Anarchos> maybe you should put type annotation on print_endline ?
<flux> well, print_endline doesn't match 'a. ('a -> unit) for one
<whitequark> oh.
<whitequark> right.
<whitequark> still, I think what I'm doing is logically valid
<Anarchos> try this one :
<Anarchos> let f : 'a. unit -> 'a * ('a -> unit) = fun () -> "foo", (print_endline : ('a -> unit));;
<Anarchos> the error message should explain you what's happening
<Anarchos> (by the way you forgot the "fun () ->" part)
<whitequark> right
thomasga has quit [Quit: Leaving.]
<whitequark> yes, 'a. is the universal quantifier, and I want existential here
<whitequark> and ocaml simply doesn't have that.
thomasga has joined #ocaml
<whitequark> thanks
<whitequark> (I know I can do that with first-class modules; I was wondering why I couldn't do it with just functions.)
<Anarchos> i think that the type system of ocaml becomes more and more difficult to understand
<Anarchos> with local types, universal types, +/- variant and so on...
<whitequark> perhaps
_andre has joined #ocaml
n06rin has joined #ocaml
jgw25 has joined #ocaml
<jgw25> Why does ocamlfind think that Bigarray depends on Unix? #require "bigarray" loads unix.cma first...
<Anarchos> jgw25 did you read the source code of bigarray ?
<Anarchos> map_internal takes a Unix.file_descr as parameter
ocp has joined #ocaml
<jgw25> I see. I had compared with #load "bigarray.cma" which doesn't seem to do anything special. But I suppose to construct the Unix.file_descr to make the call one would have to load Unix.
contempt has quit [Ping timeout: 268 seconds]
jgw25 has quit []
contempt has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-130604]: i've been blurred!]
mcclurmc has joined #ocaml
introom has joined #ocaml
csakatoku has quit [Remote host closed the connection]
beginnner42 has joined #ocaml
Yoric has quit [Ping timeout: 264 seconds]
walter has joined #ocaml
AltGr has joined #ocaml
ygrek has quit [Ping timeout: 248 seconds]
n06rin has quit [Read error: Connection reset by peer]
n06rin has joined #ocaml
<kerneis> jbrown: #load does not load dependencies
<kerneis> hmm, sorry, jgw25 has left
walter has quit [Read error: Connection reset by peer]
walter has joined #ocaml
walter has quit [Quit: This computer has gone to sleep]
metasyntax has quit [Quit: Leaving]
ocp has quit [Ping timeout: 264 seconds]
Drup has joined #ocaml
ygrek has joined #ocaml
beginnner42 has quit [Ping timeout: 240 seconds]
walter has joined #ocaml
mcclurmc has quit [Quit: Leaving.]
darkf_ has joined #ocaml
darkf has quit [Disconnected by services]
darkf_ is now known as darkf
flx has joined #ocaml
flx is now known as Guest8546
ocp has joined #ocaml
Leonidas_ has joined #ocaml
hcarty_ has joined #ocaml
adrien_ has joined #ocaml
Ptival_ has joined #ocaml
flux has quit [Disconnected by services]
bitbckt_ has joined #ocaml
Guest8546 is now known as flux
iZsh` has joined #ocaml
habnabit has joined #ocaml
walter has quit [Quit: This computer has gone to sleep]
iZsh has quit [*.net *.split]
hcarty has quit [*.net *.split]
_habnabit has quit [*.net *.split]
bitbckt has quit [*.net *.split]
adrien has quit [*.net *.split]
Ptival has quit [*.net *.split]
Leonidas has quit [*.net *.split]
Armael has quit [*.net *.split]
aggelos__ has quit [*.net *.split]
aggelos_ has joined #ocaml
ocp has quit [Ping timeout: 256 seconds]
bitbckt_ is now known as bitbckt
bitbckt has quit [Changing host]
bitbckt has joined #ocaml
ocp has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
k4nar has joined #ocaml
Armael has joined #ocaml
troydm has quit [Ping timeout: 264 seconds]
x-s4nd3r has quit [Quit: i'll be back in a moment, just gotta do some stuff...]
introom has quit [Remote host closed the connection]
librarian has left #ocaml []
cdidd has quit [Remote host closed the connection]
metasyntax has joined #ocaml
malo_ has joined #ocaml
carleastlund has joined #ocaml
malo has quit [Ping timeout: 256 seconds]
<Kakadu> gasche: hi!
<Kakadu> We were taking in Friday that parser-combintors allocate a lot of memeory during parsing and that's why the next pretty printing works slow
<Kakadu> Any ideas how to find places where memory is allocated? Examining the .s files?
ollehar has quit [Ping timeout: 246 seconds]
<Kakadu> Also, I have written recursive-descent parser which does the same work and which works the similar time
<Kakadu> It seems that it has the allocation issue too. Any ideas how to study that?
<Kakadu> General question: are OCaml runtime internals documented somehow?
introom has joined #ocaml
ocp has quit [Ping timeout: 256 seconds]
<ggole> All sorts of things allocate in OCaml
oriba has joined #ocaml
cdidd has joined #ocaml
structuralist has joined #ocaml
introom has quit [Ping timeout: 245 seconds]
mcclurmc has joined #ocaml
<whitequark> what could be the cause of very imprecise backtraces?
<whitequark> such as Called from file "src/core/ssa.ml", line 459, characters 2-727
<whitequark> >2-727
<whitequark> I assume it would be some sort of inlining, how do I disable it?
malo_ has quit [Quit: Leaving]
Matthieu4 has joined #ocaml
<AltGr> whitequark: thanks for the ocp-index binding :)
<whitequark> AltGr: you're welcome!
<gasche> whitequark: it's strange
<gasche> did you use syntax extensions that could mess with locations?
<whitequark> I have camlp4 enabled but this file only uses ocaml syntax
<whitequark> so, that would be -tag syntax(camlp4o)
<whitequark> I tried to compile that to bytecode, with exactly same result
ccasin has joined #ocaml
<whitequark> AltGr: maybe you could tweet about it or reddit or something, I don't really know how to reach ocaml users
hkBst has quit [Quit: Konversation terminated!]
Matthieu4 has left #ocaml []
oriba has quit [Quit: oriba]
smondet has joined #ocaml
Anarchos has joined #ocaml
<Anarchos> Why do i get an error with the following include :
<Anarchos> module type S = sig end;;
<Anarchos> module type T = functor (Sig:S) -> sig end;;
<Anarchos> module type F = functor (Sig:S) -> sig include (T(Sig)) end;;
Yoric has joined #ocaml
<gasche> Anarchos: you want to use "module T = functor", not "module type T = functor"
<gasche> hm
<gasche> I'm actually not sure what you mean
<ggole> Don't functors map to structs, not sigs?
<gasche> but if T is the signature of a functor, T(Foo) makes no sense
<gasche> ggole: yeah, but the struct could contain a sig, with a different syntax
<AltGr> whitequark: I'll at least link to the binding from ocp-index README
<Anarchos> gasche module type = functor is allowed by http://caml.inria.fr/pub/docs/manual-ocaml/manual018.html
<gasche> yes, but it gives you the signature of a functor
<ggole> Sure enough, module type F = functor (Sig:S) -> sig end is fine
<gasche> not a functor that returns a signature
<gasche> those are two different things
<gasche> and you cannot apply the signature of a functor
<gasche> only functors
ygrek has joined #ocaml
<Anarchos> gasche so how to include in the module type F things defined in T(Sig) ?
<gasche> T(Sig) does not make sense if T is a module type
<gasche> if you want to be able to define a signature parametrized by a module, you must use a functor, not a module type
<gasche> module T = function(X:InputSig) = struct module type OutputSig = sig (* something depending on X *) end end
<gasche> then use T(Sig).OutputSig
<gasche> (so it is a functor that returns a module whose sole component is a module type)
<Anarchos> gasche seems a bit complicated...
<whitequark> AltGr: oh, thanks! so you're from ocamlpro?
<Anarchos> gasche and the error message about sig being not matched by an end is not very explicit...
Yoric has quit [Ping timeout: 246 seconds]
rfk has joined #ocaml
mika1 has quit [Quit: Leaving.]
<AltGr> whitequark: sure, I'm the author
<AltGr> :)
osa1 has quit [Ping timeout: 260 seconds]
<ggole> Can hash tables actually *crash* if keys are mutated? Or will they just "lose" mappings?
<Anarchos> ggole no idea
<companion_cube> you will lose mappings
<companion_cube> well, the semantics of lookup will probably be broken
<companion_cube> (the mapping are still there, and are reachable using iter, for instance)
<ggole> Yeah, and it seems you recover them after a resize (due to rehashing, I guess)
<companion_cube> right
thomasga has quit [Quit: Leaving.]
<companion_cube> but meanwhile, find and remove will misbehave
<ggole> Yep.
<ggole> It'd be nice if you could ask it to crash...
<ggole> Oh well.
<Anarchos> i never liked to use hashmaps cause most of programmers don't care about collision, using hashing as encryption...
<Anarchos> as if it would be bijective which is not the case
<ggole> Collision is resolved by equality test
<ggole> Which seems reasonable enough (in cases where equality isn't problematic)
<companion_cube> ggole: the hashtable cannot know when a key is modified
AltGr has quit [Quit: Konversation terminated!]
<ggole> Unless you were referring to collision attacks
<companion_cube> OCaml's hashtables now can be randomized to prevent (some?) collision attacks
<ggole> A verification routine could hash all elements and assert that each is in its proper bucket, though.
<companion_cube> ggole: you can approximate that by using iter() and checking whether each key is present
<ggole> (I don't think such a debugging aid can be written from the outside of the module, unfortunately.)
<ggole> Oh, hmm.
<ggole> I was thinking of find as useless for that since it is "unreliable": but that probably works.
<companion_cube> try Hashtbl.iter (fun k _ -> if not (Hashtbl.mem h k) then raise Exit) h; true with Exit -> false
<companion_cube> within an assertion, for instance
contempt has quit [Ping timeout: 256 seconds]
<ggole> Seems to work.
<ggole> Cheers!
contempt has joined #ocaml
<companion_cube> :)
<companion_cube> (I was tempted to use Sequence.for_all :p)
<companion_cube> assert (Sequence.for_all (fun (k,_) -> Hashtbl.mem h k) (Sequence.of_hashtbl h))
<ggole> It would be nice if various bits and pieces defined such things
contempt has quit [Ping timeout: 268 seconds]
<ggole> I've often written array_for_all or array_find.
eikke has quit [Read error: Operation timed out]
<companion_cube> well, my code compiles :p
<gasche> assert Sequence.(of_hashtbl h |> for_all (fun (k,_v) -> Hashtbl.mem h k))
<companion_cube> right, I still don't have the reflex of using such local open
contempt has joined #ocaml
rfk has quit [Ping timeout: 256 seconds]
Kakadu has quit [Quit: Konversation terminated!]
rfk has joined #ocaml
contempt has quit [Ping timeout: 264 seconds]
thomasga has joined #ocaml
contempt has joined #ocaml
structuralist has quit []
_andre has quit [Quit: leaving]
<whitequark> I wonder why is there no Hashtbl.rehash
contempt has quit [Ping timeout: 264 seconds]
contempt has joined #ocaml
n06rin has quit [Quit: Leaving.]
_andre has joined #ocaml
contempt has quit [Remote host closed the connection]
<gasche> whitequark: what would an API for that be? you need to know the old hash, and it's probably too late to get it
<gasche> looks fairly tedious for something really ugly that people are not supposed to do with hashtables, and that they could implement on the user side if they really wanted to
tane has joined #ocaml
<whitequark> gasche: Hashtbl.rehash tbl
<gasche> ah
<gasche> you mean rehash the whole table
<gasche> there is something like that internally, done at resize time
<gasche> (I worked on a patch to make it tail-recursive a few weeks ago)
<gasche> but I'm not sure I see good use-cases for it
<whitequark> well
<whitequark> ruby has Hash#rehash, but I'm not quite sure whether its usage ever makes sense
<whitequark> it looks like the sort of a feature which masks a different bug
<ggole> That's the best kind of feature!
<ggole> Who doesn't want their bugs hidden?
contempt has joined #ocaml
<gasche> fact of the day: ocamlbuild's "sanitize" file used to be called "sterilize"
<gasche> that was in line with the whole "hygiene" concept, but I understand people weren't happy with it
<adrien_> :D
Yoric has joined #ocaml
<gasche> I don't know how people were tracking bugs before git
<adrien_> poorly?
<ousado> phew.. finally found a way to model a state machine with GADTs
<gasche> ousado: why do you need GADTs for that?
darkf has quit [Quit: Leaving]
<gasche> adrien_: something that is missing in my workflow
osa1 has joined #ocaml
<gasche> is a kind of augmented blame tool that can show me the history of some small portion of the program
<ousado> gasche: I'm not sure I really need them
<gasche> I'm often interested in where, say, 5 lines come from
<gasche> but "git blame" will give me the commit that made a whitespace change to them, which is not what I want
<gasche> so then I checkout before that commit, and run blame again
<gasche> I think this could be automated
<gasche> but it's non-obvious for a tool to know where the code I'm interested in is before a change
<ousado> but I wanted to model both states and transition events with ADTs
<gasche> (I think we could have heuristics that work well, and otherwise show the diff to the user and ask him to select the piece he still wants to track)
<gasche> ousado: I'm not saying you're wrong, I don't know
Yoric has quit [Ping timeout: 264 seconds]
ocp has joined #ocaml
troydm has joined #ocaml
Myk267 has joined #ocaml
<adrien_> gasche: git blame -w
<adrien_> git blame -w path 1efb456~~
<gasche> I was using whitespace as an example
<gasche> it's not always the case
<gasche> there is also "git blame -L" that allows something related
<gasche> (you can blame on the first line that matches some regexp)
<gasche> I just did a quick web search
<gasche> it looks like "tig" has a nice interface for what I want
<gasche> basically you go to any line in the blame, press ",", and it will blame the version from before the commit that changed that line
<ousado> gasche: https://gist.github.com/ousado/356bb8e097129f45ea21 here st is a state and se is some event (e.g. caused by some action in a GUI) and by this use of GADTs one can make sure that the only way to proceed from some state is via a valid event, encoded by tagging the respective states and events with the same type
<gasche> if they have some logic in place to put the cursor in "the right place" (the one where the line comes from), that's enough for my needs
<gasche> tig looks really nice
<gasche> ousado: so in essence you have a multi-sorted transition system
Anarchos has quit [Quit: Vision[0.9.7-H-130604]: i've been blurred!]
contempt has quit [Ping timeout: 248 seconds]
<ousado> yes
<ousado> it essentially buys exhaustiness checks
<adrien_> gasche: gitk is very nice too :-) ; but no such blame (although git gui has something)
<ousado> *exhaustiveness
contempt has joined #ocaml
<gasche> adrien_: try "tig blame foo", it's really nice
Yoric has joined #ocaml
contempt has quit [Ping timeout: 240 seconds]
rfk has quit [Quit: leaving]
shinnya has joined #ocaml
ddonna has joined #ocaml
<ddonna> So, has sexplib disappeared from Godi? Is that just me?
contempt has joined #ocaml
<adrien_> it has
<ddonna> So, one would install libsexplib-camlp4-dev or somesimilar, then work out the linking manually?
<ddonna> ...or is there something fundamentally broken about the library?
<adrien_> you can't mix packages
Yoric has quit [Ping timeout: 246 seconds]
<adrien_> from different sources
<ddonna> Not even by hand-crafting the linking paths? Strange.
<ddonna> So the solution is pretty much to switch to other repos, reimplement, or despair.
<ddonna> I'm curious about the history behind that, if anyone happens to know, but no big deal otherwise.
Neros has quit [Ping timeout: 246 seconds]
<whitequark> adrien_: can't you? I've successfully used system LLVM and base compiler together with opam stuff
<adrien_> you can to some extent
<adrien_> but while you'll be trying to fix all the issues that appear, I'll be outside
<adrien_> ddonna: you can download, build and install sexplib
<adrien_> by hand
<adrien_> should be quick and easy
<ddonna> drop it in the godi!ocamlfind path, waltz away with a song in my heart?
<adrien_> "make install" should use ocamlfind to do everything
<ddonna> Uh-oh... the only distribution of sexplib that I could find is the janestreet core... which depends on bin_prot, which is not available in GODI. My honed senses detect a pattern.
<ddonna> Did Yaron Minsky insult somebody's mom?
<Drup> ddonna: you don't read the caml list, do you ? :]
<gnuvince> OCaml drama?
<ddonna> Drup: alas, I do not. But I just took a look, and I'm starting to get a taste of the flavour.
<whitequark> adrien_: it's not like I have a choice :/
<ddonna> It would appear that now is the time to learn raw ocamlfind.
<whitequark> it does not make any sense to compile LLVM on the CI server, I cannot change the default environment of CI, and most of my dependencies are not in Debian (even if they were, I'd have to recompile them for 4.00 anyway.)
cthuluh has quit [Ping timeout: 256 seconds]
x-s4nd3r has joined #ocaml
<bitbckt> ddonna: it isn't usually so dramatic. this particular topic is fraught with peril for the new reader, though.
<ddonna> Hmmm. Looks like Jane Street's build scripts don't play nice with godi's installation paths. Might be time to throw some babies out with the bathwater.
<chris2> why not simply use opam?
<ddonna> Until about 10 seconds ago, the answer was "because I have never heard of that." The situation has since evolved.
<chris2> :)
<ddonna> On which note: thank you.
<chris2> yw ;)
<chris2> (unless you are on win32...)
iZsh` has quit [Quit: jumpin' jumpin']
iZsh has joined #ocaml
<ddonna> Ubuntu. The birkenstocks-with-socks to win32's pair of crocs
ulfdoz has joined #ocaml
eikke has joined #ocaml
<whitequark> in a simplified way, I want a type t = (string, t) Hashtbl.t
<whitequark> er
<whitequark> type t = (t, string) Hashtbl.t
<whitequark> but I don't see a way to do this at all ?
<whitequark> it seems that I need to resort to hashconsing :/
<ggole> type t = {value: (t, string) Hashtbl.t;}
<ggole> Or -rectypes? I forget exactly what it allows.
<whitequark> eh. sorry, reduced the case incorrectly.
<ggole> :/
<whitequark> I need a Hashtbl with a custom equality relation, because I want to compare t by identity
<whitequark> comparing it structurally leads to various awkward behavior.
<companion_cube> whitequark: there is a Hashtbl functor
<companion_cube> to provide specific hash and equality
<whitequark> companion_cube: exactly, and I cannot invoke it inside a recursive type definition
<whitequark> i.e. I'd need type t = { value: string Hashtbl.Make([something] t) }
<whitequark> if you understand what I mean
<companion_cube> you need a recursive module, then
<whitequark> I'd really rather not define it for such a minor concern
<whitequark> hm.
<whitequark> by the way, doesn't Hashtbl.hash compute the hash structurally?
<ggole> Yeah
ygrek has quit [Ping timeout: 248 seconds]
<whitequark> so if I mutate the value and it gets another Hashtbl.hash value, will the Hashtbl still able to find it?
<ggole> Pick the same bits that you compare by equality and you should be ok, though
<ggole> No
<ggole> Hashtbl keys need to be immutable
<ggole> Map keys too
<ggole> If you want to change parts of the keys, you'll need to find/construct some constant structure to key the table on
<whitequark> right
<whitequark> I think I'll just use List.assoc for now, and then migrate to hashconsing if it becomes a problem
oriba has joined #ocaml
<ggole> Assoc uses =, btw. But you can get around that with List.find easily.
<whitequark> actually, change of plans
<whitequark> I'll use a regular hashtable and use the immutable part of what I have intended to use as a key, as a key
<whitequark> and then manually traverse the list and compare mutable parts
<whitequark> ggole: ExtList has List.assq
ddonna has quit [Quit: Lost terminal]
<ggole> Regular List has assq, too: but that just uses ==.
<whitequark> well, that's what I want ?
<whitequark> comparing immutable part with (=) and mutable with (==)
<ggole> ...so, different from ==?
<ggole> Whatever: you know what you want.
<whitequark> my final type is `type overloads = (Rt.ty list, (name * name) list) Hashtbl.t'
<whitequark> so it's first Hashtbl.find, then List.assq, and it all works very nicely.
<ggole> Oh, I see.
Yoric has joined #ocaml
Snark has quit [Quit: leaving]
Neros has joined #ocaml
Yoric has quit [Ping timeout: 246 seconds]
ggole has quit []
<gasche> whitequark: the Hashtbl.Make functor allows to do that
Yoric has joined #ocaml
x-s4nd3r has quit [Ping timeout: 268 seconds]
<gasche> for a type t, you defined your own (t -> int) function (typically (fun t -> Hashtbl.hash (key_part t)), and your own comparison function
<pippijn> is hash(int) identity?
<gasche> pippijn: no, it isn't
<gasche> hm
Simn has quit [Quit: Leaving]
<gasche> more precisely, it isn't specified as being such
<gasche> ah
<gasche> and it always return a positive integer
<gasche> so a negative integer will be hashed into a positive one
<gasche> anyway, time to go
dsheets has joined #ocaml
<pippijn> ok
Leonidas_ is now known as Leonidas
mcclurmc has quit [Quit: Leaving.]
Yoric has quit [Ping timeout: 264 seconds]
habnabit is now known as _habnabit
Yoric has joined #ocaml
jave has quit [Quit: ZNC - http://znc.in]
jave has joined #ocaml
eikke has quit [Ping timeout: 260 seconds]
tani has joined #ocaml
tane has quit [Ping timeout: 260 seconds]
Yoric has quit [Ping timeout: 246 seconds]
nlucaroni has quit [Quit: leaving]
ocp has quit [Ping timeout: 240 seconds]
<whitequark> pippijn: hi
osa1 has quit [Ping timeout: 256 seconds]
<whitequark> any updates on merr/re2ml ?
osa1 has joined #ocaml
osa1 has quit [Quit: Konversation terminated!]
structuralist has joined #ocaml
ddonna has joined #ocaml
_andre has quit [Quit: leaving]
ocp has joined #ocaml
Yoric has joined #ocaml
manud has joined #ocaml
rwmjones has quit [Ping timeout: 240 seconds]
Yoric has quit [Ping timeout: 264 seconds]
Yoric has joined #ocaml
ulfdoz has quit [Ping timeout: 256 seconds]
rwmjones has joined #ocaml
tani has quit [Quit: Verlassend]
zpe has quit [Remote host closed the connection]
void64 has joined #ocaml
osa1 has joined #ocaml
structuralist has quit [Ping timeout: 268 seconds]
ocp has quit [Ping timeout: 246 seconds]
eikke has joined #ocaml
thomasga has quit [Quit: Leaving.]
Yoric has quit [Ping timeout: 246 seconds]
malo has joined #ocaml
Yoric has joined #ocaml
vpit3833` is now known as vpit3833
gasche has quit [Ping timeout: 260 seconds]
gasche has joined #ocaml
Yoric has quit [Ping timeout: 264 seconds]
ollehar has joined #ocaml
osa1 has quit [Ping timeout: 264 seconds]
_malicious has joined #ocaml
introom has joined #ocaml
smondet has quit [Quit: Breathe!]
void64 has quit [Quit: Leaving]
mfp has quit [Ping timeout: 256 seconds]
djcoin has quit [Quit: WeeChat 0.4.0]
zRecursive has joined #ocaml
mfp has joined #ocaml
malo has quit [Quit: Leaving]
clj_newb_2345 has joined #ocaml
<clj_newb_2345> ping
<clj_newb_2345> I'm familiar with Clojure (very little typing and Coq (lots of typing). I need to learn Ocaml very rapidy in order to write plugins for Coq.
<clj_newb_2345> What is the most efficient way to pick up OCaml?
Drup has quit [Ping timeout: 248 seconds]
<clj_newb_2345> I'm also using vim. Is there a better setup than "omlet" (which apears to be dead since 2005)
introom has quit [Remote host closed the connection]
eikke has quit [Ping timeout: 248 seconds]
_malicious has left #ocaml []
introom has joined #ocaml
<whitequark> clj_newb_2345: real world ocaml
<clj_newb_2345> whitequark: amazonsays not released yet
<whitequark> yeah, there's an open beta
Drup has joined #ocaml
<clj_newb_2345> whitequark : great, thanks
<clj_newb_2345> one more question:
<clj_newb_2345> I'm a VIM user.
<clj_newb_2345> What should I use for my ocmal setup?
<whitequark> no clue, I use sublime
<whitequark> I don't really get the *mandatory* size parameter in Hashtbl.create, since it adjusts itself anyway
<whitequark> I just pass it 10 every time and that feels dirty
<Khady> you can look at https://github.com/def-lkb/merlin for vim/emacs
<Khady> and ocaml-annot
ollehar has quit [Ping timeout: 245 seconds]
asmanur has quit [Ping timeout: 264 seconds]
asmanur has joined #ocaml
introom has quit [Remote host closed the connection]