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/
Tuplanolla has quit [Quit: Leaving.]
dwt_ has quit [Ping timeout: 256 seconds]
servytor has quit [Quit: Connection closed for inactivity]
mmalter has quit [Quit: Lost terminal]
rgrinberg has joined #ocaml
waleee has quit [Ping timeout: 272 seconds]
waleee has joined #ocaml
<bgs> is there some convention on how to get around having labels with the same name defined in multiple records?
rgrinberg has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
waleee has quit [Ping timeout: 240 seconds]
<d_bot_> <RegularSpatula> or this: https://stackoverflow.com/a/8929734
waleee has joined #ocaml
<bgs> RegularSpatula: thanks
<bgs> the latter link is not applicable to my case because my types are mutually recursive
<bgs> but I'll work something out
<d_bot_> <RegularSpatula> ah yeah i guess you could make mutually recursive modules...but probably not the best option
<bgs> that probably exceeds my current capabilities of manipulating modules
<bgs> so I'll just stick to renaming things systematically
<d_bot_> <RegularSpatula> that's probably best...ive seen a few times advice to avoid recursive modules when possible
<d_bot_> <RegularSpatula> if youre curious, you can check out this (https://ocaml.org/manual/recursivemodules.html) and see how you can get runtime errors with them
<bgs> thanks, I'll take a look
<bgs> always nice to learn somethink new
waleee has quit [Ping timeout: 260 seconds]
waleee has joined #ocaml
TheRuralJuror has quit [Quit: Bin weg.]
waleee has quit [Ping timeout: 240 seconds]
waleee has joined #ocaml
waleee has quit [Ping timeout: 240 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gravicappa has joined #ocaml
mbuf has joined #ocaml
unyu has quit [Quit: brb]
bobo has joined #ocaml
spip has quit [Ping timeout: 240 seconds]
rgrinberg has joined #ocaml
pieguy128 has quit [Quit: ZNC 1.8.2 - https://znc.in]
pieguy128 has joined #ocaml
kaph has quit [Ping timeout: 240 seconds]
ado has quit [Ping timeout: 250 seconds]
JSharp has quit [Ping timeout: 250 seconds]
jyc has quit [Read error: Connection reset by peer]
jyc has joined #ocaml
ado has joined #ocaml
JSharp has joined #ocaml
lobo has quit [Ping timeout: 250 seconds]
lobo has joined #ocaml
unyu has joined #ocaml
rgrinberg has quit [Ping timeout: 252 seconds]
rgrinberg has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xd1le has joined #ocaml
Serpent7776 has joined #ocaml
Tuplanolla has joined #ocaml
bartholin has joined #ocaml
xgqt has quit [Remote host closed the connection]
xgqt has joined #ocaml
namkeleser has joined #ocaml
notnotdan has joined #ocaml
bartholin has quit [Ping timeout: 252 seconds]
bartholin has joined #ocaml
Haudegen has joined #ocaml
perrierjouet has quit [Quit: WeeChat 3.4]
mbuf has quit [Ping timeout: 252 seconds]
mbuf has joined #ocaml
infinity0 has quit [Ping timeout: 252 seconds]
infinity0 has joined #ocaml
<d_bot_> <octachron> @RegularSpatula , there is no issues at all with having records sharing the same labels since type-directed disambiguation (introduced in OCaml 4.01 in 2013). Generally, if you end up linking the old caml site, your information is most probably outdated.
perrierjouet has joined #ocaml
hackinghorn has quit [Remote host closed the connection]
hackinghorn has joined #ocaml
perrierjouet has quit [Quit: WeeChat 3.4]
perrierjouet has joined #ocaml
hackinghorn has quit [Ping timeout: 240 seconds]
hackinghorn has joined #ocaml
bartholin has quit [Ping timeout: 272 seconds]
bacam has quit [Quit: reboot]
hackinghorn has quit [Ping timeout: 240 seconds]
perrierjouet has quit [Quit: WeeChat 3.4]
bacam has joined #ocaml
perrierjouet has joined #ocaml
bartholin has joined #ocaml
dextaa_ has joined #ocaml
kaph has joined #ocaml
bartholin has quit [Ping timeout: 240 seconds]
bartholin has joined #ocaml
hackinghorn has joined #ocaml
namkeleser has quit [Quit: Client closed]
mbuf has quit [Quit: Leaving]
zebrag has joined #ocaml
<d_bot_> <RegularSpatula> Ah sorry about that, thanks for the correction
<companion_cube> however there's a warning in case of ambiguity :(
bartholin has quit [Ping timeout: 256 seconds]
jlrnick has joined #ocaml
bobo has quit [Ping timeout: 250 seconds]
bobo has joined #ocaml
jlrnick has quit [Ping timeout: 252 seconds]
kakadu has quit [Remote host closed the connection]
xd1le has quit [Quit: xd1le]
bartholin has joined #ocaml
mrvn has joined #ocaml
<mrvn> moin, long time no read
<mrvn> You (hopefully) all know extensible variants: "type t = .. type t += Foo" Is there something like that for records?
<d_bot_> <NULL> objects ?
<mrvn> extensible records where different .ml files can add rows.
<d_bot_> <glennsl> like one record _inheriting_ the rows of another record?
<d_bot_> <glennsl> yea sounds like objects to me
<mrvn> inheriting needs a clear chain of a inherits b.
<mrvn> extensible variants are open to anyone in any order to just add something.
<d_bot_> <NULL> You're adding requirements then, so an object of type t then may not be of type t now ? That doesn't seem like a good idea
zebrag has quit [Quit: Konversation terminated!]
<companion_cube> mrvn: there isn't
<mrvn> Well, maybe we have to make one then :) Just as a tought experiment. Assuming there is such a record defined by "type t += { my_row : my_type; }" then the compiler would know the size and layout at link time. It has a clear type so that is good too. Access to my_row withint a module looks trivial too. copy/modify with { t with my_row = bla; } seems trivial too.
<mrvn> Any thoughts how one could construct the first instance of such a record?
kaph_ has joined #ocaml
kaph has quit [Read error: Connection reset by peer]
zebrag has joined #ocaml
<mrvn> My feeling is that each module would have to provide a part of the constructor covering it's own rows.
<sim642> What good is knowing the layout of such extensible record at link time? Each of the modules would have to be compiled beforehand and they need to know the offsets of the fields they access already then, before any linking
<mrvn> sim642: somehow extensible variants solve that problem.
<mrvn> sim642: the compiler would leave little boxes for the offset all over the place for the linker to fill in later.
<d_bot_> <NULL> Extensible variants just have to know what tag they are, if you use a hash and don't stumble on a collision you are completely modular
<sim642> I don't think extensible variants need to solve that problem exactly because they are variants: the constructors used by a module are known at compilation time already. The offsets of constructors defined by other modules don't matter
<sim642> And yeah, so only the tags have to be handled, not the entire layout across everything
<d_bot_> <NULL> Also, how do you construct a value of type t ?
<mrvn> Null: Yes, that is the problem. If you have one you can modify it. So each module would have to provide defaults for the rows it defines to make a default t.
<mrvn> or something.
<d_bot_> <NULL> That would be weird by OCaml standards
<sim642> The inability to construct these extensible records makes them trivial: they're just empty variants :P
<companion_cube> mrvn: the closest you can do is a universal hashmap
tizoc has quit [*.net *.split]
ansiwen has quit [*.net *.split]
Absalom has quit [*.net *.split]
gjvc has quit [*.net *.split]
cross has quit [*.net *.split]
tizoc has joined #ocaml
Absalom has joined #ocaml
gjvc has joined #ocaml
cross has joined #ocaml
ansiwen has joined #ocaml
bartholin has quit [Ping timeout: 268 seconds]
<mrvn> ito of a random ineter will just return 0. and 0 == 0
<mrvn> ups
azimut has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
bartholin has joined #ocaml
azimut has joined #ocaml
bartholin has quit [Ping timeout: 240 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
waleee has joined #ocaml
hackhorn has joined #ocaml
hackinghorn has quit [Read error: Connection reset by peer]
bartholin has joined #ocaml
<d_bot_> <mbacarella> this one random ocaml program i'm running throws an exception that isn't caught and it... doesn't show a backtrace
<d_bot_> <mbacarella> what's going on
<sim642> Assuming you have backtraces enabled, maybe it's being thrown with raise_notrace
<mrvn> compiled without debug enabled?
<d_bot_> <mbacarella> i'm running with the normal dune dev profile
<d_bot_> <mbacarella> it's ocaml-swagger
<d_bot_> <mbacarella> maybe atdgen emits code that turns it off?
<d_bot_> <mbacarella> oh duh i didn't open! Core in this codegen thing
<d_bot_> <mbacarella> i guess i've been taking for granted that Core turns backtraces on
<d_bot_> <mbacarella> ... taking it for granted for a decade now
<mrvn> Did you set OCAMLRUNPARAM?
<d_bot_> <mbacarella> no why would i
<mrvn> because you didn't open Core
<d_bot_> <mbacarella> ¯\_(ツ)_/¯
<d_bot_> <mbacarella> i simply thought backtraces were on by default in ocaml this entire time
<mrvn> push it
<mrvn> ups
<d_bot_> <mbacarella> ? like, do 10 pushups for being so naive?
<sim642> One pushup for each frame in the backtrace you now got
gravicappa has quit [Ping timeout: 256 seconds]
<companion_cube> be thankful you don't write java
<d_bot_> <VPhantom> 😱
wyrd has quit [Ping timeout: 240 seconds]
wyrd has joined #ocaml
oriba has joined #ocaml
Serpent7776 has quit [Quit: leaving]
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
bartholin has quit [Quit: Leaving]
<companion_cube> (not dissing java, just the stacktraces :D)