ChanServ 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 | Logs at http://irclog.whitequark.org/ocaml
eikke_ has quit [Ping timeout: 240 seconds]
rand000 has quit [Quit: leaving]
eikke_ has joined #ocaml
dapz has joined #ocaml
penglingbo has joined #ocaml
penglingbo has quit [Ping timeout: 240 seconds]
hhugo has quit [Quit: Leaving.]
zarul has quit [Read error: Connection reset by peer]
zarul has joined #ocaml
zarul has quit [Changing host]
zarul has joined #ocaml
hhugo has joined #ocaml
eikke_ has quit [Ping timeout: 255 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
eikke_ has joined #ocaml
hhugo has quit [Ping timeout: 240 seconds]
racycle has quit [Quit: ZZZzzz…]
oriba has quit [Quit: Verlassend]
alpounet has joined #ocaml
alpounet has quit [Ping timeout: 245 seconds]
thomasga has joined #ocaml
q66 has quit [Quit: Leaving]
hhugo has joined #ocaml
araujo has joined #ocaml
araujo has joined #ocaml
ygrek has joined #ocaml
<aggelos_> hmm, forkwork seems to exhibit some very weird behavior
<aggelos_> the heap blows up in some of the worker processes, /before any of my computation takes place/
thomasga has quit [Quit: Leaving.]
<aggelos_> that's according to one debug statement, which I'm fairly sure is not delayed due to buffering
<aggelos_> yet when I add debugging statements at every program point up to that original statement, allocation behavior changes: now the workers don't all start with the same heap_words, instead I observe that heap_words remains steady throughout their lifetime
<aggelos_> (this is through Gc.alert)
<aggelos_> sorta stumped here, any ideas?
<aggelos_> (I have verified the correlation of the debug statements to the change in allocations by going back and forth)
eikke_ has quit [Ping timeout: 240 seconds]
<aggelos_> heap_words blowup seems exponential btw
araujo has quit [Quit: Leaving]
ontologiae has quit [Ping timeout: 245 seconds]
Eyyub has quit [Ping timeout: 240 seconds]
rgrinberg has quit [Quit: Leaving.]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jknick has quit [Quit: Lost terminal]
ygrek has quit [Ping timeout: 255 seconds]
ebzzry_ is now known as ebzzry
manizzle has quit [Ping timeout: 272 seconds]
penglingbo has joined #ocaml
hhugo has quit [Quit: Leaving.]
ygrek has joined #ocaml
studybot_ has joined #ocaml
shinnya has quit [Ping timeout: 255 seconds]
rgrinberg has joined #ocaml
hhugo has joined #ocaml
hhugo has quit [Client Quit]
hhugo has joined #ocaml
ousado has quit [Remote host closed the connection]
WraithM has quit [Quit: leaving]
philtor_ has joined #ocaml
alpounet has joined #ocaml
parcs has quit [Remote host closed the connection]
alpounet has quit [Ping timeout: 255 seconds]
philtor_ has quit [Ping timeout: 272 seconds]
parcs has joined #ocaml
racycle has joined #ocaml
hhugo has quit [Quit: Leaving.]
manizzle has joined #ocaml
divyanshu has joined #ocaml
racycle has quit [Quit: ZZZzzz…]
samebchase has quit [Ping timeout: 240 seconds]
xaimus has quit [Ping timeout: 276 seconds]
xaimus has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
samebchase has joined #ocaml
rgrinberg1 has joined #ocaml
rgrinberg has quit [Ping timeout: 244 seconds]
rgrinberg1 has quit [Quit: Leaving.]
dapz has joined #ocaml
dapz has quit [Client Quit]
dapz has joined #ocaml
divyanshu has joined #ocaml
boogie has joined #ocaml
rgrinberg has joined #ocaml
claudiuc_ has quit [Remote host closed the connection]
ggole has joined #ocaml
racycle has joined #ocaml
WraithM has joined #ocaml
racycle has quit [Quit: ZZZzzz…]
ddosia has quit [Remote host closed the connection]
boogie has quit [Remote host closed the connection]
WraithM has quit [Ping timeout: 272 seconds]
ygrek_ has joined #ocaml
ygrek_ has quit [Remote host closed the connection]
ygrek has quit [Remote host closed the connection]
ygrek_ has joined #ocaml
f[x] has joined #ocaml
ygrek_ has quit [Ping timeout: 244 seconds]
rgrinberg has quit [Quit: Leaving.]
Hannibal_Smith has joined #ocaml
jao has quit [Ping timeout: 245 seconds]
rgrinberg has joined #ocaml
f[x] has quit [Remote host closed the connection]
rgrinberg has quit [Client Quit]
ygrek has joined #ocaml
ygrek has quit [Remote host closed the connection]
Arsenik has joined #ocaml
WraithM has joined #ocaml
rgrinberg has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
weykent has quit [Ping timeout: 240 seconds]
Arsenik has quit [Remote host closed the connection]
weykent has joined #ocaml
NoNNaN has joined #ocaml
pyon has quit [Read error: Connection reset by peer]
BitPuffin has joined #ocaml
parcs has quit [Read error: Connection reset by peer]
octachron has joined #ocaml
Averell has quit [Ping timeout: 245 seconds]
ddosia has joined #ocaml
manizzle has quit [Ping timeout: 245 seconds]
Simn has joined #ocaml
manizzle has joined #ocaml
parcs has joined #ocaml
manizzle has quit [Remote host closed the connection]
manizzle has joined #ocaml
ygrek has joined #ocaml
ygrek has quit [Remote host closed the connection]
axiles has joined #ocaml
pyx has joined #ocaml
alpounet has joined #ocaml
dapz has quit [Read error: No route to host]
manizzle has quit [Ping timeout: 255 seconds]
rgrinberg has quit [Quit: Leaving.]
eikke_ has joined #ocaml
Averell has joined #ocaml
Hannibal_Smith has quit [Ping timeout: 264 seconds]
dapz has joined #ocaml
ygrek has joined #ocaml
<BitPuffin> wat
<BitPuffin> you wouldn't expect a functional language like ocaml to have better oop than oop languages but it does
<companion_cube> that's the 'O' in 'OCaml'
<companion_cube> :D
<BitPuffin> yeah I know :D
yacks has quit [Ping timeout: 245 seconds]
<BitPuffin> but I'm still surprised how good it is
<BitPuffin> I expected the standard stuff
<companion_cube> ahah :D
<companion_cube> it's pretty much the opposite of most other OO systems
<BitPuffin> well it's pretty much the good of other OO systems, without the crap, and with more goodies
<BitPuffin> like, no narrowing: good!
<BitPuffin> and then the object types eliminate the need for interfages
<BitPuffin> ces
<BitPuffin> and makes things a lot more flexible
<BitPuffin> basically I think it might remove the OO "wall"
<companion_cube> it's quite complicated though
<BitPuffin> indeed
<BitPuffin> caught me by surprise, I was expecting just reading the syntax and being familiar with what it will say
<BitPuffin> but nope
<companion_cube> do you know inheritance doesn't imply subtyping? ;)
<BitPuffin> yeah I think so
<BitPuffin> doesn't it only become subtyping once you use :> ?
<companion_cube> no, it's not always true, because of self-types
sagotch has joined #ocaml
<BitPuffin> oh wait no :> just causes information loss or whatever, it's a one way street
<BitPuffin> well what do you mean by not being subtyping?
rgrinberg has joined #ocaml
<BitPuffin> oh I think I know what you mean, I just got to that part
<BitPuffin> if I define a method that takes self type, it isn't compatible with a parent method that takes itself as a type
AltGr has joined #ocaml
<companion_cube> yes
ddosia has quit [Quit: Leaving.]
ddosia has joined #ocaml
<BitPuffin> would be nice if it was possible to do static dispatch
<BitPuffin> that said if you don't need dynamic dispatch maybe you aren't using objects anyway
<mrvn> In c++ you can have both
<BitPuffin> eah I know
<def`> … but it's unsound
<companion_cube> indeed, in OCaml objects are primarily for dynamic dispatch
<def`> it might be conceptually pleasing but it's plain wrong to conflate inheritance and subtyping
<companion_cube> is it unsound if you only have nominal subtyping?
<BitPuffin> method on_click ?start ?stop f =
<BitPuffin> on_click ?start ?stop
<BitPuffin> (fun ev ->
<BitPuffin> ...
<BitPuffin> does it call itself?
<mrvn> BitPuffin: aren't you missing a self# or super#?
<BitPuffin> mrvn: excerpt from real world ocaml
<BitPuffin> so I don't understand why it repeats
<ggole> It's a function call, not a method call
<ggole> Function calls look like f a b zonk
<ggole> Method calls look like obj#f b zonk
<BitPuffin> yeah I know it's not a method call, I'm just confused where the function comes from
<BitPuffin> perhaps the library
<ggole> Probably from the opened module
<ggole> (This is why you should use module F = Foo instead of open.)
<BitPuffin> indeed
<BitPuffin> either that or Foo(...)
<mrvn> I hate open
<BitPuffin> or was the syntax Foo{...} ?
<ggole> Foo.(...) and Foo.{...}
<ggole> You need the .
<BitPuffin> what you can use either of them?
<ggole> Otherwise it's a constructor application
<ggole> The second is introduced in the latest OCaml iirc
<BitPuffin> ah
<BitPuffin> is there a difference?
<ggole> It's basically short for Foo.({ module_specific_record = ...})
<ggole> Yes, the second is for records only
<BitPuffin> so you'd do Foo.{record = {foo: 3}} ?
<companion_cube> \o/
<ggole> Yes
<BitPuffin> ah
<BitPuffin> weird
<BitPuffin> :P
<BitPuffin> but I guess it makes sense
<mrvn> That makes no sense
<ggole> It's a bit nicer than { Foo.field1 = ...; field2 = ...; }
<mrvn> Foo.{foo = 3} would make sense
<BitPuffin> mrvn: if foo is a ref in module Foo maybe, and if you used <-
<mrvn> BitPuffin: no, foo is a label
<BitPuffin> a label?
<mrvn> short for Foo.({foo = 3})
<BitPuffin> yeah but that doesn't make sense
<BitPuffin> wouldn't it have to be Foo.t.({foo = 3})
<mrvn> What is Foo.{record = {foo: 3}} supposed to do?
<BitPuffin> mrvn: record is a record in module Foo, and that would assign it, although records aren't mutable
<BitPuffin> so I dunno
<mrvn> a value or a type?
<mrvn> and why would that need Foo.{} instead of Foo.()?
<BitPuffin> well that's what I am wondering
<BitPuffin> how does Foo.{bla = 4} know which record in Foo to set
<BitPuffin> inference?
<mrvn> BitPuffin: same way that {bla=4} does
<mrvn> it looks up the lable bla in the current "namespace"
<BitPuffin> but what's a label
<mrvn> BitPuffin: a field of a record
<BitPuffin> ah
<BitPuffin> thought so maybe
<BitPuffin> so it finds a record thot consists of the label bla and creates a record value with 4 and returns it?
<mrvn> BitPuffin: yes. The Foo. only temporarily opens the module
<BitPuffin> yeah
<BitPuffin> well alright
<mrvn> Only way it makes sense
<BitPuffin> yeah
<BitPuffin> it kinda does now
<mrvn> Module.<single expression> or Module.(<expr> <expr> <expr>)
<BitPuffin> oh didn't know about M.<..>
<mrvn> BitPuffin: never used M.foo?
<BitPuffin> I have
<ggole> BitPuffin: <...> is "meta syntax", not concrete syntax
<ggole> Ie, it stands for M.foo, M.Foo, etc
<BitPuffin> what advantage is there with M.<foo a b> over M.foo a b though
<ggole> That isn't valid syntax.
<BitPuffin> well I guess mabye it's better than (M.foo a b)
<mrvn> BitPuffin: there is no such thing as M.<foo a b>
<mrvn> 10:42 < ggole> BitPuffin: <...> is "meta syntax", not concrete syntax
<BitPuffin> I read that
rgrinberg has quit [Quit: Leaving.]
<BitPuffin> could you type an example usage of M.<...>
<ggole> ...
<ggole> There is no OCaml syntax M.<...>
<ggole> mrvn was using <...> to stand in for the set of actual expressions that can be there.
<BitPuffin> oh
<BitPuffin> lol
<BitPuffin> hahaha
<ggole> \o/
<BitPuffin> well of course
<mrvn> Although, if Module.'{' <record fields> '}' works then Module.'<' <object definition> '>' should also work.
<mrvn> '<' <object definition> '>' being the <single expression> in this case
<BitPuffin> mrvn: yeah I was thinking M.<....> would be weird syntax unless it had to do with objects
<ggole> Eh? <> isn't used for object defintions?
<BitPuffin> it's used for object tyes
<ggole> The module qualifications go on the "inside", though
<ggole> Like they do in , say, 'a Foo.t
toto__ has joined #ocaml
<mrvn> ggole: If M.{...} is a shortcut for M.({...}) then M.<...> should be a shortcut for M.(<...>)
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mrvn> IN what version was M.{} added anyway? Doesn't work on my 4.01
<BitPuffin> what wolud M.(<...>) mean?
<mrvn> BitPuffin: same as <...> but with M opened.
<BitPuffin> well what would <..._ mean
<BitPuffin> I mean <...>
<mrvn> BitPuffin: So you don't have to use M.t all the time inside the <>
<BitPuffin> and this works?
<mrvn> Can't say. M.{} doesn't even work here
<BitPuffin> well I mean
<BitPuffin> opem Foo;; <...> works?
<mrvn> BitPuffin: for the right value of ...
<BitPuffin> so you put method definitions inside <...> ?
<mrvn> the type
<BitPuffin> well you don't need to open a module to write the type
Kakadu has joined #ocaml
<mrvn> let f (x : < foo : M.t; bar : M.t; baz : M.t >) = x
<BitPuffin> and you want let f (x: M.< foo : t; bar : t; baz : t >) = x?
<BitPuffin> kinda makes sense I guess
jludlam has joined #ocaml
<BitPuffin> wouldn't it be better if the inherit keyword was include? since it isn't subtyping, and it works just like include
<BitPuffin> I guess mabye they live in differente namespaces?
<def`> … but inheritance isn't subtyping :D
<BitPuffin> no but it's what you generally think in other languages? :P
<def`> Not at all!
<BitPuffin> name one language that normal people use where inheritance != subtying :)
<def`> I prefer when it's the typechecker that reminds me that inheritance isn't subtyping rather thann the debugger
<def`> Java? C# ? C++ ? …
<BitPuffin> well it's subtying in those no?
<def`> Not in a logical sense.
Kakadu has quit [Ping timeout: 246 seconds]
<BitPuffin> well I mean a method that takes B that inherits from A can't take A
<BitPuffin> if thta's what you mean
<NoNNaN> late binding semantics could be difficult: http://public.enst-bretagne.fr/~beugnard/papiers/lb-sem.shtml
<NoNNaN> really difficult: "We observe the various interpretations of overriding and overloading in object oriented languages. With the description of an intend, represented as the following UML diagram, we have "naively" implemented in 15 different languages the same piece of code... and obtenained 11 different results."
<Drup> those icons
<Drup> regardless of the content, the geocity like "NEW" icons strike me the most x)
<def`> :DD
Kakadu has joined #ocaml
arj has joined #ocaml
<ggole> mrvn: is M.(<...>) actually a valid expression?
<BitPuffin> maybe it should be
<def`> ggole: what would this mean?
<def`> M.{< >} is valid in 4.02
adrien_o1w is now known as adrien_oww
<def`> M.( M.[ M.[| M.{ M.{< … it's getting scary :P
<def`> BitPuffin: https://courses.cs.washington.edu/courses/cse331/12au/lectures/10-subtyping.pdf slide 3 "ava subtypes that are not true subtypes are
<Drup> def`: in this case, it's not crazy, it's consistent
<def`> confusing
<def`> and
<def`> dangerous "
<Drup> "works for all delimiters"
<def`> Drup: yeah, I mean, all syntactic "hacks" for delimiters are getting scary, not this :)
<Drup> oh yes
<Drup> I have on my todo list "first class literals", to unify all those delimiters x)
* Drup like syntactic stuffs
<BitPuffin> ocaml has a lot of syntax
<Drup> yeah
<BitPuffin> it's probably the most daunting thing about it
* def` give a Perl6 book to Drup
<Drup> well, the issue is not that it has a lot of syntax
<BitPuffin> it's worth learning though
<BitPuffin> and fun
<Drup> the issue is that it grew quite organically
<Drup> so there are lot's of inconsistencies and corner cases
<BitPuffin> I think the issue is that it refuses to break backwards compatibility
<BitPuffin> like the compare "pattern" silly to return an int when there is variant types
oriba has joined #ocaml
<BitPuffin> maybe we need to do a python 2 -> 3 period :P
<Drup> I would say the issue is the early mistake. being backward compatible is not a bad thing a tall
<Drup> and no, python 3 is an epic fail
<BitPuffin> being backwards compatible forces you to keep ugly things
<def`> or… a revised syntax!!! tadada
<BitPuffin> it's better than 2
<BitPuffin> def`: same thing :P
<Drup> there is a revised syntax for ocaml
<Drup> well, the revised syntax is crap anyway, so bad example
<BitPuffin> haha
<BitPuffin> well I just mean that you should clean up the stuff where the answer to the question "why is it like that? It's weird." is "historical reasons"
<Drup> but you can't really clean this kind of things
<BitPuffin> why not?
<Drup> just an exemple
<def`> Drup: the mutable string issue might be cleanup properly
<Drup> (:=) is the only function operator starting with a ":"
rgrinberg has joined #ocaml
<Drup> it's hardcoded like that
<Drup> most other operators are fairly general
<BitPuffin> Drup: and you can't clean that u because
<Drup> should we remove it because it doesn't make sens, but loose the possibility to have a relatively intuitive operator for ref assignment ?
<Drup> (and break backward compat)
<def`> Drup: it's easy to redefine it in the local scope of a module
<BitPuffin> so you can't create an operator that contains :?
<Drup> def`: you still need the possibility for it to be an operator.
<Drup> that's the hardcoded part, the fact that ":=" is a valid operator
<Drup> BitPuffin: nope
<BitPuffin> well can't you fix that part?
<Drup> that start with*
<BitPuffin> it makes it harder to parse I guess
<BitPuffin> because type annotation
<BitPuffin> but it should be possible to separate no?
<def`> Drup: that's a different issue, because you would like :.* names to be reserved for value constructors
<Drup> def`: I picked the examples just because I stumble upon it during the night, you can find lot's of other stuff
<def`> Drup: yes, a few specific case have been hardcoded, but with some work can be generalized
<def`> afk
<Drup> almost generalized :p
<octachron> The organic multiplication of the different type of parenthesis lexems is also a little ...unwieldy at times
pyx has quit [Quit: WeeChat 0.4.3]
<Drup> don't forget [@ ], [@@ ], [@@@ ], [% ], [%% ]
ggole has quit [Read error: Connection reset by peer]
BitPuffin has quit [Ping timeout: 240 seconds]
oriba has quit [Quit: oriba]
hhugo has joined #ocaml
dsheets has joined #ocaml
lordkryss has joined #ocaml
<octachron> If I am not mistaken, I count 12 different lexems for left parenthesis variation ( and the "(*)" ... thing ) . I don't like to count to integer that big.
avsm has joined #ocaml
ggole has joined #ocaml
hhugo has quit [Quit: Leaving.]
thomasga has joined #ocaml
ontologiae has joined #ocaml
dapz has joined #ocaml
hhugo has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
_andre has joined #ocaml
hhugo has quit [Quit: Leaving.]
cdidd_ has quit [Ping timeout: 255 seconds]
remyzorg has joined #ocaml
avsm has quit [Quit: Leaving.]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
penglingbo has quit [Ping timeout: 240 seconds]
dapz has joined #ocaml
dapz has quit [Client Quit]
hcarty has joined #ocaml
penglingbo has joined #ocaml
<hcarty> I'm using Ctypes and need to pass a char ** value. So something along the lines of (ptr string -> returning void).
<hcarty> The C function being called expects the last value in the 'string array' to be NULL
<hcarty> How would I do this with Ctypes? Do I need to drop the use of ptr string and use ptr void with manual casts?
<hcarty> I effectively need a way of saying the equivalent of: CArray.set carray (n - 1) null
ebzzry has quit [Remote host closed the connection]
penglingbo has quit [Ping timeout: 272 seconds]
sagotch has quit [Remote host closed the connection]
<Drup> doesn't ctypes handle this automatically already ?
hhugo has joined #ocaml
penglingbo has joined #ocaml
BitPuffin has joined #ocaml
penglingbo has quit [Ping timeout: 255 seconds]
avsm has joined #ocaml
penglingbo has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
divyanshu has joined #ocaml
avsm has quit [Quit: Leaving.]
divyanshu has quit [Quit: Computer has gone to sleep.]
remyzorg has quit [Quit: WeeChat 0.4.3]
<hcarty> Drup: I don't think so, unless Ctypes initializes the array elements to NULL
divyanshu has joined #ocaml
<hcarty> Drup: Given a list of N strings, I need an N+1 element array to pass to the C library
<Armael> just use null and coerce it to ptr string
<hcarty> Armael: Indeed, but how?
<hcarty> Armael: CArray.set requires a string argument for the value being set
<Armael> Ctypes.coerce ?
<Armael> oh i see
<Armael> maybe string is coercible from/to ptr char_t
penglingbo has quit [Ping timeout: 245 seconds]
<Armael> (something like that)
segmond has quit [Ping timeout: 255 seconds]
<hcarty> Armael: Thanks - I'll try: CArray.set ca (n - 1) (coerce void string ())
<hcarty> Not sure if that's the right approach... but it may work.
<hcarty> Or... make the array a string_opt array
<hcarty> That seems more promising
<hcarty> And it fixes the segfault!
<hcarty> Armael: Thank you for your suggestions
<mrvn> is string_opt a string | NULL or string option?
<hcarty> mrvn: None maps to null, Some s maps to the string s
<mrvn> hcarty: then that is what you should use
ygrek has quit [Ping timeout: 255 seconds]
<mrvn> pretty sure its physical
<mrvn> ups
hhugo has quit [Quit: Leaving.]
<hcarty> mrvn: Yes, that's what fixed it for me
<hcarty> I'd used it before but initially didn't think to use it here.
<Armael> hcarty: just check that coerce doesn't raise an exception at runtime
<companion_cube> o/
ousado has joined #ocaml
<hcarty> companion_cube: Hello
<mrvn> let coerce _ = raise YouAreAnIdiotToBreakTypeSafety
<companion_cube> hi hcarty
<Armael> well it's C so pff
<Armael> :D
<hcarty> Armael: I went with string_opt as the array element type to avoid extra super type unsafety
<Armael> ok, nice
<Armael> :D
<mrvn> is there a null_t type? struct { char *args[n]; null_t null; }
<Armael> bleh
<hcarty> Ctypes gives a wonderful feeling of type safety right up until the segfaults start. Though I suppose That really could apply to C in general.
<hcarty> To be clear, I really like Ctypes
<mrvn> like every binding it depends on correct information by the user
parcs has quit [Read error: Connection reset by peer]
parcs has joined #ocaml
parcs has quit [Client Quit]
<hcarty> mrvn: Yep. And Ctypes makes it very easy to experiment on the fly which is wonderful.
ebzzry has joined #ocaml
<hcarty> It makes ocaml/utop/ocaml-top into easy C API exploration tools.
parcs has joined #ocaml
<mrvn> does Ctypes have a way to make custom blocks with finalizer?
cago has joined #ocaml
<hcarty> mrvn: I don't think so in 0.3.0. The included finalization support uses Gc.finalise.
<hcarty> mrvn: It may support something with its code generation backend. I've only used the libffi-based interface so far.
<mrvn> I guess you could make the struct yourself and call the ocaml GC C interface directly.
darkf has quit [Quit: Leaving]
Nahra has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
araujo has joined #ocaml
jludlam has quit [Ping timeout: 264 seconds]
avsm has joined #ocaml
penglingbo has joined #ocaml
jludlam has joined #ocaml
hhugo has joined #ocaml
bjorkintosh has quit [Ping timeout: 240 seconds]
divyanshu has joined #ocaml
sagotch has joined #ocaml
penglingbo has quit [Quit: Leaving]
ontologiae has quit [Ping timeout: 264 seconds]
chris2 has quit [Ping timeout: 272 seconds]
cago has quit [Remote host closed the connection]
slash^ has joined #ocaml
hhugo has quit [Quit: Leaving.]
Hannibal_Smith has joined #ocaml
avsm has quit [Quit: Leaving.]
tane has joined #ocaml
ontologiae has joined #ocaml
avsm has joined #ocaml
ontologiae has quit [Ping timeout: 272 seconds]
Nahra has quit [Remote host closed the connection]
avsm has quit [Quit: Leaving.]
shinnya has joined #ocaml
ontologiae has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
nlucaroni has joined #ocaml
shinnya has joined #ocaml
Averell has quit [Remote host closed the connection]
chris2 has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
shinnya has joined #ocaml
divyanshu has quit [Ping timeout: 240 seconds]
SethTisue has joined #ocaml
sagotch has quit [Remote host closed the connection]
divyanshu has joined #ocaml
nlucaroni has quit [Quit: leaving]
yacks has joined #ocaml
philtor_ has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
avsm has joined #ocaml
Eyyub has joined #ocaml
philtor_ has quit [Ping timeout: 255 seconds]
racycle has joined #ocaml
shinnya has quit [Ping timeout: 245 seconds]
ontologiae has quit [Ping timeout: 245 seconds]
ygrek has joined #ocaml
toto__ has quit [Read error: Connection reset by peer]
boogie has joined #ocaml
Arsenik has joined #ocaml
ontologiae has joined #ocaml
lordkryss has quit [Ping timeout: 255 seconds]
dsheets has quit [Ping timeout: 244 seconds]
octachron has quit [Quit: Page closed]
jwatzman|work has joined #ocaml
jwatzman|work has quit [Client Quit]
jwatzman|work has joined #ocaml
rgrinberg has joined #ocaml
avsm has quit [Quit: Leaving.]
philtor_ has joined #ocaml
dsheets has joined #ocaml
studybot_ has quit [Remote host closed the connection]
studybot_ has joined #ocaml
avsm has joined #ocaml
jludlam has quit [Remote host closed the connection]
SethTisue has quit [Ping timeout: 244 seconds]
SethTisue has joined #ocaml
lordkryss has joined #ocaml
manizzle has joined #ocaml
__JokerDoom has joined #ocaml
avsm has quit [Quit: Leaving.]
_JokerDoom has quit [Ping timeout: 264 seconds]
AltGr has left #ocaml [#ocaml]
q66 has joined #ocaml
philtor_ has quit [Ping timeout: 240 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
paddymahoney has joined #ocaml
alpounet has quit [Remote host closed the connection]
manizzle has quit [Ping timeout: 264 seconds]
divyanshu has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
philtor_ has joined #ocaml
eikke_ has quit [Ping timeout: 240 seconds]
Averell has joined #ocaml
ygrek has joined #ocaml
Averell is now known as Averell
Kakadu has quit [Quit: Page closed]
philtor_ has quit [Ping timeout: 264 seconds]
Nahra has joined #ocaml
avsm has joined #ocaml
yomimono has joined #ocaml
thomasga has quit [Quit: Leaving.]
bjorkintosh has joined #ocaml
alpounet has joined #ocaml
thomasga has joined #ocaml
Sim_n has joined #ocaml
Simn has quit [Ping timeout: 240 seconds]
dsheets has quit [Ping timeout: 240 seconds]
rgrinberg has quit [Quit: Leaving.]
pyx has joined #ocaml
thomasga has quit [Quit: Leaving.]
manizzle has joined #ocaml
Kakadu has joined #ocaml
rgrinberg has joined #ocaml
avsm has quit [Quit: Leaving.]
ygrek has quit [Ping timeout: 244 seconds]
<whitequark> huh, neat
<Drup> whitequark: https://github.com/Drup/ocaml/tree/infixconstructor I implemented yesterday x)
<whitequark> neat! will it get merged?
<whitequark> also, will you review my lwt ppx thingies? :]
SethTisue has quit [Quit: SethTisue]
<NoNNaN> it looks like llvm 3.4.2 ocaml binding is buggy, or I forget something: dllllvm_executionengine.so: undefined symbol: llvm_alloc_data_layout
<Drup> whitequark: I did a pre-review. Will do a more in depth review when I have my internship report out of the way (or when I'm too annoyed by latex)
<whitequark> Drup: I see. thanks!
<whitequark> NoNNaN: do the functions in Llvm module work?
<Drup> whitequark: on the "will it get merged ?" .... I have no idea.
<whitequark> if yes, it's indeed a bug. I didn't really work with executionengine all that closely, since I never needed it.
<Drup> I just hacked it out of "hell, why not"
<Drup> (it works perfectly fine and the patch set is trivial)
cdidd has joined #ocaml
<def`> whitequark: if you can't be physically present, just be there, discuss on IRC and all'll be fine :)
<Drup> (that's what I plan to do :D)
<Drup> hum, just looked at yallop's version
<Drup> mine is cleaner =°
manizzle has quit [Remote host closed the connection]
manizzle has joined #ocaml
alpounet has quit [Read error: Connection reset by peer]
alpounet has joined #ocaml
claudiuc has joined #ocaml
metasyntax has quit [Quit: Leaving]
claudiuc has quit [Remote host closed the connection]
claudiuc has joined #ocaml
avsm has joined #ocaml
seanmcl has joined #ocaml
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
seanmcl has joined #ocaml
mort___ has joined #ocaml
dapz has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
_andre has quit [Quit: leaving]
<chris2> companion_cube: i converted the code to plain maps and it takes a third of the time now. yay :)
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mreca has joined #ocaml
mreca has quit [Quit: Textual IRC Client: www.textualapp.com]
yomimono has quit [Ping timeout: 240 seconds]
rgrinberg has joined #ocaml
mort___ has quit [Quit: Leaving.]
seanmcl has joined #ocaml
divyanshu has quit [Quit: Textual IRC Client: www.textualapp.com]
philtor_ has joined #ocaml
WraithM has quit [Quit: Lost terminal]
WraithM has joined #ocaml
ggole has quit []
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<baz_> hi, got a ocamlopt related question
<baz_> i'm building a project that makes use of piqi and therefore requires easy-format
<baz_> however, ocamlopt (3.12.1) calls gcc with -leasy_format
<baz_> how does it deduce that it has to use -leasy_format
<baz_> since this is actually wrong
axiles has quit [Remote host closed the connection]
<baz_> it errors out with /usr/bin/ld: cannot find -leasy_format
<baz_> running ocamlopt in verbose mode outputs the gcc command
<baz_> running this exact command without leasy_format actually builds the project
<baz_> both ocaml 3.12.1 and the packages are installed with opam
<Drup> can you provide a bit more information on the build system ?
<baz_> I'm using ocp-build
<baz_> which calls ocamlopt for a native build
<Drup> link to the build script ?
<baz_> can't provide that atm
seanmcl has joined #ocaml
<Drup> it's going to be hard to debug without looking exactly at how you're using the build system :)
<baz_> well, I just wondered if anyone could give a hint on how ocamlopt.opt decides on the fact that gcc needs todo an -leasy_format
<baz_> since it doesn't do it for all my libraries
<baz_> and ocp-build doesn't special case the library
<baz_> that is
seanmcl has quit [Client Quit]
ontologiae has quit [Ping timeout: 255 seconds]
<baz_> it calls ocamlopt with -I<path to easy_format> and easy_format.cmxa
<baz_> like all the other libraries
<baz_> such as piqi, batteries, etc
<Drup> when you build ocaml with C files as a library, ocaml encapsulate everything (including C flags) in an ocaml object
<Drup> and ocamlopt will use this flags at link time
<baz_> ah k, that is interesting
<baz_> so I have to look at how easy_format is build
<Drup> probably, yes
<baz_> k many thanks :)
<Drup> (I didn't knew piqi, it's interesting)
thomasga has joined #ocaml
seanmcl has joined #ocaml
seanmcl has quit [Client Quit]
alpounet has quit [Remote host closed the connection]
<baz_> definitely interesting, not using it directly though
<baz_> there seems to be no mixing of c and ml files in easy-format
<baz_> mmm starts to get annoying :P
<baz_> been at for almost 2 days now :S
<baz_> *it
pyx has quit [Quit: WeeChat 0.4.3]
Moataz-E has joined #ocaml
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Drup> show your build script :p
dapz has joined #ocaml
Moataz-E has quit [Quit: Leaving]
seanmcl has joined #ocaml
Hannibal_Smith has quit [Quit: Sto andando via]
Kakadu has quit [Quit: Konversation terminated!]
tane has quit [Quit: Verlassend]
alpounet has joined #ocaml
shinnya has joined #ocaml
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dant3 has quit [Remote host closed the connection]
SethTisue has joined #ocaml
hhugo has joined #ocaml
<baz_> k
<baz_> so trying to build program X
<baz_> it is an ocp
<baz_> but given that it is very high-level, it seems that something else is going wrong
<baz_> mmm, it seems to be related to ocamlmklib or something
<baz_> so opam applies patches to easy-format to create a cma and cmxa
<baz_> if I do this directly with ocamlopt -a -o ...
<baz_> it seems to be fine
<Drup> baz_: which version of easy-format are you using ?
<Drup> there is no patches anymore in 1.2
rgrinberg has quit [Quit: Leaving.]
<baz_> 1.0.1
<Drup> 1.0.2*
<Drup> update :)
<baz_> I guess that is the latest supported for 3.12.1
<Drup> I see no version constraint, so no, you just need to update
<baz_> alreay up-to-date according to opam :/
<Drup> "opam upgrade" ?
boogie has quit [Remote host closed the connection]
<Drup> hum, easy-format is not even used anymore in more recent version of piqi
boogie has joined #ocaml
boogie has quit [Remote host closed the connection]
Sim_n has quit [Quit: Leaving]
<baz_> same message
<baz_> already up-to-date
<Drup> which version of opam are you using ?
<baz_> opam --versions shows 1.0.1
<baz_> but I installed Version: 1.1.1-1 form Ubuntu
<baz_> s/form/from
<baz_> that is odd
<Drup> odd indeed, maybe you have a left over version on your path somewhere
<Drup> 1.0.1 is outdated and I think it uses old servers (not completely sure)
<baz_> /usr/local/bin/opam --version
<baz_> return 1.0.1
hhugo has quit [Quit: Leaving.]
<baz_> so I used have 1.0.1
<Drup> are you using avsm's ppa ?
<baz_> but then I removed my $HOME/.opam and did a apt-get install opam
<baz_> no ppa
<Drup> maybe you should, ubuntu is not very reactive.
Arsenik has quit [Remote host closed the connection]
slash^ has quit [Read error: Connection reset by peer]
<baz_> but given the changes to easy-formats 1.0.2 Makefile
<baz_> this will still go wrong when using ocp-build
<baz_> since it is not including the cma and cmxa files
<baz_> which ocp-build looks for in the META
<baz_> which is weird, because METAs of other libs also include the cma and cmxa instead of cmo and cmx
<Drup> you should try it
<baz_> so I changed this
<baz_> and then I got the -leasy_format error
<baz_> since the opam patch created the cmxa with ocamlmklib
<baz_> so changing that to ocamlopt -a -o easy_format.cmxa ...
<Drup> please try with easy-formats 1.0.2 before going on :)
<baz_> fixed that for some reason
<baz_> well got it working now
<baz_> finally
<baz_> so changing the META + how the cmxa is build does the trick
<baz_> so it used to do ocamlmklib -o easy_format -linkall easy_format.cmx
<baz_> but I changed that to
<baz_> ocamlopt -a -o easy_format.cmxa -dtypes easy_format.mli easy_format.ml
<baz_> and it all magically works :P
<baz_> anyways, calling it a day
<baz_> will chase this goose another day :P
<baz_> so looking at the verbose output of ocamlopt
<baz_> it no longer generates the gcc ... -leasy_format
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<baz_> which seems to be caused by ocamlmklib.ml at line 259
<baz_> if !native_objs <> [] then
<baz_> scommand
<baz_> (sprintf "%s -a -o %s.cmxa %s %s -cclib -l%s %s %s %s %s"
<baz_> (transl_path !ocamlopt)
<baz_> !output
<baz_> (String.concat " " !caml_opts)
<baz_> (String.concat " " !native_objs)
<baz_> (Filename.basename !output_c)
<baz_> (String.concat " " (prefix_list "-ccopt " !c_opts))
<baz_> (make_rpath_ccopt nativeccrpath)
<baz_> (String.concat " " (prefix_list "-cclib " !c_libs))
<baz_> (String.concat " " !caml_libs))
<baz_> so the -l%s will result in -leasy_format if we call ocamlmklib -o easy_format easy_format.cmx
<baz_> well anyways
<baz_> time to get some sleep
<baz_> @Drup thanks for the input
avsm has quit [Quit: Leaving.]
eikke_ has joined #ocaml
boogie has joined #ocaml
BitPuffin has quit [Ping timeout: 264 seconds]
darkf has joined #ocaml
ontologiae has joined #ocaml
ontologiae has quit [Ping timeout: 240 seconds]
SethTisue has quit [Quit: SethTisue]
philtor_ has quit [Ping timeout: 255 seconds]
Nahra has quit [Ping timeout: 255 seconds]
madroach has quit [Ping timeout: 252 seconds]
madroach has joined #ocaml
Eyyub has quit [Ping timeout: 245 seconds]
Eyyub has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
thomasga has quit [Quit: Leaving.]
racycle_ has joined #ocaml
racycle has quit [Read error: No route to host]