adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml MOOC http://1149.fr/ocaml-mooc | OCaml 4.02.3 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
<seliopou> stdlib, batteries, and core; lwt and async; js_of_ocaml and ocamlscript
<seliopou> i suppose 12 combinations is a manageable number
<seliopou> :/
shinnya has joined #ocaml
<Drup> seliopou: yeah, I'm not entousiastic about the thing, to put it midly
<cody`> don't forget containers
lokien_ has quit [Quit: Connection closed for inactivity]
<seliopou> cody`: sorry :P
<seliopou> Drup: did anybody reach out about it?
<Drup> reach to what ?
<Algebr`> Drup: I'm kind of suprised, he didn't talk to anyone from js_of_ocaml team?
<cody`> he did
<seliopou> like did somebody from bloomberg say, "btw, we're contemplating/working on/are releasing a fork)
<Drup> he did
<Drup> but, I mean, this bug report doesn't make sense, and that's what I told him
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
struk|desk2 is now known as struk|desk|away
<Algebr`> wow, this was a while in the making then. Kudos to bob then, this was a great amount of work.
mort___ has joined #ocaml
<seliopou> jesus
<Drup> Algebr`: I'm sorry, but I'll have to disagree
jgjl has joined #ocaml
damason_afk has joined #ocaml
<Algebr`> Drup: it was not a great amount of work?
<Drup> Yeah, this was a great amount of work, and I strongly believe it would be 100% better if it has been spent to improve jsoo
<Drup> I don't like to hope projects will die, because that's just bad, because I hope this one will not catch one, because I don't want incompatible js compilers in the community
<nullcatxxx_> it starts as a personal project, and then he open sourced it
<nullcatxxx_> besides his daily work
kakadu has quit [Remote host closed the connection]
groovy2shoes has quit [Quit: Leaving]
<Drup> nullcatxxx_: he's doing it for his work, not for his personal amusement.
<Algebr`> Drup: there must have been motiviation, those motiviations were legitmate. I think getting getting readable JS code is great and mapping an ocaml module to an ES6 module is good too
<nullcatxxx_> it started as a personal work, he said that...
<nullcatxxx_> whatever... I hope I can learn something from IR translation.
<Drup> nullcatxxx_: have you looked at flambda ?
<Drup> the code is very readable
<nullcatxxx_> not yet. will read it
<nullcatxxx_> they write comments. that's nice
<Algebr`> Drup: why not have js_of_ocaml just be a different backend for ocamlc?
<Algebr`> instead of having a separate compiler
groovy2shoes has joined #ocaml
<Drup> because that's a huge amount of work to maintain
<Drup> js_of_ocaml is *not* a separate compiler, it takes bytecode
shinnya has quit [Ping timeout: 276 seconds]
mort___ has quit [Quit: Leaving.]
ril is now known as ril[away]
<nullcatxxx_> it's not a separate compiler...
ril[away] is now known as ril
<nullcatxxx_> ocamlscript and js_of_ocaml all start from bytecomp/
<nullcatxxx_> no one wants to write out and maintain typing/ ...
<Drup> nullcatxxx_: ocamlscript is a real backend, iiuc, not from bytecode
<nullcatxxx_> it transforms lambda, right?
damason_afk has quit [Remote host closed the connection]
yegods has joined #ocaml
zpe has joined #ocaml
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Drup> or clambda, you'll have to look.
<Algebr`> Drup: gotta admit though, any publicity for OCaml is good publicity.
<Drup> short term, yeah. Long term, in this precise case, I'm not so sure
<Algebr`> let's see if fb runs with it...then I'd be worried for jsoo
zpe has quit [Ping timeout: 245 seconds]
madroach has quit [Ping timeout: 246 seconds]
madroach has joined #ocaml
<Drup> Algebr`: the whole Async/Lwt thing is already quite catastrophic, in the grand scheme of things, I what you say happen, it'll already be too late
<Drup> If*
Guest83534 has quit [Changing host]
Guest83534 has joined #ocaml
Guest83534 is now known as wolfcore
<seliopou> another js compiler is gonna complicate my work for the next year
<seliopou> not to mention the d3 bindings
<Drup> You don't have to target both
<Drup> You don't target both lwt and async in your code :)
<seliopou> priority #1 for all the ocaml libraries I write: I don't want to give anybody an easy reason not to use it
<seliopou> that means supporting both lwt and async
<seliopou> at some cost to useability that I try to minimize at all costs
<seliopou> that was a poorly constructed sentence
<Drup> in this case, I don't see how it's going to happen without basically rewritting the whole thing
<seliopou> yes
<seliopou> and also
<seliopou> the ffi looks like it can't do everything that jsoo can do
<seliopou> and also javascript and modules is a contradiction in terms
<Drup> I simply don't know the ES6 module system to say anything about this idea
<seliopou> and also manual casting is still a thing you have to do at ocaml/js boundaries
<Drup> but frankly, just ignore it for now, it doesn't support the whole language anyway
<seliopou> meh
<seliopou> somebody should register ocamlnihilist.com
<Algebr`> seliopou: that's not true, es6 modules are fine, regular node modules. I already make them in jsoo, this just makes it easier.
<Algebr`> I'm not going to rewrite anything, and the Async/Lwt thing, most open source stuff uses Lwt anyway, so what's the big deal.
<Algebr`> but this would make debugging much easier
<Drup> Algebr`: aren't sourcemap enough ?
<Algebr`> hassle
<Drup> how ?
<Algebr`> just a hassle, yet another file to deal with. with this I could just open up the node debugger just fine
<yminsky> You can generate sourcemaps that go in the js file...
<Algebr`> how
<yminsky> --source-map-inline
<yminsky> It's pretty awesome being able to put breakpoints in your ml code, or see a stack-trace point to the correct OCaml file.
<Algebr`> appreciated, thanks
mort___ has joined #ocaml
badon has quit [Quit: Leaving]
<yminsky> soliopou: you're right about diffable data structures being a lot like d3's data bind. The difference is that you don't think explicitly about adding, updating and removing; you just write the add, and everything is handled automatically.
<yminsky> It's worse for animations, for sure. But it's simpler.
<yminsky> And having an incremental/react-like monad for combining the computations is a rather nice programming idiom.
mort___ has quit [Client Quit]
<Drup> after having played with seliopou's binding, my conclusion is that D3's API is fundamentally not safe, and based on design patterns to be usable
<Algebr`> Drup: what do you mean
<yminsky> I think soliopou hasn't quite given up on a type-safe API for it yet.
<Drup> the binding tries to leverage those design patterns, and is pretty successful at it, but it still sucks.
<Algebr`> ah
<yminsky> Clearly the current one is not safe.
<Drup> and frankly, I don't really care about the whole selection things, what I want are the primitives for the visualisation, and those are not taken independent of the whole selection thingy, inside d3-shape
<Drup> now*
<yminsky> It does make some pretty pictures, though...
<Drup> yminsky: well, yes, we need to bind d3-shape
<Drup> and get read of this whole selection thing
<Drup> we have type safe abstractions for that in OCaml already, we don't need d3's thing for that.
<Drup> rid*
<yminsky> Well, you need some way of efficiently updating the Dom. d3 provides one. If you want to dump it, you need something else.
<yminsky> virtual-dom is a different approach that I think is semantically easier.
<yminsky> But it doesn't give you as a good of a story for interstitial animations.
<yminsky> And virtual-dom is also quite tricky to make efficient.
<Drup> yminsky: 90% of the visualisation I want don't need very efficient updating ...
<yminsky> (that's why I'm playing around with Incremental, to incrementalize the recomputation of the virtual dom on model change, and to preserve physical equality.)
<Drup> (or rather, jsoo/eliom's reactive dom is more than enough)
<yminsky> Well, then virtual dom will make you happy. I care about highly interactive UIs, which definitely require this.
govg has quit [Ping timeout: 256 seconds]
<yminsky> I don't fully understand that approach yet. I need to talk more to Hugo...
<Drup> it's basically React + diffing, really
<Drup> nothing crazy about it
govg has joined #ocaml
<Drup> (with an internal ADT, virtual dom style)
<yminsky> Do you diff the resulting Dom? Or does the diff somehow get inferred by which Signal nodes fire?
<Drup> the later
<Drup> well, actually, both, it doesn't matter
Denommus has quit [Quit: going home]
<yminsky> If you just return a Html.t Signal.t, such that the Html.t if computed efficiently, that seems like all you need.
<Drup> the Signal.t is internalized in Html.t
<Drup> but yes
<yminsky> Since an efficiently computed Html.t must share many nodes with the previous one, and so the diff should be efficient.
<yminsky> Given that, why internalize the Signal.t?
<Drup> yminsky: to mix reactive and non reactive html
<Drup> you haven't tried tyxml ?
<Drup> https://github.com/talex5/js-skeleton this is a nice short example
<yminsky> Not yet.
git-commit has joined #ocaml
<Drup> (pretty sure we could make a version with incremental instead of react pretty easily, btw)
<Drup> (we already have all the functors in place for monadic FRP)
<yminsky> For my purposes, I'm not sure the embedding of the monad inside the tree is really a win. You can always use Signal.map to merge ordinary code into the monadic world.
<git-commit> Hi all. Is anyone here willing to out help a beginner in understanding a small snippet of OCaml code and figuring out what language features are used for further reading?
<Drup> git-commit: don't ask to ask :)
<yminsky> git-commit: I'm sure someone will be happy to help.
<yminsky> Drup: though I guess it might make it easier for people who aren't willing to swallow the monad...
<Algebr`> yminsky: I want one of those enter the monad Tshirts.
<Drup> yminsky: what is easier ?
<yminsky> Algebr': they are pretty great. Next time you're in NY, you should visit....
<Algebr`> I want to do a meetup in SF for OCaml, maybe a showcase of ocaml -> js
<Drup> using a specific monad with specific combinators without being ever told it's a monad is not difficult
<Drup> (especially FRP ones, where you basically never use bind)
<yminsky> Drup: map is indeed pretty easy.
<yminsky> Algebr': send me an email. It might be possible to convince us to send over a box of shirts...
<git-commit> Okay great, I have the following snippet that is supposed to be part of a simple lexer: https://gist.github.com/git-commit/5100e6f4b20b334318c0 First Question about the lexwhile function: The 'let tok,rest = [...] c^tok,rest' part is quite unclear to me
<yminsky> Drup: I actually think instead of FRP you mostly need SAC (self-adjusting computations), which do support bind, but don't support history-sensitive operations. The dynamism of bind is very valuable in general, and for UIs I think it will make dynamism easier.
<Drup> yminsky: I counted both really, you still don't use the bind very often.
<Drup> ocasionally, yeah, but not often
<yminsky> Drup: Agreed. Bind is more costly, so you should keep them down. But it still adds real expressiveness which is quite valuable when you need it. At least, for the more complex, non-UI examples I've seen. I'm mostly guessing about the utility in UIs.
<Drup> git-commit: open a toplevel and type this:
<Drup> let foo = (1,2) ;;
<Drup> let a, b = foo ;;
<Drup> yminsky: No argument on that
<Drup> (it's in react too, and it has it's uses)
<yminsky> git-commit: the code is formatted in an especially confusing way. Maybe this is easier? https://gist.github.com/yminsky/0169064d7de6a1a6dceb
<Drup> yminsky: I would add parens around the tuples too
<yminsky> Fair.
<yminsky> There, all pretty now.
<git-commit> yminsky, great that formatting helps alot. The books seems to do a horrible job in formatting the code.
<yminsky> OK, OCD fully worked out now.
<yminsky> git-commit: where did you get the code snippet?
<Drup> my instinct is telling me "teacher"
<yminsky> (oh, never mind, I just made it worse..)
<yminsky> Drup: Yup.
<git-commit> yminsky, Handbook of practical logic and automated reasoning by John Harrison
<Drup> oh ! I was wrong
<git-commit> Drup, so (tok,rest) are assigned the results of the recursive call?
<Drup> yes, it decomposes the tuples and assign each part
FreeBirdLjj has joined #ocaml
<Algebr`> yminsky: sent, much appreciated.
<git-commit> What about the 'in c^tok, rest' part? I figure it prepends c to tok but how is the syntax to be interpreted in a general way (maybe a hint to the docs)?
<Drup> (^) is concatenation of strings
<git-commit> What about the in keyword?
<Drup> it's part of the let
<Drup> let .. = .. in ...
<git-commit> Drup, okay I'll do some digging. I guess it shows I haven't seen any FP language before today :<
govg has quit [Ping timeout: 276 seconds]
<Algebr`> git-commit: don't sweat it :)
tnguyen has joined #ocaml
tnguyen is now known as Guest19627
<git-commit> Great I think I've understood the syntax :) Thanks for the help Drup and yminsky
badon has joined #ocaml
<wolfcore> I've been trying to get utop to run a function that includes printf, but the printf never gets shown
<wolfcore> print_string does work, but printf doesn't
<wolfcore> I mean when loading a function into the repl and then running it
<Drup> do you flush ?
<wolfcore> Correction: print_string doesn't work either, they both work from the repl though
<wolfcore> Drup: just calling flush after the print calls?
<Algebr`> show code
<wolfcore> oh I think I figured it out, I was trying to do `let test_fun = printf "asdf"` but that was just unit because it's the return type
<wolfcore> If you make it `let test_fun x = printf x` then it works
<lostman> is there anyone familiar with react around? I've been trying to get something that produces 'a event event but can't quite get it right
<lostman> let (tick_new_ee : 'a event event) = E.fix (fun d -> tick_new, E.stamp tick_new d)
govg has joined #ocaml
<lostman> ^ this almost works but internal events are triggered multiple times
pyon has joined #ocaml
<Drup> heh, do you *really* want a fixpoint ?
<Drup> why not just use E.create ?
wolfcore has quit [Quit: bye!]
wolfcore has joined #ocaml
iorivur has quit [Ping timeout: 272 seconds]
govg has quit [Ping timeout: 260 seconds]
struk|desk|away is now known as struk|desk2
dexterph has quit [K-Lined]
dexterph has joined #ocaml
Algebr` has quit [Ping timeout: 250 seconds]
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
FreeBirdLjj has quit [Ping timeout: 255 seconds]
FreeBirdLjj has joined #ocaml
<lostman> Drup: I think I really *need* a fixpoint here because I need d to occur after tick_new; otherwise one of them will be swallowed
<lostman> the idea is this: I have some 'a event happening. I aggregate them so I get 'a event only when new unseen 'a occurs (when that happens I want to add a UI element), so I want 'a event event such that when 'a event event occurs I can get 'a event for which I can build my UI
<lostman> so my understanding is that both 'a e e and the 'a e I get from it cannot occur at the same time
jimt has quit [Ping timeout: 276 seconds]
<Drup> it sounds like you already have a 'a E.t E.t
<Drup> why are you trying to make knots with E.fix
<Drup> let me rephrase
<Drup> you have an E.t x such that each event is a new widget
<Drup> and a widget is reprensented by the event of values it contains ?
jimt has joined #ocaml
<lostman> no, I have one stream of 'a (json) that I want to split into different streams. and for each new 'a I want to build a widget and only update that widget when 'a e ticks with new value for that particular 'a
<lostman> I can aggregate this stream so I end up with uistate event but then I have to rebuild my whole ui on every tick
<Drup> why are the base stream split to begin with ?
<Drup> why isn't*
<lostman> json messages are coming in from websocket and I pipe it into an event
<Drup> is the number of split known ?
<lostman> no, it's dynamic
<Drup> I see
jeffmo has quit [Quit: jeffmo]
<lostman> I could easily make a static ui where each subwidget updates by itself but can't figure out how to make dynamic one
NingaLeaf has joined #ocaml
<Drup> how do you classify your events ?
Stalkr_ has quit [Quit: Leaving...]
<lostman> I fold the original event stream and have a 'a StringMap.t as accumulator. So I made 'a event that only occurs whenever brand new 'a occurs (where 'a is some json object with an identifier)
<lostman> I was hoping to drive the dynamic UI from that
<Drup> I'm starting to see your whole scheme
<lostman> I know there are some problems with react+jsoo and weak references
<Drup> that changes only memory consumption, not semantics
<lostman> try this in utop:
<lostman> let e,f = E.create () in
<lostman> let (ee : int event event) = E.fix (fun d -> e, E.stamp e d) in
<lostman> let _epr = E.map (E.trace (printf "ee=%d\n")) ee in
<lostman> f 1; f 2; f 3; f 4; f 5;;
<lostman> that prints 1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5
<lostman> but if you call f after that, it only prints one number
<Drup> you don't need fix for this
<lostman> so how do I do this?
<Drup> gimme a sec
<lostman> sure
psy_ has quit [Ping timeout: 272 seconds]
ollehar1 has joined #ocaml
ollehar has quit [Ping timeout: 255 seconds]
ollehar1 is now known as ollehar
cojy has joined #ocaml
<cojy> is/will the "effects" stuff coming going to be type safe against unhandled effects?
<cojy> last time i heard, it wasn't
<lostman> cojy: dont' think so. I don't recall any work on the type-system level
<cojy> :S that's kind of gross no?
<Drup> cojy: not grosser than exceptions
<cojy> is there no way to encode that stuff in the type system like oleg does with his Eff in haskell?
<Drup> "it's complicated"
<cojy> is it possible with existing things, if even verbosely?
<Drup> you can do some things, but it's quite limited
<Drup> lostman: it seems to work well
<cojy> i haven't studied it enough, i thought it would be possible taking the "higher" approach
<Drup> (and I think it's what you were looking for ...)
<cojy> also i assume computations won't be serializable like with oleg's delimcc library?
psy_ has joined #ocaml
<Drup> I don't have more info than that
mac10688 has quit [Ping timeout: 265 seconds]
ygrek has quit [Ping timeout: 260 seconds]
darkf has joined #ocaml
<lostman> Drup: thanks a lot. it looks like it does exactly what I wanted to do. will have to read it in detail
<Drup> cool
<lostman> I wonder if I could just make Tyxml on top of virtualdom so I wouldn't have to worry about what gets rebuilt and only care about constructing ui_state signal from various sources... weekend project maybe
<lostman> step two would be to reimplement virtualdom in ocaml :)
NingaLeaf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jeffmo has joined #ocaml
<Drup> lostman: next version of reactivedata has diffing
<Drup> (RList, in particular)
<seliopou> back did y'all solve mend the schism while I was away?
<seliopou> Drup: the only thing about d3 that is fundamentally unsafe is mutation used in a certain way
<seliopou> everything else (passing data around, operations on selections) is or can be made type safe
artart78_ is now known as artart78
iorivur has joined #ocaml
psy_ has quit [Remote host closed the connection]
yegods has quit [Remote host closed the connection]
iorivur has quit [Ping timeout: 264 seconds]
lewis1711 has joined #ocaml
<lewis1711> I need to do some filthy untyped hacking. Basically, I need to be able to write a variable to an array of void*, then read it back. of any type. I know ocaml doesn't have void*, but there is the Obj module, which I can't find any good docs on
cody` has quit [Quit: Connection closed for inactivity]
struk|desk2 has quit [Remote host closed the connection]
Sorella has quit [Quit: Connection closed for inactivity]
Mercuria1Alchemi has joined #ocaml
pierpa has quit [Ping timeout: 245 seconds]
Mercuria1Alchemi has quit [Ping timeout: 276 seconds]
lokien_ has joined #ocaml
Mirry has quit [Ping timeout: 255 seconds]
yallop has quit [Ping timeout: 256 seconds]
w1gz has quit [Ping timeout: 256 seconds]
yallop has joined #ocaml
rand has joined #ocaml
w1gz has joined #ocaml
toolslive has joined #ocaml
JacobEdelman has quit [Quit: Connection closed for inactivity]
toolslive has quit [Ping timeout: 255 seconds]
toolslive has joined #ocaml
tmtwd has quit [Ping timeout: 256 seconds]
<lostman> Whenever I try to build 'a Html5.elt RList.t for some 'a, I end up with Not_found exception :(
<lostman> Something goes wrong with polymorphic comparison? What can I do?
lewis1711 has left #ocaml ["Ex-Chat"]
badon has quit [Read error: Connection reset by peer]
badon has joined #ocaml
tmtwd has joined #ocaml
<adrien> the bug tracker seems dead ='(
rand has quit [Quit: leaving]
<nullcatxxx_> caml.inria.fr is dead
<adrien> =/
<nullcatxxx_> i remember team is moving to a new office, so connection could be down for sometime recently
<adrien> ah, ok
<nullcatxxx_> so server could be down*
<adrien> I really want to push a couple patches before the next release
<adrien> and mantis would have been much simpler than github for that but I'll guess I'll have to do with github
slash^ has joined #ocaml
<nullcatxxx_> PR on GitHub, raise issues on Mantis
<toolslive> I need some strategic advise: I have an ocaml process that dies with a SEGV, "double free or corruption (fasttop)". The core tells me it's in the GC, so what's happening is that that somewhere else something goes wrong way earlier. Any suggestions on tracking this down?
<adrien> nullcatxxx_: yeah, and my issue is that the code change is trivial but probably can't be merged trivially; at which point a pull request isn't really the best model
<adrien> toolslive: C bindings?
<adrien> sprinkle code with Gc.compat to trigger the crash earlier on :P
<toolslive> plenty, but most of them are done with ctypes
mort___ has joined #ocaml
<toolslive> and I trust most of them (ssl, bz2, ...)
<toolslive> of course, it's a server and I'm not exactly successful in deterministic reproduction.
zpe has joined #ocaml
mort___ has quit [Quit: Leaving.]
zpe has quit [Ping timeout: 276 seconds]
gasche has quit [Ping timeout: 260 seconds]
lokien_ has quit [Quit: Connection closed for inactivity]
rand has joined #ocaml
Haudegen has quit [Ping timeout: 240 seconds]
ril has joined #ocaml
<edwin> toolslive: which version of OCaml, and do you have multiple threads/fork?
<toolslive> 4.02.3; yes we have multiple threads (to push CPU intensive work too), and Lwt....
<edwin> does any of your bindings release the runtime lock? I had bugs like that in bindings in the past
<edwin> (i.e. double release of the lock, or not reacquiring the lock properly on error conditions)
tmtwd has quit [Ping timeout: 260 seconds]
mort___ has joined #ocaml
mort___ has quit [Client Quit]
<edwin> you could -runtime-variant d in addition to Gc.compact suggested earlier
Anarchos has joined #ocaml
Haudegen has joined #ocaml
ely-se has joined #ocaml
<toolslive> yes, we release the runtime lock while the C threads are working on the bigarray's C-heap part
larhat1 has quit [Quit: Leaving.]
<toolslive> the C part does erasure coding, compression and encryption, the ocaml part does coordination & IO....
<toolslive> there's also a binding to rocksdb active (orocksdb)
<toolslive> the release of the runtime lock is done in a declarative way; we just tell ctypes we need it.
<edwin> can you turn that off for testing?
guest23223 has joined #ocaml
ollehar has quit [Ping timeout: 255 seconds]
sigjuice has quit [Quit: ZNC - http://znc.in]
sigjuice has joined #ocaml
<toolslive> yes. thx for the suggestion
zpe has joined #ocaml
tmtwd has joined #ocaml
jacquev6 has joined #ocaml
jacquev6 has left #ocaml [#ocaml]
jacquev6 has joined #ocaml
zpe_ has joined #ocaml
zpe_ has quit [Remote host closed the connection]
kushal has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
kakadu has joined #ocaml
mort___ has joined #ocaml
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tmtwd has quit [Ping timeout: 264 seconds]
sh0t has joined #ocaml
Stalkr_ has joined #ocaml
_andre has joined #ocaml
yegods has joined #ocaml
yegods has quit [Remote host closed the connection]
guest23223 has quit [Quit: bbl]
d0nn1e has quit [Ping timeout: 265 seconds]
d0nn1e has joined #ocaml
rand has quit [Ping timeout: 265 seconds]
malc_ has joined #ocaml
ril has joined #ocaml
ril has quit [Ping timeout: 255 seconds]
slash^ has quit [Read error: Connection reset by peer]
slash^ has joined #ocaml
yegods has joined #ocaml
jrslepak has quit [Ping timeout: 240 seconds]
jrslepak has joined #ocaml
ggole has joined #ocaml
mort___ has quit [Ping timeout: 250 seconds]
rand has joined #ocaml
JacobEdelman has joined #ocaml
govg has joined #ocaml
Haudegen has quit [Ping timeout: 272 seconds]
zpe has joined #ocaml
nicoo has quit [Ping timeout: 245 seconds]
nicoo has joined #ocaml
struk|desk has joined #ocaml
gasche_ has joined #ocaml
<gasche_> nullcatxxx_: I confirm, the caml.inria.fr connectivity issues are related to the move from Rocquencourt to Paris
Haudegen has joined #ocaml
<gasche_> they should be resolved tomorrow (Mantis is back already), although some intermittent outage could happen this month
<adrien> you're lucky you've escaped from Saclay
<gasche_> I did my years in Rocquencourt
<gasche_> which is actually a fine place once you managed to get there
<gasche_> but actually I won't stay in the Paris offices, I'm at the airport to go to Boston for a postdoc
<edwin> hmm Lwt_io.close ignores errors from flush
<edwin> I think I'll have to explicitly flush before close
<edwin> shouldn't with_file call flush though? it returns with success when there was an IO error (e.g. ENOSPC)
<adrien> gasche_: ohhh, good to know you'll help with propaganda on the other side of the atlantic :P
gasche_ has quit [Ping timeout: 252 seconds]
rand has quit [Ping timeout: 260 seconds]
rand has joined #ocaml
Sorella has joined #ocaml
NingaLeaf has joined #ocaml
<edwin> hmm actually errors are not reported on Lwt_io.flush either if the error happens in the autoflusher
<toolslive> you can also have scenarios where you have an error on the close, and if you retry to close it, you get "already closed"
NingaLeaf has quit [Ping timeout: 246 seconds]
<edwin> I think I'll use write followed by flush to get errors reported
<edwin> or is there a way to turn the autoflusher off (by taking a lock or something)?
jacquev6 has quit [Quit: jacquev6]
ollehar has joined #ocaml
<Leonidas> interesting, ocamlscript hast more stars in 2 days on github than js_of_ocaml in some 5 years
<edwin> not everyone uses github
<fds> There are a lot more HN readers than OCaml programmers. ;-)
<Drup> Leonidas: that is very common
<Drup> oh, the warning is new, very nice from him ... urk
<toolslive> that doesn't mean a lot
<Drup> of course it doesn't, but it annoys me that the wrong part of the ecosystem is getting the attention
octachron has joined #ocaml
<Drup> I should try stop being bitter, I'm too young for that :>
<fds> Funny that cppo is the second most popular pachage on opam...
<toolslive> every time our traves kicks in, it installs lwt, cmdliner, yojson, .... via opam.
<fds> Erm, package.
<Drup> toolslive: I think it's per IP
<edwin> the todomvc stuff on ocsigen blog looks interesting, I just posted it to HN
<toolslive> well, travis container IP's differ wildly no?
<Drup> toolslive: no idea
<toolslive> pretty sure we inflate the counters for several packages with ~200/month
<toolslive> I underestimated our activity ;)
<Drup> ahah
<Drup> that is a bit inflated alright
<toolslive> I don't think anybody else is using that one
<Drup> fds: cppo is used in lwt
<Drup> and lwt is third
<Drup> so ... :p
<toolslive> I guess I killed some egos ;)
mort___ has joined #ocaml
<Drup> toolslive: you are cheating, pin the package to the dev repo instead !
<Drup> :]
toolslive has quit [Ping timeout: 255 seconds]
madroach has quit [Ping timeout: 246 seconds]
madroach has joined #ocaml
<Leonidas> Drup: heh. I have an empty repo which has attracted 8 stars, too.
<Drup> I did that too, once x)
madroach has quit [Quit: leaving]
toolslive has joined #ocaml
toolslive has quit [Remote host closed the connection]
d0nn1e has quit [Ping timeout: 260 seconds]
d0nn1e has joined #ocaml
struk|desk is now known as struk|desk|away
<al-maisan> hello there, does anyone know of a tutorial or of nice/documented examples of the rpc_parallel library?
mort___ has quit [Quit: Leaving.]
yegods has quit [Remote host closed the connection]
Haudegen has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
madroach has joined #ocaml
lokien_ has joined #ocaml
lewis1711 has joined #ocaml
<lewis1711> as there anyway to make a type transparent in an mli without just copy pasting the definition/
<hnrgrgr_> lewis1711: nope
<hnrgrgr_> but some time, when the type definition grows, a common pattern is to regroup all type definition in a single `project_types.mli` file (without corresponding .ml file)
<ely-se> use the C preprocessor
<Drup> ely-se: don't x)
<Drup> cpp doesn't have the right lexing rules for ocaml ...
hnrgrgr_ is now known as hnrgrgr
Denommus has joined #ocaml
<ely-se> m4!
<Drup> ely-se: if you want to use a preprocessor, in this case, ppx_import is the good choice
pierpa has joined #ocaml
<ely-se> :(
lewis1711 has quit [Ping timeout: 240 seconds]
sz0 has quit [Quit: Bye.]
octachron has quit [Ping timeout: 272 seconds]
Stalkr_ has quit [Read error: Connection reset by peer]
mort___ has joined #ocaml
jacquev6 has joined #ocaml
yegods has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 250 seconds]
jacquev6 has quit [Quit: jacquev6]
jacquev6 has joined #ocaml
yegods has quit [Ping timeout: 240 seconds]
jacquev6 has quit [Client Quit]
jeffmo has quit [Ping timeout: 265 seconds]
<fds> Drup: Yes, I noticed it has a lot of things depending on it. Am I wrong to think that's a bit sad? Am I unnecessarily prejudiced against preprocessors?
jeffmo has joined #ocaml
<Drup> fds: I don't disagree. It's a recent addition in lwt (for last ocaml version, iirc)
rwmjones has quit [Ping timeout: 245 seconds]
jacquev6 has joined #ocaml
rand has quit [Quit: leaving]
toolslive has joined #ocaml
ely-se has quit [Quit: leaving]
struk|desk|away is now known as struk|desk
ely-se has joined #ocaml
sz0 has joined #ocaml
govg has quit [Quit: leaving]
MercurialAlchemi has joined #ocaml
sz0 has quit [Client Quit]
jacquev6 has quit [Quit: jacquev6]
shinnya has joined #ocaml
jacquev6 has joined #ocaml
cody` has joined #ocaml
lokien_ has quit [Quit: Connection closed for inactivity]
jacquev6 has quit [Client Quit]
jacquev6 has joined #ocaml
ely-se has quit [Quit: leaving]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
<Khady> If I want to provide a patch for ocamlbuild, in which repo should I create a PR? ocaml/ocamlbuild or ocaml/ocaml?
<Drup> the former
<Khady> ok, thanks
yomimono has joined #ocaml
sz0 has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
ollehar has quit [Remote host closed the connection]
ollehar has joined #ocaml
yegods has joined #ocaml
mort___ has left #ocaml [#ocaml]
rwmjones has joined #ocaml
ollehar has quit [Ping timeout: 255 seconds]
jacquev6 has quit [Quit: jacquev6]
octachron has joined #ocaml
jeffmo has quit [Quit: jeffmo]
jeffmo has joined #ocaml
govg has joined #ocaml
mjdominus has joined #ocaml
<mjdominus> I'm trying to build the `owl` package. It depends on the `lambda-term` module, which I have downloaded, but `lambda-term` depends on several more packages, each of which has further dependencies.
<mjdominus> I presume there's an easier way to download and install these without having to track down the source code for each.
<mjdominus> But I don't know what way that is. How can I do that?
<Khady> linux/osx?
<mjdominus> Linux Ubuntu.
<mjdominus> Awesome, thanks.
jeffmo has joined #ocaml
<Khady> There is an opam file in the repository. So you will be able to automatically install all the dependencies with only one command
Anarchos has quit [Ping timeout: 252 seconds]
rand has joined #ocaml
<mjdominus> What command would do that?
<Khady> opam pin add owl . -k git
Haudegen has joined #ocaml
<Khady> from owl's directory
<mjdominus> Thank you.
ollehar has joined #ocaml
<mjdominus> This is definitely alpha software :) Thanks again.
jacquev6 has joined #ocaml
ollehar has quit [Client Quit]
Sim_n has joined #ocaml
struk|desk is now known as struk|desk|away
smondet has quit [Ping timeout: 255 seconds]
Simn has quit [Ping timeout: 255 seconds]
jacquev6 has quit [Quit: jacquev6]
smondet has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
jeffmo has quit [Quit: jeffmo]
jgjl has joined #ocaml
jeffmo has joined #ocaml
jgjl_ has joined #ocaml
flx has joined #ocaml
oskarth_ has joined #ocaml
oskarth has quit [Ping timeout: 255 seconds]
flux has quit [Remote host closed the connection]
yegods has quit [Remote host closed the connection]
flx is now known as flux
oskarth_ is now known as oskarth
jgjl has quit [Ping timeout: 255 seconds]
Haudegen has joined #ocaml
relrod has quit [Excess Flood]
relrod_ has joined #ocaml
relrod_ has quit [Changing host]
relrod_ has joined #ocaml
Mirry has joined #ocaml
jgjl_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mjdominus has quit [Quit: Leaving]
yegods has joined #ocaml
ygrek has joined #ocaml
kdas_ has joined #ocaml
kushal has quit [Ping timeout: 260 seconds]
jgjl has joined #ocaml
Algebr has joined #ocaml
Algebr is now known as Guest71739
Guest71739 is now known as Algebr`
yegods has quit [Remote host closed the connection]
yomimono has quit [Ping timeout: 240 seconds]
divyanshu has joined #ocaml
darkf has quit [Quit: Leaving]
divyanshu has quit [Quit: Computer has gone to sleep.]
<nullcatxxx_> what do ``commutable`` and ``abbrev_memo`` mean?
<nullcatxxx_> a tiny example would be good. thanks
Stalkr_ has joined #ocaml
<Stalkr_> Hey, experimenting with parsing my own little language, should I define my AST in an .ml or .mli file?
<Drup> it doesn't matter much
<Stalkr_> One or the other isn't the "proper" one to choose even?
<Drup> nullcatxxx_: commutable looks like the thing explained in oleg's post
<nullcatxxx_> then I didn't read it carefully.
<Drup> Stalkr_: it depends, but really, it's not an important decision :D
<nullcatxxx_> "the thing"? he emphasizes on level-based generalization. Other than this, type region...
<Stalkr_> Haha okay, I'll just choose .mli for now so it stands out
<nullcatxxx_> there is ``TArrow`` in Oleg's post, but there is no thing related to commutative property
_andre has quit [Quit: leaving]
jerith_ is now known as jerith
average has joined #ocaml
<average> why do people still write haskell ?
<average> well, let's put it a different way
<average> I was for the past days trying to decide to learn Haskell or Ocaml
<average> I think I'm gonna think about this some more time
<Mirry> Don't think too hard, just give them both a try and see which one best fits your needs
<Mirry> That's exactly what I'm doing these days
Anarchos has joined #ocaml
<average> I think the main blocker for me is that I'm writing code that does real things these days
Haudegen has quit [Ping timeout: 272 seconds]
<average> learning a language somehow requires me to back off from anything practical, and like.. getting down to basics again and just doing basic stuff
minus4_ has joined #ocaml
<Mirry> Think of a problem you've solved in another language and rewrite the solution in ocaml
<Mirry> This way you'll see what the language can do in a "real world" environment
<Mirry> At least that's what I do when I'm learning a new language (or giving it a try)
<edwin> I tried to go through some projecteuler.net exercises when trying to decide between haskell and ocaml. YMMV
ely-se has joined #ocaml
<Stalkr_> Anyone experience with parsers? I have written a lexer .mll and parser .mly, but I want to write a quick "fromString" function so I can parse a string
<Stalkr_> but I'm having trouble opening my new Parse.fromString module/function
<Stalkr_> Do I need to have both parse.ml and parse.mli?
<nullcatxxx_> i think this chapter in RWO may help: https://realworldocaml.org/v1/en/html/parsing-with-ocamllex-and-menhir.html
<Stalkr_> I have followed that one, but they don't use the REPL that I want to play around with
<Anarchos> i need an extensible parser for ambiguates grammar :/
<def`> Anarchos: dypgen
lobo has joined #ocaml
<Anarchos> def` i know it but isn't it too complicated to trust it ??
<nullcatxxx_> Stalkr_ assuming you have correct lexer.mll and parser.mly
<nullcatxxx_> use ``ocamlyacc parser.mly`` to get parser.ml
<Drup> Stalkr_: it's pretty much the same, except that you use Lexing.from_string
<nullcatxxx_> use ``ocamllex lexer.mll`` to get ``lexer.ml``
<Stalkr_> I can open my Parser and Lexer
<Stalkr_> from REPL
yegods has joined #ocaml
<Drup> Anarchos: you want an extensible parser and you are complaining about complexity ? Really ?
<Stalkr_> Drup: Something like this right? http://git.io/vuShh
<Drup> yes
<Stalkr_> I have trouble opening that one in my REPL
<Anarchos> Drup humm yes :/
<Drup> Stalkr_: except you should do something with result :)
<Anarchos> Drup i wonder if dypgen is maintained ....
<Stalkr_> Haha I know, for now I just want it to say test
<Stalkr_> so I know it's working
<Anarchos> Drup i want to parse mathematical formulas (latex syntax) with abuse of notations.
<Stalkr_> "ocaml -I _build" # "open Parse;;" Error: Unbound module Parse
<Anarchos> Drup and i know that coqtop has an extensible parser, but it doesn't seem to be based on dypgen.
<Stalkr_> Any idea why it is unbound? It is in my _build folder
Haudegen has joined #ocaml
<Drup> Stalkr_: that's not how it works, you need to explicitely give the .cmo/a
yegods has quit [Ping timeout: 245 seconds]
Mirry has quit [Ping timeout: 256 seconds]
rand has quit [Quit: leaving]
minus4_ has quit [Quit: minus4.info]
jeffmo has quit [Quit: jeffmo]
malc_ has quit [Ping timeout: 240 seconds]
malc_ has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
ygrek_ has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
Anarchos has joined #ocaml
Lau-M has joined #ocaml
ggole has quit []
average has left #ocaml [#ocaml]
jacquev6 has joined #ocaml
jeffmo has joined #ocaml
psy_ has joined #ocaml
<Algebr`> anyone off hand know how cmdliner opens up a pager, ie less, anything elegant or just asking env for pager.
lokien_ has joined #ocaml
lpw25 has joined #ocaml
<lpw25> nullcatxxx_: abbrev_memo memoizes expansion of type aliases
<edwin> $MANPAGER, $PAGER, less, more
<lpw25> nullcatxxx_: commutable is used for labelled arguments
BitPuffin has quit [Ping timeout: 256 seconds]
<lpw25> nullcatxxx_: it indicates whether one label can safely be commuted with another
slash^ has quit [Read error: Connection reset by peer]
larhat1 has joined #ocaml
Lau-M has quit []
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Mirry has joined #ocaml
Mirry has quit [Ping timeout: 250 seconds]
ely-se has quit [Quit: Leaving...]
ely-se has joined #ocaml
jgjl has joined #ocaml
<nullcatxxx_> thanks!
<nullcatxxx_> lpw25 i don't see you here often... I really hope you can be here more often
<nullcatxxx_> def and trefis have a more complete doc here: https://github.com/def-lkb/ocaml/blob/document-typedtrees/typing/types.mli#L191
<nullcatxxx_> i remember it's an open PR..
<lpw25> yeah I don't really use IRC
<lpw25> but I scan the log occaisionally and I spotted your question there
<nullcatxxx_> so umm... maybe i can ask you on lab mailing list or reddit?
<lpw25> For short questions like that you can try emailing me
<lpw25> although I make no promises about a prompt reply
<lpw25> the caml-list would also work, you may even get a more authoritative answer from Jacques
<nullcatxxx_> thanks
Mirry has joined #ocaml
jacquev6 has quit [Quit: jacquev6]
jacquev6 has joined #ocaml
jacquev6 has quit [Client Quit]
jacquev6 has joined #ocaml
octachron has quit [Quit: Leaving]
jacquev6 has quit [Client Quit]
lpw25 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
Haudegen has quit [Ping timeout: 265 seconds]
AltGr has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
malc_ has quit [Quit: leaving]
NingaLeaf has joined #ocaml
AltGr has left #ocaml [#ocaml]
jacquev6 has joined #ocaml
Haudegen has joined #ocaml
jacquev6 has quit [Client Quit]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
<Mirry> Hey, does anyone have a curated list of OCaml related (or general fp) talks ? I've been lurking on yt for quite a while but can't seem to find anythin relevant
yallop has quit [Ping timeout: 260 seconds]
mac10688 has joined #ocaml
yallop has joined #ocaml
<edwin> http://ocaml.org/meetings/, though audio isn't very good for the 2015 one
<Mirry> Thanks edwin!
<Algebr`> lots of videos on youtube as well
ely-se has quit [Quit: Leaving...]
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
NingaLeaf has quit [Quit: Leaving]
jacquev6 has joined #ocaml
ely-se has joined #ocaml
kakadu has quit [Remote host closed the connection]
jacquev6 has quit [Quit: jacquev6]
jacquev6 has joined #ocaml
jacquev6 has quit [Client Quit]
Denommus has quit [Quit: going home]
lokien_ has quit [Quit: Connection closed for inactivity]