HNHacker News
TopNewBestAskShowJobs

adrianratnapala

3,270 karma · joined March 14, 2016

submissionscomments
adrianratnapala··on What's Coming in Python 3.8
Yes, although you don't have to be so perlish as to do the if in that order

    do:
        thing()
        thing()
        if condition:
            continue
adrianratnapala··on To Save a Neighborhood, Ban a Dollar Store?
It is not always economically rational though. The US has a history of using eminent domain to grab neighbourhoods full of small businesses so that they can be turned over to a big development projects of nominally higher value. Then the big developer pulls out or goes bankrupt, and the result is a ruined, rat-infested empty lot.

Those cases involving eminent domain and rats are the most dramatic, but it works at a more pedestrian level too. Say a government wants to dispose of some disused rail-yard or something. A developer who says "I'm going build some big shiny shops and attractions here" has better optics than a developer who says "I'm going to lay down some infrastructure and parcel the land up to whoever wants to buy it, nature will decide what the land is used for".

The latter is actually quite likely to produce the higher economic value land use, but there is no good political narrative. And in a world of strict zoning rules, there might not even be a legal framework for it.

adrianratnapala··on Why did we wait so long for the bicycle?
> Right, that's how you could plausibly have made one or two, as a palace amusement, or a circus act. It's a little surprising this didn't happen (as far as I know).

You also need people to ride it. It wouldn't fly as a palace amusement because the king (and more importantly the little prince) would keep falling off. They won't have an incentive to value the skill until there is a horde of middle-class, 19th century, hipsters showing him up.

A circus act is more plausible, but only if there's some continuum of other simpler circus equipment leading up to this rather sophisticated bit of engineering.

adrianratnapala··on Why did we wait so long for the bicycle?
> That does not sound like a good argument at all. Metal for vast majority of human history gave you massive edge in weapon technology. Some Mandarin just shut something like that down? Seems super unlikely

The assumption here is that every thing works in a clear way so you can see the military or whatever advantages of a particular phenomenon. Now I don't know if AnimalMuppet is literally correct that the bureaucracy simply shut down the steel industry -- but if it happened it would be because all that cheep steel was not being used for obvious things, like the imperial army, but for other unexpected uses. Maybe arms and armour still had to be made the old fashioned way anyhow, so there was no immediate military advantage.

More likely, things were subtler. Things innovations can strangled long before their importance is clear. Imperial China had a vibrant merchant class, but it isn't the kind of place that is likely to tolerate the "disruptive innovation" which fuelled Britain's Industrial Revolution -- where a bunch of upstarts come and do things with unexpected things. Even modern China (or for that matter the modern United States) struggles with it.

adrianratnapala··on You Only Need to Test with 5 Users (2000)
That's one part of it.

Another part is hiring a breed of test engineers who like breaking stuff and have a knack for it.

adrianratnapala··on Servants Without Masters
Fair enough.
adrianratnapala··on Servants Without Masters
Which is an example of the the euphemism treadmill. Secretary means secret-keeper and has built into it connotations at least of trust and often of power. Which is why top officials of many great ministries ion are called secretaries.

https://www.youtube.com/watch?v=G7Xgd7Cjm98

adrianratnapala··on You Only Need to Test with 5 Users (2000)
That's OK, we nowadays use icons that don't make sense to anyone at all. I mean how would you know that three horizontal lines was a "Hamburger menu", and if you do know that, why would you want a Hamburger?
adrianratnapala··on You Only Need to Test with 5 Users (2000)
It sounds like this guys employer has taken first step to inventing QA.

There's whole classes of highly paid engineers whose job is to do this. But they work for old fashioned, boring, companies.

adrianratnapala··on Netlify Analytics
> ... and watch as your page hit Slashdot...

And then fall over?

I miss the days of The Slashdot Effect[1]. Now it's the JS that makes my PC fall over.

[1] Come to think of it The Slashdot Effect would have been a good band name back in the '90s.

adrianratnapala··on Python consumes a lot of memory – how to reduce the size of objects?
> Your code won't be pretty,

Depends on the algorithms that use that code. Two separate arrays is not a bad way to represent a vector-of-tuples. And so if you think of everything as a vectorised operation (and if that makes sense for your use case) then the code can be clean enough.

Efficiency-wise it depends on how the locality of reference falls out. There are cases where it's more cache-efficient to store the pairs next to each other, but again for big vectorised operations you might lose nothing by using two cache-ways instead of one.

adrianratnapala··on OpenBSD Is Now My Workstation
I would put it the other way around. wpa_supplicant is actually very good at doing what it does. But rolling it's functionality into ifconfig is probably "good enough".

wpa_supplicant is an application of the "do one thing" philosophy. The kernel provides a some basic hardware-abstracted plumbing which lets a specialist tool do all the complicated handshaking and what-not for wireless.

This saves the basic tools (ifconfig, ip) from having to build in all that wireless complexity. But it does introduce an extra moving part that has to be configured. For this reason, just bloating it into the basic tool is likely to be good enough, and also provider a superior UX (for nerds like us).

adrianratnapala··on Data Still Dominates
Is it because people or so young, or that the pipeline to become a junior-but-still-responsible person goes through schools rather than something like an apprenticeship.
adrianratnapala··on Rsync, GUIs, power, control, design, and decisions
> Unison https://www.cis.upenn.edu/~bcpierce/unison/ is a tool to keep two folder structures in sync - that is its main goal but it can have other uses.

And though I tend to be a GUI hater, Unison is one tool where I find the GUI much more useful than the command line alone. The game is to iteratively come up with a set of rules which Unison will use to into effect on your dataset. The GUI quickly show you the effect of your current rules, and lets you propose the next iteration etc.

