HNHacker News
TopNewBestAskShowJobs

alexhutcheson

3,780 karma · joined February 17, 2013

Nothing I post reflects the views or policies of my employers, past or present.
submissionscomments
alexhutcheson··on Bill Joy's greatest gift to man – the vi editor (2003)

    alias vi='emacsclient -t -a ""'
Then whenever you run 'vi' it will create a new frame on an Emacs instance that's running as a server[1]. If there's not an Emacs server already running, then it will start one for you, so the first invocation will be slow, but every subsequent invocation will be fast. No need to change your muscle memory for this particular case.

[1] https://www.gnu.org/software/emacs/manual/html_node/emacs/Em...

alexhutcheson··on Initial Impressions of WSL 2
> One thing I really like is that the Windows version of CLion will use SSH to connect into your WSL installation and use the Linux toolchain. So you can develop both Linux and Windows applications using the CLion GUI IDE on Windows, it's quite seamless.

Tramp[1] does this for Emacs. You can run Windows GUI Emacs and use SSH or another protocol to edit files and run commands within the WSL installation. It's pretty seamless.

[1] https://www.gnu.org/software/emacs/manual/html_node/tramp/in...

alexhutcheson··on Awk in 20 Minutes (2015)
There are two use-cases I’ve run into where awk really shines, and is hard to replace:

1. Writing scripts for environments that only have Busybox. Technically you can write scripts in ash, but I don’t recommend it for anything beyond a couple lines. It’s missing a lot of the features from Bash that make scripting easier, and it’s easy to get mixed up if you’re used to Bash and write things that don’t work. Awk is the best scripting language available, even if you’re doing things that don’t exactly match what it was designed to do.

2. Snippets that are meant to be copy+pasted from documentation or how-to articles. In that case, it’s often not easy to distribute a separate script file, so a CLI “one-liner” is preferred. You also can’t count on Perl, Python, etc. being available on the user’s system, but awk is pretty universal.

For most other cases, I tend to create a new .py file and write a quick Python script. Even if it’s a little more overhead, it helps keep my Python skills sharp, and often it turns out that what I actually want is a little more complicated than my initial idea anyway.

alexhutcheson··on Lithuanian capital to be turned into vast open-air cafe
Agreed that’s the better metric, but there is a long lag before mortality statistics are complete in most places. Most jurisdictions report a lower number immediately, and then continue to revise it up for weeks or even months. If you don’t adjust for this it will look like the jurisdictions that complete their reporting most quickly are the hardest-hit.
alexhutcheson··on Better C – A subset of D Programming Language
Fast compile time on large projects is really hard for C and C-compatible languages due to the preprocessor and #include. Not an issue if you're comparing compilation for a single file, but it turns into a substantial fraction if your compile time when that file transitively #includes 10s or 100s of headers.
alexhutcheson··on The Anti-Amazon Alliance
> I’ll make a trip to a GNC to buy ON protein powder.

costco.com has this at a good price with fast free shipping: https://www.costco.com/optimum-nutrition-gold-standard-100%2...

alexhutcheson··on Benchmarking C++ Allocators
pizlonator is saying that the overhead of the function call itself (the “call” instruction itself) doesn’t matter relative to the body of that function. The body of the function still matters a lot.
alexhutcheson··on Monorepoize – Bash scripts for creating a monorepo out of smaller repos
Repo[1] is another tool for this, which is pretty well-tested and widely used.

[1] https://gerrit.googlesource.com/git-repo/

alexhutcheson··on A-Shell: Terminal for iOS
This is extremely cool.

Is there any documentation on what shell syntax this supports? I assume it's not running a standard shell like Bash or zsh.

Edit: https://github.com/holzschu/ios_system/blob/master/README.md confirms its not running sh, bash, or zsh, and has some additional details on the available commands. I still think it would be nice for this to be more explicit, but the information is out there.

alexhutcheson··on Teenagers are better behaved and less hedonistic (2018)
Yeah, it was a short-hand way to convey the categorization and could have been more more precise. In reality, every region has its own culture that is somewhere along this spectrum.

I’d also note that I think “school/university quality” != “a high pressure environment”. There are plenty of places that have one but not the other. In particular, there are lots of places where high schools are providing excellent education and public university options are good, but students don’t feel like they are in a pressure cooker.

