<infinity0>
haesbaert: /bin/nc.openbsd is what i have
<infinity0>
there's quite a few, right
<haesbaert>
yeah, that's the one :P
<haesbaert>
nowadays is basically that one and the gnu
Fistine has quit [Ping timeout: 260 seconds]
Fistine has joined #ocaml
gasche has joined #ocaml
<gasche>
def`: my /tmp was just left without free space... 1.8GiB merlin log!
copy` has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
oriba has quit [Quit: WeeChat 1.7]
tennix has joined #ocaml
cbot has joined #ocaml
mfp has quit [Ping timeout: 260 seconds]
tennix has quit [Ping timeout: 252 seconds]
ryanartecona has joined #ocaml
<infinity0>
what's the preferred way to run stuff "finally" in lwt? i tried Lwt_main.at_exit but that seems to be run only on normal program exit and not say, ctrl-C
<infinity0>
oh, looks like they are run when a "normal" exception is thrown (ctrl-D, end of file) but not on a signal interrupt
portlandmushroom has joined #ocaml
fraggle_ has quit [Ping timeout: 252 seconds]
portlandmushroom has quit [Ping timeout: 260 seconds]
yomimono has joined #ocaml
yomimono has quit [Ping timeout: 268 seconds]
gasche has left #ocaml ["ERC (IRC client for Emacs 24.5.1)"]
cbot has quit [Quit: Leaving]
ryanartecona has quit [Quit: ryanartecona]
nomicflux has joined #ocaml
nomicflux has quit [Ping timeout: 240 seconds]
troydm has quit [Ping timeout: 260 seconds]
mengu has quit [Remote host closed the connection]
ryanartecona has joined #ocaml
portlandmushroom has joined #ocaml
jao has quit [Ping timeout: 252 seconds]
chamar_ has quit [Read error: Connection reset by peer]
groovy2shoes has joined #ocaml
infinity0 has quit [Ping timeout: 240 seconds]
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0_ has joined #ocaml
infinity0_ is now known as infinity0
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
portlandmushroom has quit [Ping timeout: 260 seconds]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
copy` has quit [Quit: Connection closed for inactivity]
ryanartecona has quit [Quit: ryanartecona]
govg has quit [Ping timeout: 260 seconds]
govg has joined #ocaml
fraggle_ has joined #ocaml
slash^ has joined #ocaml
freedrul1 is now known as mcfiredrill
McSoFake has joined #ocaml
McSoFake has quit [Remote host closed the connection]
McSoFake has joined #ocaml
orbifx has joined #ocaml
dhil has joined #ocaml
AlexDenisov has joined #ocaml
troydm has joined #ocaml
dhil has quit [Ping timeout: 252 seconds]
AlexDeni_ has joined #ocaml
AlexDenisov has quit [Ping timeout: 260 seconds]
leah2 has quit [Ping timeout: 252 seconds]
tautologico has quit [Quit: Connection closed for inactivity]
leah2 has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
fraggle_ has joined #ocaml
AlexDenisov has joined #ocaml
justicefries has left #ocaml [#ocaml]
AlexDeni_ has quit [Read error: Connection reset by peer]
leah2 has quit [Ping timeout: 252 seconds]
infinity0 has joined #ocaml
leah2 has joined #ocaml
richi235 has joined #ocaml
kakadu has joined #ocaml
argent_smith has joined #ocaml
mfp has joined #ocaml
dhil has joined #ocaml
fraggle_ has quit [Ping timeout: 252 seconds]
fraggle_ has joined #ocaml
MK__ has joined #ocaml
<MK__>
I would like to write a UDP client using Lwt sockets. Is there any good documentation on how to write it?
kakadu has quit [Remote host closed the connection]
jbrown has quit [Remote host closed the connection]
McSoFake has quit [Ping timeout: 260 seconds]
cml has joined #ocaml
cml has quit [Client Quit]
richi235 has quit [Ping timeout: 260 seconds]
richi235 has joined #ocaml
Fistine has quit [Ping timeout: 240 seconds]
jao has joined #ocaml
Fistine has joined #ocaml
<smondet[m]>
MK__: I don't know of any doc specific for that but: http://ocaml.github.io/ocamlunix/ should be pretty good for the ocaml/udp-server part and then you just have to use `Lwt_unix` instead of `Unix` (and "translate" the code from imperative to monadic).
<infinity0>
MK__: i just wrote one yesterday evening lol. but rather than me pasting code, you should try it yourself based on the Lwt_unix documentation and see how far you get, then come back with more specific questions
<infinity0>
the main part that i was stuck on for a while was figuring out the API meaning of {Lwt_unit,Unix}.recvfrom
<infinity0>
but basically you just want something like "recvfrom fd buf 0 65536 [] >>= etc" assuming buf has size 65536
MK__ has quit [Ping timeout: 240 seconds]
hongbo_ has joined #ocaml
<infinity0>
the API mirrors the traditional C socket APIs very closely so you can look at documentation for that too
<infinity0>
there's tons of those
orbifx has quit [Ping timeout: 240 seconds]
<mrvn>
Just remeber that the unix module works with an offset and length into your buffer instead of using all of it and the arguments should be clear
cross has quit [Ping timeout: 245 seconds]
slash^ has quit [Read error: Connection reset by peer]
_andre has joined #ocaml
dhil has quit [Ping timeout: 260 seconds]
AndChat-504 has joined #ocaml
AndChat-504 has quit [Read error: Connection reset by peer]
AndChat504 has joined #ocaml
AndChat|504 has joined #ocaml
kakadu has joined #ocaml
AndChat-504 has joined #ocaml
AndChat504 has quit [Ping timeout: 255 seconds]
slash^ has joined #ocaml
<AndChat-504>
+nt
AndChat|504 has quit [Ping timeout: 240 seconds]
AndChat504 has joined #ocaml
AndChat|504 has joined #ocaml
AndChat-504 has quit [Ping timeout: 240 seconds]
nomicflux has joined #ocaml
AndChat504 has quit [Ping timeout: 258 seconds]
nomicflux has quit [Client Quit]
ryanartecona has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
govg has quit [Ping timeout: 255 seconds]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
sh0t has joined #ocaml
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
dhil has joined #ocaml
MercurialAlchemi has joined #ocaml
rossberg has quit [Ping timeout: 252 seconds]
shinnya has joined #ocaml
hongbo_ has quit [Quit: Connection closed for inactivity]
ryanartecona has quit [Quit: ryanartecona]
ryanartecona has joined #ocaml
larhat has joined #ocaml
rossberg has joined #ocaml
govg has joined #ocaml
AndChat|504 has quit [Ping timeout: 258 seconds]
AndChat504 has joined #ocaml
MK__ has joined #ocaml
orbifx has joined #ocaml
spew has joined #ocaml
<orbifx>
MK__: from my experience, because OCaml lacks the big community of other languages, you have to rely on analogies. It's easier than I thought at first.
<orbifx>
also smondet[m] mentioned that best document I found on the matter
<mrvn>
if you need endian conversions or want to use Bigarrays for zero copy read/write and such check out extunix
AlexDenisov has joined #ocaml
al-damiri has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
ryanartecona has joined #ocaml
AlexDeni_ has joined #ocaml
AlexDenisov has quit [Ping timeout: 255 seconds]
shinnya has quit [Ping timeout: 240 seconds]
<orbifx>
Wouldn't it be cool if `open` could take a list of modules? open [X, Y, Z] ?
<mrvn>
List.iter open [X, Y, Z] ?
<orbifx>
hmm
ryanartecona has quit [Quit: ryanartecona]
<orbifx>
isn't `open` syntactic sugar?
<orbifx>
thus not actually a function?
<orbifx>
make
<orbifx>
oops
dsheets has joined #ocaml
AlexDeni_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<reynir>
Maybe you can do it with a ppx :v
copy` has joined #ocaml
<orbifx>
reynir: maybe :P
<orbifx>
is Irmin the best or only store purely written in OCaml; i.e. for apps that need to run in MirageOS?
<mrvn>
orbifx: it is
<orbifx>
thanks mrvn
lynn has joined #ocaml
govg has quit [Ping timeout: 260 seconds]
<lynn>
hi! I'm trying to define the empty type (as in Haskell's Void) in OCaml. I found a pdf containing this definition: type void = {none : 'a.'a;} ;; module Void : sig type t = void end ;;
<lynn>
I'm not sure how I should be reading it. I think the second half just puts the type in a module where Void.t is the void type. but what does 'a.'a mean?
<xmonader2>
Leonidas, yupp pretty fancy. problem is when i new repl in vscode i get the default ocaml toplevel instead of getting utop
cml has joined #ocaml
<Leonidas>
yeah, you have to configure it at the editor level. there is no setting for utop to replace the ocaml compiler toplevel as far as I know
<xmonader2>
Leonidas, u right! there's ocaml.repl.unix defaulted to ocaml i think changing it to utop will fix it
<xmonader2>
works!
<xmonader2>
thank you
<Leonidas>
glad I could help :)
govg has joined #ocaml
<MK__>
Error: The files /Users/.opam/system/lib/lwt/lwt_unix.cmi
<MK__>
over interface Lwt_unix
<MK__>
and src/ex_c.cmi make inconsistent assumptions
<MK__>
What could be the reason for this error?
<flux>
make clean or similar might fix it?
<flux>
likely the files have ben compiled with a different compiler
<MK__>
flux: thanks, worked.
Ulrar has joined #ocaml
rpg has joined #ocaml
rpg has quit [Client Quit]
rpg has joined #ocaml
<Ulrar>
Hi, I'm trying to raise Not_Found in a function but I get that : "The constructor Not_Found does not belong to type exn". I don't understand why, when I google it they seem to be able to just raise it wherever in the docs I'm reading
<companion_cube>
it's Not_found, not Not_Found
<reynir>
Does that error mean that there exists a Not_Found?
<companion_cube>
no
<companion_cube>
… I don't think
<reynir>
Interesting
<reynir>
Yea, I get the same error when I make up a non-existing exception
<reynir>
Slightly confusing
<companion_cube>
the confusing part is that it does not suggest the correct constructor
<reynir>
Well, to me the error makes it sound like Not_Found is a thing, but that it's not an exn when Not_Found doesn't exist at all.
shinnya has quit [Ping timeout: 260 seconds]
<Ulrar>
Ah, indeed, I didn't even realise the F
<Ulrar>
Thanks
AlexDenisov has joined #ocaml
bungoman_ has joined #ocaml
bungoman has quit [Ping timeout: 240 seconds]
AlexDeni_ has joined #ocaml
AlexDenisov has quit [Ping timeout: 255 seconds]
<mrvn>
MK__: The other cause for this is when you have multiple files called Lwt_unix.ml
zpe has joined #ocaml
<mrvn>
Ulrar: you could file an issue on mantis to clarify this. As companion_cube points out it even should suggest the correct spelling like it does at many other places.
ryanartecona has quit [Quit: ryanartecona]
nicoo has quit [Ping timeout: 260 seconds]
zpe has quit [Remote host closed the connection]
sz0 has quit [Quit: Connection closed for inactivity]
nicoo has joined #ocaml
theblatt1 is now known as theblatte
octachron has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
xmonader2 is now known as xmonader
mengu has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
orbifx has quit [Ping timeout: 260 seconds]
orbifx has joined #ocaml
chamar has joined #ocaml
cml has quit [Ping timeout: 260 seconds]
chamar has quit [Remote host closed the connection]
ryanartecona has joined #ocaml
hongbo_ has joined #ocaml
mengu has quit [Remote host closed the connection]
dhil has quit [Ping timeout: 252 seconds]
kakadu has joined #ocaml
govg has quit [Ping timeout: 260 seconds]
govg has joined #ocaml
kamog has joined #ocaml
richi235 has quit [Ping timeout: 258 seconds]
AlexDenisov has joined #ocaml
AlexDeni_ has quit [Read error: Connection reset by peer]
McSoFake has quit [Quit: No reason]
MercurialAlchemi has quit [Ping timeout: 258 seconds]
ryanartecona has quit [Quit: ryanartecona]
AlexDeni_ has joined #ocaml
mengu has joined #ocaml
AlexDenisov has quit [Read error: Connection reset by peer]
mengu has quit [Ping timeout: 260 seconds]
xmonader has quit [Ping timeout: 252 seconds]
orbifx has quit [Ping timeout: 260 seconds]
Simn has quit [Quit: Leaving]
richi235 has joined #ocaml
argent_smith has quit [Quit: Leaving.]
hongbo_ has quit [Quit: Connection closed for inactivity]
moei has quit [Quit: Leaving...]
orbifx has joined #ocaml
orbifx has quit [Ping timeout: 258 seconds]
spew has joined #ocaml
octachron has quit [Quit: Leaving]
|jbrown| has joined #ocaml
jbrown has joined #ocaml
larhat has quit [Quit: Leaving.]
kakadu has quit [Remote host closed the connection]