flux 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.03.0 announced http://ocaml.org/releases/4.03.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
ril has joined #ocaml
<aantron> thomasga: containers or not, it seems there is a need for binaries of the commonly-tested versions (4.01.0, 4.02.3, 4.03.0). does that sound accurate?
bba has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrinberg has quit [Ping timeout: 260 seconds]
<thomasga> yes
<aantron> ok, thanks
jeffmo has quit [Quit: jeffmo]
zRecursive has joined #ocaml
<aantron> thomasga: so, if docker hypothetically supported windows (does it yet?), i should contribute what i am doing to https://github.com/avsm/ocaml-docker-scripts ? is this intended to be the new general approach for (among other things) testing ocaml software?
mistermetaphor has quit [Remote host closed the connection]
<zRecursive> Can opam be built using mingw ? There is no VC++ by hand.
<aantron> alright, seems docker will be providing a linux "guest" regardless, if i understood the various articles correctly
<thomasga> aantron: there will be Windows containers at one point (but not totally ready yet). but yes, main supported use-case is for Linux distribs
walter|r has joined #ocaml
walter|r has quit [Read error: Connection reset by peer]
walter|r has joined #ocaml
<yunxing> thomasga: A windows container would be great for CI.
zRecursive has left #ocaml ["ERC (IRC client for Emacs 24.5.1)"]
Algebr has quit [Remote host closed the connection]
pierpa has quit [Ping timeout: 276 seconds]
rand__ has quit [Quit: leaving]
walter|r has quit [Remote host closed the connection]
manud has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 260 seconds]
al-damiri has joined #ocaml
<aantron> btw, does anyone know how ocaml currently ends up packaged for cygwin? i.e. who does it, etc.?
tennix has joined #ocaml
manud has quit [Quit: manud]
tennix has quit [Ping timeout: 250 seconds]
tennix has joined #ocaml
tmtwd has joined #ocaml
yunxing has quit [Remote host closed the connection]
tennix has quit [Read error: Connection reset by peer]
ansiwen has quit [Read error: Connection reset by peer]
ansiwen has joined #ocaml
tennix has joined #ocaml
Reshi has joined #ocaml
ril is now known as ril[away]
lokien_ has quit [Quit: Connection closed for inactivity]
tennix has quit [Read error: Connection reset by peer]
ril[away] is now known as ril
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tennix has joined #ocaml
walter|r has joined #ocaml
tennix has quit [Read error: Connection reset by peer]
manud has joined #ocaml
tennix has joined #ocaml
ril has joined #ocaml
thomasga has quit [Quit: Leaving.]
copy` has quit [Quit: Connection closed for inactivity]
tennix has quit [Read error: Connection reset by peer]
tennix has joined #ocaml
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tennix has quit [Read error: Connection reset by peer]
walter|r has quit [Remote host closed the connection]
tennix has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
madroach has joined #ocaml
tennix has quit [Read error: Connection reset by peer]
ztennix has joined #ocaml
Sorella has joined #ocaml
ztennix has quit [Read error: Connection reset by peer]
ztennix has joined #ocaml
manud has quit [Quit: manud]
seangrove has joined #ocaml
slash^ has joined #ocaml
adelbertc has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 260 seconds]
<objmagic> good evening, fellow camels
tmtwd has quit [Ping timeout: 252 seconds]
rgrinberg has joined #ocaml
manud has joined #ocaml
dsheets has joined #ocaml
seangrove has quit [Ping timeout: 252 seconds]
dsheets has quit [Ping timeout: 250 seconds]
tmtwd has joined #ocaml
rgrinberg has quit [Ping timeout: 260 seconds]
MercurialAlchemi has joined #ocaml
seangrove has joined #ocaml
alexelcu has joined #ocaml
mistermetaphor has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
slash^ has joined #ocaml
atbagautdinov has joined #ocaml
slash^ has quit [Remote host closed the connection]
slash^ has joined #ocaml
ygrek has joined #ocaml
tmtwd has quit [Ping timeout: 246 seconds]
shinnya has quit [Ping timeout: 276 seconds]
adelbertc has quit [Quit: Connection closed for inactivity]
seangrove has quit [Remote host closed the connection]
manud has quit [Quit: manud]
tmtwd has joined #ocaml
noethics has quit [Ping timeout: 244 seconds]
mistermetaphor has quit [Remote host closed the connection]
tmtwd has quit [Ping timeout: 240 seconds]
atbagautdinov has quit [Quit: atbagautdinov]
toomuchtvrotsurb has joined #ocaml
ewanas has joined #ocaml
toomuchtvrotsurb has quit [Ping timeout: 260 seconds]
ztennix has quit [Ping timeout: 276 seconds]
alehander42 has joined #ocaml
seangrove has joined #ocaml
ztennix has joined #ocaml
FreeBirdLjj has joined #ocaml
kushal has joined #ocaml
manud has joined #ocaml
kushal has quit [Read error: Connection reset by peer]
bba has joined #ocaml
spion_ is now known as spion
<adrien> I have the following construct:
<adrien> type t = { a : u; b : v }
<adrien> let f t bar = [...] { t with a = ... }
<adrien> will this create a new value in all cases or is it skipped for the case where the current t.a and the "future" t.a physically equal?
<def`> create a new value
<adrien> in other words, does the following make sense: let new_a = ... in if t.a != new_a then { t with a = new_a } else t
<adrien> ok, thanks :)
sh0t has quit [Ping timeout: 250 seconds]
<companion_cube> sounds like micro micro optimization
<seangrove> I have a .merlin file with `PKG cmdliner` and `S src/**` in it. When I open src/main.ml `open Cmdliner` is highlighted in red with the error `Error: Unbound module Cmdliner`
<seangrove> Is there a way to find out what .merlin file is being used, and what's loaded in it (from the emacs plugin)?
<adrien> companion_cube: nope: the reason is that I want to do something if "new_a != a"; and then same for t in the parent function
<adrien> but I only want to do it for t in the parent if there's a reason to
johnf has quit [Read error: Connection reset by peer]
<def`> seangrove: in the modeline you have the merlin menu
alehander42 has quit [Quit: Page closed]
<def`> (and M-x merlin-project-check is the direct command)
<seangrove> Hrm, I think the problem is going to be that I don't have any of the packages installed locally - they're all in the Docker image :)
<seangrove> Let me test that hypothesis
sh0t has joined #ocaml
<seangrove> Yup
<companion_cube> I have a feeling the `container` word has been taking a different meaning in this community, recently :)
johnf has joined #ocaml
bba has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
alexelcu has quit [Quit: Leaving.]
amnn has joined #ocaml
amnn_ has joined #ocaml
amnn has quit [Ping timeout: 260 seconds]
seangrove has quit [Ping timeout: 246 seconds]
<adrien> I'm trying to avoid code-duplication in the following code snippet: http://pastebin.notk.org/pastebin.php?show=f56f20351
ewanas has quit [Read error: Connection reset by peer]
<adrien> basically it's the core for a GUI program that goes the (light) FRP route and is fairly modular so far
<adrien> but I don't have a pretty way to dispatch messages between moduls without listing each of them in the toplevel message handler
<companion_cube> maybe you should use the dual of sums, that is, objects
<companion_cube> the usual OO approach to messages, that is
<adrien> hmm, I'm not sure how that would change the bridge between messages and calls to the submodules handlers
<adrien> also, I've amended the paste: http://pastebin.notk.org/pastebin.php?show=f59b8d414 ; line 22 now reads (* NOTE: listing every module here is fairly painful, a more dynamic approach is sought *)
<companion_cube> well, each event would be an object with a method "state_machine"
<adrien> but that wouldn't really be serializable
<companion_cube> hem
<companion_cube> don't know
<adrien> well, it could but that wouldn't be clean
<adrien> I'd like to be able to expose the messaging to the outside so events can't contain functions
<companion_cube> why not have a `seiralize` method?
<adrien> actually that makes me think that actual serialization will most probably involve another step (code-generation for instance)
<adrien> so I'll have to shuffle things around quite a bit probably and that is also probably going to change how I can dispatch messages
<adrien> I think I need to think a bit more about that aspect
toomuchtvrotsurb has joined #ocaml
toomuchtvrotsurb has quit [Ping timeout: 260 seconds]
ewanas has joined #ocaml
<Leonidas> companion_cube: you just misuse the word containers in your library which shockingly does nothing Docker-related ;-)
<companion_cube> :p
<companion_cube> sure it does: lists of dockers, options of dockers, sets of dockers...
<companion_cube> am I doing this right?
ztennix has quit [Ping timeout: 240 seconds]
lokien_ has joined #ocaml
<Leonidas> yep, you could apply to a docker certification :p
manud has quit [Quit: manud]
<reynir> Replace all type variables with 'docker \o/
<companion_cube> Docker.map : ('docker1 -> 'docker2) -> 'docker1 Docker.t -> 'docker2 Docker.t
shinnya has joined #ocaml
<Leonidas> 'Docker!' is the new 'Hodor!'
<Leonidas> companion_cube: du you also have an implementation of HAMT in containers?
<companion_cube> there is one on opam, you know
<companion_cube> I have a very similar HashTrie though
Sorella has quit [Quit: Connection closed for inactivity]
<Leonidas> I didn't :)
bba has joined #ocaml
pierpa has joined #ocaml
ewanas has quit [Read error: Connection reset by peer]
rand__ has joined #ocaml
copy` has joined #ocaml
Reshi has quit [Ping timeout: 276 seconds]
octachron has joined #ocaml
ewanas has joined #ocaml
amnn_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adrien> companion_cube: back to that topic, I think that when I'll put serialization, I'll have code generation and I'll simply rely on that to list all the modules
ewanas has quit [Read error: Connection reset by peer]
<companion_cube> I see. unless you use ppx_deriving, in which case the code generation would remain local
<adrien> I haven't decided yet on what I'll be using
<adrien> right now I'm working on the win-builds GUI which is not going to get huge; I wanted to get the whole approach and core that would also work for future, larger, projects and it seems this was the last blocker
<adrien> but apparently the topic is a bit larger than I had anticipated so I need to postpone it otherwise I'll never push a new win-builds version
ztennix has joined #ocaml
bba has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
amnn has joined #ocaml
bba has joined #ocaml
Reshi has joined #ocaml
lokien_ has left #ocaml [#ocaml]
FreeBirdLjj has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
amnn_ has joined #ocaml
amnn has quit [Ping timeout: 246 seconds]
amnn has joined #ocaml
amnn_ has quit [Ping timeout: 276 seconds]
NingaLeaf has joined #ocaml
rgrinberg has joined #ocaml
amnn has quit [Read error: Connection reset by peer]
amnn_ has joined #ocaml
rgrinberg has quit [Ping timeout: 276 seconds]
amnn_ has quit [Read error: Connection reset by peer]
amnn has joined #ocaml
NingaLeaf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yomimono has quit [Ping timeout: 252 seconds]
rand__ has quit [Quit: leaving]
walter|r has joined #ocaml
NingaLeaf has joined #ocaml
IntTree has joined #ocaml
amnn has quit [Read error: Connection reset by peer]
amnn has joined #ocaml
IntTree has quit [Quit: Leaving.]
NingaLeaf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dexterph has joined #ocaml
Reshi has quit [Ping timeout: 246 seconds]
tennix has joined #ocaml
ztennix has quit [Ping timeout: 252 seconds]
octachron has quit [Ping timeout: 260 seconds]
Reshi has joined #ocaml
mistermetaphor has joined #ocaml
scarygelatin has joined #ocaml
octachron has joined #ocaml
mistermetaphor has quit [Remote host closed the connection]
Reshi has quit [Ping timeout: 250 seconds]
sh0t has quit [Ping timeout: 250 seconds]
mistermetaphor has joined #ocaml
mistermetaphor has quit [Remote host closed the connection]
Sorella has joined #ocaml
Reshi has joined #ocaml
tennix has quit [Ping timeout: 276 seconds]
tennix has joined #ocaml
tennix has quit [Read error: Connection reset by peer]
tennix has joined #ocaml
A1977494 has joined #ocaml
dexterph has quit [Ping timeout: 260 seconds]
alexelcu has joined #ocaml
dexterph has joined #ocaml
alexelcu has quit [Quit: Leaving.]
tennix has quit [Ping timeout: 252 seconds]
<reynir> I wonder if you could reuse cmdliner for an irc bot
dexterph has quit [Remote host closed the connection]
Reshi has quit [Ping timeout: 260 seconds]
dexterph has joined #ocaml
ygrek_ has joined #ocaml
toomuchtvrotsurb has joined #ocaml
ygrek has quit [Ping timeout: 260 seconds]
tautologico has joined #ocaml
toomuchtvrotsurb has quit [Ping timeout: 276 seconds]
dexterph has quit [Ping timeout: 276 seconds]
<Leonidas> bot: kick --with-extreme-prejudice --no-preserve-root nicknamr
<Leonidas> truth be told, that sounds like a pretty good idea
darkf has quit [Quit: Leaving]
sh0t has joined #ocaml
sh0t has quit [Quit: Leaving]
dexterph has joined #ocaml
<flux> does cmdliner do command line switches without the - prefix? it would introduce ambiguities, but it could also allow for 'more natural' commands
<flux> or perhaps even parsing some like sql create table statements..
<profan> anyone have any opinions on Core vs Batteries today?
<profan> not actually intended as flamebait, just curious :D
<profan> using core thus far
<zozozo> profan: I use containers usually, ^^
<profan> oh dear, a third option
<flux> containers is nice!
<profan> what's the advantage over using core/batteries
<profan> or rather, what's even different?
<flux> batteries is an extension that builds on what the stdlib of ocaml has
<flux> core is "standard library reimagined"
<profan> that much i've absorbed, but then containers?
<flux> it's more like a slender co-library to use with the standard library
<profan> ah, less "lets replace everything" and more, here's some extra stuff i suppose?
<flux> that's how I've used it, perhaps companion_cube has other ideas ;)
<flux> but at least the naming suggests that, the module names don't collide with the standard library
<profan> starting a new compiler project, so thought i'd pick something to stick to before it permeates the whole codebase and is a pain to switch
<profan> i'll take a look at containers as well then, thanks guys :)
<flux> containers is nice also in the sense that if someone talks about CCList, everybody knows what's it about
<profan> ah yes, with Core the collisions were a bit of a pain
<flux> but with List it could be stdlib, batteries or the incompatible core :)
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Algebr has joined #ocaml
doecnt has joined #ocaml
amnn has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
amnn has quit [Ping timeout: 240 seconds]
amnn has joined #ocaml
amnn has quit [Ping timeout: 260 seconds]
copy` has quit [Quit: Connection closed for inactivity]
amnn has joined #ocaml
yunxing has joined #ocaml
dsheets has joined #ocaml
amnn has quit [Ping timeout: 260 seconds]
octachron has quit [Ping timeout: 250 seconds]
octachron has joined #ocaml
doecnt has quit [Ping timeout: 260 seconds]
amnn has joined #ocaml
copy` has joined #ocaml
amnn has quit [Ping timeout: 252 seconds]
yunxing has quit [Remote host closed the connection]
<companion_cube> profan: containers is 1/ a complement to the stdlib and 2/ a collection of collections
dsheets has quit [Remote host closed the connection]
<reynir> companion_cube: How do you avoid Russell's paradox ;)
<companion_cube> universes! opam universe, module universe...
<pierpa> by using a static type system :)
shinnya has quit [Ping timeout: 276 seconds]
<Drup> pierpa: a static type system doesn't avoid russell's paradox :)
<pierpa> hmmm
<pierpa> does not?
<reynir> "Between 1902 and 1908 Bertrand Russell proposed various "theories of type" in response to his discovery that Gottlob Frege's version of naive set theory was afflicted with Russell's paradox." https://en.wikipedia.org/wiki/Type_theory#History
amnn has joined #ocaml
amnn has quit [Read error: Connection reset by peer]
amnn has joined #ocaml
<companion_cube> Drup: isn't it the purpose of universes in almost all dependent systems?
ansiwen has quit [Quit: No Ping reply in 180 seconds.]
<pierpa> anyway, ocaml's type system is strong enough to avoid it
<Drup> let's consider U the set of types, you can choose either U ∈ U (impredicative) or you label your universes as a tower, int ∈ U₀, U₀ ∈ U ₁, (predicative)
<Drup> actually, no, ocaml's type system is weak enough to avoid it :D
<Drup> (you get the issue with dependent types)
<pierpa> ok, right and right.
<Drup> (Coq, Agda and most others are predicative, because that's the only sane choice :D)
ansiwen has joined #ocaml
slash^ has quit [Remote host closed the connection]
<companion_cube> well, Coq has one impredicative universe
<Drup> oh, right, Coq has both
<companion_cube> because apparently that's the only sane choice for some domains, like analysis
amnn has quit [Client Quit]
<fds> Maybe that says something about the sanity of those domains. ;-)
amnn has joined #ocaml
<Drup> :3
bba has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
amnn_ has joined #ocaml
amnn has quit [Ping timeout: 252 seconds]
bba has joined #ocaml
octachron has quit [Ping timeout: 260 seconds]
bba has quit [Client Quit]
bba has joined #ocaml
bba has quit [Client Quit]
dsheets has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
zpe has joined #ocaml
dexterph has quit [Remote host closed the connection]
dexterph has joined #ocaml
tane has joined #ocaml
zpe has quit [Remote host closed the connection]
aantron has quit [Ping timeout: 276 seconds]
ygrek_ has quit [Ping timeout: 240 seconds]
ewanas has joined #ocaml
toomuchtvrotsurb has joined #ocaml
dexterph has quit [Ping timeout: 260 seconds]
toomuchtvrotsurb has quit [Ping timeout: 246 seconds]
<mfp> adrien: what about using a universal type for the state + tags? http://paste.debian.net/691868/ (I've removed the shared type to simplify the ex, but it should be possible to add it back)
<mfp> huh I just realized the events are not really serializable in fact (same as with exns), which was also the case in your initial snippet...
rgrinberg has joined #ocaml
intTree123_ has quit [Ping timeout: 260 seconds]
<def`> with some hack, you can make event serializable using UUIDs (and the result would be type safe up to collision of UUIDs)
wiml has joined #ocaml
<wiml> newbie question: is there an equivalent to a read-write channel? I want to open a (disk) file for read/write, that is, able to write stuff, seek around, read other stuff.
<wiml> (The file format I'm producing has a checksum at the beginning, so I want to write out the data, then seek back to generate the sum, then seek back and fill in the checksum field.)
A1977494 has quit [Quit: Leaving.]
<flux> that's actually a very good question, there seems to be no way to do that with buffered input
<flux> so your alternative is to basically use the Unix module :-o
<flux> I think opening both channels is not a working solution due to buffering.
<flux> preferably I like to see an open_in_out -> ... -> (in_channel * out_channel)
<flux> maybe Batteries, Core or Containers has one?
ewanas has quit [Read error: Connection reset by peer]
<pierpa> the Unix module probably is ok, from the descripion wiml gave.
<wiml> good idea, I'll go look in batteries etc. Yeah, getting an (in,out) tuple would be ideal.
<def`> if you are not already using batteries, I would solve that simply with Unix module
<flux> Unix file io is perhaps a bit more annoying because you would need to build a buffering, if you care at all about performance
dsheets has quit [Remote host closed the connection]
<wiml> hmmm, looks like I can open a readwrite unix descr, then use both in_channel_of_descr and out_channel_of_descr on the same descr
<def`> make a fd from Unix, and convert it to an in_channel and an out_channel
<def`> yes
<wiml> presumably I need to be careful about flushing when I turn around but that's ok
<flux> def`, will break if you do write and read and expect to see what you wrote
<flux> I assume in_channel does buffering
<def`> flux: yes, wiml seems aware :)
<flux> but what I mean flushing is not enough
<flux> there is no way to invalidate in_channel's buffer
<pierpa> does flushing an *input* channel discards the buffer?
<flux> well, except reopening the buffer
<flux> there is only flushing out_channels
<pierpa> k
<wiml> hmmm. I guess I can create the in_channel after I flush the out_channel, just to be sue that it doesn't have any preexisting data in its buffer
<reynir> if anyone makes a library for this they should name it 'toilet'
sh0t has joined #ocaml
<flux> wiml, I think that would work
<pierpa> lol
* wiml ha
<flux> wiml, while at it, put it behind some nice function so you can replace it with a proper Unix-based buffering io module once you want to write it ;)
<wiml> come to think of it, I don't really need buffering on read. I'm just slurping the whole file in to checksum it.
<wiml> yeah, I think I'll still poke around in batteries and core to see if I'm reinventing the wheel, but this will work
tane has quit [Quit: Verlassend]
johnf has quit [Remote host closed the connection]
dsheets has joined #ocaml
hcarty has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 276 seconds]
dsheets has quit [Ping timeout: 250 seconds]
rpfun has joined #ocaml
<rpfun> is the best (only?) way to get the "standard" ocaml stack (including OPAM) under Windows by using cygwin, or is there a more native option?
<rpfun> also, is JS Core expected to work under cygwin?
hcarty has quit [Ping timeout: 244 seconds]
madroach has quit [Ping timeout: 244 seconds]
madroach has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 260 seconds]
rand__ has joined #ocaml
mistermetaphor has joined #ocaml
Reshi has joined #ocaml
mistermetaphor has quit [Remote host closed the connection]
<Leonidas> rpfun: no, mingw and msvc works as well
<Leonidas> not sure about OPAM though
mistermetaphor has joined #ocaml
amnn_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]