HNHacker News
TopNewBestAskShowJobs

dgreensp

3,476 karma · joined April 10, 2007

David Greenspan
submissionscomments
dgreensp··on Ajit Pai is right
I forgot another: I think at one point the author attributes the uproar over net neutrality to “the media.”
dgreensp··on Ajit Pai is right
Exactly. This is like listening to Trump talk about Obamacare. Oh, he agrees with the principles — more than the next guy! — but we’ve taken a massive step in the wrong direction and need to repeal it.

I lost track of all the slimy rhetorical techniques in this article. FUD about the “cost of regulations” by talking about restaurants in SF. Saying that T-Mobile’s rise was good for competition, so I guess zero-rating is a good thing after all (without arguing that it was specifically zero-rating that led to T-Mobile’s rise). Saying the “only future we have to fear” is one where these regulations stay... really?? Just because he has a hand-wavy argument they might be bad, or at least unnecessary?

Oh, let’s not forget, the argument that regulations as written don’t eliminate all possible ways to violate the spirit of the law, so they don’t do any good at all. Law can be updated. If there was a legal loophole that let people murder each other, would we say the laws against murder are pointless?

Zero-rating is not aligned with net neutrality, even if it’s currently allowed by a loophole, and if it benefits some customer or some company in some way. Hemming and hawing about it is just kicking up smoke.

The author wants to drive a wedge between the positions of “net neutrality” and “ISPs are telecommunication carriers,” and I don’t see it. Or he wants them to be neutral carriers but not have it be legally enforced. Or first repeal the current enforcement, and then talk about enforcing it some other way. Slimy, slimy, slimy.

dgreensp··on Why some men won't dance
“I’m going to go to the middle of the room and improvise some poetry, just say whatever I’m moved to say in the moment, maybe riff on some motifs I’ve adopted or invented on previous such occasions. Want to stand next to me and do that too, at the same time? What? You don’t? Why not? Just be loose. Oh, some music is coming on. Just sing whatever pops into your head. Sing it confidently. No one’s listening.”
dgreensp··on Carp, a compiled Lisp with type inference and a borrow checker
Exactly. Someone who doesn’t see the value in a GC-less language is not going to see the value here.

I personally think “functional persistent” data structures, as a language default, trade a lot of runtime performance in order to achieve some guarantees like thread-safety and functions not having side effects. Every mutation to every array or dictionary is treated like a transaction in a MVCC database, with the garbage collector in charge of cleaning up the records of every past version that wasn’t actually necessary to keep around, because no multiversion concurrency was actually necessary in that case. I encourage languages to experiment with other methods of achieving similar benefits.

I think limiting side effects and shared mutable state is very important, but at a local level, imperative code that mutates a data structure is highly readable and performant. Certain algorithms practically require it. Certain hardware practically requires it.

Functional languages let you think in terms of abstract “compound values,” but in practice these are backed by tons of little heap-allocated objects, partly so that lots of sharing can be done when the data structure is copied on every change.

dgreensp··on Ford Pilots New Exoskeleton to Help Lessen Chance of Worker Fatigue, Injury
From what I understand, Tesla is working its way towards this. And there are already lots of sophisticated robots used in car assembly.
dgreensp··on Ford Pilots New Exoskeleton to Help Lessen Chance of Worker Fatigue, Injury
I actually think it owes to the fact that it was never reasonable for any worker to work “overhead” all day, unassisted; the human body can’t take it.

Working with your arms outstretched in front of you, Minority-Report-style, has been determined to be not feasible due to fatigue, so how is working overhead reasonable? I’ve never been in a car factory or on an assembly line, but from an armchair it sounds bound to lead to a lot of strain.

Why not have workers lie on their backs on carts or something?

dgreensp··on Fast and precise type checking for JavaScript
I used both Flow and TypeScript extensively at my last job (coda.io), and through a series of thoughtful discussions and debates, we chose to migrate to TypeScript, even though we had already started using Flow in parts of our codebase.

Microsoft did a really good job putting resources behind TypeScript, making sure tooling and IDE integrations are good, and generally getting a ton of momentum going. TypeScript is fast-moving, with bugs fixed and features added at a high rate, and the quality of discussion on the issue tracker is high. Flow, in comparison, was not evolving as fast.

Flow touts global inference, which I think means better types when you don't necessarily have annotations on module boundaries, but I mostly care about what's possible in a greenfield or well-annotated codebase.

