<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.
<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>
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)
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...