<olle_>
Affe = "This language aims to prevent linearity violations, notably bugs such as use-after-free. Affe is an ML-like language similar to OCaml. In particular, Affe is functional with arbitrary side effects and complete type inference (i.e., users never need to write type annotations). "
<olle_>
(please don't kill me, drup)
<olle_>
(still want to post that on reddit)
<olle_>
(so cool...)
<Anarchos>
olle_ ocaml with linear logic typing system ?
kvda has joined #ocaml
<olle_>
Anarchos: yes, something like this
<olle_>
Anarchos: you can find presentation and paper online if you search for "kindly bent to free us ocaml"
HyperMonkey has quit [Ping timeout: 245 seconds]
<olle_>
How can linear types ensure that a file handler is closed?
<olle_>
at the end of the program
mfp has joined #ocaml
higherorder has joined #ocaml
<higherorder>
Hello! I started learning Ocaml this week-end and I have a question about polymorphic variants. In the spirit of row types, I am wondering if it's possible to write a function which eliminates a certain tag from a variant. e.g a function which would have a (fantasy) type signature like [`A | `B | rest] -> [`B | rest]
<higherorder>
The context in which I'd like to write such a function is when writing a partial interpreter over an AST, which would interpret some (but not all) nodes
<octachron>
Only if rest is a closed row type.
<flux1>
olle_: I think by removing the ability to just forget a binding, you must feed it to some function to remove it from scope
<olle_>
aha
<olle_>
hm
<olle_>
flux1: like a close_file function?
<olle_>
oh yes, the difference between "use exactly once" and "use at least once"
<flux1>
yes
<olle_>
or "at most"
<olle_>
11:59 < flux1> yes
<olle_>
hm
<flux1>
or a function that calls close_file, etc
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<olle_>
flux1: right
<flux1>
I guess the tricky part are like: what if you return a closure that closes the file ;).
<olle_>
yeah
<olle_>
phew
<olle_>
whatever function that uses that closure must reflect it in its type, i guess
<olle_>
or that outside that closure, there's no guarantee that the file is still open
<olle_>
so you give away ownership permanently
kvda has joined #ocaml
dborisog has joined #ocaml
pigeonv has joined #ocaml
Jesin has quit [Ping timeout: 246 seconds]
<higherorder>
octachron: how so?
<octachron>
For instance, "type t = [`B | `C ] let f = function `A -> `B | #t as x -> x" works as expected
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
Haudegen has quit [Ping timeout: 260 seconds]
tane has joined #ocaml
Jesin has joined #ocaml
raver has joined #ocaml
ferd has joined #ocaml
jao has joined #ocaml
waleee-cl has joined #ocaml
ferd has quit [Ping timeout: 265 seconds]
ferd has joined #ocaml
tautologico has joined #ocaml
sleepydog has joined #ocaml
Jesin has quit [Ping timeout: 272 seconds]
clement_ has joined #ocaml
<clement_>
Hi all. I'm porting an OCaml project that includes code generated using Coq to OCaml 4.09 (we originally targeted 4.07). Coq-generated code uses Pervasives everywhere, so I'm seeing plenty of deprecation alerts on 4.09. stdlib-shims doesn't help (I don't have control on what Coq generates) so I thought I'd silence the alerts while waiting for Coq to update. But what's the right way to disable the alerts? Adding (flags
<clement_>
(:standard -alert -deprecated)) to my dune file works with 4.09, but it breaks the build in 4.07, and I don't think dune has conditional flags support. How should I deal with this? Thanks!
<companion_cube>
maybe you could alias `module Pervasives = Stdlib` somewhere?
<Armael>
that’ll break pre-stdlib
<companion_cube>
not with stdlib-shims
Haudegen has joined #ocaml
<octachron>
clement_, you can disable the alert through the (deprecated) deprecation warning "-w -3" rather than the alert mechanism
<companion_cube>
(also, yessss)
<clement_>
companion_cube: I don't know a good way to prepend text to Coq's generated ML code, but maybe with a careful grep? Or maybe with a copiler option to open a module that contains a fake Pervasives…
<clement_>
octachron: Yes, perfect! That works nicely
<sleepydog>
is there a Coq issue open to move to Stdlib ?
<companion_cube>
yeah, `-open MyPrelude` or something
<clement_>
In a similar vein, how do I tell OPAM that I need coq-ltac2 only if coq is < 8.11? I currently have "coq" {>= "8.9"} and "coq-ltac2" {>= "0.3"}, but coq-ltac2 is incompatible with 8.11 because it comes bundled with it.
<companion_cube>
I guess one of these packages should declare the incompatibility
<clement_>
It does: coq-ltac2 says it's not compatible with coq >= 8.11
<clement_>
But as a result if I make it a dependency I can't target 8.11
<Armael>
maybe coq-ltac2 should default to a dummy package if it detects coq >= 8.11
<Armael>
or you have a different implementation of the opam package, one for <8.11 and one for >=8.11
<companion_cube>
^
<Armael>
I think it’s how it works for the shim packages
<Armael>
e.g. maybe look at the opam package for uchar
chripell has joined #ocaml
chripell_ has joined #ocaml
chripell has quit [Ping timeout: 264 seconds]
chripell__ has joined #ocaml
chripell_ has quit [Ping timeout: 264 seconds]
clockish has joined #ocaml
Jesin has joined #ocaml
pigeonv has joined #ocaml
narimiran has joined #ocaml
muskan has joined #ocaml
<clement_>
Armael: Thanks, I will look :)
nullifidian_ has joined #ocaml
<olle>
ocsigen mentiones comet but not websockets_
<olle>
_?
<olle>
comet should probably be considered deprecated
<olle>
who's maintinaing this?????
TC01 has joined #ocaml
nullifidian__ has joined #ocaml
nullifidian_ has quit [Ping timeout: 240 seconds]
sleepydog has quit [Ping timeout: 260 seconds]
<olle>
Reason it is... grrr
<waleee-cl>
olle: are you looking for strictly frontend-stuff?