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/
spip has quit [Quit: Konversation terminated!]
gwizon has joined #ocaml
Haudegen has quit [Ping timeout: 255 seconds]
adanwan has left #ocaml [No boundaries on the net!]
Tuplanolla has quit [Quit: Leaving.]
rf has quit [Quit: Leaving]
chrisz has quit [Ping timeout: 252 seconds]
chrisz has joined #ocaml
<companion_cube> @rgrinberg: wouldn't it be nice if `dune build -w` could ony acquire the lock upon starting a new build?
mbuf has joined #ocaml
waleee has quit [Ping timeout: 252 seconds]
bgs has joined #ocaml
trev has joined #ocaml
Haudegen has joined #ocaml
gahr_ is now known as gahr
Serpent7776 has joined #ocaml
bartholin has joined #ocaml
John_Ivan_ has joined #ocaml
John_Ivan has quit [Read error: Connection reset by peer]
olle has joined #ocaml
spip has joined #ocaml
azimut has quit [Ping timeout: 255 seconds]
gwizon has quit [Quit: leaving]
<discocaml> <deech> Hi! I'm trying to bootstrap `opam` from HEAD and I get:
<discocaml> <deech> ```
<discocaml> <deech> > make  ✔
<discocaml> <deech> src_ext/dune-local/dune.exe build --profile=release --root . --promote-install-files -- opam-installer.install opam.install
<discocaml> <deech> File "src_ext/base64/src/dune", line 5, characters 12-17:
<discocaml> <deech> 5 | (libraries bytes))
<discocaml> <deech> ^^^^^
<discocaml> <deech> Error: Library "bytes" not found.
<discocaml> <deech> ```
<discocaml> <deech> The `bytes` repo (https://github.com/chambart/ocaml-bytes) says it's only needed for `<= 4.0.2` but my version is `5.1.0+dev1-2022-06-09` which I compiled from HEAD today so why is there a dependency on it?
<discocaml> <octachron> The dependency is a mistake: all version of OCaml supported by dune (≥4.03) have a `Bytes` module, thus it is never useful to have `(libraries bytes)` stanza in a dune file.
<discocaml> <deech> I see. How are others building it? I've made no changes to the vendored dependencies (https://github.com/ocaml/opam/blob/1762a4efb8cdf25985ed875c8261494f63264f5d/src_ext/Makefile.sources#L11)
amk has quit [Remote host closed the connection]
amk has joined #ocaml
amk has quit [Remote host closed the connection]
amk has joined #ocaml
bartholin has quit [Quit: Leaving]
amk has quit [Remote host closed the connection]
Serpent7776 has quit [Ping timeout: 248 seconds]
ns12 has quit [Quit: Ping timeout (120 seconds)]
ns12 has joined #ocaml
amk has joined #ocaml
amk has quit [Remote host closed the connection]
amk has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
wingsorc has quit [Ping timeout: 248 seconds]
rf has joined #ocaml
Haudegen has joined #ocaml
oriba has joined #ocaml
<discocaml> <areuu> is there any repo about compile wast to wasm in ocaml in github?
oriba has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
masterbuilder has quit [Ping timeout: 255 seconds]
masterbuilder has joined #ocaml
masterbuilder has quit [Ping timeout: 248 seconds]
def has joined #ocaml
def has left #ocaml [#ocaml]
masterbuilder has joined #ocaml
Everything has joined #ocaml
mbuf has quit [Quit: Leaving]
gentauro has quit [Ping timeout: 246 seconds]
kakadu has quit [Remote host closed the connection]
gentauro has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
azimut has joined #ocaml
John_Ivan__ has joined #ocaml
John_Ivan_ has quit [Ping timeout: 256 seconds]
Everything has quit [Quit: leaving]
azimut_ has joined #ocaml
azimut has quit [Ping timeout: 255 seconds]
Haudegen has joined #ocaml
bartholin has joined #ocaml
Serpent7776 has joined #ocaml
Serpent7776 has quit [Ping timeout: 246 seconds]
jumpnbrownweasel has quit [Remote host closed the connection]
jumpnbrownweasel has joined #ocaml
waleee has joined #ocaml
trev has quit [Remote host closed the connection]
Stumpfenstiel has joined #ocaml
bartholin has quit [Quit: Leaving]
<discocaml> <Swerve> Say I make a graph like so:
<discocaml> <Swerve> ```ocaml
<discocaml> <Swerve> type graph = {
<discocaml> <Swerve> value : int;
<discocaml> <Swerve> children : graph list;
<discocaml> <Swerve> }
<discocaml> <Swerve> ```
<discocaml> <Swerve> From what I can tell, if I instantiate this type, I end up with a graph whose nodes contain copies of all the subgraphs its children create, like so:
<discocaml> <Swerve> ```ocaml
<discocaml> <Swerve> let a = {value=0; children=[];}
<discocaml> <Swerve> let b = {value=1; children=[a];}
<discocaml> <Swerve> let c = {value=2; children=[a;b]}
<discocaml> <Swerve> ```
<discocaml> <Swerve> The problem here is that c contains a and b, but b contains a copy of a, so c contains two copies of a, etc. This makes the space requirements for this structure balloon wildly. I've tried changing the type of graph to be a reference, with children being a graph ref list. But this doesn't seem to change anything.
<discocaml> <Swerve> How can I fix this?
<discocaml> <Swerve> Say I make a graph like so:
<discocaml> <Swerve> ```ocaml
<discocaml> <Swerve> type graph = {
<discocaml> <Swerve> value : int;
<discocaml> <Swerve> children : graph list;
<discocaml> <Swerve> }
<discocaml> <Swerve> ```
<discocaml> <Swerve> From what I can tell, if I instantiate this type like so, I end up with a graph whose nodes contain copies of all the subgraphs its children create, like so:
<discocaml> <Swerve> ```ocaml
<discocaml> <Swerve> let a = {value=0; children=[];}
<discocaml> <Swerve> let b = {value=1; children=[a];}
<discocaml> <Swerve> let c = {value=2; children=[a;b]}
<discocaml> <Swerve> ```
<discocaml> <Swerve> The problem here is that c contains a and b, but b contains a copy of a, so c contains two copies of a, etc. This makes the space requirements for this structure balloon wildly. I've tried changing the type of graph to be a reference, with children being a graph ref list. But this doesn't seem to change anything.
<discocaml> <Swerve> How can I fix this?
<discocaml> <Swerve> Say I make a graph like so:
<discocaml> <Swerve> ```ocaml
<discocaml> <Swerve> type graph = {
<discocaml> <Swerve> value : int;
<discocaml> <Swerve> children : graph list;
<discocaml> <Swerve> }
<discocaml> <Swerve> ```
<discocaml> <Swerve> From what I can tell, if I instantiate this type like so, I end up with a graph whose nodes contain copies of all the subgraphs its children create:
<discocaml> <Swerve> ```ocaml
<discocaml> <Swerve> let a = {value=0; children=[];}
<discocaml> <Swerve> let b = {value=1; children=[a];}
<discocaml> <Swerve> let c = {value=2; children=[a;b]}
<discocaml> <Swerve> ```
<discocaml> <Swerve> The problem here is that c contains a and b, but b contains a copy of a, so c contains two copies of a, etc. This makes the space requirements for this structure balloon wildly. I've tried changing the type of graph to be a reference, with children being a graph ref list. But this doesn't seem to change anything.
<discocaml> <Swerve> How can I fix this?
<discocaml> <Swerve> Say I make a graph like so:
<discocaml> <Swerve> ```ocaml
<discocaml> <Swerve> type graph = {
<discocaml> <Swerve> value : int;
<discocaml> <Swerve> children : graph list;
<discocaml> <Swerve> }
<discocaml> <Swerve> ```
<discocaml> <Swerve> From what I can tell, if I instantiate this type like so, I end up with a graph whose nodes contain copies of all the subgraphs its children create:
<discocaml> <Swerve> ```ocaml
<discocaml> <Swerve> let a = {value=0; children=[];}
<discocaml> <Swerve> let b = {value=1; children=[a];}
<discocaml> <Swerve> let c = {value=2; children=[a;b]}
<discocaml> <Swerve> ```
<discocaml> <Swerve> The problem here is that c contains a and b, but b contains a copy of a, so c contains two copies of a, etc. This makes the space requirements for this structure balloon wildly. I've tried changing the type of graph to be a reference, with children being a graph ref list. But this doesn't seem to change anything.
<discocaml> <Swerve> Am I understanding the behavior correctly? and how can I fix this?
<discocaml> <KW78> there is no copy, everything is shared
<discocaml> <Swerve> So c simply contains pointers to a and b?
<discocaml> <KW78> aka persistent data structure
<discocaml> <KW78> in this case yes, although this is an implementation detail. Ocaml has a uniform data representation. basically everything beside integers are wrapped in boxes and pointed too.
<discocaml> <KW78> (integers have a special representation to distinguish them from pointers)
<discocaml> <Swerve> Okay, thanks a ton!
szkl has joined #ocaml
wingsorc has joined #ocaml
olle has quit [Ping timeout: 265 seconds]
spip has quit [Quit: Konversation terminated!]
<discocaml> <anmonteiro> it's immutable but not persistent
<discocaml> <anmonteiro> it's immutable but not persistent, right?
spip has joined #ocaml
Tuplanolla has joined #ocaml
bgs has quit [Remote host closed the connection]
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
Stumpfenstiel has quit [Ping timeout: 255 seconds]
szkl has quit [Quit: Connection closed for inactivity]
haesbaert has quit [Remote host closed the connection]