Tag: rust

  • Dive into (useless?) uncovered case of multistage dockerfile

    Dive into (useless?) uncovered case of multistage dockerfile

    Looking at the upstream documentation of Multi-stage builds there are some examples but this is missing: Ok, I mean, the example by itself is useless, but “it works”. Try: docker build -f Dockerfile -t copiedfrom-rust:v0.1 . Then: docker run -it copiedfrom-rust:v0.1 sh Real use case scenario Lets get serious now: why? Suppose you are inside…

  • Rust: riferimenti e lifetime

    (… oggi ho imparato che … premessa) Cosa vuol dire “lifetime” in Rust: 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 are expected to share the same lifetime.…

  • DAGs from Graph

    Still ChatGPT. But bad experience this time. 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). I must note that the solution…