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
dhil has quit [Ping timeout: 264 seconds]
amiloradovsky has quit [Ping timeout: 260 seconds]
ollehar has quit [Ping timeout: 256 seconds]
ollehar has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
<companion_cube> ah, writing a functional version
<companion_cube> tough
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
nullifidian has quit [Ping timeout: 246 seconds]
brettgilio has joined #ocaml
nullifidian has joined #ocaml
mangoicedtea has quit [Quit: Leaving]
mirrorbird has quit [Remote host closed the connection]
mirrorbird has joined #ocaml
Haudegen has joined #ocaml
osa1 has joined #ocaml
mfp has quit [Ping timeout: 256 seconds]
ggole has joined #ocaml
vicfred has quit [Quit: Leaving]
narimiran has joined #ocaml
Guest86335 has quit [Ping timeout: 265 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
Guest86335 has joined #ocaml
ksft has quit [Ping timeout: 256 seconds]
ksft has joined #ocaml
osa1 has quit [Ping timeout: 240 seconds]
<d_bot> <Piotr> I think Jean-Christophe Filliatre has a _persistent_ version on his webpage
mirrorbird has left #ocaml ["Leaving"]
mbuf has joined #ocaml
<Armael> there's https://github.com/vocal-project/vocal/blob/master/vocal/src/UnionFind.mli (that's the usual UF though, so with an imperative API)
borne has joined #ocaml
osa1 has joined #ocaml
rwmjones|holiday is now known as rwmjones
dckc has quit [Ping timeout: 256 seconds]
oriba has joined #ocaml
dckc has joined #ocaml
olle has joined #ocaml
<olle> hi ho
mbuf has quit [Quit: Leaving]
<olle> sticking to the purity topic
<olle> if a function returns a record, and always the same record, is it pure? even if rec1 == rec2 is not true? for physical identity.
<d_bot> <darrenldl> wouldn't purity of a function be defined by its behaviour rather than where and how the runtime decides to store the returned result?
<olle> I don't know!
<d_bot> <darrenldl> i mean i can also make an non-pure function that returns exactly same record, and even also rec1 == rec2
<olle> Wikipedia has this condition: "Its return value is the same for the same arguments"
<olle> But how to compare the return value?
<olle> d_bot: true
<olle> heh
<olle> talking to a bot
<d_bot> <darrenldl> you missed the second condition: "Its evaluation has no side effects (no mutation of local static variables, non-local variables, mutable reference arguments or I/O streams)."
<olle> yes
<olle> so, no new memory allocation?
<d_bot> <darrenldl> "same" in the sense of `=` usually suffices in discussion (data equality is enough)
<olle> yeah
<d_bot> <darrenldl> > so, no new memory allocation?
<d_bot> <darrenldl> @olle#0000 well no - anything you do would lead to memory allocation strictly speaking, so if we consider memory allocation as part of the side effect to be taken into account, then nothing we do would be pure
<olle> I'm having this discussion with regard to Psalm analyzer to PHP: https://github.com/vimeo/psalm/issues/4077
<olle> darren, yes
<d_bot> <darrenldl> if the returned values are non-pure functions, then i'm not fully certain how to go about defining equality of the values
<d_bot> <darrenldl> well i think i'd argue that if we include the environment as a context, and encode the side effecting procedures as pure functions with a context parameter, then you can still define equality (so we argue based on the extracted state transition graphs essentially)
<d_bot> <darrenldl> okay, re your snippet specifically: i think the more conservative choice is preferred here, as otherwise you'll need to conclude exactly if an arbitrary procedure could possibly return two different procedures (which implies solving the halting problem)
<d_bot> <darrenldl> ~~okay, re your snippet specifically: i think the more conservative choice is preferred here, as otherwise you'll need to conclude exactly if an arbitrary procedure could possibly return two different procedures (which implies solving the halting problem)~~ wait hang on, i might be reading this way wrong (edited)
<zozozo> here you have to distinguish the definition of purity (which in HO languages need to define an equality predicate on functions, which intuitively would be extensional equality), from its decidability
<def> and even when one does not care about decidability, there are dozen of ways to define equality, depending on the properties you care about.
dborisog has joined #ocaml
<d_bot> <Christophe> @BigOof (I don't think that people on IRC side can see when you edit your message)
<zozozo> well actually, on irc it reposts the new version of the message
<zozozo> which is a bit noisy unfortunately
sarna has joined #ocaml
<d_bot> <darrenldl> > @darrenldl (I don't think that people on IRC side can see when you edit your message)
<d_bot> <darrenldl> @Christophe oop, thanks for letting me know
<d_bot> <darrenldl> @ irc peeps: sorries
<d_bot> <Christophe> ah, noisy indeed, though at least you can see the updated information
osa1 has quit [Quit: osa1]
osa1 has joined #ocaml
dhil has joined #ocaml
<d_bot> <mseri> Finally, the [OCaml 2020 Workshop](https://www.youtube.com/watch?v=E8T_4zqWmq8&list=PLKO_ZowsIOu5fHjRj0ua7_QWE_L789K_f) is live, please join us in the zoom meeting via clowdr or feel free to ask questions here. We will try to forward it to the presenters and record their answers, which are later will be posted as Q&A.
<d_bot> <mseri>
<d_bot> <mseri> Please, adhere [to the schedule](https://icfp20.sigplan.org/home/ocaml-2020#program), no rogue watching πŸ™‚
<d_bot> <mseri> Finally, the [OCaml 2020 Workshop](https://www.youtube.com/channel/UCjrxSvgZDrku8s7eeZ-L9Tg) is live, please join us in the zoom meeting via clowdr or feel free to ask questions here. We will try to forward it to the presenters and record their answers, which are later will be posted as Q&A.
<d_bot> <mseri>
<d_bot> <mseri> Please, adhere [to the schedule](https://icfp20.sigplan.org/home/ocaml-2020#program), no rogue watching πŸ™‚ (edited)
pigeonv has joined #ocaml
<d_bot> <mseri> Finally, the [OCaml 2020 Workshop](https://www.youtube.com/watch?v=E8T_4zqWmq8&list=PLKO_ZowsIOu5fHjRj0ua7_QWE_L789K_f) is live, please join us in the zoom meeting via clowdr or feel free to ask questions here. We will try to forward it to the presenters and record their answers, which are later will be posted as Q&A.
<d_bot> <mseri>
<d_bot> <mseri> Please, adhere [to the schedule](https://icfp20.sigplan.org/home/ocaml-2020#program), no rogue watching πŸ™‚ (edited)
<olle> (edited)
<olle> (edited)
<olle> gah
<d_bot> <mseri> I was wrong with the link
<d_bot> <mseri> and I am posting via discord, sorry πŸ˜„
<reynir> discord people, every time you edit your messages we get a new message over here
<olle> zozozo: extension equality of closures?
<olle> extensional*
* olle no editing needed ^^
<d_bot> <mseri> now I know, sorry for the noise
<reynir> Can it be put in /topic on discord regarding edits?
<d_bot> <Et7f3> ?
<alehander92> in #nim i think
<alehander92> we receive only context of the edit, not the whole edited message
<alehander92> which might be a good solution
<alehander92> e.g. stuff like `<Rika> (edit) 'non-var,' => 'non-var data,'` it works well imho
<olle> booo
<olle> should be vim syntax, s/non-var/non-var data
nullcone has quit [Quit: Connection closed for inactivity]
osa1 has quit [Quit: osa1]
osa1 has joined #ocaml
pigeonv has quit [Quit: WeeChat 2.3]
<d_bot> <Et7f3> /g after ?
osa1 has quit [Ping timeout: 256 seconds]
<d_bot> <mseri> would'n that edit the whole history?
<olle> no, `%` is used to apply to all rowsw
<olle> rows*
<olle> /g is for "all occurencies", implied "on the line"
<olle> I think
<alehander92> haha maybe
reynir has quit [Ping timeout: 256 seconds]
reynir has joined #ocaml
mfp has joined #ocaml
mbuf has joined #ocaml
osa1 has joined #ocaml
dborisog has quit [Ping timeout: 258 seconds]
<zozozo> olle: basically two functions f and g of type a -> b are equal iff for all x:a f x = g x (hence, b can be a function type, which would unfold the same definition)
<zozozo> of course, as def poitned out, you still need a definition of equality for the "base" (or rather non-functional) types, and there may be many choices
<zozozo> *pointed
<zozozo> (e.g. for maps you likely do not want the structural equality but the more intuitive notion of equality that is defined by the equal function in that module)
<olle> yeah
<olle> pretty complex in the end
<zozozo> well, equality is complicated
<olle> yeah
<olle> Another definition that disregards equality: "
<olle> A pure function is one whose output is completely deterministic given its input, and which has no side effects.
<Armael> nah, "deterministic" relies on a notion of equality
<olle> ah shit, you're right
<d_bot> <Christophe> I got convinced to try ocaml-lsp πŸ˜„ (not yet vscode, but almost)
osa1 has quit [Quit: osa1]
dhil has quit [Ping timeout: 258 seconds]
dhil has joined #ocaml
<olle> I wonder how Haskell reasons about purity :d
<olle> hm
<olle> well, if everything is pure, then no problem, I guess (unless there's the IO monad implied)
<d_bot> <Et7f3> I would say for equality: function that return record can be seen as group of function that return each one field/data and if they are pure their product is also. so physical equality is strange when we talk about purity</2cts>
<olle> hm
<olle> "It should be noted that an equality operator like (===) above breaks referential transparency, so adding it to Haskell would ruin many of the nice properties that Haskell has and would make many program transformations invalid. "
Serpent7776 has quit [Read error: Connection reset by peer]
Serpent7776 has joined #ocaml
Anarchos has joined #ocaml
malc_ has joined #ocaml
<d_bot> <mseri> Lots of material for learning to use multicore linked here: https://github.com/ocaml-multicore/ocaml2020-workshop-parallel
malc_ has left #ocaml [#ocaml]
<olle> with or without typed effects?
<d_bot> <mseri> without
<d_bot> <mseri> these will come later afaik
<d_bot> <mseri> those will come later afaik (edited)
aaaaaa has joined #ocaml
<olle> to hunt you!
<olle> and haunt
<olle> and taunt?
<d_bot> <Christophe> they say in the talk that parallelism with domains is coming first, and concurrency with fibers and effects will come later
<olle> k
<sadiq> happy to answer any questions people have on the talk here as well
<sadiq> (if I can)
<defolos> Is there a way how to find out what a conflict is that causes opam to fail to install certain packages?
<defolos> I'm trying to install gopcaml-mode, but opam simply says that there's a conflict
<defolos> adding --verbose and --debug doesn't yield any more information on that matter unfortunately
malc_ has joined #ocaml
spew has joined #ocaml
FreeBirdLjj has joined #ocaml
malc_ has quit [Remote host closed the connection]
malc_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
sarna has quit [Quit: Connection closed]
waleee-cl has joined #ocaml
dckc has quit [Ping timeout: 260 seconds]
dckc has joined #ocaml
<d_bot> <mseri> Current talk is about ImpFS. There is an extra ImpFS demo as video2 in http://www.tom-ridge.com/filesystems.html
laokz has joined #ocaml
osa1 has joined #ocaml
<laokz> TryOCaml hang at 'Preparing the environment' on Debian testing Firefox 68.11.0esr. what shall i check?
kanishka has joined #ocaml
<kanishka> Has anybody done a comparison of reasonml syntax versus scalajs syntax, to see which ones non-FP people find easier to adjust to?
malc_ has left #ocaml ["ERC (IRC client for Emacs 28.0.50)"]
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
kanishka has quit [Quit: Quit]
kanishka has joined #ocaml
kanishka has quit [Client Quit]
osa1 has quit [Ping timeout: 246 seconds]
laokz has quit [Quit: Leaving]
narimiran has quit [Ping timeout: 246 seconds]
borne has quit [Ping timeout: 260 seconds]
Tuplanolla has joined #ocaml
borne has joined #ocaml
<olle> sounds subjective
Haudegen has quit [Quit: Bin weg.]
jnavila has joined #ocaml
Hail_Spacecake has quit [Remote host closed the connection]
Hail_Spacecake has joined #ocaml
olle has quit [Ping timeout: 258 seconds]
borne has quit [Ping timeout: 240 seconds]
Serpent7776 has quit [Read error: Connection reset by peer]
Serpent7776 has joined #ocaml
vicfred has joined #ocaml
mbuf has quit [Quit: Leaving]
<d_bot> <Bluddy> reasonml now has 2 syntaxes: rescript and reason. so it's a more complicated comparison
<zozozo> (note for irc/weechat users here: I have found a nice script to correctly translate the discord bot messages so that they appear as if coming from regular users, if anyone is interested)
<d_bot> <octachron> It is more than ReScript has 3 syntaxes, and one of them is a (fixed ?) version of the reasonml syntax.
<companion_cube> zozozo: oh, cool
<companion_cube> like a simple regex I guess?
<zozozo> companion_cube: yeah
<zozozo> though I had to make a few changes to the python script (because I didn't want or need the "network" part of the script)
<companion_cube> I should probably learn how to script weechat :s
<zozozo> well, it's easier when you have an already working script and just have to modify it a bit
<zozozo> although to my regret it meant I had to write a few lines of python, :p
<companion_cube> well there's a rust API πŸ˜‚
<zozozo> haha, I removed a line and a few characters on some other line, doesn't really justify that much work
<companion_cube> well please share it ;)
<zozozo> will try (the simpler solution would probably be cloning the github repo I guess)
<companion_cube> I mena if you made a patch, why not share the patch? :p
<d_bot> <Bluddy> do you guys want to post the finished script to a gist or something?
<companion_cube> that'd be swell
<d_bot> <Bluddy> I can pin it here, and even if IRC can't see it, we can copy paste if anyone needs it
<d_bot> <Bluddy> I'll also link it on ocamlverse
muskan has joined #ocaml
<zozozo> companion_cube: well, my "patch" simply removes code for one functionality of the script (used when there is a bot or bots that bridge multiple other apps, such as discord and slack, in order to add the source in the rewrittent message, but in my case, it was just annoying since it was required)
<companion_cube> oh ok
<zozozo> so it can't really be submitted upstream in that case
<companion_cube> no, but you can make a gist
<zozozo> yeah
<zozozo> I'm currently doing that
<d_bot> <Bluddy> πŸ‘
Bluddy has joined #ocaml
nullcone has joined #ocaml
muskan has quit [Remote host closed the connection]
<zozozo> hopefully they should work, ^^ (comment welcome, ofc)
<companion_cube> a gist would have sufficed :D
<zozozo> well, you'd need the updated script + the installation/use instructiosn, which are a bit obscure and not trivial to find
<zozozo> also easier if I need to make some updates one day
<companion_cube> fair enough
<zozozo> (e.g. If I made a mistake while editing the pyton code, which is not completely impossible, XD)
<d_bot> <Bluddy> ok posted it to ocamlverse as well https://ocamlverse.github.io/content/community.html
<d_bot> <Et7f3> @zozozo: gist are git repo so they can be updated automatically but for 2 files it also to present correctly(like readme+code)
<companion_cube> hmmm
<companion_cube> how do you test/debug that?!
<d_bot> <companion_cube> test
<companion_cube> ahh it works, nice.
<zozozo> @Et7f3 : interesting to known, ^^
<zozozo> companion_cube: yeah, the testing part is a bit complicated, I've been waiting for discord messages and fixing the errors all afternnon (with long pauses when there were no messages, :p )
<companion_cube> :s
<d_bot> <Et7f3> hey ping work through the bridge \:)
<zozozo> @Et7f3: yeah, but irc users have to 1) type the whole nick by hand since auto-completion does not work, and 2) remember to add an '@' because else discord does not highlight the msg
<d_bot> <Et7f3> ha you need space
<zozozo> XD
<zozozo> I think irc users will not remember all the rule to amke succesful pings of discord users
<zozozo> +s
<companion_cube> ah, it doesn't tab complete :/
<companion_cube> oh well
<companion_cube> at least it's more readable
aaaaaa has quit [Quit: leaving]
tane has joined #ocaml
Serpent7776 has quit [Read error: Connection reset by peer]
Serpent7776 has joined #ocaml
webshinra has joined #ocaml
tane has quit [Quit: Leaving]
Simerax has joined #ocaml
tane has joined #ocaml
gypsydave5 has joined #ocaml
tane has quit [Client Quit]
tane has joined #ocaml
<gypsydave5> I'm having some trouble installing ppx_string over opam - can anyone help me?
<gypsydave5> The log looks like https://controlc.com/44a0bd76
narimiran has joined #ocaml
<gypsydave5> It looks like it expects Stdio to be bound but it's not, so the compilation fails
<companion_cube> maybe you need base/stdio in your deps?
<gypsydave5> I have stdio and base installed; if I manually edit the dune file and the ml file to include Stdio it works
<rgrinberg> I've reported this bug to the janestreet folks.
<gypsydave5> thanks rgrinberg - where did you do that?
<rgrinberg> slack
<d_bot> <Anurag> In the meantime you can do `opam pin add ppx_string --dev` to use the development version where stdio related code has been removed.
<gypsydave5> d_bot: that's worked nicely; thank you
oriba has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
inkbottle has joined #ocaml
zebrag has quit [Ping timeout: 265 seconds]
reynir has quit [Ping timeout: 240 seconds]
reynir has joined #ocaml
Bluddy has quit [Quit: Connection closed for inactivity]
<Fardale> companion_cube: the tabcompletion is done on the list of user, the script do simply rewriting and don't really fake user
<companion_cube> yeah it's ok
<companion_cube> it's just a hack
dhil has quit [Ping timeout: 265 seconds]
<d_bot> <Poulpe> test
<companion_cube> test yourself :p
<d_bot> <Bluddy> might be possible to add all observed names to the list of users for tab completion in a hook
gypsydave5 has quit [Ping timeout: 246 seconds]
<Fardale> does not work for me
<zozozo> yeah, I might try and that to the script if I have the courage at one point (or if someone else is motivated, PRs are cools ...)
sagax has quit [Remote host closed the connection]
ggole has quit [Quit: Leaving]
artymort has joined #ocaml
gypsydave5 has joined #ocaml
narimiran has quit [Ping timeout: 240 seconds]
gypsydave5 has quit [Ping timeout: 240 seconds]
jnavila has quit [Quit: Konversation terminated!]
kanishka has joined #ocaml
kanishka has quit [Client Quit]
Simerax has quit [Quit: https://quassel-irc.org - Komfortabler Chat. Überall.]
vicfred has quit [Quit: Leaving]
tane has quit [Quit: Leaving]
amiloradovsky has joined #ocaml
sagax has joined #ocaml
Guest86335 has quit [Ping timeout: 244 seconds]
Guest86335 has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
mangoicedtea has joined #ocaml
jmorris has joined #ocaml