skysight-inc/HackerNews huggingface dataset:
The point is that these are trade-offs. The reason for the stupid API is because by getting precise multilingual handling, you give up either O(1) string indexing or representing characters in less than 3 bytes/char. If you naively use offsetByCodePoint on megabyte-long strings, you may find your performance slows to a crawl.

The reason for the memory leak is that you can either have fast substring() or accidental memory leaks when substrings are stored in persistent data structures. Not both. If they removed the optimization, then suddenly str.substring(1) takes O(1) time and on a megabyte string allocates a full copy of the entire megabyte. In some other use-case, the full copy is far worse.

There are others, too. Idiomatic Java uses '+' for string concatenation, but this is O(n^2) time when done repeatedly. (Except that HotSpot optimizes out the repeated allocations when all concatenations appear in the source code, but it still can't do anything about loops.) To get around this performance pitfall, there is StringBuilder. Now Java programmers need to know 2 APIs. Well, more like 6, considering there's also CharSequence, ByteBuffer, StringBuffer, and char[].

C++ has always had the philosophy of "The programmer knows their requirements better than we do". This is why it is complex; because problems are complex, and it is designed to solve many problems. It's very rare for a language designer of a popular language to actually be stupid; it's very common for a language to get used outside of the domains that the language designer optimized for.
What interview questions to ask when hiring a Data Scientist
I ask you this question because you seem to know what you're talking about, whereas I simply don't.

Watching the launch today, I couldn't help wonder why they don't use standard jets to get the vehicle to a height where a rocket could take over.

The highest a jet has flown is about 37km and LEO is considered to start at about 160km. That 37km though in my mind would be the toughest and most fuel costly to ascend.

Would it not save both weight and money to use jets and fixed wings up through the low altitudes before turning to rockets for the higher altitude ascent?
> A self-sustaining business model is the better way to develop space technologies.

It's a good way to improve space technologies. SpaceX builds on a lot of the research and development NASA did with taxpayer dollars, just as Apple benefited from government subsidy and investment in things like early computers and the Internet.
As a gawker headline put it; "White Men Upset Wrong White Man Placed in Charge of White-Man Magazine"
Ha, I guess someone started this awhile ago.

https://github.com/judofyr/duktape.rb

I opened a PR update it to 1.0.
Anyone else notice that Hacker News has been systematically keeping articles about Police, Michael Brown, or Eric Garner from reaching the front page? This reminds of a post some months ago showing that any post with "NSA" in the headline got a 50% handicap to its points ranking. I wounder what the handicap is for this article.
I strongly disagree.

While for profit sounds great, and does work amazingly well at a large number of US, EU, and multi-national corporations. It also doesn't.

Complex scientific programs can have developmental studies measured in decades. Which even very healthy multi-nations can't stomach. Selling a 50+ year ROI R&D program is really hard, and will likely get you laughed out of the boardroom.

But this is ultimately something that happens in academia. Due to largely public funding. Because as an charitable entity profit doesn't necessarily interfere with development and/or research of new ideas. Your goal is literally to piss away money experimenting on things.

While business and innovation to go hand in hand very happily. Business by definition don't transcend profitability. It is their goal. So while they do join hands for the short term, this is a short fling, not a life long love affair.

:.:.:

Also SpaceX does seem impressive. But everything they've currently done was done in the 1960's, without modern computing, or even integrated circuits. I like SpaceX but they are literally riding NASA's coat tails.

A structural analysis of a rocket engine can be done in a CAD simulation. Instead of by 5 guys with slide rules, and an IBM batch processing computer barely performing 100 KFLOPS.
Shame you're downvoted, because you're pretty much right. Don't get me wrong, correct code can very well be written in C/C++. It's just 95% of the programmers using those languages are not very skilled. The programs tend to be wrong and fragile. In C++, most of this fragility derives from its C-roots.

C/C++ is also a poor match to today's CPUs. It's very slow compared to what the hardware is capable of. Compare for example with Intel ispc (https://ispc.github.io/). It gives some idea how much performance we're currently missing.

When C was young, memory latency was typically 1 or 2 clock cycles. There was no pipelining, at most a simple state machine that would finish in a few clock cycles. A branch didn't cost much. A few cycles at most. Neither did a pointer reference. Random access was almost as fast as sequential access.

Today's CPUs have memory latency of 150-300 clock cycles. A modern CPU core can typically retire 1-4 instructions per clock cycle. A single instruction takes typically about 16 clock cycles from decoding until retire. So CPUs have to often execute blind and just guess where the execution flow will go. Branches modify this flow. CPUs simply guess the flow, branch predict. When they're wrong, they just have to invalidate currently executing instructions and start again. Branches are something to avoid. Especially unpredictable ones. Function pointers are branches. Even though they can be predicted, they often just fall out of the branch predictor cache.

We need something that can minimize the costs modern CPUs are bad at. C/C++ is very branchy and uses slow function pointers often (vtable, switch jump tables, etc).

The problem is, there's more variation among CPUs than ever before, even within same instruction set architecture. For x86, not only the costs for instructions are wildly different, but the instruction set support is fragmented.

C/C++ is not the last word. Unsafe and way too slow compared to what current hardware is capable of. The problem is, the language that is safer and a good match just does not exist yet. Some safety can be sacrificed for greater speed, but it should be situational choice by the programmer, not the only way or even default.

C/C++ is what I do at my day job.
I was thinking the same thing (disclaimer: i submitted it) but it's definitely weird the article is lingering @ 40
I'm usually working with one client at a time, but as you surmised spend considerable effort keeping the sales pipeline bubbling. Haven't had any time without work for the past couple of years unless I wanted it.*

I should probably point out that "maximising my billable time" isn't really an important goal for me as a freelancer, so we're likely talking about a different business model. You'll hear this a lot from patio11 and tptacek, but overwhelmingly, my goal is to provide as much business value to my clients as possible and charge accordingly.

You don't necessarily have to position yourself as a content marketing/CRO/Security/Sandwich-making consultant to do this, just find a way to make or save your clients buckets of cash and you can charge them whatever you want.

*: That makes me sound like some sort of rockstar freelancer, but in reality I'm a boringly average Rails developer. I get and keep clients by working really hard on sales and treating existing, long-term clients like my family's financial security depends on them (hint: it does!).
Same here - tons of cabs just hog the road like it's their priviledge to park there.

I don't see lyft drivers doing this.... but then how do you know lyft drivers are even hogging the road? Even if they have the purple mustache then it's in the front. Uber?
>Does it make sense for NASA to be doing this in parallel with Dragon?

it is called competition - a best known way to get 2 of something at the total cost of 2X when otherwise it would be only 1 inferior version of that something at the cost of 10X
> I appreciate the historical tradition of using the photo of beautiful young Lena Söderberg as a test image, but it's time to move on. It's fun for us hetero males, but like it or not, this sends a message to young women that they aren't welcome in this field.

I find your comment a bit strange. I am an heterosexual male and I find this picture utterly uninteresting from a sexual point of view. To me, the appeal of using this pictures is sheer seventies nostalgia... I'm too young to have been alive in 1973 but I'm old enough to remember gawking in awe at the wall of the computer room adorned with output from the first desktop color printer I ever heard of or the first laser printer I ever saw. The example picture used was Lena. The picture reminds me of old computer rooms... I don't even know who the model is and I don't even find her pretty.

By all means use a better picture... But when a Hello World moment is required on a printer, this one is a very strong contender.
Most helpful thing I ever learned about Bayesian statistics came from Kant: all of a sudden the "prior" and "posterior" were easy to remember. In his introduction, he discusses the origin of synthetic knowledge, and sets about distinguishing between a priori and a posteriori knowldge: that which one had before, and that which one has after. Of course we all know about "a priori" but I had never associated "a posteriori" with the same line of thinking.

https://en.wikipedia.org/wiki/A_priori_and_a_posteriori
I naturally started saying in my head "bee-pee-gee", but since the P stands for portable, maybe even "bee-porg" instead of "bee-peg"? :)
What part of

"it has to do with developers getting really frustrated at the stalled pace of development on the Joyent branch"

is so hard to understand? Cuz this gets incessantly repeated in a calm, rational manner by people involved with the branch.
I'm not even clear on how you could reasonably bill hourly for on-site work. Your client made you travel to their office and then back. Your day is shot; your client ate the whole thing up. They pay for a day.

The universal convention in the US is that a work-day is 8 hours long. You don't need to spell that out (doing so just invites questions and unwelcome negotiation). Work an 8-hour day. If your client has a problem with that, they'll tell you, and then you can negotiate. That negotiation may end up with your rate jumping up (GREAT: that's your new rate there forever), or with you jettisoning the client.
On Firefox I've been using HN Utility Suite.

https://addons.mozilla.org/en-us/firefox/addon/hn-utility-su...
Preparing for the future of AngularJS
Orbital velocity at LEO is ~28,000 km/hr, but as you get further away from the Earth, your velocity decreases. Orbital velocity at the distance of the moon is only ~3,700 km/hr. (Obviously this all depends on your reference frame...)
Project Honeypot is indeed great – I've been running their collectors for years on a few spare domains, racking up a fair number of harvesters.
The cost of a Shuttle launch was $450M and carried 24,400 kg & 7 people to LEO. The only thing that can compete with that short of the Saturn V is the Delta IV-Heavy, which is $340M per launch and can carry 28,790 kg to LEO.
Because Julia has been carefully designed to allow functions to compile down to very fast machine code. There are a few important design choices that are necessary to make it possible to do this (type stability, etc) - there are a few talks about the design principles that went into making Julia.

However, numerical Python can be nearly as fast as C as well with very, very little additional work (using Numba means adding @jit on top of a function). The downside is that Numba only works on the 'numpy' subset of Python, basically.
Actually, it is very much connected to the probability of any one randomly selected marriage failing. Any specific marriage, of course, you'll want to look at the rates of similarly-situated marriages (the same sources that give numbers in the neighborhood fo 50% for the overall divorce rate often report different rates for, e.g., first vs. subsequent marriages, and those that I've seen have consistently had lower divorce rates for first marriages and increasing divorce rates for each subsequent marriage.)

It doesn't make sense to exclude some marriages from something and calling it the overall divorce rate, even if there are cases where the most interesting divorce rate isn't the overall rate.
when talking about space travel, speeds and distances aren't relevant the same way they are planetside. in space travel, it's all about who's gravity well you're stuck in, and how much delta V itll take to transfer to a different gravity well.

if we're talking about probes, the delta V aspect becomes a lot more fun when you consider the web of gravity slingshots that can be pulled off to up your dV
Such a great comment.
Show HN: Markdown Style Guide
Wait, so can quantum computers now crack public key cryptography, or not?
I've been using Hacker News Collapsible Comments [0], since I enjoy the default look of HN, but wanted to collapse the comments.

[0] https://chrome.google.com/webstore/detail/hacker-news-collap...
You can give scripts names using the sourceURL pragma: http://fitzgeraldnick.com/weblog/59/

And I'm not sure what you mean about the source. I see the correct source when I debug evaled scripts in Firefox Nightly.
Thanks for the reply.

I'd like to avoid the cost of office space but I would literally not do an iota of work from home. Home is for home stuff, work is for work stuff; that is how my brain works. I'm in Europe and my desk is costing me €160/month so it's not exactly an especially taxing expense.

I keep my ear to the ground with regards start-up news but I think I'm going to spend some time listening and reading to some of the resources you and others have posted. Hopefully it will help me narrow down what I'll ultimately set out to create.

And thanks for the offer. The best of luck to you as well.
Name.com is offering $1 .ninja domain names today
How to safely pass symmetric encryption keys over an insecure channel
I'm not really sure what the point of this post is. Julia is a fun language to play with, it has a great and very helpful community and, in its niche, it's very good. Its creators have been very good OSS citizens and joined forces with IPython.

If you don't like it, don't use, but don't piss and moan about the fact that some people enjoy it.
https://www.ncjrs.gov/pdffiles1/nij/238488.pdf

> The majority of employers indicate that they would “probably” or “definitely” not be willing to hire an applicant with a criminal record.
It was just an attempt at a joke - but I got my kings confused, Renly for Robb Stark. Doh! I'll turn in my nerd card at the door.
Not sure if you're trolling, but I have a spare minute...

- If I post a picture of a cute kitten, does it mean I look at a cat as an object? That I will only under-appreciate all animals because I liked a photo of one?
- If I post a picture of my mother or father, am I objectifying them?
- What if I take a picture of a street performer who's doing some awesome thing and post it... am I reducing them to simply an object of attraction?

I just said it didn't affect me one way or another... that it is just an image. If someone thinks this image means I view a woman as an object, they are projecting THEIR OWN ISSUES onto me. That is the ONLY way that it could be offensive, in that they are choosing to be offended by something that 99% of the population think nothing about.
I can't imagine ever wanting to spin up a hardware HEVC decoder context every time I want to render an image. That would enormously slow down display of a web page with this format.

Edit: decoder, not encoder
Why don't you find a set of great test images (under suitable licence) then run those through the wide variety of image formats at different settings, and host it all on a website? (Put a few ads on it and you have nearly passive income, if the hosting isn't too much)
No need to apologize! It's refreshing seeing peoples take on things.
Looks like the algo attacked was already a quantum algorithm, not classical computing algorithm.
Convert Kinect Depth Map Video to Auto-Stereogram
A high price of power would magnify the effects of poor insulation.

