Leonidas changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.13.0 released: https://ocaml.org/releases/4.13.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
andreypopp_ has quit [Ping timeout: 252 seconds]
<d_bot> <infrandomness> I sure as hell can bench my 11th gen mobile cpu through Ubuntu
<d_bot> <infrandomness> If that's what you are after
rgrinberg has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
shmibs has joined #ocaml
xd1le has joined #ocaml
hexology is now known as hexology_
hexology_ is now known as hexology__
hexology__ is now known as hexology`
hexology` is now known as hexology_`
hexology_` is now known as hexology
shmibs has left #ocaml [WeeChat 3.3]
<d_bot> <cemerick> well, I guess we can compare notes, just ordered a new amd laptop (to replace a very rickety 8-year-old one)
namkeleser has joined #ocaml
<Boarders_> does ocaml have an equivalent of Haskell's at patterns?
<d_bot> <jumpnbrownweasel> (pattern as xxx)
<Boarders_> ok thanks
<d_bot> <jumpnbrownweasel> np
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
mbuf has joined #ocaml
terrorjack has joined #ocaml
grobe0ba has quit [Quit: ZNC 1.8.2 - https://znc.in]
grobe0ba has joined #ocaml
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)
mro has quit [Read error: Connection reset by peer]
mro_ has joined #ocaml
<d_bot> <infrandomness> I'm confused
<d_bot> <infrandomness> how does it benchmark dune, what does it executes ?
Haudegen has quit [Quit: Bin weg.]
<d_bot> <infrandomness> 🤔
<d_bot> <andreypopp> that's ocaml-system, it doesn't compile anything
<d_bot> <infrandomness> yeah I figured, couldn't have been this fast
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Anarchos has joined #ocaml
Leonidas_ is now known as Leonidas
Leonidas is now known as Guest5250
Guest5250 is now known as Leonidas
Leonidas has quit [Changing host]
Leonidas has joined #ocaml
<Anarchos> infradomness did you try a macke clean before ?
<d_bot> <infrandomness> no, but this is a brand new directory, just cloned it as you can see
waleee has quit [Ping timeout: 264 seconds]
<Anarchos> oh sorry i missed it
mro_ has quit [Remote host closed the connection]
waleee has joined #ocaml
Haudegen has joined #ocaml
waleee has quit [Ping timeout: 256 seconds]
xiongxin has joined #ocaml
waleee has joined #ocaml
gravicappa has quit [Ping timeout: 256 seconds]
gravicappa has joined #ocaml
waleee has quit [Ping timeout: 252 seconds]
waleee has joined #ocaml
<d_bot> <cemerick> looks like that patch (https://github.com/ocsigen/tyxml/pull/273) was never complete anyway, so don't feel too badly 🙂
xiongxin has quit [Remote host closed the connection]
waleee has quit [Ping timeout: 268 seconds]
waleee has joined #ocaml
<Anarchos> when i compile coq : Error (alert deprecated): module Stdlib.Stream
mro has joined #ocaml
sparogy has joined #ocaml
<octachron> 4.14 will deprecate the Stream module indeed.
<companion_cube> 💪
<Drup> \O/
<Anarchos> octachron it is pretty sure i am not a coq developer :)
Anarchos has quit [Quit: Vision[]: i've been blurred!]
bartholin has quit [Quit: Leaving]
sleepydog_ has joined #ocaml
sleepydog has quit [Ping timeout: 256 seconds]
ansiwen has joined #ocaml
dwt__ has joined #ocaml
ocabot has quit [Ping timeout: 256 seconds]
dwt_ has quit [Ping timeout: 256 seconds]
companion_cube has quit [Ping timeout: 256 seconds]
reynir has quit [Ping timeout: 256 seconds]
habnabit_ has quit [Ping timeout: 256 seconds]
tizoc has quit [Ping timeout: 256 seconds]
kandu has quit [Ping timeout: 256 seconds]
ansiwen_ has quit [Ping timeout: 256 seconds]
mal`` has quit [Ping timeout: 256 seconds]
ocabot has joined #ocaml
reynir has joined #ocaml
kandu has joined #ocaml
mal`` has joined #ocaml
dwt_ has joined #ocaml
ansiwen_ has joined #ocaml
sleepydog has joined #ocaml
ansiwen has quit [Read error: Connection reset by peer]
dwt__ has quit [Ping timeout: 256 seconds]
sleepydog_ has quit [Ping timeout: 256 seconds]
habnabit_ has joined #ocaml
tizoc has joined #ocaml
companion_cube has joined #ocaml
mro has quit [Remote host closed the connection]
Haudegen has quit [Quit: Bin weg.]
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
ns12 has quit [Quit: bye]
ns12 has joined #ocaml
Anarchos has joined #ocaml
Haudegen has joined #ocaml
mbuf has quit [Quit: Leaving]
waleee has quit [Quit: WeeChat 3.3]
zebrag has joined #ocaml
waleee has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
salkin has quit [Ping timeout: 256 seconds]
<d_bot> <zakkor> Is there any reason why there are only mutable record fields, but no mutable variables?
<d_bot> <let Butanium = raise Not_found;;> What about ref ?
<d_bot> <let Butanium = raise Not_found;;> ```ocaml
<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> I think you should do a small replicate of the ocaml ast, and most likely a printer with pprint instead of format. I have done this here : https://github.com/EmileTrotignon/embedded_ocaml_templates/tree/master/src/common/ocaml, but this is a little specialised for the needs of this project
<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…]
Tuplanolla has joined #ocaml
Absalom has quit [Quit: the lounge - https://webirc.envs.net]
waleee has quit [Ping timeout: 268 seconds]
waleee has joined #ocaml
rgrinberg has joined #ocaml