xbanana has quit [Quit: Connection closed for inactivity]
johnelse has quit [Ping timeout: 252 seconds]
ggole has joined #ocaml
carlosdagos has joined #ocaml
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 240 seconds]
zlsyx has joined #ocaml
theglass has quit [Excess Flood]
theglass has joined #ocaml
theglass has joined #ocaml
theglass has quit [Changing host]
JimmyRcom has joined #ocaml
JimmyRcom has quit [Ping timeout: 252 seconds]
caente has joined #ocaml
Guest24331 has quit [Ping timeout: 268 seconds]
<xvilka>
uh, lack of proper multithreading is so painful
caente has quit [Ping timeout: 250 seconds]
zlsyx has quit [Quit: Leaving...]
metreo has joined #ocaml
<xvilka>
Is there any function akin sleep() that actually blocks Lwt thread?
<xvilka>
Need it for small testcase
sagotch has joined #ocaml
_whitelogger has joined #ocaml
<def`>
Uh? Lwt_unix.sleep?
andrewalker has quit [Quit: ZNC 1.6.2 - http://znc.in]
<xvilka>
def`: nevermind, it was Unix.sleep ()
<xvilka>
def`: it was enough to block all Lwt threads as it turned out
jerith has quit [Ping timeout: 252 seconds]
jerith has joined #ocaml
Rosslaew_ has joined #ocaml
sagotch has quit [Quit: Leaving.]
sagax_ has joined #ocaml
jbrown has quit [Ping timeout: 252 seconds]
bartholin has joined #ocaml
orbifx1 has joined #ocaml
tianon has quit [Ping timeout: 252 seconds]
tianon has joined #ocaml
orbifx1 has quit [Ping timeout: 250 seconds]
jbrown has joined #ocaml
sagotch has joined #ocaml
carlosdagos has quit [Quit: Connection closed for inactivity]
johnelse has joined #ocaml
sagotch has quit [Remote host closed the connection]
ollehar has joined #ocaml
johnelse_ has joined #ocaml
Rosslaew_ has quit [Remote host closed the connection]
johnelse has quit [Ping timeout: 246 seconds]
andrewalker has joined #ocaml
metreo has quit [Ping timeout: 240 seconds]
steenuil has quit [Remote host closed the connection]
steenuil has joined #ocaml
sshine has joined #ocaml
<sshine>
hi
jaar has joined #ocaml
<zozozo>
sshine: hello
<sshine>
I just downloaded and installed ocaml 4.08.0 from GitHub. I want to do the same thing with OPAM, and I ran './configure', 'make lib-ext', and 'make', and I get the error: Error while linking /usr/local/lib/ocaml/unix.cma(Unix): The external function `unix_environment_unsafe' is not available
<sshine>
what am I missing?
<Leonidas>
xvilka: strange, because I never want multithreading :-)
<CcxWrk>
You generally want cooperative multitasking (aka async) when doing IO-heavy tasks and preemptive multitasking (aka threads) for CPU-bound workloads.
<CcxWrk>
But it's not clear cut as many OS interfaces are only blocking and in these cases you may either go on full threaded, employ threadpool below async handlers or just hope the calls won't take too long.
<def`>
The cooperative multitasking abstraction should take of the OS limitations
<Armael>
j
metreo has left #ocaml [#ocaml]
metreo has joined #ocaml
metreo has left #ocaml [#ocaml]
metreo has joined #ocaml
<metreo>
so ocaml is technically a package in opam?
metreo has quit [Quit: Leaving.]
metreo has joined #ocaml
<xvilka>
even opam is technically a package in opam
<metreo>
oh interesting I'd like to learn more about OCaml
kakekongen has quit [Quit: WeeChat 2.2]
metreo has quit [Quit: Leaving.]
metreo has joined #ocaml
al-damiri has joined #ocaml
richi235 has quit [Quit: No Ping reply in 180 seconds.]
metreo has quit [Quit: Leaving.]
richi235 has joined #ocaml
<xvilka>
uh, why, why dune doesn't allow to use the same *.ml file twice for two different executable targets in one dune file!?
<Leonidas>
xvilka: my solution is to put everything in libraries
caente has joined #ocaml
<Leonidas>
actually I wrote about that in a blog post
<Leonidas>
(that is about to go live, hmm, next week maybe)
<Leonidas>
xvilka: Basically every of our executable links to a lib called executable_lib where all the actual logic lives.
<xvilka>
Leonidas: yes, in one case I did so, I gave up, but today encountered a new case which will require major refactor, sigh
manas has joined #ocaml
<xvilka>
so I hoped maybe there are quick arounds, at least before wasting time for one more refactor
<xvilka>
ing
<Leonidas>
I kinda like that it is pretty clear where an .ml file belongs to
Haudegen has quit [Remote host closed the connection]
silver has joined #ocaml
metreo has joined #ocaml
jnavila has quit [Ping timeout: 246 seconds]
johnelse_ has quit [Ping timeout: 268 seconds]
jaar has quit [Remote host closed the connection]
quarters has joined #ocaml
jaar has joined #ocaml
johnelse has joined #ocaml
<bartholin>
I have a question about polymorphic variants. In the following code https://pastebin.com/SWY1Lu6e is there a more clever way to write the digit_to_nonzerodigit function?
metreo has quit [Quit: Leaving.]
<ggole>
| #nonzerodigit as d -> d
<bartholin>
oh
<bartholin>
ok
<ggole>
You can use a similar trick in the type definitions, too
johnelse has quit [Read error: Connection reset by peer]
johnelse has joined #ocaml
Haudegen has joined #ocaml
tane has joined #ocaml
iwkse17 has joined #ocaml
iwkse17 has quit [Remote host closed the connection]
metreo has joined #ocaml
sagax_ has quit [Quit: Konversation terminated!]
mildtaste has quit [Remote host closed the connection]
JimmyRcom has joined #ocaml
metreo has quit [Quit: Leaving.]
metreo has joined #ocaml
metreo has quit [Client Quit]
metreo has joined #ocaml
metreo has quit [Quit: Leaving.]
jnavila has joined #ocaml
jken has joined #ocaml
jbrown has quit [Ping timeout: 252 seconds]
nullifidian_ has joined #ocaml
nullifidian has quit [Ping timeout: 268 seconds]
jbrown has joined #ocaml
ShalokShalom has quit [Ping timeout: 240 seconds]
maufred has joined #ocaml
maufred has quit [Client Quit]
maufred has joined #ocaml
Haudegen has quit [Remote host closed the connection]
maufred has quit [Quit: WeeChat 2.3]
jaar has quit [Ping timeout: 252 seconds]
roygbiv has joined #ocaml
quarters has quit [Changing host]
quarters has joined #ocaml
quarters has joined #ocaml
fraxamo has joined #ocaml
kakadu has quit [Remote host closed the connection]
jbrown has quit [Ping timeout: 252 seconds]
jbrown has joined #ocaml
ggole has quit [Quit: ggole]
kakadu has joined #ocaml
roygbiv has quit [Quit: ™]
jaar has joined #ocaml
johnelse has quit [Ping timeout: 240 seconds]
jaar has quit [Quit: Leaving]
ShalokShalom has joined #ocaml
pierpa has joined #ocaml
freusque has joined #ocaml
manas has quit [Remote host closed the connection]
freusque has quit [Client Quit]
freusque has joined #ocaml
freusque has quit [Client Quit]
groovy2shoes has quit [Quit: moritura te salutat]
fraxamo has quit [Quit: Leaving]
orbifx1 has joined #ocaml
ShalokShalom has quit [Ping timeout: 244 seconds]
ShalokShalom has joined #ocaml
ocamlnewb has joined #ocaml
<ocamlnewb>
hello, I'm curious about how String.sub work. How come that the following code let a = "a" in String.sub a 1 0;; returns an empty string? I mean I'm pretty happy it does return an empty string but would have never thought that 1 could be a valid start in "a".
<companion_cube>
think of it as an editor's cursor
<companion_cube>
positioned just after the 'a' :)
manas has joined #ocaml
manas has quit [Ping timeout: 240 seconds]
ocamlnewb has quit [Ping timeout: 256 seconds]
snhmib has joined #ocaml
orbifx1 has quit [Read error: Connection reset by peer]
orbifx1 has joined #ocaml
orbifx1 has quit [Ping timeout: 240 seconds]
snhmib has quit [Ping timeout: 252 seconds]
ocamlnewb has joined #ocaml
<ocamlnewb>
Oh right more of a cursor than a reference to one of the string's element! Thanks that makes much more sense.
jnavila has quit [Ping timeout: 252 seconds]
ocamlnewb has quit [Ping timeout: 256 seconds]
groovy2shoes has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
dxtr has quit [Remote host closed the connection]
tane has quit [Quit: Leaving]
bartholin has quit [Remote host closed the connection]
kakadu has quit [Remote host closed the connection]