Someone paying $5,000 a year for electric has strong incentives to make improvements, so I was wondering about the specifics, not trying to make a brilliant suggestion that all they need to do is put up some pink foam.
Sounds like snake oil to me.
Can anyone recommend an extension for firefox?
> Wouldn't that remove some of the downside of a life of crime.

That's a problem if prison it to be primarily punitive. I'd prefer it were rehabilitative, and thus focused on "what's the best way to turn this person into a productive, positive member of society once released?" I'd also prefer a basic, community college-level education be available to all, not just the incarcerated.
Lattice-based public key schemes are designed to be quantum resistant. So this is a troubling development, because it might indicate that other lattice-based public key schemes are vulnerable to similar attacks. It might be very difficult or even impossible to create quantum-proof public key schemes.

Fortunately, though, a quantum-proof signature scheme (meaning no encryption or decryption, just signing) has already been developed: Lamport Signatures. These rely on the security if hash algorithms (such as SHA256), which are not weakened by the existence of quantum computing.
I love how every day there is a new post about R and statistical data analysis. It's really a hot topic. I hope somebody could upload a course using measure theory for the ones like me interested more in the abstract probability concepts.
Vidra spoke in what one witness described as “Silicon Valley jargon,” and, using a tech cliché, declared: “We’re going to break shit”

