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
Kakadu has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
hydan has quit [Quit: hydan]
silver has quit [Quit: rakede]
yunxing has joined #ocaml
sh0t has quit [Ping timeout: 248 seconds]
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Algebr` has joined #ocaml
nicholasf has quit []
NingaLeaf has quit [Quit: Leaving]
dsheets has joined #ocaml
nicholasf has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
Vintila has joined #ocaml
yunxing has quit [Remote host closed the connection]
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
Haudegen has quit [Ping timeout: 276 seconds]
Haudegen has joined #ocaml
struk|desk|away is now known as struk|desk
dsheets has joined #ocaml
meteo has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
mistermetaphor has joined #ocaml
meteo has quit [Ping timeout: 248 seconds]
mistermetaphor has quit [Ping timeout: 250 seconds]
mistermetaphor has joined #ocaml
t4nk964 has quit [Quit: Page closed]
struk|desk is now known as struk|desk|away
yunxing has joined #ocaml
yunxing has quit [Ping timeout: 268 seconds]
struk|desk|away is now known as struk|desk
pierpa has quit [Ping timeout: 244 seconds]
johnelse has quit [Ping timeout: 260 seconds]
johnelse has joined #ocaml
Algebr`` has joined #ocaml
<jyc_> is there some way to disable warnings for an individual file?
<jyc_> I'm generating a bunch of OCaml code, and in particular, I generate unnecessary match cases when I'm flipping the order of things around
<jyc_> if there were some way to disable the warning for that particular file and have the OCaml compiler do the work of ignoring those cases, it would save me a little trouble :)
Algebr` has quit [Ping timeout: 268 seconds]
mistermetaphor has quit [Remote host closed the connection]
Algebr``` has joined #ocaml
Algebr`` has quit [Read error: Connection reset by peer]
struk|desk is now known as struk|desk|away
buttons840 has joined #ocaml
buttons840 has quit [Ping timeout: 240 seconds]
yunxing has joined #ocaml
badon has quit [Quit: Leaving]
larhat1 has quit [Quit: Leaving.]
badon has joined #ocaml
struk|desk|away is now known as struk|desk
MercurialAlchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 248 seconds]
ohama has quit [Ping timeout: 276 seconds]
mort___ has joined #ocaml
mistermetaphor has joined #ocaml
MercurialAlchemi has joined #ocaml
darkf has quit [Read error: Connection reset by peer]
darkf has joined #ocaml
mistermetaphor has quit [Ping timeout: 250 seconds]
tmtwd has joined #ocaml
octachron has joined #ocaml
ohama has joined #ocaml
antkong_ has joined #ocaml
mort___ has quit [Quit: Leaving.]
tmtwd has quit [Read error: Connection reset by peer]
tmtwd has joined #ocaml
dwillems has joined #ocaml
struk|desk is now known as struk|desk|away
Haudegen has quit [Ping timeout: 244 seconds]
tmtwd has quit [Remote host closed the connection]
kolko has quit [Read error: Connection reset by peer]
copy` has quit [Quit: Connection closed for inactivity]
Algebr``` has quit [Ping timeout: 248 seconds]
Haudegen has joined #ocaml
madroach has quit [Ping timeout: 244 seconds]
<companion_cube> jyc_: on 4.02, [@@@warning "-4-44"] should work
madroach has joined #ocaml
nicholasf has quit [Ping timeout: 246 seconds]
tumdum has quit [Ping timeout: 268 seconds]
tumdum has joined #ocaml
tumdum has joined #ocaml
djellemah has quit [Ping timeout: 268 seconds]
Simn has joined #ocaml
jbrown has quit [Ping timeout: 268 seconds]
djellemah has joined #ocaml
mrvn has quit [Ping timeout: 268 seconds]
mrvn has joined #ocaml
jbrown has joined #ocaml
<flux> so @@@ stands for "frely floating" attributes, right? are they not really attached to anything?
<octachron> there are attached to the structure level (i.e the module level)
tmtwd has joined #ocaml
yunxing has quit [Remote host closed the connection]
freehck has joined #ocaml
nicholasf has joined #ocaml
antkong_ has quit [Quit: antkong_]
dsheets has joined #ocaml
silver has joined #ocaml
larhat has joined #ocaml
phrst has quit [Ping timeout: 260 seconds]
jwatzman|work has joined #ocaml
tmtwd has quit [Ping timeout: 244 seconds]
mort___ has joined #ocaml
tmtwd has joined #ocaml
phrst has joined #ocaml
mort___ has left #ocaml [#ocaml]
Vintila has quit [Ping timeout: 248 seconds]
tmtwd has quit [Ping timeout: 244 seconds]
mistermetaphor has joined #ocaml
mistermetaphor has quit [Ping timeout: 244 seconds]
Nahra has quit [Ping timeout: 248 seconds]
wolfcore has quit [Ping timeout: 240 seconds]
Kakadu has joined #ocaml
Nahra has joined #ocaml
wolfcore has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
sepp2k has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
dwillems has quit [Ping timeout: 276 seconds]
Haudegen has quit [Ping timeout: 276 seconds]
AltGr has joined #ocaml
<Leonidas> companion_cube: TIL. Neat.
nicoo has quit [Remote host closed the connection]
AltGr has left #ocaml [#ocaml]
nicoo has joined #ocaml
julien_t has joined #ocaml
julien_ has joined #ocaml
<Leonidas> broke Lwt with Fatal error: exception Unix.Unix_error(Unix.EINVAL, "select", "")
Vintila has joined #ocaml
<flux> did you close something?
<Leonidas> I might have had exactly this issue: https://github.com/ocsigen/lwt/issues/222
<Leonidas> I do *lots* of Lwt.async, 1 for every input line, which might have exceeded the number of FDs
<flux> I _think_ it would be possible for Lwt to detect the situation in a more graceful manner.. :)
julien_ has quit [Ping timeout: 260 seconds]
julien_t has quit [Ping timeout: 276 seconds]
<Leonidas> yeah, that should at least show a better error message
<Leonidas> can I force rebuilding the exact same version of lwt in opam somehow?
<Leonidas> [NOTE] Package lwt is already installed (current version is 2.5.1).
<flux> opam pim add lwt 1.2.3
<flux> pim?!
<flux> pin.
<flux> awesome, cmdliner(?) knows to suggest 'pin' in that case
<Leonidas> alright, opam install conf-libev triggers the rebuild just fine
<Leonidas> cmdliner is pretty awesome
<Leonidas> I wish for cmdliner for SQL :)
<`rks> 4
<`rks> (woops)
dhil has joined #ocaml
ontologiae has joined #ocaml
<Leonidas> need to get libev now into docker
mistermetaphor has joined #ocaml
dwillems has joined #ocaml
dsheets has quit [Remote host closed the connection]
mistermetaphor has quit [Ping timeout: 252 seconds]
_andre has joined #ocaml
dsheets has joined #ocaml
<flux> I wonder how difficult it would be to extend cmdliner so that it would provide automatic tab-expansion for zsh (and bash)
<flux> well, I suppose it can't be complete without some applicatino support. I would like to expand also (ie.) opam package names.
Haudegen has joined #ocaml
<mrvn> verry easy
<mrvn> look at the completion scriopts for git, rsync, apt-get for examples
<flux> I guess I would still need to tell zsh which apps are cmdliner-capable, but that would be a small effort
t4nk319 has joined #ocaml
<adrien> flux: or you install the completion file on the system
dsheets has quit [Remote host closed the connection]
Simn has quit [Read error: Connection reset by peer]
Simn has joined #ocaml
M-Illandan has quit [Remote host closed the connection]
<Drup> flux: for opam, there is already zsh support
<Drup> it should be installed automatically
Vintila has quit [Ping timeout: 244 seconds]
AltGr has joined #ocaml
dhil has quit [Ping timeout: 244 seconds]
dhil has joined #ocaml
dsheets has joined #ocaml
M-Illandan has joined #ocaml
nicholasf has quit [Remote host closed the connection]
AltGr has left #ocaml [#ocaml]
averell has joined #ocaml
meteo has joined #ocaml
nicholasf has joined #ocaml
yomimono has joined #ocaml
<flux> I have . /home/flux/ocaml/.opam/opam-init/init.zsh in my zsh, but I guess that's not enough?
<flux> right, complete.zsh as well. thanks!
nicholasf has quit [Remote host closed the connection]
Vintila has joined #ocaml
fluter has quit [Ping timeout: 264 seconds]
Maxdamantus has quit [Ping timeout: 260 seconds]
fluter has joined #ocaml
darkf has quit [Quit: Leaving]
hcarty1 has joined #ocaml
t4nk319 has quit [Ping timeout: 250 seconds]
kolko has joined #ocaml
fluter has quit [Ping timeout: 248 seconds]
fluter has joined #ocaml
struk|desk|away is now known as struk|desk
octachron has quit [Quit: Page closed]
pierpa has joined #ocaml
BitPuffin has joined #ocaml
<dwillems> I created a github repository to discuss, list tools and libraries/frameworks/bindings in OCaml to web technologies. If you want to contribute or are interessted in: https://github.com/dannywillems/ocaml-for-web-programming
<Leonidas> dwillems: Algebr will be delighted to hear
<reynir> I'm getting this error suddenly when I try to start utop Fatal error: cannot load shared library dlllambda-term_stubs
<reynir> I did some updates
<Leonidas> dwillems: You might need also database bindings
<dwillems> Leonidas: Yes, great ideas. Do you know some bindings ? There's Irmin (never used) no ?
<Leonidas> dwillems: ocaml-redis?
<Drup> dwillems: why not just use awesome-ocaml ?
<Drup> It already has some stuff listed
<Leonidas> that might be a good idea, yes.
Maxdamantus has joined #ocaml
<reynir> Okay, seems like utop and other packages weren't installed properly anymore o.O
<dwillems> Drup: I would like to have a single repo for web programming because it's a huge subject and I think it can be more useful to discuss about web programming in OCaml seperately than awesome-ocaml which contains other subjects. I think these repo are complementary. I do PR on awesome-ocaml but I still think it's useful to list more deeply in a separate repository.
<Khady> This could be on ocaml.org too
<companion_cube> dwillems: there is also "awesome OCaml"
<flux> :-)
<dwillems> Khady: great idea.
MercurialAlchemi has quit [Ping timeout: 252 seconds]
Vintila has quit [Ping timeout: 260 seconds]
ggole has joined #ocaml
buttons840 has joined #ocaml
struk|desk is now known as struk|desk|away
sh0t has joined #ocaml
<reynir> aha - my environment wasn't set properly!
copy` has joined #ocaml
kushal has quit [Quit: Leaving]
struk|desk|away is now known as struk|desk
kushal has joined #ocaml
jeffmo has joined #ocaml
marsam has joined #ocaml
yomimono has quit [Ping timeout: 248 seconds]
d0nn1e has quit [Ping timeout: 248 seconds]
d0nn1e has joined #ocaml
buttons840 has quit [Ping timeout: 240 seconds]
tmtwd has joined #ocaml
snhmib has joined #ocaml
MercurialAlchemi has joined #ocaml
marsam has quit [Remote host closed the connection]
<struk|desk> companion_cube: I wrote a function for gen but accidentally deleted the changes when rebasing (doh!) it was something like this : val peek : 'a t -> ('a * 'a option) t , which yields (current, Some next) for each iteration, or (_, None) for the last element of the generator.
<companion_cube> oh, interesting
<companion_cube> wait a sec
<struk|desk> companion_cube: I think it's worth having that function, otherwise it's pretty difficult to find the end of the stream without eagerly consuming
<struk|desk> partition does not work, for instance
<companion_cube> do you mean there's a bug?
<struk|desk> not a bug, just missing feature to support conditioning on whether the generator has anoter element
<companion_cube> ok
<companion_cube> wait
<struk|desk> ok, let me know if I missed a function that does it. partition and chunk don't, from what I can determine
julien_t has joined #ocaml
julien_ has joined #ocaml
<companion_cube> hmm it's not totally trivial to write, indeed
<struk|desk> yeah I had a version working though which was similar to https://github.com/c-cube/gen/blob/master/src/gen.ml#L244 but I added a reference to the last element as well, and did some look ahead in the critical bit
mistermetaphor has joined #ocaml
<companion_cube> just a sec, almost there
dwillems has quit [Ping timeout: 246 seconds]
misterme_ has joined #ocaml
badon has quit [Read error: Connection reset by peer]
badon has joined #ocaml
<struk|desk> cool, let me try it
<struk|desk> btw, this came up why I tried to implement clojure's "butlast" function in ocaml.
<struk|desk> which is terribly expensive to do on large lists, hence I wanted to do w/gen
<companion_cube> I see
mistermetaphor has quit [Ping timeout: 268 seconds]
<companion_cube> I suppose it would also be possible to have a "peek_n" function
<companion_cube> although it looks more complicated to write (maybe with a queue?)
<struk|desk> yeah I though that too, I'm indifferent
<companion_cube> if you think it's worth it, add an issue
tmtwd has quit [Ping timeout: 244 seconds]
<struk|desk> the simple peek is valuable enough for me, but I see the argument for the generalization. but to me, you probably can use chunk or partition instead most of the time for n > 2
julien_t has quit [Ping timeout: 260 seconds]
julien_ has quit [Ping timeout: 244 seconds]
<reynir> struk|desk: I think it should be possible to recover the commit if you're using git and the GC hasn't collected the reference
<reynir> (but I can't remember how to do it off hand)
<struk|desk> reynir: eh it's ok, companion_cube reimpl'ed it in minutes basically :)
<companion_cube> I enjoy writing this kind of functions ;-)
<companion_cube> also, it's better to use a variant than using a pair of references
<struk|desk> companion_cube: in what sense? performance? type safety?
<companion_cube> simplicity
<companion_cube> it removes some impossible cases
<struk|desk> I see
<companion_cube> remind me to release soon
slash^ has joined #ocaml
Ravana has quit [Quit: Goodbye for now!]
<struk|desk> companion_cube: looks good to me. thanks! btw, I keep having to remind myself that chunks in general isn't good enough due to the case when (length of generator) mod chunk_size = 0. But you could wrap the chunked array in a variant to indicate whether it's the last chunk I guess.
Ravana has joined #ocaml
badon_ has joined #ocaml
badon has quit [Disconnected by services]
badon_ is now known as badon
th5 has joined #ocaml
yomimono has joined #ocaml
kushal has quit [Quit: Leaving]
kushal has joined #ocaml
kushal has quit [Read error: Connection reset by peer]
yomimono has quit [Ping timeout: 248 seconds]
noddy has joined #ocaml
<Leonidas> I'm thinking of implementing a connection pool, but tbh, I have no idea how to store the connection values.
<Leonidas> If I use an immutable structure the connections might die and deplete the pool
<Leonidas> but if I use mutable data structures, this is kinda ugly as well :-/
<Drup> Lwt_pool ?
sepp2k has quit [Quit: Leaving.]
<Leonidas> Drup: maybe, but the redis library is only optionally dependant on Lwt, I'd like to keep it that way
<Leonidas> but maybe a good idea for inspiration
larhat has quit [Quit: Leaving.]
<Leonidas> "The optional function check is called after a use of an element failed."
<Leonidas> failed, how?
Haudegen has quit [Ping timeout: 250 seconds]
dwillems has joined #ocaml
<struk|desk> Leonidas: are you concerned about concurrency? I am assuming yes, but have to ask
<Leonidas> struk|desk: kinda, yeah.
<struk|desk> Leonidas: what is the "concurrency" model when you're not using lwt then?
jwatzman|work has quit [Quit: jwatzman|work]
sh0t has quit [Ping timeout: 248 seconds]
<Leonidas> struk|desk: I optionally use Lwt, but I like to have a fallback for the case where I am using synchronous execution
<Leonidas> I think my best bet is to functorize over the API of Lwt_pool.
t4nk448 has joined #ocaml
<struk|desk> Leonidas: and write your synchronous version of the signature, more or less?
<Leonidas> struk|desk: exactly
<hcarty1> struk|desk: You could use heavyweight threads for concurrency in this case too. Not as nice/easy as Lwt but still possible.
hcarty1 is now known as hcarty
noddy has quit [Ping timeout: 252 seconds]
sh0t has joined #ocaml
yunxing has joined #ocaml
misterme_ has quit [Remote host closed the connection]
mistermetaphor has joined #ocaml
dhil has quit [Ping timeout: 268 seconds]
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 244 seconds]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 268 seconds]
noddy has joined #ocaml
nicholasf has joined #ocaml
ollehar has joined #ocaml
nicholasf has quit [Remote host closed the connection]
dwillems has quit [Ping timeout: 264 seconds]
kushal has joined #ocaml
_andre has quit [Quit: leaving]
ygrek has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
code-ghalib has joined #ocaml
Kakadu has quit [Quit: Page closed]
kushal has quit [Ping timeout: 244 seconds]
Anarchos has joined #ocaml
dwillems has joined #ocaml
xvw_ has joined #ocaml
ggole has quit [Ping timeout: 244 seconds]
Lasher`_ is now known as Lasher`
dsheets has joined #ocaml
slash^ has left #ocaml [#ocaml]
Kakadu has joined #ocaml
struk|desk is now known as struk|desk|away
struk|desk|away is now known as struk|desk
BitPuffin has quit [Read error: Connection reset by peer]
antkong has joined #ocaml
larhat has joined #ocaml
xvw_ has quit [Quit: xvw_]
xvw_ has joined #ocaml
xvw_ has quit [Client Quit]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
antkong has quit [Ping timeout: 240 seconds]
antkong_ has joined #ocaml
<companion_cube> https://github.com/zoggy/ocaml-lru-cache/blob/master/lru_cache.ml hmm, this looks pretty slow...
`rks is now known as rks_
antkong_ has quit [Quit: antkong_]
<struk|desk> companion_cube: why is that? its just tree map semantics? everything should be O(log N) time, right?
<companion_cube> it looks to me like insertion is linear...
<companion_cube> there is a Map.cardinal, and a for loop
<struk|desk> companion_cube: oh oops, good point. Map.cardinal isn't O(1) I take it...and the for loop dooms it besides
dwchandler has left #ocaml [#ocaml]
code-ghalib has quit [Ping timeout: 250 seconds]
<companion_cube> I should propose a PR that replaces all the code with CCCache :]
<struk|desk> that link u sent..is it part of std ocaml lib?]
<companion_cube> no no, it's just some code on github
<struk|desk> oh ok, phew
<companion_cube> :D
Haudegen has joined #ocaml
mietek has quit [Ping timeout: 250 seconds]
mietek has joined #ocaml
badon_ has joined #ocaml
badon has quit [Disconnected by services]
badon_ is now known as badon
silver_ has joined #ocaml
srcerer_ has joined #ocaml
srcerer has quit [Ping timeout: 244 seconds]
silver has quit [Ping timeout: 244 seconds]
yomimono has joined #ocaml
Haudegen has quit [Ping timeout: 248 seconds]
dsheets has quit [Remote host closed the connection]
ollehar has quit [Quit: ollehar]
th5 has quit [Quit: Leaving.]
dwillems has quit [Ping timeout: 268 seconds]
srcerer_ has quit [Quit: ChatZilla 0.9.92 [Firefox 45.0.1/20160315153207]]
struk|desk is now known as struk|desk|away
srcerer has joined #ocaml
<Leonidas> this is interesting somehow, https://github.com/42dannywillems/Piscine.OCaml
<companion_cube> oh, so they use OCaml at 42
<companion_cube> interesting
t4nk448 has quit [Ping timeout: 250 seconds]
struk|desk|away is now known as struk|desk
<Leonidas> what is 42?
t4nk297 has joined #ocaml
<companion_cube> it's a programming school in France
<companion_cube> with a quite strange model, compared to the regular formations
nicholasf has joined #ocaml
<Leonidas> companion_cube: do you have a link? it's kinda terrible to google for
<Leonidas> oh, found it. I have to give credit to google
<struk|desk> companion_cube: I prefer array over list for the peeked data- so that the length is computationally efficient and/or for sake of future blitting on the array
<companion_cube> but it's more difficult to do...
<companion_cube> wait, maybe not
<struk|desk> it's how chunk does it, right?
<companion_cube> but it doesn't work the same way
<companion_cube> here it's a kind of sliding window
<struk|desk> fair enough. not a big deal either way. just a preference
<companion_cube> you're probably right
<struk|desk> ccringbuffer could do it easily enough :), too bad gen doesn't have it
<companion_cube> bah
<companion_cube> I'm trying to change
Simn has quit [Quit: Leaving]
<companion_cube> done
<companion_cube> not too complicated
<companion_cube> that was fun
darkf has joined #ocaml
<companion_cube> well that's more fun now that I fixed a bug.
nicholasf has quit [Ping timeout: 260 seconds]
<struk|desk> companion_cube: nice! here's how I would implement clojure's butlast, using gen: "let butlast g = peek g |> filter_map (function (_, None) -> None | (e, Some _) -> Some e)
<struk|desk> without peek that function is much more difficult
antkong_ has joined #ocaml
yomimono has quit [Ping timeout: 260 seconds]
nicholasf has joined #ocaml
Vintila has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 260 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
madroach has quit [Ping timeout: 244 seconds]
tmtwd has joined #ocaml
madroach has joined #ocaml
antkong_ has quit [Quit: antkong_]
antkong has joined #ocaml
dsheets has joined #ocaml
struk|desk is now known as struk|desk|away
Kakadu has quit [Remote host closed the connection]
dsheets has quit [Ping timeout: 250 seconds]
pyon is now known as nyon
buttons840 has joined #ocaml
silver_ has quit [Quit: rakede]
AltGr has joined #ocaml
antkong has quit [Quit: antkong]