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
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
maattdd has joined #ocaml
tidren has joined #ocaml
maattdd has quit [Ping timeout: 252 seconds]
tlockney is now known as tlockney_away
philtor has quit [Ping timeout: 265 seconds]
racycle__ has quit [Quit: ZZZzzz…]
nikki93 has joined #ocaml
dsheets has quit [Ping timeout: 252 seconds]
ollehar has quit [Ping timeout: 252 seconds]
rgrinberg has joined #ocaml
dsheets has joined #ocaml
watermind has quit [Quit: Konversation terminated!]
watermind has joined #ocaml
jao has quit [Remote host closed the connection]
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
nikki93 has quit [Remote host closed the connection]
maattdd has joined #ocaml
puzza007____ has joined #ocaml
puzza007____ is now known as puzza007
maattdd has quit [Ping timeout: 264 seconds]
michael_lee has joined #ocaml
racycle__ has joined #ocaml
watermind has quit [Read error: Connection reset by peer]
watermind has joined #ocaml
tlockney_away is now known as tlockney
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lostcuaz has joined #ocaml
lostcuaz has quit [Client Quit]
nikki93 has joined #ocaml
lostcuaz has joined #ocaml
maattdd has joined #ocaml
nikki93 has quit [Remote host closed the connection]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
maattdd has quit [Ping timeout: 265 seconds]
watermind has quit [Ping timeout: 245 seconds]
rz has quit [Ping timeout: 265 seconds]
rz has joined #ocaml
tidren has quit [Remote host closed the connection]
Guest93974 is now known as amiller
amiller has quit [Changing host]
amiller has joined #ocaml
nikki93 has joined #ocaml
q66 has quit [Quit: Leaving]
araujo has quit [Quit: Leaving]
tidren has joined #ocaml
jpdeplaix has quit [Ping timeout: 276 seconds]
tlockney is now known as tlockney_away
jpdeplaix has joined #ocaml
maattdd has joined #ocaml
tlockney_away is now known as tlockney
maattdd has quit [Ping timeout: 264 seconds]
NoNNaN has quit [Remote host closed the connection]
nikki93 has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
maattdd has joined #ocaml
tautologico has quit [Ping timeout: 252 seconds]
dant3 has quit [Ping timeout: 252 seconds]
teiresias has quit [Ping timeout: 252 seconds]
mdenes has quit [Ping timeout: 252 seconds]
mdenes has joined #ocaml
nikki93 has joined #ocaml
maattdd has quit [Ping timeout: 264 seconds]
teiresias has joined #ocaml
tautologico has joined #ocaml
racycle__ has quit [Quit: ZZZzzz…]
dant3 has joined #ocaml
jao has quit [Remote host closed the connection]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
gasche has joined #ocaml
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
jao has quit [Ping timeout: 245 seconds]
gasche has quit [Ping timeout: 250 seconds]
michael_lee has quit [Quit: Ex-Chat]
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
yacks has joined #ocaml
studybot_ has quit [Read error: Connection reset by peer]
yacks has quit [Max SendQ exceeded]
Zerker has joined #ocaml
tlockney is now known as tlockney_away
Zerker has quit [Quit: Colloquy for iPad - Timeout (10 minutes)]
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
Cyanure has joined #ocaml
yacks has joined #ocaml
rgrinberg1 has joined #ocaml
yacks has quit [Ping timeout: 255 seconds]
rgrinberg has quit [Ping timeout: 245 seconds]
rgrinberg1 has quit [Client Quit]
dsheets has quit [Ping timeout: 264 seconds]
gasche has joined #ocaml
rgrinberg has joined #ocaml
ikaros has joined #ocaml
tidren has quit [Remote host closed the connection]
maattdd has joined #ocaml
tautologico has quit [Quit: Connection closed for inactivity]
tidren has joined #ocaml
zpe has joined #ocaml
maattdd has quit [Ping timeout: 245 seconds]
ustunozgur has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
AltGr has joined #ocaml
Cyanure has quit [Disconnected by services]
<mrvn> why does 'Printf.printf "%0.6d" 0' call strotl("0.6d") but not strtol("6d")?
Arsenik has joined #ocaml
<gasche> mrvn, why should it?
<gasche> my understanding is that printf/scanf delegate to C formats as often as possible (~ it more or less respect the intended semantics, which was designed to be compatible with C anyway)
<gasche> note that "%6d" and "%06d" have different semantics, the first uses space-padding and the second 0-padding
<gasche> . makes no sense for integers and should result in a warning/error
<gasche> (in fact integer printers do interpret . as 0-padding, but it's unclear whether that's intentional or a side-effect of a permissive implementation)
<mrvn> according to "man 3 printf" .6 gives "This gives the minimum number of digits to appear for d, i, o, u, x, and X conversions"
wwilly has quit [Remote host closed the connection]
<gasche> mrvn, if I understand correctly, that corresponds to the current OCaml semantics
<gasche> your question seems to imply that you think there is a mismatch between the behavior and the specification, but I don't see it; could you elaborate?
<mrvn> "%06d" calls strtol("06d"), which returns 6 and then the string isn't zeron padded here
<gasche> ah
<gasche> so that would be a bug
<mrvn> My original question was why %0.6d calls strtol for the width but not the precision.
<gasche> (I guess my strtol function correctly pads; which system are you using?)
<gasche> (I'm interested because I'm deep in the print/scanf code right now, if there is some bug to fix alongside I'd be happy to help)
<mrvn> arm with my own strtol
ustunozgur has quit [Remote host closed the connection]
<mrvn> 'Printf.sprintf "%d.%06d" time.tv_sec time.tv_usec' calls strtol("06d", 0x00000000, 10), which returns 6.
<mrvn> I believe that is correct for strtol, right?
<gasche> in fact I don't understand how you'd get a call to strtol
<gasche> in byterun/floats.c, caml_format_float calls printf
<gasche> (sprintf)
<mrvn> gasche: native code
<gasche> happily the format_float code does not change between bytecode and native code ^^
<gasche> but there is some weird atoi() business before the sprintf call
<gasche> (I'd like to clarify that this part of the code I haven't touched at all, I like my sanity)
<gasche> I'd guess that on your system atoi calls strtol
<gasche> hm
<gasche> but then I'm looking at format_float, while these are not floats, sorry
<mrvn> format_int calls sprintf. so maybe my sprintf is to blame.
<mrvn> %06d works fine in normal ocaml.
<gasche> in any case I think the OCaml manual does not specify . for integer conversions
<mrvn> nope, not me. my sprintf doesn't call strtol at all.
<gasche> it's probably some of the ugly business in ints.c/parse_format
<gasche> but I'd mark it as resoundly "not a bug" given %0.6d is an invalid format
avsm has joined #ocaml
<mrvn> Well, 0.6d works and 06d doesn't zero pad here for some reason.
<gasche> %06d not padding is a bug
<mrvn> urgs, in C %0.6d gives me: main.c:104:5: error: '0' flag ignored with precision and '%d' gnu_printf format [-Werror=format]
<mrvn> gasche: do you have any idea where the strtol call comes from?
<gasche> I'd bet on atoi during the parsingo f the format
<mrvn> gasche: the C libs atoi?
Simn has joined #ocaml
<gasche> I found no possibly-relevant call to strtol by grepping the OCaml files, so I assume your libc may call it internally
<gasche> (but then I know nothing about that)
<gasche> if you're strace-ing your program, that could make sense
<mrvn> Nope. I grepped the ocaml source too and the only match is ocaml-3.12.1/byterun/win32.c
maattdd has joined #ocaml
<mrvn> Nothing in the libc calls strtol eigther. atoi() converts directly.
<mrvn> args, /usr/include/stdlib.h does.
<mrvn> extern inline atoi(), so that gets inlined in ocaml.
maattdd has quit [Ping timeout: 255 seconds]
<mrvn> gasche: asmrun/ints.c: parse_format() seems to indeed ignore the .precision part.
tidren has quit [Remote host closed the connection]
<mrvn> strtol() is a complicated function: http://paste.debian.net/97496/
<gasche> I think I hate format much more than previously now that I've reviewed Benoît's work (which was in fact mostly independent from how printing delegates to C)
<gasche> these things are just ugly
adrien_o1w is now known as adrien_oww
maattdd has joined #ocaml
<avsm> odd, how is (* {| *) an illegal string literal now?
<companion_cube> I'd guess it's because comments are parsed, but {| is a new string literal
<companion_cube> it's like (* " *)
pminten has joined #ocaml
gustav__ is now known as gustav___
<avsm> oh yeah, extension points
<gasche> avsm, Damien did an experiment on OPAM and found related failures; if you were among the recipients you'll find a list of projects affected by this problem
Kakadu has joined #ocaml
<avsm> yes, I was just confused by the error message
<avsm> I thought Alain said he'd improve it to not just be "string literal" during the extension points review
<avsm> it's not really obvious that {| |} refers to a string literal
<gasche> of course, we can improve the error message
<avsm> argh, camlp4 trunk broken again
* avsm watches his nightly bulk build descend into chaos
<gasche> we're busy as hell with the feature freeze right now, would you ping the relevant PR so that I remember to see that fixed later?
ygrek has joined #ocaml
ygrek has quit [Ping timeout: 258 seconds]
gasche_ has joined #ocaml
<flux> hmm, so this http://caml.inria.fr/mantis/view.php?id=5584 has been merged: open types (ie. custom 'exn' types)
chambart has joined #ocaml
<flux> caml seems to have this big influx of language features nowadays, I wonder if it's going to grow into a big complicated language :-o. but I suppose, for example this feature, is just making something builtin to the language something the user can define him self, so it's not orthogonal
<gasche> what do you mean "it's not orthogonal"?
<gasche> but yes, death by thousands cuts of complexity is a possibility
<gasche> hm
<flux> it goes along with the other features. for example, someone might say objects are orthogonal?
<gasche> if I understand correctly you mean that this feature extends an extisting feature, so it's not just strictly more surface area
<flux> yes
<gasche> the confusing part for me was that usually, in language design, "orthogonal" is a very positive word
<gasche> it means that you don't interact with apparently-unrelated features in a bad way
<gasche> (typical example: mutable references and polymorphism)
<gasche> there is definitely a point to be made, that has in fact been made long ago, that we have too many ways to define sums and products
ustunozgur has joined #ocaml
<gasche> adding open extensible types makes thing worse in this regard
<gasche> but on the other hand, it's a feature that has its use-case (distinct from polymorphic variants for example)
<flux> so would you say this feature is then orthogonal? I'm perfectly willing to accept that I'm using the concept wrong :).
<gasche> no I think you were correct, I was just surprised
<gasche> (also from my point of view the fact that it probably consists of the only type-system feature that was not (co-)developped by the current type-system maintainer make it a positive result about openness of the project to the wider community)
<gasche> (not that I think that we'll find two other aliens beside Jeremy and Leo in a reasonable future)
chambart has quit [Ping timeout: 265 seconds]
<gasche> more directly: I felt bad for this feature not being included because it means so much work from Leo
<gasche> (admittedly that's not a rational design argument)
<whitequark> oh, open types were merged, great!
<flux> so, do people have nice use cases for those?
<whitequark> gasche: do you think the record-constructors branch will make it into 4.02?
<flux> I suppose one use would be encoding (say) messages into a struct in a way that allows to extend the list easily
<flux> more easily than with polymorphic variants
<flux> record-constructors branch?
<whitequark> A of { b: int; c: float; }
<gasche> whitequark, I'm pretty confident record-constructors won't get included
<flux> oh
<whitequark> gasche: in 4.02 or at all?
<gasche> in 4.02
chambart has joined #ocaml
<flux> what happens with match A { b: 42 } with A x -> x? x has an anoynomous type?
<whitequark> ok. I see.
<gasche> (unsure about "at all")
<whitequark> flux: it has a type t.A
<gasche> flux, there are some hacks we previously did abusing the exception type
maattdd has quit [Read error: No route to host]
<gasche> for universal injections from any type to a decentralized existential
<gasche> that can now be done much more cleanly with open extensible types
<gasche> there was a recent discussion about such an use-case on caml-list
<gasche> "Obj.magic for polymorphic identifiers"
<flux> gasche, does the code really get quite different?
<flux> gasche, yeah, that's where I read about it being merged :)
<gasche> well this particular example you can't do safely with exceptions
<flux> I guess I should reread the thread..
<gasche> (because you need a type parameter)
<gasche> well
<gasche> you're also free to remember that it's helpful for arcane powerful stuff that's best hidden in some library somewhere
<gasche> and then never think of it again in your next five happy years of OCaml programming
<flux> :)
<whitequark> open-types seems to not have a big cost, too
<gasche> there was also a theoretical need of extensible sum-types in François Pottier defunctionalisation paper
<gasche> (they can make defunctionalization more modular)
ollehar has joined #ocaml
maattdd has joined #ocaml
lordkryss_ has joined #ocaml
watermind has joined #ocaml
nikki93 has quit [Remote host closed the connection]
nikki93_ has joined #ocaml
nikki93_ has quit [Remote host closed the connection]
avsm has quit [Quit: Leaving.]
robink has quit [Ping timeout: 246 seconds]
lordkryss_ is now known as lordkryss
robink has joined #ocaml
gasche has quit [Quit: Leaving]
gasche_ is now known as gasche
<mrvn> anyone know if ocamlopt on arm keeps the minor heap limit in a register so that signal delivery gets delayed?
ygrek has joined #ocaml
watermind has quit [Quit: Konversation terminated!]
watermind has joined #ocaml
watermind has quit [Read error: Connection reset by peer]
watermind has joined #ocaml
ontologiae has joined #ocaml
Thooms has joined #ocaml
<mrvn> whitequark: cool. you started documenting stuff
<whitequark> mrvn: long ago
<whitequark> I mean, I wrote that long ago.
<mrvn> I guess I should use this in my signal handler: if (Is_in_code_area(CONTEXT_PC)) CONTEXT_YOUNG_LIMIT = (context_reg) caml_young_limit;
* whitequark is not competent to answer
eizo has joined #ocaml
<mrvn> whitequark: your ABI specs seem outdated. signals_osdep.h doesn't have caml_young_limit in r11 on arm.
<mrvn> or was that added after 3.12?
<whitequark> that's odd, https://github.com/ocaml/ocaml/blob/trunk/asmrun/arm.S#L51 confirms my docs
<mrvn> whitequark: yeah. but the #define is missing
<whitequark> perhaps signals_osdep.h is inessential to operation
<whitequark> disclaimer: I have no idea how signals interact with GC in OCaml
<mrvn> The define is required for the signal handler to change the limit so the signal gets processed on the next alloc
<whitequark> oh
<whitequark> I can say why it's not there, then
<whitequark> the C code has no idea that r11 is pinned to caml_young_limit
<whitequark> therefore, the assembly trampolines save r11 back to caml_young_limit before entering the signal handler (any C code, actually)
<whitequark> it's claimed to be "for debugging purposes", but I believe it's not just that
<whitequark> after you change it, this part https://github.com/ocaml/ocaml/blob/trunk/asmrun/arm.S#L115 will reload it back to r11
<mrvn> The signal handler code checks if it is inside ocaml code, and if so it modifies the context->r11
skchrko has joined #ocaml
<whitequark> yes, context points to the place on stack where this register is pushed
<whitequark> it should internally resolve to caml_bottom_of_stack (https://github.com/ocaml/ocaml/blob/trunk/asmrun/arm.S#L90), I think
<mrvn> arm has CONTEXT_PC but no CONTEXT_YOUNG_LIMIT. That seems to be a bug.
<whitequark> it certainly looks odd
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
dsheets has joined #ocaml
chambart has quit [Ping timeout: 240 seconds]
_andre has joined #ocaml
<mrvn> hmm, regs[11] = 0xc04069e0, caml_young_limit = 0xC0184000, caml_young_end = 0xC028400
<mrvn> r11 is in the middle of the stack
<pippijn> stack?
<pippijn> young heap = stack?
<pippijn> ah, no
<mrvn> ahh, alloc_limit .req r10
<pippijn> you're on 32 bit?
<pippijn> no you're not
<pippijn> why is the stack so low?
<whitequark> ARM is 32-bit
<pippijn> ah, it's ARM
<pippijn> never mind then :)
<mrvn> 3.12 has r10, the git has r11
<mrvn> lets try this again
<mrvn> regs[11] = 0xc0184000, caml_young_limit = 0xC0184000, caml_young_end = 0xC0284000, ocaml
<mrvn> ups, forgot to change the string in printf.
<mrvn> So r10 and caml_young_limit in memory seem to match. Should be ok to set it to caml_yound_end then.
ustunozgur has quit [Remote host closed the connection]
zpe has quit [Remote host closed the connection]
SHODAN has joined #ocaml
ollehar has quit [Ping timeout: 252 seconds]
ollehar has joined #ocaml
<AeroNotix> is there a tool or w/e that given a module signature would tell me what module interfaces it implements?
<whitequark> what module types is it a supertype of ?
<whitequark> I don't tink so
<whitequark> think*
<companion_cube> that's a pretty interesting question
<Drup> it's already an hard problem just for types and functions
thomasga has joined #ocaml
<companion_cube> right, you need to guess type equality constraints
<companion_cube> but names can help a lot
<AeroNotix> Drup: a nieve approach could just get the individual components of a module signature and do a set comparison against other signatures
<whitequark> AeroNotix: you could implement such a tool relatively easily :)
<whitequark> now that compiler-libs are exported
<companion_cube> I believe you need some unification
<Drup> yeah, you need unification, that's the hard part
<companion_cube> for instance to unify abstract types t (in Set.OrderedType, say) with a concrete type
<companion_cube> otoh unification isn't that hard
<AeroNotix> hmm
<def-lkb> Inclusion relation between modules is enogh.
ustunozgur has joined #ocaml
<companion_cube> you have to simultaneously unify several types though
<def-lkb> See Includemod in the compiler.
<companion_cube> def-lkb: would it work with abstract types?
<def-lkb> companion_cube: yes
<companion_cube> for instance I suppose AeroNotix wants Set.OrderedType to appear for the module String
<def-lkb> you need subtyping, not unification
ustunozgur has quit [Read error: No route to host]
<AeroNotix> companion_cube: exactly this
<companion_cube> but that answer requires unifying string with Set.OrderedType.t
ustunozgur has joined #ocaml
Nahra has joined #ocaml
<whitequark> well, if String had type t, there wouldn't be such problem...
<def-lkb> "naively", you can just list all known signatures, and for all signature S, test if module Dummy = (MyModule : S) compiles.
<whitequark> and other modules do
<AeroNotix> def-lkb: hehe
<whitequark> oh, wait, there is a String.t
<whitequark> then you can just compare the types by na,e.
<Drup> whitequark: of course, you can do Map.Make(String)
<Drup> AltGr: opam is broken :(
avsm has joined #ocaml
<companion_cube> whitequark: even then
<thomasga> Drup: broken ?
ustunozgur has quit [Ping timeout: 264 seconds]
<Drup> thomasga: head doesn't compile for me and my local opam refuse to install anything
<thomasga> what's the compilation error ?
<thomasga> seems to work fine for me
ontologiae has quit [Ping timeout: 240 seconds]
eikke__ has joined #ocaml
ontologiae has joined #ocaml
<Drup> right, it's not exactly compilation :/
<eikke__> we're experiencing something strange on Travis. Builds fail all of a sudden, opam says "Aborting, as the following packages have a cyclic dependency:", and the nothing, although when looking at the opam sourcecode this should (as expected) be followed by a list of packages
avsm has quit [Ping timeout: 276 seconds]
<Drup> eikke__: yes, I think it's related to lwt
<eikke__> ah
<Drup> lwt as a depopts to itself
<thomasga> Drup: did you try `make` after `make lib-ext` ?
<Drup> thomasga: both, yes
<eikke__> Drup: interesting
avsm has joined #ocaml
<eikke__> Drup: would you know whether that's reported somewhere?
<thomasga> Drup eikke__ I I'm fixing the lwt is a depopt to itself
<thomasga> dunno how it goes thoughr
<avsm> lwt: the navel gazing library
<Drup> thomasga, AltGr : also, in my current opam (which is slightly outdated trunk) opam refuses to install anything, it justs stop after "Installing packages" without doing anything
<eikke__> thomasga, Drup: thanks!
<avsm> Drup: trunk is somewhat known-broken at the moment
watermind has quit [Read error: Connection reset by peer]
<Drup> yeah, I know
watermind has joined #ocaml
<Drup> but it was "not too broken" and then transformed into "really broken" suddendly, hence my concerns :D
watermind has quit [Client Quit]
watermind has joined #ocaml
watermind has quit [Client Quit]
pminten has quit [Quit: Leaving]
ustunozgur has joined #ocaml
eikke__ has quit [Ping timeout: 252 seconds]
ustunozgur has quit [Client Quit]
Hannibal_Smith has joined #ocaml
ustunozgur has joined #ocaml
eikke__ has joined #ocaml
<Drup> avsm, thomasga : is there a delay for the opam repository to be updated, after a merge/push ?
<thomasga> there a cron job which runs every hour on the server
<avsm> Drup: cronjob to rebuild
<Drup> ok
<avsm> thomasga: we ought to hook that in as a webhook at some point
<avsm> i think dsheets already has code for this in ocaml-github
<thomasga> yup, now that opam2web goes fast again, we should do that
ygrek has quit [Ping timeout: 240 seconds]
ddosia has quit [Ping timeout: 240 seconds]
maattdd has quit [Ping timeout: 252 seconds]
<AltGr> Drup: small bug in the repo, badly handled by opam, and it's the same problem on trunk except the error even goes silent :(
<AltGr> I'm fixing the handling of aforementionned error atm
<Drup> AltGr: oh, so that's the conflict issue
<Drup> it just do not report it on trunk, ok
<Drup> (and it removes the state export backup on it's way, because it wouldn't be fun otherwise :D)
lostcuaz has joined #ocaml
<AltGr> (of course -- it's only kept in case of error ;))
maattdd has joined #ocaml
q66 has joined #ocaml
q66 has quit [Changing host]
q66 has joined #ocaml
_whitelogger has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
<companion_cube> gasche: btw, our discussion about "fueled language" is actually used in Erlang, I think
<companion_cube> in which evaluation is fueled to achieve fairness of the scheduler
<eikke__> you mean counting the number of reductions?
<companion_cube> something like this, yes
dnm has quit [Ping timeout: 252 seconds]
<AeroNotix> a process in Erlang has 1000 "reductions", certain operations reduce this number
<AeroNotix> when it reaches 0, it gets switched out
<companion_cube> this is a really interesting idea
<eikke__> it's that what makes them claim they support a 'soft-realtime' execution model (next to per-process GC)
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<gasche> companion_cube: note that some implementations of fold_right in OCaml use fuel as well to be efficient and tail-recursive
<gasche> (in fact not tail-recursive but non-stack-blowing)
<companion_cube> yes, I understood
avsm has joined #ocaml
ontologiae has quit [Ping timeout: 252 seconds]
arj has joined #ocaml
ddosia has joined #ocaml
elfring has joined #ocaml
divyanshu has joined #ocaml
ontologiae has joined #ocaml
thomasga has quit [Quit: Leaving.]
Hannibal_Smith has quit [Quit: Sto andando via]
thomasga has joined #ocaml
ontologiae has quit [Ping timeout: 264 seconds]
darkf has quit [Quit: Leaving]
zpe has joined #ocaml
avsm has quit [Quit: Leaving.]
divyanshu has quit [Quit: Computer has gone to sleep.]
saml has joined #ocaml
avsm has joined #ocaml
divyanshu has joined #ocaml
maattdd has quit [Quit: WeeChat 0.4.3]
studybot has joined #ocaml
roppongininja has joined #ocaml
<whitequark> gah, camlp4 is broken again
<whitequark> why did I try to recompile everything -_-'
<roppongininja> hello guys, I'm comming from a Java backgroud, is ocaml a good choice as a first functional language?
ggole has joined #ocaml
<companion_cube> roppongininja: sure, unless you really want to stick to the jvm
<AeroNotix> Trying to use ocp-build and I get: Error: Error while linking /home/xeno/.opam/system/lib/core/core.cma(Core):
<AeroNotix> Reference to undefined global `Condition'
maattdd has joined #ocaml
<AeroNotix> any ideas?
<flux> I don't exactly know how ocp-build works, but that error comes because you're not linking using the -thread switch
<AeroNotix> ok
ustunozg_ has joined #ocaml
metasyntax has joined #ocaml
alex_nx has quit [Ping timeout: 240 seconds]
ustunozgur has quit [Ping timeout: 276 seconds]
tlockney_away has quit [Ping timeout: 276 seconds]
olauzon has joined #ocaml
<thomasga> AeroNotix: guess you are missing a "thread" or "threads" in requires
<AeroNotix> thomasga: Yeah, that fixed it. But in a way I don't understand.
<AeroNotix> That error is a million miles away from "require "thread""
<thomasga> indeed ...
tlockney_away has joined #ocaml
alex_nx has joined #ocaml
tlockney_away is now known as tlockney
<thomasga> AeroNotix: the thread library exports the Condition module
<AeroNotix> thomasga: I gather that, but why doesn't the error make this clearer?
<Drup> because the compiler doesn't now it :/
<Drup> it's the issue when you have separated compilation unit
<AeroNotix> Drup: gotcha, so it's like a #define
<AeroNotix> or referencing code *in* a #define
<Drup> well, it's a bit more than that
<AeroNotix> ok
<Drup> because #define is purely syntactic
<AeroNotix> ok
<mrvn> #define is hardly better than sed s/foo/bar/g
<AeroNotix> sure
tautologico has joined #ocaml
tane has joined #ocaml
<Drup> whitequark: I updated the pr to the correct address (and to the fact that you changed oasis setup mode)
zpe has quit [Remote host closed the connection]
divyanshu has quit [Quit: Computer has gone to sleep.]
tlockney is now known as tlockney_away
tlockney_away is now known as tlockney
studybot has quit [Read error: Connection reset by peer]
saml has left #ocaml ["Leaving"]
tlockney is now known as tlockney_away
tlockney_away is now known as tlockney
divyanshu has joined #ocaml
studybot has joined #ocaml
thomasga has quit [Quit: Leaving.]
studybot_ has joined #ocaml
studybot has quit [Ping timeout: 240 seconds]
thomasga has joined #ocaml
johnf has joined #ocaml
lostcuaz has joined #ocaml
lostcuaz_ has joined #ocaml
struktured has quit [Ping timeout: 250 seconds]
thomasga has quit [Quit: Leaving.]
lostcuaz has quit [Ping timeout: 276 seconds]
roppongininja has quit [Remote host closed the connection]
roppongininja has joined #ocaml
Arsenik has quit [Remote host closed the connection]
roppongininja has quit [Ping timeout: 240 seconds]
thomasga has joined #ocaml
Arsenik has joined #ocaml
jao has joined #ocaml
rgrinberg has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
tidren has joined #ocaml
<whitequark> Drup: merged
struktured has joined #ocaml
watermind has joined #ocaml
arj has quit [Quit: Leaving.]
thomasga has quit [Quit: Leaving.]
jwatzman|work has joined #ocaml
tidren has quit [Remote host closed the connection]
Hannibal_Smith has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
<_obad_> is there an Lwt function that takes a path and returns a channel (as in Pervasives.open_in{,_bin}), or do I have to go through Lwt_unix.open etc.?
michael_lee has joined #ocaml
<_obad_> seems to me that there should be one function that makes sure you pass the right unix open flags
avsm has quit [Quit: Leaving.]
maattdd has quit [Ping timeout: 265 seconds]
avsm has joined #ocaml
racycle has joined #ocaml
watermind has quit [Quit: Konversation terminated!]
maattdd has joined #ocaml
racycle has quit [Quit: ZZZzzz…]
nikki93 has joined #ocaml
thomasga has joined #ocaml
nikki93 has quit [Remote host closed the connection]
eizo has quit [Quit: Page closed]
roppongininja has joined #ocaml
racycle has joined #ocaml
nikki93 has joined #ocaml
struktured has quit [Ping timeout: 264 seconds]
nikki93 has quit [Remote host closed the connection]
malo has joined #ocaml
rand000 has joined #ocaml
sari_e has joined #ocaml
sari_e has quit [Client Quit]
Eyyub has joined #ocaml
Thooms has quit [Quit: WeeChat 0.3.8]
nikki93 has joined #ocaml
ustunozg_ has quit [Remote host closed the connection]
ustunozgur has joined #ocaml
Eyyub has quit [Ping timeout: 252 seconds]
Kakadu has quit [Ping timeout: 240 seconds]
ustunozgur has quit [Ping timeout: 250 seconds]
ikaros has quit [Quit: Ex-Chat]
racycle has quit [Read error: No route to host]
nikki93 has quit [Remote host closed the connection]
racycle has joined #ocaml
struktured has joined #ocaml
roppongininja has left #ocaml [#ocaml]
<smondet> _obad_: Lwt_io.with_file ? http://ocsigen.org/lwt/api/Lwt_io
Eyyub has joined #ocaml
zarul has quit [Ping timeout: 245 seconds]
yastero has quit [Ping timeout: 252 seconds]
yastero has joined #ocaml
AltGr has left #ocaml [#ocaml]
skchrko has quit [Ping timeout: 240 seconds]
zarul has joined #ocaml
zarul has quit [Changing host]
zarul has joined #ocaml
ontologiae has joined #ocaml
bondar has joined #ocaml
manizzle has joined #ocaml
Eyyub has quit [Quit: WeeChat 0.4.1]
roppongininja has joined #ocaml
ustunozgur has joined #ocaml
jao has quit [Ping timeout: 265 seconds]
Eyyub has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
racycle has quit [Read error: Connection reset by peer]
Eyyub has quit [Client Quit]
racycle has joined #ocaml
Eyyub has joined #ocaml
ygrek has joined #ocaml
divyanshu has joined #ocaml
divyanshu has quit [Client Quit]
nikki93 has joined #ocaml
Kakadu has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
michael_lee has quit [Ping timeout: 255 seconds]
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
eizo has joined #ocaml
nikki93 has joined #ocaml
ygrek has quit [Remote host closed the connection]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
ygrek has joined #ocaml
reynir is now known as reynir_______
reynir_______ is now known as reynir
elfring has quit [Ping timeout: 252 seconds]
Eyyub has quit [Ping timeout: 252 seconds]
nikki93 has quit [Remote host closed the connection]
dnm has joined #ocaml
nikki93 has joined #ocaml
racycle has quit [Ping timeout: 252 seconds]
racycle has joined #ocaml
dsheets has quit [Ping timeout: 240 seconds]
ygrek has quit [Ping timeout: 240 seconds]
ollehar1 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
ocp has joined #ocaml
thomasga has quit [Quit: Leaving.]
zpe has joined #ocaml
araujo has joined #ocaml
araujo has quit [Changing host]
araujo has joined #ocaml
nikki93 has joined #ocaml
dnm has quit [Ping timeout: 255 seconds]
tobiasBora has joined #ocaml
ontologiae has quit [Ping timeout: 245 seconds]
ontologiae has joined #ocaml
nikki93 has quit [Remote host closed the connection]
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
rand000 has quit [Quit: leaving]
dnm has joined #ocaml
Thooms has joined #ocaml
avsm has quit [Quit: Leaving.]
Eyyub has joined #ocaml
zpe has quit [Remote host closed the connection]
nikki93 has joined #ocaml
jbrown has quit [Ping timeout: 240 seconds]
jbrown has joined #ocaml
tnguyen has joined #ocaml
Hannibal_Smith has quit [Read error: Connection reset by peer]
nikki93 has quit [Read error: Connection timed out]
nikki93 has joined #ocaml
jbrown has quit [Ping timeout: 265 seconds]
jbrown has joined #ocaml
bondar has quit []
maattdd has joined #ocaml
ygrek has joined #ocaml
ontologiae has quit [Ping timeout: 240 seconds]
<_obad_> smondet: thanks I missed that one
ygrek has quit [Remote host closed the connection]
topher has joined #ocaml
ygrek has joined #ocaml
racycle has quit [Read error: Connection reset by peer]
racycle_ has joined #ocaml
zpe has joined #ocaml
Thooms has quit [Read error: No route to host]
Thooms has joined #ocaml
ontologiae has joined #ocaml
topher has left #ocaml [#ocaml]
claudiuc has joined #ocaml
racycle_ has quit [Read error: No route to host]
racycle has joined #ocaml
krono has joined #ocaml
<krono> hey
<krono> Any thoughts on wether to use Sys.time or Unix.gettimeofday for measuring my execution times?
<adrien> Unix.gettimeofday
<adrien> Sys.time is CPU time
<adrien> i.e. if you use 10% CPU during 10 second, it's 1 second
<krono> hmm
<krono> not as bat
<krono> s/bat/bad/
<krono> so I get total with gettimeofday and cpu with sys.time :D
<krono> I like that
piotrm0 has joined #ocaml
<whitequark> krono: don't forget that you need CLOCK_MONOTONIC
<whitequark> otherwise you get funny things, like the Debian leap second fiasco
<krono> whitequark: how do I set this?
<adrien> you don't :>
<krono> (I'm not actually ocaml-proficient)
<krono> oO
<adrien> but if you're benchmarking, you can probably assume clock is not changing
<adrien> without a monotonic clock your measurements will be impacted by time adjustments
Simn has quit [Quit: Leaving]
_andre has quit [Quit: leaving]
<NoNNaN> the clock is far from monotonic
<adrien> but it's unlikely you'll get a time adjustement over 10 seconds
<adrien> so I'd say it's safe not to bother about it
<krono> adrien: ok…
<adrien> changes in frequency of the cpu and therefore performance are more likely to taint your results
<krono> so better not have something like ntp or chrony running
<adrien> benchmarking is a science on its own
<whitequark> oh, benchmarking
<krono> yes
<adrien> :)
<whitequark> then you don't need monotonic, right
<krono> not to mention that I do it on a Xen VM…
<whitequark> a recipe for disaster
<Drup> mirage power \o/
<adrien> well
<NoNNaN> krono: and what are you try to measure?
ocp1 has joined #ocaml
<adrien> if your usual scenario will be on Xen VM, benchmarking on it is not necessarily meaningless
<NoNNaN> xen itself probably not the problem, but the other vms maybe
<krono> I made sure there is no other :D
<krono> NoNNaN: just simple things: list reveres etc.
<whitequark> well, it depends on the kind of benchmarking
<whitequark> microbenchmarks probably will be useless
<krono> microbenches
<krono> :D
<NoNNaN> generate a huge coq proof, and run it to prove it
<whitequark> I'm not really convinced they're useful for anything than, umm, pointless self-satisfaction, in the vast majority of cases
* whitequark shrugs
ocp has quit [Ping timeout: 245 seconds]
<NoNNaN> fstar team did it for self certification, they generated a 8g coq file, that ran for 23 days
<krono> well, ocaml is not what i am benching for, it's just my comparison :/
<whitequark> krono: I mean, why do you run microbenchmarks at all? do you have a particular important tight loop that performs these operations?
<krono> and the thing I am banching for is merely a prototypcial thing, far from a complete language actually
racycle has quit [Read error: No route to host]
racycle__ has joined #ocaml
<krono> whitequark: I actually just do one list reverse, or one map
<krono> like that
ygrek has quit [Ping timeout: 240 seconds]
<whitequark> um, *one* list reverse?
<whitequark> like: let t1 = gettime () in List.reverse fixture; let t2 = gettime () in t2 - t1?
<NoNNaN> krono: and what is your goal? why are you benchmarking in the first place ? (to see the bigger picture)
<krono> whitequark: yes, but 'fixture' is about 200000 element currently
<krono> I want to compare my “thing” to existing languages like ocaml, sml…
* whitequark shrugs
<krono> and my thing cannot do more than algebraic types (contstructors) and _very_ simple lambdas
* whitequark invokes @shipilev
<krono> I know it is far from robust, but it is all I have to measure
<krono> So, thank you all, I think this helped
Arsenik has quit [Remote host closed the connection]
krono has left #ocaml ["Ahoi"]
ustunozgur has quit [Ping timeout: 276 seconds]
piotrm0 has quit [Remote host closed the connection]
Eyyub has quit [Ping timeout: 240 seconds]
topher has joined #ocaml
ggole has quit []
tane has quit [Quit: Verlassend]
ocp1 has quit [Ping timeout: 258 seconds]
Submarine has quit [Quit: Leaving]
claudiuc has quit [Remote host closed the connection]
claudiuc has joined #ocaml
avsm has joined #ocaml
thomasga has joined #ocaml
ontologiae has quit [Ping timeout: 245 seconds]
Eyyub has joined #ocaml
ontologiae has joined #ocaml
dsheets has joined #ocaml
ollehar has quit [Ping timeout: 252 seconds]
rgrinberg has quit [Quit: Leaving.]
topher has left #ocaml [#ocaml]
Eyyub has quit [Ping timeout: 240 seconds]
eizo has quit [Quit: Page closed]
nikki93 has quit [Remote host closed the connection]
Kakadu has quit [Quit: Konversation terminated!]
Eyyub has joined #ocaml
dsheets has quit [Quit: Leaving]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
olauzon has quit [Quit: olauzon]
racycl___ has joined #ocaml
racycle__ has quit [Read error: Connection reset by peer]
zpe has quit [Ping timeout: 264 seconds]
Thooms has quit [Ping timeout: 252 seconds]
lostcuaz_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tobiasBora has quit [Quit: Konversation terminated!]
ontologiae has quit [Ping timeout: 255 seconds]
racycl___ has quit [Ping timeout: 255 seconds]
rgrinberg has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
racycle_ has joined #ocaml
tulloch has joined #ocaml
lostcuaz has joined #ocaml
avsm has quit [Quit: Leaving.]
milosn has quit [Ping timeout: 245 seconds]
Ptival has joined #ocaml
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lostcuaz has joined #ocaml
lostcuaz has quit [Client Quit]
racycle__ has joined #ocaml
racycle_ has quit [Ping timeout: 276 seconds]
eikke__ has quit [Ping timeout: 240 seconds]
eikke__ has joined #ocaml
madroach has quit [Ping timeout: 252 seconds]
tulloch has quit [Ping timeout: 265 seconds]
madroach has joined #ocaml
zpe has joined #ocaml
ollehar1 has quit [Ping timeout: 252 seconds]
nikki93 has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 240 seconds]
NoNNaN has joined #ocaml
struktured has quit [Ping timeout: 245 seconds]
Ptival has quit [Ping timeout: 240 seconds]
Ptival has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
darkf has joined #ocaml
thomasga has quit [Quit: Leaving.]