HNHacker News
TopNewBestAskShowJobs

sgeisenh

413 karma · joined February 4, 2014

submissionscomments
sgeisenh··on Show HN: A pure functional programming language targeting decentralized systems
Cheap pure functions should rarely, if ever, be memoized. With a large space of inputs, it is usually much faster to simply execute the function body than to look up the memoized return value. Not to mention the added space complexity of memoization.
sgeisenh··on What to Know Before Debating Type Systems (2008)
Who said languages were only ever or the other?

All languages have some notion of static types and dynamic types. They're most easily bucketed by whether they consider more than one type.

C is statically multityped but dynamically unityped. Python is statically unityped but dynamically multityped. Haskell, since it uses lazy evaluation, is statically multityped and dynamically multityped.

The main issue with static unityping is that insufficient testing can easily lead to type errors in production (or worse). And static multitypes help static analysis tools reason about code more easily.

Introducing a new type that is intended for use in a specific context that can easily be tracked is tremendously useful when programming at scale.

sgeisenh··on So Long, Macbook. Hello Again, Linux
mpd is the single best music player for what you're describing. You can choose how you want to interact with it. And if you can't find an implementation you like, the API is simple enough you can write something yourself.
sgeisenh··on Voting Machine Used in Half of U.S. Is Vulnerable to Attack, Report Finds
I trust good digital voting systems more than a paper ballot.

Specifically, the system should be auditable in a way that makes it difficult to trace individual votes back to voters, but allows individual voters to verify that their votes are counted correctly.

There must be a good way to accomplish this while also addressing potential voter fraud. Does anybody know of any research in this area?

With paper ballots, I have no way of knowing whether or not my vote was counted correctly. And I find that really unsettling.

sgeisenh··on Getting 1Password 7 ready for the Mac App Store
This just reminds me how excited I am for passwords to be replaced. We shouldn't need a third party application as an authentication shim for every service that we use. The high lock-in on password managers is also unnerving.
sgeisenh··on Implementing Malloc: Students and Systems Programming [pdf]
The textbook is excellent and the course staff is almost always great at providing reasonable guidance. The earlier labs also do an excellent job of ramping up so that the increase in difficulty doesn't seem extreme. And being around dozens of other students in the same boat helps a lot, as well.

Several of the labs have a somewhat incremental process where you start out with an acceptable implementation and optimize in steps.

sgeisenh··on College Advice I Wish I’d Taken
I disagree with a good bit of this advice. And I suspect it varies with the discipline of study.

In a field like computer science, time is better spent working on personal projects, hashing out ideas with peers and exploring research opportunities than aspiring to get an A in every class. A's make for boring, one dimensional students. People who make priorities based on more complex factors than an arbitrary letter grade are preferable to interact and work with.

sgeisenh··on C99/C11 dynamic array that mimics C++'s std::vector
Parametric polymorphism is a powerful abstraction. Makes for much more readable programs than ad-hoc polymorphism a la vanilla C.
sgeisenh··on Carlsen–Karjakin World Championship
Rapid and classical are totally different beasts. Rapid is more fun to watch in real time, but doesn't usually produce high quality games. On the other hand, classical can often be miserable to watch, but typically yields games worth of study for years to come.

Watching computers is valuable to a point, but completely different from watching humans. The search space that humans can cover is much smaller, so the games end up being more positional, and easier to understand for a spectator. I wish that they would build a chess engine that emulated a human thought process so that it could be used as part of following a game in progress. The way they used the engine in the official world championship broadcast was frustrating. I don't care if white has a forced mate in 83 moves, I want to know how the position seems based on a shallower but more positional analysis.

sgeisenh··on Maine Ranked Choice Voting Initiative Approved
Any voting system that doesn't satisfy the Condorcet criterion gives what appear to be strange results.
sgeisenh··on Books Programmers Don't Really Read (2008)
CLRS is even great to skim. I always find it tremendously helpful to skim through when preparing for interviews. It provides a great survey of commonly encountered problems, so you can use it to diagnose your problem areas.
sgeisenh··on Netflix Now Only Has 31 Movies from IMDB's Top 250 List
Piracy and larceny are entirely different crimes. Nobody "stole" anything, in this particular situation. In order for something to be "stolen", the victim must lose something that they already had. You might try to argue that streaming services lost a sale, but they never had the sale and they make the process so arduous that they would never get the sale.

To be clear, I am not promoting piracy, it does pose ethical problems. The metaphor to stealing simply fails to illuminate any of them.

sgeisenh··on Racket – Lisp beyond Clojure
Have you tried learning an ML variant? SML and OCaml are great, and Haskell isn't too bad, either.
sgeisenh··on Music theory for nerds
You're correct. Most instruments that lack real time tuning capabilities use equal temperament tuning, which is a 20th century development.

Wind instruments are necessarily tuned to a specific key, due to the nature of the harmonic series. But most talented wind instrumentalists are capable of modifying pitch to be in tune in any key or chord.

Down the rabbit hole, read on at your own peril:

Even string instruments are tuned to a key, to a certain extent, due to the use of harmonics. It is possible to fine tune the pitch of a harmonic by shortening the string as usual, but it is exceedingly difficult, since shortening the string changes the position of the nodes (the spots on the string that must be touched in order to produce harmonics).

sgeisenh··on A Bit of Heresy: Functional Languages Are Overrated (2010)
How so?

Pattern matching makes for more readable code. And more readable code makes writing projects easier.

It is also more convenient to write code using pattern matching, but that isn't the primary benefit.

