Undefined vs. Unsafe in Rust - <AUTHOR> https://manishearth.github.io/blog/2017/12/24/undefined-vs-unsafe-in-rust/ <comment><USER2> Unsafe code might result in undefined behaviour. Code in an `unsafe` block, however, is code that is not compiler checked to be safe, but hopefully was hand checked to be safe.

The `unsafeXYZ` idiom is very common in the functional programming world. For individual functions, prefixing them with `unsafe` generally means, this function could result in undefined behaviour. However, there is the other idea that we mark something as `unsafe` to ask the compiler not to check it and just to trust us (`unsafePerformIO` is often used this way). Maybe having a second term would make this clearer.

<comment><USER3> It is in fact checked by both the compiler and the borrow checker. The only difference between safe and unsafe code is that the latter allows dereference of pointers and direct manipulation of memory, which may result in segfaults, memory leaks and data races.

<comment><USER2> Maybe there is some checking but there is clearly somewhat less. This is in keeping with the general idiom (shared with Haskell and Swift, among others).

<comment><USER4> To be clear: unsafe Rust is a _superset_ Of safe Rust. Every single safety check is still turned on in an unsafe block.

However, that superset contains things that are not checked. This has no effect on any other code though; safe code with a superfluous unsafe block acts 100% exactly the same.

</comment></comment></comment></comment><comment><USER5> One nasty class of errors in C and C++ is due to environment mismatches in separate compilation. For example, a struct may conditionally add a field according to some compilation flag, say, whether ASAN is enabled. If compilation units disagree on that flag, they can disagree on the size of the struct, leading to UB.

Does Rust have a way to prevent this class of errors? What ensures that all units have the same view of a type?

<comment><USER6> Multiple units don't have their own copies of type definitions to begin with. The compiler sees them all at once instead, to the point that different versions of a crate produce different incompatible types.

At a lower level, symbols are mangled to include a crate identification hash. This is more of a way to allow multiple versions to coexist though, as the problem is already solved by that point.

<comment><USER5> Thanks for the reply. What do you mean by "different versions of a crate?" Here's a scenario:

1\. Compile a library libA that references type T in CrateX.

2\. Add a field to T, and recompile CrateX.

3\. Compile an executable a.out that passes a T to libA.

Nobody bumped CrateX's version or recompiled libA. Won't this crash? Or does this produce a "different version" of CrateX and so it will refuse to link?

<comment><USER7> It produces a crate with incompatible symbol names (a "different version"). There's a "strict version hash" derived by hashing a representation of the structure of a crate's entire external interface. That hash value is appended to every symbol name as part of the name mangling process.

<comment><USER8> Is that actually true anymore? I just tried compiling a simple crate:

        pub struct S {
            a: usize,
        }
        pub fn foo(s: &S) -> usize {
            s.a
        }

…as a dylib, then added another field to S and recompiled. I expected it to change the symbol names (as shown by nm), but it didn't. The metadata might be different (I don't know how to display it), but the dynamic linker doesn't know about that.

<comment><USER9> That changed with incremental recompilation, to allow reuse across changes.

However, Cargo will still ensure different versions of the same crate have different symbols, by passing its own hashes to rustc via -C metadata.

<comment><USER5> Ah here we go again! What does "different version" mean? Is it explicit version metadata or something computed from the interface?

<comment><USER10> Computed from the interface. The metadata does not understand semver or any of the higher level versioning tools Cargo exposes to users.

The metadata just contains info on all the types, and their hashes (or something like that), so if stuff doesn't match you'll know.

This is generally visible from the "expected type Foo but found type Foo" error, which will often mention you have two versions of the same crate.

Worth mentioning that unlike C++ or C Rust doesn't have a global name mangling scheme; so it is totally ok for two crates to have a toplevel struct Foo (unlike in C++ where you are forced to namespace them with uniquely-named namespaces). This has the side effect of it being totally ok to link two versions of the same crate together; and Rust will just complain if you try to mix the types.

<comment><USER8> Are you sure the metadata hash that _Cargo_ computes (and passes with -C metadata) is based on the AST? I don't think Cargo tries to parse source files…

<comment><USER10> No, that's a metadata hash it creates (probably from semver info, but also perhaps file contents) so that it can ask rustc to mangle symbol names.

<comment><USER9> No file contents, that would defeat incremental recompilation.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER11> it kind of sucks that rust doesn't provide an easier way for Julia to solve her problem and she has to resort to unsafe. it sounds like she just wants to cast some bytes to a structure. if rust had c-style serialization from bytes->structure then this could be done without any unsafe [assuming all the c types were rust 'safe' which they should be]. but i guess this is a pretty rare use case.

i guess the reason behind using the c-structs is to avoid manually calculating the offsets for N different ruby versions you want to support. i guess the alternative to casting/serialization would be to extract the offsets from the generated rust bindings which is apparently unsafe in rust as well. heh

<comment><USER4> Casting bytes to a structure is tricky! First of all, unlike C, Rust doesn't define struct layout. We change the internal layout every so often to add optimizations, and we can only do this thanks to that guarantee. We do have a way to say "use C's layout", if it's a struct you're defining. Also, you have things like endianness to worry about, portability is tough here!

Depending on your sitaution, you don't have to use unsafe yourself; for example, the byteorder crate can help here, or any of the serialization libraries that can serialize to a binary format.

</comment></comment><comment><USER12> Tl;dr;

Code in an unsafe block _may_ generate undefined behavior if it is used incorrectly, but, if used correctly, will not.

Rust code which is not in an unsafe block cannot generate undefined behavior (aside from bugs in the compiler/underlying libraries).

<comment><USER13> Your tl;dr is wrong.

> Code in an unsafe block may generate undefined behavior if it is used > incorrectly, but, if used correctly, will not.

The point of this was that code in an unsafe block should not be able to generate undefined behavior no matter how it is used from safe code, otherwise that unsafe block is unsafe, not safe.

> Rust code which is not in an unsafe block cannot generate undefined behavior

That's false, code outside of an unsafe block can generate undefined behavior by calling unsafe code that was not written safely.

> tl;dr

Please don't post misleading summaries on nuanced topics.. especially when the original post is short.

<comment><USER14> > That's false, code outside of an unsafe block can generate undefined > behavior by calling unsafe code that was not written safely.

Is there any way to write safe code in Rust then?

<comment><USER15> This tldr-counter-tldr discussion is circling around this subtle issue: Unsafe code has a "contaminating" effect on the module it's in. For example, consider the length of a Vec. That's just an integer. Any method on Vec could change that integer without needing an unsafe block. However, increasing the length incorrectly (for example, past the allocated capacity) will totally cause UB, because unsafe code in _other methods of Vec_ assumes the length is correct. Vec is able to expose a safe API, because the length is a private member, and callers can't set it willy-nilly. But code inside the Vec module needs to be very careful, even when it's not explicitly using unsafe blocks.

<comment><USER16> Is it possibly to model that efficiently with a total programming language - or do we need a turing-complete language to write a feature-rich vector (or array, matrix, `Vector a N`, etc.) library?

I sometimes wonder if we should maybe invest more in non-turing-complete language research. Obviously Haskell (and Rust) are improvements to the status-quo (critical code can be guarded explicitely via _unsafe_ attributes and written by experts), but maybe this does not go far enough.

<comment><USER15> I'm not sure if this is directly related to what you're thinking about or not, but I think some of Rust's stdlib has been formally verified. It might be that more work in formal verification can get us the guarantees we want, without needing to change the language itself.

</comment></comment></comment></comment></comment></comment><comment><USER17> This all seems rather obvious.

