Alcohol as a social technology to check the trustworthiness of others - ivank
https://plus.google.com/+KajSotala/posts/hofuxyXz78j
======
patio11
In Japanese business culture, being in one's cups is a socially acceptable
excuse for saying virtually anything, regardless of e.g. relative social
status or non-desirability of the message. Accordingly, many of the really
important messages internally and externally are passed after hours with a
beer in hand. (Incidentally, people will even treat you as being drunk even if
you're only sipping coke, because it is mutually socially important that you
be seen as being drunk. I mean, after all, you couldn't possibly verbalized
that complaint to your boss while being sober, right? So clearly you're
drunk.)

~~~
harisenbon
Tangentially, I've seen "Nomu-nication" (Nomu "to drink" and Communication) be
a central part of almost all business in Japan -- both internal and external.

One experience I had with my Osakan clients always stood out to me -- I've met
multiple businessmen who say they won't make a deal with a vendor they haven't
gone drinking with, because the alcohol shows what kind of person they really
are.

------
rdtsc
In Eastern Europe it was (is, maybe, I haven't been there in a decade now or
so), a social lubricant for _all_ the occasions. Birthday parties, any
holidays -- state, unofficial, religious. Any business deal or venture. Birth
of children, deaths, graduations. Celebrating buying a new car. Visiting
someone for the first time. etc...etc... Any one of those are a reason to
drink alcohol. Not just a reason to drink it, it is suspicious not to. Yes, it
can be very mentally demanding to not drink. There is a constant barrage of
offers (Oh just have a little shot. Just taste it. We are drinking for the
health of so and so). I have family members back home that struggle with
alcoholism. Those that are struggling are able to handle it pretty much just
by avoiding most such functions. Cousin so and so is having a party? -- "Yeah,
I'll just find some excuse to not go, as they will drink themselves stupid and
I can't handle the nagging". Stuff like that. You go to visit someone for the
first time, and you refuse a drink, that is borderline an insult to host. You
gotta tell them it is under strict doctors' orders to get out of it. "It looks
like you have a hangover? No problem. Guess what the cure is? -- Yap. More
alcohol in the morning.". Stuff like that.

~~~
cageface
It's like this in SE Asia as well. Socializing pretty much always implies
drinking. It's a struggle for me because I've never really enjoyed drinking
and I've found that as I get older it takes me longer to recover from it. Even
a few drinks now and I have trouble sleeping well and I'm mentally fuzzy the
next day. This is not conducive to writing code at all.

Hopefully one day Cannabis will mostly supplant alcohol as the social drug of
choice.

~~~
andrewfong
> Hopefully one day Cannabis will mostly supplant alcohol as the social drug
> of choice.

I hope not. I find the smell of Cannabis to be nauseating (almost like a swamp
or distant sewage plant), and I wish people would consider that more often
before smoking it in social settings. I realize that alcohol can smell as
well, but it usually takes quite a lot of it for me to notice at least.

Another consideration: It's a lot easier for non-participating guests to
abstain from alcohol than from Cannabis. Apart from peer pressure concerns, I
can abstain or moderate my alcohol intake while still participating in social
activities, regardless of the alcohol intake of my friends. When Cannabis is
smoked in an enclosed hotbox though, I have to choose between intoxication and
leaving.

I don't mind the brownies though.

~~~
FreeKill
I know this is a little off topic, but I always wonder if Cannabis becoming
legal in more places, like the US, would result in more innovation with
regards to the actual smell of cannabis. Perhaps more convenient ways of
ingesting/inhaling that don't result in such a strong odor? Maybe biological
manipulation of the strains to specifically eliminate the aspects of the plant
that give it such a strong smell while maintaining the effects? You have to
think that the primary providers of Cannabis to date have not had much
incentive to tackle this problem, but like you said, the more and more
prevalent it becomes in society, the more necessary it may become.

I found the recent episode of the tv show VICE that focused on the booming
entrepreneurship in Colorado around cannabis to be really interesting and it
will be interesting to see what comes of that test environment within the US.

~~~
andrewfong
> Perhaps more convenient ways of ingesting/inhaling that don't result in such
> a strong odor?

Brownies.

~~~
anewcolor
smoking (or vaporing) makes much more sense in a social situation. eating pot
food takes a while to kick in, sometimes hours. it's not ideal and the
experiences are not identical.

------
IvyMike
"I don't trust anyone who doesn't drink" is a politically incorrect but still
pretty common sentiment.

Edit: I think I'm getting some "shoot the messenger" downvotes. Whether or not
you agree with the statement, I maintain that a lot of people feel this way.

~~~
ivank
The deleted comment with a lot of replies was:

> I go to IT/comp-sci conferences and often meet people who don't drink, ever.
> These people won't have a single glass of wine or beer. I had to ask myself
> why. If someone told me they used to be an alcoholic and completely quit
> alcohol, I'd have nothing but respect, but this is not what these people are
> about.

> They'll claim they don't like the effects of alcohol, but the truth is they
> think drinking is unprofessional. They're afraid of losing control, of
> looking foolish. To me, this symbolizes conservatism. These are people who
> are not adventurous. They won't try some unknown dish on the restaurant
> menu, they won't want to go to a restaurant from a culture they're
> unfamiliar with. They might think shellfish are disgusting and weird.
> They'll want to go to some chain restaurant and have a steak with fries.

> I don't like these people. Why? Because they're unadventurous people, who
> have most likely never tried pot even once in their life. They don't like
> new ideas. They're afraid that one drink will make their life deviate ever
> so slightly from the usual boring predictability they crave. If you present
> them with some new idea, they'll give you nothing but doubt, a long list of
> reasons why your idea is risky and might not work, and thus isn't worth
> trying. You shouldn't be developing your own programming language, Java does
> everything you need, it's Turing Complete. Fuck these people.

~~~
dfc
I appreciate that you reposted the deleted comment to quell my curiosity and
that you were considerate enough to not include the original authors username.

One of the big reasons I was curious about the content of the comment is that
I have been thinking about comment karma and the utility of deleting comments
lately. Comments like this make a strong case against being able to delete
comments. In order for karma to be most effective it seems that it must not
only quantify a user's positive contributions but also the user's negative
contributions. If a user knows they can make potentially dumb/offensive
comments and delete them before taking a karma hit they do not need to filter
their thoughts before hitting submit. In my opinion clicking submit is an
implicit statement that I stand by my comment and that it was submitted in
good faith and is a sincere expression of my opinion.

I am not entirely sure what the purpose of delete is. If someone asks "what is
the X of y?" and my response is factually incorrect the comment/answer will be
downvoted. People that see my downvoted answer will know that it has been
judged "unacceptable" by the HN community; so I do not think there is a reason
to worry about spreading false information. If the question is not about a
factual matter and my opinion is judged unacceptable by the HN community so be
it. I made my comment with the best of intentions and should stand by what I
said in the comment.

~~~
vxNsr
One reason I find the delete, or edit useful is, sometimes I'll type up a
comment come back a while later, read it, hit post without really thinking,
and then go back and see the context, and realize I'm an idiot[0] and quickly
edit or delete the comment before anyone else finds out.

