I wonder which ones he considers those to be -- the interview doesn't say, sadly...
1,589 karma · joined October 12, 2016
Researcher at https://www.sift.net/
Email is concat ["me@", username, ".com"]
I wonder which ones he considers those to be -- the interview doesn't say, sadly...
For unsafe Rust code to be sound, it has to uphold the invariant that no location pointed to by an &mut is modified through a pointer not derived from that &mut. However, there's no such restriction on *mut pointers ("raw pointers"), and it is in many cases perfectly sound (but unsafe, of course) to cast from *mut to &mut, or to directly mutate through a *mut. Without maintaining global information about what references are live, it sounds really, really hard to guarantee this.
- It can do 4x 15-minute snapshots, 24x hourly snapshots, 7x daily snapshots, 4x weekly snapshots, and 12x monthly snapshots, without making 51 copies of my files.
- Taking a snapshot has imperceptible performance impact.
- Snapshots are taken atomically.
- Snapshots can be booted from, if it's a system that's screwed up and not just one file.
- Snapshots can be accessed without disturbing the FS.
In my experience it hasn't required more hand-holding than ext4 past the initial install, but the OSes that most of my devices use either officially support ZFS or don't use package managers that will blindly upgrade a kernel past what out-of-tree modules I'm using will support, which I think fixes the most common issue people have with ZFS.
$ grep bar foo.txt | tr A-Z a-z > foo.txt
is much more common than losing a disk template<typename T>
T callWithState(auto f) {
auto old = globalState;
globalState = whatever();
T out = f();
globalState = old;
return out;
}
(forgive any syntax errors, my C++ is very rusty...)My understanding (having only used dependent-types -family interactive theorem provers) is that if your property can be expressed in HOL, proving it will require far less human effort to prove than Coq or similar.
Separately, my gut feeling is that in 2024, programming language runtime technology is advanced enough that manually reusing buffers isn't necessarily a good use of hours-spent-optimizing. To pick on Python in particular, it _does_ actually reuse buffers when they only have a single owner; more languages might get this in the future via the Perceus refcounting work?
Methodology (yes, I could've stayed in Lisp, but I started by awking systems.txt...):
(with-open-file (*standard-output* #p"deps.txt" :direction :output)
(iter
(for system in (ql:provided-systems t))
(for name = (ql::name system))
(format t "~a ~a~%" (length (ql:who-depends-on name)) name)))
$ sort -h deps.txt | tail
200 uiop
201 iterate
206 split-sequence
274 closer-mop
344 cl-glfw-opengl-core
350 bordeaux-threads
387 fiveam
391 cffi
408 cl-ppcre
1006 alexandria(That said, the tooling around flakes is so much nicer that I still use and recommend them.)
(I also find it surprising that avoiding floats helps anything; maybe just in avoiding more instantiations? Because if the std floating point functions don't fully inline, you've got bigger problems than wasm blob size...)
[0]: https://okmij.org/ftp/tagless-final/TaglessStaged/beyond-tal...
exec ["ld"; "-o"; out_file; obj_file]
to exec ["ld"; "-o"; out_file; obj_file; "-lgc"]
...This isn't only libc -- it also includes libgcc (or compiler-rt, depending on your system toolchain), which, despite the name, may still be called "behind your back" by the LLVM toolchain.
> So it's a Rust program but it's just calling inline assembly and using a C compiler?
Yeah, I think this article is more in the tradition of [0] (but trying hard not to drop rustc) than being completely practical advice on making the binary you ship to users smaller.
[0]: http://www.muppetlabs.com/~breadbox/software/tiny/teensy.htm...
%2 <- foo %0 %1
...
is effectively equivalent to (foo %0 %1 (lambda (%2)
...)
Phis are sorta modeled inversely: %1:
%2 <- const 0
br %5
%3:
%4 <- const 1
br %5
%5:
%6 <- phi [%1 -> %2, %3 -> %4]
...
becomes: (letrec ((%1 () (const 0 (lambda (%2) (%5 %2))))
(%3 () (const 1 (lambda (%4) (%5 %4))))
(%5 (%6) ...))
...)
The nice thing on paper about both of these is that you've broken every
computation down into nice nameable bits; if you want to do some
analysis (e.g. abstract interpretation) over the programs, you can store
intermediate results as a map from names (like %4) to values.The traditional downside of CPS is that requiring lambdas be nested in order for things to be in scope can make some program transformations require "reshuffling" terms around in a way SSA doesn't require.
The "cps soup" [0] approach used in Guile fixes this, but your terms look like they violate lexical scoping rules!