skysight-inc/HackerNews huggingface dataset:
I agree, one issue with js on embedded is that while it is fun and easy to prototype compared to C, if it is intended to be mass produced the variable cost for each unit will be a lot higher due to js needing more powerful->more expensive microcontrollers. If you would substitute C for something in embedded I personally would go for Elixir/Erlang or something that would actually provide some great advantages over C in terms of abstractions and VM:s.
How to Give That MacBook Pro a Second Chance
New York City Council Bypasses Mayor Bill de Blasio on Uber Policy
> This is a beautiful page, but my god, is it heavy

I'm already looking forward to the Oculus Rift version :)
What was the anti solar decision? The article doesn't seem to say.
It's not the linking process that make -j speeds up, but the optimization part.
Updated version of this Chrome extension that lets you add notes to any HTML element on any webpage.

This version includes sharing annotations w/others directly from the extension.
I don't think that graphic you're thinking of shows "world GDP" so much as "the centre of gravity of GDP across the planet": These are two quite different things. In any case, you might have in mind a map by McKinsey Global Institute in their "Urban World" 2012 report.

I'd disagree that that depiction was better designed than http://www.dannyquah.com/Quilled/Output/2010.09.27-Danny.Qua... or the animation http://www.dannyquah.com/Quilled/Output/2010.08-Danny.Quah-w... It depends on what you're trying to understand. For what you describe, I personally don't like so much the McKinsey graphic. This is discussed in Section 8.3 (in Chapter 8) of my draft manuscript http://bit.ly/1KeSicU on Ordering the World.
> You don't need global consumer brands when your country is the size of China.

Need? I guess not. But I think the point is that those things manifest themselves in a healthy market/economy/society, a healthy innovative market. If you're not advancing technologically, then you have no hope for your future. And that's what companies like Samsung, Toshiba, and Sony all do (in the electronics industry). They innovate. That innovation breeds more innovation and lays the groundwork/framework for future innovation.

That's China's biggest problem right now; they relied so much on theft of IP that they lack the infrastructure to innovate on their own. They're stuck on a ledge and can't go any higher without either technological handouts or stealing more IPs. Unfortunately for China, companies are becoming much better at protecting themselves having learned from past mistakes.

China is essentially the world's factory. That's all, nothing more, nothing less. That's all they will ever be until they climb down from their ledge and start climbing up again (starting over from scratch).

> They have 15% of the world's population

And? not sure how this is relevant. If anything, it's even more incriminating; they have that many people but so little to show for it. So little genius, so little innovation, so little advancement... It's proof that their current social, economic and political system has been a failure. They should be trouncing everyone. But they aren't.

> Corruption is being cleaned up

Their "corruption clean-up" has been just lip service. You'll note it was published first from China's own government-ran news agencies (Xinhua).

If you look at transparency international's corruption index (here: https://www.transparency.org/cpi2014/results) you'll see that they actually dropped 20 places from 2013 to 2014. Their corruption actually got worse, not better.

> we've never seen what happens when a large country "awakens" in the age of globalization.

Unfortunately, China's a long way from awakening.
Could say the same about southern Sweden (Skåne).
He's not saying that C isn't useful, but that for most problems it's overkill. Why inflict the extra burden on yourself -for no benefit-? Most code being written can be done just as well in a language with garbage collection, that has more powerful abstractions and paradigms as first class citizens...why not take advantage of them? Of course you can write those higher level concepts/abstractions in C, but the point is, -they've already been written-, tested, and documented, by other people. Why write untested, undocumented code that reimplements those things when you have no compelling reason to?
You are right, and this advice is wrong.

`int` is at least 16 bits, `long` is at least 32 bits, `long long` is at least 64 bits, and `size_t` is big enough to hold the size of the largest object you can allocate - and in most cases that is all you need to know.

The exact width types can be useful if you're marshalling data to and from an exact-width format, like a network protocol or file format.
Buybacks are functionally equivalent to dividends, and more tax-efficient (which is a whole other discussion). If a company's doing buybacks you're benefiting appropriately from your ownership share.

