HNHacker News
TopNewBestAskShowJobs

sgeisenh

413 karma · joined February 4, 2014

submissionscomments
sgeisenh··on Magic-trace – High-resolution traces of what a process is doing
Ron Minsky is an excellent communicator and incredible interviewer. Every episode has been phenomenal.
sgeisenh··on Standard ML Family
Standard ML is incredibly usable but also very small (syntactically and semantically) especially compared with modern algol-family languages.

There are a couple of quality of life features missing (most notably is record update syntax), but I really enjoy that the core language has not changed in 25 years.

sgeisenh··on Ask HN: Can the same individual accomplish more with programming than proofs?
The Curry-Howard correspondence would like a word. Any time you write a program, you are also writing a proof.

Mechanized proof checkers leverage this idea to enable users to specify formal proofs as programs.

sgeisenh··on Starting Your Computer Music Journey with Clojure and Overtone in Emacs
This is pretty cool. There is a nice history of functional programming in computer music and algorithmic composition. My first introduction to computer music was through [Nyquist][1] which uses an XLISP-based syntax, so this intro was a pleasant blast from the past. Having access to the whole Clojure ecosystem is also a huge boon.

[1]: https://en.wikipedia.org/wiki/Nyquist_(programming_language)

sgeisenh··on Swapping two Numbers without Temporary Variables
This example is kind of funny in a compiled language because a lot of modern compilers use a static single assignment (SSA) form as an intermediate representation. SSA effectively creates temporaries for each subsequent assignment operation. This helps with data-flow analysis but also makes it so that code like in the post can actually be less space efficient without optimizations in compiled languages.
sgeisenh··on The Code Review Pyramid
I think you're missing the point: it's incredibly hard to determine functional correctness of unreadable code.

So the first priority is getting the change to a readable state. I'm not talking about nits, I'm talking about minimizing the cognitive overhead to truly understand what the code is doing.

That being said, it is also easy to identify nits during this phase. In codebases that have collections of best practices, this often helps to ensure that the change is expressed in terms of a common vocabulary. Once this pass is done, the reviewer can usually better understand the intent of the changes.

sgeisenh··on CXX – safe interop between Rust and C++
There is a lot of code written in C++. For a lot of large companies, one of the impediments to migrating from C++ to Rust is the investment required to expose the existing C++ interfaces in Rust. There are also many open source libraries written in C++ that you can more easily call from Rust using this bridge library.
sgeisenh··on Ask HN: What books are recommended to learn the semiconductor industry?
Hard to answer this question well without a little bit of additional context. I'm very focused on the software side of things, so I am mostly familiar with resources that tackle how software interacts with various platforms and architectures.

