multi stage rocket flying

Dive into (useless?) uncovered case of multistage dockerfile

<p class="wp-block-paragraph">Looking at the upstream documentation of <a href="https://docs.docker.com/build/building/multi-stage/">Multi-stage builds</a> there are some examples but this is missing:</p> <p class="wp-block-paragraph">Ok, I mean, the example by itself is useless, but “it works”. Try:</p> <p class="wp-block-paragraph"><code>docker build -f Dockerfile -t copiedfrom-rust:v0.1 .</code></p> <p class="wp-block-paragraph">Then:</p> <p class="wp-block-paragraph"><code>docker run -it copiedfrom-rust:v0.1 sh</code></p> <h2 class="wp-block-heading">Real use case scenario</h2> <p class="wp-block-paragraph">Lets […]

Read More…

Rust: riferimenti e lifetime

<p class="wp-block-paragraph">(… oggi ho imparato che … premessa)</p> <p class="wp-block-paragraph">Cosa vuol dire “lifetime” in Rust:</p> <blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"> <p class="wp-block-paragraph">A lifetime parameter does not allow you to choose how long a value lives, it only allows you to communicate to the compiler that two or more references are “related” to the same memory and […]

Read More…

DAGs from Graph

<p class="wp-block-paragraph">Still ChatGPT. But bad experience this time.</p> <p class="wp-block-paragraph">I asked all possible distinct DAGs given an adjacency matrix of a graph (probably not connected). I insisted that the graph is not connected. But “it” pretended to just make a loop over the nodes and build “all possible dags” (it pretends).</p> <p class="wp-block-paragraph">I must note […]

Read More…