• 0 Posts
  • 31 Comments
Joined 2 years ago
cake
Cake day: July 24th, 2023

help-circle












  • A myth persists that the initial batch of Iron Rings was made from the beams of the first Quebec Bridge, a bridge that collapsed during construction in 1907 due to poor planning and design by the overseeing engineers.

    How can you do that to my, Wikipedia? I never believed in Santa, but I believed in the tragic origin of the ring.


  • But anyways, animal farts come from preexisting carbon in the biosphere. Car farts come from extracting previously sequestered carbon. So without extractive processes, and with ethical land use/management, the atmospheric methane wouldn’t have a significant impact.

    Methane is 81x worse that CO2 over 20 Years, so if it came from atmospheric carbon it’s only 80x as bad.


  • I was a bit apprehensive because rust has like a gazillion different function types but here it seems to work like just any other language with a HM type system.

    The fn(T)->R syntax works for functions without associated data, it discards details of the implementation and works like function pointers in C. This allows them to be copy and 'static.

    The other function types can have data with them and have more type information at compile time which allows them to be inlined.
    These functions each have their own unwritable type that implements the function traits (Fn(T)->R, FnMut(T)->R and FnOnce(T)->R) depending on their enclosed data.

    I hope I remembered everything right from this video by Jon Gjengset.






  • You can’t random-access an iterator and use it again later.

    If your specific use case really needs random access to a list while lazy computing the elements just wrap them in Lazy and put them in a vector.

    Can Rust compute the value of calling a function an infinite number of times?

    The return type of an infinitely recursive function / infinite loops is ⊥, a type that by definition has no values. (Known in rust as !)