I can recommend some resources in that vein (maybe they'll be useful if you/the reader have a software background):

The most frequently recommended book from a software perspective is "Computer Systems: A Programmer's Perspective" (http://csapp.cs.cmu.edu/3e/home.html).

For a nice gentle intro, you can also read "The Elements of Computing Systems" (https://mitpress.mit.edu/books/elements-computing-systems) that accompanies a course called "Nand2Tetris".

George Hotz also compiled a list of topics to cover to learn the computing stack from bottom-to-top (https://github.com/geohot/fromthetransistor).

These resources are mostly software-oriented, so they wouldn't give you much insight into modern chip fabrication, but if you're coming from a software background, may prove to be useful for building on what you already know.

sgeisenh··on Collapse of the Fern Hollow Bridge
The weird thing about it all is that this bridge is very heavily trafficked during rush hour. Occasionally, traffic even backs up to the bridge.

I'm really curious what could have happened to cause it to collapse so catastrophically when it withstood far more traffic just ~12 hours earlier.

sgeisenh··on Sonora: Python implementation of gRPC-Web built on top of WSGI/ASGI
gRPC is very opinionated. Protobuf allows some things that tend to be design mistakes (e.g. required fields). A lot of this has been corrected with proto3, with subsequent field behavior annotations described here: https://google.aip.dev/203

The whole of aip.dev is a collection of API design principles published by Google that are externally relevant. Many of the proposals pertain specifically to gRPC-style APIs.

I've personally found gRPC APIs to be pleasant relative to many HTTP APIs since the use of an IDL can be helpful when interacting with such APIs. I don't have enough GraphQL experience to make any conclusions on that comparison. But the sense that I get is that GraphQL may be more appropriate once you reach a certain scale but is probably overused when a simpler technology would suffice.

Disclaimer: I work for Google but the views I express are my own and not necessarily those of my employer.

sgeisenh··on Folly: An open-source C++ library developed and used at Facebook
The stdlib implementations of associative containers have serious drawbacks. At the very least, most projects should consider adopting absl::flat_hash_(set|map) and absl::btree_(set|map) (or similar replacements) over the stdlib containers.

I am also partial to explicit error handling over exceptions, and there is a lot to like about absl::Status (and absl::StatusOr).

Disclaimer: I work for Google but the views expressed are my own and don't necessarily reflect those of my employer.

sgeisenh··on Papers We Love
Really enjoy Corecursive. Thanks for all the work you've put into it. A really great resource for learning all about fascinating ideas and personalities in computing.
sgeisenh··on Tqdm (Python)
Came here to comment the same thing. Really awesome to see how the type system can be leveraged to produce syntactically lightweight abstractions.
sgeisenh··on One Reason Typeclasses Are Useful
Type classes are useful but can be overly restrictive as implemented in languages such as Haskell. In particular, Haskell prevents multiple implementations of a type class for a particular type (a property called canonicity). But there are lots of situations where there are many reasonable implementations of a type class for a particular type.

I hadn't seen a great type-safe way to support ad hoc polymorphism until I read about [modular implicits][1] in OCaml. In situations where there is a reasonable module that satisfies a specified signature for the type of an argument, the module can be inferred.

[1]: https://arxiv.org/pdf/1512.01895.pdf

sgeisenh··on Price increase on .io domains on January 1, 2022 (Renewal: $55.00)
Not for a startup, but .codes is pretty nice for personal or portfolio websites.
sgeisenh··on Understanding Python through its builtins
You often lose performance in traditional imperative languages when aiming for persistence.

When you have immutability guarantees (like in many functional programming languages like ML or Haskell) you can avoid making copies by sharing the parts of the data structure that don't change.

If this kind of thing interests you, you should check out Chris Okasaki's book "Purely Functional Data Structures".

sgeisenh··on Ship / Show / Ask: A modern branching strategy
TL;DR - Two sets of eyes is better than one.

One of the most important aspects of code review culture isn't really mentioned in the post: requiring at least one additional approval on a PR ensures that at least 2 people are familiar with a piece of code. This helps increase the bus factor on the project and ensures that knowledge transfer and developer velocity can be maintained.

Additionally, the dialogue that occurs during code review can serve as additional documentation into why certain choices were made. I use the blame layer all of the time to try to better understand the context of a particular piece of code. Being able to read through the review for the PR that contained a line of code is often incredibly useful for being able to gain context.

sgeisenh··on Boring Languages Are Underrated (2015)
I would like the definition of "boring".

Most of my day job is spent reading C++ (I write some, too) and it is more terrifying than boring. Understanding when certain errors can (and do) occur and when to optimize for performance over readability is really, really hard.

I believe that Rust, Go and TypeScript have gained a lot of popularity because they are boring to read. Even OCaml has gained a ton of popularity because it is boring to read.

C, C++, python and JavaScript: not boring to read, you constantly need to be on your toes.

sgeisenh··on Am I stuck in a local maximum?
> just hack away until it works, and fix it if it ever crashes.

This also makes collaboration really hard. Types are a form of documentation. But unlike comments, types are enforced by the compiler. Invariably, lots of comments in a codebase are wrong. Many of those probably started out correct but the code changed and the comment didn't.

sgeisenh··on An efficient way to make hash maps with insertion ordering
"ordered container" meaning that the container is ordered based on the objects it contains.
sgeisenh··on An efficient way to make hash maps with insertion ordering
> The most important thing is that there is some defined order. This makes it easier to debug, and reproducibility is just a very nice property. See https://en.wikipedia.org/wiki/Reproducible_builds Simple stuff like making golden output files for your tests becomes easier.

Relying on this type of behavior when it isn't required is somewhat of an anti-pattern. And can often lead to mindlessly copying the results of an implementation in tests.

A quick aside: any sort of generic ordered container that supports O(n) iteration must necessarily require O(n log n) work to construct in the average case. So the asymptotic complexity is necessarily the same as sorting the keys of a hash map with undefined iteration order to artificially create a defined order.

It isn't too hard to simulate the behavior of insertion order iteration by maintaining an array alongside the hash map. And surprisingly enough, space and runtime complexity is practically identical to containers that implement insertion order iteration ;-)

sgeisenh··on Idiomatic Rust? Implementing binary search (part 2)
This post covers it in good detail:

https://ai.googleblog.com/2006/06/extra-extra-read-all-about...

sgeisenh··on Apple employee group rejects planned return to the office
Individual contributor. A bit of a misnomer since once any project grows beyond a small handful of engineers the work becomes largely collaborative.
sgeisenh··on HN: The Good Parts (2016)
Maybe this is my inexperience with front-end design keeping a11y in mind: what about HN is inaccessible for visually impaired people? It is mostly plain-text so it is easy to resize. There is some low-contrast text but that can be adjusted in CSS with user styles. I haven't tried a screen reader but I imagine that it would work reasonably well. All not to mention that there are HN RSS feeds, so the content can be consumed in any way that a person might want.
sgeisenh··on Renaming Coq
Even if harassment isn't commonplace, hearing Coq pronounced can be jarring. It is less than ideal that you need to be mindful of how you use the name of a tool that is the gold standard for a particular niche.

Others posted similar things, but imagine that you're a female PhD candidate and your male advisor asks you: "How familiar are you with Coq?" or "Are you good with Coq?"

Sure, the advisor could have asked "How familiar are you with the theorem prover Coq?" but it shouldn't be necessary to do so.

It seems petty and childish to be considering a name change over this, but it is far from unprecedented (e.g. "Beaver College" changed their name to "Arcadia University" in 2001). Having a more utterable name can lead to more widespread use and discussion of the tool with laypeople.

sgeisenh··on Boston public schools suspend advanced learning classes
Different students have different needs. It doesn't make sense to provide the same experience to every student. Homogenizing the experience is a disservice to all students, not just the gifted.
sgeisenh··on Covid vaccination linked to 'substantial reduction' in hospital admissions
The problem is that if the vaccinated population carries the virus, then the risk of being infected increases for the unvaccinated population. It doesn't matter if the vaccine reduces the severity of the virus if you haven't received the vaccine.

On the other hand, if the vaccine reduces the transmissibility of the virus, then everybody collectively benefits from each additional vaccination.

sgeisenh··on Formalising Mathematics: An Introduction
https://en.wikipedia.org/wiki/Intuitionistic_logic

If you are familiar with "Classical" logic, constructive math omits the law of excluded middle (e.g. "A or not A" must be true). In ZFC, the axiom of choice is omitted.

This leads to proofs that are not only a verification of some idea but also gives you the mechanism to compute the evidence. This is often described as "the computational content of proofs" and is especially valuable in the context of the Curry-Howard isomorphism: for every proof, there is a corresponding program (and vice-versa). This is the basis for formal verification of constructive proofs. When creating a proof in Coq, you are actually writing the corresponding program. And you can even extract the program in another general purpose programming language (usually OCaml in the context of Coq, but Haskell is also supported).

sgeisenh··on The U.S.' vaccine rollout is world-beating
> Also the U.S. needs to be good at this because it's been so terrible at managing it otherwise.

Exactly. When you bungle the early response it increases the urgency for vaccine administration.

sgeisenh··on Google Common Lisp style guide
Obligatory disclaimer: comments are exclusively my own and do not reflect the views of my employer.

A lot of these rules exist for the purpose of having a consistent rule. With modern tooling, there is virtually no difference between tabs and spaces. What is important is to have some rule to avoid the constant bikeshedding that would occur if there wasn't one.

← PreviousPage 2 of 5Next →