Indeed.
You can bill daily and still rotate through work for 3 different clients at a time. You don't even need to make special arrangements to do it. Just do it in the background, get your work done competently for all your clients, and be honest. You'll be fine.

The only thing we're telling you not to do is to break your bills out by the hour. A whole lot of bad stuff happens when you start billing in sub-day increments.
Magic: The Gathering, That Old Nerd Favorite, Is the New Poker
At scale it becomes easier, since with 10 houses each house represents 0.1 of maximum load, and with 100 houses each house represents 0.01 of maximum load, so there are more opportunities for any particular device to draw power from the grid since there will be more other devices ready to turn off at that time.

Upgrading to city-scale means that the individual consumer will be less likely to have to wait for their electricity ration.

The hard part is defining the system for such a "smart grid" to safely coordinate activities while being resistant to tampering, spoofing, or other cyber warfare.

As an example, a smart grid will be able to deal with "time of use" charging, meaning that solar electricity produced during the early morning or late afternoon will be far more expensive than what is produced at noon/zenith. A malicious party might attempt to fake the production of electricity in order to get third parties to "buy" electricity that was never produced. This will lead to brown-outs as there is more demand than generation, while the fraudster "selling" the fake electricity will be quite hard to catch.

Even worse, a fraudulent network company might decide to under-meter your production so they can make a profit from the extra electricity that you produced that they aren't paying you for.

