rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andreypopp has joined #ocaml
rgrinberg has joined #ocaml
Haudegen has joined #ocaml
gravicappa has joined #ocaml
waleee has quit [Quit: WeeChat 3.3]
ejones has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mro has joined #ocaml
b0o has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
olle has joined #ocaml
salkin has joined #ocaml
<d_bot>
<leonidas> @kit_ty_kate What is the current OPAM procedure for dealing with the rresult.0.7.0 breakage? asn1-combinators.0.2.5 is picked but breaks on 4.07 because it is missing `result`.
<d_bot>
<leonidas> I can submit a PR but don't want to create a fragile patch to fix their build in OPAM
<d_bot>
<Kate> @leonidas you can send a PR to asn1-combinators.0.2.5 and add an upper-bound constraint to rresult (`"rresult" {< "0.7.0"}`)
favonia has quit [Ping timeout: 252 seconds]
<d_bot>
<leonidas> @kit_ty_kate Ok done. Turns out the murderer was `ptime` instead but same issue.
waleee has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
<d_bot>
<Kate> merged. Thanks!
waleee has quit [Ping timeout: 252 seconds]
waleee has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
<d_bot>
<infrandomness> Sure thing
<d_bot>
<infrandomness> But how to accurately benchmark
<d_bot>
<leonidas> Thank you @kit_ty_kate!
chrisz has quit [Ping timeout: 265 seconds]
chrisz has joined #ocaml
waleee has quit [Ping timeout: 264 seconds]
Anarchos has joined #ocaml
mro has quit [Read error: Connection reset by peer]
mro_ has joined #ocaml
bartholin has joined #ocaml
mro_ has quit [Remote host closed the connection]
namkeleser has quit [Quit: Client closed]
average has quit [Quit: Connection closed for inactivity]
waleee has joined #ocaml
mro has joined #ocaml
mro has quit [Remote host closed the connection]
<d_bot>
<cemerick> Just a `time dune build` on the biggest project out there. Core maybe, or something mirage, or coq I guess?
mro has joined #ocaml
<d_bot>
<andreypopp> opam switch create . 4.12.1 238.43s user 20.91s system 451% cpu 57.404 total
<d_bot>
<andreypopp> on 3970 threadripper
xd1le has quit [Quit: xd1le]
<d_bot>
<andreypopp> opam switch create . 4.12.1 233.65s user 36.11s system 324% cpu 1:23.20 total
<d_bot>
<andreypopp> on mba m1 (lower power mode off but on a battery)
<d_bot>
<let Butanium = raise Not_found;;> let a = ref 0 in a := 2; !1```
glassofethanol has joined #ocaml
glassofethanol has quit [Client Quit]
<d_bot>
<NULL> They are a wrap around a mutable field in a record, but they do it so well I don't know what true mutable variables would bring unless you want not to distinguish mutable and immutable variables in their types (but I don't think this is a good idea)
Anarchos has quit [Quit: Vision[]: i've been blurred!]
olle has quit [Ping timeout: 264 seconds]
<d_bot>
<zakkor> Well yeah, not sure, that's why I'm asking, it just seemed a bit weird that mutable variables are represented using a wrapper around a mutable record field 😃
<companion_cube>
I'm not sure how closures woudl interact with mutable variables, for example
<companion_cube>
it complicates some things
<zozozo>
the problem would be duplication of these mutable variables: when you pass such a mutbale variable to a function, what exactly do you give the function ? you can't copy the value of the register where it would reside...
<Corbin>
Yeah, when it comes to formal specification, it turns out that *some* sort of box is required around mutable bound values.
<zozozo>
note that in the case where the mutable value does not escape the local scope of a function (i.e. it isn't given as argument to other function, nor captured in a closure), then the ocaml compiler will optimise a ref into a mutable variable, so that it's not allocated
<d_bot>
<zakkor> That makes sense and is exactly the sort of thing I expected, thanks guys! The optimisation is great to hear as well and is something I was wondering haha
waleee has quit [Ping timeout: 268 seconds]
waleee has joined #ocaml
<zozozo>
one (current) unfortunate downside of that is that it's sometimes the case that it's better (ofr performances) to write a big function body with a ref and for_loops, compared to a solution with recursive functions calls
<zozozo>
which is a bit sad for a functional language
<zozozo>
fortunately, flambda2 is trying to change that, ^^
<companion_cube>
but OCaml isn't just a functional language :)
<companion_cube>
why would it be bad to use some imperative stuff?
<zozozo>
i never said it's bad
<zozozo>
but the fact that imperative code is often times better optimized makes me sad
<zozozo>
especially considering that there are actually good ways to optimize the functional things in those cases
<companion_cube>
I'd rather OCaml help me write the imperative coe
<companion_cube>
code*
<zozozo>
well, the two aren't mutually exclusive
average has joined #ocaml
<companion_cube>
and yet, imperative code would be a lower hanging fruit I believe :/
<zozozo>
well, it's more of a frontend/syntax kind of thing
<companion_cube>
sure, and ways of doing things that don't require exceptions
<zozozo>
exceptions are nice
<companion_cube>
exceptions suck compared to continue/break, sorry
<companion_cube>
it's nice to have them for the general case
<companion_cube>
but they're really suboptimal for the common case
<companion_cube>
and how do we know there's no allocation going on?
<zozozo>
well.. it's indeed hard to know whether they have been optimised out
Anarchos has joined #ocaml
rgrinberg has joined #ocaml
gravicappa has quit [Ping timeout: 264 seconds]
<Anarchos>
opam says dynlink (version: [distributed with Ocaml])
<Anarchos>
but when i do 'dune build' i get ' No implementations provided for the following modules: Dynlink referenced from src/ocp_indent_dynlink.cmxa(IndentLoader)"
<rgrinberg>
is dynlink listed in the dune file?
<Anarchos>
yse
<Anarchos>
yes
<Anarchos>
rgrinberg it is ocp-indent
<rgrinberg>
is it listed in the ocp_indent_dynlink library though?
<Anarchos>
yes too
<Anarchos>
rgrinberg I think it is misisng in my opam switch but i don't know where to look for
<rgrinberg>
ocamlfind list should include dynlink
<rgrinberg>
if it's indeed present
<Anarchos>
it says dynlink (version: [distributed with Ocaml])
<octachron>
Anarchos, if it is manually build compiler, have you checked that you have a dynlink library available?
<Anarchos>
it was missing in .opam/5.00+trunk/ocaml. i am rebuilding and copying it by hand
Guest17 has joined #ocaml
<Guest17>
hello! I have a weird task
<Guest17>
I want to compile a lang I'm working on to OCaml because the semantics are very similar
<Guest17>
and I'm not really interested in implementing it correctly
<Guest17>
any advice/opinions?
<Guest17>
for starters I would really like not to work with the standard library
<d_bot>
<Emile Trotignon> This does use the stdlib, but you could switch it to Core easily I guess
<d_bot>
<Emile Trotignon> pprint really is a very nice library
Guest17 has quit [Quit: Client closed]
<Corbin>
Aw, they left.
<Corbin>
I very much wish I could target something lower-level than OCaml ASTs. I almost wish malfunction were official, although I think that that's a monkey's-paw wish.
Anarchos has quit [Quit: Vision[]: i've been blurred!]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]