alexhutcheson··on Teenagers are better behaved and less hedonistic (2018)
NYC, SF, Silicon Valley, Seattle, LA, etc. are all full of successful people who went to public universities that didn’t require crazy high school credentials to get into.
alexhutcheson··on Teenagers are better behaved and less hedonistic (2018)
As I mentioned in a reply to a peer comment, the environment you describe is still the norm in most of the US. By contrast, there's a very high-pressure atmosphere in many of the "superstar" metro areas of the US. Many of us here on HN grew up in other places and moved to these "superstar" metro areas, so the contrast appears even starker that it would be if we were comparing the same places over time.
alexhutcheson··on Teenagers are better behaved and less hedonistic (2018)
FWIW, this isn't so much a story of "being young in 2020" as it is "being young in 2020 in the hyper-competitive culture of major coastal metro areas of the US". This phenomenon is actually pretty unique to a handful of metro areas, which happen to be over-represented on HN. In most of the country, bright high school students are focused on getting into their state's flagship public university, and exceptionally successful ones might be focused on getting into the honors programs at those universities. Those students might buff their resume by participating in the "National Honor Society", but they're not doing anywhere near the amount of credential-buffing described above.

Unfortunately, if you live somewhere where this is the culture, it's very difficult to opt-out. Parents don't have full control, because students absorb expectations from their peers and their peers' parents as well. Everyone agrees that the situation is out of control, but no one can "unilaterally disarm".

alexhutcheson··on Why did Slack win out over IRC? (2018)
Slack wasn't competing with IRC. By the time Slack launched, IRC usage within companies was a very tiny slice of the market, mainly by very technical people. Slack was competing with Microsoft Lync, Google Talk, HipChat, Campfire, and the various other "IM for businesses" software products that were available in 2013.

Yes, Slack borrowed some of the better features from IRC, which helped drive its popularity, but very, very few companies that are currently paying for Slack would have considered IRC to be a reasonable alternative.

alexhutcheson··on Disabling Snaps in Ubuntu 20.04
Cinnamon is pretty good.
alexhutcheson··on Disabling Snaps in Ubuntu 20.04
Neither Debian nor GNOME are FSF projects.
alexhutcheson··on Wealthy mortgage borrowers face cold shoulder from lenders
Yeah my argument was that all the people who are buying those homes are significantly wealthier than the Bay Area median household.
alexhutcheson··on R 4.0
R's killer app is interactive analysis. Import some data, graph it, look at the graph, do some clean-up based on what you noticed, graph it again, run some summary statistics, fit a model, graph the residuals from the model, etc. It's amazing for this - arguably the best available open source software for this type of task. Comparable tools for this would be MATLAB, Stata, Mathematica, etc. (all with strengths in slightly different domains).

It's comparatively very weak for "software development" - writing libraries, long-running programs, etc. Even data cleaning/data analysis scripts are a headache beyond a certain length or number of contributors. People tend to have the same complaints about MATLAB, Stata, and Mathematica.

These are related - a lot of the features that make interactive use concise and easy to pick up end up being kind of a mess to handle consistently in a larger program.

Python is at a different point on this spectrum. It's moderately good for interactive analysis, but there are still a lot of tasks that are concise and easy in R that require a bunch of verbose object manipulation in Python. This is a choice - "explicit is better than implicit", etc. Python is also moderately good for "software development" - it has enough consistency and code structuring features that you can write libraries, systems, and infrastructure while collaborating with a small number of other people pretty easily. You still hit a point where Python's dynamic features make things like refactoring harder than you'd like, but it's usable.

alexhutcheson··on Wealthy mortgage borrowers face cold shoulder from lenders
Source? It would be surprising to me if lenders were regularly approving loans where the mortgage payment alone (not including insurance or taxes) was >=48% of monthly income. There are certainly lenders that will approve mortgages with high ratios relative to salary (due to the value of bonuses and equity comp), but the $125,000 figure is all-in income, so this isn't relevant.

A 40% ratio for the $125,000 household would give you a maximum purchase price of $830,000, which would be a conforming loan in the Bay Area, not a jumbo one.