Starting at the "four neighbours build a DC network" level, how do you determine which of your three neighbours is not producing electricity when they claim they are?
> Is a gendered word really different?

Yes. A typo is objectively wrong (as objectively as you can be in such matters, anyway). Gendered words is a matter of style. One style is to only masculine pronouns, another to only use feminine, to mix them, to avoid them altogether... and it's not clear which are better. Avoiding gendered pronouns altogether might be easier on the eyes for some people, for other people it seems confusing (singular they, what?), for others it is simply grating and hard to read, etc. Similar trade offs for the other options, of course.

We might as well have people who object to words that they interpret as being offensive, like using the word "right" to indicate "correct" or "good". They might feel that it is biased towards right handed people, and that argument seems to actually have some linguistic precedent - even other than English, "right" in some Germanic languages is also a synonym for "higher", another word with "good" connotations. Even beyond this far-fetched scenario, consider all words that could be argued to have a sexist background. Do we ban all of them, or do we just accept that although they have a nasty history, that history does not necessarily translate to how we intend to use them in this day and age?

I also remember some troll on GitHub that started to complain to a lot of repositories - after the Node.js controversy - that their documentation was being sexist. And many of the owners fell straight for it, because apparently it was a well executed troll, and/or they didn't want to risk being dismissive (because, you know, that could end badly for them).
There's no reason to wait until the I-frame format is finalized - a still image format would probably be a separate codec anyway, so compatibility isn't important.
I love how every comment here links to a different implementation.

