liminal has quit [Remote host closed the connection]
Ekho has quit [Quit: CORE ERROR, SYSTEM HALTED.]
Ekho has joined #ocaml
hsw__ has quit [Quit: Leaving]
hsw has joined #ocaml
chrisz has quit [Ping timeout: 240 seconds]
chrisz has joined #ocaml
spip has quit [Ping timeout: 246 seconds]
gentauro has quit [Read error: Connection reset by peer]
gentauro has joined #ocaml
waleee has quit [Ping timeout: 240 seconds]
XliminalX has joined #ocaml
_whitelogger has joined #ocaml
bartholin has joined #ocaml
Serpent7776 has joined #ocaml
bartholin has quit [Quit: Leaving]
<discocaml>
<octachron> The `_.[_] <-_` operator on `string`s was deprecated in 4.02 at the time where (immutable) strings and (mutable) bytes were split in two distinct types. The operator never worked on `Bytes.t`.
Tuplanolla has joined #ocaml
spip has joined #ocaml
wingsorc has quit [Ping timeout: 246 seconds]
gareppa has joined #ocaml
waleee has joined #ocaml
<discocaml>
<xavierm02_> I am representing function `'a -> 'b` with `'a` and `'b` known at runtime as `type ('a, 'b) func = {source: 'a Type_equal.Id.t; target: 'b Type_equal.Id.t; func : 'a -> 'b}` (where `Type_equal.Id` allows testing equality between types at runtime, see https://ocaml.janestreet.com/ocaml-core/v0.12/doc/base/Base/Type_equal/index.html ). Composing two functions `g : ('b, 'c) func` and `f : ('a, 'b) func` is fairly awkward because nothing in the
<discocaml>
<xavierm02_> My current attempt at enforcing this invariant is to replace `Type_equal.Id.t` by an abstract type `'a typ` and to only allow building values of type `a typ` via a functor `F : functor (T : sig type t end) -> sig type t val t : t typ val of_concrete : T.t -> t val to_concrete : t -> T.t end` that takes a type `T.t` and returns a type `t`, a type representation `t : t typ`, and a bijection between `T.t` and `t`. Using this is a bit t
<discocaml>
<xavierm02_> Does that sound reasonable? Is there a simpler way to do this?
<discocaml>
<octachron> `Type_equal` doesn't really allow to test equality between types at runtime since types don't exist at runtime. It allow to recover some type equalities after erasure, but it is still answer a type-checking and thus a compilation-time concern.
<discocaml>
<octachron> Overall, I am not sure what you are trying to do, thus it is hard to judge if there is a simpler way to do ... something?
alexherbo2 has joined #ocaml
<discocaml>
<xavierm02_> I am trying to interleave calculi. Say `module type Calculus = sig type t val eval : t -> t`. Then I define two calculi functors, e.g. `module MakeArith (Other : Calculus) = struct type t = Int of int | IfZThenElse of t * t * t | CoerceToArith of Other.t | ... end` and `module MakeStr (Other : Calculus) = struct type t = Str of string | Print of t | CoerceToStr of Other.t | ... end`, and combine them `module rec Arith = MakeArith (Str) and
alexherbo2 has quit [Remote host closed the connection]
<discocaml>
<xavierm02_> I'll write this in a pastebin, it'll be easier to read
<olle>
In terms of functional core/imperative shell, what if you have _two_ shells? E.g. one "normal" web access and another REST API access? The imperative shell would then be duplicated?
<olle>
To some extent
<olle>
Or you have outer shell, inner shell :) Onions.
<discocaml>
<octachron> @xavierm02_ , I would recommend to move the extensibility to the skeleton of definitions with an extensible sum type tracking the identity of each module: https://gist.github.com/Octachron/389ac0d2982479904bfd2cd47a9bde14 . But if you want to keep the recursive module definition, you probably only need to add a `unwrap` pass in the every evaluator that recognize its own `Coerced`. In particular, the `coerced` constructor should probably not
alexherbo2 has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
<discocaml>
<xavierm02_> Thanks!
alexherbo2 has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
<discocaml>
<xavierm02_> Having the type `'a c` might indeed make some things easier. I have to think a bit more about this because I want to allow for more fine-grained descriptions of the calculi, e.g. `CbvRecord = MakeCbvRecord(CbvTerm) and CbvTerm = Sum4(Arith(CbvTerm), Str(CbvTerm), CbvRecord, Box(CbnTerm)) and CbnTerm = Sum(Freeze(CbvTerm), Fun(CbvTerm, CbnTerm)) and ...`, and I'm not yet sure how I want to handle the sums
<discocaml>
<xavierm02_> I had `val match_coerced : ('a, 'b) match_coerced_branches -> 'a -> 'b` in the `Calculus` interface, with `type ('a, 'b) match_coerced_branches = { case_coerced : 'c. 'c -> ('c, 'a) Coercion.t -> 'b; case_not_coerced : 'a -> 'b}` which kind of worked for sums, but maybe I can indeed move the core-or-not distinction outside of the module, making these redundant
kronicma1 has quit [Ping timeout: 258 seconds]
kronicma1 has joined #ocaml
daftaupe has quit [Ping timeout: 260 seconds]
daftaupe has joined #ocaml
mechap has joined #ocaml
Serpent7776 has quit [Ping timeout: 245 seconds]
Serpent7776 has joined #ocaml
olle has quit [Remote host closed the connection]
dhil has joined #ocaml
mechap has quit [Ping timeout: 246 seconds]
mechap has joined #ocaml
mechap has quit [Ping timeout: 246 seconds]
Serpent7776 has quit [Ping timeout: 246 seconds]
mechap has joined #ocaml
neuroevolutus has joined #ocaml
Serpent7776 has joined #ocaml
Serpent7776 has quit [Ping timeout: 260 seconds]
Serpent7776 has joined #ocaml
spip has quit [Quit: Konversation terminated!]
neuroevolutus has quit [Quit: Client closed]
mechap has quit [Ping timeout: 246 seconds]
bartholin has joined #ocaml
Guest14 has joined #ocaml
<Guest14>
I'm having a problem with opam
<Guest14>
I have a package that I couldn't get set to a particular version. I have this package locally pinned and it kept installing a non-master version. I looked in $(opam var lib)/my-pkg and found that the META and source and compiled files there were old
<Guest14>
So I deleted that folder. Now ocamlfind doesn't find my package anymroe
<companion_cube>
you sure you ran eval `opam env`?
<Guest14>
How can I completely purge the package and install the version I want?
<Guest14>
Yes, I have done that
<Guest14>
I'm not unfamiliar with opam, I just have never encountered this type of behavior
<companion_cube>
if it's pinned, does `opam reinstall foo` do anything?
<Guest14>
It repeatedly installed the old version
<Guest14>
I can remove the package the pin and then re-pin and install. But then ocamlfind still cannot find the thing
<Guest14>
I swear I'm going to have to blow away an entire docker container that has all this progress because of some opam bs
<companion_cube>
does `which ocamlfind` return the one in the opam sw ?
olle has joined #ocaml
<Guest14>
Yes
<Guest14>
Alright, I started a new container. Copied in my package. Pin add it. Install it. Now ocamlfind query my-pkg does not find it
<Guest14>
Even in the new container
<companion_cube>
I haev no idea :s
<octachron>
Did you check that: 1. the opam env is correctly set up 2. the `opam pin` command installed the right META file?
<Guest14>
I figured out what it was.
xd1le has quit [Quit: xd1le]
motherfsck has quit [Ping timeout: 240 seconds]
<companion_cube>
please tell!
XliminalX has quit [Remote host closed the connection]
XliminalX has joined #ocaml
<Guest14>
So, the install steps in my opam file didn't include anything. It is a dune build and install, so I did a make in which case dune installed originally at that version. Then the opam file never rebuilt it.
<Guest14>
So, of course ocamlfind couldn't find it