Flow deserves a ton of credit, and Microsoft probably studied it in detail, but I think the advantages are overblown at this point. Take the soundness thing. TypeScript added null-strictness a while ago, and recently they improved function type polymorphism. The reality is that both type systems have limits and you sometimes need to type something imperfectly or use an escape valve ("any"). In most cases, however, TypeScript gives you more sophisticated tools to construct the types you want, so you actually get better types. Maybe TypeScript lacks a theoretical underpinning for soundness, but there's no reason it can't continue to get "more and more sound," with it harder and harder to find good examples of unsoundness.

dgreensp··on A 12pt Font Should Be the Same Size Everywhere (2012)
Exactly. It doesn’t make sense to talk about this topic without reading and understanding that spec first. The “px” unit has already been virtualized. It’s already based on visual angle (or the idea of visual angle), and notably not absolute display distance (because of TVs, projectors, and now VR goggles).
dgreensp··on A Simply Arited Concatenative Language
I would write “aritied.” The article also uses the word “simpliest,” and there are a few other language oddities.
dgreensp··on Lucky, an experimental new web framework by thoughtbot
Crystal looks like a cool language, but I think it only runs on the server. So after saying Elm is front-end-only, the “holy grail” is back-end-only? It’s not obvious which is preferable.
dgreensp··on Q&A: Douglas Hofstadter on why AI is far from intelligent
Agreed, this seems like a very realistic possibility.

I can see it now, researchers claiming that computers are actually now 1% better at warfare than humans, on the standard corpus of example scenarios. And then someone decides it would be remiss to not let the computers make the decisions.

dgreensp··on Q&A: Douglas Hofstadter on why AI is far from intelligent
It would take a lot for a computer to write a beautiful novel, say. But not to appreciate and create beauty in other ways. And I really think computers could write some excellent jokes along the way to becoming more human. Pretty much anything they learn to do can be used for comedy. Physical movement with “character” gone wrong leads to physical comedy. Common-sense knowledge leads to common-sense comedy (like the joke about the elephant leaving tracks in the butter dish, which kids of a certain age find funny but adults seem to have grown out of).
dgreensp··on Q&A: Douglas Hofstadter on why AI is far from intelligent
Also, what does it mean for intelligent computers to “leave us in the dust,” when we are “like fleas to them”?

1. They are so much more intelligent than us as to render us insignificant — because we all know that intelligence is what makes people significant and worthy.

2. They are better humans than humans, not just more intelligent in a problem-solvy way but more moral and compassionate as well; truly “better” (there has been sci-fi about this rather fanciful but easily written scenario)

3. We build “wilier” machines/software that, given the power to do so, can out-strategize us and win in battle, or outcompete us in the economy. This is quite possible. Obviously we should limit the power (physical, legal, etc) of this software. There are real legal and economic issues here — not to mention futuristic disaster movie plots that could become real — but not moral ones.

4. We build artificial life that’s way smarter than us, and it decides it doesn’t care about us because we’re such dumb simpletons. The same way we don’t care about bugs, presumably because they’re dumb, and not savvy wisecrackers like the main character in Bee Movie, voiced by Jerry Seinfeld. But why would we expect intelligent software to decide to care about us, anyway? To judge us and find we have merit? If someone told me they made a machine with a concept of what other beings are worth and it found me unworthy, based on reasons such as its being waaay more intelligent, I would not be surprised or impressed, or more than mildly insulted.

Edit: I guess people are worried about some combo of 2/3/4, where computers whose judgment we agree with basically say humans are lesser beings — like bugs — and we think about it and are like yeah, you’re right. Or computers are so human we are compelled to give them the rights of humans. I’m just not sure that actually makes sense, or at least it will take decades with many intermediate stages to talk about first.

dgreensp··on Q&A: Douglas Hofstadter on why AI is far from intelligent
“Embodiment” is most important for 2, and to fool humans into thinking you are a real human (as in the Turing test), able to talk about the human experience and relate to other humans.

Animals (including humans) are born with a version of 3 (and 4). Emotions are simple. Thought-level nuance is learned over time, but data learned by one android (or whatever) can be shared. Also, children are able to learn from comparatively few data points, and computers are beginning to do this too (see “one-shot” learning, learning from one occurrence, like the way kids sometimes pick things up).

If you make a child android that looks and acts like a child, people will read to it and play with it; there are movies about this! :)

dgreensp··on Q&A: Douglas Hofstadter on why AI is far from intelligent
I think it’s really important to distinguish

1. pure problem-solving (chess, go) from

