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/
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Haudegen has joined #ocaml
spip has joined #ocaml
bobo_ has quit [Ping timeout: 272 seconds]
<d_bot> <mbacarella> can someone steelman (give me a good faith argument in favor of) Google's decision to incept Carbon instead of backing Rust
<companion_cube> well, they make a good case for it
<companion_cube> carbon is designed to interoperate fully with C++, with no friction
<companion_cube> rust… doesn't
<d_bot> <mbacarella> I'm not a PL phd but my vibe is that if you build support to natively consume C++ classes and templates in your next gen language you kinda erase a lot of the wins of being next gen
<d_bot> <mbacarella> sounds like to use C++ from Rust you need a brokering layer to convert into its more safe world and that's tedious and may hold back adoption of Rust in existing projects. is that right?
<d_bot> <mbacarella> I don't know what the rest of you have planned for your Friday night but I'm planning to drink some hard seltzer and debate next gen languages
rgrinberg has joined #ocaml
<d_bot> <Anurag> I don’t think they are trying to be next gen? Their docs do mention that if one can use Rust, zig etc they should. carbon seems first and foremost for their internal usage pattern.
<d_bot> <Anurag> That said companies do have a habit to latch on to things “because it’s from google” so I wouldn’t be surprised if Carbon gets more use just because it originated at Google.
wingsorc has quit [Remote host closed the connection]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
<companion_cube> @mbacarella yeah, rust and C++ have pretty different ideas of the world
<companion_cube> e.g. what classes are, move semantics, this kind of stuff
<companion_cube> so carbon won't be as safe or clean as rust; but imho they might still be better than C++ by adopting better _defaults_
<companion_cube> (C++ has a lot of wrong defaults)
jpds has quit [Write error: Broken pipe]
adanwan has quit [Write error: Broken pipe]
azimut has quit [Remote host closed the connection]
adanwan has joined #ocaml
azimut has joined #ocaml
jpds has joined #ocaml
wingsorc has joined #ocaml
jpds has quit [Ping timeout: 268 seconds]
jpds has joined #ocaml
<d_bot> <jumpnbrownweasel> i agree on the defaults being wrong, but if they change the defaults won't they lose the compatibility they're after?
<companion_cube> I don't think so, since you can stil call from one to the other
<companion_cube> it just means that the automatic translation tools have to know about the defaults
<companion_cube> e.g. if they decided that move was the default, and copy was explicit, `int a{1}; auto b=a` would become an explicit copy when translated to carbon
<companion_cube> but new carbon code could use move more naturally
<companion_cube> they clearly do that already with `let`/`var` instead of having mutability be the default
Haudegen has quit [Ping timeout: 260 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chrisz has quit [Ping timeout: 268 seconds]
chrisz has joined #ocaml
jpds has quit [Remote host closed the connection]
jpds has joined #ocaml
<d_bot> <jumpnbrownweasel> i was thinking about the difference between move and copy for assignment. Rust changed the default to move, which worked out very well. I wonder what Carbon does.
azimut has quit [Ping timeout: 268 seconds]
adanwan has quit [Ping timeout: 268 seconds]
<companion_cube> I wonder too
<companion_cube> the video is interesting: https://www.youtube.com/watch?v=omrY53kbVoA
azimut has joined #ocaml
adanwan has joined #ocaml
adanwan has quit [Remote host closed the connection]
adanwan has joined #ocaml
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
waleee has quit [Ping timeout: 272 seconds]
adanwan has quit [Ping timeout: 268 seconds]
azimut has quit [Quit: ZNC - https://znc.in]
azimut has joined #ocaml
adanwan has joined #ocaml
Sankalp has quit [Ping timeout: 260 seconds]
Sankalp has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
kakadu has quit [Ping timeout: 244 seconds]
trev has joined #ocaml
<d_bot> <sina_devel> Why ```var x: auto = 1;``` instead of ```var x = 1;``` ?
Sankalp has quit [Ping timeout: 268 seconds]
Sankalp has joined #ocaml
williewillus has quit [Quit: Leaving]
azimut has quit [Ping timeout: 268 seconds]
azimut has joined #ocaml
waleee has joined #ocaml
adanwan has quit [Ping timeout: 268 seconds]
azimut_ has joined #ocaml
azimut has quit [Ping timeout: 268 seconds]
adanwan has joined #ocaml
Sankalp has quit [Ping timeout: 272 seconds]
Sankalp has joined #ocaml
trev has quit [Remote host closed the connection]
kakadu has joined #ocaml
orbifx has joined #ocaml
bartholin has joined #ocaml
orbifx has quit [Ping timeout: 252 seconds]
Haudegen has joined #ocaml
azimut has joined #ocaml
azimut_ has quit [Ping timeout: 268 seconds]
neiluj has joined #ocaml
neiluj has quit [Client Quit]
adanwan has quit [Remote host closed the connection]
adanwan has joined #ocaml
azimut_ has joined #ocaml
azimut has quit [Quit: ZNC - https://znc.in]
azimut has joined #ocaml
azimut_ has quit [Ping timeout: 268 seconds]
<companion_cube> Yeah that's a weird choice
bartholin has quit [Ping timeout: 240 seconds]
bartholin has joined #ocaml
h11 has joined #ocaml
bobo_ has joined #ocaml
spip has quit [Ping timeout: 268 seconds]
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
azimut has quit [Ping timeout: 268 seconds]
<d_bot> <Monoid> Does anyone familiar with ppx_gen_rec know how this snippet in flow.js works?
<d_bot> <Monoid> this is the code using ppx_gen_rec, it adds a `[%%gen` to the top. but in ppx_gen_rec's code, it says it should be `module%gen rec Syntax : sig`
<d_bot> <mbacarella> those are equivalent forms
<d_bot> <Monoid> thank you. didn't expect such a fast answer
<d_bot> <Monoid> thank you. guess there's always macro for static languages
adanwan has quit [Ping timeout: 268 seconds]
adanwan has joined #ocaml
azimut has joined #ocaml
gopiandcode has quit [Read error: Connection reset by peer]
bartholin has quit [Ping timeout: 264 seconds]
adanwan has quit [Remote host closed the connection]
adanwan has joined #ocaml
gopiandcode has joined #ocaml
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
bartholin has joined #ocaml
adanwan has quit [Remote host closed the connection]
adanwan has joined #ocaml
trev has joined #ocaml
zebrag has joined #ocaml
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
rgrinberg has joined #ocaml
bartholin has quit [Ping timeout: 268 seconds]
bartholin has joined #ocaml
QDX45_ has joined #ocaml
dnh has joined #ocaml
dnh has quit [Client Quit]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
adanwan has quit [Ping timeout: 268 seconds]
adanwan has joined #ocaml
QDX45_ has quit [Ping timeout: 260 seconds]
kakadu has quit [Remote host closed the connection]
omegatron has joined #ocaml
rgrinberg has joined #ocaml
williewillus has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bartholin has quit [Ping timeout: 240 seconds]
jpds has quit [Remote host closed the connection]
jpds has joined #ocaml
bartholin has joined #ocaml
<trev> hey how do you make a variant contain a list of anonymous (?) records? i.e `Foo of { bar: string } list`
<d_bot> <NULL> I don't tjink you can
<d_bot> <NULL> think*
adanwan has quit [Read error: Connection reset by peer]
<trev> darn. ok...i will just move the record to its own type then
<trev> was trying to avoid a non-unique field label
adanwan has joined #ocaml
trev has quit [Remote host closed the connection]
adanwan has quit [Remote host closed the connection]
adanwan has joined #ocaml
spip has joined #ocaml
bobo_ has quit [Ping timeout: 272 seconds]
<williewillus> SML has that (anonymous structural records everywhere) but not ocaml iirc
<companion_cube> How are the perfs on that?
azimut has quit [Ping timeout: 268 seconds]
bartholin has quit [Ping timeout: 240 seconds]
bartholin has joined #ocaml
bobo_ has joined #ocaml
spip has quit [Ping timeout: 272 seconds]
<williewillus> for what?
<companion_cube> How are these records represented at runtime and what are costs for field access
dnh has joined #ocaml
<John_Ivan> hi. I installed "opam" and called "opam init" in a random directory. I then called "opam install piaf" for a http client.
<John_Ivan> I then went ahead and made a file called "main.ml" in that directory. I called "open Piaf". it mentions Piaf is unbound. is there something else that needs to be done to have dependencies ready?
bartholin has quit [Quit: Leaving]
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xgqt has quit [Remote host closed the connection]
xgqt has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
bobo_ has quit [Ping timeout: 240 seconds]
bobo_ has joined #ocaml
Sankalp has quit [Ping timeout: 268 seconds]
Sankalp 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.]
<williewillus> John_Ivan: how are you building main.ml?
<John_Ivan> williewillus, I'm not. just calling "ocaml main.ml"
<John_Ivan> > Module unbound.
<John_Ivan> for Piaf
<williewillus> ok yeah if you don't tell ocaml where dependencies are it can't find them. It's like in C if you don't pass -I include flags to the compiler it won't know where they are
<williewillus> usually people use a build system like Dune to help with this
<John_Ivan> williewillus, isn't ocaml available as an interpreted language though?
<John_Ivan> "as well"
<williewillus> you still need to tell it where the dependencies are
<williewillus> `ocaml` the program doesn't know Piaf lives in ~/.opam/.... whatever subfolder it is
<John_Ivan> williewillus, I... see. What's the formal approach to solving this?
<williewillus> nowadays people use a build system that handles this for them, the most popular of which today is Dune
<williewillus> if this is just for a quick one off you can fiddle with -I compiler flag https://v2.ocaml.org/manual/toplevel.html#s:toplevel-options
Riviera has joined #ocaml
Sankalp has quit [Ping timeout: 268 seconds]
<John_Ivan> williewillus, thank you. I got it working.
<williewillus> no prob
Sankalp has joined #ocaml
Sankalp has quit [Ping timeout: 268 seconds]
QDX45 has joined #ocaml