<comment><USER18> It all depends on the audience. To someone that's been following rust, it's rather obvious (even if the distinction in meanings of unsafe may be a bit clearer), but for someone that only vaguely knows that it "allows you write safe code" it may have been very useful in quickly getting to the crux of the matter.

</comment></comment><comment><USER19> Rust actually has undefined behavior that is triggered by code outside of unsafe blocks, depending on how a result is used:

[https://github.com/rust-lang/rust/issues/33813](https://github.com/rust- lang/rust/issues/33813)

This basically exposes LLVM's poison semantics (a kind of deferred UB) to Rust code:

[https://llvm.org/docs/LangRef.html#poisonvalues](https://llvm.org/docs/LangRef.html#poisonvalues)

Code in another module that doesn't even know it is calling an unsafe function could trigger UB by using this.

<comment><USER8> I think you misinterpreted the issue report you linked, which goes along with what Manishearth was saying about there being two meanings of "unsafe". In this case, ptr::offset is declared as an unsafe fn - meaning only unsafe code can call it - because of the UB issue you mentioned. The reporter was asking to remove "unsafe", arguing that Rust generally allows safe code to create arbitrary raw pointer values (but not deference them). Which is true, but only because that's designed not to cause UB. ptr::offset _can_ cause UB, so it has to remain an unsafe fn - lest it become "unsafe" in the sense of "potentially dangerous when called from safe code" - and the report was closed.

Edit: There are some other known ways of causing UB from safe Rust code, but they're considered bugs - and some longstanding ones are on the way to being fixed in the next few months, thanks to MIR borrow checking and saturating float->int casts.

<comment><USER20> Segfault:

        #[link_section = ".data"] fn main() { }</comment></comment></comment>


Ask HN: Windows VPS/dedicated server - <AUTHOR> I have a .NET MVC app that I am looking to deploy. I would love to use Linux to deploy but mono has been a little difficult for me considering my non-existent devops skills.
So thinking of using Windows server (2008/2012). Looking around online, there isn't a whole lot of options but I did find godaddy offering a decent dedicated server plan [0]. Anyone using godaddy for windows server ? Would love to hear from you ?
[0]: https://www.godaddy.com/pro/windows-dedicated-server
Oh, I thought about Azure, appharbor etc but they are just too expensive in the name of PaaS. I also don't like that they don't give you the same level of freedom to do things. <comment><USER2> An azure small VM is $55/month. the same 2gig dedicated host at godaddy is $200/month. Although azure doesn't include as much space or bandwidth, but cost is negligible.

I _hate_ devops with a passion. I don't want to deal service packs and patches, nor dealing with load balancers for the big sites, etc. I deploy everything to Azure Websites. It is so so cheap. Your app needs to be xcopy deployable (i.e. you can't rely on any installed components), but that is so rare anymore, I haven't run into any issues.

See Hanselman's excellent post: [http://www.hanselman.com/blog/PennyPinchingInTheCloudWhenDoA...](http://www.hanselman.com/blog/PennyPinchingInTheCloudWhenDoAzureWebsitesMakeSense.aspx)

<comment><USER3> Can't recommend Azure Websites enough. There's even a free tier if you'd like to have a taste!

</comment></comment><comment><USER4> I would highly recommend getting a VPS (KVM with SSD) from RamNode: [http://www.ramnode.com](http://www.ramnode.com)

</comment><comment><USER5> Why do you need a VPS? Can you start with shared hosting? I've used [https://www.softsyshosting.com/windows- vps/](https://www.softsyshosting.com/windows-vps/) for VPS before with good results.

</comment><comment><USER6> If you're just looking for something to get started and get it out there I have used kickassvps.com for some sites. Pretty good and starts at $29/month with full remote desktop access.

</comment><comment><USER7> try ovh they're good [http://www.ovh.com/us/dedicated- servers/enterprise/](http://www.ovh.com/us/dedicated-servers/enterprise/)

</comment><comment><USER8> Is Bizspark an option?

[http://www.microsoft.com/bizspark/](http://www.microsoft.com/bizspark/)

</comment><comment><USER9> I've been using vultr.com for a while and like it so far.

</comment><comment><AUTHOR> thx for your answers so far. How about hivelocity.net ? I heard good things about them so far based on google. Anyone using them ?</comment>


Grammerly's Ad Spot – Says a Lot about Startups - <AUTHOR> https://www.youtube.com/watch?v=Ak-Y56SfkS0 <comment><AUTHOR> 1\. Social media manager's can spell. 2\. Social media managers have borderline depression. 3\. Social media manager can read customer's complaints. 4\. Social media manager must not leave the office until all communication tasks are done.

or at least how i read it..</comment>


Men are 'freezing' women out of the workplace - <AUTHOR> http://qz.com/470301/men-are-literally-freezing-women-out-of-the-workplace/

<comment><USER2> You can't compensate for external heat with clothing, thats why the level of the person with the lowest comfortabble temperature in the room should take precedence.

I think the Article has a Anti-Men-Narrative. The Headline sounds almost accusing.</comment>


H+ Magazine Fall 2009 Issue - <AUTHOR> http://hplusmagazine.com/digitaledition/2009-fall/

<comment><USER2> I for one really dislike this form of publishing the content. It is like the professional websites made with flash, take long time to load and you are not able to use find the information you want to. A lot of the advertiser in Norway use the same format to show their paper advertising online => one never bother to read it.

</comment><comment><USER3> I have the distinct impression that H+ magazine is put together by writing the headlines first (giving each a near-future sci fi theme, e.g. DO BOTS FEEL JOY?) and backfilling the article content.

It's like the Wired "Future Artifacts" back-page feature turned into a full publication.

<comment><AUTHOR> This issue, as indicated in the editor's note at the beginning, is themed around sci-fi ideas that people are working to bring to fruition. It's a counterpoint to the serious theme of the previous issue.

</comment></comment><comment><AUTHOR> For info on Humanity+ and H+ Magazine, visit <http://humanityplus.org/> and <http://hplusmagazine.com/>

</comment><comment><USER4> That user interface makes the baby Jesus claw out his own eyes.

<comment><USER5> If this were Reddit or 4chan, you'd be getting the look of disapproval right now.</comment></comment>


Ask HN: How can I become a "moneyball" like statistician?  - <AUTHOR>

What programming language/libraries would be useful for this? Where can I learn the basics. <comment><USER2> you need Database, and analysis tools like MsSQL server with analysis services and you need pivot tables to view the data and do data mining and deep analysis

</comment><comment><USER3> prove you can cap at 57% in a sport over 1000 games</comment>


Google Fiber + The Pyramid = Something Awesome - <AUTHOR> http://coroutine.com/blog/4-Putting-Two-and-Two-Together

<comment><USER3> Doesn't the Mississippi flood in spectacular fashion once in a while? In a contest between the Great River and the World's Largest Datacenter, there is little question of the victor.

<comment><USER4> Not on the bluff side, fortunately. It would have to basically double in measurement to even come close to jeopardizing the Pyramid.

</comment></comment><comment><USER4> Also... cheap, renewable hydroelectric energy from the TVA.

</comment><comment><USER5> That's a pretty good idea... granted, my city did just rename a street to Google something-or-other (I forget) in an attempt to out-suck-up other locations and I'd LOVE to get it, but that pyramid would be iconic and high- profile. Something along those lines might just win, especially if they went for renewable energy.

</comment><comment><USER6> Our central location won't hurt either. I will get behind this initiative but only if it include a provision to add running blue lights up the corners of the pyramid like some gamer's modded chassis.

</comment><comment><USER7> Blog down - <USER2>

<comment><USER8> Google cache:

[http://22.214.171.124/search?hl=en&client=firefox-a&h...](http://126.96.36.199/search?hl=en&client=firefox-a&hs=zqY&rls=com.ubuntu%3Aen- US%3Aofficial&q=cache%3Ahttp%3A%2F%2Fcoroutine.com%2Fblog%2F4-Putting-Two-and- Two-Together&aq=f&aqi=&aql=&oq=&gs_rfai=)

<comment><AUTHOR> Thanks for that. The resizing task at Rackspace Cloud has been at 98% for 30 minutes. Awesome.

</comment></comment></comment><comment><USER9> So the idea is to turn a large empty building into a datacenter.. How is this interesting or original?

Google asks what new business types would become possible given a lot of bandwidth, and you answer "datacenters!" ...

Why does this sort of thing get attention?</comment>


Imperial College pandemic code: " thousands of lines of undocumented C" - <AUTHOR> https://twitter.com/neil_ferguson/status/1241835454707699713 <comment><USER2> The usual estimate is 15 defects per thousand lines of code. I really hope that we've not destroyed the economy on a operator precedence error ...

<comment><USER3> Won't be first time that happen.

Rogoff's Excel error destroyed entire Greek economy however IMF appologized latter.

[https://www.bloomberg.com/news/articles/2013-04-18/faq- reinh...](https://www.bloomberg.com/news/articles/2013-04-18/faq-reinhart- rogoff-and-the-excel-error-that-changed-history)

[https://www.theguardian.com/business/2013/jun/05/imf- admit-m...](https://www.theguardian.com/business/2013/jun/05/imf-admit- mistakes-greek-crisis-austerity)</comment></comment>


Never Buy a Phone Again - <AUTHOR> http://www.wired.com/?p=1663621&preview_id=1663621%2F <comment><USER2> Title of this post sucks but I agree with the sentiment of the article.

What I've been looking to do lately is get rid of my phone and cash it in for a USB modem for my laptop. My phone distracts me from the real world. I only really use it to read reddit and hackernews on the bus or before class, and it's unreasonable how much money is spent just for that.

Edit: As I'm typing this up I have AFK by Pinback in the background. Here are the lyrics that were playing as I typed this comment:

"No one uses the phone anymore. The tracks are wrecked and the odometers ticking. The edge is pushed and the lines are melting. Too scared to look at what I hear outside. Release me."

Kinda eerie.

</comment><comment><USER3> I for one love the title. It's eye-catching and controversial enough that it stands out, but it's also very relevant to the article, and the article itself is refreshing and something that I've never gave too much notice to. It's also nice to note that phones and tablets are transient items as our technology advances. Desktops are our workstations, but phones and tablets (and watches) will come and go as we discover and design even better interfaces.

</comment><comment><USER4> The title of this pist is a typical view grabber. Apart from that, the author doesn't take into account that when you leave an area without LTE coverage, your call will be disrupted. I did this only Skype experiment myself, to try and minimize my phone costs. It resulted in big hassles, the connection dropped, slow initialization and good luck while travelling by train.

</comment><comment><USER5> >A 3-GB data plan from T-Mobile for your iPad mini is $30 per month. Yet if instead of an iPad mini it's an iPhone 6 Plus, which requires a voice plan too, your phone bill is $60 per month.

This is just not true. T-Mobile has a phone plan that's 5GB of fast data, unlimited slow data, a handful of minutes you can ignore.

I have a cheap plan that has unlimited minutes and unlimited slow data, which I think hints at the real end-game. Don't toss out the old infrastructure, just stop price gouging it now that data can truly compete.

</comment><comment><USER6> I have been thinking for a while about how it's kind of silly to have a phone. How often do I make phone calls or receive them? Not very often. Also I generally never need it on the go, mostly make calls at home or work. There is something that keeps me from switching to an iPad or some other tablet to just use to make calls and for regular surfing. Is it just nostalgia? Who knows.

</comment><comment><USER7> 3mb for one minute? My MP3's are about 1mb per minute, so let's say there are 2 sound streams and then we are at 2mb per minute (but we are not. We pretty much only send data when someone is talking).

Why is the LTE voice data so bulky? It needs lower fidelity than my music, and it ought to be compressed in a more efficient format than MP3. What gives?

</comment><comment><USER8> Being able to call emergency services (999, etc.) is a big benefit of carrying a mobile phone.

</comment><comment><USER9> I've tried to do this several times since 2010. The deal breaker each time is lacking a reliable real-time "ringer" that one gets with SMS and Voice calls.

Perhaps Android / iOS background services have improved enough, to make this possible.</comment>


The NYPD's X-Ray Vans - <AUTHOR> http://www.theatlantic.com/politics/archive/2015/10/the-nypd-is-using-mobile-x-rays-to-spy-on-unknown-targets/411181/?single_page=true <comment><AUTHOR> FTA: "backscatter technology, previously deployed in European Union airports, was banned in 2011, because of health concerns; an internal presentation from American Science and Engineering, Inc., the company that manufactures the vans, determined that the vans deliver a radiation dose 40 percent larger than delivered by a backscatter airport scanner; bystanders present when the van is in use are exposed to the radiation that the van emits… moreover, petitioner maintains, and it is not disputed by the NYPD, that 'there may be significant health risks associated with the use of backscatter x-ray devices as these machines use ionizing radiation, a type of radiation long known to mutate DNA and cause cancer."

Not only are the fascists surveilling us invasively, they're giving us cancer via a well-understood dose of ionizing radiation. Oh, and the commissioner refuses to think that we should know about any of it.</comment>


Publish your Python function to PiCloud and invoke via REST - <AUTHOR> http://blog.picloud.com/2011/09/14/introducing-function-publishing-via-rest/ <comment><USER2> This seems interesting, but I'm wondering who the target customer is (both for PiCloud, and for this specific use case with REST publishing).

We're running on Heroku, where workers are expensive (at least, unless you scale them dynamically). We looked at SimpleWorker, which is basically PiCloud for Ruby. But latency for enqueue-ing a job was way too high, and not having access to database models and such made it inconvenient for that purpose. (Long story short, we ended up with Resque like everyone else.) Does PiCloud have the enqueue latency problem beat? (Like under 100ms RTT?)

But these services don't make sense to me for big data or scientific computing either. If you have tons of data, you're probably going to end up with something like MapReduce with some specialized HBase-like backend. And most "scientific computing" I've seen seems to be either MATLAB (if performance is no issue at all) or custom C++ code linking to specific linear algebra libraries (if performance is important). That said, I'm not an expert in either of these use cases, so maybe I'm wrong? Maybe this is for mobile or to fix some brokenness in GAE?

Put another way, what is the use case where you (a) don't care about high enqueue latency, (b) don't care about running within your own infrastructure and with your own code (e.g., for database access), (c) want tons of compute cycles in Python without having to manage the infrastructure, but (d) don't want specific control over the actual infrastructure and data persistence?

<comment><AUTHOR> Thanks for your input!

From the get-go, we've targeted users with serious compute-intensive needs. These users from both academia and industry generally do what we call "scientific computing." A couple examples are oil companies doing immense amounts of geophysics simulations, and bioinformatics laboratories in universities doing comparative genomics; we'll be posting a guest blog entry in the next week on successfully reducing the time of sequence alignment from 20-25 hours to less than an hour. Other examples include neuroscience, astronomy, seismology, weather analysis, and protein folding.

As time has gone on, we have noticed two sizable class of users who we consider to be non-scientific. The first are the risk analysis divisions of financial firms who run Monte Carlo simulations in their never-ending endeavors to determine their portfolio's risk profile. The second are web companies doing all sorts of background processing: video encoding, feed aggregation, social data scraping, and analytics of all sorts.

The REST feature is an experiment on many levels. In the short term, it helps our existing users utilize PiCloud without Python, which is very important in companies with large polyglot codebases (read: Java). In the medium term, we want to see whether there's adequate interest from web and mobile companies who require serious scalability, and thus are interested by how we entirely divorce their algorithms from their servers. In the long term, we want to see how far we can take the idea of "publishing" a function; there are many users out there who would love to share their algorithms in _working form_ but lack the programming know how and computing hardware to do it.

To answer your other questions: We're releasing a BigData a la MapReduce solution for our users in the coming months. Also, Python has a strong scientific computing community primarily because it interoperates very well with existing C/C++/Fortran code via extensions. In most of our use cases, Python is being used as a wrapper for C code, which is doing the heavy lifting. PiCloud, unlike many of the other background processing services, allows users to deploy more than just Python or Ruby code. We used to allow this through a "package upload" system, but we've recently just replaced it (in beta) with the ability to fully customize a file system environment (apt- get away!).

Our users are able to access their databases, often times without any code modifications, from PiCloud, which means their Django models work just fine. If their database resides on EC2 us-east, then the performance hit is minimal.

We just did a quick non-scientific check of our enqueue time from an EC2 us- east server to PiCloud. A cold start (first job) takes 900ms (It could take longer depending on what needs to get transferred), but once the connection has been made, enqueue takes around 86ms, and as the system heats up it reduces to 50ms.

</comment></comment><comment><USER3> My friend and I just wrote something today that I hope will become the bedrock of a similar service, but for Perl: Oyster (<http://github.com/gatlin/oyster>), so named because it contains a Perl.

We tied Redis lists to filehandles, and then redirected STDIN/STDOUT in a local context to the Redis filehandles. Then, we simply eval code. It's a proof of concept awaiting sophistication / configuration.

</comment><comment><USER4> The 90's called. They want their object publishing back ;)

<comment><USER5> Word. Compare this to ftp://catwell.info/code/examples/webservice/ and cry.

<comment><AUTHOR> :'( There's nothing that precludes us from exposing a SOAP interface.

</comment></comment></comment><comment><USER6> From the perspective of a web app, how would PiCloud be better than, say, running Celery on my own server and sending all background tasks to it?

<comment><AUTHOR> It's best to understand the differences from the top down. Celery is software. PiCloud is a service. This largely dictates the automation each system is able to provide.

Using PiCloud, there is no server to setup with your background processing software, in this case Celery. There is no server to deploy your own codebase on, where you have to manage the versioning of code and data; we automatically deploy the correct versions for you. With Celery, if you need more computing power, you'll have to setup a new server. With PiCloud, we're managing your infrastructure so we'll automatically boot new servers--hundreds, if necessary --or you can manually do it with the click of a button. If there's an update to Celery, you have to shut down your system and deploy it. With PiCloud, we handle all the server-side software updates because we control it.

It all boils down to less management, and more automation. A couple more examples. We've built redundancy across our system so that you don't have to design a system to handle server failure. You can choose the type of core (CPU + RAM combo) you want to use with one keyword argument; no need to change out all the machines you use.

The final result is that with a simple download of our client library and three lines of code, you can be leveraging a cluster of hundreds of machines. That's PaaS at its best.

A much more apt comparison would be with a service-oriented Celery.

</comment></comment><comment><USER7> That's pretty neat. I hope they have enough sandboxing in place that this will not be used as a means to ddos innocent bystanders.

<comment><AUTHOR> Unfortunately, with our new s1 core type, it's even easier to DDoS services. ;)

In all seriousness, we've given thought to this issue, and the solution we've found isn't technological. Users who want to use over a couple of hundred cores simultaneously are capped until we've approved them. It's exactly what Amazon Web Services does as well.

</comment></comment><comment><USER8> Very nice, good idea. Cheers.</comment>


The Laws Underlying The Physics of Everyday Life Are Completely Understood - <AUTHOR> http://blogs.discovermagazine.com/cosmicvariance/2010/09/23/the-laws-underlying-the-physics-of-everyday-life-are-completely-understood/

<comment><USER2> i spent 2 minutes of my life reading that and i want it back

</comment><comment><USER3> A commenter there (Maldoror) exposes the lack of credibility of this article:

"On the one hand you say: 'The Laws Underlying The Physics of Everyday Life Are Completely Understood' and then you qualify this with 'We certainly don't have anything close to a complete understanding of how the basic laws actually play out in the real world.'"

<comment><USER4> I don't think Carroll's remark is inconsistent. Rather, he's attempting to show the correspondence between everyday physics and (something like) elementary number theory; both consist of an agreed-upon set of axioms, subsequently focusing future work on identifying how those axioms interact to produce interesting results.

The realization that there are still areas of research doesn't overshadow the amazing fact that we have near-certainty of the foundations responsible for everyday experiences.

<comment><USER3> " the correspondence between everyday physics and (something like) elementary number theory"

Can you give an example where he is talking about 'number theory'?</comment></comment></comment>


Polish leaders hint Poland will not fully apply EU copyright law - <AUTHOR> https://www.washingtonpost.com/world/europe/leaders-hint-poland-will-not-fully-apply-eu-copyright-law/2019/03/30/3a6b9b18-52eb-11e9-bdb7-44f948cc0605_story.html <comment><USER2> Nice try.

Just a few hours ago there was a news that they will "extend their list of (five) promises" in a way that will "give them access to an unexpected electorate", and now it's there. Thanks, but no thanks. It's easy to see where your opponent fails (some PO deputies voted for the directive) and just say "we'll do the opposite". I'm afraid it has no substance whatsoever, other than trying to capitalize on anti-EU emotions and to get young people to vote for them, as there's the least support for PiS in that demographic group.

<comment><USER2> Also, worth noting, given that the main argument is "defending freedom": [https://www.venice.coe.int/webforms/documents/?pdf=CDL- AD(20...](https://www.venice.coe.int/webforms/documents/?pdf=CDL- AD\(2016\)012-e)

</comment></comment><comment><USER3> Can EU members just "not apply" EU laws?

<comment><USER4> Yes, from europa.eu site:

> A "directive" is a legislative act that sets out a goal that all EU > countries must achieve. However, it is up to the individual countries to > devise their own laws on how to reach these goals.

But as far as I know there is no time limit on this, although there will be political pressure from other member states but they have their own issues, and it can turn out into you blame me I blame you kind of match. So I guess real answer is - it depends.

<comment><USER5> This is only half the truth. Article 29 states (as usual) that member states have two years to transpose the directive into national law. If that doesn't happen (or the transposition does not fully cover the requirements) the Commission will start the infringement procedure.

<comment><USER4> That is of course true but you have to understand that if member state really doesn't want it to work it can do so. Law will be written, agency/department will be created which will be understaffed/inefficient and enforcing a case will take 10 years.

Considering that votes on the issue were very controversial (no clear majority) I am suspecting it will be Brexit #2 in terms of execution, everyone will fiddle about for 2 years then pass some laws as incomprehensible and non- enforceable as the directive itself and that will be the end of it.</comment></comment></comment></comment>


Is.gd URL Shortener - <AUTHOR> http://is.gd/ <comment><USER2> Heh, we made <http://ri.ms> as our (memorable) URL shrinker that lets you choose your own URL if you want.

We hope to expose some of the other cool features we have in there, but there are a lot of these shorteners out there so there's not much incentive unless it's fun.

I keep meaning to release my Python script that would let people search for free 2-letter domains on a handful of country tlds-- it's wicked easy.

Also, to mention, it makes me oddly happy to see other web services using the same "Grenada" tld we did for bug.gd.

<comment><USER2> Provided the code and tip for buying some two-letter domains here: <http://news.ycombinator.com/item?id=195541>

</comment></comment><comment><USER3> xs.md is much better and shorter. It uses 3 letters instead of 4. example: xs.md/LSP</comment>


NSA Says It's Too Large, Complex to Comply With Court Order - <AUTHOR> https://www.aclu.org/blog/national-security/too-big-comply-nsa-says-its-too-large-complex-comply-court-order <comment><USER2> Shut it down. Shut it down shut it down shut it down. I'm past the point of trying to take a nuanced look at balancing the need for security; this is clearly, unquestionably our liberty at stake.

<comment><USER3> The NSA has a proven track record over several decades that it cannot uphold the Constitution. They are more dangerous to it than the terrorists they fight.

</comment></comment><comment><USER4> If it can't comply, it's in violation of law and it needs to be shut down completely. The mere fact of its existence and the inability of our elected representatives to hold it accountable to laws indicates that this agency has no right to exist.

Not to mention that the idea that one would have to shut down a database to retrieve data is so ludicrous, the NSA should be ashamed for even trying to propose it or think that anyone will be fooled by it (many will, especially politicians). Land of the free my ass.

<comment><USER5> They're not saying they have to shut it down to retrieve it, they're saying they have to shut it down to preserve the data it holds. Considering this is the same organization that never was able to figure out what Snowden took from them in the first place, it's plausible.

That said, I agree with lostcolony 1000%.

</comment></comment><comment><USER6> It's kind of funny, the size of the NSA is the very reason we fear them, thus the very reason we fear them is the very reason we can't shut them down.

<comment><AUTHOR> Very Catch-22 don't you think? Joseph Heller would have been proud to come up with that line.

I see us as being at a point socially compared to where Stallman was when he wanted to fix a printer and couldn't. He had to build another system from the ground up to circumvent the existing one. That's what I think we have to do. Federated encrypted social media and messaging. It'll take a generation. There's no point in going through the courts, we need something like the GPL and GNU but for privacy.

</comment></comment><comment><USER7> How soon before they give up even the pretence of pretence, and just say "No." Or go dark.

<comment><AUTHOR> Is this really the future we want for ourselves and our children? Are our pre- digital expectations of privacy hopelessly outdated in this brave new world of globe-spanning fiber optic?

</comment></comment><comment><USER8> They're basically saying they're too big to regulate?</comment>


William Gibson says the future is right here, right now - <AUTHOR> http://www.bbc.co.uk/news/technology-11502715

<comment><USER2> Someone complained yesterday in #startups that they wanted to live in the future and that was exactly my response.

You could have said that if you were born at any point in time but I think anybody alive right now that happens to be lucky enough to live in the developed world is already living in a time that science fiction writers wouldn't have trouble accepting as 'the future'.

Gibson being one of the best in the field is a strong hint that others will likely agree with him.

So many things that were 'distant future dreams' when I was a child are everyday reality right now that I feel as though the future is 'happening' at a faster pace than my life is progressing, it is overtaking me at a clip that I worry if I'll be able to keep up with the rate with which new technology is coming out.

</comment><comment><USER3> " Planet Express: Where tomorrow is today, and today is yesterday... _you heard me_."

</comment><comment><USER4> Increasingly, I feel Gibson is the only futurist I can trust.

This kind of interview normally tends toward breathless, buzzword-laced bluster. There's none of that here; I can barely even envision Gibson uttering the word "crowdsourced" with a straight face.

</comment><comment><USER5> He covered some of the same ground in his talk at the Watershed in Bristol last week.

A video of which is now available if folks want to watch <http://www.dshed.net/william-gibson>

</comment><comment><USER6> Damn - I missed it. I'm always not paying attention when the cool stuff happens like... the future.

Do you think the future might happen again someday? Perhaps we can put it up somewhere on the internet so we know when it's going to happen a bit before time.

<comment><USER7> You don't get it.

What Gibson is saying is that, (1) The rate of development of new technology is speeding up and that, therefore, (2) Humans experience an increasing amount of change in their lifetimes.

So, in a way, the future is getting here quicker.

As an aside, I can't wait to read his new book. I got it when it came out and promised myself I'll save it as a luxury to read in between getting my startups product ready to launch and actually launching. I've had to cellotape it back in the Amazon box to ensure I stick to my promise.

<comment><USER8> Why just focus on technological change? Sure our gadgets are getting better faster but there has also been a marked reduction (at least in these parts) of people trying to force change on others at the gunpoint or by dropping bombs on them.

Places like the UK look rather placid and _unchanging_ in many ways compared to say the first half of the 20th century.

<comment><USER7> I might just be a hippy dippy technology wonk but I have a gut belief that most societal change results from technological development.

If country A wanted country B to do X then it's ability to make it happen through violence will be limited by the willingness of citizens of country A to let it happen.

That willingness will be affected by by the degree of how "alien" people in country B are to people in country A. TV, internet, increased population movement through technological change[1] and so on will decrease that alienness.

[1] I mean both in terms of technology enabling physical travel of people from A->B and technology making a person's origin less important in where they can live during their lifetimes (for example, a programmer can go to work anywhere there is work - they are not confined by location other than by arbitrary things like visas)

</comment></comment></comment></comment><comment><USER9> If you'd like to read a more substantiated account about the pace of development of modern society I suggest that you rather read this: <http://hanson.gmu.edu/bigthing.pdf>

</comment><comment><USER10> From the article:

There was also another reason why setting a story in the present day is more attractive than looking into a future even half a century away. This was because, said Mr Gibson, using that setting would necessitate explaining away present-day problems such as global warming.

"If I write something set 60 years in the future I am going to have to explain how humanity got there and that's becoming quite a big job," he said.

Ouch.

</comment><comment><USER11> "The future is already here – it's just not evenly distributed." Gibson in 2003.

I reread Neuromancer and Count Zero this past summer. Still incredible 25 years later. I kept stumbling across tech cliches then realizing Gibson was the original.

</comment><comment><USER12> What if it is not the things that are changing so fast, but our ability to reflect and think long-term that has nearly vanished?</comment>


An Instagram star with 2M followers couldn't sell 36 T-shirts - <AUTHOR> https://www.businessinsider.com/instagrammer-arii-2-million-followers-cannot-sell-36-t-shirts-2019-5 <comment><USER2> Previous discussion: [https://news.ycombinator.com/item?id=20063667](https://news.ycombinator.com/item?id=20063667)

</comment><comment><USER3> Just because you have followers doesn't mean you have fans.

I follow people that post e.g. cat pictures, but I wouldn't buy their merch. I don't even know who these people are, really; their posts are a commodity to me. They're "oh, more cat pictures", not "a new post from [X]!" I found them through the app's recommendations, hit follow, and then never looked into them further. Why would I want to buy anything from them?

The edges connecting vertices on social networks have _weights_ , despite the social networks themselves not modelling this. Some people, despite being very "connected" in theory, have a very low aggregate weight of connection; all their connections are barely there.

It's like having a million acquaintances and no friends.

(And, of course, some percentage of the vertices you're connected to might be deactivated/purchased/bots/etc. But even when that's _not_ true, you still won't make sales on your "personal brand" to mere acquaintances.)

<comment><USER4> This is missing the point entirely.

The reason she couldn't sell T-Shirts is because she didn't build a real audience around her. She likely used bots to boost her followers and raise the status of her profile without actually building engagement.

People who have built real audiences around themselves using social media are superstars. Casey Neistat and MKBHD can sell tens of thousands of T-Shirts if they wanted to.

The only point this makes is that Social Media is a tool. It can be used well or it can be used poorly.

<comment><USER3> I saw the point you made in your top-level sibling subthread and acknowledged it in a parenthetical to my post. I was trying to talk about a different situation, which doesn't necessarily apply _to this specific case_ , but rather is interesting to consider _in general_ as a response to the question "why couldn't someone with a million followers on Instagram monetize those followers?"

Let me reiterate: there are people with a million social-media subscribers of "real audience", who _still_ could not sell a single T-shirt. [https://chubbycattumbling.tumblr.com/](https://chubbycattumbling.tumblr.com/) and whatever the equivalents of such blogs are on Instagram likely have a million+ subscribers—real people—but also have built _no_ "personal brand", and therefore would generate no interest in products marketed under said personal brand.

Casey Neistat and MKBHD aren't superstars because they have millions of followers. They're superstars because they've been marketing their personal brands from the beginning, and so every (real) follower they've gained is _also_ a fan. But this does not apply in every situation.

(It _especially_ doesn't apply to corporate social-media outreach, something of interest to the HN crowd: just posting cool stuff your startup made might attract a "real audience" of people who _want that stuff_... but unless you're branding that stuff as _yours_ when you do that, you won't be able to later convert that audience _at all_. That should be obvious to someone who's job is "social-media brand manager"—but it's _not_ obvious to someone who wants to get rich selling merch to Insta followers.)

<comment><USER4> Ah, got it. I think we're actually on the same page then!

</comment></comment></comment></comment><comment><USER5> I think the problem with this is the same problem with email marketing. It doesn't mean that marketing on Instagram doesn't work.

I know people who have thousands of subscribers and can't sell $1000 of stuff and then there are people with 1000 subscribers that can sell $50k worth with a single email.

It all comes down to the relationship with your list (I guess in this case your followers). If your list trusts you and trust is easy to gain by giving a lot of value + authority, they will buy from you. Think if your best friend tell you to get "X" and he is an expert too then chances are you will try "X" even if doesn't make sense at the moment. On the other hand if a random stranger tells you to do it, you will need a lot of convincing and still you'll be looking for ulterior motives before making that purchase.

<comment><USER6> This makes sense. Back in 2010 I had a strong following on Tumblr and I realized years later I could have easily sold products and made decent cash so many of my followers had a personal connection with me due to chatting on different platforms and getting to know me. But I didnt want to "sell out" so I never shoved ads on my blog or spammed products. That seems to be a thing I see moreso on YouTube and IG anyway.

Sure some artists would advertise swag they were selling on Tumblr from time to time but they make awesome art why shouldnt they be allowed to sell swag? Artists got to eat too.

<comment><USER5> Yes also selling word has aquired a really bad connotation mainly because of these influencers pushing unnecessary stuff on to their list.

But selling can also be giving your list what they signed up for at a price that they will not get anywhere else. Which is also very important to keep niches and not to try and sell dog training videos to a person who signed up for piano lessons (yes poeple can do that)

</comment></comment></comment><comment><USER7> Fake followers?

Looking at her account, I don't get why she'd have so many followers. She isn't good looking, not interesting, her videography and photography is very average.

<comment><USER8> Or the audience is simply not invested.

Twitch streamers sell merch to a much smaller audience, and probably to the same group of audience who is also subscribed at $5/month. The audience is already invested and want to support the content; do Instagram followers feel like they're supporting the content in the same way? Is a follower count even a good metric to judge audience captivation?

Maybe this is a wake up call to marketing agencies that influencers aren't nearly as captive as their follower count suggests.

<comment><USER9> But that's the concept of "influencers" — not to sell things directly, but to influence an audience for when they actually do buy something. That is what most advertising aims to do — not to make people get up and go buy the thing immediately.

</comment></comment></comment><comment><USER10> When everyone is an influencer, nobody is.

</comment><comment><USER11> A lot of ink spilled over this. I expected schadenfreude but really this is just a high schooler making her first tentative baby steps into selling stuff and unsurprisingly failing. My story would've been the same back in the day. A Telemarketing Powerhouse Who Called 2,000 Homes Couldn't Sell 4 Magazine Subscriptions. Difference was, I just quietly went back to college, while she has professional marketers analyzing her every move in Business Insider. I think maybe fuck the internet? Just not for the same reason I thought.

</comment><comment><USER12> I looked at her account on Instagram.First of all I'm surprised she's got so many followers,as there's nothing even remotely interesting in her posts. There's no story I'd follow-in fact there's nothing at all. So no surprise T-Shirt business was a flop.

</comment><comment><USER13> Even at a terrible 0.01% conversion rate she would have sold 200 t-shirts. 0.0018% is a rounding error, the quantity you purchase for QA or for handing out at a pr event. Small Twitch streamers with a tenth of her audience sell more t-shirts.

<comment><USER14> I think it has to do with the fact that twitch streamers tend to be very engaged with their fans. Especially small twitch streamers. They're kind of like "rent-a-friend" except they live based on donations.

<comment><USER13> Very true. Twitch streamers have really discovered a profound truth about what it means to be in entertainment.

</comment></comment></comment><comment><USER15> I'd love to see someone run a perfectly great influencer Instagram where if you can't verify a purchase within 28 days you are permanently banned from following them.

Not because I think this is healthy, but because I think people will complain loudly and campaign to have them boycotted for demanding proof of their "influencer" status resulting in money spend.

I think such a thing would shred the influencer concept to bits, and so all the other influencers would react out of fear for losing access to the "exposure economy" they leveraged their status to create.

<comment><USER16> They already do this for access to a "private" account.

</comment></comment><comment><USER17> Looks like the store is temporarily down:

[https://www.erashop.us/](https://www.erashop.us/)

My guess is that not enough build-up, or buzz was created, and the initial attempt to sell was forced and random. It's an old tactic you see various startups doing: creating a countdown landing page where the 'mystery' of the product gets people talking.

</comment><comment><USER18> this has been happening a long time in hip hop. there's people with millions of real followers on instagram because of their antics. but when their album comes out they don't even get 10k sales.

</comment><comment><USER19> What do you think an acceptable conversion rate should be?

<comment><USER20> 2000000 × 0.1 (post viewed) × 0.1 (post engaged) × 0.1 (clicked link to shop) × 0.1 (put shirt in shopping cart) × 0.1 (finished payment process) = 20 shirts sold

math checks out</comment></comment>


Ask HN: What to do if my new book is being pirated? - <AUTHOR> Hi,<p>I want to understand the options I have as an author if I see my book getting distributed at no charge at piracy websites. Also, I wonder what other authors do and if there is any governing body which looks into this matter? Like MPAA or RIAA equivalent to protect books and authors. <comment><USER2> You may have some recourse, but piracy is a hydra that will not go away. Where one website is shut down, two more will appear.

The most you can do as far as I know is fight against the sites that host it or the places that index/list it. Fighting it is a losing game, IMHO. Some sites/jurisdictions/etc are likely going to be untouchable by any method, so if people really want to get your work for free, they will find a way.

</comment><comment><USER3> A book I wrote was pirated a few years ago. I didn't do anything and let the publisher deal with it. I have no clue if they really tried to do anything about it.

I didn't write the book for the money so missing out on the royalties didn't upset me that much, I just took it as a compliment and moved on :)</comment>


Rationalism vs. Empiricism - <AUTHOR> https://plato.stanford.edu/entries/rationalism-empiricism/ <comment><USER2> It's always astonishing to me how many well-educated people actually conflate "Reason" (rationalism at its extreme) and empirical/experimental investigation (empiricism at its extreme.) At humanist meetings I attended - and in their writings - nothing was more common than to declare the importance of "reason" when pointing instead to empirical methods (that contradict the elaborate reasoned arguments of Medieval Monks or intelligent design proponents.) The ancient Roman Church didn't shy away from reason, they adored it.

Reason and empiricism would best be described as ancient enemies, not as the same thing.

<comment><USER3> That's only part of the story -- the theoretically pure version, but not how it plays in practice.

The real lowdown is that Empiricism itself is nothing at all without Reason.

There are no "pure observations". There are only observations as understood and analyzed by reason.

Without a conceptual framework (which requires reason/logic etc) there are just a bunch of things happening one after another or simultaneously in 4D space.

Empiricism is not the "ancient enemy" of Reason, but it's complimentary.

That's why from Physics to anthropology, and all kind of hard sciences, use both observations AND math, logic and conceptual frameworks to discover, evaluate and express their findings.

<comment><USER2> Yes, there's an extensive bibliography that follows - which only makes me more confounded that most educated people haven't even begun the journey (or have skipped the first distinction.)

While reason could be complementary, that's NOT what Rationalism is, and it's not what the humanists I keep encountering say or write, either - it may be the position they would retreat to if pressed, but it's absolutely not what they say.

Reason has so often been the refuge of the enemies of empiricism. That it shouldn't be this way is true, but careful you don't fall into a "No true Scotsman argument," here; since the complementary view is not an accurate look either at history or of much of academia now, in my experience.

Too-quickly assuming complentarity (as de facto true or worse logically true) is precisely how many people fall into the trap of conflating the two very distinct things.

<comment><USER3> > _Reason has so often been the refuge of the enemies of empiricism. That it > shouldn 't be this way is true, but careful you don't fall into a "No true > Scotsman argument," here; since the complementary view is not an accurate > look either at history or of much of academia now, in my experience. Too- > quickly assuming complentarity (as de facto true or worse logically true) is > precisely how many people fall into the trap of conflating the two very > distinct things._

The thing is, what academia or those people you mention say about Reason and/or Empiricism doesn't matter that much.

It's what people (e.g. actual scientists doing research) do that matters. And what they do is clearly using them complementary.

Just because there are theories that posit that it's either all A or all B, and people ascribe to them, it doesn't mean that it's indeed all A or all B. Or that a pure A/pure B even exists.

<comment><USER2> Please read up on the last century of history of science - in particular the Copenhagen Interpretation and for more recent history, Lee Smolin's "The Trouble with Physics." The history of science is replete with examples of reason being mistaken for empirical fact, and this seems to be becoming more common, not less.

</comment></comment></comment></comment></comment><comment><USER4> Why would they be mutually exclusive?

<comment><USER5> I don't know why you're being downvoted, as your response is typically true of any A v. B discussion in philosophy, there's always grey lines. Rationalists can still claim categories of knowledge coming primarily, or even only, from sense experience, while also claiming other categories of knowledge that come from rationality alone.

Fwiw I subscribe to the anthropological view that human consciousness/ culture as we know it "turned on" about 70,000 years ago (this was introduced in my first anthropology textbook in college and is also the topic of the very popular "Sapiens"), and we've had a unique, if not structuralist, system of reflection and developing knowledge ever since; if I had to pick one, without doubt on the rationalist side.

<comment><USER6> On what grounds do trust your reason, senses, or understanding?

Whether I axiomatically start with Rationalism, Empiricism, or some combination of the two I always end with, at the very best, Solipsism (via the Simulation argument), and more so these days just pure philosophical Skepticism. "I think therefore I am" is only true if "I think" is true, and to say that "I think" is to take as a given that I exist, which is begging the question. We might be able to say that "thought exists" (and therefore a thinker must exist, etc) but this is premised on "truth exists", since "thought exists" is meaningless without veracity, and to say "truth exists" is to continues to beg the question in two possible ways: First truth requires a mind in order to be known which is what we're trying to get at in the first place. Or, if that set of reasoning is too shaky for you then: "truth exists" requires truth in order to be true.

I do not think it is useful to stay there, so when I approach the world I have a sort of base understanding that I'm taking certain things which may not be true (my own reason) as true for expediency because the alternative is to cease thinking. But just as arithmetic (the basis of nearly all of mathematics) isn't logically proved unless you assume the Zermelo-Frankel continuum I do the same with my understanding of existence.

<comment><USER5> Well, I don't assume the Cartesian cogito or the rational, centered world of Logos. I just assume that consciousness is this thing that flipped on about 70,000 years ago, which brings its own rules or structures that impinges on any sense of reality, and we've basically been immersed in it since, with the fortunate even accidental side effect of being able to understand things in a way we might call 'rational.' I'm much more on the side of "It thinks, then I register it" than "I think". So I guess, similarly, I too approach the world with a sort of distance towards things, while taking certain things sincerely for the sake of utility and happiness, but while also seeing that our "self" (in the form it is) and consciousness are rooted in Real capital-R structures produced by nature, so it's not a post-modernist, everything is endlessly decentered/ no substantial basis, etc... there really is something there governing in specific ways... enough to build a principled world with its own, I guess, absurd form of 'centeredness'... it just requires a weird sort of dynamic stance towards things, chalk it up to the fundamental condition of being a homo sapiens in-consciousness.

</comment></comment></comment></comment><comment><USER7> Both lose out to pragmatism in my opinion.

[https://plato.stanford.edu/entries/pragmatism](https://plato.stanford.edu/entries/pragmatism)

<comment><USER8> Something of an Achilles heel to pragmatism is that it can lead those that follow the principle concretely to never seek to take the long jumps in innovation or product design... those pragmatists are doomed to incrementalism. Now incrementalism is not bad in itself; on the contrary it is more often useful than other approaches. However, sometimes you cannot increment and climb your way to the next great invention, company, or just reaching success. Sometimes it takes faith... and risk to reach those high places. Pragmatism doesn't forbid risks or leaps, but it's doctrine is to look at your feet, take small steps, and measure success of each incremental step.

I say the best executive combos are one person who is idealistic rationalist (the Visionary), one experienced pragmatist (the Voice of reason), and a grounded traditionalist empiricist (the Sergeant). The Visionary pulls the Voice to take direction leaps as needed, and the Voice develops reasonable as- incremental-as-possible steps to get there. The Sergeant is meticulous in the day-to-day work, doesn't care much of the future, and deals with the active problems that need to be addressed. The Voice relies on data from the Sergeant to judge how well things are progressing.

The trick is embodying all three characters. There are times to be a dreamer to know your future. There are times to just work and not think about tomorrow, and times to reflect over the past and determine the next small steps forward.

<comment><USER3> > _Something of an Achilles heel to pragmatism is that it can lead those that > follow the principle concretely to never seek to take the long jumps in > innovation or product design... those pragmatists are doomed to > incrementalism._

That's why I'm in favor of real-world-ism.

In the real world and actual practice we are Rational, Empiricist and Pragmatist in various degrees, not one or the other. We can also be totally irrational or visionary or whatever.

</comment></comment></comment><comment><USER9> Empiricism is the rational choice!

<comment><USER10> I'm skeptical.

<comment><USER11> C'mon, be reasonable!</comment></comment></comment>


On-Device Supermarket Product Recognition - <AUTHOR> https://ai.googleblog.com/2020/07/on-device-supermarket-product.html <comment><USER2> I would love something like this paired with augmented reality to show/hide/highlight only the products that meet my search criteria. Try going to a big supermarket to look for whole-milk yogurt, for example. It's a pain trying to filter them out of the rest of the 100 varieties.

Another thing I would like to do is compare products by price/quanity. Maybe I'm trying to get the most protein/$, or oz/$, etc. You could also hook it into some database to only show you ethically caught fish, organic projects, fair trade products, local products, etc.

I've thought about this kind of technology a lot. Cool to see that it's actually becoming possible.

<comment><USER3> > It's a pain trying to filter them out of the rest of the 100 varieties.

Arguably, shops _specifically design_ themselves to do things like this. When I was growing up, it used to drive my dad mad that the local supermarket would move almost literally everything around seemingly at random "to prevent shoplifting". He was a pilot, and usually had little time -- he liked to go into supermarket, grab x, pay, and leave. Suddenly, that stoped working, as finding x became increasingly difficult. It really annoyed him. For a long time the floor manager said that they moved their stock around to prevent shoplifting – until one day the store manager, when asked the same question, said it was "to promote footfall". Suddenly the real reason became clear.

>Another thing I would like to do is compare products by price/quanity. Maybe I'm trying to get the most protein/$, or oz/$, etc. You could also hook it into some database to only show you ethically caught fish, organic projects, fair trade products, local products, etc.

In the UK at least, all of this information is required to be printed on the label: product per unit money on the shop label and misery per unit product on the product's label.

Are you asking for a filter / search engine for that on top? Either way, I don't think your average supermarket would let that stay un-advertised for too long. Products at eyeball level pay a premium to be there.

<comment> squeaky-clean I don't know if it's legally required, but that's also the standard here in the US. One problem though is the units may not always be equal. I was buying canned coconut milk this weekend and among all the different choices were $/pound, $/gram, and $/liter. It's easier to do the math from scratch yourself at that point.

</comment></comment></comment><comment><USER4> This is only the beginning. At the moment, mobile devices must run sub-SOTA models, such as a MobileNetV3[a] for visual recognition, to provide an acceptable user experience. As mobile devices continue to get more powerful and start incorporating dedicated AI hardware for multiply-add-accumulate ops, I expect to see devices that can run today's SOTA models locally within a couple of years. Exciting stuff!

[a] [https://ai.googleblog.com/2019/11/introducing-next- generatio...](https://ai.googleblog.com/2019/11/introducing-next-generation- on-device.html)

</comment><comment> awinter-py interesting that one of the uses of NN here is to shrink the amount of storage required per product in the product recognition DB -- compression is a neat application of NN that generally follows from recognition / synthesis tricks, and will matter a lot on mobile.

I'm wondering if 'on device' is an exaggeration. The post is saying 64 bytes per product, and a DB of millions of products, but the video is showing product details, prices, and a box image. I wonder if once it identifies the product it then loads metadata from ze cloud?

<comment><USER5> 'it had to load an image from the cloud' sounds much more like a nitpick than 'it recognized the product locally' sounds like an exaggeration

<comment> awinter-py it's a spectrum, right? 'on-device' is a big claim with different implications if you're thinking about this as an NN problem or a privacy problem. Loading an image from the cloud = sending telemetry on your supermarket shopping to a giant ads company.

</comment></comment></comment><comment><USER6> This is interesting - I couldn't determine how they train them system to recognise all the products though.

Flavour variants, special promotional packaging etc make training hard due to the sheer size of images that need to be in a training dataset to yield accurate results.

How is this achieved?

<comment><USER7> This is likely done using OCR:

> OCR is executed on the ROI for each camera frame in order to extract > additional information, such as packet size, product flavor variant, etc.

You could probably also do some very simple statistics like a colour histogram on the box, once you had high certainty of the product line.

</comment></comment><comment><USER8> I am interested into why they haven't released this feature in their main Google Lens app. My hunch is they released a separate app for experimental and beta testing. Once these features get robust and reliable, they will probably move these features to the main Google Lens app.

</comment><comment><USER9> This is one of those obvious killer-apps that with a moment's thought was obviously computationally prohibitive or much too complex for a sole developer. If this is in the pipelines then we can soon also expect a bunch of semantic apps.

</comment><comment><USER10> Didn't Amazon do this with the Fire Phone and FireFly in 2015? What I need is to comparison shop this item at 5 other grocery stores and FreshDirect and Amazon Fresh and have it tell me if I'm getting a good deal.

</comment><comment><USER11> Would be handy if they applied this to an internal shop level Google Maps

Would cut the need to speak to shop staff, who in many places in larger cities don't have the language skills to know what you're looking for.

</comment><comment><USER12> License this to Instacart so I can get the proper size package I ordered.

</comment><comment><USER13> Does it take into account flavors? Yoghurt packages and Oreos come to mind. Lots of different flavors and the packaging is subtly different

</comment><comment><USER14> Interesting how it isn't just one giant neural net mashed together, and seems to leverage "hand-crafted" features.

</comment><comment><USER15> An RFID scanner will do a lot of this surely ? The issues are presumably access to the TFID number database, but for me the big open question is that as we progress to an RFID chip in everything world, that access becomes a public good - a complete supply chain record will be the next "food labelling" fight

<comment><USER16> That basically already exists with barcodes.

<comment><USER15> 1\. Barcode UPN lists are closely guarded secrets. Knowing that 123456 is a lot of hummus is valuable to a lot of retailers.

2\. The supply chain for who made the hummus, who grew the chickpeas, were they sprayed with what. That basically does not exist, let alone in public.

</comment></comment></comment><comment><USER17> Is this app open source?

</comment><comment><USER18> People who can't recognize products on a shelf often can't use a touchscreen either. I live with a Boomer and he can't even use a Chromecast because he can't see his screen, let alone use screen readers or voice commands.

<comment><USER19> Its another option for the visually impaired.

</comment></comment><comment><USER20> Privacy nightmare not to mention solution looking for a problem.

<comment><USER21> What specific aspects of the design do you consider to a "privacy nightmare"?

Typically on-device computing is lauded from a privacy perspective when compared to cloud equivalents.

<comment><USER22> Doing it on-device, and storing it on-device are 2 different things.

Shopping data is the most valuable. It is the end result of advertising.

What ad caused you to but that specific product? Can Google show a competitors ad to you?</comment></comment></comment>


Potential Parkinson's Treatment - <AUTHOR> http://www.mpi-cbg.de/news/news-overview/news-details/article/potential-parkinsons-treatment/12.html

<comment><USER2> This is interesting because after some brief searching D-Lactate is being blamed for lots of things like making you feel bloated/sluggish, being a toxin in your blood, and causing memory issues.

I wonder if the old claims are flawed research or just some probiotic hippies spouting pseudo-science? I haven't found a good source of these claims except a few blog posts by "doctors" which I would say are questionable at best.

My dad is in the last stages, and it probably can't hurt to suggest he try to get more of this in his diet.</comment>


Ask HN: benefits of being successful - <AUTHOR>

Hello everyone. As I face yet another Friday night hacking session, I find myself a little low on motivation.  I was hoping people could contribute their thoughts on what makes it all worth it in the end. <comment><USER2> Enjoying what you do? I could go out tonight, but slaving away at my project strangely sounds more appealing...

</comment><comment><USER3> Maybe it's time for a break then. There may not be an 'end' with lots of money and a princess and a pony. Taking a break might be a good way of recharging your batteries and coming back to things fresh.

</comment><comment><USER4> Freedom.

</comment><comment><USER5> Leverage over the future.</comment>