2. competency of behavior in the world (vision, navigating a maze), from

3. universal cognitive-emotional life (getting frustrated trying to accomplish a goal and trying a different approach; having competing drives that form the basis for goal-setting, like hunger, boredom, and self-preservation), from

4. more arbitrary-seeming, human-like cognitive emotions, like humor and beauty.

You can have 1 and 2 without anything directly resembling human intelligence, and 3 with animal-like intelligence, or you could make something completely alien. An appreciation of humor and beauty would be a great way to demonstrate you’ve made something like a virtual “human mind.”

There’s no reason computers couldn’t be better at all of these things, including writing better jokes. There’s a funny blog post somewhere about the idea of a computer writing superhuman-level funny jokes; I wish I remembered where!

dgreensp··on CKEditor 5: New approach to rich text editing on the web
Makes sense.

There is a route you can go that doesn’t use contenteditable, except as a small box at the cursor position to handle IME; it’s what Google Docs does. At my most recent job (stealth start-up) we built an editor like this, painting our own selection and everything. It makes certain things easy or possible — custom text wrapping, tab stops, custom handling of cursor and selection with regard to embeds. It doesn’t get you very far on mobile web, though.

dgreensp··on CKEditor 5: New approach to rich text editing on the web
It still uses contenteditable, though, like Quill and ProseMirror, which also use a custom data model and ops. It sounds like CKEditor has caught up to have this kind of architecture too. Not to trivialize this accomplishment. All three are impressive feats of engineering and design.
dgreensp··on ProseMirror 1.0
Can you comment on what you figured out? Was it about making functional/persistent data structures performant enough, or something else?
dgreensp··on Three Paths in the Tech Industry: Founder, Executive, or Employee
At one level, “idea person” is a misunderstanding of the founder’s role; founders must execute, all day long. It’s not just the programmmers who “implement,” either.

At another level, I’ll admit that most founders I’ve worked for have excelled more at promoting their ideas, raising money, and hiring talent — top talent, no small feat! — than product ownership. In this case, the lieutenants who make the gears mesh and not jam are the heroes to me.

dgreensp··on It’s time to kill the web app
Yes, I agreed with the entire article as well. I didn't see anything controversial or exaggerated about it.

Edit: Ok, maybe I could have predicted that lines like "HTML 5 is a plague on our industry" would ruffle some feathers. I guess I like a little snark in my criticism.

dgreensp··on iPhone X
These approaches assume you have access to the trained neural network weights, i.e. that it's a "white box".
dgreensp··on CSS in JavaScript is like replacing a broken screwdriver with your favorite hammer
The arguments don't pertain directly to writing CSS in JS, in my mind. Writing CSS in JS doesn't force you to couple your styles to your components, or reuse code or not reuse code, or be consistent or inconsistent with your styles. If anything, it gives you more options.

The appeal of CSS in JS to me is one less language to think in -- one less syntax to worry about and format and lint and forget semicolons in. Also, modules and defining constants. Most web developers seem to use a compile-to-CSS language and a module system these days anyway, rather than vanilla CSS.

dgreensp··on The Printer We Need
I have a (color) Laser Jet Pro at home. It jams fairly often, and if I don't turn it off it'll wake me in the middle of the night loudly "calibrating." Other than that, it's been quite a good workhorse for several years and continues to meet my needs. I had some issues printing over wifi at first, but wifi printing with it has pretty much just worked for a few years now. It's still a large, heavy, fragile-seeming piece of office equipment.
dgreensp··on JavaScript string encoding
Indeed!

I didn't know Plan 9 was behind UTF-8. :)

We've come a long, long way since the 90s and even the 00s. It's shocking and gratifying how well emojis work online. A great motivator for Unicode support, too. :)

dgreensp··on JavaScript string encoding
Exactly; a string is not conceptually a "series of bytes" -- yes, there are languages that have a series-of-bytes type called "string" for historical reasons, but that's irrelevant to how to think of the string type in JavaScript, or in an ideal world.

One level of abstraction that works is to think of a string as a series of integers (which may be much larger than 65535) representing code points. Whether your VM uses a fixed-length or variable-length encoding to encode this series of integers should be irrelevant, aside from performance and memory consumption concerns. JavaScript's "charAt" and numeric indexing of strings violate this abstraction, making them not useful in Unicode-aware code. Of course, the "series of code points" abstraction has limits too, since what we think of as a single "character" can be composed of multiple code points, which calls into the question the whole concept of a "character," which is fuzzy in the first place.

