webshinra has quit [Remote host closed the connection]
JimmyRcom has joined #ocaml
aydio has quit [Quit: WeeChat 2.2]
JimmyRcom has quit [Ping timeout: 264 seconds]
JimmyRcom has joined #ocaml
env__ has joined #ocaml
silver_ has quit [Read error: Connection reset by peer]
struktured has joined #ocaml
_whitelogger has joined #ocaml
struktured has quit [Ping timeout: 268 seconds]
JimmyRcom has quit [Ping timeout: 245 seconds]
mfp has quit [Ping timeout: 252 seconds]
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 245 seconds]
struktured has joined #ocaml
JimmyRcom has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
env__ has quit [Ping timeout: 246 seconds]
env__ has joined #ocaml
jao has quit [Ping timeout: 246 seconds]
env__ has quit [Ping timeout: 240 seconds]
env__ has joined #ocaml
pepesza has quit [Ping timeout: 245 seconds]
pepesza has joined #ocaml
env__ has quit [Ping timeout: 272 seconds]
env__ has joined #ocaml
rdivyanshu has joined #ocaml
pierpal has quit [Ping timeout: 252 seconds]
_andre has quit [Quit: Lost terminal]
JimmyRcom has quit [Ping timeout: 245 seconds]
JimmyRcom has joined #ocaml
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
Haudegen has joined #ocaml
pierpal has joined #ocaml
Haudegen has quit [Remote host closed the connection]
env__ has quit [Ping timeout: 240 seconds]
env__ has joined #ocaml
env__ has quit [Ping timeout: 268 seconds]
env__ has joined #ocaml
env__ has quit [Ping timeout: 252 seconds]
sagotch has joined #ocaml
rdivyanshu has quit [Remote host closed the connection]
rdivyanshu has joined #ocaml
emily has quit [Ping timeout: 252 seconds]
orbifx1 has joined #ocaml
rdivyanshu has quit [Ping timeout: 252 seconds]
rdivyanshu has joined #ocaml
sagax_ has joined #ocaml
orbifx1 has quit [Ping timeout: 252 seconds]
rdivyanshu has quit [Ping timeout: 252 seconds]
rdivyanshu has joined #ocaml
env__ has joined #ocaml
env__ has quit [Ping timeout: 246 seconds]
struktured has quit [Ping timeout: 252 seconds]
env__ has joined #ocaml
env__ has quit [Ping timeout: 246 seconds]
MadcapJake has quit [Ping timeout: 272 seconds]
MadcapJake has joined #ocaml
env__ has joined #ocaml
env__ has quit [Ping timeout: 252 seconds]
rdivyanshu has quit []
env__ has joined #ocaml
env__ has quit [Ping timeout: 245 seconds]
JimmyRcom has quit [Ping timeout: 252 seconds]
env__ has joined #ocaml
env__ has quit [Ping timeout: 252 seconds]
nullifidian has quit [Ping timeout: 244 seconds]
env__ has joined #ocaml
env__ has quit [Ping timeout: 246 seconds]
webshinra has joined #ocaml
env__ has joined #ocaml
env__ has quit [Ping timeout: 252 seconds]
env__ has joined #ocaml
env__ has quit [Ping timeout: 250 seconds]
env__ has joined #ocaml
env__ has quit [Ping timeout: 245 seconds]
nullifidian has joined #ocaml
env__ has joined #ocaml
env__ has quit [Ping timeout: 252 seconds]
env__ has joined #ocaml
carlosdagos has quit [Quit: Connection closed for inactivity]
env__ has quit [Ping timeout: 246 seconds]
env__ has joined #ocaml
env__ has quit [Ping timeout: 272 seconds]
lambda_ has joined #ocaml
ruffy has joined #ocaml
ruffy is now known as Guest50130
Guest50130 has quit [Client Quit]
ruffy_ has joined #ocaml
env__ has joined #ocaml
env__ has quit [Ping timeout: 252 seconds]
env__ has joined #ocaml
mfp has joined #ocaml
env__ has quit [Ping timeout: 240 seconds]
env__ has joined #ocaml
env__ has quit [Ping timeout: 246 seconds]
ggole has joined #ocaml
env__ has joined #ocaml
pierpal has quit [Ping timeout: 240 seconds]
env__ has quit [Ping timeout: 245 seconds]
env__ has joined #ocaml
marble_visions has quit [Quit: bye]
env__ has quit [Ping timeout: 240 seconds]
marble_visions has joined #ocaml
notnotdan has joined #ocaml
<notnotdan>
Hi
<zozozo>
hello
ygrek has joined #ocaml
rwmjones|EDI has quit [Ping timeout: 250 seconds]
eagleflo_ is now known as eagleflo
env__ has joined #ocaml
ygrek has quit [Ping timeout: 264 seconds]
env__ has quit [Ping timeout: 246 seconds]
jbrown has quit [Ping timeout: 252 seconds]
env__ has joined #ocaml
env__ has quit [Ping timeout: 245 seconds]
env__ has joined #ocaml
env__ has quit [Ping timeout: 245 seconds]
env__ has joined #ocaml
env__ has quit [Ping timeout: 252 seconds]
silver has joined #ocaml
env__ has joined #ocaml
ShalokShalom has joined #ocaml
env__ has quit [Ping timeout: 244 seconds]
jbrown has joined #ocaml
env__ has joined #ocaml
jbrown has quit [Ping timeout: 264 seconds]
freyr69 has joined #ocaml
env__ has quit [Ping timeout: 240 seconds]
<notnotdan>
So I have a question about concurrency libraries for OCaml. I am translating some code from async to Lwt.
remix2000 has joined #ocaml
<notnotdan>
Am I correct in understanding that async includes networking capabilities by default, but for Lwt you have to use an external library, such as conduit?
<notnotdan>
I am just wondereing if I am doing something wrong here
env__ has joined #ocaml
<engil>
notnotdan: you need to use Lwt_unix
<engil>
no need for conduit
env__ has quit [Ping timeout: 245 seconds]
env__ has joined #ocaml
<notnotdan>
OK, I will take a look at that module
env__ has quit [Ping timeout: 268 seconds]
<notnotdan>
engil: so, for resolution I need to use Lwt_unix.gethostbyname and then construct ADDR_INET out of it and then use Lwt_io functions like Lwt_io.with_connection?
env__ has joined #ocaml
pierpal has joined #ocaml
Guest99354 has joined #ocaml
env__ has quit [Ping timeout: 252 seconds]
jao has joined #ocaml
env__ has joined #ocaml
JimmyRcom has quit [Ping timeout: 252 seconds]
env__ has quit [Ping timeout: 252 seconds]
spew has joined #ocaml
env__ has joined #ocaml
env__ has quit [Ping timeout: 272 seconds]
struktured has joined #ocaml
env__ has joined #ocaml
env__ has quit [Ping timeout: 268 seconds]
maufred has quit [Quit: WeeChat 2.2]
maufred has joined #ocaml
env__ has joined #ocaml
averell has quit [Quit: .]
ygrek has joined #ocaml
env__ has quit [Ping timeout: 250 seconds]
rwmjones has joined #ocaml
averell has joined #ocaml
env__ has joined #ocaml
slamzy has joined #ocaml
env__ has quit [Ping timeout: 246 seconds]
struktured has quit [Quit: Konversation terminated!]
env__ has joined #ocaml
MadcapJake has quit [Quit: MadcapJake]
MadcapJake has joined #ocaml
env__ has quit [Ping timeout: 246 seconds]
MadcapJake has quit [Client Quit]
MadcapJake has joined #ocaml
env__ has joined #ocaml
env__ has quit [Ping timeout: 268 seconds]
slamzy has quit [Remote host closed the connection]
env__ has joined #ocaml
pierpal has quit [Ping timeout: 252 seconds]
env__ has quit [Ping timeout: 268 seconds]
_andre has joined #ocaml
env__ has joined #ocaml
env__ has quit [Ping timeout: 246 seconds]
freyr69 has quit [Remote host closed the connection]
xorpse_ is now known as xorpse
B78lhky7 has joined #ocaml
env__ has joined #ocaml
B78lhky7 has left #ocaml [#ocaml]
pvaibhav has joined #ocaml
pvaibhav has left #ocaml [#ocaml]
pvaibhav has joined #ocaml
<pvaibhav>
hi all, what is the recommended way to compare / test equality of user-defined variant types, after opening Base or Containers (which hide the polymorphic = operator)? I couldn’t find clear simple answer by searching on google.
env__ has quit [Ping timeout: 240 seconds]
emily has joined #ocaml
<pvaibhav>
e.g.: type planet = Sun | Moon | Earth; writing Sun = Sun or Sun = Moon doesn’t work
<companion_cube>
writing a custom equality function
<companion_cube>
short term: Pervasives.(=)
<companion_cube>
long term: writing planet_equal by yourself or using ppx_deriving
<pvaibhav>
companion_cube: thanks. writing a custom equality for variants with 20-30 constructors (e.g. constellation names) is cumbersome. So ppx_deriving is considered good practice in ocaml community?
<pvaibhav>
asking because at some point I also want to target e.g. javascript, so wondering what is the best/most portable way
<thizanne>
ppx deriving will simply generate that custom equality for you
<thizanne>
it will work well with javascript generation
<companion_cube>
ppx deriving is not really related to whatever you target , it comes much earlier in the compilation toolchain :)
<pvaibhav>
i see. that sounds good
env__ has joined #ocaml
env__ has quit [Ping timeout: 245 seconds]
env__ has joined #ocaml
<ggole>
chaotic neutral option: Pervasives.(==)
<ggole>
(Don't do that, it only works for this case by accident.)
sagax_ has quit [Quit: Konversation terminated!]
env__ has quit [Ping timeout: 245 seconds]
env__ has joined #ocaml
al-damiri has joined #ocaml
env__ has quit [Ping timeout: 246 seconds]
<lyxia>
I would argue that's actually evil.
pierpal has joined #ocaml
frefity has joined #ocaml
<pvaibhav>
thanks everyone, I installed ppx_deriving, added to my .merlin and even code completion for the auto-generated function works perfectly in VScode 😁
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
env__ has joined #ocaml
env__ has quit [Ping timeout: 240 seconds]
aydio has joined #ocaml
aydio has quit [Quit: WeeChat 2.2]
aydio has joined #ocaml
err0ne has quit [Disconnected by services]
err0ne has joined #ocaml
sagotch has quit [Quit: Leaving.]
aydio has quit [Quit: WeeChat 2.2]
pierpal has quit [Ping timeout: 240 seconds]
pierpal has joined #ocaml
aydio has joined #ocaml
erkin has joined #ocaml
bartholin has joined #ocaml
<Leonidas>
pvaibhav: isn't your .merlin file generated by dune?
<pvaibhav>
no I’m not using any build system (yet)… just utop (+ocamlbuild)
<Leonidas>
well, that is also a build system
<Leonidas>
ocamlbuild, not utop
<pvaibhav>
yes :) but I only ever run ocamlbuild so that merlin will find my other source files
<pvaibhav>
I’m only experimenting with some math algorithms .. project has only 2 files
ygrek has quit [Remote host closed the connection]
fraxamo has joined #ocaml
<pvaibhav>
Leonidas: thanks for the tip, using Dune was no more work than writing .merlin myself.
pierpal has quit [Read error: Connection reset by peer]
<Leonidas>
pvaibhav: also has the advantage that the merlin file now stays up to date with what your compiler is going to use
Guest99354 has quit [Remote host closed the connection]
Haudegen has joined #ocaml
<pvaibhav>
yes. only problem is it’s now hardcoding all the paths into the .merlin file, so I can’t check it into the repo and have to rely on dune to regenerate it on a fresh clone
<Leonidas>
yeah, never check in .merlin files. There is also no purpose to checking them in
<Leonidas>
I think there was some discussion of avoiding merlin files for configuration altogether, so merlin would get the information from some other place but I don't know where that effort went
<pvaibhav>
i think autogenerating is totally fine. In the C++ world the build tool generates a “compile_commands.json” file with similar info
env__ has joined #ocaml
pvaibhav has left #ocaml [#ocaml]
pvaibhav has joined #ocaml
apostolis has joined #ocaml
<apostolis>
hello, is there a way to turn a string into format4? Scanf.from_string produces format6.
<ggole>
format4 is just a specialisation of format6