HNHacker News
TopNewBestAskShowJobs

alecthomas

464 karma · joined March 2, 2008

http://twitter.com/alecthomas http://swapoff.org http://github.com/alecthomas alec@swapoff.org

[ my public key: https://keybase.io/alec; my proof: https://keybase.io/alec/sigs/EwhDB5ZFYHetGQT4QBxryMKudydFlHx6vfI2ZbYaXTY ]

hnchat:M7diobfazxWsK0TZ9aVm

submissionscomments
alecthomas··on We’re a Lot Better at Fighting Cancer Than We Realized
It is neither harsh nor unfair, it's reality. Your response is a generalisation. Perhaps you've had a great experience in the past that leads you to believe it to be universally true.

But not all doctors do care. I lived in the US for four years and we had a child while we were there. During that process we encountered both an obstetrician and a paediatrician who cared very little. The latter in particular.

Different people are motivated by different things. Some are motivated by wealth, some by prestige, some by compassion, some just by having a stable job. Doctors are people. Particularly in an industry where you can earn a great deal of money, motivations get skewed.

All that said, the parent comment is also a generalisation. People do care, there are some fantastic, compassionate people working in medicine in the US.

alecthomas··on Ask HN: What's the worst piece of software you use everyday?
This is an astoundingly accurate comment.
alecthomas··on Instrumentation in Go
FYI Chroma is based on Pygments, not highlightjs.
alecthomas··on Ask HN: What's your quarantine side project?
I've been experimenting with a programming language[1] on and off. The goal is to target the Go runtime, though I'm mostly still playing around with concurrency options.

[1] https://github.com/alecthomas/langx

alecthomas··on Making Rust as Fast as Go
This is not accurate. [1]

When compiled on Linux for Linux, Go will use libc and natively call NSS.

When cross-compiling to Linux from another system, Go requires (mostly) CGO to be disabled and a subset of NSS will be implemented in Go. Native NSS modules will not work.

[1] https://github.com/golang/go/issues/24083

alecthomas··on Why I’m Leaving Elm
He mentions custom elements here[1]. I don't speak Elm, so I'm not sure if it's what you're referring to.

[1] https://lukeplant.me.uk/blog/posts/why-im-leaving-elm/#id14

alecthomas··on Working with Errors in Go 1.13
github.com/pkg/errors is a popular solution to this problem
alecthomas··on The V language now compiles itself in 0.09 seconds
Agreed, that is much more idiomatic.
alecthomas··on The Rosie Pattern Language
That should be the front page...
alecthomas··on Ask HN: Why doesn't Google punish medium?
I've just been through exactly what the grandparent alludes to. These clip art sites require signup and a monthly subscription to download the "free" content. This is extremely misleading.

Here's an example: https://www.dreamstime.com/animated-bat-monster-character-sp...

alecthomas··on Go 2 Draft Designs
How about the following:

  contract Addable(t T) {
  	t + t
  }

  func Sum.<T Addable>(x []T) T {
	var total T
	for _, v := range x {
		total += v
	}
	return total
  }
It has the nice property that it's somewhat analogous to type conversions, the grammar should be unambiguous, and it's much less visually confusing than re-using parentheses IMO.
alecthomas··on HashiCorp Consul 1.2: Service Mesh
Agreed, it's a great format. I wish it would kill YAML.
alecthomas··on How not to replace email: lessons from Google Wave
I know it's easy for me to say in hindsight, but I think that as the CEO Eric Schmidt's big failure with Wave wasn't "I should have cancelled it sooner" but "I should have encouraged a better, more focused product".
alecthomas··on How a fix in Go 1.9 sped up our Gitaly service by 30x
That looked like a very frustrating exchange.
alecthomas··on Apple faces lawsuits after admitting it slows down aging iPhones
Because nothing was wrong with the batteries as far as we could tell, and Apple "support" didn't mention anything. That's the whole point of these law suits. Apple didn't tell consumers that a) their batteries were degraded or b) that performance would be dialled back to compensate. If people were told they would have just swapped batteries, as we would have. I'd much rather pay $150 for a new battery than $1000 for a new phone.

Prior to iOS 11 they still lasted all day, no random shutdowns, no issues at all. After iOS 11 the phone was slow as hell and the battery drained extremely quickly... the opposite of what you would expect given the recent revelations, but that's what we observed.

alecthomas··on Apple faces lawsuits after admitting it slows down aging iPhones
Agreed, there is no decent choice :(

I would have happily kept using the iPhone 6 indefinitely. And given the option I would have bought another battery.

alecthomas··on Apple faces lawsuits after admitting it slows down aging iPhones
You seem to be aggressively agreeing with me that being forced to upgrade for effectively no real reason is ridiculous?
alecthomas··on Apple faces lawsuits after admitting it slows down aging iPhones
My wife and I both just upgraded our iPhone 6's because they became unusably slow after iOS 11. Prior to the upgrade they had been running fine with no issues.

We tried many things including disabling all background app usage, full wipe and restore, etc. My wife eventually took hers into the Apple store and they said they didn't know why it was slowing down but that she shouldn't have upgraded and that there was nothing they could do.

So faced with unusably slow phones, and no resolution, what other choice is there? We both upgraded. She bought an iPhone X and I bought a Pixel 2 XL. We would have both been happy sticking with our iPhone 6's as they were under iOS 10.

The crux of the matter is this: our phones were fine before iOS 11, then unusably slow. We upgraded because we were forced to (unknowingly at the time) by a software update.

alecthomas··on iPhone X – Not Yet
Yep, same here. It's a dumpster fire. I just ordered a Pixel 2 XL. Fingers crossed...
alecthomas··on Ren: a lightweight data-exchange text format
Ironically, that is exactly why JSON doesn't have comments: https://plus.google.com/+DouglasCrockfordEsq/posts/RK8qyGVaG...
alecthomas··on Watch All the Apple TV Aerial Video Screensavers (2015)
Yep, 11GB.
alecthomas··on Chroma – A General purpose syntax highlighter in Go
Looking at the Sublime Text 3 documentation [1], I see very little functional difference to Pygments. In fact, they seem remarkably similar. Pygments models a state machine via regex matching and actions, including pushing/popping state, sub-lexers, and so on.

What is the "richer highlighting and semantic information" to which you refer?

[1] https://www.sublimetext.com/docs/3/syntax.html

alecthomas··on Chroma – A General purpose syntax highlighter in Go
Nice! I have been meaning to look into integrating Chroma with Blackfriday. The plugin API looks really nice.

Note that lexers.Analyse() will almost always fail at the moment, as I've only written support for a couple of languages.

alecthomas··on Chroma – A General purpose syntax highlighter in Go
I would say almost zero is algorithmic, as Chroma very closely adheres to the design of Pygments.

The improvement is due to two factors, with the first being by far the biggest factor:

1. Hugo no longer has to call an external `pygmentize` tool for every highlight. This removes the overhead of the fork/exec, as well as the (not-insignificant) overhead of the Python interpreter starting up.

2. Go is generally a faster language than Python.

The caveat with 2 is that Python can spend large amounts of time in C, eg. doing regex matching.

alecthomas··on Our Copyfish extension was stolen and adware-infested
"Note that the bitly link was not directly visible in the phishing email, as it was an HTML-email. That is another lesson learned: Back to standard, text-based email as the default."
alecthomas··on Interactive Go REPL
Unfortunately, gore seems to be abandonware (last commit was a year ago).
alecthomas··on Ask HN: How do you version your data?
I use protobuf schema evolution. It's the same approach that Google use (naturally), and Facebook (with Thrift), among others.
alecthomas··on Channels in Golang
Mesos was partially developed at Twitter, and was well on the way to powering most of their infrastructure when I left 3 years ago.
alecthomas··on Do not change Linux files using Windows apps and tools
Out of curiosity, how is the Linux integration? Does it feel like native, or is it disjointed like Cygwin always has?
alecthomas··on Ask HN: Which Go web framework should i use in 2016?
I don't know whether those are high level frameworks, but if they are, a Go equivalent is probably Revel [1]

1. https://revel.github.io/

← PreviousPage 4 of 7Next →