skysight-inc/HackerNews huggingface dataset:
This resonates strongly with me right now. Benchmarking simple code that happens to contain interface{} casting always leaves me... feeling a little down.

I benchmarked some go code this week between use of an `atomic.Value` and a `sync.Mutex`. Use is vastly biased towards reads (almost no writes, and thus no need for exclusive locking), so I expected the atomic.Value, being a teeny tiny wrapper around CAS primitives, would be faster.

And it's not. Single-goroutine use of atomic.Value is actually slower than use of the exclusive sync.Mutex in my benchmarks. Why? Compare-and-swap should be just about the fastest synchronization primitive possible. So, what else is wasting time?

As far as I can tell, it's the interface conversions that atomic.Value (and I, as the consumer) have to do. The sync.Mutex sits next to the var instead, so the var still has its own type info that way, and so though the lock is heavier, there's no casting. (Mind, this is not a huge speed difference -- this is faffing around at the 10s/100s of nanosecs here. I'm far enough inside a hot loop it matters; many applications won't be. But still: it just startles me atomic.Value is slower here. I'm going to go out on an opinionated limb here, but: It shouldn't be.)

I'm still going to use the atomic.Value, because it's algorithmically the right choice: as the structure it's covering grows, the amount of cost the exclusive locking would cause will increase, and with atomic.Value it won't. But it's... it just feels Odd to look at that benchmark.
The author seems concerned about creating custom elements for everything a site might need but isn't that what we all want - composability? It's the reason why libraries like React.js and Riot.js are so popular. Breaking everything down into components is highly desirable, and if they're portable like web components are then it's even better.
Ah I see, I had to have it in "open in Boreal browser" I guess -- originally had it in Safari, then in the in-app viewer, and didn't see that available. Ok.

Is there a way to up/downvote comments?

I've been looking for a new iOS HN app, and I do like the design of this, might just need some getting used to and a couple of minor additions. Great job!
Chinese(Pan-Asian, whatever), don't burn trash anymore for quite some time as far as I can remember, although I grew up in urban area, which might be a little different.

Honestly, I don't know where this stereotype comes from, and why the show runners choose to pick this one opposed to many others out there which might be even more interesting, IMO.
There's some controversy that the documentary overplays the drama and casts Billy Mitchell as a villain:

http://www.mtv.com/news/1560691/ex-donkey-kong-champ-finally...
Such an instrument exists!
http://www.rogerlinndesign.com/linnstrument.html

My biggest gripe with this notation is that it assumes you're playing in a key, so the lines go <D E F# G...> for the key of D. That causes the spacing for a D chord and an E chord to look different, even though they're composed of the same intervals.
It's funny that web components were already included in Internet Explorer 5 back in 1999! They were called "DHTML Behaviors", but the idea was the same.

Behavior components encapsulated HTML, CSS and script content, and had a .htc ("HTML component") file format so they could be loaded from separate assets:

https://msdn.microsoft.com/en-us/library/bb250408(v=vs.85).a...

I guess they didn't see much use in the real world, even though IE had a >90% marketshare for years. That might be a data point in support of the OP's concerns about the usefulness of components.
I think separate buttons would be nice. The set of stories and comments I want to be able to refer back to is a relatively small fraction of the set I want to upvote.

Of course it also means another database table, or equivalent, in the back end.
But you could get the same result, much quicker, by levying tolls so high that rush hour looks like 9pm. Then commutes would be quick, but must people could only afford to go by bus.

Edit: and I dare say people might prefer that after a thorough CBA since it might mean paying $10/day for some private bus service but also saving an hour in commute time while also being able to use the commute to get something else done. But the prospect of tolls that high and riding a bus have a big "ick" factor for a lot of people, so...
I think the biggest problem is the online nature of it. When I was growing up, it was literally "you can play until the next spot where you can pause". That doesn't really work with an online game like Minecraft where there is no definitive beginning and end. There's no "round" or "level" to beat. And there's almost assuredly at least one friend who can keep playing until bedtime, even if all your friends can't.

I think the only real way to "fix" the issue is to set strict time limits out of the gate so that your children learn early on to mediate their time.
>I only see mnesia partitions when the network is having issues. Maybe my network is better than your best network?<

Doubtful on the network thing. mnesia will partition then resync when the server gets really busy. As others have mentioned, it might have nothing to do with anything that Erlang is doing. It might be something external. It could just be a lot of traffic that causes it to fall behind. Either way, one missed message and then you're forced to fully resync.

>Resynchs are really slow, because "resynch" is copy data from the network. Mostly this goes close to the line speed for your network though<