This is all massively inefficient, of course. Most strings are representable as UTF-8, and using two bytes to represent their characters means you are using more memory than you need to, as well as paying an O(n) tax to re-encode the string any time you encounter a HTTP or filesystem boundary.

There's nothing stopping us from packing UTF-8 bytes into a UTF-16 string: to use each of the two bytes to store one UTF-8 character. We would need custom encoders and decoders, but it's possible. And it would avoid the need to re-encode the string at any system boundary.

This line of thinking does not make sense to me, and I'm not sure what scheme is being proposed. First of all, "most strings" are representable as UTF-8? All strings are representable as UTF-8. And if you are reading data from a UTF-8 source and you don't want to pay the time and memory cost of decoding it and re-encoding it in a less space-efficient code, leave it as a Buffer of bytes! Don't decode it.

Because everything else in the world is moving to UTF-8, Node is also trying to move to UTF-8.

Node does make you specify which encoding you want when converting between strings and Buffers, but it's always embraced UTF-8 as its primary encoding, as far as I'm aware.

Because Javascript was invented twenty years ago in the space of ten days, it uses an encoding that uses two bytes to store each character, which translates roughly to an encoding called UCS-2, or another one called UTF-16.

This is kind of silly. Java made the same decision and was certainly not "invented" in ten man-days!

dgreensp··on Cooling the Earth with a cloud of small spacecraft near the inner Lagrange point
There are plenty of countries whose power is 100% or close to it "made without CO2", usually with help from hydroelectric (e.g. Norway). Solar panels are becoming cheaper and cheaper and cheaper. The situation is closer to free lunch than you imply!
dgreensp··on Cooling the Earth with a cloud of small spacecraft near the inner Lagrange point
The space sail idea is already designed for a scenario in which global warming becomes an even clearer and more urgent existential threat, causing countries to get together and devote a trillion dollars and a team of scientists to a radical solution. Given that context, I think it's reasonable to point out that in a scenario with money and collective will, we should stop polluting, whatever other steps we take.
dgreensp··on Ideal OS: Rebooting the Desktop Operating System
It's not that file-watching APIs (and libraries that abstract over them and try to clean them up) don't exist, it's that they are complex and unreliable, with weak semantics. Typically an "event" is basically a notification that something happened to a file in the recent past. As noted in the remarks on that page, moving a file triggers a cascade of events, which differs depending on interactions with the computer's antivirus software. You aren't making any claims about this API, though, so there is not really anything for me to refute.

If the file system operated in an event-sourcing model, you'd be able to listen to a stream of events from the OS and reconstruct the state of the file system from them. If it acted like a database, you'd be able to do consistent reads, or consistent writes (transactions! holy cow).

dgreensp··on Ideal OS: Rebooting the Desktop Operating System
I love it, especially using structured data instead of text for the CLI and pipes, and replacing the file system with a database.

Just to rant on file systems for a sec, I learned from working on the Meteor build tool that they are slow, flaky things.

For example, there's no way on any desktop operating system to read the file tree rooted at a directory and then subscribe to changes to that tree, such that the snapshot combined with the changes gives you an accurate updated snapshot. At best, an API like FSEvents on OS X will reliably (or 99% reliably) tell you when it's time to go and re-read the tree or part of the tree, subject to inefficiency and race conditions.

"Statting" 10,000 files that you just read a second ago should be fast, right? It'll just hit disk cache in RAM. Sometimes it is. Sometimes it isn't. You might end up waiting a second or two.

And don't get me started on Windows, where simply deleting or renaming a file, synchronously and atomically, are complex topics you could spend a couple hours reading up on so that you can avoid the common pitfalls.

Current file systems will make even less sense in the future, when non-volatile RAM is cheap enough to use in consumer devices, meaning that "disk" or flash has the same performance characteristics and addressability as RAM. Then we won't be able to say that persisting data to a disk is hard, so of course we need these hairy file system things.

Putting aside how my data is physically persisted inside my computer, it's easy to think of better base layers for applications to store, share, and sync data. A service like Dropbox or BackBlaze would be trivial to implement if not for the legacy cruft of file systems. There's no reason my spreadsheets can't be stored in something like a git repo, with real-time sync, provided by the OS, designed to store structured data.

dgreensp··on Marijuana use holds three-fold blood pressure death risk: study
Actually, stoners are probably consuming a lot of processed food. Hmmm....
← PreviousPage 13 of 30Next →