companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.14.0 released: https://ocaml.org/releases/4.14.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dnh has joined #ocaml
dnh has quit [Ping timeout: 244 seconds]
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
bobo_ has quit [Ping timeout: 244 seconds]
bobo_ has joined #ocaml
azimut has quit [Ping timeout: 268 seconds]
spip has joined #ocaml
bobo_ has quit [Ping timeout: 240 seconds]
rgrinberg has quit [Ping timeout: 268 seconds]
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sarahzrf has joined #ocaml
<sarahzrf> hello
<sarahzrf> i never used opam all that much and it's been a while since i've touched it. i'm setting it up now for the first time on a new system; i seem to recall that i need to do something special now if i dont want to tie myself to the system ocaml install
<sarahzrf> is that right? and if so what do i want to do?
<companion_cube> probably create a switch
<companion_cube> `opam sw create 4.14.0` for example
zebrag has joined #ocaml
<sarahzrf> i havent opam init yet
<companion_cube> ah well, can't avoid that one
xgqt has quit [Remote host closed the connection]
xgqt has joined #ocaml
rgrinberg has joined #ocaml
chrisz has quit [Ping timeout: 272 seconds]
<sarahzrf> ah, it was init -c
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
<sarahzrf> i believe the issue i was thinking of was where i upgraded my system ocaml package a while back and it bumped a version and completely broke opam for me
<sarahzrf> i would prefer to avoid that
chrisz has joined #ocaml
terrorjack has joined #ocaml
<companion_cube> yeah, once opam is initialized, just make a switch
dh` has joined #ocaml
sarahzrf has quit [Quit: WeeChat 3.6]
zebrag has quit [Ping timeout: 268 seconds]
zebrag has joined #ocaml
zebrag has quit [Client Quit]
williewillus has joined #ocaml
trev has joined #ocaml
mbuf has joined #ocaml
gopiandcode has quit [Remote host closed the connection]
gopiandcode has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
adanwan has quit [Quit: _]
adanwan has joined #ocaml
gopiandcode has quit [Read error: Connection reset by peer]
adanwan has quit [Remote host closed the connection]
adanwan has joined #ocaml
gopiandcode has joined #ocaml
xd1le has joined #ocaml
Serpent7776 has joined #ocaml
Haudegen has joined #ocaml
<sim642> companion_cube, I ask myself that question every time a new OCaml version is released because a project I maintain uses batteries for historical reasons
<d_bot> <darrenldl> which project is this?
williewillus has quit [Quit: Leaving]
Tuplanolla has joined #ocaml
<d_bot> <darrenldl> ah first published in 2015
<sim642> Not sure where it says that but the codebase is definitely older than that
<d_bot> <darrenldl> oh sorry just meant the first git tag
<d_bot> <darrenldl> but ye makes sense
<Leonidas> does anyone know how to check a CPPO variable for truthiness?
<Leonidas> I'm trying `#if WORD_SIZE_64` but it exits with a syntax error
<Leonidas> cppo -D 'WORD_SIZE_64 true' my_file.ml
<Leonidas> Tries with `WORD_SIZE_64 = true` or `WORD_SIZE_64 = "true"` were just as unsuccessful
olle has joined #ocaml
neitsch[m] has quit [Quit: You have been kicked for being idle]
<sim642> I don't know why, but maybe #ifdef WORD_SIZE_64 would make more sense?
<sim642> Or #if WORD_SIZE = 64
adanwan_ has joined #ocaml
adanwan has quit [Ping timeout: 268 seconds]
jpds2 has quit [Ping timeout: 268 seconds]
<Leonidas> I can't do ifdef because it will always be defined
jpds2 has joined #ocaml
<Leonidas> Given the incantation is from dune: "-D WORD_SIZE_64 %{arch_sixtyfour}"
<Leonidas> It seems I am at the perfect intersection of features CPPO doesn't support and features dune doesn't support.
Sankalp has quit [Ping timeout: 260 seconds]
Sankalp- has joined #ocaml
<sim642> but maybe "-D WORD_SIZE %{ocaml-config:word_size}"
Sankalp- is now known as Sankalp
olle has left #ocaml [#ocaml]
<sim642> Maybe there's some catch to how dune's boolean variable gets substituted into a string?
bartholin has joined #ocaml
orbifx has joined #ocaml
Sankalp has quit [Ping timeout: 272 seconds]
mro_ has joined #ocaml
mro_ has quit [Remote host closed the connection]
mro_ has joined #ocaml
mro_ has quit [Remote host closed the connection]
Serpent7776 has quit [Ping timeout: 268 seconds]
Serpent7776 has joined #ocaml
<sim642> Anyone know how much overhead there is to using Format (for its ability of both to-file and to-string output abilities) to only output basics (no boxes, breaks, etc)?
<octachron> Some: there will be some cost for the formatting engine bookkeeping, and the cost of the interpreter for the format strings.
<orbifx> sim642: you could also use Printf. to print to a string?
<orbifx> If I understand your concerns correctly
<octachron> I am not sure that there will be difference if you were to use v or h boxes in fact.
<sim642> orbifx, but I might also want to print directly to a file without constructing the entire string in memory
<octachron> (hv,b, and hov boxes need to suspend printing while resolving break hints, but this is not the case for h and v).
<sim642> On a fresh formatter there isn't any sort of box open, is there?
<sim642> The docs have this sentence: "The behavior of pretty-printing commands is unspecified if there is no open pretty-printing box."
<sim642> Not very clear what exactly "pretty-printing commands" are though
<octachron> Break hints essentially. And no there is essentially a hov (or b?) box opened by default.
<Leonidas> sim642: I was told a hacky but working solution: make the true/false part if the variable and then #ifdef WORD_SIZE_64_true :D
jpds2 has quit [Write error: Connection reset by peer]
<sim642> octachron, right, I can see that in the implementation, yes
<Leonidas> It is not "nice" but I feel the actually "nice" solution would be fixing CPPO and I don't want to go there.
<sim642> But what's the "unspecified" about then if there always is a box. It just means that there being a default box is an implementation detail that shouldn't be relied on?
jpds2 has joined #ocaml
<orbifx> sim642: the Printf module function can print to string or to a file descriptor directly, which ever you want. If you want to avoid the formatting overhead
<orbifx> functions*
mro has joined #ocaml
<octachron> sim642, yes the behavior is unspecified (and there is also a strange bug with the default box on the last break hint that I have yet to track down)
mro has quit [Ping timeout: 244 seconds]
orbifx has quit [Remote host closed the connection]
orbifx has joined #ocaml
<sim642> orbifx, but it's not generic over the output
jpds2 has quit [Ping timeout: 268 seconds]
jpds2 has joined #ocaml
mbuf has quit [Ping timeout: 268 seconds]
spip has quit [Ping timeout: 240 seconds]
spip has joined #ocaml
jpds2 is now known as jpds
mbuf has joined #ocaml
dnh has joined #ocaml
azimut has joined #ocaml
<greenbagels> strings vs char lists... Does the use case for each basically boil down to "will you be trying to grab individual characters often, vs working with words or entire strings"?
<companion_cube> char list is very, very rarely useful
<companion_cube> (even in Haskell who made that bad choice decades ago :p)
mro has joined #ocaml
mro has quit [Remote host closed the connection]
<octachron> char lists are very inefficient in memory: the cons cell requires 2 * 64 = 128 bits for storing one 8-bits char.
<greenbagels> Wait is String.[n] constant time?
<orbifx> sim642: generic over the output?
<octachron> greenbagels, yes.
<greenbagels> Ok that makes a lot more sense now
bartholin has quit [Quit: Leaving]
<companion_cube> it returns a byte, not a unicode char, of course
gwizon has joined #ocaml
mro has joined #ocaml
mro has quit [Remote host closed the connection]
orbifx has quit [Ping timeout: 252 seconds]
mro has joined #ocaml
Serpent7776 has quit [Ping timeout: 255 seconds]
Serpent7776 has joined #ocaml
Anarchos has joined #ocaml
xd1le has quit [Quit: xd1le]
orbifx has joined #ocaml
omegatron has quit [Quit: Power is a curious thing. It can be contained, hidden, locked away,and yet it always breaks free.]
Serpent7776 has quit [Quit: WeeChat 1.9.1]
gwizon has quit [Ping timeout: 244 seconds]
orbifx has quit [Remote host closed the connection]
gwizon has joined #ocaml
adanwan_ has quit [Remote host closed the connection]
adanwan has joined #ocaml
trev has quit [Remote host closed the connection]
williewillus has joined #ocaml
gwizon has quit [Ping timeout: 268 seconds]
mbuf has quit [Quit: Leaving]
adanwan has quit [Ping timeout: 268 seconds]
adanwan has joined #ocaml
rgrinberg has joined #ocaml
adanwan has quit [Remote host closed the connection]
adanwan has joined #ocaml
gwizon has joined #ocaml
rgrinberg has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
mro has quit [Quit: Leaving...]
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
adanwan has quit [Remote host closed the connection]
adanwan has joined #ocaml
omegatron has joined #ocaml
dnh has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
QDX45_ has joined #ocaml
QDX45_ has quit [Ping timeout: 268 seconds]
adanwan has quit [Ping timeout: 268 seconds]
adanwan has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gwizon has quit [Quit: Lost terminal]
adanwan has quit [Remote host closed the connection]
motherfsck has quit [Ping timeout: 244 seconds]
motherfsck has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
motherfsck has quit [Ping timeout: 268 seconds]
motherfsck has joined #ocaml
waleee has joined #ocaml
<d_bot> <mbacarella> so in some languages value names that begin with __ are for internal use
<d_bot> <mbacarella> in ocaml you can't name modules starting with __
<d_bot> <mbacarella> is there a different convention for this in ocaml?
<d_bot> <mbacarella> (I'm translating things from python world)
<d_bot> <mbacarella> to get it to compile I'm turning `__foo` into `I__foo`
<d_bot> <mbacarella> maybe `__foo` -> `Zz__foo` is better simply so it goes at the bottom of any lists that may be presented to humans?
adanwan has joined #ocaml
rgrinberg has joined #ocaml
dnh has quit [Quit: Textual IRC Client: www.textualapp.com]
adanwan has quit [Ping timeout: 268 seconds]
adanwan has joined #ocaml
Haudegen has quit [Ping timeout: 268 seconds]
wingsorc has joined #ocaml
adanwan has quit [Remote host closed the connection]
adanwan has joined #ocaml