Which means your other node has its interface maxed out, causing more service disruptions. I've never run mnesia on a 10gig network, but that definitely was the case with 1gig. I'm not really willing to test or run mnesia in a 10gig/40gig environment. Been burned by it too many times.

>Mostly this goes close to the line speed for your network though; be sure to move the data files out of the way on the node that will be receiving the copies: otherwise mnesia first loads those, then throws them away sigh. It would be pretty nice if there was support for logging changes when a node is down, though.<

Which again, is another sign that it's not robust enough for Internet application usage. Probably OK for some 1990's phone switching, but not for how distributed systems are built today. How are you going to manually move the files out of the way in today's world of systemd automatically restarting failed daemons? Manual operator intervention? Thought so, and this is why ops teams hate mnesia.
I don't see anything in Russ Cox's answer that proves your statement. If there is any conclusion to that post, it is 'We can probably do it. But we are not doing it now because we are too afraid that we do it wrong, like Java.'

My problem with the Go team's line of reasoning is that they always cite Java (erasure gives problems) and C++ (too long compile times), but there are many languages that have implemented parametric polymorphism nicely ages ago (C#, ML, Haskell).

Sometimes I wonder if it is the lack of a person like Philip Wadler on the Go team who can hash out how to best fit generics into Go's type system.
It has everything to do with Ruby.

With Go, Node.js, Erlang/Elixir, you don't enter the stage assuming that every operation you do is actually going to block others.

Concurrency is not a first-class concept in Ruby (nor Python).

Yes, EventMachine exists. Ok, it's not the standard nor norm, and I would wager most Ruby programmers have heard of it but haven't actually used it.

Even if you're using EventMachine or Twisted, those technologies are infectious (by necessity, not complaining here)- everything you build or use needs to utilize those primitives to work successfully.

In Node.js, the assumption is that nothing will block a calling thread (in favor of asynchronous callbacks).

In Go, the assumption is that goroutines (via a semi-preemptive scheduler) will not block their caller.

In Erlang, the assumption is that processes will not block one another (with a fully preemptive scheduler).

As a fan of Node.js- I will state, not having a widely-accepted, standard interface for building concurrent programs (vs. the soup of callbacks/Promises, associated async/await implementations, coroutines via generator functions) has been a severe detriment to the community.
Love these types of articles.

Also, if you develop for, say, the Apple Watch, there's a goldmine in looking at classic console games and how they made use of constrained resolution, memory, colors.
So About That Whole Tech-Eating-Jobs Thing
I put a couple of things in but they weren't related to the show so much as the Valley itself.

Where's the downvote button, btw? Someone wrote that "Silicon Valley billionaires" are less douchey than regular billionaires and that shit ain't true.
Videotape | Austin, Texas | iOS Developer, Onsite

Videotape is a social app that enables users to record themselves into video.

Tasks will include:
Improving upon current features and scalability
Building out new features
Participating in strategy meetings and contributing to product decisions

Perks
Flexible work schedule for hardworking people
Cool office space in downtown Austin
Technology/education budget
Experienced leadership team, each with proven successful backgrounds
Relocation budget for anyone moving to Austin for this position

We're willing to sponsor a work visa for the right candidate. Austin is an incredible place to live and work, with a booming tech scene and close-knit tech community.

Email info@videotape.co to set up an introduction meeting and QA about the project, company and position. Thanks!
If the bug I reported a couple of years ago hadn't been fixed, then even running a full node wouldn't have been safe. Basically, some older versions of Bitcoin Core didn't validate signatures in blocks older than 24 hours in order to speed up the initial blockchain sync, so they could be tricked into accepting an invalid chain where someone spent bitcoins that weren't theirs if it was far enough back. This wasn't considered a major issue at the time because you'd have to do a 51% attack for 24 hours to exploit it. If a large proportion of mining nodes are no longer validating blocks, that assumption is no longer true - you'd just need to mine one block, plus enough to push the non-validating nodes over the 51% line if they weren't already, and wait. (Oh, and I think Bitcoin Core may still skip full validation of older blocks during initial sync even with the fix.)

The idea that all these miners aren't validating blocks before building on top of them now is scary. Everything's designed around the assumption that they will unless they're trying to actively attack Bitcoin.
Can't neglect to mention Dwarf Fortress and its 3D water physics. Of course the price is that DF will happily drop to many seconds per frame during big 'physics moments'.
I have thought a lot about this.

The primary benefit of TAOCS is that it's self-contained and all written in the same voice/style. It's much higher quality than a lot of other texts on the subjects it covers, but a given chapter is not necessarily that best text for the given topic.