I also made one (for Firefox/Greasemonkey),

https://github.com/tom-szczarkowski/hn-stuff
I'd love any kind of feedback. For more "precise", "well defined" issues, I propose that you open an issue at: https://github.com/cirosantilli/markdown-style-guide/issues as it is more manageable.
I've read that before. It was definitely a game changer in terms of how I view where the value of software derives from.
i was in court to clear a minor ticket yesterday in SF and noticed the demographic of folks in there.

the demographic of the traffic court was mostly minorities and poor folks, completely out of whack with SF general population and what you expect traffic case tickets to reflect. Imagine the criminal cases.

this skew is even after accounting for pre filtering that happens before someone walks into the courtroom (who is ticketed by police, who pays early, who appears etc). Felt I was seeing the results of a system not working right.
std::string_view didn't make it into C++14.
I wonder how much that figure would drop if one could optimize the process for modern CPUs...
Did you read the article? There were _several_ great test images used in the Mozilla study under suitable licenses, and Bellard did test with some of those. The Lena picture here wasn't particularly scientifically useful, it was presumably just used out of a sense of tradition. (Mozilla didn't use it.)

http://people.mozilla.org/~josh/lossy_compressed_image_study...
Thanks for this, just snatched up jeremyisa.ninja
At the Jim Austin Computer Collection
JPEG-2000, for example, is very hard to decode in a CPU. Many implementations take a second to decode an image.

There are two really hopeful things about this new project: (1) by leveraging HEVC, we get cheap (energy efficient) and fast decode on future mobile devices and (2) Since he is demonstrating pretty quick decode in JavaScript now, it clearly isn't a CPU pig like JPEG-2000.
excuse my ignorance, but encoding would happen "once" when it was created by the author, right?
Missed it, my bad!