sgeisenh··on A Bit of Heresy: Functional Languages Are Overrated (2010)
The obvious example is a compiler.

Java, C, Python and Javascript all lack algebraic datatypes and pattern matching, which make writing a compiler much easier. There are many additional features of Haskell that make it especially good for implementing a compiler, if you know what you're doing.

I guess that's cheating because a compiler is just a function from source language to target language, so it is easily expressed in a functional language. But it does answer the question nicely.

sgeisenh··on On the Complexity and Performance of Parsing with Derivatives
Quite the memer, aren't you?
sgeisenh··on Stop saying learning to code is easy
I'm not sure I agree. The title doesn't match the content. The title contends that learning to code is hard, and I've never heard anybody disagree, learning to code is difficult. But then the content of the post contends that coding itself is hard. And I disagree. Programming difficulty is a function of a huge number of factors. Among which familiarity and experience are paramount. If you're writing a program that's familiar to one you've written before, programming is easy. If you're writing a complex new system with little to no precedent, programming is hard. There isn't a blanket statement that can be made about the difficulty of programming, it is all contextual.
sgeisenh··on Advanced programming languages (2009)
You might enjoy attending programming language events such as OPLSS (all of the old lectures are online and free to watch) or ICFP. You get to learn about lots of new research in programming languages, and often, you'll have an opportunity to explore programming languages from different perspectives, including logic and category theory.
sgeisenh··on Advanced programming languages (2009)
Have you explored languages with dependent type systems such as Agda, Idris, Coq, or Twelf?

You could also explore languages from an academic perspective. Benjamin Pierce has written several high quality texts about topics in programming languages.

sgeisenh··on ASUS delivers BIOS/UEFI auto-updates over HTTP with no verification
ASUS has a tendency to have very important reasons to update the BIOS. The last few Intel chipsets, they've had serious BIOS issues at launch that can cause tremendous headaches (random freezes, blue screen, etc.).
sgeisenh··on Facebook admits rogue employees may have shown bias against conservatives
That's literally the point I was trying to make. I don't think it's valuable to place media outlets on an isolated spectrum. Global information sharing is a reality. I gather my news from sources situated in various countries. And I judge their bias according to a somewhat global spectrum. The American spectrum is so perverted (mostly due to religious beliefs) that I often find it hard to place international sources within it.
sgeisenh··on Facebook admits rogue employees may have shown bias against conservatives
From the perspective of an American, the American MSM has a liberal bias. From the perspective of a citizen from most other first-world countries, the American MSM has a hardcore conservative bias.
sgeisenh··on Pittsburgh as a Startup
How do you conclude that Philadelphia is a much more interesting and hip city when compared to Pittsburgh/Boston?

I can't speak to Boston, but having lived in Philadelphia, Pittsburgh and a suburb of NY (Fairfield county CT), Pittsburgh has the most accessible cultural outlets. The local art scene is incredible, there is a top tier orchestra, the city is mostly bikable (with more protected bike lanes on the way), there are 3 professional sports teams that are within 20 minutes on public transportation of anywhere in the city. The list goes on. There may be more things to do in NYC than Pittsburgh, but I constantly felt like I had to pick and choose because it was just so expensive.

sgeisenh··on Model 3 Unveiling [video]
6 seconds is fast for a luxury sedan, but there are plenty of cars for less than $30k that will do zero-to-sixty in under 6 seconds. The Subaru WRX does 0-60 in under 5 seconds and costs ~$26k. That's the only 4 door car I can think of that's quite that quick, but there are plenty of performance oriented cars in that price range that are very quick.
sgeisenh··on JavaScript is the most commonly used programming language
By that argument, shouldn't assembly be the most used programming language on earth?
sgeisenh··on Chemical equation balancing: An integer programming approach
Yeah, I remember using gaussian elimination to solve them in high school chemistry. My teacher taught us some guess and check method when it was clearly just a system of linear equations. He gave us a "challenge" problem with more variables than normal; much to his chagrin, I popped it into my TI-89 and had a solution within a few minutes.
sgeisenh··on How Would You Do on the New SAT?
The SAT subject tests and AP exams are usually easier than the general SAT because they require a narrower area of preparation and are typically associated with courses that students have already taken. At least that was my experience taking them 6-8 years ago. I had to prep for the critical reading section of the general SAT to get a good score, but did almost no prep otherwise.
sgeisenh··on A brief introduction to C++'s model for type- and resource-safety [pdf]
Use of templates isn't frowned upon. TMP is frowned upon because usually the performance gains don't justify the loss of readability. It has been said many times in many ways: don't write code for yourself, write it for others.

Basically, Google has an enormous code base. Stylistic decisions should have semantic weight, but since everybody has their own style, it becomes challenging to understand the reasoning behind certain choices. When you have a standard, it means that you can read into some of the stylistic decisions sprinkled throughout the code.

Take for example, the use of pointer arguments for passing the addresses of results. The justification is that using a pointer is explicit and unambiguous. Non-const references have value syntax but pointer semantics, which can be confusing. Yes, this is contrary to some of the core values behind C++ but Google felt that the improved readability was worth that dissonance.

sgeisenh··on Netflix Is Now Available Around the World
There are fairly strict regulations concerning how insiders are able to trade, legally. If an insider learns of information that can potentially influence stock price, they may only execute trades as part of a preexisting plan or agreement. For example, an insider can continue purchasing shares as part of a stock or option purchase plan. Or an insider can continue selling shares as part of a retirement preparation plan.

Additionally, insiders are usually required to report any trades of company stock that they make.

← PreviousPage 3 of 5Next →