Both Google and Apple have now started paying dividends (Google has done it via the funky reverse-spinout of Alphabet, but again that's economically identical).
The image for Phnom Penh has some terrible compression artifacts, the other images and videos are beautiful and worth the bandwidth

http://graphics8.nytimes.com/newsgraphics/2015/11/10/places-...
And the 4K content is where?
T-Mobile's John Legere Goes Off the Deep End: 'Who the Fuck Are You, EFF?'
You don't really need to sign NDAs to read through java classes.
From a career perspective, I think it depends what you want to focus on in your career.

Go is actually very diverse in its applications, but certainly has the edge on rust for building web type applications.

I learnt Go in 2014 (largely by doing HackerRank puzzles) and its good to have it in your repertoire,

But right now I'm interested to learn Rust, because its a total different approach to anything I've ever done before.
>There can be little doubt that anyone seeing the image of Mickey Mouse (or even his silhouette), immediately thinks of Disney.

Image probably, but the phrase "Mickey Mouse" has acquired a fairly common meaning (at least in the UK and Ireland, don't know about the rest of the world) outside of the character - roughly meaning something like simplistic, shoddy or cheap.

For example, this (http://www.independent.ie/regionals/droghedaindependent/news...) article talking about a plan as a "'Mickey Mouse' solution to a much bigger traffic problem in the Dublin Road area." I suspect that few people over here would immediately think about Disney when they read this article.
From a career perspective, I think it depends what you want to focus on in your career.

Go is actually very diverse in its applications, but certainly has the edge on rust for building web type applications.

I learnt in 2014, and its good to have it in your repertoire,
But right now I'm interested to learn Rust, because its a total different approach to anything I've ever done before.
From the article:

Magistrate Judge Theresa C. Buchanan in the Eastern District of Virginia, who signed the warrant used for the NIT, did not respond to questions on whether she understood that the warrant would grant the power to hack anyone who signed up to Playpen, or whether she consulted technical experts before signing it, and her office said not to expect a reply.

So we can't even be sure that a judge knows what she's doing when she's asked to sign a warrant like this. They don't have to prove competence.
The premise it's all wrong. The reason we let an "innocent" person go free it's because you don't have enough evidence to prove that it is guilty in the first place. Imprisoning that person anyway just to be "safe" won't make you safer since the actual guilty person may still be around. If that is the case then you effectively pardoned him/her while exacting punishment on an innocent.

It's very easy to talk about the "innocent" person in the abstract but if you happen to be the innocent you will care very much about being punished without having actually committed any crimes.
I often pass by many places on the roadside where people are making money their whole lives, visiting, perhaps, few times some holy places according to their religion. They are wealthier than me, but I will never exchange lifestyle with them.

Money is not happiness. Experiences are.

BTW, long lasting happiness is a myth, a wrong concept. Joy, which children are bursting with, is the real one.
Simulating the World (in Emoji)
Ask HN: Why has Docker so bad documentation?
I'm trying to use Docker, for things that are slightly more advanced than running bash on the latest Ubuntu image. More specifically, creating a multi-host overlay network. They tell you on the site that Docker supports overlay networking, but on top of that, you can also use Docker Swarm. After that, they give you an example of how to create a swarm, but no examples of a simple overlay network.

They claim it (overlay networking) is now production-quality, but then all the docs say is:
(TODO: talk about Swarm and the overlay driver)

My experience was similar with other topics as well, and it's a bit annoying because I fully believe that containers are going to transform deployment completely...
My podcast interview with Jeff Clavier(SoftTech)
A really good source of info on this is DC Rainmakers blog. His comments [1] on the lawsuit are worth reading if you're interested.

In terms of heart rate accuracy, HR straps aren't always accurate either depending on placement, body and ambient temperature, moisture etc.
Certain heart conditions can cause the strap (or maybe more accurately the software processing the data) to significantly underestimate heart rate too.

[1] http://www.dcrainmaker.com/2016/01/fitbits-multiple-lawsuits...
The article seems to be implying that you should use both -O2 and -Os, but these are mutually exclusive options - if you supply both, only the last one specified has effect.
> on the other hand it forces you to think more about whether you actually need to do something ("should this string ever be more than X bytes long? Maybe not, might as well use fixed-size array - but I should not forget to check that length!"), which I think is overall a good thing.

While that certainly can't be a bad thing, you just have to keep in mind that it forces you to think about a specific set of details – the ones that matter for the machine ("how many bytes will the binary representation of this username require") – and it may fool you into forgetting to think about higher-level concerns ("Does å compare equally to å?").
Not A Snap; Didn't Read
Also, null-terminated arrays are used for other stuff that not are strings. For example : https://developer.gnome.org/glib/stable/glib-String-Utility-... returns an null terminated array of strings.
Which is a reminder to us all that the Certificate "Authority" system is broken..
Breaking down FRP
This is nonsense. They do have emotions. Hunger is one of them. Self-preservation is another. Pain is also very important.
Why data scientists need to be good story tellers
Thank you. That seems to be the feedback here (page isn't clear enough). Considering you run a service, how do you convey tell your users about new features in an engaging way?
> 3-4 months into programming Rust and you may just be getting past the phase where it takes you 10 minutes of fighting the borrow checker to get relatively simple code to compile.

This exactly is why I can never get past the first couple weeks of playing with Rust. Every few months I revisit it and every couple weeks after that I put it aside again.

When I was first learning C++ I spent a huge amount of my time inside the debugger trying to figure out why a pointer wasn't ... pointing. There was always a reasonable explanation that way my fault and if I had just understood what my code was really doing I would have coded things right and it wouldn't have crashed.

Now we have Rust that essentially takes away that entire problem. Just wipes it out by way of a clever compiler. Only now we substitute this same learning curve "debugging" the compiler rather than debugging memory space. (Probably a better trade-off in the long run. Rust sort of bets on that being true anyway.)

Go does not suffer from either of these traits. For me, Go is not often a "fun language" to code in but it's eminently practical and is remarkably fast to pick up for what it does express. I've ported a couple pieces of C# application systems to Go and they've worked really well. But it's kind of a grind unwinding the higher level abstractions from C# into the more primitive Go space.

I wish there was some way to bury Rust's borrow checker for those parts of an application where you don't want to care about it and then surface it gradually when you do want it. Because the elegance of the rest of the language is what pulls me back every few months.
A Never-Ending Lawsuit Turns 40
Show HN: Loader.swift – Facebook newsfeed style loading placeholder
>why has the state legislature not immediately begun impeachment?

I was under the impression that impeachment is not a "I didn't get my way, I'm going to remove you from office" card. It's not for validating the whims of the electorate because some of them think they're not being served. It's for bringing official charges to an elected official and putting them on trial. What charges can you file against the governor based on this short article and actually bring to trial?
Yes, and that's not always a problem. I remember this issue was addressed in my 'methodology' classes where it was explained that a lot of research has been done to figure out in which ways student/non-student participants differ.
Zim – New, Lightweight ZSH Framework
Netflix, Youtube.
How DigiCash blew everything
Thank you! Super helpful feedback. I'll add a second like explaining the problem this solves (replacing release notes, changelogs, etc.)

I'm from Toronto :)
I gotta plug OpenRESTy at this point. It's based on Nginx, and it's really easy to work with. It is my go-to REST solution for PostgreSQL.
TodoMVC: a reactive version
That makes no sense, unless you are looking at your tv thru a camera and 'zooming in'
It is even in the language - an emotion is what moves on. Hunger, pain, cold, fear. We learn by moving.)
Graal.js: High-Performance JavaScript on the JVM by Christian Wirth
> there are only `i32`, `u8`, `i16`, etc (I shamelessly stole this idea from Rust).

Those are very old ideas.
Show HN: Why Do You Need to Be Careful with Loop Variable in Go
Don't forget about the teenager who was charged simultaneously with being a producer & victim of child porn due to hostile courts Virginia, I believe. An 18 & 17 year old (or close to it) couple texting each other.
Yeah, websitetest.org looks like a terrible website on first glance, given the ads and all, but it's actually an amazing website.
How does it prevent such allocation? Can you not just mark the first read from an area to always return 0, and then allocate as soon as it happens? That also has the benefit of not having to zero anything if you're only writing to it.
If solar can't make it in Nevada without subsidies, the industry has a big problem. Nevada's population is mostly around Las Vegas, which is at 36° latitude and has 294 sunny days a year. It doesn't get much better than that.

Utilities are still buying back power, just at wholesale rates. You can still use the power yourself and buy less at retail rates.
Or you can get some of Tesla's batteries and store it for nighttime use. If your solar panel output matches your air conditioning load, this shouldn't affect you.
Sketches Library from Yahoo
Even on a modern non-embedded system, you aren't going to benefit from the MMU when calling calloc(). Your pages are only going to be zero'd when you first get them from mmap() or brk()/sbrk().

If you're sitting in a loop calling malloc(), filling it with data, processing it, and calling free(), changing malloc() to calloc() is just wasting cycles.
The ironic part here is that the Nevada utilities are accelerating their own demise by opposing rooftop solar. In a few short years, batteries will be cheap and plentiful enough that it will be unnecessary to cut deals like these with the utilities in order to have a profitable solar rooftop installation.

By removing the incentive for customers to cooperate with the utilities, the utility companies are further incentivizing the installation of residential battery storage, which will further reduce the utilities' influence down the road.
Some of this seems like horrendously bad advice:

- Using fixed width integers in for loops seems like a fabulous way to reduce the portability of code

- the statements in "C allows static initialization of stack-allocated arrays" are _not_ equivalent, one is a bitwise zeroing while the other is arithmetic initialization. On some machines changing these statements blindly will cause a different bit pattern to end up in memory (because there are no requirements on the machine's representations for e.g. integers or NULL or ..). There are sound reasons why the bitwise approach could be preferred, for example, because a project has debug wrappers for memset that clearly demarcate uninitialized data

- the statements in "C99 allows variable length array initializsers" aren't even slightly equivalent. His suggestion uses automatic storage (and subsequently a stack overflow triggered by user input -- aka. a security bug)

- "There is no performance penalty for getting zero'd memory" this is bullshit. calloc() might optimize for the case where it is allocating from a page the OS has just supplied but I doubt any implementation ever bothered to do this, since it relies on the host OS to always zero new pages

- "If a function accepts arbitrary input data and a length to process, don't restrict the type of the parameter." the former version is in every way more self-documenting and consistent with the apparent function of the procedure than his use of void. It also runs counter to a rule from slightly more conservative times: avoid void at all costs, since it automatically silences all casting warnings.

Modern C provides a bunch of new things that make typing safer but none of those techniques are mentioned here. For example word-sized structs combined with struct literals can eliminate whole classes of historical bugs.

On the fixed width integers thing, the size of 'int', 'long' and 'long long' are designed to vary according to the machine in use. On some fancy Intel box perhaps there is no cost to using a 64bit type all the time, but on a microcontroller you've just caused the compiler to inject a software arithmetic implementation into your binary (and your code is running 100x slower too). He doesn't even mention types like intfast_t designed for this case, despite explicitly indicating "don't write C if you have to", which in 2016 pretty commonly means you're targeting such a device
Don't agree with that either.

IMHO, "int" is perfectly acceptable if you just want to use the platform's preferred word size (and are fine with the possibility of it being only 16bit). Also, "char" is perfectly acceptable too if you're dealing with ASCII. This is valid for both the signed and unsigned variants.

The general rule should be using the language types as long as you're not assuming something about their size, only then use "stdint.h" because it makes your assumption more explicit.

Now, nobody uses "short" or "long" to mean "something smaller or shorter than the platform's int", so these are usually something to avoid.
There are slow rivers and quick ones. Even same river has spots with different rates of flow. But there is still no time.)
You should take on account that PDP-11 was pretty limited. You can't afford "wasting" memory on counters (for strings bigger that 255 chars) on an computer that handled few MiB at best, when you can use the null character trick, plus being efficient on these machine. Also, I think that not was motivation to make it secure on something that was initially a pet project on a unused machine.
It remains to be seen whether this applies to all firmware on the device. Hopefully it does, but I've seen too many similar claims by hardware manufacturers that turn out to mean "only these specific firmware bits".
Your options for "send details to M$oft" are "Basic, Enhanced or Full (Recommended)." Enhanced is selected by default. How thoughtful of them.

No explanation. This is hostile computing.
> this is Mozilla who have a large concentration of people familiar with browser technologies.

It does, but this is not the reason. Browsers have grown to contain a stellar collection of networking APIs (compared to the rest), and IoT devices depend on talking to each other. Indeed, the people at Mozilla working on this stuff know more about the nitty-gritty of the low-level than about standard Web development. The API is for the users.
If hiring people who aren't paid is not something you aspire to, don't do it.

Good luck.
Interestingly enough Peter Pan has a perpetual copyright in the UK. All proceeds goes to Great Ormond Street Children's Hospital. There's a special Act of Parliament for it it.
So where are the 128 bit addressable CPUs?
" and the always-active Slack room for the community is packed with about 1,200 users on their 41 channels, each of which is a topic-specific, skype-like chat room."

Chat rooms are skype-like now?

I suppose if you're talking about closed source.. :)
Same here. I've gone for long periods working primarily for one or two clients, and 1) I made more working part-time than the employees did full-time, 2) I got all the 'fun' new projects while the employees spent a lot of their time doing maintenance and bug-fixing (which they only asked me to do occasionally once I was a 'trusted' contractor), 3) I could go on vacations pretty much whenever I wanted.

There are plenty of downsides, of course, but it's a far cry from the initial fear I had of a life of constantly hunting for clients and constantly playing the 'is my client an asshole / will my client pay / is my client a micro-manager'-roulette.
Rust lacks higher kind types which C++ has had in the form of template templates since 1998. Rust also lacks the equivalent of variadic templates. If you want to see where that is different take a look at generic tuple manipulation in C++11 vs Rust.
The dollar’s international role: An “exorbitant privilege”?
Desktop OSs (not processors afaik) zero pages. To not do so would leak information between privilege contexts.

E.g. imagine /etc/passwd is read and later on the page it occupied is put back in the free pool. Another process comes along and asks for memory. It gets that page and can now read /etc/passwd .
"generally you want -O2"

I see this a lot shouldn't O3 produce better optimizations?
Is that people have large codebases? OR is it that O3 does some CPU/memory tradeoffs? OR something else?
If the strings is under 255 characters, using Pascal strings have the same cost. You keep "wasting" a single byte for null character or an counter. Null terminated strings becomes more space efficient when you need to store longer strings.
In some cases the version on F-Droid has been modified to remove the questionable functionality (tracking, ads, etc). So it's possible the google play version has that stuff even though the app is also available on F-Droid.
Except not really. You should use an int_fast16_t, which is the fastest integer type that has at least 16 bits. There's no reason to force a 16-bit integer which may carry performance implications when it's not necessary.
Most people don't have time or know how to protest even when they are pissed about law changes. There should probably be a class on this in grade school.
TIOBE Index for January 2016
>No compiling and linking required.

Seriously ? The only build/library ecosystem that I hate more than C++ is javascript/node - it has all the same problems (a bunch of competing and incompatible standards/tools/patterns that do the same thing) but lower quality because of so much noise from low barriers to entry (hey at least you need to get C++ to compile on one compiler - that's something).
Argument-dependent name lookup