adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.09 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.09/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 276 seconds]
brettgilio_ has joined #ocaml
apaul1729 has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 268 seconds]
FreeBirdLjj has joined #ocaml
apaul1729 has quit [Remote host closed the connection]
barockobamo has quit [Remote host closed the connection]
rwmjones has quit [Ping timeout: 252 seconds]
rwmjones has joined #ocaml
brettgilio_ has quit [Quit: Quit]
brettgilio_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 265 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 250 seconds]
ycjung has left #ocaml ["WeeChat 2.6"]
ycjung has joined #ocaml
barockobamo has joined #ocaml
vicfred has joined #ocaml
Haudegen has joined #ocaml
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 240 seconds]
dborisog has joined #ocaml
FreeBirdLjj has joined #ocaml
sagax has joined #ocaml
mfp has quit [Ping timeout: 276 seconds]
barockobamo has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 250 seconds]
tormen_ has joined #ocaml
tormen has quit [Ping timeout: 250 seconds]
vicfred has quit [Quit: Leaving]
dborisog has quit [Ping timeout: 265 seconds]
narimiran has joined #ocaml
gravicappa has joined #ocaml
FreeBirdLjj has joined #ocaml
brettgilio has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
oxford has quit [Ping timeout: 260 seconds]
andreas303 has quit [Ping timeout: 260 seconds]
nicoo has quit [Ping timeout: 260 seconds]
mbuf has joined #ocaml
klntsky has quit [Ping timeout: 260 seconds]
vicfred has joined #ocaml
klntsky has joined #ocaml
nicoo has joined #ocaml
andreas303 has joined #ocaml
ycjung has quit [Quit: WeeChat 2.6]
mbuf has quit [Ping timeout: 245 seconds]
oxford has joined #ocaml
mbuf has joined #ocaml
jao has quit [Remote host closed the connection]
jao has joined #ocaml
jao has quit [Remote host closed the connection]
jao has joined #ocaml
jao has quit [Ping timeout: 250 seconds]
<sarna> hey, what's the convention for naming destructured list elements? I have a list called "instructions" and head::tail won't cut it
<sarna> I've been thinking current_instruction::other_instructions but looks kinda long
<sarna> this_instruction::rest_instructions?
<reynir> x::xs is common, but maybe instruction::instructions ?
mbuf has quit [Quit: Leaving]
<sarna> reynir: but the entire list is called instructions already :( would it be idiomatic to shadow the binding?
<xvilka> hi! Is there any ready library function to check if some command is in the path and executable?
<xvilka> like shell's `command -v cmd`
<reynir> sarna: I would say it is if you're not using the entire list anymore anyway
<xvilka> Sys.file_exists "cmd" works only for the full path
<reynir> xvilka: you could check for all dirs in $PATH if dir ^ "/" ^ cmd exists
<narimiran> sarna: i usually put a single quote to variable name, in your case: instructions'
<sarna> narimiran: so it'd be `let instruction::instructions = instructions' in`?
<xvilka> reynir: yeah, I could, just asked if there is anything ready
<narimiran> sarna: i do it other way around, the existing name is as it is, the new one gets '
<narimiran> `let x' = x / 10`
<reynir> xvilka: Sorry, I don't know of any such function :/
<sarna> narimiran: I see, thanks
Serpent7776 has joined #ocaml
ggole has joined #ocaml
ygrek__ has joined #ocaml
mbuf has joined #ocaml
<Leonidas> sarna: I often shadow identifiers that I don't use deliberately, much to the dismay of my coworkers.
<sarna> Leonidas: yeah, people have opinions about this
<sarna> I'm struggling to make a set of a list. what's a comparator? I tried using a function that'd return a bool, no dice
<sarna> a set from a list*, using core's Set.of_list
dborisog has joined #ocaml
<sarna> oh, there's a chapter in RWO about this
averell has quit [*.net *.split]
gremly has quit [*.net *.split]
Ankhers has quit [*.net *.split]
thegameg has quit [*.net *.split]
jarindyk2 has quit [*.net *.split]
ehirdoy has quit [*.net *.split]
diginet has quit [*.net *.split]
catern has quit [*.net *.split]
valtr has quit [*.net *.split]
nore has quit [*.net *.split]
Drup has quit [*.net *.split]
<Leonidas> I assume sets are functorized in Core, so you need one which matches the module you want to put in
<sarna> well I want to compare types I defined :(
averell has joined #ocaml
ehirdoy has joined #ocaml
nore has joined #ocaml
gremly has joined #ocaml
diginet has joined #ocaml
jarindyk2 has joined #ocaml
catern has joined #ocaml
thegameg has joined #ocaml
Ankhers has joined #ocaml
valtr has joined #ocaml
Drup has joined #ocaml
averell has quit [Max SendQ exceeded]
catern has quit [Max SendQ exceeded]
averell has joined #ocaml
catern has joined #ocaml
<def`> Leonidas: no, in Core they are defunctorized :)
<Leonidas> ah, cool
<def`> They use a functor to make a comparison witness (a comparison function associated to an abstract type to give it a static identity, so that you don't mix cion the same type but
<def`> ^W^W^W^W so that you don't mix containers with elements of compatible types but ordered differently.
<def`> Then you can use this comparison witness in different datastructures without having to resort to functors.
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
ycjung has joined #ocaml
mbuf has quit [Quit: Leaving]
_whitelogger has joined #ocaml
Ankhers has quit [*.net *.split]
gremly has quit [*.net *.split]
thegameg has quit [*.net *.split]
diginet has quit [*.net *.split]
jarindyk2 has quit [*.net *.split]
ehirdoy has quit [*.net *.split]
valtr has quit [*.net *.split]
nore has quit [*.net *.split]
Drup has quit [*.net *.split]
DanC has quit [*.net *.split]
haesbaert has quit [*.net *.split]
Ptival has quit [*.net *.split]
jacobian has quit [*.net *.split]
haskell_enthusia has quit [*.net *.split]
jerith has quit [*.net *.split]
srax has quit [*.net *.split]
sheijk has quit [*.net *.split]
Leonidas has quit [*.net *.split]
leah2 has quit [*.net *.split]
jmiven has quit [*.net *.split]
jave has quit [*.net *.split]
jun has quit [*.net *.split]
JSharp has quit [*.net *.split]
cbarrett has quit [*.net *.split]
clockish has quit [*.net *.split]
regnat[m] has quit [*.net *.split]
Virgile[m] has quit [*.net *.split]
aspiwack[m] has quit [*.net *.split]
heredoc has quit [*.net *.split]
nkaretnikov has quit [*.net *.split]
lynn has quit [*.net *.split]
seb_ has quit [*.net *.split]
mrallen1 has quit [*.net *.split]
stylewarning has quit [*.net *.split]
sspi__ has quit [*.net *.split]
chewbranca has quit [*.net *.split]
adi_________ has quit [*.net *.split]
ycjung has quit [*.net *.split]
ygrek__ has quit [*.net *.split]
Serpent7776 has quit [*.net *.split]
Haudegen has quit [*.net *.split]
kjak has quit [*.net *.split]
nopf has quit [*.net *.split]
porchetta has quit [*.net *.split]
stux|RC-only has quit [*.net *.split]
dckc has quit [*.net *.split]
keep_learning has quit [*.net *.split]
Geekingfrog has quit [*.net *.split]
ohama has quit [*.net *.split]
dx has quit [*.net *.split]
c4rc4s has quit [*.net *.split]
Ekho has quit [*.net *.split]
seliopou has quit [*.net *.split]
ocabot has quit [*.net *.split]
_whitelogger has joined #ocaml
aspiwack[m] has joined #ocaml
Haudegen has joined #ocaml
jkni has joined #ocaml
mgsk has joined #ocaml
stephe has joined #ocaml
c4rc4s has joined #ocaml
keep_learning has joined #ocaml
Geekingfrog has joined #ocaml
ohama has joined #ocaml
Virgile[m] has joined #ocaml
zv has joined #ocaml
jun has joined #ocaml
clockish has joined #ocaml
jmiven has joined #ocaml
porchetta has joined #ocaml
rntz2 has joined #ocaml
seliopou has joined #ocaml
DanielRichman has joined #ocaml
heredoc has joined #ocaml
Serpent7776 has joined #ocaml
ygrek__ has joined #ocaml
catern has joined #ocaml
madroach has joined #ocaml
kjak has joined #ocaml
oxford has joined #ocaml
ycjung has joined #ocaml
andreas303 has joined #ocaml
klntsky has joined #ocaml
vicfred has joined #ocaml
nicoo has joined #ocaml
gravicappa has joined #ocaml
narimiran has joined #ocaml
cthuluh has joined #ocaml
bartholin has joined #ocaml
adi_________ has joined #ocaml
rixed has joined #ocaml
hannes has joined #ocaml
jcob has joined #ocaml
vesper11 has joined #ocaml
kvik has joined #ocaml
rom1504 has joined #ocaml
seb_ has joined #ocaml
lynn has joined #ocaml
chewbranca has joined #ocaml
Haudegen[m] has joined #ocaml
regnat[m] has joined #ocaml
peddie has joined #ocaml
ocabot has joined #ocaml
ngws has joined #ocaml
greenbagels has joined #ocaml
freusque has joined #ocaml
dckc has joined #ocaml
dx has joined #ocaml
stux|RC-only has joined #ocaml
nopf has joined #ocaml
sspi__ has joined #ocaml
iAmerikan has joined #ocaml
pepesza has joined #ocaml
lyxia has joined #ocaml
dogui has joined #ocaml
tizoc has joined #ocaml
zmt01 has joined #ocaml
prsafont[m] has joined #ocaml
philtor has joined #ocaml
Xizor_ has joined #ocaml
eagleflo has joined #ocaml
xvilka has joined #ocaml
Khady has joined #ocaml
mononote has joined #ocaml
kalio has joined #ocaml
sepp2k has joined #ocaml
aecepoglu[m] has joined #ocaml
zwindl[m] has joined #ocaml
hdurer[m] has joined #ocaml
keep-learning[m] has joined #ocaml
otini has joined #ocaml
reynir has joined #ocaml
asm89 has joined #ocaml
kini has joined #ocaml
TC01 has joined #ocaml
stux|RC has joined #ocaml
wagle has joined #ocaml
crowley95 has joined #ocaml
theblatte has joined #ocaml
jimt has joined #ocaml
nullifidian has joined #ocaml
zekt83 has joined #ocaml
j9m has joined #ocaml
jbrown has joined #ocaml
_tjr_ has joined #ocaml
emias has joined #ocaml
rpcope- has joined #ocaml
octachron_ has joined #ocaml
delysin has joined #ocaml
tmhoang has joined #ocaml
bronsen has joined #ocaml
CcxWrk has joined #ocaml
zfnmxt has joined #ocaml
aubian has joined #ocaml
troydm has joined #ocaml
mal`` has joined #ocaml
parcs has joined #ocaml
andrewalker has joined #ocaml
ansiwen_ has joined #ocaml
clog has joined #ocaml
bytesighs has joined #ocaml
vodkaInferno has joined #ocaml
l1x has joined #ocaml
monad_cat has joined #ocaml
jerme_ has joined #ocaml
banjiewen has joined #ocaml
strmpnk has joined #ocaml
toppler has joined #ocaml
Adso_of_Jelq has joined #ocaml
gahr has joined #ocaml
cross has joined #ocaml
penguwin has joined #ocaml
adrien has joined #ocaml
Niamkik has joined #ocaml
def` has joined #ocaml
breitenj has joined #ocaml
dmbaturin has joined #ocaml
_habnabit has joined #ocaml
kandu has joined #ocaml
igitoor has joined #ocaml
jeroud has joined #ocaml
lobo has joined #ocaml
zozozo has joined #ocaml
psacrifice has joined #ocaml
Amaan has joined #ocaml
runciter has joined #ocaml
mehdib has joined #ocaml
tsani has joined #ocaml
engil has joined #ocaml
swistak35 has joined #ocaml
rks` has joined #ocaml
chindy has joined #ocaml
Exagone313 has joined #ocaml
p4bl0 has joined #ocaml
rgrinberg has joined #ocaml
landonf has joined #ocaml
Nikkel has joined #ocaml
Armael has joined #ocaml
Cypi has joined #ocaml
lopex has joined #ocaml
vbmithr has joined #ocaml
kit_ty_kate has joined #ocaml
andreypopp has joined #ocaml
iZsh has joined #ocaml
SrPx has joined #ocaml
angerman has joined #ocaml
sim642 has joined #ocaml
pippijn has joined #ocaml
mrallen1 has joined #ocaml
nkaretnikov has joined #ocaml
Ekho has joined #ocaml
flodin has joined #ocaml
jave has joined #ocaml
averell has joined #ocaml
leah2 has joined #ocaml
stylewarning has joined #ocaml
dborisog has joined #ocaml
JSharp has joined #ocaml
maker has joined #ocaml
rfv has joined #ocaml
jrslepak has joined #ocaml
bacam has joined #ocaml
theglass has joined #ocaml
jgkamat has joined #ocaml
stan[m] has joined #ocaml
rgr[m] has joined #ocaml
bitonic has joined #ocaml
jmct has joined #ocaml
mjvoge02 has joined #ocaml
interruptinuse has joined #ocaml
ec has joined #ocaml
cbarrett has quit [Changing host]
cbarrett has joined #ocaml
so has joined #ocaml
Ankhers has joined #ocaml
gremly has joined #ocaml
Drup has joined #ocaml
valtr has joined #ocaml
jarindyk2 has joined #ocaml
nore has joined #ocaml
ehirdoy has joined #ocaml
diginet has joined #ocaml
thegameg has joined #ocaml
jacobian has joined #ocaml
haskell_enthusia has joined #ocaml
Ptival has joined #ocaml
DanC has joined #ocaml
sheijk has joined #ocaml
jerith has joined #ocaml
srax has joined #ocaml
Leonidas has joined #ocaml
haesbaert has joined #ocaml
cgenie[m] has joined #ocaml
stylewarning has quit [Ping timeout: 244 seconds]
amosbird has joined #ocaml
companion_cube has joined #ocaml
vinoski has joined #ocaml
ziyourenxiang has joined #ocaml
johnelse has joined #ocaml
sarna has joined #ocaml
tg has joined #ocaml
ruffy__ has joined #ocaml
abc_ has joined #ocaml
jnavila has joined #ocaml
webshinra has joined #ocaml
unyu has joined #ocaml
simpson has joined #ocaml
dmiles has joined #ocaml
shenghi has joined #ocaml
robmyers has joined #ocaml
cemerick has joined #ocaml
cqc has joined #ocaml
RalfJ has joined #ocaml
Madars has joined #ocaml
slice has joined #ocaml
Fardale has joined #ocaml
gargawel has joined #ocaml
adrianbrink has joined #ocaml
runawayfive has joined #ocaml
tianon has joined #ocaml
vsiles has joined #ocaml
infinity0 has joined #ocaml
notnotdan has joined #ocaml
flux has joined #ocaml
thizanne has joined #ocaml
wildsebastian has joined #ocaml
rjungemann_ has joined #ocaml
jyc has joined #ocaml
j14159 has joined #ocaml
dinosaure has joined #ocaml
terrorjack__ has joined #ocaml
sarna has quit [Quit: bye]
amosbird has quit [Max SendQ exceeded]
kakadu_ has joined #ocaml
sarna has joined #ocaml
amosbird has joined #ocaml
stylewarning has joined #ocaml
ahf has joined #ocaml
ygrek__ has quit [Ping timeout: 268 seconds]
mfp has joined #ocaml
slice has quit [Ping timeout: 276 seconds]
slice has joined #ocaml
lyxia has quit [Ping timeout: 244 seconds]
slice has quit [Ping timeout: 265 seconds]
slice has joined #ocaml
jco has joined #ocaml
jnavila has quit [Ping timeout: 276 seconds]
zolk3ri has joined #ocaml
dhil has joined #ocaml
jnavila has joined #ocaml
mononote has left #ocaml ["Disconnected: Replaced by new connection"]
mononote has joined #ocaml
mononote has left #ocaml ["Disconnected: closed"]
mononote has joined #ocaml
mononote has left #ocaml ["Disconnected: closed"]
mononote has joined #ocaml
Anarchos has joined #ocaml
brettgilio has joined #ocaml
brettgilio_ has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 265 seconds]
mfp has quit [Ping timeout: 268 seconds]
zolk3ri has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
Anarchos has joined #ocaml
Anarchos has quit [Client Quit]
Anarchos has joined #ocaml
jao has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
Haudegen has quit [Quit: Bin weg.]
brettgilio has quit [Ping timeout: 250 seconds]
dhil has quit [Ping timeout: 265 seconds]
mfp has joined #ocaml
lyxia has joined #ocaml
jao has quit [Remote host closed the connection]
jao has joined #ocaml
mbuf has joined #ocaml
dhil has joined #ocaml
<Leonidas> I'm trying to build something using Applicative but I am very confused how it is supposed to be used in practice
<Leonidas> e.g. `<*>` is ('a ‑> 'b) t ‑> 'a t ‑> 'b t, and I am wondering why the applicative with the function would go as first argument
<companion_cube> because then you can `pure f <*> x <*> y <*> z`
<Leonidas> so it works kinda "backward" compared to >>= with monads?
<companion_cube> yeah, just so you can use currying nicely
<companion_cube> >>= is sequential if you use it in the "normal" way
<companion_cube> applicative is inherently parallel ;)
spew has joined #ocaml
mononote has left #ocaml ["Disconnected: closed"]
mononote has joined #ocaml
Haudegen has joined #ocaml
<Leonidas> yeah, so I am trying to wrap my head around it since I have a case where Monad is "too much" but so far staring at Applicative I can't figure it out "intuitively"
<companion_cube> ah, yeah
<companion_cube> wlel cmdliner is the perfect example
<Leonidas> in particular, I am trying to do something that's basically exactly as described here: https://blog.janestreet.com/what-the-interns-have-wrought-2019/ (the part about joining multiple commands, running them and mapping the results back to the calls)
<companion_cube> applicative makes the structure static
<Leonidas> (the vim paragraph)
<companion_cube> so you can explore the tree of commands statically, to display help, without running code (and without providing arguments to >>=)
<Leonidas> good point, I should maybe play around with cmdliner a bit more, since its API is also a bit mysterious to me.
<Leonidas> to see something like that "in action"
<companion_cube> well it's full applicative :D
<companion_cube> also: parser combinators
<companion_cube> (similar, if you stick to applicative, you can have a static parser, instead of allocating combinators at each char/token)
<Leonidas> just noticed that vcaml was released since the post was published so I can stare at it for a bit too \o/
<Leonidas> (2 days ago actually)
<companion_cube> what's vcaml ?
zolk3ri has quit [Remote host closed the connection]
<Leonidas> companion_cube: ocaml bindings to neovim
<companion_cube> hmmmmm
<octachron_> Leonidas, it may help (or not at all) to look at the translation between the (pure, ap) and (pure, map, prod) definitions of applicative
mfp has quit [Ping timeout: 276 seconds]
gravicappa has quit [Ping timeout: 240 seconds]
gravicappa has joined #ocaml
Serpent7776 has quit [Quit: Leaving]
smazga has joined #ocaml
mbuf has quit [Quit: Leaving]
dhil has quit [Ping timeout: 250 seconds]
ziyourenxiang has quit [Ping timeout: 276 seconds]
kandu has quit [Quit: Lost terminal]
dhil has joined #ocaml
kandu has joined #ocaml
oxford has quit [Remote host closed the connection]
oxford has joined #ocaml
dborisog has quit [Ping timeout: 265 seconds]
barockobamo has joined #ocaml
FreeBirdLjj has joined #ocaml
Anarchos has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 250 seconds]
barockobamo has quit [Remote host closed the connection]
jnavila has quit [Ping timeout: 246 seconds]
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
<kakadu_> Folks, when it is OK to remove `install` field from opam file? I heared that dune can generate .install files and opam will install using that information
<companion_cube> if you use dune, remove uninstall and install fields
<kakadu_> if not?
<companion_cube> I don't know
<companion_cube> just use dune? 🙃
<kakadu_> There is some camlp5 inside
<kakadu_> It ispainful with dune
<kakadu_> we kind of tried
<kakadu_> thanks anyway
<companion_cube> :/
<spew> I don't find applicative intuitively any different from monad
<Nikkel> In an eliom/ocsigen program, is there any way to get console print from library functions? It's my impression that I can only print with Ocsigen_messages
Serpent7776 has joined #ocaml
barockobamo has joined #ocaml
ggole has quit [Quit: Leaving]
mfp has joined #ocaml
dhil has quit [Ping timeout: 268 seconds]
Serpent7776 has quit [Read error: Connection reset by peer]
kleisli has joined #ocaml
Serpent7776 has joined #ocaml
Niamkik has quit [Quit: WeeChat 2.4]
unyu has quit [Quit: brb]
unyu has joined #ocaml
kakadu has joined #ocaml
Niamkik has joined #ocaml
narimiran has quit [Ping timeout: 265 seconds]
<Fardale> Nikkel: Firebug.console##log (Js.string "plop")
<Nikkel> Fardale: oh yeah, but I mean my opam lib doesn't know about Firebug
gravicappa has quit [Ping timeout: 268 seconds]
<Fardale> Oh sorry, then I don't know
jnavila has joined #ocaml
iovec has joined #ocaml
brettgilio_ has quit [Ping timeout: 250 seconds]
Jesin has quit [Quit: Leaving]
Jesin has joined #ocaml
jco has quit [Quit: WeeChat 2.6]
Serpent7776 has quit [Quit: leaving]
jao has quit [Remote host closed the connection]
jnavila has quit [Remote host closed the connection]
jao has joined #ocaml
kakadu has quit [Ping timeout: 268 seconds]
nicooo has joined #ocaml
nicoo has quit [Ping timeout: 260 seconds]
jao has quit [Remote host closed the connection]
ziyourenxiang has joined #ocaml
jao has joined #ocaml