adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Current MOOC: https://huit.re/ocamlmooc | OCaml 4.04.0 release notes: http://ocaml.org/releases/4.04.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
StatelessCat has quit [Ping timeout: 260 seconds]
larhat1 has quit [Quit: Leaving.]
<xyproto> how do you write a "hello" function in OCaml that takes one optional argument where if the argument is given it says "Hello " ^ arg, and if not, it says "Hello Bob"?
<xyproto> I tried matching with None and Some, tried labeled arguments with "?". I'm new to OCaml.
<xyproto> Like 'def hello(name="Bob"):' in Python
Algebr has quit [Ping timeout: 245 seconds]
<octachron> xyproto, 'let hello ?(arg="Bob") () = … '
<octachron> (the last argument is necessary to make arg truly optional )
whisperedcigar has joined #ocaml
Algebr has joined #ocaml
whisperedcigar has quit [Ping timeout: 245 seconds]
ncthom91 has joined #ocaml
_whitelogger has joined #ocaml
octachron has quit [Quit: Leaving]
pierpa has quit [Ping timeout: 246 seconds]
scitesy has quit [Remote host closed the connection]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 268 seconds]
jao has joined #ocaml
Algebr has quit [Ping timeout: 240 seconds]
mfp has quit [Ping timeout: 256 seconds]
silver has quit [Read error: Connection reset by peer]
unbalanced has joined #ocaml
unbalanced has quit [Ping timeout: 264 seconds]
ncthom91 has joined #ocaml
whisperedcigar has joined #ocaml
ncthom91 has quit [Client Quit]
camlight has joined #ocaml
whisperedcigar has quit [Ping timeout: 245 seconds]
<camlight> is there a way to do #ifdef that can be disabled during compile time?
<camlight> i know i can make two modules and link the debugging version when needed
<camlight> but is there a more "idiomatic way" for doing this?
pyon has quit [Remote host closed the connection]
pyon has joined #ocaml
scitesy has joined #ocaml
wu_ng has joined #ocaml
FreeBirdLjj has joined #ocaml
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
zirman has quit [Client Quit]
copy` has quit [Quit: Connection closed for inactivity]
infinity0 has quit [Ping timeout: 245 seconds]
infinity0 has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
Madars has joined #ocaml
johnf_ has quit [Read error: Connection reset by peer]
johnf_ has joined #ocaml
johnf_ has quit [Read error: Connection reset by peer]
johnf_ has joined #ocaml
infinity0 has quit [Ping timeout: 256 seconds]
infinity0 has joined #ocaml
jao has quit [Ping timeout: 256 seconds]
jao has joined #ocaml
johnf_ has quit [Read error: Connection reset by peer]
nomicflux has joined #ocaml
johnf_ has joined #ocaml
camlight has quit [Quit: Page closed]
jao has quit [Ping timeout: 268 seconds]
johnf_ has quit [Read error: Connection reset by peer]
johnf_ has joined #ocaml
clog has quit [Ping timeout: 246 seconds]
fre has joined #ocaml
johnf_ has quit [Ping timeout: 264 seconds]
johnf_ has joined #ocaml
nomicflux has quit [Quit: nomicflux]
average has quit [Quit: leaving]
ygrek_ has joined #ocaml
Mercuria1Alchemi has joined #ocaml
fre has quit [Ping timeout: 246 seconds]
scitesy has quit [Ping timeout: 250 seconds]
rand__ has joined #ocaml
freusque has joined #ocaml
wu_ng has quit [Read error: Connection reset by peer]
wu_ng has joined #ocaml
rb___3 has joined #ocaml
rb___3 has quit [Remote host closed the connection]
pyx has joined #ocaml
pyx has quit [Client Quit]
alfredo has joined #ocaml
jnavila has joined #ocaml
freusque has quit [Ping timeout: 258 seconds]
<def`> using preprocessors like cppo or ppx_optcomp
clog has joined #ocaml
KV has joined #ocaml
whisperedcigar has joined #ocaml
freusque has joined #ocaml
whisperedcigar has quit [Ping timeout: 245 seconds]
d0nn1e has quit [Ping timeout: 248 seconds]
d0nn1e has joined #ocaml
KV has quit [Ping timeout: 260 seconds]
vicfred has joined #ocaml
AltGr has joined #ocaml
larhat has joined #ocaml
SIGILL has quit [Quit: WeeChat 1.4]
zpe has joined #ocaml
SIGILL has joined #ocaml
maattdd has joined #ocaml
Simn has joined #ocaml
argent_smith has joined #ocaml
rwmjones has quit [Ping timeout: 246 seconds]
rwmjones has joined #ocaml
hunteriam has joined #ocaml
rwmjones has quit [Ping timeout: 260 seconds]
rwmjones has joined #ocaml
mfp has joined #ocaml
Orion3k has quit [Ping timeout: 250 seconds]
Orion3k has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 250 seconds]
freusque has quit [Ping timeout: 258 seconds]
orbifx1 has joined #ocaml
orbifx1 has quit [Client Quit]
ygrek_ has quit [Ping timeout: 264 seconds]
demonimin has quit [Ping timeout: 248 seconds]
freusque has joined #ocaml
demonimin has joined #ocaml
jwatzman|work has joined #ocaml
troydm has quit [Ping timeout: 258 seconds]
rwmjones has quit [Ping timeout: 265 seconds]
rwmjones has joined #ocaml
zpe has joined #ocaml
wu_ng has quit [Ping timeout: 256 seconds]
zozozo has quit [Remote host closed the connection]
zozozo has joined #ocaml
maattdd has quit [Ping timeout: 258 seconds]
larhat has quit [Quit: Leaving.]
TarVanimelde has quit [Quit: TarVanimelde]
hunteriam has quit [Quit: Connection closed for inactivity]
TarVanimelde has joined #ocaml
silver has joined #ocaml
larhat has joined #ocaml
_andre has joined #ocaml
kakadu has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
cic has quit [Ping timeout: 245 seconds]
djellemah has quit [Remote host closed the connection]
fraggle_ has joined #ocaml
djellemah has joined #ocaml
jeroud has quit []
djellemah has quit [Remote host closed the connection]
jeroud has joined #ocaml
KV has joined #ocaml
sepp2k has joined #ocaml
Sorella has joined #ocaml
whisperedcigar has joined #ocaml
djellemah has joined #ocaml
maattdd has joined #ocaml
chenglou has quit []
jao has joined #ocaml
chenglou has joined #ocaml
whisperedcigar has quit [Ping timeout: 245 seconds]
KV has quit [Ping timeout: 258 seconds]
andreypopp has quit []
andreypopp has joined #ocaml
infinity0 has quit [Remote host closed the connection]
cic has joined #ocaml
infinity0 has joined #ocaml
mattg has quit []
mattg has joined #ocaml
jcloud has quit []
FreeBirdLjj has joined #ocaml
jcloud has joined #ocaml
zirman has joined #ocaml
freusque has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Ping timeout: 268 seconds]
agarwal1975 has quit [Quit: agarwal1975]
parataxis has quit []
parataxis has joined #ocaml
Algebr has joined #ocaml
noddy has quit [Ping timeout: 250 seconds]
esad has joined #ocaml
Algebr has quit [Ping timeout: 245 seconds]
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
unbalanced has joined #ocaml
bigs_ has quit []
bigs_ has joined #ocaml
_andre_ has joined #ocaml
_andre has quit [Ping timeout: 245 seconds]
Algebr has joined #ocaml
jao has quit [Ping timeout: 252 seconds]
fraggle-boate has joined #ocaml
freusque has joined #ocaml
malc_ has joined #ocaml
maattdd has quit [Ping timeout: 252 seconds]
agarwal1975 has joined #ocaml
sh0t has joined #ocaml
malc_ has quit [Remote host closed the connection]
yomimono has joined #ocaml
peddie has quit [Ping timeout: 260 seconds]
engil has quit [Ping timeout: 260 seconds]
srax has quit [Ping timeout: 260 seconds]
engil has joined #ocaml
maattdd has joined #ocaml
srax has joined #ocaml
peddie has joined #ocaml
nomicflux has joined #ocaml
ryanartecona has joined #ocaml
whisperedcigar has joined #ocaml
jlongster has joined #ocaml
FreeBirdLjj has joined #ocaml
maattdd has quit [Ping timeout: 268 seconds]
pyon has quit [Ping timeout: 248 seconds]
marsam has joined #ocaml
Mercuria1Alchemi has quit [Ping timeout: 265 seconds]
maattdd has joined #ocaml
ziyourenxiang has joined #ocaml
michbad has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
ryanartecona has quit [Quit: ryanartecona]
Orion3k has quit [Ping timeout: 264 seconds]
whisperedcigar has quit [Ping timeout: 245 seconds]
Orion3k has joined #ocaml
marsam has quit [Read error: Connection reset by peer]
al-damiri has joined #ocaml
esad has quit [Quit: Textual IRC Client: www.textualapp.com]
menasw has quit []
menasw has joined #ocaml
menasw has quit [Changing host]
menasw has joined #ocaml
zobar has joined #ocaml
whisperedcigar has joined #ocaml
maattdd has quit [Ping timeout: 258 seconds]
ryanartecona has joined #ocaml
<zobar> Hi . . . so I'm trying to create an alias for a function type. tbh, it's easier to show than to explain. https://gist.github.com/zobar/5b07f9f745f42c9a88ff9b45abc49910
<zobar> the functions i'm trying to describe take a function from 'a to whatever, and then return the same type that the function returned.
al-damiri has quit []
al-damiri has joined #ocaml
<zobar> it's easy enough to declare a function like that, but i can't seem to describe it formally as a type alias, if that makes sense.
freusque has quit [Quit: WeeChat 1.5]
maattdd has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
alfredo has quit [Quit: Textual IRC Client: www.textualapp.com]
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
malc_ has joined #ocaml
<companion_cube> the record works, right?
<companion_cube> it cannot be a type alias because `'b. ('a -> b') -> 'b` is not in the hindley milner fragment
<companion_cube> in other words, it's outside the inferable fragment
<companion_cube> by wrapping in a record, which you will have to build explicitely, you indicate the expected type (and expected generalization of 'a) to the type checker
FreeBirdLjj has joined #ocaml
zirman has quit [Remote host closed the connection]
<zobar> yeah, the record works fine
<zobar> i'm just kind of new to ocaml & thought maybe i was just putting the 'b. in the wrong place or something
<companion_cube> no, you hit a limitation
<companion_cube> you really need the record for this kind of things
<zobar> wordup, thank you
fre has joined #ocaml
larhat has quit [Quit: Leaving.]
slash^ has joined #ocaml
zobar has quit [Quit: Leaving.]
whisperedcigar has quit [Ping timeout: 245 seconds]
luzie has quit [Quit: WeeChat 1.7-dev]
luzie has joined #ocaml
jnavila has quit [Read error: Connection reset by peer]
jnavila has joined #ocaml
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
chindy has joined #ocaml
ziyourenxiang has quit [Quit: Leaving]
mfp has quit [Ping timeout: 260 seconds]
jnavila has quit [Quit: It was time]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
pyon has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
whisperedcigar has joined #ocaml
vicfred has quit [Quit: Leaving]
marsam has joined #ocaml
marsam has quit [Remote host closed the connection]
marsam has joined #ocaml
mfp has joined #ocaml
zirman has quit [Remote host closed the connection]
pierpa has joined #ocaml
wolfcore has quit [Ping timeout: 246 seconds]
whisperedcigar has quit [Ping timeout: 245 seconds]
whisperedcigar has joined #ocaml
maattdd has quit [Ping timeout: 245 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
average has joined #ocaml
<seliopou> jlouis: ping
marsam has quit [Read error: Connection reset by peer]
jwatzman|work has quit [Quit: jwatzman|work]
FreeBirdLjj has joined #ocaml
rks`_ is now known as rks-
rossberg has quit [Ping timeout: 246 seconds]
noddy has joined #ocaml
noddy has quit [Client Quit]
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
kolko has quit [Ping timeout: 246 seconds]
kolko has joined #ocaml
noddy has joined #ocaml
smondet` has quit [Ping timeout: 258 seconds]
rossberg has joined #ocaml
noddy has quit [Ping timeout: 258 seconds]
ryanartecona has quit [Quit: ryanartecona]
malc_ has quit [Remote host closed the connection]
luzie has quit [Quit: WeeChat 1.7-dev]
zirman has joined #ocaml
zirman has quit [Remote host closed the connection]
zirman has joined #ocaml
vramana has quit [Remote host closed the connection]
unbalanced has quit [Ping timeout: 240 seconds]
noddy has joined #ocaml
vramana has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
zirman has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
zirman has joined #ocaml
smondet has joined #ocaml
vramana has quit [Ping timeout: 268 seconds]
yomimono has quit [Ping timeout: 246 seconds]
sepp2k has quit [Quit: Leaving.]
vramana has joined #ocaml
michbad has quit [Ping timeout: 246 seconds]
michbad has joined #ocaml
FreeBirdLjj has joined #ocaml
rossberg has quit [Ping timeout: 246 seconds]
whisperedcigar has quit [Ping timeout: 245 seconds]
yomimono has joined #ocaml
whisperedcigar has joined #ocaml
rossberg has joined #ocaml
arc- has quit [Ping timeout: 268 seconds]
copy` has joined #ocaml
vramana has quit [Ping timeout: 268 seconds]
vramana has joined #ocaml
Algebr has quit [Ping timeout: 250 seconds]
ygrek_ has joined #ocaml
malc_ has joined #ocaml
esad has joined #ocaml
whisperedcigar has quit [Ping timeout: 245 seconds]
kakadu has joined #ocaml
luzie has joined #ocaml
vramana has quit [Ping timeout: 268 seconds]
ryanartecona has joined #ocaml
jnavila has joined #ocaml
vramana has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
julian__ has joined #ocaml
yomimono has quit [Ping timeout: 258 seconds]
chindy has quit [Ping timeout: 256 seconds]
KV has joined #ocaml
julian__ has quit [Client Quit]
chindy has joined #ocaml
rgrinberg has joined #ocaml
_andre_ has quit [Quit: leaving]
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
Algebr has joined #ocaml
malc_ has quit [Remote host closed the connection]
zpe has joined #ocaml
<Algebr> How is one supposed to make Lwt work across cores? Like say you fork in program startup, okay, then what
<Algebr> okay so its forking for each job....
<Algebr> What I want is to use 4 cores and distribute 'a Lwt.t to each evenly
<Algebr> but I don't want to fork for each 'a Lwt.t
<Algebr> because there will be many made
<Drup> use the second function.
<Drup> (actually, the thrid, "process")
<Drup> You're not going to have magical distribution of Lwt.t, the message passing based approach using pipes is, I think, a quite decent API.
<Algebr> why am I getting some pipe
<Algebr> I don't understand the process function signature, I want to say do this work on some core that has the least amount of work on it
<Drup> Yeah, as I said, you will not have magical distribution of jobs.
<Algebr> okay, I'm lost then, how does this process function help me then?
<Drup> I'm not aware a job based Lwt library with automatic balancing
<Drup> if you have a processing function f, you can create a process to which you can send jobs, and the f function will be used on each job you send, and you can get back some information, if you need them, via the pipe
<Drup> So, you can balance things out.
<Drup> if you want a job queue, there are things like zmq (several opam libraries)
jwatzman|work has joined #ocaml
<Drup> (see also https://github.com/rizo/awesome-ocaml#parallelism but afaik, none of them is lwt-powered)
<Algebr> this ecosystem can be quite frustrating.
<Drup> Yeah, especially with things like parallelism, that few people really use.
<flux> I wonder if actually ocaml-multicore does that assignment of threads to separate cores. are the domains explicit?
FreeBirdLjj has quit [Remote host closed the connection]
<Drup> flux: afaik, there is some autobalancing thing going on
<Algebr> when will multicore land again?
<Algebr> !multicore
<Drup> whenitsready™
octachron has joined #ocaml
<flux> I think this time it's going to happen, though, better than those previous attempts.. :)
<flux> the typed effect system, maybe not
ocabot has joined #ocaml
<flux> which is a shame because it seems very cool.
MercurialAlchemi has quit [Ping timeout: 258 seconds]
esad has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
isd has joined #ocaml
argent_smith has quit [Quit: Leaving.]
FreeBirdLjj has joined #ocaml
rgrinberg has quit [Remote host closed the connection]
<rand__> Algebr: I made some simple code for chunking jobs over Lwt-parallel https://github.com/rand00/nltc/blob/master/src/parajobs/parallel_jobs.ml
<rand__> .. you can see how it's used inside https://github.com/rand00/nltc/blob/master/src/analysis.ml
<rand__> have to go
rand__ has quit [Quit: leaving]
FreeBirdLjj has quit [Read error: Connection reset by peer]
jnavila has quit [Remote host closed the connection]
<Algebr> rand__ thanks!
freehck has quit [Ping timeout: 250 seconds]
esad has joined #ocaml
Algebr has quit [Ping timeout: 246 seconds]
nomicflux has quit [Quit: nomicflux]
FreeBirdLjj has joined #ocaml
AltGr has left #ocaml [#ocaml]
d0nn1e has quit [Ping timeout: 258 seconds]
d0nn1e has joined #ocaml
chindy has quit [Remote host closed the connection]
jwatzman|work has quit [Quit: jwatzman|work]
jwatzman|work has joined #ocaml
jwatzman|work has quit [Client Quit]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
_berke_ has joined #ocaml
zirmann has joined #ocaml
<_berke_> how do I pass an -inline option for an oasis project? I tried various combination of ./configure --override ocamlbuildflags "-cflags -inline,99", -passopt, etc.
gallais has quit [Read error: Connection reset by peer]
zpe has quit [Ping timeout: 250 seconds]
zirman has quit [Ping timeout: 256 seconds]
fraya has joined #ocaml
zirmann has quit [Ping timeout: 250 seconds]
<_berke_> ...ended up adding flag ["ocaml";"compile";"native";"inline99"] (S [A"-inline"; A"99"]) to myocamlbuild.ml
<Drup> _berke_: add "true: inline(99)" in your _tags file, outside of the oasis section
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
jlongster has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gallais has joined #ocaml
apache3_ has quit [Quit: Reconnecting]
apache3 has joined #ocaml
<_berke_> drup: thanks that's easier :)
KV has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
jlongster has joined #ocaml
jlongster has quit [Client Quit]
<seliopou> vbmithr: you here?
fraya has quit [Quit: Leaving]
esad has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
silver_ has joined #ocaml
<vbmithr> yep
<vbmithr> Basically, I'm trying to set up a TLS enabled server
<vbmithr> I'm currently trying cohttp on HEAD
<vbmithr> It seems it is working here, strangely.
<vbmithr> (using ocaml-ssl)
silver has quit [Ping timeout: 258 seconds]
zirman has joined #ocaml
TarVanimelde has joined #ocaml
<vbmithr> Well, no, it's not working at all.
<vbmithr> seliopou: You can reproduce using ./cohttp_server_lwt.native --tls server.crt,server.key -vv
<vbmithr> If you're in the same situation as me, the server should crash.
zirman has quit [Ping timeout: 264 seconds]
<seliopou> the exceptions from the issue seem... strage
<seliopou> ugh did cohttp switch away from oasis?
<seliopou> Why? :(
<seliopou> oh nevermind it's still there
<vbmithr> It didn't, yes.
rwmjones has quit [Ping timeout: 258 seconds]
kakadu has quit [Remote host closed the connection]
<seliopou> forgot to install ssl :?
<seliopou> while it compiles, i might as well ask if you've considered doing ssl termination in something like nginx instead?
FreeBirdLjj has joined #ocaml
rwmjones has joined #ocaml
<vbmithr> well…
<vbmithr> that does not solve the problem
<vbmithr> but yeah of course in last resort i will forget about ocaml + ssl
<vbmithr> not very satisfactory
<seliopou> i'm not a huge fan of conduit or lanugage-specific handling of ssl connections in general
<seliopou> but anyways, I'm not getting any error on my side
<seliopou> erm, scratch that connection reset by peer
<seliopou> pwned by peer
<vbmithr> not getting any error… ok
<seliopou> server is quiet, client can't connect
<seliopou> could be that i don't know how to generate an ssl certificate properly...
<vbmithr> Possibly… :(
<vbmithr> Use easyrsa?
<vbmithr> easyrsa init-pki ; easyrsa build-ca ; easyrsa build-server-full localhost nopass ;
<vbmithr> That should generate everything you need (pki/issued/localhost.crt pki/private/localhost.key)
<seliopou> sadly i dont have root on the linux machine i'm working on
<seliopou> oh forgot the s
<seliopou> :D
<seliopou> yeah things work on my side
<seliopou> not the directory listing
<vbmithr> Maybe my browser?
<seliopou> curl worked for you?
<seliopou> oh hey hey
Jnr has joined #ocaml
<seliopou> from the browser i get exns
<vbmithr> Let me try curl
<vbmithr> Firefox is actually cutting the connection because it is a self signed certificate.
<seliopou> Ssl.Read_error(5)
<seliopou> map.ml, line 122
<seliopou> called from file sexp_conv.ml, line 158
<vbmithr> same
fre has quit [Ping timeout: 252 seconds]
<vbmithr> mmmmmmmmh
<vbmithr> Ok, actually, it "worked"
<seliopou> :tada:
<seliopou> i gotta go
<seliopou> good luck!
<vbmithr> Thank you.
<vbmithr> :)
troydm has joined #ocaml
octachron has quit [Quit: Leaving]
esad has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
rwmjones has quit [Ping timeout: 248 seconds]
rwmjones has joined #ocaml
Simn has quit [Quit: Leaving]
ryanartecona has quit [Quit: ryanartecona]
rwmjones has quit [Ping timeout: 258 seconds]
rwmjones has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
TarVanimelde has joined #ocaml
Jnr has quit [Ping timeout: 260 seconds]