adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.07.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.07/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml | Due to ongoing spam, you must register your nickname to talk on the channel
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
groovy2shoes has joined #ocaml
ziyourenxiang has joined #ocaml
silver_ has quit [Read error: Connection reset by peer]
keep_learning has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jbrown has quit [Ping timeout: 252 seconds]
kvda has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jbrown has joined #ocaml
tormen_ has joined #ocaml
tormen has quit [Ping timeout: 252 seconds]
kvda has joined #ocaml
kvda has quit [Client Quit]
kvda has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
al-damiri has quit [Quit: Connection closed for inactivity]
erkin has quit [Remote host closed the connection]
rdivyanshu has joined #ocaml
rdivyanshu has quit [Remote host closed the connection]
rdivyanshu has joined #ocaml
JimmyRcom has joined #ocaml
kvda has joined #ocaml
_whitelogger has joined #ocaml
JimmyRcom has quit [Ping timeout: 268 seconds]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JimmyRcom has joined #ocaml
rdivyanshu has quit [Ping timeout: 246 seconds]
rdivyanshu has joined #ocaml
steenuil has quit [Remote host closed the connection]
themsay has quit [Ping timeout: 252 seconds]
themsay has joined #ocaml
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ocaml
robyoung has joined #ocaml
robyoung has quit [Ping timeout: 256 seconds]
<xvilka> mirgating to dune
<xvilka> how to disable warning-as-error behavior?
Haudegen has joined #ocaml
<xvilka> also, how to silent warnings "Warning 10: this expression should have type unit
<xvilka> " about lines like Lwt_io.printf "some message blah-blah";
bartholin has joined #ocaml
themsay has quit [Ping timeout: 244 seconds]
orbifx2 has joined #ocaml
JimmyRcom has quit [Ping timeout: 250 seconds]
orbifx2 has quit [Ping timeout: 246 seconds]
ShalokShalom has joined #ocaml
ollehar has joined #ocaml
<flux[m]> it seems like a bug, though?
<flux[m]> shouldn't you do Lwt_io.printf.. >>= fun () ->
<flux[m]> or use some let%lwt () = .. syntax extension
<flux[m]> but yes please if someone knows how t odisable the -Werror mode in dune, do tell, it didn't annoy me enough last time to find it out.. :L)
<ollehar> Hi! Did anyone here hear about the programming language Granule? https://granule-project.github.io/granule.html
jaar has joined #ocaml
rand__ has joined #ocaml
themsay has joined #ocaml
<xvilka> flux[m]: not really a bug, Writing Lwt_io.printf ; is shorter then proper convention and it doesn't really change anything in behavior
<xvilka> s/then/than/
<xvilka> it is just printf after all
<flux[m]> so what happens if stdout blocks?
ggole has joined #ocaml
bartholin has quit [Remote host closed the connection]
Robdor has quit [Quit: Ping timeout (120 seconds)]
Robdor has joined #ocaml
<Armael> xvilka: it might work in practice but afaiu it's wrong to discard lwt promises like that
<Armael> Lwt_io.printf is non-blocking printf, so if you discard the promise it might not print at all
carlosdagos has quit [Quit: Connection closed for inactivity]
KeyJoo has joined #ocaml
glass has left #ocaml [#ocaml]
glass has joined #ocaml
glass has left #ocaml [#ocaml]
<Drup> Use Lwt_fmt.printf instead :p
<xvilka> Drup: yes, I will run sed eventually
<xvilka> Armael: in practice it works perfectly well
drdo has left #ocaml ["ERC (IRC client for Emacs 26.1)"]
<Drup> Except it's working more by chance than anything else.
themsay has quit [Ping timeout: 252 seconds]
<Drup> Don't be surprised if you start losing some print statements
themsay has joined #ocaml
<xvilka> hmmm, are there any shorter forms? or should I always use bind?
<xvilka> flux[m]: it turned out just run "dune --release build" is enough to disable -Werror
<Drup> xvilka: either bind or Lwt.async, if you don't care when it will be run.
_whitelogger has joined #ocaml
MadcapJake has quit [Remote host closed the connection]
MadcapJake has joined #ocaml
freyr69 has joined #ocaml
theglass has joined #ocaml
<flux[m]> best to just use plain Printf.printf, maybe?
<flux[m]> it doesn't sound like the process is supposed to really block on stdout, ie. it's producing very little output
KeyJoo has quit [Ping timeout: 268 seconds]
<flux[m]> buut I really wouldn't mind if we got rid of the IO monad. monads are nice and useful, yes, but. in particular if in future we can replace the code driving the effects as easily as with monads.
_whitelogger has joined #ocaml
_whitelogger has quit [Excess Flood]
_whitelogger has joined #ocaml
<xvilka> flux[m]: if you use plain printf it differs from the flow of the rest Lwt program
<flux[m]> so it does it you don't thread the monad :)
kvda has joined #ocaml
ygrek_ has joined #ocaml
<xvilka> flux[m]: not sure, with lwt_io.printf ""; it seems to follow the rest of the lwt execution
themsay has quit [Ping timeout: 272 seconds]
themsay has joined #ocaml
Haudegen has quit [Remote host closed the connection]
gareppa has joined #ocaml
<Leonidas> if you use Printf your program might block now
<Leonidas> This is why Async replaces the functions which produce side effects by things which have a type of `You_re_doing_it_wrong, essentially
<Leonidas> xvilka: you should never discard the monads, your program should basically be linked tree (linked with >>=) of Lwt.t with one place at the top executing it
<Leonidas> xvilka: and no, there is no shorter form. I use `let%bind () = foo_that_does_sideeffect () in …` but would love to have `foo_that_does_sideeffect ();[%bind]` instead
<Leonidas> but I was told you can't attach extension points to `;` so here we are.
andreypopp has joined #ocaml
<octachron> Leonidas, you can use "x ;%ext y", it is ugly as sin but valid
<andreypopp> Leonidas: ;%lwt works yeah, I use it sometimes
<Leonidas> oh, didn't know. Neato!
<Leonidas> octachron: still less boilerplatey than a completely purposeless bind.
ygrek_ has quit [Ping timeout: 245 seconds]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
rdivyanshu has quit [Remote host closed the connection]
kvda has quit [Ping timeout: 252 seconds]
noitakomentaja has joined #ocaml
rdivyanshu has joined #ocaml
rdivyanshu has quit [Ping timeout: 246 seconds]
rdivyanshu has joined #ocaml
rdivyanshu has quit [Remote host closed the connection]
Haudegen has joined #ocaml
rdivyanshu has joined #ocaml
rdivyanshu has quit [Ping timeout: 244 seconds]
KeyJoo has joined #ocaml
neatonk1 has quit [Ping timeout: 272 seconds]
mfp has joined #ocaml
nicoo has quit [Ping timeout: 256 seconds]
emily has quit [Ping timeout: 260 seconds]
nicoo has joined #ocaml
noitakomentaja has quit [Ping timeout: 246 seconds]
ygrek_ has joined #ocaml
KeyJoo has quit [Ping timeout: 268 seconds]
andreypopp has quit [Quit: Connection closed for inactivity]
lostman has joined #ocaml
gareppa has quit [Quit: Leaving]
gareppa has joined #ocaml
gareppa has quit [Remote host closed the connection]
gareppa has joined #ocaml
gareppa has quit [Client Quit]
neatonk has joined #ocaml
spew has joined #ocaml
gareppa has joined #ocaml
ShalokShalom has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
neatonk has quit [Ping timeout: 244 seconds]
neatonk1 has joined #ocaml
rdivyanshu has joined #ocaml
jbrown has quit [Ping timeout: 276 seconds]
FreeBirdLjj has joined #ocaml
jbrown has joined #ocaml
al-damiri has joined #ocaml
themsay has quit [Ping timeout: 252 seconds]
rdivyanshu has quit [Remote host closed the connection]
<Drup> well, `let%lwt () = .. in ...` works
rdivyanshu has joined #ocaml
themsay has joined #ocaml
rdivyanshu has quit [Ping timeout: 244 seconds]
neatonk1 has quit [Ping timeout: 252 seconds]
ollehar has quit [Ping timeout: 252 seconds]
freyr69 has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 252 seconds]
ShalokShalom has joined #ocaml
bartholin has joined #ocaml
rdivyanshu has joined #ocaml
emily has joined #ocaml
Haudegen has quit [Remote host closed the connection]
rand__ has quit [Ping timeout: 245 seconds]
neatonk has joined #ocaml
neatonk has quit [Ping timeout: 252 seconds]
FreeBirdLjj has joined #ocaml
neatonk has joined #ocaml
ygrek_ has quit [Ping timeout: 245 seconds]
neatonk has quit [Ping timeout: 252 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
ShalokShalom has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
lostman has quit [Quit: Connection closed for inactivity]
jaar has quit [Quit: Leaving]
Haudegen has joined #ocaml
neatonk has joined #ocaml
orbifx2 has joined #ocaml
neatonk has quit [Ping timeout: 260 seconds]
gareppa has quit [Quit: Leaving]
ggole has quit [Quit: ggole]
orbifx2 has quit [Read error: Connection reset by peer]
orbifx2 has joined #ocaml
neatonk has joined #ocaml
tane has joined #ocaml
steenuil has joined #ocaml
ziyourenxiang has quit [Ping timeout: 245 seconds]
neatonk has quit [Ping timeout: 268 seconds]
neatonk has joined #ocaml
rdivyanshu has quit [Ping timeout: 252 seconds]
rdivyanshu has joined #ocaml
jnavila has joined #ocaml
<rixed> The main benefit from threads in ocaml will be to clean the ocaml code from the ugly lwt syntax (but for the few instances where one need lightweight threads of course) ;)
gareppa has joined #ocaml
gareppa has quit [Client Quit]
<tane> rixed, threads have been available for a while
gareppa has joined #ocaml
kakadu_ has joined #ocaml
rdivyanshu has quit [Remote host closed the connection]
wilfredh has joined #ocaml
gareppa has quit [Remote host closed the connection]
<wilfredh> hi folks
<tane> howdy wilfredh
<wilfredh> I'm trying to understand what the difference is between `let foo = object ...` and `class foo = object ...`
<Armael> classes allow you to use inheritance
<wilfredh> both seem to let you close over the object definition
<wilfredh> `let foo x = object ... uses x` vs `class foo x = object ... uses x`
<wilfredh> I can write `let foo = object inherit...` -- are you saying that I can't inherit from `foo` in this example?
gareppa has joined #ocaml
<wilfredh> hm, looks like using `class` requires me to use `new` later
<Armael> class defines a way of creating objects of that class (using new); also you can define new classes that derive from it using inheritance
<Armael> object ... end just creates a standalone object
<rixed> tane: indeed, and I've recently rewritten a project using Lwt (imposed by dependencies) with non-lightweight threads for the sake of elegance. Hopefully less projects will "impose" lwt once the new threaded runtime is out.
<tane> rixed, I've not programmed ocaml for a while, but it sounds like you're confusing thread parallelism and I/O concurrency on purpose. Care to elaborate?
ruffy_ has quit [Quit: WeeChat 2.2]
neatonk has quit [Ping timeout: 272 seconds]
neatonk has joined #ocaml
JimmyRcom has joined #ocaml
dejanr has joined #ocaml
jnavila has quit [Remote host closed the connection]
Haudegen has quit [Read error: Connection reset by peer]
silver has joined #ocaml
orbifx2 has quit [Read error: Connection reset by peer]
orbifx2 has joined #ocaml
gareppa has quit [Quit: Leaving]
alpha has joined #ocaml
groovy2shoes has quit [Ping timeout: 260 seconds]
zv has joined #ocaml
Guest5733 has joined #ocaml
spew has quit [Quit: going home]
zv has quit [Ping timeout: 272 seconds]
Guest5733 has quit [Remote host closed the connection]
tane has quit [Quit: Leaving]
zv has joined #ocaml
nicoo has quit [Ping timeout: 256 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
Algebr has joined #ocaml
orbifx2 has quit [Read error: Connection reset by peer]
nicoo has joined #ocaml
orbifx2 has joined #ocaml
Jesin has quit [Quit: Leaving]
bartholin has quit [Remote host closed the connection]
Algebr has quit [Remote host closed the connection]
jbrown has quit [Ping timeout: 252 seconds]
Haudegen has joined #ocaml
jbrown has joined #ocaml
orbifx2 has quit [Ping timeout: 244 seconds]
Algebr has joined #ocaml
cthuluh has quit [Ping timeout: 260 seconds]
Haudegen has quit [Read error: Connection reset by peer]
kakadu_ has quit [Remote host closed the connection]
Haudegen has joined #ocaml
_whitelogger has joined #ocaml
cthuluh has joined #ocaml