companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.0 released(!!1!): https://ocaml.org/releases/5.0.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
Tuplanolla has quit [Quit: Leaving.]
hackinghorn has joined #ocaml
waleee has quit [Ping timeout: 246 seconds]
bobo_ has joined #ocaml
spip has quit [Ping timeout: 246 seconds]
chrisz has quit [Ping timeout: 255 seconds]
chrisz has joined #ocaml
trillion_exabyte has quit [Ping timeout: 268 seconds]
trillion_exabyte has joined #ocaml
rf has quit [Quit: Leaving]
Everything has quit [Quit: leaving]
goober_ has quit [Quit: Leaving]
sagax has quit [Excess Flood]
azimut has quit [Ping timeout: 255 seconds]
mbuf has joined #ocaml
whereiseveryone has joined #ocaml
zbroyar_ has joined #ocaml
zbroyar has quit [Ping timeout: 255 seconds]
masterbuilder has quit [Quit: leaving]
trev has joined #ocaml
bgs has joined #ocaml
mbuf has quit [Remote host closed the connection]
mbuf has joined #ocaml
bgs has quit [Remote host closed the connection]
mbuf has quit [Quit: Leaving]
bartholin has joined #ocaml
sparogy has quit [Read error: Connection reset by peer]
sparogy has joined #ocaml
noonien has quit [Ping timeout: 255 seconds]
zbroyar_ has quit [Remote host closed the connection]
<discocaml_> <val patate: unit Lazy.t> is there another special syntax for sum types constructor, like `[]`?:
<discocaml_> <val patate: unit Lazy.t> ```ocaml
<discocaml_> <val patate: unit Lazy.t> type t = [] | A | ...
<discocaml_> <val patate: unit Lazy.t> ```
olle has joined #ocaml
<discocaml_> <NULL> What do you mean "special syntax" ? Constructors which aren't just capitalised idents ?
<discocaml_> <val patate: unit Lazy.t> Yes, exactly
<discocaml_> <NULL> There's also `()` and `(::)`
<discocaml_> <val patate: unit Lazy.t> For some reason, thought `()` couldn't be used outside `unit` 🫤
bartholin has quit [Quit: Leaving]
<discocaml_> <NULL> Actually, `()` is missing from https://v2.ocaml.org/manual/typedecl.html#constr-decl
hackinghorn has quit [Ping timeout: 246 seconds]
<discocaml_> <octachron> `true` and `false` are also missing for the same reason: it is not completely clear that they really ought to be user-definable.
<discocaml_> <NULL> The true intent was for `[]` and `(::)` to be user-definable, but this also put the other standard variants in this category I imagine
<discocaml_> <val patate: unit Lazy.t> yeah, was about to mention them
<discocaml_> <val patate: unit Lazy.t> So (even if not a good idea), the full list one can use is:
<discocaml_> <val patate: unit Lazy.t> () | [] | (::) | true | false | *capitalized-ident*
<discocaml_> <val patate: unit Lazy.t> ?
<discocaml_> <NULL> After a few tests, `assert false` doesn't raise a type error when `false` is redefined and utop specifically doesn't like when `()` has arguments at all
ns12 has quit [Quit: bye]
ns12 has joined #ocaml
<discocaml_> <NULL> Wait, the behaviour of assert is expected, since it knows its argument is of type bool
<discocaml_> <octachron> Having `[]` available in type definitions came later https://github.com/ocaml/ocaml/pull/234 , whereas `true`, `false` and `::` were already available in type definitions in at least 3.12.0 .
Anarchos has joined #ocaml
Haudegen has joined #ocaml
hackinghorn has joined #ocaml
hackhorn has joined #ocaml
hackinghorn has quit [Ping timeout: 246 seconds]
Serpent7776 has joined #ocaml
wingsorc has quit [Ping timeout: 252 seconds]
bgs has joined #ocaml
azimut has joined #ocaml
gwizon has joined #ocaml
gwizon has quit [Quit: leaving]
gwizon has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
rf has joined #ocaml
zbroyar has joined #ocaml
zbroyar has quit [Ping timeout: 246 seconds]
Serpent7776 has quit [Ping timeout: 255 seconds]
zbroyar has joined #ocaml
oriba has joined #ocaml
perrierjouet has quit [Quit: WeeChat 3.8]
perrierjouet has joined #ocaml
rf has quit [Remote host closed the connection]
rf has joined #ocaml
szkl has joined #ocaml
oriba has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
spip has joined #ocaml
bobo_ has quit [Read error: Connection reset by peer]
noonien has joined #ocaml
waleee has joined #ocaml
Tuplanolla has joined #ocaml
trillion_exabyte has quit [Ping timeout: 255 seconds]
trillion_exabyte has joined #ocaml
gwizon has quit [Quit: Lost terminal]
trillion_exabyte has quit [Ping timeout: 246 seconds]
trillion_exabyte has joined #ocaml
hackhorn has quit [Ping timeout: 255 seconds]
mbuf has joined #ocaml
trillion_exabyte has quit [Ping timeout: 248 seconds]
trillion_exabyte has joined #ocaml
trillion_exabyte has quit [Ping timeout: 246 seconds]
trillion_exabyte has joined #ocaml
trillion_exabyte has quit [Ping timeout: 252 seconds]
trillion_exabyte has joined #ocaml
trillion_exabyte has quit [Ping timeout: 252 seconds]
mbuf has quit [Quit: Leaving]
trillion_exabyte has joined #ocaml
trillion_exabyte has quit [Ping timeout: 255 seconds]
trillion_exabyte has joined #ocaml
oriba has joined #ocaml
bartholin has joined #ocaml
trillion_exabyte has quit [Ping timeout: 246 seconds]
arro has joined #ocaml
trillion_exabyte has joined #ocaml
<arro> I am trying to use Int64.t for unsigned 64 bit ints (for a language parser that has u64 literals).  The only thing I'm missing seems to be a function like Int64.unsigned_to_string ... anyone know if there's already a way to do that in the std lib?  (I can just write the function if not, but it would be nice not to ...)
<companion_cube> the stdlib doesn't have anything for unsigned arith. You could use stdint or another library for that.
<arro> Int64 does have unsigned_div and unsigned_compare, and I think all the other signed ones give the same bits for unsigned (as long as you interpret it as unsigned later)
Anarchos has joined #ocaml
Anarchos has quit [Client Quit]
<arro> (Also unsigned_rem, and I guess I eventually do need that too)
trillion_exabyte has quit [Ping timeout: 255 seconds]
trillion_exabyte has joined #ocaml
arro has quit [Quit: Client closed]
trillion_exabyte has quit [Ping timeout: 252 seconds]
trillion_exabyte has joined #ocaml
Stumpfenstiel has joined #ocaml
mima has joined #ocaml
Serpent7776 has joined #ocaml
<discocaml_> <NULL> companion_cube: another encoding issue for the bridge, there are spurious Â
<companion_cube> where?
<companion_cube> ah I see. weird
<companion_cube> I wonder if these are "real" spaces?
azimut has quit [Remote host closed the connection]
trev has quit [Remote host closed the connection]
trev has joined #ocaml
azimut has joined #ocaml
trillion_exabyte has quit [Ping timeout: 255 seconds]
trillion_exabyte has joined #ocaml
<companion_cube> I find myself forgetting again how to look at a foo.pp.ml file
<companion_cube> -_-
<companion_cube> ah, ocamlc -dsource might do
dnh has joined #ocaml
<discocaml_> <sim642> There's now `dune describe pp` or something
<companion_cube> oh super cool
<companion_cube> thank you
wingsorc has joined #ocaml
gwizon has joined #ocaml
azimut has quit [Ping timeout: 255 seconds]
olle has quit [Ping timeout: 246 seconds]
azimut has joined #ocaml
azimut has quit [Ping timeout: 255 seconds]
azimut has joined #ocaml
bgs has quit [Remote host closed the connection]
dnh has quit [Ping timeout: 248 seconds]
azimut has quit [Quit: ZNC - https://znc.in]
azimut has joined #ocaml
dnh has joined #ocaml
szkl has quit [Quit: Connection closed for inactivity]
azimut has quit [Ping timeout: 255 seconds]
azimut has joined #ocaml
Serpent7776 has quit [Ping timeout: 268 seconds]
trev has quit [Remote host closed the connection]
waleee has quit [Quit: the updatening]
waleee has joined #ocaml
trillion_exabyte has quit [Ping timeout: 248 seconds]
trillion_exabyte has joined #ocaml
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
Stumpfenstiel has quit [Ping timeout: 255 seconds]
bartholin has quit [Quit: Leaving]