[0] [http://xkcd.com/481/](http://xkcd.com/481/)

~~~
dfc
It seems like you are saying that the utility of the delete function is that
it allows a user (you, me and everyone else) to submit comments without
thinking about the content and quality of the comment. What is wrong with
increasing the incentive to do a "am I being a moron check" before hitting
submit?

------
cup
I think the author has made a number of errors in there post and seems to
gloss over the numerous social problems that arise from alcohol consumption.
Th reason Alcohol is consumed by a significant portion of the population is
because its a drug that society doesn't perceive as a drug. It carries all the
negative physiological and social effects other drugs have but it doesn't
carry the negative association of being what we consider 'a drug'.

Yes It's a form of social lubrication and it might be pleasant to consume but
its efficacy as a form of verifying trustworthiness is tenuous as best. Most
high functioning alcoholics would be able to maintain an air of
trustworthiness which is why alcohol itself can be such a destructive force.

It's interesting that alcohol is explicitly banned in Islam You could use the
approximately 1.1 billion muslim(probably closer to 500-800 million
practicising) population as a control abstaining group and look at whether
communities that consume alcohol have a higher propensity to trust each other
or not.

Edit: At the end of the day I think regardless of any philosophical debates
the simplest answer might be that people consume alcohol because being drunk
feels good.

~~~
nemothekid
>Th reason Alcohol is consumed by a significant portion of the population is
because its a drug that society doesn't perceive as a drug.

Thats a rather modern view for a practice that may be as old as humanity
itself. Your comment doesn't explain why Alcohol was popular when cocaine and
other opiates didn't carry negative associations.

~~~
cup
Cocaine and other opiates have been popular, only recently have they been
sidelined.

~~~
downer73
Yeah, gee, I wonder why? Maybe it's because one has a tendency to induce heart
attacks, and the other group is treacherously addictive.

But, consider that cocaine is a "new world" drug, specific to the South
American continent, as an indigenous herbal extract, mostly until the 19th
century, when highly purified extacts became a popular part of western
society.

Meanwhile use of opiates dates back to ancient times, given that Opium is dead
simple to produce. But again, it was really in the 19th century when good
equipment, and precise measuing tools permitted chemists and drugists to
purify highly addictive perparations of the wider variety of drugs. Prior to
that, the poppy's medicinal qualities were known and used, but expertise and
well-crafted instruments which could readily facilitate powerful extracts
weren't as widespread. Otherwise, people were limited to whatever was grown
locally, and would be required to cultivate and harvest their own supply,
instead of relying on trade.

------
russellbeattie
Drinking makes me suicidally depressed, so I stopped many years ago and have
witnessed as a result this exact phenomenon. The new neighbor, coworker,
potential partner or aquaintence are all super friendly and welcoming until
the first time there's an opportunity to get drunk with them, and you don't
(no matter how politely or subtly you demure). After that, the relationship
fades. I've seen it time and again. It's annoying, but I've accepted it as
reality now. I do get frustrated at how it inhibits my career - it's basically
impossible to build a strong network without drinking (or at least is to me.
Maybe you're some super gregarious teetotaler, but I'm not) and without a
strong network you naturally lose opportunities both personally and
professionally. If you can drink without issues, I'd highly recommend it -
you'll have a happier, more successful life.

~~~
pdonis
_> If you can drink without issues, I'd highly recommend it - you'll have a
happier, more successful life._

I think this depends on your definition of "happy" and "success".

------
logicchains
I'd argue it can also be used as a social technology for testing people's
tolerance of values different from their own. If I say I don't want to drink
but someone keeps pushing me to anyway, I don't bother pursuing any kind of
meaningful friendship with them, as why would I want to be friends with
someone who wouldn't respect my values?

~~~
IvyMike
It kind of works that way from the other side too.

Any group has a set of "norms" that, if you deviate from them, it's hard to
belong to the group. Go to a heavy metal concert wearing a pink shirt, or a
linux conference wearing a tie, or (some) churches wearing shorts, or the
1980's without parachute pants, or any one of a million other things. So if
there is a group where social drinking is the norm, when you reject that norm,
you stand out. This is not always fatal to group membership but it usually
makes it harder.

Seen in this light, in some contexts, someone pushing you to drink may
actually trying to be say "I'd like you to be a member of this group", and
while you see them as not respecting your values, their motivation is trying
to help you belong.

(Hackers as a group tend to claim they reject the concept of "norms" although
my personal take is that they just have a different set of norms.)

~~~
pdonis
_> someone pushing you to drink may actually trying to be say "I'd like you to
be a member of this group"_

And my response (like that of logicchains, I expect) would still be "No
thanks, I don't think it's my kind of group". So the signaling works fine both
ways.

------
blackhole
Oh great, now my desire to not cause brain damage to myself makes people think
I have something to hide.

 _wonderful_.

~~~
hueving
Alcohol use doesn't imply brain damage. Alcohol abuse does.

~~~
pdonis
No, alcohol use _above some level, which nobody knows precisely_ risks brain
damage. Some people prefer not to take the risk, even though it may be small.

------
Alex3917
The CIA spent millions of dollars researching truth serums and didn't find
anything that reliably worked. While I think the author is partly correct,
this is probably a function of set and setting in addition to pharmacology.

~~~
jmnicolas
I think If they found something reliable they wouldn't say it.

But considering their extensive use of water-boarding you're probably right.

------
iandanforth
Interesting! Powerful! But why? It's a novel thesis, but not too novel as to
seem unfamiliar. It provides a simple solution to an age old problem. How can
I know if I can trust someone? Just get them drunk! Secretly, of course, I'll
remain sober enough to judge their sincerity. It also ties together two
enjoyable drives. Domination in business and drink. The presentation as
revelatory give us the feeling of being in on something important and the
allusions to an ancient culture gives it weight. Finally we are drawn by the
notion of technology. This is a tool that we should be using to our advantage.
Moral considerations are dispelled by the (popular) allusion to our brains
mechanistic nature. I applaud the author but this is pure HN linkbait.

------
blibble
alcohol is part of society simply because having low levels of it in stored
water killed pathogens.

as well as preventing your entire medieval village of dying of cholera, this
technology also permitted long ocean voyages (it's said that the Pilgrims only
landed at Plymouth Rock because they ran out of beer).

now it's entrenched and not going anywhere.

------
tomcam
That's a whole lot of words to replace "In vino veritas". Also explains why
teetotalers like me are sometimes considered suspect.

------
fit2rule
I recently faced a mutiny/mobbing/uprising. One of the key differences between
me and 'them' was the amount of drinking going on.

I've come to realize that drunk programmers are just doing their jobs.

------
leephillips
From the Maltese Falcon:

Kasper Gutman [to Sam Spade]: I distrust a man who says "when." If he's got to
be careful not to drink too much, it's because he's not to be trusted when he
does.

~~~
fred_durst
I will very much second this one. That said, there is something for shy
people. They sometimes think they have something to hide when they actually do
not. So it can be a little bit of a bad tell if you don't realize it can
sometimes be a lack of self confidence as opposed to a need to hide something.

~~~
TTPrograms
Uh, isn't this an objectively ridiculous statement? If you never said "when",
you would overdose and die.

If he's got to be careful not to drink too much, it's because he doesn't care
to die.

~~~
mattgreenrocks
It's not just ridiculous, it encourages a lack of self-control so as to appear
trustworthy.

It also highlights the modern dilemma: should I be a person of integrity, or
can I just _appear_ to be one so I can reap most of the rewards?

------
mrxd
Interesting idea, but the neurobabble bits don't really add much. Everyone
knows alcohol makes people less inhibited, so do we really need to cite the
fMRI data first?

------
michaelochurch
Also, shared embarrassment and nostalgia.

When you go drinking with someone and both make fools of yourselves, you now
have a mutual trust built on knowing things that most people don't know.
That's also the purpose of hazing rituals in fraternities: you've seen each
other do disgusting things, so you trust each other.

Then, there's the nostalgia factor. Being drunk is moderately interesting but
it seems to have a high rate at which it produces nostalgia. Even though the
after-effects are (for me, anyway) sufficiently bad to counteract any pluses
of drunkenness, the sort of nostalgia on which business connections seem to be
build is enhanced with alcohol.

I don't know why this is, but if I had to guess, I think that Timothy Leary's
"8 circuits of consciousness" theory is, at least to this, relevant. Alcohol
causes regression into a childish, emotionally volatile state. It's a time-
travel mechanism. It allows people to instill in themselves an illusion that a
connection goes back farther in time (and is therefore deeper) than it
actually does.

------
dschiptsov
It seems that Slavic cultures are founded and based on an collective alcohol
consumption. So many men cannot even go to bed with a woman (especially wife)
without getting drunk first. And those almost "religious and mystical" visions
Slavs are having (and later proudly telling each other) within onset of
delirium..

So, please, don't teach a Slavic about booze.)


How Seattle blew its chance at a subway system (2016) - wallflower
http://features.crosscut.com/seattle-forward-thrust-sound-transit
======
gandreani
The best time to build a rail system is kind of like the best time to plant a
tree. 20 years ago.

It's sad but it seems to me contemporary Americans don't want to pay for
something that they will only reap the benefits of in later decades

There's so much in that style of thinking. The irony of depending on roads
built decades ago. The debt system conditioning people to expect to "get it
now, pay it later". The hypocrisy in "investing" 10k-100k in an education but
not a few measly percent in taxes

~~~
rayiner
The problem is not that the benefits will come in decades, but that they won’t
come at all to most taxpayers. Here in DC we built a subway 40 years ago. It’s
a huge boondoggle that is usable for a single digit percent of the taxpayers
who pay for it. Folks in Richmond who might ride Metro a few times in their
lifetime or lower income folks who work in the suburbs subsidize the commutes
of lawyers and federal government workers who work downtown.

~~~
pcwalton
The D.C. Metro has a daily ridership of 612,652 and an annual ridership of
179,693,126. Farebox recovery is 62%, which exceeds that of Vienna and is
almost as high as that of Munich.

If you look at how people use transit, it skews toward lower-income people
[1]. High-income people like the lawyers and government officials you mention
use it a lot too, but not as often.

If you want to pick on a failing transit system, pick on VTA in Silicon
Valley, not the D.C. Metro.

[1]: [http://www.pewresearch.org/fact-tank/2016/04/07/who-
relies-o...](http://www.pewresearch.org/fact-tank/2016/04/07/who-relies-on-
public-transit-in-the-u-s/)

~~~
oh_sigh
That still means it is 38% subsidized by the taxpayer, right? Farebox recovery
is important but you need to also take into account in absolute terms the cost
minus recovery.

~~~
jschwartzi
Other people have pointed out that roads are subsidized heavily through taxes,
but just to be blunt: nobody is asking you to specially subsidize public
transit. We are just asking taxpayers to treat public transit with the same
deference they treat the road system. The people who use our public transit
system in Washington are taxpayers too as we all pay sales tax equally. And if
they rent they pay property tax indirectly via their landlord.

Nobody is getting a free ride except if we continue to disproportionately fund
the road system at the expense of denser forms of transportation.

~~~
rayiner
State and local governments spend about $170 billion a year on highways and
roads, for the 115 million or so people who commute by car each day:
[https://www.google.com/amp/s/www.brookings.edu/blog/the-
aven...](https://www.google.com/amp/s/www.brookings.edu/blog/the-
avenue/2017/10/03/americans-commuting-choices-5-major-takeaways-
from-2016-census-data/amp)

That’s about $1,500 per commuter. Note that is an overestimate, because it
ignores the commercial uses of roads (package delivery, ambulances, etc). Also
it ignores bus riders, who make up most of the 7 million or so transit riders.

State and local sources spend $1.8 billion on WMATA each year. There are about
600,000 linked trips per day, so at most 300,000 commuters. That’s $6,000 per
commuter.

(Note both numbers above exclude federal spending, but Metro is heavily
subsidized by federal dollars.)

~~~
crispyambulance
Another thing to consider, for cars, is that these things need PARKING SPACES.
For an already dense city that means large, multilevel parking garages dotted
all over the city. How many more garages are we talking about for a half
million more cars? A lot... enough to impact the nature and function of the
city itself.

If you're going to make a case for private cars vs WMATA, there is a wider
scope of things to evaluate than just operating cost.

~~~
rayiner
You wouldn't need more parking spots. For people commuting from outside the
downtown core, Metro is already car-oriented, and operates 60,000 parking
spots at stations (not including lots run privately or by VA/MD). For people
traveling inside the downtown core, they could just take the bus--as lower
income folks in D.C. already have to do because Metro doesn't go where they
live.

~~~
tptacek
DC busses appear to be more heavily subsidized than the trains are. Am I
misreading the stat, or misunderstanding your argument?

~~~
rayiner
The operating subsidy for rail is slightly less than for the bus, but that's
dwarfed by the difference in annual capital expenditures (about $1 billion for
rail versus $200 million for bus). Metro's fare recovery is a bit misleading,
because most of its "capital budget" is actually for maintenance and repair,
which is an operating cost.

Also, the bus serves much lower income people than rail--I'm okay with it
receiving subsidies.

------
herodotus
Vancouver used the excuse of hosting the 2010 Winter Olympics to build a LRT
system called "The Canada Line". The line runs from the YVR airport through
downtown to the waterfront station (near the cruise ships terminal). As it
happened, one of the stops was very close to the Apple office I worked at.
What an improvement to my life for my frequent trips to Cupertino. No more
leaving the office for the airport early in case of traffic on the way to the
airport; no more harrowing trips from a crazy cab driver; just a pleasant
stroll to the station from the office, and a (usually) comfortable seat for
the 22 minute ride to the airport. The system was an instant success (based on
ridership). It was also (as it happens) a boon to developers because of new
high-density building opportunities near Canada Line stations. The only bad
part is that the city allowed no room for extra cars - the line has a two-car
limit because of the platforms. In my view, opposition to public transit is
incredibly misguided. I found the article in the NY Times
([https://www.nytimes.com/2018/06/19/climate/koch-brothers-
pub...](https://www.nytimes.com/2018/06/19/climate/koch-brothers-public-
transit.html)) about the Koch brothers particularly depressing: not the Koch's
part, but that so many young people apparently were happy to participate in
killing transit proposals. I would be surprised if you could find a single
person in this city who thinks public transit is a mistake.

~~~
mixmastamyk
> I would be surprised if you could find a single person in this city who
> thinks public transit is a mistake.

I'd qualify that with someone who has used it to go to the airport. Guarrantee
there are "drive everywhere, even across the street" folks lurking.

~~~
abraham_lincoln
I had a neighbor that would back their car out of the garage to the mailbox to
get the mail, then drive back into their garage.

The mailbox was less than 50 feet from the frontdoor.

------
melling
I imagine everything is a lot more expensive now. More people, right of ways,
etc

Didn’t California want to build its high-speed rail in the 1970s?

Americans chose to pay later for mass transit. Now it’ll cost us a fortune.

~~~
oconnor663
Maybe we'll get lucky and perfectly safe self driving cars will solve the
problem once and for all in 20 years?

~~~
s0rce
I can't see even self-driving cars coming close to the transportation
efficiency of light/heavy rail. You just can't fit people close together if
each person is in big metal box. Also, self-driving cars would likely increase
the amount of time people would tolerate in a vehicle as you can do other
things so more people would be willing to sit in traffic and commute times
might not even improve.

~~~
SomewhatLikely
But what about all the empty track between trains? When you consider that, it
starts to level out. I'd be very interested in actual numbers though. Edit:
Discussion here using quick estimates seems to show rail still wins:
[https://alankandel.scienceblog.com/2014/01/11/rails-vs-
roads...](https://alankandel.scienceblog.com/2014/01/11/rails-vs-roads-for-
value-utilization-emissions-savings-difference-like-night-and-day/)

~~~
adrianN
How many lanes of self driving cars cars do you think it takes to replace a
subway line at full capacity? More than you think. See London's Victoria line
for reference

[https://www.youtube.com/watch?v=ASKof4CR2SE](https://www.youtube.com/watch?v=ASKof4CR2SE)

Trains run every ninety seconds or so and are packed during rush hour.

------
jupiter90000
The thing that throws me off about Seattle is that there seems to be a large
segment of the population that says, "yes, we have certain problems
(homelessness, transportation) that we as a community should solve." But then,
when it comes to breaking out the wallet and paying for what's needed, either
the same people or an even larger majority seem to be vehemently opposed to
doing so.

I'm not really sure what's going on, is it like this everywhere? Wishing that
the problems get fixed by just holding out and hoping something gives?

~~~
mrep
Not sure where you are getting the "vehemently opposed to breaking out their
wallet for transportation" because Seattle is breaking out their wallet to the
tune of $53.8 billion for st3 (talked about the proposal in the article and it
later passed) which adds 62 miles of track [0] which is in addition to st2 10
years ago which cost $17.8 billion and added 50 miles [1].

[0]:
[https://en.wikipedia.org/wiki/Sound_Transit_3](https://en.wikipedia.org/wiki/Sound_Transit_3)

[1]:
[https://en.wikipedia.org/wiki/Sound_Transit#Sound_Transit_2](https://en.wikipedia.org/wiki/Sound_Transit#Sound_Transit_2)

~~~
jupiter90000
Sure -- you noticed that like ~46% of voters choosing on the issue opposed it
though right? I mean maybe that's typical to have something like this win by a
4% margin but I'd have to say it's far from a general majority saying, "yep,
let's do it." Then you've got the people who probably didn't even vote and
found out about it when their car registration fee went up a couple hundred
bucks.

BTW, I voted for it so I'm aware, I just find it hard to believe it's so
borderline and there's folks who seem really angry they need to contribute to
the community's well-being. But hey, I guess as someone else said, no one
likes to pay taxes.

~~~
mrep
> there's folks who seem really angry they need to contribute to the
> community's well-being

I don't think many people are trying to negatively impact the community. They
just don't think it is a good investment considering how expensive rail is at
being almost a billion dollars a mile and it will take up to 20 years to
finish if it all goes according to schedule.

One guy I talked to made the argument that in 20 years, we should have self
driving busses and if each one costs a million (current busses are like
300,000-600,000 from a quick google search), we could buy 53,800 busses with
that money which would service a lot more people in a lot more unique routes
which I thought was a pretty decent argument if you believe we will get self
driving busses that soon.

I would rather have an oversupply of transportation so I say let's do both,
but I can see their arguments for balancing taxes to pay for transportation
with how much supply is needed.

------
seattle_spring
Sad. Same people that ruined Forward Thrust seem to be going out of their way
to ruin ST3, just so they don't have to pay slightly more for their $100k
Teslas.

~~~
mikestew
That's disingenuous at best. I voted for transit, and I'd vote for it again,
but I can't say I wasn't a little shocked to open a bill for $275 for a
friggin' motorcycle (granted, a pricey BMW motorcycle, but still...). I'm near
enough to retirement that for the most part _I won 't even use light rail_,
but I'm happy for my money to go toward building it. And yet I can still
sympathize with those might say, "whoa, wait a minute..." when they see how
much tabs cost now. Can you not do the same?

~~~
seattle_spring
Nope, because the expected costs were available and extremely clear. My new
bill matched almost exactly to what I was expecting.

------
tjr225
I used to commute by car every day. Now I take the Sounder out of the city.

It's incredible how much better it is even though it takes twice as long as
driving would...

But, people ain't smart and they love their cars. Here's to hoping ST3
actually happens!

------
WalterBright
The annoying thing about ST3 is they totally ignore the existing unused rail
lines from Renton to Bothell, which could add 20 miles of critically needed
track at little expense.

~~~
techsupporter
Most of the Eastside cities desperately want to turn those into amenity
trails. Kirkland, for one, is on record vehemently opposing any light rail in
the Eastside Rail Corridor because they think jogging/biking/walking trails
are a better use of that right of way.

And the few spots that aren't being or targeted for being converted are still,
technically, active freight rail lines so light rail vehicles can't run on
them.

~~~
WalterBright
It's a mystery why King County can't override Kirkland. And even if they
can't, it can still be used to connect Bellevue to Tukwila, creating a loop
around south Lake Washington.

> technically

It would be orders of magnitude cheaper for ST to buy them than to create new
right-of-way. And I haven't seen a train on them for decades, ever since they
tore up where it crossed over I405 in Bellevue.

~~~
techsupporter
Sound Transit isn't King County. Sound Transit encompasses part of King County
and part of its board are elected officials from King, but they are two
separate government entities.

And it's not that ST _can 't_ override Kirkland, it's that it _won 't_
override Kirkland. Pissing off a huge constituency of voters is a great way to
ensure that not only they vote against, say, Sound Transit 3, they go out of
their way to ensure that other people vote against it.

As for buying the tracks, there's no obligation for a freight railroad to sell
and virtually none will because once that ROW is gone it will never come back.
As for quantity of trains, there only has to be one sometime, someday. Look at
all of the pushback the immeasurably tiny Ballard Terminal Railroad has done
to stop these kinds of projects.

~~~
WalterBright
> there's no obligation for a freight railroad to sell

That's why the government has the power of eminent domain.

Besides, King County already owns it:

[https://www.kingcounty.gov/services/parks-
recreation/parks/t...](https://www.kingcounty.gov/services/parks-
recreation/parks/trails/regional-trails/popular-trails/eastside-rail-
corridor.aspx)

~~~
stephengillie
> _Besides, King County already owns it:_

It's the first line of the comment to which you're replying:

> _Sound Transit isn 't King County._

------
bfrog
Heh, the CTA here in Chicago isn't perfect, but wow is it useful. I put on
about 2 to 3k miles a year on my car thanks to added bike lanes and public
transit. I can tell you biking, bus, and train are far more enjoyable than
sitting in a car in traffic

------
purplezooey
People started listening to Ronald Reagan's nonsense early, I guess.

------
scythe
Surprisingly, it's one of the (very) few cases where not building the subway
was the right idea in the long run, because of the magnitude-9 earthquake risk
the region faces that wasn't known about in 1965. A subway could be built
today, but an elevated rail system would be safer, according to my limited
understanding of earthquake safety.

~~~
curtis
Surprisingly, tunnels have very good earthquake resistance. See
[http://www.wsdot.wa.gov/Projects/Viaduct/Status/Blog/tunnels...](http://www.wsdot.wa.gov/Projects/Viaduct/Status/Blog/tunnels-
and-earthquakes).

~~~
oftenwrong
That was an incredibly simple and effective explanation:

>Imagine a plate of fruit-filled gelatin dessert. Tunnels are like the pieces
of fruit at the base of the gelatin, while above-ground structures are like
the fruit toward the top. If you shake the plate, the movement becomes more
exaggerated as it flows up from the base of the gelatin. In an earthquake,
this translates to tunnel movement measured in inches, while the movement
above ground might be measured in feet.

------
sammychl
In a few years, subway and mass transit will be obsolete. Everyone will travel
by autonomous cars.

Like the internet, a distributed architecture, will cause traditional server
mainframe networking to be obsolete.

Train networks will be the biggest waste of public money for those who start
these projects within next couple years.

~~~
kart23
No. Too slow, and inefficient. Oh, you also need to build a ton more parking
garages that could be used for housing or office space. One person does not
need 4,000 pounds of metal for a 30 minute drive each morning.

~~~
gok
Why would AVs need parking?

~~~
adrianN
To avoid having two additional trips?


Getting all your data out of Google Reader - kellegous
http://blog.persistent.info/2013/06/getting-all-your-data-out-of-google.html

======
sp332
ArchiveTeam is extracting _all_ the data from Google Reader and uploading it
to the Internet Archive. Help out by submitting your OPML file:
[https://news.ycombinator.com/item?id=5958119](https://news.ycombinator.com/item?id=5958119)

------
nod
Thanks mihaip!

Worked successfully in Windows CMD for me, without using the \bin shell
script:

      cd C:\mihaip-readerisdead
      set PYTHON_HOME=C:\mihaip-readerisdead
      C:\path-to-py27 reader_archive\reader_archive.py --output-directory C:\mystuff

Locked up at 251K out of 253K items for me, though. Restarting... success!
Looks like it might have locked up trying to start the "Fetching comments"
section on my first try.

~~~
kcvv
I'm trying this on windows and seem to be missing base.api module. I can't
seem to find this module as well - anyone have a clue where i can get this
module?

~~~
ijk
It's in the \base folder. Set the main folder to be the Python root, as in the
grandfather post, and it should be able to find it.

~~~
kcvv
Thanks! For what ever reason, setting the python root did not help, but i just
copied the 'base' folder to python lib folder and that seems to have done the
trick.

~~~
daniel_reetz
I also had success (on W7) using this method. Thank you, mihaip, I am truly
grateful.

------
ccera
Warning to other impatient users:

I didn't read the instructions too well, so the half hour I spent carefully
deleting gigantic/uninteresting feeds out of my subscriptions.xml file was all
for naught. Because I didn't know I needed to specify the opml_file on the
command line, the script just logged into my Reader account (i.e., it walked
me through the browser-based authorization process) and downloaded my
subscriptions from there -- including all the gigantic/uninteresting
subscriptions that I did NOT care to download.

So now I've gone and downloaded 2,592,159 items, consuming 13 GB of space.

I'm NOT complaining -- I actually think it's AWESOME that this is possible --
but if you don't want to download millions of items, be sure to read the
instructions and use the opml_file directive.

------
Udo
This is excellent, thank you for making this! I'm using it right now to make
an offline archive of my Reader stuff.

My only gripe would be the tool's inability to continue after a partial run,
but since I won't be using this more than once that's probably OK.

All web services should have a handy CLI extraction tool, preferably one that
can be run from a CRON call. On that note, I'm very happy with gm_vault, as
well.

 _Edit: getting a lot of XML parse errors, by the way._

~~~
mihaip
The tool caches the API responses (in the _raw_data directory), so if you're
re-running it, most of the initial requests will be served from the cache.

If the XML parse errors are listing any item IDs, feel free to email them to
me (mihai at persistent dot info) and I'll see if there's any workaround from
my side.

 _Edit_ : If it's "XML parse error when fetching items, retrying with high-
fidelity turned off" messages that you're seeing, then those are harmless
(assuming no follow-up exceptions). The retry must have succeeded.

~~~
ivank
Have you tried the JSON API? (See the requests that Google Reader itself
makes.) It requires no cookies and supports getting up 1000 items per
continuation.

~~~
mihaip
I _wrote_ most of Reader's JSON API in 2006-2007 :)

The tool uses the "high-fidelity" Atom output mode for getting at item bodies.
That preserves namespaced XML elements and other extra data from the feed. It
uses JSON for everything else, and will fall back to regular Atom output if
the high fidelity mode is not well-formed (it was added in late 2010, as
things were winding down, and thus never got a lot of testing).

------
DecoPerson
Thank you for this! Now I can procrastinate on my own reader app for much
longer :)

Should we be concerned with errors like this?

        [W 130629 03:11:54 api:254] Requested item id tag:google.com,2005:reader/item/afe90dad8acde78b (-5771066408489326709), but it was not found in the result

I'm getting ~1-2 per "Fetch N/M item bodies" line.

~~~
mihaip
Usually nothing to worry about, see
[https://github.com/mihaip/readerisdead/commit/19d3159c985b6e...](https://github.com/mihaip/readerisdead/commit/19d3159c985b6e1eb3f06360df2921e5e0dc7a2e)

------
pixsmith
This is an impressive bit of work. I have had, though, an interesting thing
happen, in that it's apparently trying to pull every single item from explore
and from suggested items in, to the extent that I get a message saying I have
13 million items, and still going strong -- it pulled about 5 or 6 gig of data
down .

Is there some way to avoid all the years of explore and suggested items with
reader archive? I tried limiting the maximum number of items to 10.000 but it
was still running and growing after 12 hours. Interesting though, what it was
able to accomplish in that time.

------
skilesare
If this does what I think it does(And it seems to be doing it now on my
machine), then this is truly, truly awesome.

Thank you. mihaip, if you are ever in Houston I will buy you a beer/ and or a
steak dinner.

------
dmtelf
I'm getting "ImportError: No module named site"

echo %pythonpath% gives c:\readerisdead

I copied 'base' from the readerisdead zipfile to c:\python27\lib & also copied
the base folder into the same folder as reader_archive.py

C:\readerisdead\reader_archive\reader_archive.py --output-directory
C:\googlereader gives "ImportError: No module named site"

What am I doing wrong? How can I get this to work?

------
drivebyacct2
I guess archived RSS data for me isn't terribly important since most people
seem to hide the rest of their content behind a "More" link to get those
precious ad views.

~~~
ivank
Really? Pretty much all the feeds I've seen are full-text feeds. For the few
that aren't, [http://fulltextrssfeed.com/](http://fulltextrssfeed.com/) and
[http://fullrss.net/](http://fullrss.net/) are around.

~~~
drivebyacct2
Wow! Thank you very much!


How a language can be faster than C - beza1e1
http://beza1e1.tuxen.de/articles/faster_than_C.html
======
riobard
TL;DR:

1\. Better memory aliasing to use SIMD instructions. But you have to trade in
pointer arithmetic for those cases. Only useful for number-crunching and GPU-
like workload AFAIK.

2\. Pre-compute time-consuming constants during compile time. Though I see no
reason why you cannot do this in C.

3\. JIT and runtime optimization. I doubt this though, given various overhead
of JIT and runtime optimization (GC, memory, etc), that JIT can beat carefully
crafted C. Of course it will make it easier to write many types of programs.

~~~
orblivion
Couldn't carefully crafted C pretty much fix every potential case where
another language could beat it? For instance, any reason you can't write a
memcopy function that copied 16 bytes at a time?

I assumed that a big part of a language being faster than C is really about
the compiler generating faster code than a human programmer in either language
could do without thinking too hard about optimization, and not so much the
theoretical top speed. As I understand this is the case with assembly vis a
vis C.

~~~
bunderbunder
_Couldn't carefully crafted C pretty much fix every potential case where
another language could beat it?_

Yes, but one runs into the same problems as for carefully crafted assembly:

\- People who have the skills necessary to produce "carefully crafted" code
don't come cheap.

\- All careful crafting often ties the code to a specific target platform. For
example, the gyrations one might through to make the code more SIMD-friendly
might be detrimental to performance on a platform that lacks SIMD.

------
nivertech
C can be fast (icc) and slow (CINT) depending on compiler/interpreter and
OS/platform.

MSVC on Windows can be 40% faster than gcc on the same platform. I think icc
(Intel C Compiler) can be several times faster than gcc for some workloads.

I can write OpenCL code, that will be up to 100 times faster than plain C.

EDIT:

The reason for this, is that we still use procedural languages rather than
declarative.

In declarative language I would say: "The content of this block of memory
should be identical to the content of that block of memory." I would also
specify that blocks are non-overlapping, if it's not possible to infer from
the block definitions themselves.

Instead of this, memcopy C code describes procedure of iterative byte-by-byte
copying. This is only one way out of many to do it and maybe it even was the
fastest way to do it on PDP-11, but not on modern or future machines.

Similarly if you trying to micromanage your employees, you will not get most
optimized result.

To have the best performance, you do not need to be Close-to-The-Metal(tm).
You need to be able to express what your desired result is in the highest
possible abstracted, but still correct, way.

~~~
ben0x539
This is basically an argument about language semantics constraining the
compiler in possible optimisations, isn't it?

~~~
nivertech
yes, I think we "micromanaging" computers.

------
ontologiae
Several possibilities :

\- A very clever and complete type analysis. The compiler can thus optimize at
best the code without runtime type-checking code.

\- If possible, a flow analysis : By analysing the bounds of each function,
compiler is able to remove a lot of unused code. For instance, if a variable
is defined by t = 2*n and long afterwards, there's a test which check
primality of t, the compiler can remove the test.

\- Compile code by rewriting algorithms that "takes in mind" locality of
memory, ie. all things described by U. Drepper in "What every programmers
should know about computer memory", ie2. rewriting algorithms to avoid cache
miss, etc...

\- Automatic template-like mecanism : the compiler is able to make partial
execution of the code, even in array, so all the code which can be calculated
because you have the datas should be directly compiled. Imagine you have a
regular expression library and you write your regexp in your code (just the
regexp) : the compiler should be able to produce an automata.

\- It is also said : be able to use SIMD instruction.

Because of this, it is better to compile a high-level language with a very
clean semantics : you can much easily reason about your semantics and more
easily rewrite some algorithms.

------
ers35
The author says "In C99 the restrict keyword was added, which we could use
here to encode that src and dst are different from all other references. This
mechanism helps in some cases, but not in our example."

Doesn't the example below show otherwise? Note the presence of movdqu in both
memcopy_normal and memcopy_restrict and how GCC emits five LEA instructions
without restrict, but only two when restrict is present.

This does not support the author's assertion that "Aliasing information is the
only one, where I am certain about speed improvements, because it is
impossible to reach Fortran-speed in C."

      #include "stddef.h"

      void* memcopy_normal(void* dst, const void* src, size_t count) {
         while (count--) *(char*)dst++ = *(char*)src++;
         return dst;
      }

      void* memcopy_restrict(void* restrict dst, const void* restrict src, size_t count) {
         while (count--) *(char* restrict)dst++ = *(char* restrict)src++;
         return dst;
      }

      > gcc -S -masm=intel -std=c99 -m64 -march=corei7 -O3 restrict2.c

        .file	"restrict2.c"
        .intel_syntax noprefix
        .text
        .p2align 4,,15
        .globl	memcopy_normal
        .type	memcopy_normal, @function
      memcopy_normal:
      .LFB0:
        .cfi_startproc
        test	rdx, rdx
        mov	rax, rdi
        je	.L2
        lea	r10, [rdx-1]
        mov	r8, rdx
        shr	r8, 4
        mov	r9, r8
        sal	r9, 4
        test	r9, r9
        je	.L7
        lea	rcx, [rsi+16]
        cmp	rdx, 15
        lea	r11, [rax+16]
        seta	dil
        cmp	rax, rcx
        seta	cl
        cmp	rsi, r11
        seta	r11b
        or	ecx, r11d
        test	dil, cl
        je	.L7
        xor	ecx, ecx
        xor	edi, edi
        .p2align 4,,10
        .p2align 3
      .L4:
        movdqu	xmm0, XMMWORD PTR [rsi+rcx]
        add	rdi, 1
        movdqu	XMMWORD PTR [rax+rcx], xmm0
        add	rcx, 16
        cmp	r8, rdi
        ja	.L4
        lea	r8, [rax+r9]
        add	rsi, r9
        sub	r10, r9
        cmp	rdx, r9
        je	.L5
      .L3:
        lea	r9, [r10+1]
        xor	ecx, ecx
        .p2align 4,,10
        .p2align 3
      .L6:
        movzx	edi, BYTE PTR [rsi+rcx]
        mov	BYTE PTR [r8+rcx], dil
        add	rcx, 1
        cmp	r9, rcx
        jne	.L6
      .L5:
        add	rax, rdx
      .L2:
        rep
        ret
      .L7:
        mov	r8, rax
        jmp	.L3
        .cfi_endproc
      .LFE0:
        .size	memcopy_normal, .-memcopy_normal
        .p2align 4,,15
        .globl	memcopy_restrict
        .type	memcopy_restrict, @function
      memcopy_restrict:
      .LFB1:
        .cfi_startproc
        push	r12
        .cfi_def_cfa_offset 16
        .cfi_offset 12, -16
        test	rdx, rdx
        mov	rax, rdi
        push	rbp
        .cfi_def_cfa_offset 24
        .cfi_offset 6, -24
        push	rbx
        .cfi_def_cfa_offset 32
        .cfi_offset 3, -32
        je	.L12
        lea	r10, [rdx-1]
        mov	r11, rsi
        mov	r8, rsi
        neg	r11
        and	r11d, 15
        cmp	r11, rdx
        cmova	r11, rdx
        test	r11, r11
        je	.L13
        xor	ecx, ecx
        .p2align 4,,10
        .p2align 3
      .L14:
        movzx	r9d, BYTE PTR [r8]
        add	rcx, 1
        add	r8, 1
        sub	r10, 1
        mov	BYTE PTR [rdi], r9b
        add	rdi, 1
        cmp	r11, rcx
        ja	.L14
        cmp	rdx, r11
        je	.L15
      .L13:
        mov	r12, rdx
        sub	r12, r11
        mov	rbx, r12
        shr	rbx, 4
        mov	rbp, rbx
        sal	rbp, 4
        test	rbp, rbp
        je	.L16
        add	rsi, r11
        xor	ecx, ecx
        add	r11, rax
        xor	r9d, r9d
        .p2align 4,,10
        .p2align 3
      .L17:
        movdqa	xmm0, XMMWORD PTR [rsi+rcx]
        add	r9, 1
        movdqu	XMMWORD PTR [r11+rcx], xmm0
        add	rcx, 16
        cmp	rbx, r9
        ja	.L17
        add	rdi, rbp
        add	r8, rbp
        sub	r10, rbp
        cmp	r12, rbp
        je	.L15
      .L16:
        lea	r9, [r10+1]
        xor	ecx, ecx
        .p2align 4,,10
        .p2align 3
      .L18:
        movzx	esi, BYTE PTR [r8+rcx]
        mov	BYTE PTR [rdi+rcx], sil
        add	rcx, 1
        cmp	r9, rcx
        jne	.L18
      .L15:
        add	rax, rdx
      .L12:
        pop	rbx
        .cfi_def_cfa_offset 24
        pop	rbp
        .cfi_def_cfa_offset 16
        pop	r12
        .cfi_def_cfa_offset 8
        ret
        .cfi_endproc
      .LFE1:
        .size	memcopy_restrict, .-memcopy_restrict
        .ident	"GCC: (GNU) 4.6.3"
        .section	.note.GNU-stack,"",@progbits

~~~
cliffbean
Yes, the author is wrong there; restrict is valid and useful in that memcpy
example.

It is true though that restrict doesn't solve all of C's aliasing problems
though. For example:

        #include <stdlib.h>

        struct array_3d {
          float * restrict data;
          size_t xmin, ymin, zmin;
          size_t xmax, ymax, zmax;
          size_t allocated;
        };

        static inline float *
        array_3d_elem_addr(struct array_3d *a3d, size_t x, size_t y, size_t z) {
          return a3d->data + z +
                             y * (a3d->zmax - a3d->zmin) +
                             x * (a3d->zmax - a3d->zmin) * (a3d->ymax - a3d->ymin);
        }

        void array_3d_add(struct array_3d *restrict dst, struct array_3d *restrict src) {
          for (size_t x = dst->xmin; x != dst->xmax; ++x)
            for (size_t y = dst->ymin; y != dst->ymax; ++y)
              for (size_t z = dst->zmin; z != dst->zmax; ++z)
                *array_3d_elem_addr(dst, x, y, z) += *array_3d_elem_addr(src, x, y, z);
        }

No amount of restrict keywords can tell the compiler that src->data and
dst->data don't alias here (putting restrict on the 'data' member declaration
inside array_3d doesn't mean anything here, because of the way restrict is
defined).

GCC manages to vectorize this loop, but only conditionally, with runtime alias
checks. That's ok for this trivial example, but it isn't always viable in more
complex examples. It's also worth noting that there are ways to rewrite this
code so that it does fully vectorize, though again it's helped by the example
being so trivial. The main point is that in Fortran, the alias rules are
strong by default, without the programmer having to do acrobatics.

Edit: formatting fixes

~~~
cliffbean
Also note that this restriction is in C itself. This is how restrict is
defined in the C standard. It's not specific to GCC or any other compiler.

------
kaiwetzel
The instruction set page linked in the article mentions: _To move a double
quadword to or from memory locations that are known to be aligned on 16-byte
boundaries, use the MOVDQA instruction_ \- would it not be beneficial to use
this instruction for most of the memory to be copied and only use the slower
variants for the leading and trailing bytes?

Does the C semantics prevent the compiler from issuing a run-time check for
the (rare) aliasing case and proceed with the fast version in the common case?
(probably unrolled, too?)

Out of curiosity: The code uses a special counter variable _count_ which has
to be decremented separately - is this faster than testing for dst !=
behind_last_dst_prt ?

(aside: my gut-feeling tells me that if the combination of C/8086 can't pull
his example of at the maximum memory to processor transfer speed for
sufficiently large input vectors, there is something seriously rotten ...)

------
mmphosis
> How a language can be faster than C?

Turtles. Turtles all the way down.

Translation: If your language is "Turtles" then you need to use "Turtles" all
the way down the entire stack, and that includes your "Turtles" CPUs.

------
prewett
Personally, I think the most interesting part was the link to a student who
used Scheme to generate a really fast C implementation of a matrix-multiply
algorithm, which beat all C code except for one that included hand-coded
assembly (and with additional improvements could have beat that, too).

<http://www.cs.indiana.edu/~jsobel/c455-c511.updated.txt>

------
cpr
His third point is addressable by using LLVM as your target. Optimization can
occur at compile time, at link time, and at runtime, if you decide to do the
final LLVM-to-machine-language translation at the latter point.

Inter-module optimizations (e.g., removing dead code) can occur at link time
as well.

So there are better tools now that compiler writers can target to start making
progress in at least one of these areas.

------
furyofantares
The memcopy example isn't an optimization issue, it's a correctness issue. If
the described behavior of memcopy is what was intended then of course the
compiler can't use that particular optimization, and it couldn't in any other
language, either. However, if the author was intending to write a function
with behavior like memmove, then the issue is that the code is incorrect.

------
mynegation
A nitpick: memcpy example is flawed: memcpy's behavior is undefined if source
and destination overlap. One should use memmove for that.

~~~
pascal_cuoq
This was my initial reaction, but he is talking about a function that happens
to be named memcpy() and what the compiler is allowed to do with the provided
source code. So you should actually blame him for defining a function with the
same name as a standard function (an undefined behavior). What would make his
example correct is to use any name other than a reserved one, that is, not
"memmove".

~~~
udp
If you look more closely, he actually called it "memcopy", not "memcpy".

~~~
faithful_droog
If you look more closely, you will also see that his memcopy dereferences a
void * (and performs some pointer arithmetic as well). Apologies for my inner
pedant getting the better of me.


You could have invented that Bluetooth attack - octosphere
https://blog.trailofbits.com/2018/08/01/bluetooth-invalid-curve-points/
======
joecot
"You could have invented that Bluetooth attack"

 _Proceeds to explain elliptic curve mechanics that would make most readers
completely glaze over._

Maybe they mean they just mean their normal reader base, who has an attention
span for those sorts of details? Their assertion that an average reader could
_understand_ the attack might be true, but the "could have invented" is a a
bit far fetched.

~~~
munin
I think the argument is something like: you could understand what invalid
curve point attacks are, and once you did, you could look for them everywhere,
and if you did that, you would have found this error as well.

The math behind invalid curve point attacks is pretty straightforward, it's
some polynomials and points on the Cartesian plane. You saw this stuff in
elementary school.

Then, someone needs to point out to you "oh check out what happens if you
allow for invalid points" and now you have a pattern to go hunting for. Then
it's luck - do you get to Bluetooth before someone else, or do you find
something else, or do you just re-discover other peoples stuff?

Maybe it's elitist to say "the math is pretty straightforward" but you know
what, it's a system of two variables and you can plot it. You need to know
about division, multiplication, and modular variants. No monads, no tensors,
no mixed Gaussians or method of moments or greek letters or 128 dimensional
spheroids.

Maybe that kind of math makes your eyes glaze over but I am pretty confident
that if you cleared your mind and sat down with pencil and paper and gave it
an hours honest effort, you would come away with an understanding.

~~~
tptacek
You definitely didn't do the math for invalid curve attacks in grade school,
since you also need CRT and the notion of group order. But I think your first
sentence gives a great charitable interpretation of the title.

A way I like to think about these things --- from the perspective of a
vulnerability researcher, not a cryptographer or mathematician (I am neither
of those) --- is that there is a very little bit of math you need to put some
extra tools in your belt, and then the rest of it is programming; working
through these kinds of exploits feels a lot like implementing heapsort or a
spanning tree reduction for the first time feels like. I find that empowering,
because while I can't bang out Kruskal's algorithm off the top of my head, I
know if I sit down with it for 20-30 minutes I'll get it working. After a
little bit of reading (an hour or two tops), same with this attack.

------
tptacek
Here's Sean Devlin explaining ~85% of the same detail in a general
introduction to invalid curve attacks:

[https://toadstyle.org/cryptopals/59.txt](https://toadstyle.org/cryptopals/59.txt)

I like Sean's definitions best and find them the most accessible way to get a
the topic. Don't think about curves as geometric objects and don't think of
points as coordinates. Think of the curve as an equation y^2 = x^3 + ax + b
--- come on, you did this in high school --- and a point as an x,y pair that
satisfies the equation (pick an x at random! solve for y!). Now host that
equation in a finite field, so the x and y needs to be an integer mod p. You
can code this in Python or Ruby, right now, and get an intuition for the
basics of how it works.

For invalid curve intuition, I also think Sean is right: understand DH and
subgroup confinement first:

[https://toadstyle.org/cryptopals/57.txt](https://toadstyle.org/cryptopals/57.txt)

I think the fundamental thing to get your head around even if you're not going
to take the hour or two to code the attack up (do that, though! it's a fun
couple hours!) is to notice that, if for prime p a curve has order q < p
points, most combinations of integers mod p can't be valid points. If you've
got a "sage" prompt lying around (always have a sage prompt lying around),
make a curve E = EllipticCurve(GF(17), [3,4]). Look at the length of
E.points(), and notice how much smaller it is than the number of possible x's
and y's.

Then, the interesting part about the attack is that if you send an x,y pair
that doesn't satisfy the curve, it might satisfy the equation for some other
curve. If you're smart you pick a point that lands in a curve that's insecure,
for which you can quickly use brute force to solve the DLP.

I agree that the hook in this blog post title is misleading; you would not
have found this attack. But it's misleading in a sort of empowering way: you
are not a graduate course in mathematics from grasping the intuition of the
attack or coding a model exploit. You might not even be a day away from it.

If you read this blog post and Sean's posts and you're stuck on something, I'd
be interested in knowing what and seeing if I can push you through it.

------
diamondo25
This title is pretty clickbait-y, as I would most likely not have invented it.
You really have to know the internals and this doesnt even apply _only_ on
Bluetooth but DH implementations in general...

~~~
JadeNB
> This title is pretty clickbait-y, as I would most likely not have invented
> it.

The title is slightly tongue in cheek; it's as much a genre as "considered
harmful":
[https://www.google.com/search?q=%22you%20could%20have%20inve...](https://www.google.com/search?q=%22you%20could%20have%20invented%22)
.

------
barbarr
Can anyone explain how figure 1 is y^2=x^3-x? I feel like I'm going crazy.

~~~
NamTaf
I agree. I just tried substituting in a bunch of those points and none solved
that equation. I don't see, for example, how the point at (12,56) fits that
equation at all, since it computes to 56^2 = 12^3 - 12, or 3136 = 1728 - 12,
or 3136 = 1716. That isn't even remotely close, so it's not me just slightly
misreading the points.

~~~
Deathmax
The author omitted the mod n, where n = 71 in this case. So 3136 mod 71 = 1716
mod 71 = 12.

~~~
NamTaf
Oh of course! Thank you, that makes a lot more sense.

------
louprado
If I understand correctly, the Bluetooth exploit also requires a man-in-the-
middle attack during pairing. Wouldn't the victim then see two Bluetooth
devices with the same name during pairing ? Also most Operating Systems then
order the list of devices by signal strength. Without physical access to the
victims home/office/etc., it would be hard for the attacker to have a higher
signal strength since most users would be pairing to a device in close
proximity. In a public place this could be easier, but even then it would
probably fail more often then it would work.

------
stevebmark
This is really poorly written. It's a perfect example of the common problem of
bad teachers in tech. Many engineers think they're good at teaching topics, or
try to aggressively teach others, but are only capable of explaining topics to
people who already fully understand them.

~~~
bigiain
To be fair - that blog post has perhaps lost some context being posted up to
an unintended audience.

Their headline on their website reads:

"Deepening the Science of Security Since 2012, Trail of Bits has helped secure
some of the world’s most targeted organizations and products. We combine high-
end security research with a real-world attacker mentality to reduce risk and
fortify code."

One would expect the target to whom they write their blog posts has some
assumed understanding of "the science of security", and they are looking for
articles which "deepen" understanding rather than explain it all from an ELI5
or completely non-understanding perspective.

(But you're right about a typically bad level of teaching and documentation in
tech. I still remember struggling ~25 years ago with Perl docs which explain
this using phrases like "This work just the same way as in awk"... Often
things are not much better these days.)


FastInit: a faster window.onload - agotterer
http://www.tetlaw.id.au/view/javascript/fastinit
I found this nice JavaScript class few months ago.  Thought I would share it... The class implements a kind of onload function queue. This will ensure that your initialization function(s) are called once the browser DOM is ready and not have to wait for all the images.
======
DanielBMarkham
This is one of those pieces of code that has been done a dozen different ways
(probably hundreds, even). I like this implementation though. Nice and clean
and short and sweet.