skysight-inc/HackerNews huggingface dataset:
The Rust FFI takes all pointers as "raw pointers". The reason for this is that Rust's various safe pointer types have a lot of extra conditions on them to enforce memory/data race safety without garbage collection. For example, some pointers are uniquely owned and will be freed when they go out of scope, some can't be stored because they are "borrowed", some can't be mutated because they're shared etc. When Rust gets a pointer from another language like C (that obviously doesn't have such semantics), whoever is writing the FFI has to decide what category these raw pointers fall under before passing them back to "safe" code.

Depending on the type of semantics you are attaching to the pointer, you can use something like this[1] function, which does exactly what you're asking. It is a runtime no-op, but it coerces the unsafe pointer type so that memory safe code can use it (based on your word that it can be interpreted in this way).

[1]: https://doc.rust-lang.org/std/primitive.pointer.html#method....
Future makers vs. future takers: The lesson of the Ice King (2014)
Amazon has cancelled my account and now I can’t access Audible books
To me, this is the best point I've ever heard about uber.

Before I've in San Francisco I used to have a number of black cab drivers in my contacts.

We had set, agreed on prices for trips like "home to restaurant and back"

The prices agreed to were "low" by actual taxi rate standards and had the convenience of just calling the Lincoln car directly to come get me...

I thought it was a win!! (I lived where cabs would NEVER come to get me [i was banned by multiple cab companies] -- but then uber arrived...

Same black car service, no relationship building... And I paid a fucking fraction of what I was before.

Uber is the best thing to hit transport prior to tesla.

Give me an uber based self driving tesla and I'll commit some % of each paycheck to that.
Generally it is not an "architecture" that makes this fail, it is a property of the operating system or even only the linker. If you look at a Mach-O executable on OS X, you will see a __PAGEZERO segment that explicitly causes the dynamic linker to put an invalid block of memory at address 0: for backwards compatibility reasons, in 32-bit processes, without that totally optional load command, and even with that command if you choose to override it at runtime using mmap or any number of mach memory management functions, you can allocate memory at that address. (Apple mitigates this in 64-bit processes by having the operating system disallow mapping memory to this location.) In fact, this is a technique commonly used in many kernel exploits on both Linux and OS X, and was even used just a few months ago in the "tpwn" exploit of OS X 10.10.5, prompting the researcher who disclosed that vulnerability to also release NULLGuard, whose entire purpose is to help protect your system by disallowing processes from executing if they are missing a __PAGEZERO segment.

https://github.com/kpwn/NULLGuard
Responsive infrastructure with Auto Scaling
Introducing Describe – Find out what your social circle likes about you
Describe is a casual version of LinkedIn endorsements where you endorse your friends for character traits like "intelligent", "kind", and "funny" instead of professional skills. If you're interested, you can find it at: https://www.describe.ninja/
Coliving: Dorms for Grownups
Twenty-Year-Old Shahed Khan Has More Connections Than You
You could start with uncompressed bitmaps for images, and the pictures can explain all the necessary information. Like they do with the golden records on the voyager probes.

I don't think the information stored should be compressed. Or if it is, it should be very simple compression, like a huffman encoding. That way it wouldn't just look like random data. There would be patterns in it, and statistical analyses could reveal lots of information.
What I said have nothing to do with arbitration rules. Unless ALL available arbitrators can make the same fair judgement, it's just a matter of the company switching the services until they find one that has the result they like (not necessary because of malicious intent on the arbitrators side). The same issue happens in court as well, and we do complain about it just as much (how the IP lawsuit tends to concentrate in a small set of courts and justices). But it's probably harder to pick and choose court/ justice than you do arbitrators, unless I'm mistaken on this count?
Abiti da Sposa da principessa con prezzi economici online di OkMi
Why link to page 8 of this article and not the beginning ? Can you fix the link ?
This article is complete garbage - full of ad hominem attacks and philosophical whining. The author rejects MWI for apparently completely emotional reasons and seems to take the idea of there being multiple worlds in a much too concrete manner.
For an explanation on the construction: http://math.stackexchange.com/questions/413296/how-does-the-...
Neural Networks with Few Multiplications
I'd like to make more use of it but it can't "repack" tables that have gist indices (e.g., postgis spatial indices, etc).
Meh. They definitely gave the appearance of having a working prototype with the crowd-funding for a more refined model. If you look at 3:15 in their video there's some footage of a prototype looking dragonfly actually flying. There are also several photos of the same on the page.

Most backers assumed smoothing those prototypes out for production was a reasonable endeavor. Unfortunately as the project's unfolded it became more and more clear that the group of people running it didn't really have the experience to deal with production even though they clearly had a product. I think a combination of wanting the product to be significantly better than their initial prototypes and a poor idea of how to deal with Indiegogo/Paypal/Factories/Production kind of doomed things. Likewise, they haven't been very smooth or fluent in terms of their communications with backers.

All that said, as a backer, I'm mostly disappointed they didn't have someone with more communications fluency and experience with manufacturing to run things, as I think that alone would have enabled the product to be a success. I'm not in a position where the money makes or breaks me and I tossed it away several years ago. Pointless to get too emotional about a sunk cost unless it comes out that there really has been some kind of gross mismanagement/negligence and not just some random grad-student types getting in way over their heads.
You are subtracting enough 21s (ie: X * 21) to make the last digit zero. Since 21 is obviously a factor of 7, subtracting those should yield a factor of 7.

You can then divide by zero because if X is a factor of 7 and ends in zero, X / 10 is a factor of 7 as well.
Note when I say black cab, I actually mean 黑车 whose direct English translation probably isn't very precise. Essentially, these are illegal taxis that would have wandered the streets looking for fares when they can get away with it. They don't mean a legal black livery car as in say...NYC.

You didn't see them so much in the first tier cities (though they are still around) where there were enough taxis, but they were everywhere in 2nd/3rd tier cities, and often were your only private transport option.
Because I don't have a system library that provides a different malloc. It's a property of my API that malloc returns NULL and I don't have any control over that. What I do have control over is what I do with data I get out of malloc. I have to check, somehow, for abnormal conditions. That is a requirement for using the malloc API. I get that this makes it hard to debug in some cases, so I might avoid that by religiously checking for NULL return from malloc and crashing immediately with a sensible error message. In the cases where getting a NULL return is not an error, like if I wrote a program to use as much heap as it can, I would ignore the NULL and proceed with the resources I can actually get.
The article talks about subsidies. Does anyone know how much Uber and friends are subsidising their rides?

As in if I pay on average 10 USD to Uber, then the driver gets what? 5 USD, 10 USD, 15 USD?
Saying Goodbye to Our Russian Web Traffic Spammers
Aside from the cold weather milage, I can not stand the interior door handles.
Or water purification. Why not just bank the power in batteries and feed it back during peak load?
> People were welcoming Nazis as liberators back in the day

As long as they were not in the Nazis' "don't belong on this planet" list.
Superman's crystals, the ones that have encoded in them the full 3D HD movie of his parents and the fate of Krypton. I knew science would eventually catch up to sci fi :)
It doesn't break the type system, it's that type system is lacking! There's nothing wrong with the existence of NULL, the problem is, like you say, that in C (and many other languages) there is no ability in the type system to specify non-NULL pointer or reference types.
What stops you from writing an API on top of the system malloc that has two malloc functions like I described above, with return types that have unambiguous nullity? Then your religious NULL checks won't be duplicated (and you won't be able to stray from the righteous path and forget any).
Just for comparison's sake, Withings Activite watches claim 8 months battery life and have a replaceable (CR2025) battery.

In practice I got ~5 months before I needed a replacement, but that's still pretty decent.

I'd say the comparison is apt given Activites are ostensibly analogue watches with basic activity/sleep trackers built in, with BTLE comms.
> a 12,701 character regex for divisibility by 7:

I wonder if that's the optimal regex or can be reduced further using some rules[1] like the ones which we(humans) generally use to do it manually.

[1]. https://www.math.hmc.edu/funfacts/ffiles/10005.5.shtml
There's a similar test for divisiblity by 13: cross off the least significant digit, quadruple, and add to what's left.

Example: 325 becomes 32 + 20 = 52 which is divisible by 13.
Example: 8632 -> 863 + 8 = 871 -> 87 + 4 = 91 which is divisible by 13.

It works because 39 = 40-1 is divisible by 13 (similarly to why the 7 test works because 21 = 20+1 is divisible by 7).
Not really. The original unrealistic TOS were amended a while back. Among the terms in the current TOS "they offer to return any remaining funds to backers who have not received their reward (in proportion to the amounts pledged), or else explain how those funds will be used to complete the project in some alternate form."
14,000 Images of the French Revolution Released Online (2014)
I've got to advise against Kibana/Elasticsearch until the company gets more mature. I was 100% on board with them up until the redesign.

Not so much for the design (oh look it's white instead of black, who cares), but the way they've handled it subsequently.

The 3.x -> 4.x transition for Kibana left a product that was missing really basic features (like, the ability to set graph colors for one - a bug/feature request that's been open since last january).

As it stands, upgrading from Kibana 3 to Kibana 4 is a step backwards. You lose functionality rather than gaining it.

They also decided to require a major version bump to Elasticsearch (to 2.x) with a point release of Kibana.

I used to be super optimistic about the Elastic guys, but some of these decisions are just head-scratchingly awful.
When Didi kuaiche does a subsidy for a taxi ride (never use zhuanche, which is non-taxi), they send a message to your phone telling you that they added a bonus to help you get a taxi. It is usually 5 kuai, which is just less than a dollar.

My wife uses zhuanche, and they don't necessarily subsidize rides, but they give riders coupons to "try" the service (say 15 kuai or so). It is a bit more expensive than a taxi, so in a way this is a subsidy also.

Have no idea about Uber specifically.
Lost your iPhone? track it or wipe it, but you can't do both
with the scribble "but it took decades for me to realize why it obviously works" somewhere in the margins and stating that there wasn't enough room to write that down though..
It Was Inevitable: Someone Taught a Neural Network to Talk with Romance Novels
...There was another answer here that seemed close.

I'm not sure the best way to express it, but here's what I've got:

Allow me to use a shorthand, N = AB where AB is shorthand for 10 * A + B, and B is the least significant digit. IF N is divisible by 7, then AB = 0 (mod 7). This allows us to do the following manipulations:

AB = 0 (mod 7)
10*A + B = 0 (mod 7)
3*A + B = 0 (mod 7)
5*(3*A + B) = 5*0 (mod 7) // EDIT: had -2 on the RHS, that was correct but confusing
A + 5*B = 0 (mod 7)
A - 2*B = 0 (mod 7)

So we've arrived at drfuchs' method. You only need to repeat the process until you've proven to yourself that A - 2 * B is divisible by 7 or not.

That's all I've got. I ran a half-marathon yesterday, and I've been up for 16 hours today. My brain might work better tomorrow.

EDIT: changed the steps a bit, had some unneeded ones. Also, this shows that you can use addition instead of subtraction, but you won't be moving towards 0, but you still have to be able to recognize that the new number is divisible by 7.
"O'Mara takes a moral stand against torture (forced retrieval of information from the memories of the unwilling)"

The scope of this is so limited to be a self fulfilling prohpesy...
It's impractical in real life to avoid NULLs in SQL schema. Just embrace NULLs altogether; they aren't hard to understand or work with.
This is a false assumption that directly leads to exploitable software. See my reply to a sibling comment for more details, but I will add here (as you went in a slightly different direction) that on many embedded systems (such as ARM) the address 0 is not "special" in that it is disallowed but is "special" in that it stores particularly important control structures for the CPU, such as its interrupt vector table: one of the bootrom exploits used on the iPhone took advantage of this (though sadly I'm not remembering exactly which one, though the documentation for 24kpwn mentions this mapping). It isn't until you are running in a high-level operating system, and even sometimes not even then (such as current versions of OS X, which rely on cooperation between the dynamic linker and the compiler to implement this feature, as I describe in my linked reply), that you have some (limited...) safety from NULL pointer dereferences. (I say "limited", as sometimes people store egregiously large objects that are larger than a couple pages of memory and some dereferences are negative.)

https://news.ycombinator.com/item?id=10531319

https://www.theiphonewiki.com/wiki/0x24000_Segment_Overflow
Hi, author here. I forgot to mention in the article that we distributed an APK that contained all libraries for each architecture for a long time. The problem existed even though the APK had all libraries for all architectures. It was not until much later that we introduced flavors for each architecture. The reason we introduced flavors was to make our app work on the Asus ZenFone. It is an x86 device, however it tries to load ARMv7 libraries (even though x86 libraries are right there in the same installation) and attempts to utilize libhoudini to work, but it just ends up crashing on app start.

Trust me, we've read the documentation surrounding this multiple times.
these people act like buying things is a lifestyle
Quartz is not glass. Quartz is a crystal.
For example Bloodlands by Timothy Snyder. Especially in Ukraine starting in the early '30ies, but also in eastern Poland from '39 onwards, the NKVD had a quite horrendous human rights record. So the Nazi troops were greeted at liberators when they arrived in '41. At that point the Nazi atrocities had not reached the heights they are infamous for.
Oh, I misread the totals - ha ha.
We’re destroying our kids, for nothing
There was a company which used to make hard drives for the military (perhaps they still do, but nothing on Google) which had a physical pull tab on the back which released an acid into the drive enclosure. Anyone remember this? I read about it perhaps 10 years ago.
>NULL is a handy way to enforce that fundamentally, in that dereferencing a null pointer guarantees a crash

In the context of C and C++, dereferencing a null pointer does not guarantee a crash, or anything else for that matter. In fact, not only does it not give you any guarantees, it nullifies any guarantees you might otherwise have had, because the behaviour of a program that dereferences a null pointer is undefined. Now, an implementation is of course free to make guarantees about programs that have undefined behaviour, but none I know of does.

>Part of programming is about memory management. You can hide it with a sophisticated compiler but it's always going to be there, and there are always going to be two types of memory: that which is available, and that which is not.

This is not true. It is perfectly possible to write useful programs that never have to deal with unavailable memory or even memory management at all past compile time, even in C. This is quite common (as are implementations that don't crash programs which dereference null pointers) when working with embedded systems, for example.
Do the effects of gravity move faster than light?
Deregulation of the energy market in California was a disaster, so some surprise is not unwarranted.
Hi, author here. This is definitely not a case of using shoddy app stores or installers. The vast majority of the problems stemmed from installations that came from Google Play. The article mentions a tidbit about alternate installation sources as a heads up / piece of advice for people running into the problem because we were still confused as to why it was happening for a small number of people. It just turned out that they were using shoddy app stores / installing manually, and were installing the wrong version for their device.
Bitcoin Socialite and Investor Reveals Dirty Secrets of Silicon Valley
Our broken peer review system, in one saga
Surprisingly, there isn’t even a good map of the Internet’s highways and byways

From a security perspective, that may be a feature.
I actually had one of these disks, and used it as my main system drive for 6 years before finally retiring the entire system.
I am more trying to think about ways to try and remove the pressure off founders to bb raising money all the time, while at the same time not just handing over a massive check. Having to work to a budget might solve both problems.

I agree VCs are trying to create unicorns rather than maximise the chance of the founders succeeding. If you are an early stage investor with limited funds to throw around then you might be better off not chasing unicorns and instead concentrate on minimising losses.
That's pretty informative and clocks with what I know. So much for me being misinformed!
Don't regular expressions have minimal, canonical forms?
>> Deregulation in Texas has spurred intense competition for customers.

> Huh. Who'd a thunk it.

Anyone familiar with Enron. Or Comcast & Time Warner. Or any of a million other companies in a hundred other industries that has miraculously managed to avoid the purportedly inevitable race to the bottom. Of course, in this case "deregulation" isn't the full story:

> The incumbent utility in the area still owns and maintains the local power lines (and is the company to call in the event of a power outage) and is not subject to deregulation.

and "intense competition for customers" isn't the full story either:

> TCAP found that the average consumer living in one of the areas that opted out of deregulation, such as Austin and San Antonio, paid $288 less in 2012 than consumers in the deregulated areas.

https://en.wikipedia.org/wiki/Deregulation_of_the_Texas_elec...
The examples subtracted 10, 16, etc... Those aren't multiples of 21.
Dereferencing NULL does not guarantee a crash, actually. And this isn't one of those theoretical things where people say "that's undefined behavior!" but real-world systems always do a certain thing. Non-crashing NULL dereferences are real events that cause real problems. Just toss "NULL dereference exploit" into your favorite search engine for a vast list of examples.

Here's another potential problem. Let's say you write a little bit of code to copy an array into some dynamic storage, basically strdup for non-strings:

void *memdup(const void *source, size_t length) {
void *destination = malloc(length);
memcpy(destination, source, length);
return destination;
}

But then you're a little paranoid about a NULL dereference not crashing, and you want to call some special failure handler that will log more information about what happened, so you add this bit of code in the middle:

if(destination == NULL) {
log_failure();
abort();
}

Oops, you've written a bug! It's possible for malloc to return NULL when you haven't run out of memory, specifically when you pass 0. The FreeBSD man page calls this "a silly response to a silly question." Zero-length arrays are a perfectly valid concept, and there's no reason this memdup function should have trouble with them, but now it does. Maybe. Depending on your malloc implementation.

Using an optional type would do away with all of these problems. It would guarantee that dereferencing a null pointer would actually halt execution, rather than just "probably," and it would highly encourage distinguishing between "an error occurred" and "no error occurred, but you didn't actually ask for any memory."

Yes, the underlying NULL value will always be there. Any reasonable system will represent the "null" value of an optional pointer type using the underlying NULL value. But in terms of the type system, NULL is terrible and optionals are much better. There's no real downside to it, and you can rest easy knowing that you're still working with 0x0 in the end.
Another quick way to check divisibility by 7 is to multiply each digit by 3^x where x is the place (right to left). Good way to check divisibility in your head and useful up to 4-5 digits.

As an example, consider 413:
4x9 + 1x3 + 3 = 36 + 3 + 3 = 42

42 is divisible by 7 therefore 413 is too.
Hi, author here. If you take a look at the end of the article under the "Acknowledgements" there is a comment from the Chromium source code that describes what the issue was. We did file an issue on AOSP's issue tracker, but nothing was accomplished there...
> Why not just bank the power in batteries and feed it back during peak load?

What's the retail cost of electricity in Texas during the day, and what do you pay per kWh for your batteries: capital costs and ongoing costs?

If you pay more per kWh for batteries than retail power prices then any consumer is a fool to engage in the battery scheme. And even if a consumer might be able to make money, the wholesale price is definitely lower than retail. I seem to remember calculating that batteries cost about $0.06/kWh all in in the last ~6mo but wholesale power in TX is more like $0.05 and retail it's usually below $0.12.
> Apparently (at least according to Wikipedia) Warner Bros had to send out floppy disks with a custom font to the music press they hoped would review his record.

This was actually the reason he changed it--to troll Warner Bros. over an ongoing contract dispute. Apparently US law requires publishers to credit artists under whatever name they choose to use, and this right cannot legally be signed away; his name change forced WB to propagate that font everywhere, in promotions, legal documents, everything.
Why, the ``Bruce'' font? Because someone jokingly suggested that because it was way too cumbersome to say, ``that symbol guy'' or whatever, it'd be much easier to give the symbol a name, and that name should be ``Bruce.'' So there.

http://milk.com/wall-o-shame/bruce_font.html
Archaeologists Find 22 Ancient Greek Shipwrecks
Even if the data saved in Quartz Glass last 300M years, 300M years later, how can they figure out what all these binary digit mean, without knowing the format of the data.

For something lasting so far into the future, some clues must be left to help someone in the future to extract the information from the media.