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
<tautologico> proof general is so nice
philtor has quit [Ping timeout: 240 seconds]
manizzle has quit [Remote host closed the connection]
WraithM has joined #ocaml
Nuki has quit [Remote host closed the connection]
squiggnet has joined #ocaml
philtor has joined #ocaml
manizzle has joined #ocaml
ontologiae has quit [Ping timeout: 258 seconds]
philtor has quit [Ping timeout: 255 seconds]
WraithM has quit [Ping timeout: 258 seconds]
WraithM has joined #ocaml
sgnb` has joined #ocaml
racycle has quit [Quit: ZZZzzz…]
WraithM has quit [Ping timeout: 255 seconds]
sgnb has quit [Ping timeout: 265 seconds]
WraithM has joined #ocaml
divyanshu has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
boogie has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 265 seconds]
WraithM has quit [Ping timeout: 252 seconds]
studybot_ has quit [Read error: Connection reset by peer]
manizzle has quit [Ping timeout: 264 seconds]
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tlockney_away is now known as tlockney
claudiuc has quit [Remote host closed the connection]
WraithM has joined #ocaml
studybot has joined #ocaml
johnnydiabetic has joined #ocaml
johnnydiabetic has quit [Client Quit]
smondet has quit [Ping timeout: 240 seconds]
malo has quit [Quit: Leaving]
nikki93 has quit [Read error: Connection reset by peer]
nikki93 has joined #ocaml
tnguyen has quit [Ping timeout: 240 seconds]
smondet has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest10921
sheijk_ has quit [Ping timeout: 255 seconds]
tlockney is now known as tlockney_away
dotfelix has joined #ocaml
tnguyen has joined #ocaml
dotfelix has quit [Ping timeout: 252 seconds]
tnguyen has quit [Ping timeout: 240 seconds]
dotfelix has joined #ocaml
pyon has quit [Quit: restart]
sheijk has joined #ocaml
tlockney_away is now known as tlockney
sheijk has quit [Ping timeout: 240 seconds]
divyanshu has quit [Quit: Computer has gone to sleep.]
dotfelix has quit [Quit: Leaving...]
Eyyub has quit [Ping timeout: 240 seconds]
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
sheijk has joined #ocaml
sheijk has quit [Ping timeout: 264 seconds]
divyanshu has joined #ocaml
lostcuaz has joined #ocaml
yacks has joined #ocaml
yacks has quit [Ping timeout: 245 seconds]
michael_lee has joined #ocaml
claudiuc has joined #ocaml
sheijk has joined #ocaml
sheijk has quit [Ping timeout: 240 seconds]
ygrek has joined #ocaml
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
axiles has joined #ocaml
studybot has quit [Remote host closed the connection]
csakatoku has joined #ocaml
Guest10921 has quit [Remote host closed the connection]
studybot has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
WraithM has quit [Ping timeout: 252 seconds]
WraithM has joined #ocaml
sheijk has joined #ocaml
tlockney is now known as tlockney_away
ygrek has quit [Ping timeout: 252 seconds]
sheijk has quit [Ping timeout: 240 seconds]
avsm has joined #ocaml
manizzle has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
yacks has joined #ocaml
claudiuc has quit [Remote host closed the connection]
edwin has joined #ocaml
edwin is now known as edwin3
zpe has joined #ocaml
jao has joined #ocaml
jao is now known as Guest54116
Guest54116 has quit [Ping timeout: 258 seconds]
avsm has quit [Quit: Leaving.]
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
ggole has joined #ocaml
j0sh has quit [Ping timeout: 276 seconds]
j0sh has joined #ocaml
Kakadu has joined #ocaml
csakatoku has quit [Remote host closed the connection]
yetanotherion has quit [Remote host closed the connection]
dotfelix has joined #ocaml
yacks has quit [Read error: Connection reset by peer]
yacks has joined #ocaml
ygrek has joined #ocaml
csakatoku has joined #ocaml
yetanotherion has joined #ocaml
dotfelix is now known as dotfelixb
dotfelixb has quit [Read error: Connection reset by peer]
edwin3 is now known as edwin
rand000 has joined #ocaml
madroach_ has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
madroach_ has quit [Read error: Connection reset by peer]
Nuki has joined #ocaml
madroach has joined #ocaml
Simn has joined #ocaml
rb__ has joined #ocaml
<rb__> Can someone help me understand the type assigned to c in this code? fun (c:Html5_types.div Eliom_content.Html5.D.elt) -> ()
<rb__> I don't understand what Eliom_content.Html5.D.elt does in there
madroach_ has joined #ocaml
madroach_ has quit [Read error: Connection reset by peer]
madroach has quit [Read error: Connection reset by peer]
<adrien> c : (Html5_types.div Eliom_content.Html5.D.elt)
<adrien> like (int array)
AltGr has joined #ocaml
edwin has left #ocaml [#ocaml]
<rb__> thanks adrien. Do I read it correctly as "an HTML element which is a div"?
<adrien> I don't know eliom so I can't be completely sure but it looks like this
<rb__> ok, thx!
madroach has joined #ocaml
<ggole> That some nesty code
<ggole> 's
<rb__> ggole, I don't get what you mean
<ggole> There's three levels of modules
<rb__> ggole, ha yes, indeed.
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
root_empire has joined #ocaml
eikke__ has joined #ocaml
<rb__> I'm calling a logging function returning nil as first statement in the if and else branch. To make it work I had to use the construction "let _ = .... in ...". Is that the way to go? I pasted the code here if it can make my question clearer: http://pastie.org/9171267
<ggole> If the return type is unit, you can foo (); ... instead of let _ = foo () in ...
<ggole> (The compiler will issue a warning if the type is not unit.)
<mfp> rb__: you're doing if foo then a; b else c; d change that to if foo then begin a; b end else begin c; d end
ikaros has joined #ocaml
nikki93_ has joined #ocaml
<rb__> mfp, I think you spotted the problem!
nikki93 has quit [Read error: Connection reset by peer]
<rb__> thx to both of you, it helps me learn faster!
racycle has joined #ocaml
maattdd has joined #ocaml
nikki93_ has quit [Remote host closed the connection]
rand000 has quit [Ping timeout: 250 seconds]
waneck has joined #ocaml
<whitequark> hmmm, I need a data structure advice
<whitequark> hm, I basically want a hash table, but persisted to disk
<whitequark> and with LRU eviction
<adrien_oww> http://www.reddit.com/r/programming/comments/25dsqf/better_namespaces_through_module_aliases_in_ocaml/ "If you are using modules purely as a namespace management device, then Prof. Harper will come into your home in the dead of the night and swap all the caps in your keyboard."
<adrien_oww> somehow I'm getting nostalgic that not everyone will get this :)
t4nk262 has joined #ocaml
<adrien_oww> and I'm wondering: why not build without the stdlib at all if you're going to use Core?
<whitequark> oh, the answer to my question is: http://symas.com/mdb/
<whitequark> adrien_oww: dunno. ask that in the reddit thread?
<adrien_oww> not my credentials with me ='(
<adrien_oww> (I need to either re-figure out my password or backup that cookie :D )
<mfp> whitequark: you might want to take a look at ocaml-leveldb if you don't want to write your own (mdb) bindings
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
<whitequark> mfp: oh, thanks
<whitequark> mfp: hm, do you mean I should reuse leveldb or that it could be adapted to mdb?
<whitequark> mfp: LMDB's zero-copy capability and crash recovery is quite important to me
<mfp> whitequark: that you can use LevelDB via ocaml-leveldb if you don't feel mldb's advantages (according to the page you gave) are worth writing your own bindings
root_empire has quit [Remote host closed the connection]
michael_lee has quit [Remote host closed the connection]
<whitequark> they are. and besides, I don't think that writing bindings is hard
<mfp> LevelDB doesn't give you zero-copy, so if you absolutely need that the choice's made for you
<whitequark> it's like two hours of work
<mfp> enjoy then :)
nikki93 has joined #ocaml
nikki93 has quit [Ping timeout: 245 seconds]
<whitequark> especially with ctypes
<whitequark> (but I really want cstubs first, to get static linking with -cclib -static eventually)
rand000 has joined #ocaml
AltGr has left #ocaml [#ocaml]
rand000 has quit [Ping timeout: 252 seconds]
jao has quit [Ping timeout: 276 seconds]
ontologiae has joined #ocaml
bobry has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
madroach has joined #ocaml
<bobry> Is there a way of deleting a project from OCaml Forge?
csakatoku has quit []
<whitequark> write the administrator
_andre has joined #ocaml
sheijk has joined #ocaml
Thooms has joined #ocaml
sheijk has quit [Client Quit]
hannes has joined #ocaml
<hannes> is there a straightforward way to limit oUnit2 to a single thread/process (I wasn't able to find any documentation about it, and it seems to use 3 on my computer)
AltGr has joined #ocaml
studybot has quit [Remote host closed the connection]
AltGr has left #ocaml [#ocaml]
<bobry> whitequark: it seems like this is the only option
AltGr has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
ddosia has quit [Quit: Leaving.]
<whitequark> hannes: ./test_foo -runner sequential
<hannes> whitequark: thx!
maattdd has quit [Ping timeout: 265 seconds]
rand000 has joined #ocaml
Thooms has quit [Quit: WeeChat 0.3.8]
nikki93 has joined #ocaml
<companion_cube> o/
nikki93 has quit [Ping timeout: 258 seconds]
<Drup> whitequark: for your db thingy, if you want to be slightly ambitious, you can look at ACIDState
<Drup> it's not gonna answer your question, but it may be interesting
<companion_cube> :)
eikke__ has quit [Ping timeout: 264 seconds]
eikke__ has joined #ocaml
maattdd has joined #ocaml
<companion_cube> whitequark: do you know qtest?
ygrek has joined #ocaml
maattdd has quit [Ping timeout: 258 seconds]
<whitequark> companion_cube: nope
<whitequark> companion_cube: or do you mean the qt thing?
<companion_cube> no, it's a testing framework in which tests are written in the source code itself
<companion_cube> in comments
<companion_cube> I think ppx could be a nice improvement on that
maattdd has joined #ocaml
<Drup> that would be trivial to implement in ppx
<Drup> you can do it by yourself
<companion_cube> yes, maybe
<companion_cube> but I'm apparently unable to do anything those days --
<Drup> just use @@@, since it's going to be ignored by the compiler without the ppx
<companion_cube> @@ you mean?
studybot has joined #ocaml
<Drup> depends
<Drup> depends where you want to attach the node
<whitequark> companion_cube: ohh, pa_test
<companion_cube> it should be a toplevel unit value, I think
<whitequark> companion_cube: it's [@@@]
<companion_cube> whitequark: it's in comments but well
<companion_cube> ah
<Drup> then @@@, yeah
<flux> they should allow numbers as part of operators. @3 !
<whitequark> [@@@] is a floating attribute
<companion_cube> [@@@test foo=bar] ?
<Drup> yes
<whitequark> basically like [%%], but ignored if not understood
<companion_cube> excellent.
<companion_cube> I've been wanting to use my own testing library inline :>
<Drup> (nih detected)
<whitequark> no, NIH'd testing libraries are ok
<whitequark> so far I don't know of a satisfying OCaml one
<Drup> whitequark: what don't you like in oUnit ?
<whitequark> Drup: ./test_foo -help
<whitequark> <20 lines of output>
<Drup> and ?
<whitequark> most of which I won't ever need
<whitequark> and more importantly, it doesn't have one obvious feature I *do* need
<Drup> oh, that's more important
<whitequark> running a set of tests by regexp
<whitequark> or glob
<whitequark> *anything* except specifying it in ounit's internal extra long and painful format
<companion_cube> Drup: sorry but I think my qcheck library is more complete than qtest's one
<companion_cube> reallyu
<whitequark> Drup: talking about acidstate
Ptival has quit [Ping timeout: 276 seconds]
darkf has quit [Quit: Leaving]
<whitequark> I would call it a Typical Haskell Library, which means it successfully works to demonstrate a cool and somewhat esoteric concept rooted deep in Haskell's features, but utterly ignores anything related to real-world problems
Ptival has joined #ocaml
<companion_cube> :D
<Drup> xD
<Drup> whitequark: something equivalent would still be useful from my point of view
<whitequark> I almost stopped reading after "After all, you can buy machines with 1TB of RAM these days."
<companion_cube> :DDD
<companion_cube> good argument
<whitequark> like, it deliberately takes control over memory placement from my hands in exchange for purity
<Drup> whitequark: oh yeah, that is bullshit
<whitequark> it's a good idea if you want to publish a paper
<whitequark> brb
<Drup> whitequark: the part that interest me is the persistent + statically typed aspect, which is not that easy to achieve
<companion_cube> you need ocaml-ty
<companion_cube> :D
<Drup> companion_cube: while still being not completely inefficient.
<companion_cube> weeeeell
<adrien_oww> Drup: it's not completely inefficient
studybot_ has joined #ocaml
<Drup> adrien_oww: using ocaml-ty in a database ? huuum.
<adrien_oww> ah
<adrien_oww> right :D
dotfelix has joined #ocaml
<companion_cube> Drup: well then what do you propose to make it typesafe? how does acid-state do it?
studybot has quit [Ping timeout: 240 seconds]
<Drup> badly
<Drup> (they use the haskell equivalent of ocaml-ty)
<Drup> (iirc)
AltGr has left #ocaml [#ocaml]
shinnya has joined #ocaml
<companion_cube> heh
AltGr has joined #ocaml
dotfelix has quit [Quit: Leaving...]
dotfelix has joined #ocaml
sjbx has joined #ocaml
<sjbx> hey, can someone help me out. i'm not seeing the documented behaviour for ounit. I'm running a suite that fails and i was expecting a non-zero exit status. i made a simple gist of a repro: https://gist.github.com/simonjbeaumont/9dbb0771baf616c3493d
<sjbx> opam tells me i'm using oUnit 2.0.0
dotfelix has quit [Quit: Leaving...]
rand000 has quit [Ping timeout: 240 seconds]
racycle has quit [Read error: Connection reset by peer]
racycle_ has joined #ocaml
ocp has joined #ocaml
<sjbx> i found that opening OUnit2 instead of OUnit and replacing the unit parameter with an _ (so it matches against a test_ctxt) caused it to work...
<sjbx> shame that opening OUnit module with OUnit 2 installed does not have the same behaviour as before upgrading, not backwards compatible with any test suites in behaviour
divyanshu has quit [Quit: Computer has gone to sleep.]
t4nk262 has quit [Quit: Page closed]
<companion_cube> sjbx: I guess that's why it's a major upgrade
<sjbx> yeah, but they've kept the OUnit namespace distinct from OUnit2
eikke__ has quit [Ping timeout: 240 seconds]
eikke__ has joined #ocaml
rz has joined #ocaml
ebzzry has quit [Remote host closed the connection]
ebzzry has joined #ocaml
AltGr has left #ocaml [#ocaml]
ebzzry has quit [Remote host closed the connection]
ebzzry has joined #ocaml
bobry has quit [Quit: Connection closed for inactivity]
zozozo has joined #ocaml
divyanshu has joined #ocaml
<whitequark> sjbx: the author of OUnit broke the exit result for OUnit.run_test_tt_main in OUnit2
rand000 has joined #ocaml
<sjbx> whitequark: ok, by 'broke' you mean it was a deliberate, active decision. Or that it looks like a mistake?
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
<ggole> Oh, if only software breaking could be assumed to be a deliberate decision -_-
racycle_ has quit [Ping timeout: 265 seconds]
<whitequark> sjbx: it's a mistake obviously
ontologiae has quit [Ping timeout: 255 seconds]
<whitequark> since ounit is not even on github, I didn't bother reporting that. you may want to.
<sjbx> ggole: i just wanted to check i understood ;)
<ggole> sjbx: oh, sure. I was just hatin' on computers, as one does.
<sjbx> the best vehicle for hatred by far
<ggole> When this one breaks, I think I'll go and become a monk.
<whitequark> oh, how many times I promised that to myself
thomassa has joined #ocaml
lostcuaz has joined #ocaml
olauzon has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
tlockney_away is now known as tlockney
rand000 has quit [Ping timeout: 240 seconds]
tautologico has quit [Quit: Connection closed for inactivity]
tlockney is now known as tlockney_away
nikki93 has joined #ocaml
maattdd has quit [Ping timeout: 276 seconds]
yacks has quit [Ping timeout: 250 seconds]
zpe has quit [Remote host closed the connection]
yacks has joined #ocaml
rgrinberg has joined #ocaml
maattdd has joined #ocaml
ocp has quit [Ping timeout: 252 seconds]
AltGr has joined #ocaml
olauzon has quit [Quit: olauzon]
tane has joined #ocaml
olauzon has joined #ocaml
Thooms has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
tautologico has joined #ocaml
Thooms has quit [Quit: WeeChat 0.3.8]
<Drup> whitequark: I don't find a "value_is_instr" function, is that normal ?
<whitequark> hm
<whitequark> what should it do?
<Drup> the same as value_is_block, but for instructions ?
<whitequark> match classify_value v with ValueKind.Opcode opc
<Drup> oik
<Drup> ok*
<whitequark> there's no other value_is_* functions except for basic blocks, I assume this is due to llbasicblock's existence
<Drup> whitequark: you do realize that the ocaml API is less typed than the C++ one ? :D
maattdd has quit [Ping timeout: 252 seconds]
<whitequark> umm, not really
<whitequark> well
<whitequark> yes, you're right
<Drup> x)
<Drup> I think I should just look here to understand the API : http://llvm.org/docs/doxygen/html/classllvm_1_1Value.html
<Drup> it makes more sense, to understand what I can apply on what
<whitequark> yep, that's the way
<Drup> whitequark: I still think the types in the ocaml api should reflect this hierarchy
<Drup> well, I will stop ranting about it and just propose a patch at some point
<whitequark> yep
<Drup> (not immediately, though)
tane has quit [Read error: Connection reset by peer]
tane has joined #ocaml
zpe has joined #ocaml
jwatzman|work has joined #ocaml
<whitequark> hm, I want an Lwt_lazy.t
<whitequark> that seems pretty tough to implement
<companion_cube> what do you mean?
zpe has quit [Ping timeout: 252 seconds]
<companion_cube> 'a Lwt.t lazy_t ?
<whitequark> well, why is lazy special syntax in OCaml? to make pattern matching on it possible
<whitequark> obviously, no
<companion_cube> it's special for 1/ pattern matching 2/ thunk creation
<whitequark> yes. I can create thunks manually, no big deal
<whitequark> val make : (unit -> 'a Lwt.t) -> 'a Lwt_lazy.t
<whitequark> but pattern matching is tough
<whitequark> I couldn't think of an extension that would work, so far
<Drup> there is also the gc trick.
<whitequark> like, what would you rewrite match foo with [%lwt_lazy x] -> x to?
<whitequark> or not even that
racycle_ has joined #ocaml
<whitequark> like, what would you rewrite match foo with [%lwt_lazy (`A x)] -> x to?
ocp has joined #ocaml
<Drup> match foo with __thingy -> let `A x = Lwt_lazy.force __thingy in x
tane has quit [Quit: Verlassend]
<companion_cube> Lazy.force y >>= function `A x -> x
<whitequark> now what if foo is an unforced `B ?
<Drup> whitequark: it wouldn't typecheck ?
<companion_cube> you'd have other cases
<whitequark> companion_cube: you must go to the next branch of the "match foo"
<whitequark> but you've already committed to this branch
<companion_cube> whitequark: you need to process all the pattern branches at once I guess
<whitequark> well
<smondet> whitequark: `lazy` is also a special case of thing you can put on the right side of a `let rec x = ...`
<companion_cube> same as for (lazy _) patterns
<whitequark> I don't know how
<whitequark> I clearly need a guard, so something like
<Drup> I don't understand the issue
<Drup> I mean
jwatzman|work has quit [Quit: jwatzman|work]
<Drup> just force then pattern match
<whitequark> Drup: but I don't want to force in this case: match bar with BarInline x -> x | BarLazy [%lwt_lazy x] -> x
<whitequark> it would just make matching on lazy useless
<whitequark> (imagine trying to dissect an infinite stream at some point x, for example, to see what's wrong)
maattdd has joined #ocaml
<Drup> ok, I see, that's not the real issue here
<whitequark> I wonder about this: match foo with { cell = Value (`A x) } -> x | { cell = Thunk _ } as th when (match Lwt_lazy.force th with `A x -> true | _ -> false) -> match Lazy.force th with `A x -> (code) | _ -> assert false
<whitequark> that looks like it could work
<Drup> whitequark: you are just trying to reimplement the prefix tree construction done in the compiler
<whitequark> yep
<Drup> then, you can look at the paper describing it.
jwatzman|work has joined #ocaml
<companion_cube> it's not really necessary to do the full prefix tree
<whitequark> what companion_cube says
<Drup> yeah, but it's the same
<companion_cube> the problem is how to gather all [%lwt_lazy] patterns
<whitequark> hm
<Drup> (btw, my opinion is that this syntax extension wouldn't really be useful)
<companion_cube> and then, transform into | (lazy x) -> x >>= function (all lwt patterns here)
<Drup> (just use unit functions, you can't reproduce the gc trick anyway)
<companion_cube> I agree that lazy Lwt values sound weird
<whitequark> Drup: what gc trick?
rand000 has joined #ocaml
<Drup> whitequark: when a lazy value is forced, the gc silently replace the value to avoid the indirection for next access
<whitequark> Drup: I don't care about that
<Drup> well, that's the only point of lazy values
<whitequark> wat?
<Drup> except that, they are strictly less good than unit functions
<whitequark> what I don't like about unit functions is that you can't pattern-match on them
<Drup> do you really pattern match on lazy value all that often ?
<whitequark> in fact I want general facilities for extending the pattern matching, it's not just for Lwt_lazy.t
<Drup> oh
<whitequark> stuff like pattern-matching an Unicode string
<Drup> that's another question
<whitequark> well, I do want Lwt_lazy.t as well
<Drup> that's easier, you don't have to deal with the prefix thingy
<companion_cube> whitequark: match x with {|stringpattern|} -> ... ?
maattdd has quit [Ping timeout: 265 seconds]
<whitequark> companion_cube: syntax doesn't matter, the issue is matching on values of abstract type
<Drup> whitequark: did you take a look at sedlex ?
<whitequark> Drup: I even sent a PR to it, what about it?
<Drup> my understanding is that it did stuff like that
<Drup> whitequark: why are the name of Opcode.t not the same than the name of the classes ? :(
<whitequark> not really, it takes the regular match statement and replaces it with something else whatever
<chris2> anyone use tuareg with |>?
<whitequark> Drup: like where?
<Drup> whitequark: like everywher ?
<whitequark> chris2: you're here too?!
<chris2> i'm everywhere :P
<companion_cube> oh, ppx_bitstring will exist too I guess
<whitequark> ppx_bitstring is similarly simple
<whitequark> it doesn't *extend* the match construct, it replaces it
<whitequark> I want to extend
<Drup> whitequark: I think you just want to replace some subpart of the tree, in practice
<Drup> we could implement a little something the "prefixises" the tree according to an extension
<whitequark> that was the idea
<companion_cube> Drup: there's an issue though
<companion_cube> match x with | [%lwt_lazy 1] -> 1 | _ when yolo -> 2 | [%lwt_lazy 3] -> 3 | ....
<whitequark> Drup: also re GC trick: I could probably do it with a little magic
rb__ has quit [Quit: Leaving]
<companion_cube> here you can't merge the two lwt_lazy cases because there's a guard in between them
<Drup> companion_cube: that's the issue, you quickly get into corner cases that are handled by the prefix tree construction of ocaml
<companion_cube> yes yes
<Drup> which is something I wouldn't like to do
<companion_cube> because to know whether the first case matches, you need to wait on an Lwt value
<companion_cube> unless... you do match x with (lazy l1) -> l1 >>= (function 1 -> 1 | _ when yolo -> 2 | 3 -> 3 | ....)
<Drup> whitequark: anyway, with the syntax extension, it doesn't matter how it's implemented
<whitequark> although I don't really need it all that badly
<whitequark> the solution seems worse than my immediate problem
<Drup> it probably is
<companion_cube> what I don't get is the lazy part
<companion_cube> why do you need it?
<whitequark> why do I need lazy lwt values?
<whitequark> or pattern matching on them?
<companion_cube> lazy lwt values
<Drup> in the long run, such helper library for ppx might be interesting
<companion_cube> I mean, it implies starting side effects depending on evaluation of a thunk
<companion_cube> so impredictible
<whitequark> oh, well, in my case it's backed by a persistent data structure
<whitequark> so no side effects possible
<whitequark> except when the network interaction fails, so maybe you're right too, after all
<Drup> whitequark: it's to make the DB access on demand with the binding ?
<whitequark> not really
<Drup> ok, no relation to lmdb ? :p
<whitequark> no relation. I have a DAG stored at the server, where each node can be retrieved by its hash
<whitequark> so basically I want to traverse this DAG, which is obviously immutable from its definition, but without downloading all parts of it prior to traversing
<whitequark> download them on-demand
<whitequark> say I have a path /foo/bar/baz.txt. first I force the root directory. find the entry for "foo". force it. find the entry for "bar". etc
<Drup> whitequark: instead of having a lazy like interface
<whitequark> Drup: lmdb would cache parts of that DAG (and precomputed info like file chunk hashes) locally
<eikke__> you can construct a DSL to achieve that :)
<Drup> wouldn't be possible to have some tweak in lwt's scheduler that will make not execute some stuff unless absolutly needed ?
<whitequark> eikke__: that's what we've been discussing...
<whitequark> Drup: wat?
<eikke__> whitequark: Simon Marlow had a talk at ZuriHac last year about his (Haskell) work at Facebook which is somewhat related, IIRC
<whitequark> no, Lwt starts executing threads until something inside blocks. that's a core part of lwt and basically everything depends on it
<Drup> whitequark: you could implement special values that behave slightly differently, but yeah, I suppose it's not a good idea
<whitequark> eikke__: thanks
AltGr has left #ocaml [#ocaml]
<eikke__> yw
<companion_cube> ok, now I see, it's really to delay the Lwt computation
<whitequark> yep
<whitequark> lazy is actually not at all a good interface for this anyway, due to network errors
<whitequark> or that the graph can possibly be malformed and the element could just go missing
<whitequark> that needs to be handled explicitly
<companion_cube> yes yes, lazy isn't enough
<eikke__> you could let the computation produce an Either-like result of course, handling errors that way
<whitequark> eikke__: well, I do
<whitequark> but I then need to retry it if it's say `Unavailable
<whitequark> and once forced, lazy is forever in that state
boogie has joined #ocaml
<whitequark> (`Unavailable means a temporary network error)
<whitequark> brb
<companion_cube> I think exception patterns are going to be great
<companion_cube> it will make implementing some kinds of iterator much much easier
<Drup> do we actually need finally, since we have that now ?
tane has joined #ocaml
<ggole> How does that replace finally?
<ggole> Unless you mean that the user can write the finalization code twice (or more).
Arsenik has joined #ocaml
tianon has quit [Ping timeout: 240 seconds]
tianon has joined #ocaml
<Drup> whitequark: why is there Invalid and Invalid2 in Opcode.t ?
<ggole> Half-assed guess: dead instructions are rewritten to contain Invalid (to catch any mistakes in passes which remove them)
<Drup> Invalid is in case you ask the opcode of something that is not an instruction
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
Submarine has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
<companion_cube> epoch 1400000000 \o/
<Drup> ggole: the funny bit being that "instr_opcode : llvalue -> Opcode.t" with "Invalid" part of Opcode.t
<Drup> but "icmp_predicate : llvalue -> Icmp.t option"
<Drup> (with no invalid inside of Icmp.t)
<ggole> Hmm
<Drup> I like consistency in APIs
<Drup> :D
thomassa has quit [Remote host closed the connection]
Hannibal_Smith has joined #ocaml
manizzle has quit [Ping timeout: 245 seconds]
rand000 has quit [Read error: Connection reset by peer]
rand000 has joined #ocaml
maattdd has joined #ocaml
fraggle_ has quit [Ping timeout: 265 seconds]
maattdd has quit [Ping timeout: 240 seconds]
ikaros has quit [Quit: Ex-Chat]
q66 has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
tlockney_away is now known as tlockney
testcocoon has joined #ocaml
Kakadu has quit [Ping timeout: 240 seconds]
<Drup> whitequark: is get/hasName in the binding ? I don't find it
malo has joined #ocaml
manizzle has joined #ocaml
manizzle has quit [Remote host closed the connection]
manizzle has joined #ocaml
jao has quit [Ping timeout: 252 seconds]
def-lkb is now known as def`
Simn has quit [Ping timeout: 265 seconds]
claudiuc has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
tane has quit [Quit: Verlassend]
Simn has joined #ocaml
zpe has joined #ocaml
ontologiae has joined #ocaml
<whitequark> Drup: ggole is right
<whitequark> it's binary compat with LLVM-C API
<whitequark> just Invalid | Invalid2 -> [%yolo it]
Kakadu has joined #ocaml
<Drup> well, not Invalid
<adrien> nooooooo, companion_cube's disease is contagious ='(
<whitequark> adrien: hm?
<Drup> since it can be returned if the llvalue is not an instruction
<adrien> whitequark: "yolo" ='(
<whitequark> Drup: btw, value_name / set_value_name
<whitequark> and if there's no name it returns ""
<Drup> ok
<companion_cube> adrien: \o/
<Drup> whitequark: I want a map of value/block, can I hash them ?
<whitequark> yes
<Drup> marvelous.
<Drup> (Is there a comparison function too ? :D)
<whitequark> the builtin one should work
<whitequark> types are structurally uniqued, values are just uniqued
<Drup> fabulous
<Drup> do they have an id or something ?
<whitequark> hm?
<whitequark> they're internally represented by thin pointers
<whitequark> and if I understand the polymorphic hash function correctly, it's bijective on pointers, so you could use hash llty/llval as id
<Drup> so it's going to be reasonably fast
<Drup> (that was the underlying question)
<whitequark> ah
<whitequark> yeah, just use hash.
<adrien> companion_cube: ='(
<Drup> whitequark: same for comparison, I suppose
<whitequark> yep
<Drup> (I'm not sure if I'm going to use a persistent or not map)
claudiuc has quit [Remote host closed the connection]
tlockney is now known as tlockney_away
tlockney_away is now known as tlockney
ocp has quit [Ping timeout: 240 seconds]
ontologiae has quit [Ping timeout: 240 seconds]
claudiuc has joined #ocaml
claudiuc has quit [Remote host closed the connection]
ocp has joined #ocaml
zpe has quit [Remote host closed the connection]
claudiuc has joined #ocaml
tobiasBora has joined #ocaml
ocp has quit [Read error: No route to host]
ocp has joined #ocaml
Eyyub has joined #ocaml
claudiuc_ has joined #ocaml
claudiuc has quit [Ping timeout: 276 seconds]
malo has quit [Ping timeout: 240 seconds]
Eyyub has quit [Ping timeout: 255 seconds]
ocp has quit [Ping timeout: 276 seconds]
demonimin has quit [Ping timeout: 265 seconds]
ocp has joined #ocaml
ocp has quit [Client Quit]
tlockney is now known as tlockney_away
Hannibal_Smith has quit [Quit: Sto andando via]
tlockney_away is now known as tlockney
malo has joined #ocaml
Eyyub has joined #ocaml
ollehar has joined #ocaml
<ggole> Is == a reasonable way to implement Hashtbl.HashedType.equal? (The hash itself looks at some unique structural elements.)
_andre has quit [Quit: leaving]
<mrvn> no
<mrvn> the hash function will likely produce a new instance of the value every time and then == won't be true
<whitequark> well, isn't an overapproximation safe?
<ggole> Is == applied to the hash?
<ggole> It can't be O_o
<whitequark> to the value
<mrvn> right. same reasoning
<mrvn> a new instance of the value won't match
<ggole> That's fine, they are mutable objects and I want them tabled by identity.
<mrvn> is your identity an int?
<whitequark> it's called "hashconsing"
<whitequark> and yeah, it's done by adding an unique int and comparing with ==
<mrvn> for int = = ==
<ggole> The type *contains* an int
<ggole> That's what I'm hashing on
<mrvn> but since it is unique just compare it in your equal function
<ggole> I could indeed do that, but I want to know if == works
<whitequark> it does, I've used it
<whitequark> (and it logically does work as well)
<mrvn> ggole: == will fail if you create a new instance of the same value. But then your id wouldn't be unique.
<ggole> I can't create the same mutable object again.
<ggole> If I create another one, it's a different mutable object.
<mrvn> there you go then
<ggole> Of course I have to make sure that the ids reflect that, but that's all taken care of.
<mrvn> for unique objects = = ==, except that = might go into an endless loop
<ggole> Er, what?
<mrvn> ggole: if your structure is cyclic then = will never end
<mrvn> == simply compares the address so it returns directly.
<ggole> Sure, but that doesn't make = the same as ==
<mrvn> ggole: no, the uniquness does
<ggole> Oh, I see what you mean. Right.
<mrvn> If a = b but not a == b then a isn't unique
zpe has joined #ocaml
Thooms has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
tlockney is now known as tlockney_away
tlockney_away is now known as tlockney
yacks has quit [Ping timeout: 265 seconds]
bitbckt has quit [Ping timeout: 252 seconds]
Nuki has quit [Remote host closed the connection]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
bitbckt has joined #ocaml
bitbckt has joined #ocaml
bitbckt has quit [Changing host]
shinnya has joined #ocaml
racycle_ has quit [Quit: ZZZzzz…]
demonimin has joined #ocaml
ggole has quit []
axiles has quit [Remote host closed the connection]
tobiasBora has quit [Quit: Konversation terminated!]
racycle has joined #ocaml
habnabit is now known as _habnabit
ontologiae has joined #ocaml
ontologiae has quit [Ping timeout: 245 seconds]
ia0 has quit [Quit: leaving]
jao has quit [Ping timeout: 264 seconds]
Eyyub has quit [Ping timeout: 255 seconds]
ia0 has joined #ocaml
eikke__ has quit [Ping timeout: 252 seconds]
Arsenik has quit [Remote host closed the connection]
Eyyub has joined #ocaml
ollehar1 has joined #ocaml
rz has quit [Quit: Ex-Chat]
lostcuaz has quit [Quit: Textual IRC Client: www.textualapp.com]
Kakadu has quit [Quit: Konversation terminated!]
ygrek has joined #ocaml
ygrek_ has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
NoNNaN has quit [Ping timeout: 272 seconds]
Eyyub has quit [Ping timeout: 240 seconds]
maattdd has joined #ocaml
NoNNaN has joined #ocaml
maattdd has quit [Ping timeout: 276 seconds]
Submarine has quit [Remote host closed the connection]
Eyyub has joined #ocaml
divyanshu has joined #ocaml
divyanshu has quit [Client Quit]
eikke__ has joined #ocaml
ollehar1 has quit [Quit: ollehar1]
Eyyub has quit [Ping timeout: 255 seconds]
Simn has quit [Quit: Leaving]
Thooms has quit [Ping timeout: 265 seconds]
divyanshu has joined #ocaml
rand000 has quit [Quit: leaving]
maattdd has joined #ocaml
darkf has joined #ocaml
Eyyub has joined #ocaml
ygrek_ has quit [Ping timeout: 245 seconds]
studybot_ has quit [Read error: Connection reset by peer]
eikke__ has quit [Ping timeout: 276 seconds]
ontologiae has joined #ocaml
WraithM has quit [Remote host closed the connection]
ontologiae has quit [Ping timeout: 265 seconds]
madroach has quit [Ping timeout: 252 seconds]
madroach has joined #ocaml
ollehar has quit [Ping timeout: 255 seconds]
Eyyub has quit [Ping timeout: 264 seconds]
WraithM has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
ontologiae has joined #ocaml
waneck has quit [Ping timeout: 240 seconds]
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
maattdd has quit [Ping timeout: 252 seconds]
Eyyub has joined #ocaml
jpeeters has joined #ocaml
<jpeeters> Hi everyone
<jpeeters> where can I find a clear and precise procedure to cross-compiler ocaml for ARM?