lapinou changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | http://www.ocaml.org | OCaml 4.01.0 announce at http://bit.ly/1851A3R | Public logs at http://tunes.org/~nef/logs/ocaml/
<whitequark> they are separate in LLVM because they're defined as inline functions, and as such if you don't call LLVMInitializeAllAsmPrinters, for example, you won't get those modules linked in.
nikki93 has joined #ocaml
AltGr has left #ocaml []
penryu has quit [Ping timeout: 252 seconds]
penryu has joined #ocaml
wmealing2 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
wmealing1 has quit [Ping timeout: 245 seconds]
ontologiae has quit [Ping timeout: 276 seconds]
manizzle has quit [Ping timeout: 240 seconds]
guest010101 has quit [Ping timeout: 240 seconds]
Rotacidni has joined #ocaml
zpe has joined #ocaml
<whitequark> Drup: ppx_metaquot.exe -_-'
<Drup> ?
<Drup> he's ensuring windows compatibility, what's the issue ?
<whitequark> ls is not called /usr/bin/ls.exe
divyanshu has quit [Quit: Computer has gone to sleep.]
racycle has quit [Quit: ZZZzzz…]
nikki93 has joined #ocaml
<Drup> you're nitpicking.
q66 has quit [Ping timeout: 252 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
zpe has quit [Ping timeout: 252 seconds]
<whitequark> I am.
<whitequark> can't not do it
<Drup> =)
<Drup> anyway, it makes the code much more simple
<whitequark> should send a patch to substitute the extension there
<Drup> which would be refused :)
<whitequark> then I'll continue assembling the AST from ADTs.
<Drup> why ?
<Drup> do you feel so dirty by using on linux something ending by .exe ? :)
<whitequark> yes
<Drup> :D
<whitequark> doesn't matter that it's linux. it runs counter to every existing convention
<whitequark> why does ocamlfind even not substitute .exe itself?
<whitequark> ... it actually does.
<whitequark> then I don't see why the patch would be refused, it adds zero user-visible changes
<Drup> then go on :)
<whitequark> need to get a windows machine first, to verify that I don't break build on windows
<whitequark> using windows in order to not use (or see) windows! such logic
<whitequark> which of the four ports I should use? O_o
<Drup> the camlp4 package doesn't install libraries
<Drup> I'm confused
<Drup> whitequark: does it work for you ?
<whitequark> Drup: I believe so
<whitequark> e.g. I have type_conv installed
<Drup> me too
<Drup> but for some reason, ocamlfind don't have the camlp4 extensions
<Drup> libraries*
<whitequark> oh!
<whitequark> reinstall findlib.
<whitequark> there's a circular dependency between them
<Drup> X_x
<Drup> let's recompile everything !
<whitequark> yes, it's a bit of a pita
<Drup> I'm wondering why findlib is using a syntax extension ..
<whitequark> no, it does not
<whitequark> but it installs the META files for camlp4 if it detects that camlp4 exists, and not otherwise
<Drup> that's weird
<Drup> why aren't the META files for camlp4 in the camlp4 package ?
<whitequark> my guess: because findlib is not a part of ocaml, and camlp4 used to be
<whitequark> and the package is an unofficial quick fix from jpdeplaix
<Drup> yeah, I figured
<Drup> anyway, it works now
dapz has joined #ocaml
divyanshu has joined #ocaml
<whitequark> Drup: wait, did you think I would actually send a PR *removing* Windows support?
<Drup> :D
<whitequark> that is not only petty and immature, but also shooting myself in the leg, because I need Windows
<whitequark> btw, is it possible to make OASIS install an executable into the findlib package and not globally?
<whitequark> apparently not
<Drup> this is quite new, so no
<Drup> I forgot to do a bug report about it
<whitequark> can you file it?
claudiuc has quit [Remote host closed the connection]
<Drup> yeah
nikki93 has quit [Remote host closed the connection]
<Drup> (you don't want to deal with the forge's bug tracker, do you ? :D)
<whitequark> nailed it :p
<whitequark> grmbl, why doesn't ocamlc want to highlight errors in my code?
<whitequark> thanks
<whitequark> oh! it's only for toplevel
<whitequark> I wish ocamlc printed clang-like squiggles
<Drup> just use merlin :3
nikki93 has joined #ocaml
<whitequark> <3 sublime
<whitequark> Drup: do *your* extension have good error messages? https://github.com/whitequark/ocaml-ppx_protobuf/blob/master/lib/ppx_protobuf.ml#L90-L114
<Drup> I don't need special error messages for lwt's ppx :)
<Drup> the type system is doing that for me
<whitequark> ah, I see
<Drup> (but I do need to get my locations right, it take a bit of fiddling every time)
<whitequark> I just realized it's not possible to display squiggles from a ppx extension, because it doesn't have access to lexbuf
<whitequark> and similarly, probably not possible in general after parsing, because the lexbuf is discarded (I think?)
<whitequark> it's probably possible to open the actual files, based on their filenames.
<Drup> except squiggles are useless since the compiler report precise error location and any decent editor allows to underline/color the incriminated area
<Drup> I mean, they are funny too look at, but that's not how the compiler report errors and I find the current way better
<Drup> for the error messages
<Drup> I think you're overdoing a bit, you should use the type system more
<whitequark> (not how the compiler reports errors) I mean adding this for both the ppx exts and the compiler.
<Drup> oh
<Drup> well
<whitequark> Sublime doesn't allow you to even enable 1-based indexing, and in general the configuration for gleaning the data from compiler output is horrible, I hate it
<whitequark> it's just a pain to set up
<Drup> use a decent editor then :)
<whitequark> plus it doesn't help if you're compiling from a console
<whitequark> well, that's about its only downside :p
<Drup> sounds like a huge one for me
<whitequark> it is.
<Drup> you have merlin in sublime ?
<whitequark> no, only my ocp-index thingy
<Drup> (04:18:11) Drup: use a decent editor then :)
<Drup> really.
<Drup> merlin is just too good
<whitequark> I'm fine writing the code without any type information or autocompletion at all, as I do now
<whitequark> (ocp-index depends on ocp-build depends on type-rex broken on trunk)
<Drup> merlin is also not working on trunk anyway
<whitequark> ugh. I need to invent some scheme that allows to encode variants with arguments in protobuf
<whitequark> it's a pain, especially to do in a way that is compatible with protoc
<Drup> can't you just do ints, like the compiler ?
<whitequark> I can, for enums without parameters
<whitequark> but how do I encode type e = A | B of int ?
<Drup> I don't know protobuf at all :)
<whitequark> it's very simple, you have four wire types. 32 bits, 64 bits, variable-length integer and a sub-message (a length as varint and length bytes)
<whitequark> I mean, that explains all of protobuf. it's a beautiful concept
<Drup> what is the syntax to introduce a submessage ?
<whitequark> oh, almost all. the messages are key-value pairs consisting of a varint and some other wire type. first varint indicates what field it is and what datatype follows (in the low bits)
<whitequark> a submessage? varint(field_id << 3 | 2); varint(length); length bytes
<whitequark> for a enum, it would be varint(field_id << 3 | 0); varint(value);
<whitequark> the issue is that: 1) in the parent record, you will only get one key # allocated for the enum, so, if you want to pack all the arguments, you have make a submessage;
<whitequark> 2) protoc thinks a enum is always a varint;
<whitequark> 3) protoc doesn't allow polymorphic fields (I believe) like a field which can be either a enum or a submessage
<Drup> oh
<Drup> ok
<Drup> what I had in mind what some 3)
<whitequark> I had it in mind too. perhaps it's worth saying "if you want to use protoc, don't use enums with arguments"
<whitequark> but that seems a bit too harsh
<Drup> you could just pack everytime in a message
<Drup> and don't use them as "enum" (in the sens of protoc)
<whitequark> that would require to wrap every enum into a submessage in protoc, and apart from that, add two bytes to every enum
<whitequark> ok, "two bytes" is not a very good argument, lack of compat with existing protoc protocols is
<Drup> can't you add an annotation "is enum" that would force that there is no arguments
<Drup> ?
<whitequark> it's a bit problematic to generate code for this case
<whitequark> see, say, I have this: type r = { a: int; b: enum; }
<Drup> an enum in the sens of protoc is an enum in the C meaning, right ?
<whitequark> from the point of view of the ppx_protobuf, enum is an abstract type
<whitequark> how would it know that it shouldn't expect the bytes, but rather a varint?
<whitequark> (enum in sense of protoc) yes.
<whitequark> java, python or C++ don't have proper sums :p
<Drup> then there is no argument anyway
<whitequark> hm?
<whitequark> there is an argument, I want some scheme that allows to define a sane serialization in ocaml and still use it from non-ocaml
<Drup> you can't encode "B of thingy", can't you ?
<Drup> in a theoretical world where your thing work what would be the type of that on the C side ?
<whitequark> well, I can
struktured has quit [Ping timeout: 264 seconds]
<whitequark> message Enum { enum T { A = 1; B = 2; } message A { ... } message B { ... } required T type = 1; optional A a; optional B b; }
<whitequark> message Enum { enum T { A = 1; B = 2; } message A { ... } message B { ... } required T type = 1; optional A a = 1; optional B b = 2; }, even
<whitequark> with the keys for inner messages equal to the tags
struktured has joined #ocaml
<whitequark> it does not encode the right invariant in the C/C++/Java/Python output, but that is impossible anyway
<whitequark> and the OCaml side *must* handle messages with invariant violated
<Drup> then just refuse variants with arguments
<Drup> it will be much simpler for everyone
<Drup> (or, as I said, add an annotation)
<whitequark> I certainly don't want to do that! the protocol which I plan to use ppx_protobuf on uses them
<whitequark> hm
<whitequark> see my comment about annotation above, I'm not sure how to do it
manizzle has joined #ocaml
<Drup> you could construct your parser with some sort of "combinators"
<Drup> and inline the part that need inlining at runtime.
<whitequark> although I probably could make the parser with signature val t_of_protobuf : ?state:[ `Key of int | `Begin ] -> Decoder.t -> t
<whitequark> or even `After_key | `Begin. basically, in the first case the enum deserializer will only read a single varint and refuse anything else
<whitequark> and in the second one it will perform a full message decode
lostcuaz has joined #ocaml
manizzle has quit [Client Quit]
manizzle has joined #ocaml
<whitequark> and you could say, type r = { a: enum [@bare] }
<whitequark> perhaps even use a phantom type to make this typesafe!
<Drup> I don't think you need the annotation
<whitequark> oh?
<Drup> you could do that automatically
<whitequark> how would a type t = A | B decide whether it should parse a message or a bare varint?
<whitequark> if it always parses a bare varint, you lose the ability to extend it with C of int later
<Drup> for each type, you will construct two value
<Drup> 1) something of type Bare of parsebare | VarInt of parsevarint
<Drup> 2) the actuall parser, for user usage
<Drup> then, for composition, you use only the first one
<Drup> and you pattern match, to see if you "inline" or not
<Drup> (does it make sense ? I'm not sure I got all the subtle part of proto thing yet :D)
<whitequark> somewhat, but I'm not sure I like your choice of interfaces
<Drup> Bare | Message would make more sense
<whitequark> perhaps an even simpler one would suffice
<whitequark> for type a = A | B, I generate a_from_protobuf and a_from_protobuf_bare. for type A | B of int, only the first deserializer
<Drup> you can't verify which one is present during parsing
<Drup> so it's not good for composition
<whitequark> type r = { a: a; }, tries to call a_from_protobuf. with [@bare], the a_from_protobuf_bare
<whitequark> sure, I cannot
<Drup> you still need anotation
<whitequark> but I cannot in general verify anything during parsing, becase a might as well be abstract and manually written by user
<whitequark> note that this will fail at typechecking saying there is no a_from_protobuf_bare
<whitequark> I think this is quite descriptibe
<Drup> I do think you could avoid the annotation
<whitequark> what do you not like with the 1/2 function solution?
<whitequark> I don't understand
<Drup> the fact there is an annotation
<whitequark> surely failing at compile-time is better than raising an exception at runtime?
<Drup> why would you raise an exception ?
<whitequark> because it's simply not valid to try to feed a bare varint to type a = A | B of int
<whitequark> just as it is not valid to try and parse a varint as a string
<Drup> it's equally invalid to try to feed A | B | C to A | B
<Drup> if you try to communicate on a different protocal, it's gonna fail, yes.
<Drup> protocol*
<whitequark> yes, but there is no way to catch the later at compile-time
<whitequark> there is a way to catch the former, why not use it?
<Drup> well, the former neither, you're [@bare] annotation is just modifying the protocol.
<Drup> your*
<whitequark> yes, it would force you to modify the protocol, stand back and think about what you're doing if you've just added a constructor with arguments to a previously argumentless variant
<whitequark> I think it's very good
<Drup> then add [@bare] at the declaration side, to force bareness
<Drup> it makes more sense than to add it at every call site
<whitequark> then you need to query the callee at runtime to determine if you should call them one way or another
claudiuc has joined #ocaml
<Drup> that's what I was proposing yes
<Drup> more exactly, you need to query the callee once when you are building the parser
<Drup> so it shouldn't impact performances
<whitequark> well, I don't build the parser. the parser is a single function with a single recursive match
<whitequark> I'm not sure I want to change that merely to move the annotation to callee
<whitequark> further, so far the caller declaration fully describes the protocol caller recognizes
<whitequark> with your patch it would depend on definition of callee also, I really dislike that
<whitequark> oh! another thought. currently, you can easily generate protoc definitions from caller definitions alone
<whitequark> if I use your suggestion, that wouldn't be possible, at least not syntactically.
<Drup> huum
<Drup> my way feel more natural from a parser combinator approach, at least (which is what you are doing, basically :p)
<Drup> but yeah, the protoc argument is good
<Drup> your error messages and documentation are going to be a pain to write, though.
racycl___ has joined #ocaml
<whitequark> why?
<whitequark> (parser combinator) I don't see how is this "combination". it's just a goddamn function per type, with a match loop inside. as simple as it ever gets
<Drup> well, error messages are going to refer to stuff not written by the user
<Drup> type c = { foo : a ; bar : b } is combining parser for a and b to parser c :)
<whitequark> it's an user-exposed interface, because the user may want to write custom deserializer
<Drup> parse*
<whitequark> or at least write a signature for abstract type
malo has quit [Quit: Leaving]
nikki93 has quit [Remote host closed the connection]
claudiuc_ has joined #ocaml
ygrek has joined #ocaml
nikki93 has joined #ocaml
claudiuc has quit [Ping timeout: 264 seconds]
tautologico has joined #ocaml
struktured has quit [Ping timeout: 276 seconds]
fayden has quit [Quit: Bye]
fayden has joined #ocaml
fayden has quit [Client Quit]
claudiuc_ has quit [Read error: Connection reset by peer]
claudiuc has joined #ocaml
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
divyanshu has quit [Quit: Computer has gone to sleep.]
yacks has quit [Read error: Connection reset by peer]
yacks has joined #ocaml
racycle__ has joined #ocaml
racycl___ has quit [Ping timeout: 276 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 252 seconds]
_obad_2_ has quit [Remote host closed the connection]
nikki93 has quit [Remote host closed the connection]
HoloIRCUser1 has quit [Ping timeout: 255 seconds]
divyanshu has joined #ocaml
struktured has joined #ocaml
nikki93 has joined #ocaml
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dapz has joined #ocaml
wmealing2 has quit [Quit: Leaving.]
struktured has quit [Read error: Operation timed out]
tlockney is now known as tlockney_away
struktured has joined #ocaml
axiles has joined #ocaml
nikki93 has quit [Remote host closed the connection]
Rotacidni has quit [Ping timeout: 240 seconds]
struktured has quit [Ping timeout: 240 seconds]
xenocons has quit [Quit: leaving]
nikki93 has joined #ocaml
<whitequark> how do I escape $ in oasis source?
<adrien> \$ ?
<whitequark> doesn't work
<whitequark> Failure: No variable $ defined when trying to expand "${$}(ocamlfind"..
<whitequark> although, I simply don't need it in this case
<whitequark> -ppx 'ocamlfind ppx_tools/ppx_metaquot' just works
fantasticsid has joined #ocaml
<adrien> :)
wmealing1 has joined #ocaml
Rotacidni has joined #ocaml
racycle__ has quit [Quit: ZZZzzz…]
angerman has joined #ocaml
<whitequark> whoa, metaquot is *great*
<whitequark> although it should've been transitive
siddharthv_away is now known as siddharthv
Rotacidni has quit [Ping timeout: 255 seconds]
<whitequark> metaquot is seriously awesome, let's kill camlp4 quicker
fantasti` has joined #ocaml
tlockney_away is now known as tlockney
fantasticsid has quit [Ping timeout: 252 seconds]
tlockney is now known as tlockney_away
zpe has joined #ocaml
siddharthv is now known as siddharthv_away
zpe has quit [Ping timeout: 276 seconds]
ygrek has quit [Ping timeout: 252 seconds]
wmealing1 has quit [Quit: Leaving.]
claudiuc has quit [Remote host closed the connection]
Promit has quit [Ping timeout: 264 seconds]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wwilly has joined #ocaml
wwilly has quit [Ping timeout: 264 seconds]
<samebchase> The type of add here: https://ocaml.janestreet.com/ocaml-core/111.03.00/doc/core/#Hash_set is val add : 'a t -> 'a -> unit
<samebchase> does that mean it is an imperative hash set
<samebchase> when I tried adding elements to a hash_set no new hashset was returned, and the the length remained the same
<samebchase> what's going on here?
<arj> samebchase: yes, it is imperative, not functional, i.e. the instance of 'a t is changed internally
axiles has quit [Ping timeout: 240 seconds]
<arj> This hash set is internally based on an avl tree and the internal tree is adjusted.
<samebchase> yes, but when I do a Hash_set.length it is staying the same
<arj> gimme a second
<samebchase> how do I get the Hash_set to reflect this change
<samebchase> okay
<samebchase> https://github.com/janestreet/core_kernel/blob/master/lib/hash_set.ml#L43 here is looks like a Hash_set is a Hashtbl with elements like (key_type -> () )
rgrinberg has quit [Quit: Leaving.]
<samebchase> i.e. a key type is mapped to a value type of ()
axiles has joined #ocaml
<arj> this might take a while no Core here at the moment. Can you create a pastebin with a minimal example, samebchase?
<samebchase> okay
<samebchase> I think I've got it
<samebchase> let foo_set = Hash_set.create ~hashable:String.hashable ?growth_allowed:(Some true) ?size:(Some 0) () ;;
<samebchase> that was what I needed
<samebchase> when I did ?growth_allowed:true it said it should be of type Option bool
<samebchase> is what I did okay?
<arj> why do you fiddle with these parameters?
<arj> can't you just use Hash_set.create () ?
<arj> then it works for me, I just tried.
tautologico has quit [Quit: Connection closed for inactivity]
<arj> (though I used a poly hash set, but should work with the non polymorphic, too)
<samebchase> oh
<samebchase> okay
<arj> the parameters with the questionmarks are optional parameters, only change them if you know what happens ;-)
<samebchase> yeah
<arj> well does it work now?
<samebchase> I should probably not mess with them
<samebchase> I'll try this
<samebchase> what does "let _" do?
<arj> samebchase: you know let x = 1 ?
<arj> it is basically the same, but you do not name the variable x
zpe has joined #ocaml
<arj> _ just means "I don't care about the variable name"
<samebchase> ah
<samebchase> I've used _ when I wanted to silence unused var warnings
pyx has joined #ocaml
pyx has quit [Client Quit]
<samebchase> I just /love/ how the type errors help me correct my code especially when I've changed something.
<samebchase> In Lisp, I'd have to run the code to find out if I made any type errors
<samebchase> So if an OCaml program builds fine, only programmer-logic errors might be there (Is this correct?)
wmealing1 has joined #ocaml
<samebchase> These helpful type errors given by the OCaml compiler are a welcome change to the compiler barfage I'm accustomed to when working in other langs.
<flux> they serve you best when you design the types to guide you
<flux> for example, by writing up the interface first and implementation later. or if one is partial to TDD, one could even write test cases (ie. play around a bit with the interface one is planning) to see how the potential interface solves the problem
ygrek has joined #ocaml
avsm has joined #ocaml
<samebchase> If the code's not gonna run correctly, it shouldn't build.
<flux> sadly that's impossible to guarantee on a turing-complete language
<samebchase> hm
<flux> for example, let's say you have a function that generates primes
<flux> and another function that crashes if it's not given a prime
<flux> your program only calls the second function with the return values of the first one
<flux> but the compiler cannot really understand that :), so it might reject it even if the program works. ok, this is the opposite case of what you're suggesting, but if you're going to reject all invalid programs, you are going to reject some valid ones as well.
<flux> if you want to only compile correct programs, use Coq :)
<flux> or maybe Idris
<samebchase> heh. I wanted to try that out, but Coq (from OPAM) doesn't build on Arch
<samebchase> haven't checked if they've fixed it
<flux> probably?
<flux> oh, you mean Coq isn't packaged in Arch?
<adrien_oww> from what I've seen, AUR for OCaml is at best slightly old
<samebchase> I wanted to get Coq using OPAM
clan has quit [Quit: clan]
nikki93 has quit [Remote host closed the connection]
<samebchase> hm there's a patch there
<avsm> whitequark: we should chat more on #mirage :P (cycling off to work now)
avsm has quit [Quit: Leaving.]
wmealing1 has quit [Quit: Leaving.]
<arj> samebchase: It is not correct that there are only programmer-logic errors if it builds fine. There are things the type system cannot check.
<arj> so depends on how you understand "programmer-logic"
<flux> that's probably the point
<flux> what's an example of a non-programmer logic error that compiles?
Simn has joined #ocaml
<arj> flux: hmm, that should not be possible if I am not mistaken
<arj> something that is out of reach for the type system. hmm maybe involving obj magic? but then it probably is a programmer-logic error
jo` has joined #ocaml
<whitequark> Obj.magic is a programmer-logic error regardless of whether its hides a type error :p
Kakadu has joined #ocaml
<samebchase> arj: hm.
<samebchase> by programmer logic errors I mean things like reversing a list instead of sorting it
fantasti` has quit [Remote host closed the connection]
fantasti` has joined #ocaml
nikki93 has joined #ocaml
<whitequark> flux: Coq, heh
<whitequark> ocaml-msgpack uses Coq for... some weird reason, I dunno what is it so critical in msgpack, honestly
<whitequark> it represents bytes as 8-tuples of booleans, which is absurd for a supposedly fast serialization library
jonludlam has joined #ocaml
<flux> :)
<flux> probably easier to prove/extract from coq?-)
<flux> whitequark, actually I understand Coq-extracted code can use Obj.magic at times
<flux> simply because OCaml type system isn't as expressive
<flux> but Coq probably knows what it's doing, unlike a human ;)
<whitequark> sure, Coq can use Obj.magic
rand000 has joined #ocaml
<whitequark> (easier to prove/extract) but useless
<flux> "To err is human. To truly fuck up, yuo need a computer."
<whitequark> I fail to understand what is it so complex in representing bytes as chars
<flux> maybe it's the array that's the 'problem'
<whitequark> it's neither naming nor cache invalidation. should be trivial
<flux> maybe the author isn't so deeply interested in performance
<flux> or perhaps he benchmarked it and you didn't ;-)
<whitequark> array, I would guess so--inductive reasoning no strings is harder
<whitequark> on*
nikki93 has quit [Ping timeout: 265 seconds]
<flux> (s/benchmarked/profiled/)
<whitequark> doesn't look so
<AeroNotix> does Coq not have native byte arrays?
<whitequark> I mean, why allocate nine times if you can do zero
manizzle has quit [Ping timeout: 252 seconds]
<samebchase> Thanks for all the help, everyone
<samebchase> Also managed to level up my OCaml skills. Very educational.
<whitequark> looks nice, although using both batteries and core is weird
<samebchase> yeah
<whitequark> but otherwise, quite idiomatic code, I like it
<samebchase> I think I should clean that up
<samebchase> and learn how to properly use "open"
<samebchase> whitequark: thanks. :-)
<flux> samebchase, btw, your code would work fine without the ;;'s. though you can keep them as well, they can help in better localizing the compile errors ;).
<flux> actually no, there's load_nodes_into_graph that would need its trailing ; to be removed
<samebchase> tbh: I /still/ don't know what ";;" and ";" are ;-)
<flux> ;; are separators for phrases
<flux> phrases are EITHER an expression OR a sequence of top-level statements
<samebchase> okay
<samebchase> and a ";" is a separator of statements?
<flux> let (;) a b = b ;-)
<flux> it's a separator of expressions
<flux> though it has other uses as well, such as inside records
<whitequark> flux: that wouldn't actually work even if it was valid syntax
<whitequark> because order of evaluation
<samebchase> and list elem separators
<samebchase> hm
AltGr has joined #ocaml
<flux> whitequark, why not, assuming that the implementation evaluated left-to-right?
<whitequark> exactly, assuming it evaluates left-to-right. ocamlc and ocamlopt have different order of evaluation.
<flux> (which it may choose to not do, and does)
<whitequark> the order is undefined in ocaml as per, ahem, spec
jonludlam has quit [Remote host closed the connection]
<flux> well, it's only undefinable by user like the &&-operator is
<whitequark> yes, could make it like that
ikaros has joined #ocaml
rand000 has quit [Read error: Operation timed out]
jo` has quit [Ping timeout: 252 seconds]
<whitequark> what is the difference between matching { a; } and { a; _ } ?
<whitequark> parsetree seems to suggest there is some, but I'm not aware of it
<adrien_oww> there's a warning that maybe the second form inhibits
Thooms has joined #ocaml
<adrien_oww> 9 Missing fields in a record pattern.
<whitequark> oh?
<whitequark> I see.
<adrien_oww> _maybe_ that
jonludlam has joined #ocaml
freling has quit [Read error: Connection reset by peer]
freling has joined #ocaml
eizo has joined #ocaml
Snark has quit [Ping timeout: 252 seconds]
ollehar has joined #ocaml
zpe has quit [Remote host closed the connection]
wwilly has joined #ocaml
marr has joined #ocaml
rks` has quit [Quit: leaving]
ontologiae has joined #ocaml
rks` has joined #ocaml
nikki93 has joined #ocaml
waneck has quit [Remote host closed the connection]
nikki93 has quit [Ping timeout: 264 seconds]
<jpdeplaix> whitequark: should I also initialize the disassemblers ?
<jpdeplaix> I don't know what would be the best solution
<whitequark> jpdeplaix: there's no binding for the disassemblers, so nope
<whitequark> no way to invoke them
<jpdeplaix> I don't know if ASMParser is mandatory in this case :/
dsheets has quit [Ping timeout: 255 seconds]
<whitequark> ASMParser is needed for inline assembly afaik
<jpdeplaix> ok. Then is it fine as is ?
axiles has quit [Ping timeout: 264 seconds]
<whitequark> I would move all initialization into one llvm_initialize_all() external.
<whitequark> (since it doesn't make sense to call them separately anyway)
jao has quit [Ping timeout: 252 seconds]
<whitequark> also, I would call the module Llvm_all_backends
<whitequark> and the package all_backends as well
axiles has joined #ocaml
dsheets has joined #ocaml
thomasga has joined #ocaml
Nuki has joined #ocaml
avsm has joined #ocaml
_andre has joined #ocaml
wwilly has quit [Ping timeout: 255 seconds]
ggole has joined #ocaml
manizzle has joined #ocaml
Bynbo7 is now known as Axman6
<jpdeplaix> whitequark: all_backends is a little bit redundant I think :/
<whitequark> it must be clear that you're linking in every single backend that is configured
<whitequark> because that results in potentially undesirable things like explosion of space and time for the final executable
<jpdeplaix> ok then
<Drup> adrien told me to ask, and since I'm lazy, I ask here before asking to the ml : Are pthreads available in every plateform supported in ocaml ?
<avsm> no, e.g. js_of_ocaml
maattdd__ has quit [Read error: Connection reset by peer]
<Drup> hum, exceptionnally, I don't care about js_of_ocaml :D
maattdd__ has joined #ocaml
<Drup> I don't think we're ever going to run ocsigenserver on js_of_ocaml.
<avsm> or mirage, also no threads
<adrien> Drup: not exactly the question actually
<avsm> it's hard to answer your question without knowing why you care about pthreads, though
<Drup> adrien : is it ?
<Drup> avsm: Lwt_preemptive
<adrien> was also whether support for platforms without threads should be dropped (when thinking about old OSes)
<avsm> the answer is 'no', in that the Thread module in bytecode can use bytecode threads
<adrien> was thinking about old platforms
<adrien> then if there are platform-specific things, well, it's platform-specific
<Drup> but mirage is a good enough reason
<whitequark> hmm, why no threads on mirage?
<whitequark> a context switching library is not exactly hard to implement
<Drup> avsm: there is a "Fake preemptive" stuff in ocsigenserver and I was wondering if this was really needed
<avsm> whitequark: unnecessary complexity. parallelism is via separate VMs, and each core is cooperative threaded
<avsm> and portability, e.g. to javascript (c.f. andy ray's iocamljs)
<jpdeplaix> note also that llvm.all_backends doesn't depend on llvm (see the META)
<whitequark> why?
<jpdeplaix> because it doesn't need it
<whitequark> >linkopts = "-ccopt -lstdc++"
<whitequark> it does, at least for this flag
Thooms has quit [Quit: WeeChat 0.3.8]
maattdd__ has quit [Ping timeout: 240 seconds]
<jpdeplaix> whitequark: ok. Can you do it ? I have to go now and I will *maybe* not available for a week
<whitequark> I'll take a look
nikki93 has joined #ocaml
<adrien_oww> jpdeplaix: you french slacker ='(
aqz has joined #ocaml
<companion_cube> :>
<adrien_oww> I just found out I have 4 national holidays in 5 weeks
nikki93 has quit [Ping timeout: 276 seconds]
ygrek has quit [Ping timeout: 240 seconds]
maattdd__ has joined #ocaml
johnf has joined #ocaml
<arj> adrien_oww: where do you live? :)
<arj> france?
<adrien_oww> of course
<adrien_oww> noone else had that many national holidays
Nuki has quit [Ping timeout: 252 seconds]
<nicoo> has*
maattdd__ has quit [Ping timeout: 252 seconds]
<companion_cube> that's because we're efficient!
<companion_cube> ;)
<companion_cube> and now let's get to work
maattdd__ has joined #ocaml
<adrien_oww> nicoo: I blame the false taco
<adrien_oww> companion_cube: doge2048.com
<nicoo> adrien_oww: False taco ? o_O
<adrien> nicoo: kebab-taco
<nicoo> o_O
zpe has joined #ocaml
<companion_cube> adrien_oww: chut
<ggole> ?
divyanshu has quit [Quit: Computer has gone to sleep.]
<adrien> nice and friendly abuse of power :P
divyanshu has joined #ocaml
Nuki has joined #ocaml
maattdd__ has quit [Ping timeout: 264 seconds]
<smiler> lol
struktured has joined #ocaml
thomasga has quit [Quit: Leaving.]
<adrien_oww> I want to be bribed (with beers)
angerman has quit [Quit: Gone]
maattdd__ has joined #ocaml
thomasga has joined #ocaml
eizo has quit [Ping timeout: 240 seconds]
thomasga has quit [Client Quit]
divyanshu has quit [Ping timeout: 264 seconds]
fantasti` has quit [Ping timeout: 264 seconds]
avsm has quit [Quit: Leaving.]
struktured has quit [Ping timeout: 252 seconds]
NoNNaN has joined #ocaml
amirmc has joined #ocaml
darkf has quit [Quit: Leaving]
<nicoo> adrien: So evil :D
<adrien_oww> s/evil/thirsty/
nlucaroni has joined #ocaml
ygrek has joined #ocaml
ollehar1 has joined #ocaml
<nicoo> adrien_oww: I was referring to the +quiet
<adrien> as I said: beer :P
divyanshu has joined #ocaml
divyanshu has quit [Read error: Connection reset by peer]
<companion_cube> \o/
<companion_cube> no beer for evil adrien_oww
<companion_cube> I don't negociate with terrorists
<nicoo> adrien: You can quiet C³ again :D
struktured has joined #ocaml
<companion_cube> heeeeeelp
<adrien_oww> nicoo: only if you buy me a beer :)
<nicoo> adrien_oww: Sure, I can bring beer tomorrow :D
divyanshu has joined #ocaml
<companion_cube> :D
<companion_cube> that's like a parallel economy, be careful
<nicoo> Exchanging favours and bribes is the world's oldest parallel economy ;)
<nicoo> Also, adrien should already have quieted you down.
divyanshu has quit [Read error: Connection reset by peer]
<companion_cube> hmm you exchange favours with adrien_oww ? I don't want to know the details
ollehar1 has quit [Ping timeout: 276 seconds]
<adrien_oww> he sleeps at my place :>
avsm has joined #ocaml
divyanshu has joined #ocaml
Rotacidni has joined #ocaml
dsheets has quit [Ping timeout: 264 seconds]
divyanshu has quit [Read error: Connection reset by peer]
<companion_cube> you coquinou
thomasga has joined #ocaml
reynir has quit [Read error: Operation timed out]
reynir has joined #ocaml
<nicoo> I slept*
<nicoo> Past tense, dear.
studybot_ has joined #ocaml
thomasga1 has joined #ocaml
divyanshu has joined #ocaml
<companion_cube> nicoo: don't be so cruel
thomasga has quit [Ping timeout: 265 seconds]
studybo__ has joined #ocaml
<nicoo> companion_cube: Why am I cruel?
olauzon has joined #ocaml
studybot_ has quit [Ping timeout: 255 seconds]
shinnya has quit [Ping timeout: 240 seconds]
divyanshu has quit [Read error: Connection reset by peer]
yacks has quit [Read error: Connection reset by peer]
lostcuaz has joined #ocaml
lostcuaz has quit [Client Quit]
divyanshu has joined #ocaml
fantasti` has joined #ocaml
lostcuaz has joined #ocaml
angerman has joined #ocaml
yacks has joined #ocaml
michael_lee has joined #ocaml
<ygrek> OMG TEH DRAMA
<nicoo> :D
nikki93 has joined #ocaml
<companion_cube> such drama
<companion_cube> I've been silenced because adrien_oww is afraid
divyanshu has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
divyanshu has joined #ocaml
<nicoo> companion_cube: What is adrien supposed to be afraid of?
* nicoo talks like the Doctor. The Emacs Doctor :D
olauzon has quit [Ping timeout: 252 seconds]
divyanshu has quit [Read error: Connection reset by peer]
nikki93 has quit [Remote host closed the connection]
olauzon has joined #ocaml
angerman has quit [Quit: Gone]
michael_lee has quit [Remote host closed the connection]
divyanshu has joined #ocaml
divyanshu has quit [Read error: Connection reset by peer]
tlockney_away is now known as tlockney
divyanshu has joined #ocaml
nikki93 has joined #ocaml
michael_lee has joined #ocaml
divyanshu has quit [Read error: Connection reset by peer]
amirmc has quit [Quit: Leaving.]
amirmc has joined #ocaml
nikki93 has quit [Remote host closed the connection]
divyanshu has joined #ocaml
thomasga1 has quit [Quit: Leaving.]
divyanshu has quit [Read error: Connection reset by peer]
dsheets has joined #ocaml
divyanshu has joined #ocaml
tautologico has joined #ocaml
zpe has quit [Remote host closed the connection]
divyanshu has quit [Read error: Connection reset by peer]
maattdd__ has quit [Ping timeout: 252 seconds]
ollehar has quit [Ping timeout: 252 seconds]
divyanshu has joined #ocaml
acrob has joined #ocaml
<acrob> Hello
divyanshu has quit [Read error: Connection reset by peer]
<ggole> o/
nikki93 has joined #ocaml
<acrob> I need some help : I am trying to compile some ocaml code but I have this error : /usr/lib/ocaml/labltk/liblabltk.a(cltkCaml.o): In function `CamlCBCmd': (.text+0x44): undefined reference to `Tcl_SetResult'
<acrob> However I installed :
<acrob> sudo apt-get install liblablgl-ocaml-dev and tk-dev and tcl-dev ...
<acrob> compiling work but not linking
Hannibal_Smith has joined #ocaml
<acrob> I have tclConfig.sh in /usr/lib/x86_64-linux-gnu/tcl8.5
fantasti` has quit [Ping timeout: 240 seconds]
<tautologico> which ocaml version? I believe the tcl bindings were removed from the standard distribution recently
<acrob> The Objective Caml toplevel, version 3.12.1
<acrob> ubuntu 13.10
<tautologico> so the problem is when compiling your code?
amirmc1 has joined #ocaml
<tautologico> how are you compiling?
divyanshu has joined #ocaml
<acrob> pourtant : quand apt-cache show : Depends: libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | xlibmesa-glu-dev | libglu-dev, tk8.5-dev, libxmu-dev, freeglut3-dev, liblablgl-ocaml-9ms32, ocaml-3.12.1, ocaml-nox-3.12.1
<acrob> I am compiling with a Makefile and ocamlopt.opt and INCLUDES = -I +labltk
epitouille has joined #ocaml
<epitouille> Hi
<tautologico> maybe using ocamlfind is easier
<epitouille> I'm come from C/C++ to ocaml, and for now, is a pain for me
<acrob> ocamlopt.opt -I +labltk -c files.ml works but during linking the final progr there is an error
<tautologico> yes
<epitouille> It's why, I have some questions for you
<tautologico> do you have findlib installed?
amirmc has quit [Ping timeout: 252 seconds]
<acrob> nop
<acrob> I am installing it now
<epitouille> I'm trying to declare a type with a "list of 'a" and 2 int
<tautologico> I think you have to reference the labltk files when calling the compiler, -I only makes the compiler search in the directory but does not automatically include files when compiling/linking
<acrob> sorry : libfindlib-ocaml was already installed
<Drup> epitouille: constructors names start with a capital letter
<bernardofpc> adrien_ow> noone else had that many national holidays -> you can count on Brazil, we had 4 holidays in 2 weeks
<tautologico> acrob: try ocamlfind ocamlopt -linkpkg -package labltk files.ml
<tautologico> -linkpkg is for linking so if you're using -c to compile files separately you don't need it
<epitouille> type case = | Y of int | X of int | Doors of int Array;;
<Drup> int array*
<epitouille> and ocaml just told me "Syntax error", nothing else
<epitouille> ok, now, ocaml don't find mli interface
<Drup> epitouille: well, it should give you a location :)
<epitouille> Drup, yes, but I have to create a mli for each ml ?
<Drup> you don't have to, no
<Drup> how are you compiling your code ?
<tautologico> if you don't create a .mli the compiler will infer an interface for your .ml
<epitouille> I'm compiling
ontologiae has quit [Ping timeout: 276 seconds]
<epitouille> and how I can include other file (which contain type) into an other file ?
<tautologico> Brazil doesn't even show up in a list of 10 countries with most public holidays, though we like to think we're the country in the world with most holidays :)
<acrob> I used also the lib "xml-light" : ocamlopt.opt -I AG -I +xml-light -I +labltk -c files.ml --> how I transform this with ocamlopt -linkpkg -package ? ocamlopt -I AG -linkpkg -package labltk -I xml-light files.ml
<acrob> Sorry I am "new" with ocaml ...
<epitouille> When I use interpreter, I'm used to use "#use" directive
<epitouille> put doesn't work with the compiler
<Drup> no, it doesn't
<tautologico> acrob: you just list the packages you're using after -package
<tautologico> acrob: so -package labltk, xml-light
<Drup> epitouille: how are you compiling your code ?
<epitouille> Drup, ocamlopt -c "mli_file"
<epitouille> and ocamlopt "ml_files"
<epitouille> ok, I include files :)
<Drup> clean up everything and use "ocamlbuild main.native"
<epitouille> but now, it's unbound constructor for door
<Drup> with "main" being your main file
<epitouille> type door = | Door of (point * point);;
<epitouille> with door like
<dinosaure> oh amazing :)
<epitouille> and point like type point = | Point of (int * int);;
<dinosaure> epitouille: epitech ?
<epitouille> dinosaure, yes
<dinosaure> I'm koala :p
amirmc1 has quit [Read error: Connection reset by peer]
amirmc has joined #ocaml
<epitouille> dinosaure, :) Je deviens fou avec ce langage
<Drup> epitouille: come to #ocaml-fr please :)
<dinosaure> epitouille: go to #ocaml-fr for help in fr ;)
<acrob> I tried : ocamlopt -linkpkg -package "labltk xml-light" -I AG files.ml but it didn't find one of my module ...
<acrob> or ocamlfind ocamlopt -linkpkg -package "labltk xml-light AG" files.ml ocamlfind: Package `AG' not found
racycle has joined #ocaml
<acrob> AG is a folder ... with a makefile
<tautologico> AG is not a package
maattdd__ has joined #ocaml
<tautologico> -package is for findlib packages only
<acrob> For compiling, I do : ocamlopt.opt -g -I AG -I +xml-light -I +labltk -c files.mli
<tautologico> if files.ml depends on AG you have to pass the .cmo or AG.ml to the compiler
<acrob> then ocamlopt.opt -I AG -I +xml-light -I +labltk -c files.ml
<acrob> ok
<acrob> it progresses (I hope) : ocamlfind ocamlopt -linkpkg -package "labltk xml-light" -I AG files.ml AG/cmo.a
<acrob> Error: No implementations provided for the following modules: Str referenced from files.cmx
<acrob> ..
<tautologico> add package str
<tautologico> -package labltk,xml-light,str
dapz has joined #ocaml
<companion_cube> str: sadness
<bernardofpc> tautologico: where are you in Brazil ?
<tautologico> acrob: you can have a look at oasis as a way to simplify your build
<tautologico> bernardofpc: nordeste
<bernardofpc> university ?
<tautologico> bernardofpc: UFPB
thomasga has joined #ocaml
<bernardofpc> nice
<bernardofpc> teaching ?
<acrob> I should do a simple example without all my dependencies ...
<tautologico> bernardofpc: yes
<bernardofpc> I'm at UFRJ, but on Math dept
claudiuc has joined #ocaml
claudiuc has quit [Remote host closed the connection]
<bernardofpc> but I was contaminated by OCaml during a period of my life in France :p
<Drup> typical. :D
<companion_cube> :D
<tautologico> bernardofpc: cool :)
* companion_cube trolled with bernardofpc a lot
divyanshu has quit [Read error: Connection reset by peer]
avsm has quit [Quit: Leaving.]
thomasga has quit [Ping timeout: 240 seconds]
<acrob> it is the same error as my app
<tautologico> I have to go now, be back soon
<acrob> Can someone compile this code (http://cristal.inria.fr/caml_examples/oc/camltk/start.ml) on ubuntu 13.10 ?
<acrob> I installed sudo apt-get install liblablgl-ocaml-dev + tk-dev + tcl--dev but I have this error :
divyanshu has joined #ocaml
<Kakadu> acrob: are you using opam?
IbnFirnas has quit [Read error: Connection reset by peer]
studybo__ has quit [Read error: Connection reset by peer]
IbnFirnas has joined #ocaml
alinab has quit [Quit: leaving]
ollehar has joined #ocaml
<acrob> no
epitouille has quit [Quit: Leaving]
<acrob> Is someone on ubuntu 13.10 ?
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<acrob> I come back in 30 min and I hope to find a solution
divyanshu has quit [Read error: Connection reset by peer]
acrob has quit [Quit: Page closed]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nikki93 has quit [Write error: Broken pipe]
lostcuaz has joined #ocaml
avsm has joined #ocaml
lostcuaz_ has joined #ocaml
divyanshu has joined #ocaml
lostcuaz has quit [Ping timeout: 276 seconds]
manizzle has quit [Ping timeout: 252 seconds]
malo has joined #ocaml
divyanshu has quit [Read error: Connection reset by peer]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
tane has joined #ocaml
divyanshu has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
michael_lee has quit [Quit: Ex-Chat]
divyanshu has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
thomasga has joined #ocaml
Kakadu has quit [Quit: Page closed]
AltGr has left #ocaml []
divyanshu has joined #ocaml
divyanshu has quit [Read error: Connection reset by peer]
rgrinberg has quit [Quit: Leaving.]
avsm has quit [Quit: Leaving.]
Nuki has quit [Remote host closed the connection]
acrob has joined #ocaml
rgrinberg has joined #ocaml
divyanshu has joined #ocaml
jwatzman|work has joined #ocaml
dsheets has quit [Ping timeout: 265 seconds]
dapz has joined #ocaml
avsm has joined #ocaml
thomasga has quit [Ping timeout: 252 seconds]
avsm has quit [Ping timeout: 265 seconds]
divyanshu has quit [Read error: Connection reset by peer]
thomasga has joined #ocaml
<acrob> Hello I am back with my problem : I install ocaml, ocaml-native-compilers, tcl8.5-dev, tk8.5-dev. I want to compile a simple test file (http://cristal.inria.fr/caml_examples/oc/camltk/start.ml)
<acrob> ocamlfind ocamlopt -linkpkg -package labltk start.ml
<acrob> I am under ubuntu 13.10
<tautologico> have you tried compiling with ocamlc?
<acrob> Do I need to add some path to the library to make work the linking operation ?
<mrvn> time to update to 14.4
<tautologico> I think you need to reference the tk libs during linking
<tautologico> 14.4 has opam at least
<acrob> yes I should use 14.4 (but some project I am working on have old dependency ...)
divyanshu has joined #ocaml
<acrob> it is working with ocamlc !!!!!!!!!!!!!!!!!!!!!!
<acrob> ocamlfind ocamlc -linkpkg -package labltk start.ml
<acrob> but not with ocamlopt ...
<acrob> and my project use this compiler but there should be a solution
<acrob> path problem with ocamlopt no ?
<tautologico> I don't know... standard packages for ocaml in ubuntu are sometimes broken
<tautologico> or they used to at least
<acrob> :(
<tautologico> you can download and install opam directly
<tautologico> it's not hard
avsm has joined #ocaml
<acrob> ok I will try this tool
dsheets has joined #ocaml
<Drup> isn't avsm's ppa compatible with this old ubuntu ?
<tautologico> acrob: http://opam.ocaml.org/
<tautologico> install the compilers from opam, it's probably better than relying on the ubuntu packages
divyanshu has quit [Read error: Connection reset by peer]
<acrob> it like pip for python good :)
eizo has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
divyanshu has joined #ocaml
rgrinberg has joined #ocaml
manizzle has joined #ocaml
Snark has joined #ocaml
<acrob> using opam, I installed
<acrob> light-xml
<acrob> opam install xml-light
<acrob> But during compilation I get now
<acrob> ocamldep -I AG -I +xml-light -I +labltk *.mli *.ml > .depend
<acrob> Bad -I option: /usr/lib/ocaml/xml-light: No such file or directory
<acrob> It install lib locally ?
<acrob> I need to do sudo opam install ?
<tautologico> no
<tautologico> do you still have the ubuntu packages installed?
<acrob> However I get : make install -C src BINDIR=/home/.../.opam/system/bin INSTALLDIR=/home/.../.opam/system/lib/lablgl DLLDIR=/home/.../.opam/system/lib/stublibs
<Drup> acrob: do "opam switch 4.01.0"
<Drup> wait a bit
<Drup> then do "eval .." that opam tell you
<Drup> then you will be good to go.
divyanshu has quit [Read error: Connection reset by peer]
<acrob> opam switch 4.01.0 takes a long time ...
<Drup> sure
<Drup> you're compiling the compiler.
claudiuc has joined #ocaml
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<acrob> cool it worked !
Kakadu has joined #ocaml
<acrob> not I have a new error : Error: Unbound module XmlParser but maybe it is due to the code
<acrob> I am investigatingt
<Drup> well
<Drup> did you reinstalled all the relevant stuff ?
manizzle has quit [Remote host closed the connection]
manizzle has joined #ocaml
NoNNaN has quit [Ping timeout: 272 seconds]
<acrob> yes I reinstall xml-light
<Drup> and you didn't forge to execute the "eval ..." in all your shells ?
<acrob> It find xml-light for compilation but not XmlParser ... strange
<Drup> forget*
<acrob> Bad -I option: /home/.../.opam/4.01.0/lib/ocaml/xml-light: No such file or directory
divyanshu has joined #ocaml
<Drup> then xml-light is not properly installed
<acrob> [NOTE] Package xml-light is already installed (current version is 2.4).
<tautologico> because you have to install xml-light for the new compiler
<tautologico> hm
<Drup> acrob: remove all your system wide ubuntu packages
<acrob> sometime I have the previous message but sometimes Error: Unbound module XmlParser
<Drup> because you have PATH issues
<acrob> remove all your system wide ubuntu packages ==> how ?
<acrob> I remove all ocaml stuff ?
<Drup> yes
<acrob> ok
<Drup> except opam, ofc
<tautologico> apt-get remove
<acrob> I did it
WraithM has quit [Ping timeout: 276 seconds]
<acrob> but I still get a strange behaviour :
<acrob> make clean
<acrob> make
<acrob> ocamldep -I AG -I +xml-light -I +labltk *.mli *.ml > .depend
<acrob> Bad -I option: /home/.../.opam/4.01.0/lib/ocaml/xml-light: No such file or directory
<acrob> make
jonludlam has quit [Ping timeout: 255 seconds]
wwilly has joined #ocaml
<acrob> Error: Unbound module XmlParser
<acrob> make: *** [....cmx] Error 2
dapz has joined #ocaml
NoNNaN has joined #ocaml
<Drup> you sure you installed xml-light in the new switch ? :p
<acrob> when I write : opam list -a I get xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml (underline)
maattdd__ has quit [Ping timeout: 276 seconds]
<acrob> so I think it is ok
divyanshu has quit [Read error: Connection reset by peer]
jonludlam has joined #ocaml
<Drup> in the same shell you runned this command, "ocamlfind query xml-light"
<wwilly> heip
<acrob> I get /home/.../.opam/4.01.0/lib/xml-light
<Drup> huum
<Drup> oh right
<acrob> and I have some stuff in this folder : dtd.cmi dtd.mli xml.cmi xml-light.a xml-light.cmxa xml.mli xmlParser.cmx
<acrob> dtd.cmx META xml.cmx xml-light.cma xml-light.cmxs xmlParser.cmi xmlParser.mli
<acrob> The problem is maybe the Makefile ...
<Drup> yes.
<Drup> do you have a good reason to use a makefile ?
<acrob> I have to understand and extent an existing project
<Drup> ok
<acrob> and it was like that ...
<Drup> but yes, the issue is the makefile
<acrob> but I could try a better method if it is "quiet easy"
<Drup> can you show the project ?
<acrob> no :(
<Drup> not surprising :)
<Drup> is your project pure ocaml ?
<acrob> yes
<acrob> if you have a better solution than a Makefile I could try
<Drup> use ocamlbuild
<acrob> and then show to the creators of this project
divyanshu has joined #ocaml
<Drup> acrob: clean up the temporary file
<Drup> are you trying to build an executable ?
<acrob> yes
<tautologico> you can try oasis, as I said, and it even generates a Makefile if you want (though the only thing the makefile does is call a setup program)
<Drup> tautologico: one step at a time :p
<Drup> acrob: then, just do "ocamlbuild -use-ocamlfind -package xml-light foo.native"
<Drup> with "foo", the main file
<Drup> you can add more packages, of course
ygrek has quit [Ping timeout: 264 seconds]
<acrob> how can I add a "subfolder" to source
<Drup> -I
<Drup> but if it's a subdirectory, it shouldn't be needed
<acrob> yes but in the subdirectory there is another compile module
<acrob> and it builds a lib ...
<Drup> ocamlbuild should be everything
<Drup> build*
<acrob> When I build the main, I get Error: Unbound module MYMODULE
<acrob> and MYMODULE is in a subfolder
<acrob> it should work
<acrob> ocamlbuild -use-ocamlfind -package "xml-light labltk MYLIB" mymain.native
<acrob> and MYLIB is build in the subfolder (with previously a Makefile)
<Drup> no, one -package for eahc package
<Drup> and MYLIB is not a package
<acrob> ok I get it
<acrob> it gets better :)=
<acrob> Compilation unsuccessful after building 87 targets (28 cached) in 00:00:01. :)
<acrob> Error: No implementations provided for the following modules: some files with .cmx extension
<acrob> sory
<acrob> it is just a error with Str : No implementations provided for the following modules:
<acrob> Str referenced from ...
<acrob> I just need to add this package
<Drup> yes
<Drup> (it's "str")
<acrob> No implementations provided for the following modules:
<acrob> Unix referenced from blablab
<acrob> Compilation unsuccessful after building 87 targets (0 cached) in 00:00:01.
<acrob> there is unix package ?
<Drup> yes
<acrob> Finished, 87 targets (0 cached) in 00:00:02.
<acrob> I love you !!!!!!!!!!!!!!!!!!!!!!!
<acrob> thanks a lot
<Drup> x)
<acrob> it is more easier with ocambuild
<tautologico> -package works using commas
<acrob> I don't know why they use Makefile ...
<tautologico> xml-light,labltk,unix,str should work
<Drup> then you can look up either ocamlbuild documentation or oasis
claudiuc has quit [Read error: No route to host]
<acrob> I will ask the creator of the project why they didn't use ocamlbuild
claudiuc has joined #ocaml
<acrob> I am suprised because they seems to "master" ocaml ...
Hannibal_Smith has quit [Quit: Sto andando via]
thomasga has quit [Quit: Leaving.]
<tautologico> not that long ago you had to jump through a few hoops to use ocamlbuild with findlib
<acrob> When I installed, I neeed to do : apt-get install ocaml opam
<acrob> after that I removed ocaml ?
<acrob> or apt-get install ocaml opam -> then switcht -< then remove ocaml ?
<Drup> there is a ppa for ubuntu with a precompiled opam
<Drup> and some more recent version of ocaml
ygrek has joined #ocaml
amirmc has quit [Quit: Leaving.]
<Drup> in general, you can perfectly install on a non-opam setup
<Drup> (opam is just more convenient for developing)
<acrob> yes so normally (as a developper) I just need to install opam
<acrob> not ocaml
<acrob> because opam include last version of ocaml
<acrob> ?
divyanshu has quit [Ping timeout: 252 seconds]
<tautologico> opam can install ocaml for you
<tautologico> but many packaging systems have opam depend on ocaml... so you can just install ocaml and opam and then just use opam to manage the compiler (using switch)
<acrob> thank you very much for you help
amirmc has joined #ocaml
maattdd__ has joined #ocaml
<acrob> I hope I will enjoy working with ocaml (I am a bit scared by the syntax but I have some basix with haskell)
<tautologico> it's fun, syntax is something you get used to pretty quickly
<acrob> Can you make you advertise for ocaml ?
divyanshu has joined #ocaml
<acrob> I am more used to program with python
<tautologico> but somehow that's what people talk about the most when discussing languages (bikeshedding principle or Wadler's law)
ontologiae has joined #ocaml
<acrob> What is the good practice to understand a "quiet big" ocaml code ?
<acrob> look at the mli file ?
<companion_cube> probably yes
<acrob> I will also try to use ocambuild or oasis to comment the code
<acrob> (after I understand it) because there no comment on the code ...
<acrob> it works but ...
<companion_cube> aww
tianon has quit [Ping timeout: 252 seconds]
tianon has joined #ocaml
thomasga has joined #ocaml
yacks has quit [Quit: Leaving]
mister_m has quit [Ping timeout: 240 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
<Drup> acrob: how big is it ?
<acrob> around 20 ml files but 3 of them contains more than 1500lines ...
<acrob> I don't think everything is useful but to read and understand what it means ...
<acrob> but I can speak to the creator :)
<acrob> but it is quiet fun to play with a working app :)
ygrek has quit [Ping timeout: 252 seconds]
<acrob> and I could learn some cool stuff with ocaml and see its power and weeakness :)
<Drup> that's not too big
<Drup> I mean, it's still accessible :p
<Drup> (maybe less with the fact that there is no comments ..)
<companion_cube> what is the codebase, if you can tell us,
<companion_cube> ?
<acrob> codebase ?
<acrob> the subject ?
<companion_cube> well I mean the app
<companion_cube> yes
<acrob> optimisation algorithm - planning - genetic algo ...
Snark has quit [Ping timeout: 240 seconds]
<acrob> I need to go. Thank you for your help.
<acrob> I will surely be there the next weeks :)
<acrob> and discover more ocaml tips
acrob has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
brendan has quit [Remote host closed the connection]
<companion_cube> hmm, sounds nice
amirmc has quit [Quit: Leaving.]
jonludlam has quit [Ping timeout: 255 seconds]
divyanshu has quit [Read error: Connection reset by peer]
jao` has joined #ocaml
jao` has quit [Changing host]
jao` has joined #ocaml
brendan has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
divyanshu has joined #ocaml
nikki93 has joined #ocaml
thomasga has quit [Quit: Leaving.]
mister_m has joined #ocaml
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thomasga has joined #ocaml
jonludlam has joined #ocaml
ollehar1 has joined #ocaml
rgrinberg has joined #ocaml
dapz has joined #ocaml
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
WraithM has joined #ocaml
martintrojer has quit [Read error: Connection reset by peer]
dapz has joined #ocaml
dapz has quit [Client Quit]
tane has quit [Quit: Verlassend]
dapz has joined #ocaml
divyanshu has quit [Read error: Connection reset by peer]
eizo has quit [Ping timeout: 240 seconds]
divyanshu has joined #ocaml
divyanshu has quit [Client Quit]
martintrojer has joined #ocaml
dsheets has quit [Ping timeout: 240 seconds]
WraithM has quit [Ping timeout: 255 seconds]
Thooms has joined #ocaml
lostcuaz_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<_obad_> so what's the workflow for fixing an opam package?
NoNNaN has quit [Remote host closed the connection]
<tautologico> the code or the packaging?
<_obad_> the code
<_obad_> I need to fix oasis
<tautologico> usually: find it on github, fork it, create a pull request
NoNNaN has joined #ocaml
<_obad_> so I don't use opam during the fixing phase?
<tautologico> you can create a setup using opam
<_obad_> that's what I'm asking
<_obad_> how does that work??
clan has joined #ocaml
_andre has quit [Quit: leaving]
<_obad_> oh wait... discover.ml is actually part of lwt not oasis
<_obad_> I thought it was a generated file
rgrinberg has quit [Quit: Leaving.]
<Drup> _obad_: you can pin a package locally to test it
<Drup> opam pin the_package /path/to/my/version
<Drup> this way, you can test by trying to rebuild stuff with your version
<_obad_> drup: thanks!! exactly what I was looking for
<_obad_> BTW do you know if debian has a similar feature? or is everyone suffering through patch lists?
<Drup> don't know debian architecture and don't want to :)
<_obad_> what are you a gentoo fanboy?
<Drup> no
<_obad_> just kidding ;)
WraithM has joined #ocaml
<tautologico> the Stoy book on denotational semantics is back on sale, I didn't know it
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jonludlam has quit [Remote host closed the connection]
dapz has joined #ocaml
milosn_ has quit [Quit: Lost terminal]
milosn has joined #ocaml
clan has quit [Quit: clan]
martintrojer has quit [Remote host closed the connection]
martintrojer has joined #ocaml
martintrojer has quit [Remote host closed the connection]
WraithM has quit [Ping timeout: 265 seconds]
clan has joined #ocaml
<jpdeplaix> adrien_oww: no, I'm not in vacation
tlockney is now known as tlockney_away
martintrojer has joined #ocaml
<jpdeplaix> adrien*
tlockney_away is now known as tlockney
igitoor has quit [Ping timeout: 240 seconds]
<jpdeplaix> I've to do some slides for tomorrow :(
<adrien> hah
<adrien> good luck
axiles has quit [Remote host closed the connection]
igitoor has joined #ocaml
Submarine has quit [Remote host closed the connection]
wwilly has quit [Quit: Leaving]
<companion_cube> wow, "robust" replacement for S3
<companion_cube> that's not a modest goal :)
igitoor has quit [Changing host]
igitoor has joined #ocaml
_2can has quit [Ping timeout: 240 seconds]
_2can has joined #ocaml
ggole has quit [Ping timeout: 276 seconds]
Simn has quit [Quit: Leaving]
marr has quit []
<_obad_> are pull requests on the git clone of the ocaml repo monitored?
<companion_cube> yes they are, for one year
<companion_cube> (you mean the ocaml repository on github,right?
<companion_cube> )
<_obad_> companion cube: yes I meant the one on github. "for one year"?
<companion_cube> it's kind of an experiment gasche started, to see whether it would bring more contributions
<_obad_> so I shouldn't be shy about creating pull requests
<companion_cube> also, PRs are currently directly available on opam ;)
<companion_cube> no, go on
rgrinberg has joined #ocaml
<Drup> companion_cube: I wasn't looking at mantis before, so I don't know if it's actually successful. It feels more visible to me, but I'm biased. did you heard anything from gasche about that ?
<companion_cube> no
<companion_cube> but it looks quite successful to me
<Drup> you might be biased too :p
<companion_cube> yes
<_obad_> hmm the pull request thing seems to work pretty well.. it takes 2-4 weeks for a merge apparently.
olauzon has quit [Quit: olauzon]
<companion_cube> depends on how heavy the PR is
divyanshu has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
Anarchos has joined #ocaml
arquebus has joined #ocaml
divyanshu has quit [Ping timeout: 265 seconds]
divyanshu has joined #ocaml
divyanshu has quit [Read error: Connection reset by peer]
<tautologico> it's much more visible and accessible on github
<tautologico> far easier to contribute... I hope they keep the mirror at least
<_obad_> not sure if github can replace a whole project tracker
<tautologico> I'm talking about the repo
claudiuc has quit [Remote host closed the connection]
<tautologico> not the issues
nlucaroni has quit [Quit: leaving]
<_obad_> well shouldn't they switch to git already? took them long enough to switch to subversion
<_obad_> once you switch to git, using github comes naturally.
<_obad_> it's just another remote.
divyanshu has joined #ocaml
maattdd__ has quit [Ping timeout: 252 seconds]
divyanshu has quit [Ping timeout: 240 seconds]
ikaros has quit [Quit: Ex-Chat]
WraithM has joined #ocaml
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tizoc` has joined #ocaml
divyanshu has joined #ocaml
tizoc has quit [Ping timeout: 258 seconds]
ggherdov has quit [Ping timeout: 258 seconds]
Thooms has quit [Ping timeout: 276 seconds]
WraithM has quit [Ping timeout: 276 seconds]
teiresias has quit [Ping timeout: 258 seconds]
teiresias has joined #ocaml
dapz has joined #ocaml
dapz has quit [Client Quit]
tizoc` is now known as tizoc
arquebus has quit [Quit: Konversation terminated!]
dapz has joined #ocaml
tizoc has quit [Changing host]
tizoc has joined #ocaml
ggherdov_ has joined #ocaml
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
thomasga has quit [Client Quit]
divyanshu has quit [Ping timeout: 240 seconds]
maattdd__ has joined #ocaml
<rgrinberg> is there a way to declare another module's signature in an mli? im thinking something like module type Q = module type of XXX
<rgrinberg> but I get a syntax error :/
skchrko has quit [Ping timeout: 265 seconds]
divyanshu has joined #ocaml
q66 has joined #ocaml
q66 has quit [Changing host]
q66 has joined #ocaml
maattdd__ has quit [Ping timeout: 255 seconds]
nikki93 has quit [Remote host closed the connection]
maattdd__ has joined #ocaml
divyanshu has quit [Ping timeout: 240 seconds]
<avsm> brackets around (module type of xx)
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jwatzman|work has quit [Quit: jwatzman|work]
jao` has quit [Ping timeout: 240 seconds]
<rgrinberg> avsm: thanks!
maattdd__ has quit [Ping timeout: 264 seconds]
<rgrinberg> avsm: speaking of cohttp, wouldn't it be better not to pack Cohttp_lwt manually?
ollehar has quit [Ping timeout: 276 seconds]
<rgrinberg> actually nvm, all those modules are functors
<avsm> yeah
Rotacidni has quit [Ping timeout: 240 seconds]
skchrko has joined #ocaml
WraithM has joined #ocaml
thomasga has joined #ocaml
WraithM has quit [Ping timeout: 264 seconds]
WraithM has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
avsm has quit [Quit: Leaving.]
q66 has quit [Ping timeout: 252 seconds]
maattdd__ has joined #ocaml
madroach has quit [Ping timeout: 252 seconds]
madroach has joined #ocaml
maattdd__ has quit [Ping timeout: 240 seconds]
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
thomasga has quit [Quit: Leaving.]
pyx has joined #ocaml
tlockney is now known as tlockney_away
racycle has quit [Quit: ZZZzzz…]
darkf has joined #ocaml