It would be really cool if there were a "TAOCS" elective offered every single semester, just for the sake of fun. I would love to teach a course like that. I think it would work really well for e.g., an honors program ("to get honors in the major, one option is to enroll in this course for 4 consecutive semesters")

More generally, I think the policy that courses should use TAOCS where a chaper exists for the topic at hand would certainly increase the quality of courses at non-top CS programs (certainly, it would have at mine).

But in general, there are often texts that do a better job at covering a topic. E.g., this is a really interesting chapter, but I think there are probably better introductory texts on SAT (entirely subjective, of course).

Which is to say, if I know the area well then I will probably not use TAOCS. But if I don't then TAOCS is a safe choice.
The 90° isn't the big problem with traditional notation. It's that the same note in different octaves looks different. It's as if in programming you wrote a for loop differently for every level of nesting. The new notation draws against the same pattern of staff lines for each octave; plus, you don't have to remember sharps and flats from the key.

I've long wished for these two improvements, especially the first one; OTOH I'd keep the traditional whole note, half note, etc., for precision and concision -- the piano-roll style feels more like training wheels.
Show HN: Quatshy chat in a GIF stream
thanks for creating this
There is an interesting graph on how the block chain size has progressed over the years since Jan 2009 [1].

[1] https://blockchain.info/charts/blocks-size?timespan=all&show...
An architect did his job badly, thankfully an undergraduate student noticed the fault and the building occupant's lives were saved.
Yep certainly possible. It wasn't my aim thought as I wanted some Angular practice with promises :)
Are you offended by the definition of Jian Yang, or the actual character in the show? That's like being offended by Wikipedia's entry on the KKK because it accurately describes their position.

Anyway–it's not stereotyping Asians, it's stereotyping Chinese-national engineers in Silicon Valley. That's a pretty specific cultural subset.

> no one would accept this logic if it were applied to Black people or gays.

No? Because comedies have never had characters like Tracy Jordan or Franck Eggelhoffer?
The irony is reddit is a community website, the content is there thanks to the users, not just the moderators.

Pao has so far shown herself to be deeply out of touch with core values of reddit, I could elaborate.

However, Pao or not - how can you make a community-based site like reddit profitable without betraying the fact your users are doing the heavy lifting? I could elaborate here too.
This idea isn't entirely new (is anything?); for an earlier version, check out Klavarskribo: https://en.wikipedia.org/wiki/Klavarskribo. It didn't really take hold, because it's much more inefficient than normal notation.
But I suspect Go is popular mostly for its simplicity than features.

Definitely. I think there are a couple of reasons:

* It's familiar to anyone who knows C-like languages.

* The tooling is really good for such a young language (go get, go fmt, goimports, pprof, etc.).

* Java's tooling is still lightyears ahead, but a significant chunk of programmers dislikes the JVM for various reasons.

* It integrates well with the UNIX/C environment.

* Simplicity (someone mentioned in a thread a couple of days ago: Go seems to look what C++ does, and then does exactly the opposite).
This is exactly my experience as well.

If you provide synchronous, blocking interfaces and no concurrency primitives or expectation of non-blocking functions, IO, etc., people will use them.

In languages where concurrency is a built-in, understood pattern (Go, Erlang/Elixir, Haskell*, to name a few) people don't need to care.

