HNHacker News
TopNewBestAskShowJobs

bennofs

549 karma · joined December 9, 2014

[ my public key: https://keybase.io/bennofs; my proof: https://keybase.io/bennofs/sigs/wcPXzHZpmIhdUO3v_US4scJ5O4TGk46NqjneY_Ph6KQ ]
submissionscomments
bennofs··on Remacs – A community-driven port of Emacs to Rust
Python has/had a terrible packaging story though. As you said, dependencies weren't really documented. Rust, on the other hand, documents all dependencies in Cargo.toml. And dependencies can easily be parsed from Cargo.toml without the need to execute any code (as would be required in the case of python)
bennofs··on Ask HN: What Linux diagnostic tools/commands do you use?
strace - to see what a program is doing / where exactly something is failing if the error message is bad

ltrace - same as above, if strace is not enough

perf trace - if you don't know the exact process to strace upfront

https://github.com/brendangregg/perf-tools - to track disk accesses or exec calls

env LD_DEBUG=all - debugging dynamic linker issues

bennofs··on How Rust is tested
This technique is used to at least some extent in the Haskell world as well. Library changes are sometimes judged by the amount of breakage that they cause (often, Stackage or a subset thereof is used for these tests as a set of "commonly" used packages).

Also, Haskell definitely has a standard package system: Hackage. (Stackage is just a "view"/subset of Hackage)

bennofs··on Common Errors in Undergraduate Mathematics (2009)
Transforming a statement using a series of equavilence transforms into an always true statement isn't a valid proof? After all, you've shown that the original statement is the same as a true statement. Isn't that a valid proof as well? It is often easier to go in that direction, since you have a clear starting point. In the other direction, you'd have to guess from where to start.
bennofs··on Typing Nix
I believe that this meaning is even intentional, the original author of nix (Eelco Dolstra) is from the Netherlands. The name comes from the fact that by default, nothing is available in build environments in nix.
bennofs··on Typing Nix
for your first point., what about `builtins.fetchTarball` and `builtins.fetchurl` (`fetchgit` is in nix unstable afaik)
bennofs··on What CSS minifiers also leave behind
Minifying also speeds up decompression, because less data has to be produced by the decompressor. Compression and minifying are really different optimizations, as the minification does not need to be reversed. So each one has benefits.
bennofs··on New Sci-Hub domain
Does anyone know what's up with that chrome plugin for searching? Feels weird to me that it would require a plugin.
bennofs··on A deep dive into why Wi-Fi kind of sucks
I've got a weird problem at my home where WiFi connection on my laptop gets really bad as soon as some particular other laptop connects to the WiFi. Reconnecting fixes the issue. Any idea what might cause this or how to gather more information on potential causes?
bennofs··on Next Iteration of “The Rust Programming Language” Book
A possibility is to use a different representation for graphs, such as adjacency matrices, which are much easier to work with the borrow checker.

Or just use RefCell, deferring the borrow checking until runtime.

Another strategy could be to give every node an explicit ID, and then have a mapping ID -> node. Every else you just refer to the nodes by their IDs.

bennofs··on Some bad Git situations and how I got myself out of them
Even better in combination with the `:/grep` syntax that allows you to specify the commit by grepping the commit messages, prefering more recent commits: `git commit --all --fixup ':/implement some feat'`.
bennofs··on Google's login page accepts a vulnerable GET parameter
I agree that you cannot 100% prevent phishing, but I think that the case presented here is slightly different: the "evil URL" is only contained in a parameter to an request to another URL. I don't think that the typical users will look at the things that come after the `?` in the URL, especially since those can be url-encoded an thus just look like garbage.
bennofs··on Undebt: How We Refactored 3M Lines of Code
> Provably correct software is possible.

Even then, the software is provably correct according to some specification, which can still have bugs. No technology can fully prevent logic bugs.

bennofs··on Reflections on NixOS
I would suggest it, there is not much that has changed about the core of nix/nixpkgs, the nix language is quite stable and most changes have been additions rather than changing existing features.
bennofs··on Reflections on NixOS
No, that is not what `propagatedBuildInputs` is for. `propagatedBuildInputs` should be used very sparingly, in most cases wrappers are the better solution.

For example, consider if every package that contained bash scripts would put bash in `propagatedBuildInputs`. Then I could not use a different version of bash for my user environment than those packages I installed used!

Also, `propagatedBuildInputs` are not even propagated into the user environment, the attribute that does that is `propagatedUserEnvPkgs` (not sure if that name is fully correct), and it is very sparingly used within nixpkgs.

bennofs··on Shape of errors to come
cargo build --color always | less -R should work with recent cargo, alternativly `cargo rustc --color always -- --color always 2>&1 | less -R` works as well.
bennofs··on The Update Framework
Doesn't the `snapshot.json` file protect against "not being aware of the revocation"? Since `snapshot.json` can be trusted to be up-to-date (due to being included by hash in `timestamp.json`), and `snapshot.json` has a hash of all metadata files, we can be sure that our metadata is up-to-date (or at most as old as the interval after which `timestamp.json` is considered out of date, which is as you say a risk-based decision). And our metadata includes the delegations, so if the metadata is up to date, then so is our delegation information.
bennofs··on The Update Framework
From " 1.5.2. Goals for specific attacks to protect against" from the TUF spec:

Git protects against:

    * Arbitrary installation attacks. (Because metadata is signed)
    * Extraneous dependencies attacks. (Because metadata is signed)
    * Mix-and-match attacks. (Because a git commit hash depends on its parents)
    * Rollback attacks, assuming you make sure you only fast-forward when pulling.
    * Wrong software installation.
It does not protect against:

    * Indefinite freeze attacks. The attacker could 
      just replay the same signed git repository for a long time.
    * Vulnerability to key compromises. (Everyone can sign any commit, no separation)
It also has no built-in support for mirrors, and you cannot delegate trust to sub-maintainers easily, since any person who can sign a commit may potentially modify every file in the repo.

So I don't see how `git` is a valid solutions to the problems that TUF wants to solve.

bennofs··on The Update Framework
Can you share what your different requirements that are not supported by TUF are?
bennofs··on The Update Framework
Hackage/Cabal also has at least a partial implementation of TUF.
bennofs··on Desktop privacy & security of web browsers on Linux part 1: concepts and theory
Improving Linux desktop security beyond "if you PWN one program, you PWN the whole desktop session" is going to be hard. X11 has no separation, so talking about this really only makes sense when using Wayland, which is no where near default yet.

A problem with this particular approach is that chrome-trusted for example will no longer have access to the session's DBus, so it cannot show any notifications for example. And DBus, like X11, does not provide any separation right now as far as I'm aware (it has support for authentication, but in practice, `external` is used most of the time which is based on UID).

The only variant that might provide a real security benefit here is the -paranoid one, as that those not share the X11 server session.

bennofs··on Obtaining Wildcard SSL Certificates from Comodo via Dangling Markup Injection
Why is blacklisting not safe, assuming you contextually blacklist?
bennofs··on A founder's perspective on 4 years with Haskell
Not that I know much about it, but http://www.purescript.org certainly looks like a kind of "Coffeescript for Haskell”? Or is that language too different from JS for that purpose? The that might just be because Haskell is quite different from JS.
bennofs··on A founder's perspective on 4 years with Haskell
Doesn't python3 have both bytes and str, the equavilent of ByteString and Text?
bennofs··on Peter Doig sued for disavowing 40-year-old painting
How can there be a punishment for not having perfect memory and remembering everything you ever created? That does not make sense to me, you'd have to prove that he actually knew that he created it and is intentionally lying to warrant any compensation for lost value, which sounds hard to me.
bennofs··on Typosquatting programming language package managers
Did anyone else find it surprising the the number of total requests (45334) is so much higher than the number of unique total requests (17289)? It is more than twice the number of unique requests!

Possible explainations:

* Perhaps many of those are automated build systems, which would also explain the high number of systems with admin access (for example, if you use travis without docker, every build runs in a clean vm with admin access).

* People download one package and install it multiple times? Seems unlikely

Any other ideas?

bennofs··on Git Reflow
Doesn't `git blame --first-parent` work for that? From my quick tests, it seems like it shows the merge commit if you have such a structure (`--first-parent` also works for `git log` etc)
bennofs··on Git Reflow
Perhaps they only use the password to retrieve an OAuth access token which they store? At least that's how the `hub` command line tool handles it afaik.
bennofs··on Custom Deleters for C++ Smart Pointers
Couldn't you do something like `auto x = make_on_scope_exit([]() { ... });`?
bennofs··on Doom as a tool for system administration (1999)
Also, this: https://github.com/docker/dockercraft. Manage your docker containers in minecraft! (Arguably a much better fit for the block-based world!)
← PreviousPage 7 of 8Next →