adrianratnapala··on IBM Closes Acquisition of Red Hat for $34B
I think is what people might call "knowledge capital", "intellectual capital" or some such vague term.

In my experience IP corresponds specifically to legally recognised property in otherwise copyable information.

adrianratnapala··on France to tax flights from its airports, airline shares fall
> But a robust and affordable air travel network is a capability the business world needs to operate our economy.

Then the business world can pay for it through ticket prices.

adrianratnapala··on Apple Updates Air, Pro Laptops, Kills Off the MacBook
How is that a contrary view. That guy seems very happy with the Ubuntu and X1 combo. Though he does spend a long time obsessing about the battery, after his initial take was "yup, it's good enough for me".
adrianratnapala··on Apple Updates Air, Pro Laptops, Kills Off the MacBook
So that you can SSH into it from your server?
adrianratnapala··on OpenBSD Is Now My Workstation
Does OpenBSD have an alternative to wpa_supplicant?

I've been using wpa_supplicant under the hood for ages, but only recently learned anything about it... and it's actually very good, except that it's CLI interface is so low-level and difficult to use.

adrianratnapala··on A Failed Experiment with Python Type Annotations
Circular references like that are called "recursive types" in formal type theory. They are one of those big issues that academics like to write papers about.

Even if you just want to write a practical interpreter, and choose to gloss over the issues, they will still come back in some disguised form and either by requiring some sort of implementation kludge, or just by creating weird edge cases.

adrianratnapala··on The Myth of Food Cravings
Smell is an interesting point

As travisjungroth points out, the most obvious mechanism is feed-back where they eat something, it works, and the body is designed to do more of the same.

But if there is a feed-forward mechanism, i.e. where genetic information tells you "eat this thing now, even if you normally hate it*; then the most plausible thing would a pretty low level mechanism that matches chemicals detected by smell.

adrianratnapala··on Why Is Infrastructure So Expensive to Build in New York?
> By building this project [CrossRail], London is just catching up to its peers. Paris has had a similar system, the five-line RER, since the 1970s. Berlin’s S-Bahn predates World War II.

I think I lived in London when CrossRail a just an expensive glint in the government's eye. I didn't know that it was an S-Bahn thing. I guess it makes sense, as London always was the city with the most famous of U-Bahns but no real S-Bahn.

Now I live in Sydney, a city that has always had an S-Bahn (of course we don't call it that) but know U-Bahn. But just a few days ago the Sydney Metro (https://en.wikipedia.org/wiki/Sydney_Metro) was opened.

So it seems like the combined approach is what big cities converge on. Although the Sydney metro doesn't even go into the centre of the city, so it's not really equivalent.

Or that S-Bahns were some kind of new technology.

I find it interesting that

adrianratnapala··on A way to do atomic writes
> Look at how much slower CPUs are without those speculative execution tricks.

But do I care? All my computers, except the really ancient phone I use, are snappy.

Of course there are cases were CPU speed matters, but I don't know if they are any less obscure than the cases where timing attacks are a risk.

adrianratnapala··on Fancy Euclid's “Elements” in TeX
Does #5 get around my worries about a "stringy-marcro-framework"? I.e. when things get too complicated, you can break out to a Heavy Duty (TM) language (aka Lua).
adrianratnapala··on Fancy Euclid's “Elements” in TeX
While mentioning ConTeXt, can anyone give me a sell job on when and why it might be nicer than LaTeX?

It's not that I'm super fond of LaTeX, it's just that I assumed its warts were more or less inevitable in a stringy macro framework, and ConTeXt can't avoid that either.

adrianratnapala··on In Defense of Fahrenheit
No, when people say "The thing is N feet down the road", I find that it is really N yards down the road. That is, I multiply the distance by three.

Though it's true, the alrgorithm for doing the multiplication happens to is `s/feet/yards/`

adrianratnapala··on The Antonine Wall was the real final frontier of the Roman Empire
Interestingly, the headline on the BBC page is more accurate than the one I see on HN. BBC says: "Did the Romans Really Reach Scotland?". And even though it's a headline, the answer is "yes, duh."

HN headline, "The Antonine Wall was the real final frontier of the Roman Empire" is misleading, and final is doing strange work there. The Antonine wall was only briefly defended a couple of times, while the more famous Hadrian's wall was a fairly fixed frontier.

I find it interesting that the Antonine wall is entirely inside Scotland, while Hadrian's wall is entirely inside England. Somewhere between them lay the line where further imperial expansion became overreach.

adrianratnapala··on In Defense of Fahrenheit
> The "intuitive" argument comes up a lot in relation to units of measure, and it just makes me wonder how people can have such lack of self awareness.

As someone who has grown up with a mix of various Imperial (not US) measures and metric ones, I often find some more intuitive than others even when I am familiar with both.

The most obvious his human height. A tall man is about 6' or more. Most people are some number of inches less than that. Moreover, the inch and not the centimetre is roughly the amount at which you would casually notice two people were slightly different in height.

On the other hand, for horizontal distance, metres (or yards) make more sense than feet. To the extent that when American tell me how far away something is in feet, I just multiply by three before trying to use the info.

I think weight in stones is similarly better than either kilos or or pounds, but I am personally more familiar with kilos.

adrianratnapala··on RCE Without Native Code: Exploitation of a Write-What-Where in Internet Explorer
The kids these days write JavaScript.
adrianratnapala··on RCE Without Native Code: Exploitation of a Write-What-Where in Internet Explorer
But the POKE operation is specifically about writing to a given address. So it does capture what you are talking about. (Whether it is any clearer than "write-what-where" I leave as an exercise to the reader).
Page 1 of 34Next →