alexhutcheson··on Wealthy mortgage borrowers face cold shoulder from lenders
People buying houses for $1 million are wealthy even by the standards of the Bay Area. Median household income in the San Jose-Sunnyvale-Santa Clara metro area is ~$125,000[1]. A traditional $1 million mortgage would require a $200,000 down payment, and ~$5000/month. The monthly payment alone would be 48% of the combined monthly pay for everyone in the household in a household making the median. House purchases at this price are only possible for households that are making significantly more than the metro-area median.

[1] https://data.census.gov/cedsci/table?q=United%20States&tid=A...

alexhutcheson··on Wealthy mortgage borrowers face cold shoulder from lenders
The median sales price for a house in the US is $327,000[1].

People buying houses for $1 million are wealthy by any standard.

[1] https://fred.stlouisfed.org/series/MSPUS

alexhutcheson··on Comparison of C++17, Go, and Java for a next-generation sequencing tool
Try absl::flat_hash_map and/or F14FastMap[2].

[1] https://abseil.io/docs/cpp/guides/container#hash-tables

[2] https://github.com/facebook/folly/blob/master/folly/containe...

alexhutcheson··on Comparison of C++17, Go, and Java for a next-generation sequencing tool
It’s unfortunately not just ABI, but also API. The standard specifies that you can get iterations to specific buckets in O(1)[1], and also specifies bucket_count(), max_bucket_count(), bucket_size() (which is specified to be O(n)), and bucket(). Those functions and their specified performance make it effectively impossible to implement a standards-compliant std::unordered_map without using separate chaining.

[1] https://en.cppreference.com/w/cpp/container/unordered_map/be...

alexhutcheson··on Jeff Bezos has returned to day-to-day management of Amazon
Walmart at least has a filter you can enabled for "Retailer: Walmart" to remove the third-party stuff from search results.
alexhutcheson··on Lambda School lays off 19 employees
Lambda’s programs are 9+ months.
alexhutcheson··on Google Duo rolls out realtime AV1
12 now: https://twitter.com/sanazahari/status/1243397017868460033
alexhutcheson··on A Taste of GPU Compute [video]
The official docs are pretty good. This is probably a good starting point: https://devblogs.nvidia.com/even-easier-introduction-cuda/

Nvidia also sponsored a Udacity course, but I don't have any direct experience with it: https://developer.nvidia.com/udacity-cs344-intro-parallel-pr...

alexhutcheson··on Ask HN: Resources to grok Emacs and use it well?
FYI - the Emacs binary that's bundled with pre-Catalina versions of macOS (as /usr/bin/emacs) is 22.1, which is an ancient version from 2007. Apple kept that version because it's the last one that was released as GPLv2, and they've avoided bundling anything that's licensed GPLv3. This is the same reason that macOS includes an ancient version of Bash, and why they're switching to zsh as the default login shell.

Because it's so old, no one bothers to maintain compatibility with it anymore, and almost all modern elisp will break in some way if it's loaded in 22.1. Somewhat fortunately, it seems like Apple has removed this emacs binary from Catalina, so it won't be an issue on future versions of macOS.

To get a modern Emacs: https://emacsformacosx.com/ has binary builds of the official Emacs releases, with some additional scripts that let you launch it from Launchpad, etc.

alexhutcheson··on Ask HN: Resources to grok Emacs and use it well?
Mapping Caps Lock to be "Control" helps a lot with this. Reaching down to the bottom row for Control all the time is terrible and should definitely be avoided. Using Alt as Meta has been less of an issue for me since I can easily hit it with my thumb without moving too much.

evil is also great, and it might actually be the most popular option for new users at this point, thanks to Spacemacs and Doom.

alexhutcheson··on Emacs: The most successful malleable system
You could probably use Edwin[1][2] as a starting point. MIT Scheme is close enough to Racket that you could probably do some automated source-to-source translations, or use "#lang sicp"[3] or "#lang r5rs"[4] within Racket.

Haven't tried it, but it would be interesting.

[1] https://www.gnu.org/software/mit-scheme/documentation/mit-sc...

[2] https://github.com/jaseemabid/mit-scheme/tree/master/src/edw...

[3] https://docs.racket-lang.org/sicp-manual/SICP_Language.html

[4] https://docs.racket-lang.org/r5rs/r5rs-mod.html

← PreviousPage 8 of 29Next →