Ruby has the worst of many worlds (sync I/O by default, incredibly expensive memory model, incredibly expensive lambdas, first-class functions aren't normally used beyond the "do block"-- nobody is passing them around, chaining, etc.)- I just don't see the reason to keep trying to squeeze blood from this turnip.
>Because Node.js has no threading, async I/O is the only choice. Result: 100% of the libraries are async I/O

All async I/O functions have a corresponding sync version.

E.g.

const buffer = fs.readFileSync(path);
Obama Plans Broader Use of Clemency to Free Nonviolent Drug Offenders
thanks for the suggestions! The Pawtucket Red Sox are actually listed in RI, but the other states do not. It definitely feels wrong. I have not entered independent league teams nor college teams, so this will hopefully change! Could you clarify what you meant when you were referring to an absolute scale?
It actually is worse than the article states because he calculated it at 24 months but he should have calculated it at 30 months. And if you lose, break, or even crack your phone before the 30 months--which isn't at all uncommon--you still have to pay for the old one and a new one.
Indeed. Basically the only somewhat difficult part is remembering the key signatures without having to count which notes are flat/sharp.
Nice work. But is it worth losing the advantages that JSX brings to the table with declarative UI to be able to use static typing, interfaces, etc from TypeScript? I dunno. After working fairly extensively with react in ES6 I cannot imagine having to lose the ability to use JSX.
What about a metric that accounts for speed? Should it account for that?

Intuitively, if two cars each average one death per million miles, but one of them had an average speed of 5mph, and the other 60mph, then the faster one should be regarded as safer because it maintained that death rate under less safe conditions.
Those are great, I could start reading those immediately for piano. I think it would be more enticing for newcomers to learn this "Guitar Hero sheet music" than traditional sheet music.

Just imagine if Guitar Hero had been done with traditional sheet music. I don't think it ever would have taken off.
The way the fix is going to come in will be via insurance. Person-driven cars will have to start paying crazy insurance compared to machine-driven cars, because people are so much more error-prone than well-made machines would be.
All I saw here was what Google tried to do with Wave
Argentinean programmer's house raided after he found a security breach
Please be civil, I'm not going to "fuck off" just because you argue in an aggressive manner.

All your verbal arguments are obfuscation. This is simple arithmetic.

What we would like to measure is the total post-tax and post-govt spending utility of a person:

total utility = post-tax compensation + govt spending per person.

That is what should be going up. But it's hard to measure all these things, so instead we can try to measure total compensation. When you redefine health care to be a tax, you are moving health care from the "post-tax compensation" category, to the "govt spending per person" category. Then you are arguing that post-tax compensation is going down, but that is just because of your accounting choice.

Your logic would only apply if the government was initially providing free healthcare, and then moved to a regime where healthcare was provided by employers, which is not what happened. The problem with your reasoning is that it deals with everything except economic fundamentals, i.e. total consumption per person.
Yes, I am developing a product to sell, and I hope it will become a profitable venture. I would not pay for Qt's commercial license if it was just for hobby projects. (For clarity, it's not necessary to buy a commercial license for Qt just because I want to sell Qt-based products, I could do that under the terms of the free LGPL license, but there are a few nice extras that come with the commercial license and I consider them worth the expense.)
Does anyone remember the beautiful cover stock used by Wired in the mid-nineties? That was a fantastic era for the magazine. Their online portal Hot Wired was ahead of its time. It's design lead Jeff Veen went on to found TypeKit. I had a subscription during that time and would excitedly check the mail every day. Before that, I'd trek to the local college to flip through their copies.
Yes except you are paying a high retail price for the phone. I paid $100 for a top-of-the-line phone and the rest was subsidized in my contract price, I didn't have to pay an installment plan. Yeah, if the phone lasted more than two years it would be an okay deal but how often does a smartphone ever last that long without being lost, broken, or obsolete?

You are better off buying it somewhere else--even on a credit card--and staying on the old $15/mo contract.
It's remarkable to me just how normalized the danger of cars has become, and how hard it is to push back against the status quo.

In contrast in the Netherlands as car use increased and deaths increased in the 50s-60s, there was a strong push back, with groups such as Stop de Kindermoord (“stop the child murder”) forming to protest against ceding the city to the car.

http://www.theguardian.com/cities/2015/may/05/amsterdam-bicy...

Subsequently the Netherlands didn't design completely around the car, has a very high bike share and is dramatically safer than the USA.

People point to self driving cars as the solution, but it's really just doing the wrong thing better instead of doing the right thing.

A better solution is to design our cities so that they aren't completely designed around the car. Reducing space for cars will not only make our cities safer, but it's also the healthier, more affordable and and more sustainable solution.
> All async I/O functions have a corresponding sync version.

They do, but they're widely frowned upon in most applications.

They're completely frowned upon in server-related applications.

I've only really seen them used in cheap build scripts, and now with async/await (via Babel's regenerator transformation), I don't even see that much anymore.
Then please stop teasing, and elaborate.
Ellen Pao is the butt of jokes here in Silicon Valley. She is poison. They need to get rid of her. I hope she never works in this Valley again.

(Now, Reddit (which I like) probably will never be a viable business for unrelated reasons.)
It probably has more to do with Michigan spending the least on roads out of all 50 states. Michigan has been hit hard, with Detroit as a symbol of that malaise. If you don't have the budget to spare on upkeep, then there will always been something that needs to be repaired.
Some context:
He found a security breach in the public voting system of Buenos Aires city, Argentina (elections are tomorrow). He brought it to awareness yesterday: http://www.lanacion.com.ar/1807352-denuncian-un-agujero-de-s...

The tweet reads:

After finding a vulnerability in the voting system they're raiding my house, people from computer forensics.