.NET Framework – What's New in C# 7.0 - <AUTHOR> https://msdn.microsoft.com/magazine/mt790184 <comment><USER2> Is it just me, or is C# basically becoming Scala (or, insert your favorite functional language here). Don't get me wrong, this is awesome, .net on Linux, dockerized, is all good, but these moves definitely show Microsoft responding to market changes in a way they didn't used to.

<comment><USER3> C# first introduced lambdas and LINQ in v3, back in 2007. It was the first mainstream OO language to really push a more functional/mixed-paradigm approach.

This is definitely an area where Microsoft has lead the market, not followed it.

<comment><USER4> They may have been the first, and LINQ was (and is) a truly great feature (I'd love it if they'd expand the grammar, or allow computation expressions like F#); but the problem I've found with trying to do functional programming in C# is that there's no BCL support. Whereas F# has its functional _prelude_.

I haven't spent much time with Scala, but I get the impression that a lot of the functional stuff is there by default (or at least easily accessibly via Scalaz) and therefore less inertia is needed to write functionally in Scala. Even with LINQ most C# programmers think it's just for querying databases or XML files, they don't realise they have built in monad semantics.

I found that I'd have an immutable collections library _over there_ , that wasn't aware of the Option type in _that library over there_. (So Map.Find(key) couldn't return an Option<V> for example - this makes composition more difficult).

So although the language has been steadily going in the right direction, there has been less of a concerted effort on the library front. And therefore C# is still behind IMHO.

This is something I've been trying to rectify, by essentially building a functional BCL [1]. I welcome the increased pace of functional features recently. Although sometimes it's frustrating seeing the direction they're going and wishing they'd get there much quicker (expressions everywhere, sum- types, record-types, better type inference).

It's interesting that often C# is held up for its inability to do type-classes or ad-hoc polymorphism. But it is in fact possible with C# today [2] [3], and with zero cost (i.e. no reflection, additional memory allocations, or side- stepping of the type-system). It just causes a massive head-ache of manually provided generic arguments... [4] [5] I'd love it if the Roslyn team took some time to deal with the generic parameters inference story. It would help bring ad-hoc polymorphic types to C#, but it would just be awesome in general.

[1] [https://github.com/louthy/language- ext](https://github.com/louthy/language-ext)

[2] [https://github.com/louthy/language-ext/blob/type- classes/Lan...](https://github.com/louthy/language-ext/blob/type- classes/LanguageExt.Tests/TypeClassMonad.cs)

[3] [https://github.com/louthy/language-ext/blob/type- classes/Lan...](https://github.com/louthy/language-ext/blob/type- classes/LanguageExt.Tests/TypeClassMonoid.cs)

[4] [https://github.com/louthy/language-ext/blob/type- classes/Lan...](https://github.com/louthy/language-ext/blob/type- classes/LanguageExt.Core/TypeClasses/Monad/Monad.Prelude.cs#L70)

[5] [https://github.com/louthy/language-ext/blob/type- classes/Lan...](https://github.com/louthy/language-ext/blob/type- classes/LanguageExt.Core/DataTypes/Option/Option.cs#L780)

<comment><USER5> A big problem wrt speed of evolution of NET historically has been the legacy design of the BCL, and the fact that it's updated as one monolithic thing when a new .NET version is released.

The new model used by .NET Core is to make everything a NuGet package; and not a single big one, but small packages comprising one particular bit of functionality, each of which can then be versioned separately. For example, collections are a NuGet package:

[https://www.nuget.org/packages/System.Collections/](https://www.nuget.org/packages/System.Collections/)

With this model, it's possible to iterate on the API much faster, so my expectation would be to see functional APIs in the standard library spread much faster from now on.

<comment><USER6> Interestingly they thus have effectively an equivalent of Java's long-awaited and long-postponed Project Jigsaw. It seems to not have been such a roadblock for MS, maybe also because of a somewhat shorter history of the platform (no idea how comparable the code inside is regarding spaghetti-ness and interdependencies).

<comment><USER7> I think it's more due to Sun dropping the ball and Oracle not putting the same amount of resources behind Java as Microsoft puts behind .NET.

</comment></comment></comment></comment></comment></comment><comment><USER4> Throw expressions are particularly welcome. I'd previously dealt with that issue by creating a static method that returned the expected type, but just threw an exception [1][2]

I'm not sure it's explicit in the blog, but it seems the deconstructor will be useful for pattern-matching using 'is'.

Tuples. Yay! Finally!

Pattern-matching-switch-statement: Not an expression. That's a bad call. We have expression based ternary, throws, method bodies, and LINQ; switches are the last and most painful omission.

Local functions: Fantastic for libraries like mine, which is trying to bring functional programming to the C# world, but takes a hit with the allocation of delegates for common operations [3] It should be a boon for anything LINQ based (implementations, rather than usage).

Return by ref and out parameters: I'd be happy if they just removed them from the language. Ugly, error magnets.

All in all, good progress. Hopefully they can make more progress on facilitating expression-based programming, and bring in record types for the next release. The pain of creating immutable types is truly tedious. And I'd desperately like to see partial generic parameter specifying (for when one of the generic arguments can't be inferred by the type-system, so you then end up having to specify them all).

[1] [https://github.com/louthy/language- ext/blob/master/LanguageE...](https://github.com/louthy/language- ext/blob/master/LanguageExt.Core/Prelude.cs#L209)

[2] [https://github.com/louthy/language- ext/blob/master/LanguageE...](https://github.com/louthy/language- ext/blob/master/LanguageExt.Core/Prelude.cs#L182)

[3] [https://github.com/louthy/language-ext/blob/type- classes/Lan...](https://github.com/louthy/language-ext/blob/type- classes/LanguageExt.Core/TypeClasses/Monad/Monad.Prelude.cs#L70)

<comment><USER8> Of all the new features, ref return leaves me scratching my head. I agree ref and out should go away. Adding more support for ref will only increase its usage when it should be deprecated.

<comment><USER5> It shouldn't be deprecated any more so than "unsafe" and "stackalloc". It's a great advanced tool for perf-sensitive code - not something you should reach by default, but something to keep in mind when firing up that profiler.

CLR supported the concept since 1.0. Surfacing it in C# has been long overdue, and makes it possible to write more low-level stuff without having to go to C++.

</comment></comment></comment><comment><USER9> Pattern Matching with Is Expressions

Awesome! Greatly reduces "ugly" boilerplate code like this:

        if (control is TextBox)
        {
            var textBox = (TextBox)control;
            textBox...
        }

Also, it would be great if Microsoft could make full properties in another way so that you do not have to write a backing field for it. Something like this:

        public string LastName
        {
            get;
            set
            {
                if (value == "Batina")
                    RaisePropertyChanged();
            }
        }

It would make code more cleaner.

<comment><USER10> I think if you're writing property accessors manually then there should be an explicit private backing field. Otherwise there is just too much magic going on.

Normal auto-implemented properties are fine:

      public string LastName {get; set;}

As are read-only ones:

      public string LastName {get; private set;}

Yet, I feel that if you are writing logic in there then you should fully control it. Or else there is too much being done that is non-obvious and could cause problems down the line (for others or your future self).

However, they might be able to achieve something with data annotations that wouldn't be too magic. For example:

      [RaisePropertyChanged("Batina")]
      public string LastName {get; set;}

Tip: In VS you can just type "prop" then press tab to auto-generate the code for a class property. You can then easily auto-change this to a fully implemented version. This also works for "for" and "foreach" loops etc.

I haven't done much Java in a while but do you still have to write out all of your property accessors fully? Might not be too bad if the IDE can generate this code.

<comment><USER9> I don't think its possible with data annotations because there will me more complex logic in setter then I described.

I would just like to see _get_ working like in auto-implemented property (without backing field) but setter to be manually implemented (with value keyword).

Also you can use _propfull_ snippet for full property implementation.

</comment></comment></comment><comment><USER11> So, lets say someone had never worked with C# or .net before and works on a mac - where would you go to get started building a small server application? I assume you would use the .net core stuff? and visual studio code? Any good tutorials for noob-to-the-ecosystem but someone that has programming experience?

<comment><USER12> > [https://www.visualstudio.com/vs/visual-studio- > mac/](https://www.visualstudio.com/vs/visual-studio-mac/)

It bundles everything you need. And for the tutorial you can check links from other people.

</comment></comment><comment><USER13> Kinda surprised me Microsoft doesn't have better syntax highlighting on msdn.

The lack of coloration and gray background gave me a little bit of a headache.

<comment><USER14> Coupled with the wrapping, paucity of line breaks, and (near lack of) indentation, the examples are damn near unreadable.

</comment></comment><comment><USER15> I'm very disappointed that ref returns were not implemented as syntactic sugar for out params.

A bit of history: game developers have been crying for a solution to the matrix operator problem. A 4x4 matrix is 64 bytes of data. Implement the mathematical operators using C# operators and you're looking at 192 bytes copied per invocation. The workaround is the fake ref operator: void Add(ref Matrix, ref Matrix, out Matrix). The problem is that this results in code smell at the call sites. The ref return was the first compromise, allowing that method to become: ref Matrix Add(...). The ultimate solution would be to allow ref returns and ref parameters on operators, but you need ref returns first.

This feature misses all of that. Maybe we'll get out returns, but the argument against it would be language bloat, and even I'd agree. _Sigh._

/rant

<comment><AUTHOR> The Add method signature could be simplified from void Add(ref Matrix, ref Matrix, out Matrix) to Matrix Add(ref Matrix, ref Matrix).

Also, could you elaborate what you mean by out returns? Normal returns could be considered "out returns", no?

<comment><USER16> If Matrix is a value type, then no, that's not the same thing, because with "out Matrix" it is passing it by reference, instead of by value.

<comment><AUTHOR> Isn't it in this case just an implementation detail without any meaningful consequences (apart from interop)? - I'm trying to find a way to benefit from it. I wrote some code to compare the two approaches and see what's going on underneath.[0] I'm not familiar with IL, but it seems like the memory usage is the same and the simple return function requires less ops.

[0] [http://tryroslyn.azurewebsites.net/#f:>ilr/A4VwRgNglgxgBDCBD...](http://tryroslyn.azurewebsites.net/#f:>ilr/A4VwRgNglgxgBDCBDAziuBhOBvAUHAuUSWOFAFwCcQZy4BlHfQl46eKAOzoA0BuZgQC+gouHZwAbgHsoAEzgB5EOQAU0lQzgAPAJRMWLbXAC8cTgFMA7luxwepuAEY4QgSxGtxpRgCULavp4hoSUASCUnObWtvaOAByu7oSehGykMvJwALKqQaIsjNrJIcpqGnR6JYbGZv6B1SJCQA==)

<comment><USER15> This is no implementation detail and has nothing to do with overall memory use. It has to do with how much memory is _copied_ (an operation that consumes time) per invocation. IL is the wrong level to look at this.

In the by-value case: a stack frame of 192 bytes is allocated (+ space for other locals). The values of the matrices are copied into it from the parent stack frame (128 bytes). The method does its work and then calls "new Matrix". This occupies the final 64 bytes. Immediately this value is copied out of the method to the parent stack frame.

In the by-ref case: a stack frame of 0 bytes is copied (+ space for other locals). The pointers to the two matrices are passed in, as well as a pointer to the memory for the result. The method does its work and then calls "new Matrix". The result of the .ctor is stored directly in the calling stack frame.

You might consider that this is nit-picking, but consider that this has to happen 60 times per second. Calculating an MVP matrix for 1000 objects 60 times per second, results in 32MB of memory copied around per second. That assumes you are doing no additional math (which is definitely _not_ the case). The performance benefit is substantial enough that even XNA had these overloads (which is where I think the workaround originated)[1].

[1]: [https://msdn.microsoft.com/en- us/library/bb194950.aspx](https://msdn.microsoft.com/en- us/library/bb194950.aspx)

</comment></comment></comment></comment></comment><comment><USER17> It puts a smile on my beak that I am a budding (sort of) .Net and C# developer. Microsoft seems to be really jacked up and introducing some very forward thinking functionality into their ecosystem. Been playing with Azure Service Fabric. It is super impressive.

<comment><USER18> Yeah, Service Fabric is super awesome! I'm refactoring out company's infrastructure to run on it currently - the older stuff runs on MVC 5 on Azure Cloud Service.

I'm refactoring it to ASP.NET Core on Service Fabric. Getting about 50x better real-world performance. Yes, that much. It's insane. Currently on Windows as Service Fabric on Linux is in preview (not comfortable using it in production), but I imagine I'll move it over once that's stable

A great time to be a .NET developer! Makes me happy I stuck with it.

</comment></comment><comment><USER19> I'm interested to see what the production story is for some of these language features. I usually get left a festering minidump with a number of threads, a pile of stacks and some line numbers if I'm lucky these days. It's quite hard determining which dereference or call is the one that triggered the problem in a method body with so many things now compacted into a tight expression.

Granted there should be assertions to prevent these conditions occurring but not everyone on the team is perfect 100% of the time. Sometimes an edge case slides in as well and you have to heavily assert everything and push to test/production to reproduce which isn't ideal.

</comment><comment><USER20> Are we back to the 90-ties with no code highlights in text?

<comment><USER21> The markup actually does have coloring. However, there's a CSS rule that's overriding them all back to black. How strange.

<comment><USER22> Yeah, I just came to say this. Here's the code, with obvious color markers. [http://i.imgur.com/91dFyRr.png](http://i.imgur.com/91dFyRr.png)

<comment><USER22> fix:

.codeSnippetContainer span { /* color: #000 !important; */ }

</comment></comment></comment></comment><comment><USER22> Can someone give an example of a use case for a Deconstructor?

<comment><USER23>
        var (ret, err) = Foo();
        if (err != null) {
          ...
        }

<comment><USER24> So Foo() has to return a class which has a destructor? Seems like just returning a Tuple would be better in that case.

<comment><USER25> Tuple in C# is a class IIRC. Without destructor, you will have to pull out individual members separately. For example for a tuple of form <Int, Int, Int>, you will do something like `var r = c.getFirst(); var g = c.getSecond();`. With deconstructor, you can do the same via `var (r, g, b) = color;`. In other words, you can say that tuples are way to combine data, while deconstructors tell how to explode it. Since these deconstructors are themselves functions, you can do computation each time, and get different results due to side-effects (probably not good idea).

EDIT: I don't know C#, so syntax is definitely not right.

<comment><USER26> You would just check t.Item2, no need to assign to variables I'm this example. However, the deconstructor syntax is nice, and now tour functions don't all return Tuple with vaguely named members.

<comment><USER25> Right. Not great example. What I wanted to say was deconstructor is all about creating new bindings with nicer syntax. You could just do that by calling getters / accessing fields, but you have to write more when you doing that.

<comment><USER26> Well, it allows you to return multiple objects without using an opaque Tuple or creating your own class. Sure, the other options work, this is just a nicer syntax. I mean, I can all of what C# does in C if I want to, but I appreciate the syntactical sugar.

</comment></comment></comment></comment></comment></comment></comment><comment><USER27> more improvements that allows more concise code and that looks functional in nature. Which is great, I have to do a lot in C# and really like it as a OO / with functional abilities type language.

But I keep wondering why F# doesn't really take off given a lot of peoples fascination with the functional world. It does functional nicely while still being able to bridge back to the OO world which allows you to easily leverage a __LARGE __amount of libraries in the .net world. It has a really good community, and F# specific frameworks for various things as well. It 's like a hidden gem that people pass over as they look at functional languages with much much smaller ecosystems.

<comment><USER16> I only played with F#, but my day job is writing FP code in Scala, so let me answer this:

> _I keep wondering why F# doesn 't really take off given a lot of peoples > fascination with the functional world_

As a matter of fact there aren't that many people interested in FP, mostly due to a lack of education on the matter. Even many people talking about FP are confused about what FP is. And the problem with the FP ecosystem are the abstractions, which tend to be extremely high level and very productive, however these aren't taught in school and the cost of entry is high.

So let me throw this question right back at you: _why F# and not Haskell?_ And note that the answer you give is going to be applicable to C# versus F# and at the same time flawed ;-)

And you see, raising the abstraction is one way humanity has always tackled complexity, however this is essentially about vertical scalability of talent - or in other words enabling the same people to handle more challenging problems by giving them better tools. But the trouble is that this is incompatible with horizontal scalability, which is about growing by hiring more and more people, i.e. building assembly lines.

So going back to your question, the reason for why not FP is actually simple, but hard to swallow: the software industry is growing due to huge demand, as a consequence a majority of people working in this field are beginners and when the industry has a choice between quality and quantity, it will go for quantity at the expense of quality.

On the other hand the good news is that with the proper education, mindset and tools, as a small team, you can still build products that compete with big companies having virtually unlimited resources.

<comment><USER27> why F# and not Haskell? Now we are leaving the .NET world. We are leaving a lot of libraries behind that bridge to many many things. For instance, my latest F# project was to make a REST service that bridged to a Digital I/O board, the DIO board manufacturer has .net libraries for their devices, I simply wrapped those, used Suave.io, 50 lines of code later I have a webservice for control of DIOs. The point about why F# is really good is the huge amount of libraries you get for free that very few other functional languages enjoy ( JVM based languages would enjoy this advantage too ), you can make bridges to other languages / environments, but that's not quite as straightforward. So to me, it's not the same argument.... F# -> Haskell (lose the libs) C# -> F# (don't lose the libs). Not only that, you can sprinkle it into your projects before fully committing to it.

</comment></comment></comment><comment><USER21> I'm a little disappointed that pattern matching doesn't simply narrow the variable, and instead requires a new variable name to hold the narrowed type. Even TypeScript narrows the variable in-place!

<comment><USER4> You may want to deconstruct the value _and_ use the original base value. This seems entirely logical, and consistent with most implementations in functional languages (and I'd say makes TypeScript's implementation the poor one - although I haven't seen it myself to have an opinion on).

<comment><USER28> > You may want to deconstruct the value and use the original base value.

I think this is exactly right. Members can be declared visible only when viewing an object through a particular supertype, and you may simultaneously need to invoke methods from the supertype and the subtype.

</comment></comment></comment><comment><USER29> Minor nitpick: the title is (edit: was) missing a leading dot.

</comment><comment><USER30> major part of these new features are very cool but i'm afraid they could compromise future evolution of the Language. some implementation details scares me, maybe i'll become used to them, i only hope that these doesn't result in a boomerang for future versions.

Deconstruction implementation is scary, i would prefer to have a special symbol (like the desctrutor) and duples that ignores names are ok but sounds very error prone, maybe i just have to try them to understand, also order sensitive case makes my dev sense tingle...

</comment><comment><USER31> I was a die-hard python guy and now I'm a die-hard python guy who appreciates .Net. (Forced to because I work in a .Net shop, but it has chops)

</comment><comment><USER32> Why such a verbose syntax for pattern matching?

<comment><USER33> It still has to look C#ish.

</comment></comment><comment><USER34> Possible to use variable placeholders on the left side of a deconstructor assignment?

<comment><USER35> There's a plan to allow wildcards in deconstruction patterns, but it doesn't look like it's ready in time for C# 7. So hopefully that will appear in C# 8.

It would look something like:

var (first, second, *) = ReturnsFourThings(foo);

</comment></comment><comment><USER36> 'goto case' is a thing? I'm so going to have fun with that

<comment><USER5> It has always been a thing. The original C# design was to take the C switch statement as is, but tighten it up to avoid crazy stuff like Duff's device, and to make non-obvious implicit things explicit.

Consequently, C# _requires_ that control flow provably cannot reach the end of any non-empty case block (to avoid implicit fallthrough that normally happens in C, Java etc). Normally this means that you _must_ use `break` (or something else that transfers control, like `continue`, `throw` or `return`). But fallthrough is actually useful sometimes, and `goto case` provides you with a way to request it explicitly - and then ramps it power up a notch, because why not?

Amusingly, this is something that C doesn't have, even though its case labels are true labels (allowing for Duff's device and similar tricks). If you want to goto them, you need to add an explicit named label there.

</comment></comment><comment><USER37> removal of pre-declaration of out parameters = win!</comment>


Ask HN: Why aren't hospitals prepared for a pandemic? - <AUTHOR> Having worked in fintech for many years, I have seen regulations require that firms prepare a multitude of ways to manage or recover from large-scale emergencies.  As current anecdata, I haven't heard of any issues with the unprecedented demands placed on firms for those who are now working from home (toss a coin to your network admin).<p>Healthcare must be under similar, if not more stringent regulations and oversight.  From what I've read SARS-CoV-2 was a foreseeable event.  Why does healthcare give the impression of a lack of planning and are making it up as they go?  What are we not seeing? <comment><USER2> In your jobs. On the projects you are involved in. Do you have a disaster recovery plan? Have you tested that plan? No. Why not? Oh, lack of funding and people ressources. Something was deemed more important? Same goes for hospitals i guess, especially in countries where people don't like taxes and where the tax money goes to the military. USA for example.

<comment><AUTHOR> Yes. I don't really have insight into non-fintech environments which may be different.

DR is taken seriously. It is planned and executed several times per year taking down entire data centers, ensuring multiples of capacity for peak load, etc.

It is all documented and reported to central teams who then report to regulators.</comment></comment>


Climate change now detectable from any single day of weather at global scale - <AUTHOR> https://www.nature.com/articles/s41558-019-0666-7 <comment><USER2> People's financial incentives are not aligned with the climate's necessary modifications. The two won't be aligned until climate passes over its tipping point and enters an irreversible feedback loop.

<comment><USER3> When will incentives ever be aligned with one's own long term interests?

There is reason for despair, that competition to survive the day to day - everyone needs to get through their week, month and year - will always detract from the larger concerns about long term sustainability of our civilization and prosperity.

<comment><USER4> I worry that we have removed people's moral agency by normalizing huge debts for life's necessities. We have the technology to make housing and education cheap and plentiful, but instead create scarcities and credit to have leverage over the workforce and keep them working in ways they'd prefer not to. I mean, every day I think "but guys seriously shouldn't we use all these computers to work on the metaphorical asteroid heading for Earth??? guys??" But we don't, myself included, because bills.

<comment><USER5> I've thought about this a lot too. You feel stuck inside a vortex against your will at times.

</comment></comment></comment></comment><comment><USER6> Australia is burning, its government doesn't seem to think anything is wrong, they just want to dig more coal

<comment><USER7> They might not get the chance: latest news[1] this morning is that some of the coal seams have caught fire underground!

This is catastrophic. Underground coal (and oil) fires are near-impossible to put out and are generally just left alone to burn, usually for decades before/if they run out of fuel.

[1] [https://twitter.com/maetl/status/1213420680579964929?s=20](https://twitter.com/maetl/status/1213420680579964929?s=20)

<comment><USER8> If that's the case then it's truly catastrophic. As an example, the Centralia (USA) mine coal-seam fire started in 1962 is extimated to last for about 250 more years. [https://en.wikipedia.org/wiki/Centralia_mine_fire](https://en.wikipedia.org/wiki/Centralia_mine_fire)

Assuming we have the technology, removing underground oxygen might help to put out the underground fires, though I can't imagine any process not involving either pumping sea water down there which would make the land sterile for vegetation, or slowly replacing oxygen with CO2 which would be even worse.

<comment><USER9> Carbondale, PA tried flooding and other techniques for the time (1950's), but ultimately the only way to extinguish it was by digging it out. It took about 10 years and it is estimated more earth than the Panama Canal was moved for the dig. It came within 20 feet of expanding into the core of the city and leading to what happened in Centrailia.

[https://en.wikipedia.org/wiki/Carbondale_mine_fire](https://en.wikipedia.org/wiki/Carbondale_mine_fire)

</comment></comment></comment></comment><comment><USER10> Publicly funded and supported climate change detection method that is essential to communicate to the public...behind a paywall. Disappointing at least.

<comment><USER11> [https://sci-hub.se/https://doi.org/10.1038/s41558-019-0666-7](https://sci- hub.se/https://doi.org/10.1038/s41558-019-0666-7)

</comment></comment><comment><USER12> Seems fake

</comment><comment><USER13> Living in Eastern Europe right now. It's +6 Celsius for the last week. Earth hasn't frozen yet, so if any snow falls it melts in a few hours.

In comparison, when I was growing up here in the 90s; we had solid -30 Celsius winters for several months.

You _had_ to prepare opposed to nowadays, where buying a winter jacket comes down to preference. Cold or not cold...

But climate change is a hoax, right?

<comment><USER14> I mean I live in Eastern Europe too, Hungary and it's -7c now. No snow but everything is frozen. I don't think our local experiences are a good indicator.

>we had solid -30 Celsius winters for several months

I'm curious, do you have any data source about that? -30c for several months sounds really extreme

<comment><USER13> Why would you ask me for data when you can look that up for yourself?

I speak from experience.

<comment><USER15> >I was growing up here in the 90s; we had solid -30 Celsius winters for several months.

Where? In your imagination?

[https://weatherspark.com/h/y/148642/1990/Historical- Weather-...](https://weatherspark.com/h/y/148642/1990/Historical-Weather- during-1990-at-Kyiv-Zhuliany-International-Airport-Ukraine)

[https://weatherspark.com/h/y/148509/1990/Historical- Weather-...](https://weatherspark.com/h/y/148509/1990/Historical-Weather- during-1990-at-Ellinik%C3%B3n-Airport-Greece)

[https://weatherspark.com/h/y/148455/1990/Historical- Weather-...](https://weatherspark.com/h/y/148455/1990/Historical-Weather- during-1990-at-Belgrade-Nikola-Tesla-Airport-Serbia)

[https://weatherspark.com/h/y/148594/1990/Historical- Weather-...](https://weatherspark.com/h/y/148594/1990/Historical-Weather- during-1990-at-Loshitsa-Minsk-International-1-Belarus)

<comment><USER16> Please don't be a jerk in HN comments. If you have correct information, it's enough to provide that without crossing into personal attack. These threads are flamewar prone enough as it is.

<comment><USER13> Maybe I should have prefaced my last sentence in the original comment with a fat /sarcasm tag. I know it's a sensitive topic but I appreciate you pointing out the insensitivity in my reply.

</comment></comment></comment></comment></comment></comment><comment><USER17> it would be naive/foolish to expect that the enormous technological progress and overpopulation by humans would not affect the environment. The question is how fast can people and ecosystems adapt. This is not the first nor the biggest change the earth has seen by far. It's also naive to think that politics is going to reverse that change - it's a technological problem.

<comment><USER18> the overpopulation mantra has been debunked so many times already.

edit: since i'm getting downvoted for pointing out the obvious, here's links pointing out that overpopulation is a myth, even a racist one in some circumstances:

wapo: [https://www.washingtonpost.com/opinions/five-myths-about- the...](https://www.washingtonpost.com/opinions/five-myths-about-the-worlds- population/2011/10/26/gIQArjSWmM_story.html)

[https://www.google.co.uk/amp/s/fee.org/articles/the-myth- tha...](https://www.google.co.uk/amp/s/fee.org/articles/the-myth-that-the- world-is-facing-a-population-crisis//amp)

[https://www.pop.org/debunking-the-myth-of- overpopulation/](https://www.pop.org/debunking-the-myth-of-overpopulation/)

[https://www.globaljustice.org.uk/blog/2019/mar/9/how- racist-...](https://www.globaljustice.org.uk/blog/2019/mar/9/how-racist-myths- built-population-growth-bogey-man)

kurzgesagt: [https://youtu.be/QsBT5EQt348](https://youtu.be/QsBT5EQt348)

the guardian: [https://www.theguardian.com/cities/2018/mar/19/overpopulatio...](https://www.theguardian.com/cities/2018/mar/19/overpopulation- cities-environment-developing-world-racist-paul-ehrlich)

nytimes: [https://www.nytimes.com/2013/09/14/opinion/overpopulation- is...](https://www.nytimes.com/2013/09/14/opinion/overpopulation-is-not-the- problem.html)

[https://wattsupwiththat.com/2019/05/25/overpopulation-the- de...](https://wattsupwiththat.com/2019/05/25/overpopulation-the-deadly-myth- behind-the-other-modern-myths/)

<comment><USER19> Indeed, if we only think in terms of thermodynamics, the Earth could sustain _trillions_ of people with ample private room (orders of magnitude more than our current average home+office size). And if you trickle down to implementation problems (agriculture, logistics, etc) and take mega-structures of the 25th century out from the equation (so, immediate future, 21st century) you still get a max figure north of 10 times the current pop.

The problem is one of contrast: e.g. there's nobody in deserts but people die everyday in overcrowded train stations in India. That's why people perceive "overpopulation" as a problem, but it has more to do with human inefficiency than the physics of our planet.

However GP's point about adaptation speed of our civilization to the changing ecosystem stands.

I sometimes wonder, between utopia and horror, how many people will have to die in the name of climate catastrophes for a global "survival instinct" to kick in at the highest level — like stability is a thing for the finance world, the military world, because we're so aware of how much these things may destroy or kill when derailed.

I'm pretty much convinced it's generational — boomers will never get to it, not enough of them; half of gen Xers might sway; but millenials (born 1982 and on) will enact the tipping point, politically and sociologically. So, that's 2030-2040 mechanically for that gen to become the dominant one (by then aged 50-60).

My question is, how many will climate kill or hurt deeply until then? Could the tipping point happen sooner due to catastrophes?

I don't know what's a reasonable fair estimate, here. Are we talking millions? tens, hundreds? a billion? How dire is the situation, really?

<comment><USER18> i think we've been adapting to our ecosystem since humans first came into the scene.

the only difference now is that we finally realised we're living on a planet that's not constant, but actually changing. this realisation is a positive in my book, as an extinction level event is always around the corner.

re. how many will die: the plague has been constantly killing humans for almost 1000 years now. and we're still here. yes, i'm an optimist.

<comment><USER19> I pretty much share all your views, here.

My everlasting-optimism is only tempered by a somewhat keen awareness of that Fermi paradox thingy, a Darwinian observation that species just disappear and the world just keeps spinning.

I think the greatest invincible filter — one we just couldn't overcome — is the idea of a fatal flaw in our genetic make-up, or relatingly in the evolution of our environment, that we simply couldn't fix in time (it could be hidden, insiduous, e.g. increasingly more 'cancers' until we become born with it in majority).

In many instances, species do not entirely die from such evolutionary filters, a few survivors with just the right genes may appear and spread their immunity.

But in many instances, species just die at those filters. We still don't really know why Neanderthal disappeared, iirc there are clues pointing at a possible genetic flaw, combined with environmental pressure (sorta contra- variant doom scenario).

Which is why I think we should massively spend to solve as much of the "bio" stuff as we can, grab all low-hanging fruits _now_ and buckle up to kick off major projects spanning generations. The value and security to be gained, in terms of ultimate survival and progress, is just too critical to miss or delay. IMHO. And it's likely to take all of tech with it, a poster-child client sector to buy and fund all manners of extravagantly awesome technology.

I'd be curious to know how your optimism shapes things in imagination, regarding our past and/or future. :)

<comment><USER18> I think the Fermi paradox is BS. we're stuck on this small planet, never having set foot on another planet, nevermind another solar system. we haven't even encountered a single, no matter how small, alien life. and yet we come up with these naive theories. this tells me we're simply not ready for the possibilities that await us out there. maybe in the future.

and since you asked about the future, i want my "self" to be moved to a computer, set to sleep mode and then woken up once it reaches alpha centauri or something similarly far away. no body, no problems. right now that's pretty much the only way to discover anything light years away without our Earth- bound energy converter aka human body that comes with a billion dependencies and dramatically tiny life span.

but we're really discussing sci fi stuff. i hope that in the meantime the global warming fight will not drag the whole earth back a few hundred years instead of fixing by innovation.

<comment><USER19> Transforming the biological physical _body_ into a biological 'pure information' 'energy-encoded' _system_ (well, just software, but with incredibly specific rules) is one of my favorite ideas in SF. I tried to write a book including that 10 years ago, and while I'm a lazy fiction author, the thinking experiments were great.

I called this new species "energeans", functionally termed "Maxwell organisms" in a nod to the 19th century genius. Humans individuals become 'permanent, self-consistent' organized energy 'fields' of sorts (to preserve continuity, the sense of "self", as one's energy goes through machines (as electrons probably), space (as photons), etc.

It's totally whack physics as we speak outside some incredibly controlled lab, but it's fun to think about. :)

The Fermi paradox, I agree it's probably BS (but that's really just belief as we speak). I like to use it as a reminder of some "unknown known" (that _we_ might not know, but _others_ do), like

"civilization is possibly very, very hard";

or "we are so far away from big boys science that we grasp at space with tiny sticks like ants carry food, being silently observed by the equivalent of humans — so, so much above and beyond our very perception";

and my nagging favorite is a hypothesis that maybe, just maybe, what we think we "see" in space is really not what's actually out there — like Bohr's model of the atom with valency etc. was/is totally fine functionally (afaik we still do basic chemistry with it?), but not at all a "picture" of reality. Hence we'd be looking for caterpillars when all there is to see are butterflies — energeians? holo-trickery? nano-robotic swarms? blackhole farming? 5, 11, 23 dimensional space? And most being non-exclusive with others.

One thing seems sure to me: the most fundamental thing we might have right now is a quantum interpretation of Shannon's information theory, and going by that, there's a long way ahead of us until we reach "hard limits". It's crazy to think what this universe allows if you give it enough time and energy.

Here's to your last sentence being true. I must admit, I have confidence in the eventual resolution in a "decently near" future (~100 years at most), but I'm increasingly worried about the chaos/transition — if history is any indication, which it absolutely is imho, it's gonna cost too many lives and too much despair for too many people, whereas some will undoubtedly manage to turn the outcome to their advantage — even better off on the other side, like the "Great Heist of 1929", and it seems to me most majors periods of intense and prolonged chaos.

</comment></comment></comment></comment></comment></comment></comment><comment><USER20> Yes everything is completely messed up. Flowers blooming at wrong times of the year, animals are confused, crops are being beaten up by the biggest hail, Winds are getting stronger and this and that etc. Mother earth didn't even show the real teeth yet. When one of the the super Vulcanos wakes up we'll see the real hell on the earth. There is also super hostile environment outside earth but this is for some other space debate.

</comment><comment><USER5> It's likely to kill everyone of us. From the rich to the poor, strong to the weak, through famine, war and drought. Natural disaster after natural disaster. Horror after horror. Tragedy after tragedy.

Yet we're all in state of paralysis, watching our impending doom draw closer and fates unfold. Entrusting those who will do nothing about it. Half of us are still in denial.

I really wonder if we possess the survival instincts we think we do. Do we really have the drive to go on ?

Were humans just lucky to be installed on this beautiful blue spaceship. Do we deserve any merit for our past success? We are just limp and powerless to do anything about it all it seems.

Such a strange time to be alive, what a peculiar situation we're in. Quite the nightmare indeed.

<comment><USER21> 500 million animals wiped out in the blink of an eye and we look the other way. When humans start dying, I think we will continue to look the other way.

<comment><USER5> Hardly a whimper for them.

</comment></comment></comment><comment><USER22> Does anyone have a link to the paper?

Also climate _change_ is undeniable. At the risk of stirring the controversy, the real questions have always been: how much of it is because of human activity? and if that's significant, how much power do we have to change it further?

Based on the evidence so far, I personally think modern civilization has triggered initial conditions for the warming cycle but is no longer the majority force for the continued change.

<comment><USER23> That is almost reasonable. But it's still naturalistic thinking, i.e. whatever happens without humans is good.

The real questions should be: what climate do we want and how much power do we have to effect it?

If the climate changes naturally but we don't want it and can stop it, maybe we should. For example, we expect this interglacial period to end between years 10k - 30k, corresponding to about a 10°C drop.

Also, the way best way to reverse current climate trends might be different then stopping the major cause.

<comment><USER22> > " _how much power do we have to effect it_ "

This is entirely predicated on understanding how much we _have_ affected it so far and how that effect has changed over time. How do we know we can stop it? Are efforts toward stopping it (given the Earth has gone through cycles before) more useful than adapting?

Blindly saying we can reverse something that we can't and instead should be adapting for is just as bad. Unfortunately any discussion around this is constantly devolves into emotional dispute rather than rational debate.

<comment><USER23> > This is entirely predicated on understanding how much we have affected it so > far

Obviously, this isn't true. It's possible to have a future effect on things you haven't yet changed and visa versa.

<comment><USER22> I never said it's not possible. I'm asking how do we know how much we can effect it in the future if we're not entirely clear on how much we've affected it so far and how that effect has changed itself?

Or do you already have an answer to the 2nd question you posed?

<comment><USER23> Just because you know how much effect you've had doesn't mean you know how much control you have.

They are related but the relationship is not clear.

And only the second question matters.

<comment><USER22> To be clear, any forecast requires a model based on previous historical data. Otherwise it's not a forecast, it's just a random guess.

</comment></comment></comment></comment></comment></comment></comment><comment><USER24> I'm quite tired of the framing of the climate change discussion, whether it exists or not. It is like you pondering whether your house is going to actually burn next year or not when you think about purchasing insurance. Completely idiotic question. What you are thinking is the _risk_ (i.e probability times loss) of your house burning. So no, I am not going to tell you that the climate catastrophe is going to happen. What I do say is that even if after reframing the discussion from dichotomy to probability discussion, if you really think that the probability of the scientists being collectively wrong is so small that the science can be ignored, in my books you are so f$&king stupid[1] that you should give up your voting rights.

[1] pardon, I think my french is a bit rusty here.

<comment><USER25> It is important to distinguish the basis of the change. Whether anthropogenic or of other causes (or, likely, a mix of causes). The same change in weather could have different responses based on the cause. It is also important to talk about what to change. Some governmental/industrial changes could cause the deaths of millions or billions of people (doing absolutely nothing might do the same), it is important to have a civil conversation where the ideas and rights of all are respected, understood, and considered. Oversimplifying is not useful. I'm not arguing for any specific reason or changes, only for civility and all around thoughtfulness. It is a very complex issue that may impact a huge number of factors in society. Great caution, civility, and thought should be given. Even to those who disagree with some conclusions. Advocating for the removal of voting rights for those who disagree so that we can arrange their future for them may be counterproductive.

<comment><USER24> > Advocating for the removal of voting rights for those who disagree so that > we can arrange their future for them may be counterproductive.

I disagree slightly. Not "may be" but "is" counterproductive. Occasionally you just need to vent out actual opinions and ignore the productivity...

</comment></comment></comment><comment><USER26> The only way to get out of this situation is a green dictatorship. It's the least painful solution. Democracy and freedom are great things, but consumerism abused them, and it's leading everyone to their own destruction. I'm tired to end discussions with "but you cannot confiscate things from people, it's against basic human rights". Ignorance and failure to listen to reason are very dangerous.

I want to hope people will adjust deliberately, but advertising has too much power over people. I cannot let myself gamble with the idea that humanity will be courageous enough to avoid destruction of this scale. The stakes are too high.

History always worked like this. It's a collection of new lessons that adjust the collective consciousness.

The future will progressively look like some Hollywood dystopia, until something will break politically, but it will be too late. Don't forget that the new deadline is the melting permafrost, which will snowball climate change into something that will make temperature rise much faster.

<comment><USER27> If you really want to kick off another civil war/world war, something like this seems like the perfect way to do so. If people tried to enforce environmentalism via a dictatorship, the rest of the population would like fight back hard, and they'd end up in a very awkward situation very quickly. Remember, the people who would want to limit other people's consumption for environmentalism sakes are significantly outnumbered and outgunned by those who don't.

It would also likely inspire an awful lot of anti intellectualism and anti 'ivory tower' resentment, which could have terrible consequences for the future.

Basically, any attempt would go about as well as someone walking into the middle east and trying to set up a secular dictatorship in the style of the USSR.

Of course, a cynic may say that's the only way to deal with climate change and they may be right. It's just that trying to fix things via force would probably go even more poorly than trying to persuade people to live less comfortably would.

Unfortunately, the most likely fixes right now are probably:

A: Some sort of miraculous new technology is invented that can cheaply do carbon capture and provide enough clean energy that fossil fuels are made completely obsolete.

B: Somehow, a huge push is made for mastering space travel, and people are incentivised to leave Earth. A sentient species with an advanced civilisation may simply be incompatible with other life on a planet.

C: Society gets wrecked enough that humanity somehow ends back in a pre industrial revolution state, perhaps due to the side effects of climate change.

D: Humanity simply decides they can't fix Earth, doesn't try and edits themselves/civilisation to deal with rampant temperature increases/disasters/whatever.

<comment><USER28> >Basically, any attempt would go about as well as someone walking into the middle east and trying to set up a secular dictatorship in the style of the USSR.

Maybe I'm not getting your point, but Assad regime is secular dictatorship, more or less? So if you wanted to say that this is something completely impossible, well, the metaphor is not quite correct. And Iran before 1979 revolution could be considered secular dictatorship as well.

<comment><USER27> Might have not been the best example. Either way, the point being, trying to enforce environmentalism by force would probably annoy the majority of the population enough that your government wouldn't remain in power for very long.

<comment><USER26> The problem is that what is required to do will annoy everyone, no matter the angle. Withdrawal from abusive consumerism is going to be ugly, that's the issue, but it's necessary.

A green dictatorship would signal that everyone is given equal treatment. It's also an emergency measure.

Of course the word "dictatorship" has a very bad connotation here, because it implies oppression and violation of human rights, but that's not what I am advocating.

I am advocating for the revocation of the right to emit co2. It is a very strong restriction when look around you, because consumers are really friendly towards their lifestyle which directly finance lobbying efforts to avoid a carbon tax.

What is needed to do, while the industry adapt, is to allow the minimum, necessary items people needs to live: food, water, hygiene, shelter etc. while diminishing co2 emissions to their most lowest possible, and let industry to work without emissions to gradually change their process.

You cannot trust the industry to reduce emissions and do a slow switch because it's going to be too slow, and you cannot trust liberalism to find quick solutions if there is no strong enough incentives. Lobbies are never going to let change happen. It's going to be too slow and chaotic, not to mention fraud and people who will disagree with human responsibility.

Look at Tocqueville. Democracy is great, but when there is urgency about a complicated problem, democracy can be a problem.

<comment><USER27> The issue isn't that drastic action is not/may not be necessary, it's that the vast majority of the population will not just 'give up on consumerism' for a perceived long term benefit, and any political attempt to make them will be met with a huge amount of backlash and instability.

If a political party or politician proposed what you're saying, they probably wouldn't get elected. If they tried it when in power, then the next party who gets elected would probably withdraw said restrictions. If they tried to 'turn off democracy' to do this, then people would get extremely angry, probably revolt and there would be a huge debacle. Especially given that worldwide, it'd be seen as an authoritarian coup in a democratic society, and responded to with economic sanctums, anger on the international stage and perhaps a war/support for overthrowing the government.

The problem isn't that such a dictatorship or authoritarian rule is necessarily against the long term interests of the population (though many authoritarian regimes (including China) would argue the same thing for their countries). It's that it's not democratic, not backed by most of the population and (perhaps rightly) seen as an alarming development in a country's history.

<comment><USER26> It's not democratic, so what? It doesn't mean it's not necessary. Democracy doesn't always work for the public interest.

> seen as an alarming development in a country's history.

What do you mean? How would "an alarming development" be problematic? Democracy or not, action is required, and despite knowledge of the problem, I don't see any progress. I have nothing against democracy.

> and any political attempt to make them will be met with a huge amount of > backlash and instability.

I think there is enough support for drastic measures, I don't think instability is a big risk. And if there is not enough support today, there will be more at each new heatwave and forest fire.</comment></comment></comment></comment></comment></comment></comment>


The Quiz on CPU 0: Playing Scheduler Wars with AMD's Threadripper 2990WX - <AUTHOR> https://www.anandtech.com/show/13446/the-quiz-on-cpu-0-playing-scheduler-wars-with-amds-threadripper-2990wx <comment><USER2> Does this fact that not all cpu cores / processing cores are equal anymore bring back a reason to implement the hardware scheduling mechanisms built into x86 and x64 architecture ? Or is there still a good argument not too use that and to stick with the software method>? (in some hypothetical new operating system)</comment>


RethinkDB performance data - <AUTHOR> http://www.rethinkdb.com/blog/2009/08/rethinkdb-performance-data/

<comment><USER2> So what are the numbers for selects while writes are happening? It's really suspicious to show 'selects with no writers.' In terms of transparency, it's nice to have benchmarks that don't show you winning everything (makes me trust that you actually know what you're doing, rather than are just optimizing a few benchmark-able cases).

Also, include the actual queries you are executing. Inserting into 2 columns with only a primary key index is a completely different beast than 30 columns with uniq key constraints and multiple multi-key indexes.

<comment><AUTHOR> There are a lot of interesting benchmarks to run - updates, deletes, different concurrent loads, different indexing schemes, a variety of row sizes and variable column sizes, etc. Right now it's only three of us, and it's only been a little over two months. We're really looking forward to running all of these benchmarks (along with TPC and iiBench), but there is only so much we can do with a limited amount of time.

One thing we're finding is that people are skeptical by default. In retrospect, we probably should have expected this given the amount of false advertisement, magic bullets, and vaporware out there. We're not offering magic bullets - we're simply optimizing for modern hardware and modern workloads as opposed to 1970 hardware and database usage patterns. We'll be posting more benchmark results and detailed explanations of how RethinkDB works to win your confidence. We're not trying to trick you. What's the point? Eventually everyone would find out and the house of cards would collapse anyway. We just have only 24 hours in a day (btw, if anyone has a device to solve this problem, we'd love to beta test it!)

</comment></comment><comment><USER3> These numbers are 4x as slow as Keyspace[1] with fast spinning drives as Keyspace can do 100,000 inserts/sec. Keyspace currently uses BDB as the backend, so this is basically a statement about BDB performance.

I'm curious, where does the Mysql/RethinkDB take this performance hit, or is this just a totally different benchmark?

Keyspace is a KV-store, but this shouldn't be a big deal, as a rowstore also inserts into a single btree as long as there are no secondary indices (A KV store inserts a K+V whereas a rowstore C1+C2..Cn.) Keyspace groups inserts into transactions of size ~1M in the benchmark I'm referring to. Are you inserting one row per transaction/sync here, or what's the deal?

[1] <http://scalien.com/keyspace>

<comment><AUTHOR> The biggest performance hit right now is getting the data into MySQL (the network stack). We're inserting one row at a time, so most of the time is spent on the wire. Effectively, it's a different benchmark.

BTW, an average drive rotates at 250 revolutions per second. If you flush on every transaction, this is roughly how many transactions you'll be able to sustain. Anything more than that, and you have to batch transactions in memory.

<comment><USER3> So it's one network roundtrip + commit per INSERT?

<comment><AUTHOR> Yes, that's correct. The benchmark was run on localhost, so it might be going through loopback, but most of the time is spent in the network stack.

<comment><USER4> Any difference connecting through a local unix domain socket instead of localhost (to avoid TCP overhead?)

<comment><USER5> We'll be looking at many ways to cut networking overhead over the coming weeks, including socket communication (though I don't know if MySQL supports this).

</comment></comment></comment></comment></comment></comment><comment><USER6> Congrats on the benchmarks.

A couple of questions:

How has RethinkDB been affected by the recent changes to SSDs that have an improved firmware for garbage collection?

Unrelatedly, does RethinkDB use the same clustering strategies as MySQL?

<comment><USER5> The new garbage collecting firmware is probably only effective for consumer use, not enterprise, as these firmware chips (we think) need some downtime to operate properly. We haven't gotten our hands on them, but we don't think they'll solve the problems we're solving.

We don't support clustered indexes. Clustered indexes are good on rotational drives because they allow you to read data as soon as you find an interesting node in the index tree. Because SSDs don't have slow random access, this is not necessary, so we don't do it.

</comment></comment><comment><USER7> this will be great as soon as hosting providers give the option of "disk space using SSD". Until then, a solution like this binds you to buying your own servers. Maybe I'm misreading their web site, but they do list SSD as their first "feature".

<comment><USER8> SoftLayer offers SSD options on their monthly dedicated servers, in particular 32 & 64GB "Intel SLC SSD" drives.

</comment></comment><comment><USER9> _times only across the mysql_stmt_execute() call_

I hope this means timing many, many calls and then timing the loop overhead, subtracting, and dividing by the number of calls made. Clocks just aren't good enough to time individual calls.

</comment><comment><USER10> I click the link and get "504 Gateway Time-Out".

<comment><AUTHOR> Err, all the advanced database work, and we screwed up PHP. We redirected it to a mirror for the time being.

</comment></comment><comment><USER11> Objective-C? Why?

<comment><USER12> "We wrote our original benchmarking tool in Python, but during our latest benchmarks, we noticed that it was taking about as much time as the engine itself, hiding our real performance numbers. We now have a very small Objective-C program (<900 lines) that uses prepared statements in a tight loop, and times only across the mysql_stmt_execute() call."

What's wrong with Objective-C?

<comment><USER11> Seems a very arbitrary choice.

Shouldn't they be using standard benchmarks, anyway? It's easy to write your own benchmark to make something look good.

<comment><AUTHOR> We used Objective-C because it has a very simple and efficient threading model, and we're on a tight schedule. Python wasn't fast enough, coding threads in C or C++ would take a few hours longer than we had, so we used Objective-C.

You're absolutely right about standard benchmarks. We haven't engineered our benchmarking tools to make RethinkDB look good, we simply wrote code to run the most obvious operations - as many inserts as possible, as many selects as possible, etc. We will be moving to more commonly accepted benchmarks (such as TPC and iiBench) soon, but in the meantime it helps to have a simple benchmarking tool that shows off what RethinkDB can do on common workloads.

<comment><USER11> I'm curious. This is an interesting new company, and I'd like to follow it. I'm very curious about the tools you use.

What is particularly efficient about the threading model? I know very little about Objective-C. Are you guys are very comfortable with it? Does someone writes Mac application there?

<comment><USER5> I wrote the benchmark, and have never developed on a Mac or with the Cocoa framework. I started with a C application because I was familiar with the MySQL C api (specifically, their prepared statements), and that was very fast. Adding threading in C is difficult, so I took the opportunity to learn how to use NSThread, and really liked it. The benchmark is mostly C for the nitty gritty details, with some Objective-C to tie everything together. I wouldn't say I'm extremely comfortable with it, but it's very easy to drop straight down to C for the interesting bits.

</comment></comment></comment></comment></comment></comment><comment><USER13> Looks great! Can't wait until it's ready for a production setting.

</comment><comment><USER14> What about alter performance?</comment>


Show HN: Distributed SAT solver in Elixir - <AUTHOR> Hi, I wrote a distributed SAT solver in Elixir to get a feel of the language, perhaps someone out there might find this interesting. I really don't know if this can be a economic approach to SAT solving.<p>https://github.com/roehst/elisat <comment><USER2> It might be useful to describe the data structure for input. Reading the examples, it's hard to figure out the sematics of the input.

More documentation would be more useful both for production and as an example.

<comment><AUTHOR> Sorry! Will do that. It's lists of lists of integers.</comment></comment>


Iran has discovered an oil field with an estimated 53B barrels of crude - <AUTHOR> https://www.cnn.com/2019/11/10/business/iran-new-oil-field-intl/index.html <comment><USER2> We are living in a simulation of a game of Risk.

</comment><comment><USER3> Who can decently rejoice at such a new?

That's how many more tons of CO2 in the atmosphere? As far as I understand, it means pic oil farther away and lower prices that will affect competitiveness of renewable.

</comment><comment> j-walker This is from November 2019.

</comment><comment><USER4> Whenever you hear about military tensions, retrace the news in that region and you will find newly discovered oil fields or pipeline plans.

<comment><USER5> Tensions involving the US? Because the combination of the US and Canada has been self-sufficient in petroleum for a few years now: i.e., the US need go no further than Canada to get all the oil it needs. The US would be self- sufficient now if the Saudis hadn't lowered their prices about 6 years ago in an explicit attempt to discourage US production; as it is, US self-sufficiency will take a few more years.

Now that the US has the technical means to extract "tight oil" just the state of Texas has enough extractible oil to last the US 100 years, I saw one expert say recently.

(Of course, burning all that oil would cause horrible climate change, but that is true of the Iranian oil, too.)

<comment><USER6> It's not about physical self-sufficiency but about money. It's about who gets to pump and sell that oil and where the profits go.

<comment><USER7> Furthermore it's about not using up the US reserves, so that when the rest of the world runs out the US will still have plenty on it's own soil.

Have a look into why the Alaska pipeline runs that lowest possible capacity.

<comment><USER6> I have long suspected that the USA deliberately held back its own oil production to maintain a strategic reserve. This policy seems to be ending though as evidenced by today's high domestic production.</comment></comment></comment></comment></comment>


Drone crashes near the UC Center for Drone Policy and Ethics - <AUTHOR> https://uccenterfordrones.wordpress.com/regarding-recent-drone-malfunction/

<comment><USER2> "Irony can be pretty ironic sometimes." - Airplane II</comment>


Is it okay to ignore results from people you don't trust? - <AUTHOR> http://www.badscience.net/2010/03/when-is-it-okay-to-ignore-people-you-dont-trust/

<comment><USER2> There's a difference between results that come from people who we think to be generally bad but do not have any incentive to do anything but a reasonable study, versus people we suspect desire to directly tamper with the research.

I wouldn't ignore any results that have strong evidence, but I would read much more carefully the papers of those who start with an agenda.</comment>


U.S. now bugging German ministers in place of Merkel: report - <AUTHOR> http://www.reuters.com/article/2014/02/23/us-germany-usa-spying-idUSBREA1M0IK20140223

<comment><AUTHOR> > Germans are especially sensitive about snooping due to their experiences in > the Nazi era and in Communist East Germany, when the Stasi secret police > built up a massive surveillance network.

I find it curious how this comment seems to appear often in NSA related articles. As if Germans had a degree of sensitivity (with regards to privacy) that's exaggerated. Makes no sense.

<comment><USER2> It's not that hard to understand if you compare it to the almost religious patriotic fervour that many americans display when it comes to loving their country and its way of life.

Although the US has a well-regulated militia enshrined in its constitution, based on a history of distrusting the government, a distrust of the powers that be has not lasted as far as the current day. Germany has precisely that.

While it's true that any reasonable person has a degree of sensitivity similar to the one you're suggesting should not be exaggerated, I think it's also fair to say that you're more likely to find considerably more people who say "The NSA can read my emails. I've done nothing wrong" in the US than in Germany.</comment></comment>


What Is the "Length" of a String? - <AUTHOR> https://blog.etleap.com/2019/10/03/what-is-the-length-of-a-string/ <comment><USER2> IIRC from some other article; most JavaScript engines use a UTF-16 Unicode encoding for characters, and it looks like the .length attribute is reporting the memory footprint in terms of 16 bit codepoints. A single grapheme (display 'character', pictograph, or fixed sized space) may be composed of one or more codepoints.

'length' is subjective. It makes sense to want to know how many storage units are required.

Knowing the number of printed 'graphemes' (do we count non-printing 'characters'?) might also be useful.

The display length (at a given scaling size, taking in to consideration font kerning/etc) can also be useful.

That's where the linked article really goes off the rails. Characters don't have printing widths, not outside of extremely specific circumstances. You have to ask the layout engine in use what dimensions are occupied after it solves the very complex problem.

</comment><comment><USER3> It really doesn't matter. A string is a binary blob until you need to parse it, or display it. If you need to parse a string and it's UTF-8, you can pretend it's an ASCII string because the control characters you need for parsing are probably ASCII characters such as {, [, or ". UTF-8 continuation characters set a high bit to ensure that UTF-8 is a superset of ASCII, so you can use all of the standard C library functions. If you need to display a string, you're already using a font library which, in addition to providing the logic to iterate through the string character by character, can work out kerning etc.

I never understood the rationale for using encodings such as UTF-16. They seem to be the worst of both worlds: strings for which ASCII would be adequate take 2x the space, and the encoding is still multi-byte. I once worked with a Windows developer who swore blind that UTF-16 was not a multi-byte encoding. When I provided evidence to the contrary, they responded something along the lines of "ok, but who would ever need more than 16 bits worth of characters?". ¯\\_(ツ)_/¯

<comment><USER4> The(/a) rationale for UTF-16 is that it's more space-efficient for languages that use high code points, like East Asian languages.

<comment><USER5> IIRC the real rationale is back in the early days people bet that 16 bits would be enough for a fixed length encoding, but the bet didn't pay off and now they're stuck with the worst of both worlds.

<comment><USER6> Your explanation is correct. UTF-16 is a hack on top of a hack, and no one uses it in new software. However, Java and Javascript are stuck with it for legacy reasons.

It wouldn't be so bad if people just understood that there are (almost) no valid uses-cases for measuring the size of a string. As someone else mentioned, it's a binary blob for all intents and purposes, and if processing of its content needs to be done (such as displaying it on the screen, or performing, say, word-wrap) then it should be handed over to libraries that have been designed for this purpose, because these things are very complicated.

Simply by having a single non-ASCII character in my name, I'm seeing software fail on this on a regular basis.

</comment></comment></comment></comment><comment><USER7> I prefer this article: [https://hsivonen.fi/string- length/](https://hsivonen.fi/string-length/) HN discussion: [https://news.ycombinator.com/item?id=20914184](https://news.ycombinator.com/item?id=20914184))

</comment><comment><USER8> > Instead of rendering all the strings in each column, we can split the > strings into their corresponding graphemes and render them individually. > This allows us to cache the pixel length of each grapheme we encounter.

I wonder if they're aware of the `measureText` method used in canvas: [https://developer.mozilla.org/en- US/docs/Web/API/CanvasRende...](https://developer.mozilla.org/en- US/docs/Web/API/CanvasRenderingContext2D/measureText)

Seems a lot simpler than trying to split strings up by graphemes, and probably more reliable. Pairs of letters such as "fi" are rendered as ligatures (single glyphs) in some fonts, and Unicode no longer standardises them (since the combinations are completely arbitrary). Also, grapheme clustering is going to change according to Unicode version, and not everyone's browser is going to be using the same Unicode version.

If you want to know the "string length", you basically either want the number of code units to store it (in languages that handle strings sensibly, this is just the number of bytes, since UTF-8 should always be used, except for historical reasons), or you want to pass it to a font rendering library to tell you something about pixels.

</comment><comment><USER9> Of course measuring each character also doesn't work because of kerning, ligatures and probably other rendering features.

</comment><comment><USER10> There are two data types that the more you think about them, the weirder they become: String & Date</comment>


Hosted product page? - <AUTHOR>

Earlier this week, I saw a startup that provides other statups with a Hosted Product page. They provide various templates. I did quite a bit of searching, but can't find the link to the product. If anyone knows what it is called and could let me know, that would be great and much appreciated. <comment><USER2> Maybe give a bit more of a description because I remember something similar but can't quite put it together with your description.

</comment><comment><USER3> I think what your talking about is App.net from Mixed Media Labs:

<http://app.net/></comment>


Let's Write an LLVM Specializer for Python (2015) - <AUTHOR> http://dev.stephendiehl.com/numpile/ <comment><USER2> I recommand David Beazley's talk from a recent PyCon India on a similar subject : [https://youtu.be/r-A78RgMhZU](https://youtu.be/r-A78RgMhZU)

Mostly live coded, it really is pretty amazing but also quite insightful.

<comment><USER3> > In this talk, I live-code a simple stack machine and turn it into an > interpreter capable of running Web Assembly. I then use that to play a game > written in Rust.

Wow. This is mind blowing. Thanks for the pointer.

<comment><USER4> He has a lambda calculus talk in python[0] that is just as good. Just a great educator.

[0] [https://www.youtube.com/watch?v=pkCLMl0e_0k](https://www.youtube.com/watch?v=pkCLMl0e_0k)

<comment><USER5> U of Chicago, I believe, denied him tenure, when he was an assistant prof there.

<comment><USER6> How good of an educator you are may not even be in the top 5 most important things to get tenure, unfortunately.

</comment></comment></comment></comment></comment><comment><USER7> If you like this you might also like [http://terralang.org](http://terralang.org)

<comment><USER8> Whoa, I've had this idea kicking around in my mind for a looong time (specifically something for dynamically generating Go code). Was wondering if anyone actually built this out, but could never find anything. Thanks for sharing!

</comment></comment><comment><USER9> Cool! Aside from the Python JIT portion, this was a pretty decent dive into LLVM. One question: was this a notebook, or it it just CSS that's making the code look like that?

<comment><USER10> It's this Jupyter notebook: [https://github.com/sdiehl/numpile/blob/master/Let's%20Write%...](https://github.com/sdiehl/numpile/blob/master/Let's%20Write%20an%20LLVM%20Specializer%20for%20Python!%20\(Stephen%20Diehl\).ipynb)

</comment></comment><comment><USER11> As others have noted, this is a somewhat dated article. Indeed, the github page for llvmpy ([https://github.com/llvmpy/llvmpy](https://github.com/llvmpy/llvmpy)) recommends to use llvmlite ([https://github.com/numba/llvmlite](https://github.com/numba/llvmlite)) instead.

See also [http://llvmlite.pydata.org/en/latest/user- guide/index.html](http://llvmlite.pydata.org/en/latest/user-guide/index.html) and in the context of the original article, in particular these two pages:

[http://llvmlite.pydata.org/en/latest/user- guide/ir/examples....](http://llvmlite.pydata.org/en/latest/user- guide/ir/examples.html)

[http://llvmlite.pydata.org/en/latest/user- guide/binding/exam...](http://llvmlite.pydata.org/en/latest/user- guide/binding/examples.html)

Hope this helps! :-)

</comment><comment><USER12> A thread from 2016: [https://news.ycombinator.com/item?id=12063808](https://news.ycombinator.com/item?id=12063808)

Discussed at the time: [https://news.ycombinator.com/item?id=8929040](https://news.ycombinator.com/item?id=8929040)

</comment><comment><USER13> Nice, compressed LLVM overview...

</comment><comment><USER14> Anyone got a benchmark for the LLVM'd code?

</comment><comment><USER15> Am I being daft, or is there not much sbout specializers on the web? Any links much appreciated.

</comment><comment><USER16> I'm wonder why llvmpy depends on llvm3.2 or 3.3, it's so a lot behind current version.

<comment><USER17> The article is from 2015. Many of the jits (eg numba) have moved to llvmlite.

[https://github.com/numba/llvmlite](https://github.com/numba/llvmlite)

</comment></comment><comment><USER18> Why not just use Nim?

<comment><USER19> I like Nim. I am learning it now. However, Nim is not Python and this post is about Python.</comment></comment>


Show HN: Starter, A unique mix of search engine and startpage - <AUTHOR> http://getstarter.com/ I have built this with one of the great fellow hackers I met here on HN, it's meant to be a mix between a easy on the eye (clean and beautiful wall papers I found and have been given by friends) start page and a duck duck go like bang feature plus more. After hooking the keyboard keys to URLs you can reach your favorite web sites with a flick of one finger no enter needed.<p>Angularjs, nodejs, mongodb, sweat :-) <comment><USER2> It's nice, but that darn font shadowing and sky blue text is horrible. And who the hell uses 'Dog Pile' anymore?

<comment><AUTHOR> font shadowing is for the dark backgrounds, sky blue text we can do something about, dogpile is 2974 in Alexa, not far after DDG. Just wanted to give as many options as I could.</comment></comment>


Internet Giants Erect Barriers to Spy Agencies - <AUTHOR> http://www.nytimes.com/2014/06/07/technology/internet-giants-erect-barriers-to-spy-agencies.html <comment><USER3> I like this, but the reality is that in the USA there isn't this fairy tale ending that NYTimes is writing.

> Telecommunications companies say they are denying requests to volunteer data > not covered by existing law.

Existing law covers (and will cover) bulk collection. The USA Freedom Act, from my understanding, actually strengthens the legality of bulk collection without the pesky need to renew the PATRIOT Act every few years (collection queries can be based on devices, for instance... so you could collect based on iPhone, Android, or browser user agent).

I am happy that Google and other companies recognize it's in their interests to protect privacy. But until substantive legislation protects the public, we have no reason to celebrate.

(edited for typos)

</comment><comment><USER4> It's tempting to say that these measures are pointless since, ultimately, the USG has the _capability_ to access any data it wants. (After all they can send armed men to get anything that you have access to.)

But actually, even imperfect, these measures by Google in particular are very useful and important, and are laudable. These measures stop the _surreptitious_ acquisition of data, and so _at least_ force data-acquisition activity into the open, and make it slightly more expensive to get.

Good! The US spy agencies are too reliant on technology! The bad guys can only really be found before they strike through face-to-face social interactions, which is inherently slow and doesn't scale. Good! Justice is a human problem and deserves to be executed at human scale. If it isn't then we risk a whole raft of moral hazards, which we are already seeing.

<comment><USER5> It's not just the USG that can do this. Anyone that can dig up some fibre and install equipment would have been able to tap these lines, as I understand.

As far as the government relying on technology, I doubt that is a battle that can be won. Laws were written with inefficiency as an obvious countermeasure for abuse. Now that inefficiency is disappearing, the laws need to be revisited and countermeasures directly written in. This will be difficult.

Google's roadblock is laudable and good, but perhaps a bit overdue. They were knowingly transmitting user data in plaintext outside of their physical control.

<comment><USER6>
        Google's roadblock is laudable and good,
        but perhaps a bit overdue. They were
        knowingly transmitting user data in
        plaintext outside of their physical control.

I dunno about that.

Imagine you're the engineer reviewing the design doc for the system that does cross-colo data transfers on company owned fiber. Do you really expect to see a detailed encryption system in there? Or even any discussion? I'm not sure I'd have said yes even now, much less a year ago.

I may be a minority and sound hyperbolic in saying this, but in many ways Snowden feels like something of a "9/11" for our industry: innocent assumptions we made prior (the company-internal network is safe; no terrorist would go down with the plane) just aren't true anymore..

<comment><USER7> If Snowden is 9/11 for "our industry," what does that say about Risen and Lichtblau's story describing NSA surveillance getting spiked by the NYTimes just before the 2004 elections, before eventually being allowed to be published over a year later?

[http://www.nytimes.com/2005/12/16/politics/16program.html?pa...](http://www.nytimes.com/2005/12/16/politics/16program.html?pagewanted=all&_r=0)

Those with innocent assumptions last year had their heads in the sand, and if we're talking about Google, Apple, et al, who claim to hire the best of the best, then that's a sad situation indeed. The simpler explanation is that it wasn't a problem to them until their customers found out.

</comment></comment></comment></comment><comment><USER5> >N.S.A. had brilliantly exploited

Eh? Tapping a wire is one of the easiest ways to listen in to communications. It's not like Google or MS or anyone was unaware of this threat vector, they just decided they didn't want to spend the time and money to deploy crypto on all their networks (I don't blame them, making it all work is a pain, and troubleshooting becomes more difficult, too).

And on top of that, AT&T was revealed to be splitting fibre for intelligence agencies in 2006. So in 2013 for Google or anyone to be caught unaware or call this "brilliant" is really overstating things.

What next, revelations on how Google is shocked that someone setup acoustic eavesdropping and keylogging? How this was "brilliant"?

NYT shouldn't give the NSA credit for being more than thugs on this particular thing. They've got a huge budget and apparently a fairly free legal reign. Of course they can go listen to other people.

<comment><USER8> _" Eh? Tapping a wire is one of the easiest ways to listen in to communications"_

Yet splicing into fiber-optics, especially undetected, is not the same thing at all. The americans have special-forces submarines that help them with this. Not exactly rookie stuff.

see, eg >[https://en.wikipedia.org/wiki/USS_Jimmy_Carter_%28SSN-23%29](https://en.wikipedia.org/wiki/USS_Jimmy_Carter_%28SSN-23%29)

<comment><USER5> I'm guessing not all fibre optics run under water and don't need special forces submarines.

<comment><USER8> 'I'm guessing' 'trivial' and 'splicing fiber optics' doesn't realy flow,

logically.

<comment><USER5> If you have the money to buy the commercial splitting/tapping products, and the resources to go find and attack the fibre lines, then I think it's as trivial as it's going to be. Certainly within range of corporate budgets.

</comment></comment></comment></comment></comment><comment><USER9> If Snowden didn't leak data on NSA surveillance none of the "internet giants" would care about encryption now. They'd continue cooperating as usual. What they do now is saving face, appearing like privacy heroes. These actions are likely agreed upon with the relevant agencies and designed to calm down the public.

</comment><comment><USER10> > "Google, for example, is laying its own fiber optic cable under the world's > oceans"

Google becoming an ISP for customers is well known, but where did they get the massive capital required to setup transoceanic fiber? (And why don't they just rent dedicated fibers on existing lines)

<comment><USER11> Cables aren't that expensive to lay down when you have upwards of $40bn in the bank.

<comment><USER12> $60 billion. Google could lay down a semi-global fiber network of their own if they wanted to.

<comment><USER10> I guess this is why Google has been shifting in lots of... well, non-Search product areas, in the last few years.

Advertising in internet is bound to fall due to ad blockers, it's just sensible for them to spread their knowledge and ubiquity... so if Adword profits vanish, they'll still be a profitable ISP/megacorp.

<comment><USER13> Bound to fall? I doubt it.

I wouldn't be surprised if some Google people came to the conclusion that ad- blocking is prevalent in affluent demographics (namely people with non-trivial technical skill) whereas 'the next 1 billion' coming online are predominantly simply not installing ad-blocking software (browser extensions/plug-ins, desktop applications, etc).

It stands to reason that this would certainly drive Google's interest in being on the forefront of 'the next 1 billion' coming online.

<comment><USER10> The "next 1 billion" will have low-powered devices, mostly cellphones - <USER2> able to display any advertising bigger than an Adword. Not to mention that neither Africa nor India has an advertising market remotely comparable to US/EU (especially, the advertising budgets of the companies).

</comment></comment></comment></comment></comment></comment><comment><USER14> All barriers are an improvement because good defense is defense in depth. But in an age of secret courts and secret interpretation of laws, the ones that really matter are the ones that put data out of reach of everyone except the holders of the private keys.

</comment><comment><USER15> Google still has my plaintext.

We already know that the NSA has the power to barge into Google's server stacks and install their little black boxes wherever they please. Ergo, if Google has your plaintext, nothing Google does really matters. When Gmail starts to use public key encryption to encode my emails at my own computer and automagically decrypts them at my friends' computers, I'll start to trust Google. That's never going to happen though, because Google needs my plaintext so they can serve me targeted ads. That is their lifeblood.

If you fear the NSA, you should still fear Google.

<comment><USER16> > _We already know that the NSA has the power to barge into Google 's server > stacks and install their little black boxes wherever they please_

Please do point out how we know that.

> _When Gmail starts to use public key encryption to encode my emails at my > own computer and automagically decrypts them at my friends ' computers, I'll > start to trust Google. That's never going to happen though_

So you didn't read the end of the article or see the news from earlier this week.

<comment><USER17> Pure speculation:

They have agents that work for Google. Either employees' or people who are paid very large sums of money to do the NSA's bidding.

<comment><USER17> Not sure why the downvotes.

Anyway, I don't want to make the NSA to seem like the boogie man, but from the leaked documents, they've shown that they pretty much at-will can access secure data and systems.

I believe Google has a lot of resources, and has very smart people, but the NSA is no slouch either.

Add to that, security/threat prevention is very much a game of Cat and Mouse.

<comment><USER18> I downvoted you, although I now regret doing so because of the sincerity of your argument. (dang: can we maybe get the ability to undo ratings if you get a chance?).

Prefacing a post with "Pure speculation" especially on HN, invites a negative response by default. I would recommend providing a bit more "meat" in support of your argument, or at least provide enough detail so that commenters can assume good faith. These are only my opinions, however.

In response to your argument, I would suggest you investigate some of the specific vulnerabilities, such as in DUAL_EC_DRBG. There is evidence that particular components of certain encryption schemes have been compromised, but at least to my knowledge, use of appropriate libraries with common schemes like AES are still considered secure.

<comment><USER17> Thanks for letting me know about HN. I wanted to make it very clear I was speculating wildly. It doesn't seem that outlandish to think that the NSA could have agents working at top communications companies.

I worked for a small security startup, and our main security engineer would mention that he believed that at MSFT, there were groups that secretly worked with the government to install government backdoors in various software. He had no proof, but it seemed plausible.

</comment></comment></comment></comment></comment></comment><comment><USER19> I think the EFF said it best ""Anyone trying to perform mass surveillance is going to have a much harder job today than even 6 months ago".

Not only are there technical barriers being set-up but now a lot of companies have started to grow a spine and challenge the Govt..

Plus that "smiley" on the leaked NSA slide bragging about hacking all the big companies has VERY seriously ticked off some of the bright folks at these companies :)

</comment><comment><USER20> > and their business has declined steadily in countries like Asia, Brazil and > Europe over the last year.

I hadn't realized that Asia and Europe are countries now. I suppose the EU is at least a step in that direction.

</comment><comment><USER21> Running your own cables won't prevent splicing attacks.

Especially as long stretches of dark fiber tend to need repeaters, which tend to be in easily locatable places....

</comment><comment><USER17> If the NSA is capble of MITM attacks, Google laying their own Fiber seems not like a good solution.

What would prevent the NSA from going into the ocean and tapping direct?

<comment><USER18> Encryption? Or the relative difficulty of needing to use a submarine of some sort, instead of tapping directly into Room 641A, for example?

<comment><USER17> Certainly getting at Room 641A would be easier, but for the US Government, nothing seems out of reach, resource wise.

Forgive my ignorance, but I thought the revelation was that the NSA can routinely break encryption schemes.

Also, I thought it was against US export law to use certain types of encryption for data leaving the US.

</comment></comment></comment><comment><USER22> Unpopular opinion ahead:

I find myself unbothered by these NSA "revelations", and I feel most are just pretending to be. It's all far from unexpected, and other governments have cynically latched onto these leaks to further their interests.

I don't care about for the heightened focus on privacy tech and policy, it's boring.

The NSA did bring it on itself though by allowing this stuff to leak out, which is the only difference between it and other nations' intelligence bodies.

<comment><USER23> The disengenuousness of it is what upsets me. I could find great national pride in this if it was used on terrorists as they claim. Fact is they aren't stopping domestic terrorists like the sandy hook shooter or the batman gunman or the boston marathon bombers. And "real terrorists" aren't Americans or generally even in America. If they tracked everybody and then dismissed the law abiding citizens and released their data as they added them to a white list or something, I could get with that. This approach to fighting terrorism is just fishing in the wrong pond though.

<comment><USER17> Seems like a slippery slope. I'd classify a lot of these domestic mass shootings as lack of mental health support in the US, rather than a lack of willingness on the NSA.

There isn't much that comes out of these mass shootings that indicate a series of coordinated digital events, that typically occur for foreign groups looking to attack US interests. Instead it's the work of a single, mentally disturbed person.

</comment></comment></comment><comment><USER24> Google is worse than the N.S.A. anyway. They do exactly the same only that they give you a shitty UI for your emails in return

<comment><USER20> Do you not understand the difference between the motives and powers of businesses and governments?

Governments tax, imprison, and kill. Businesses serve ads.

So when a government gets your data, they look for reasons to imprison or kill you. When Google gets your data, they try to find more relevant ads for you.

</comment></comment><comment><USER12> Why don't Google, Facebook, Apple, Microsoft, etc. invent their own new forms of encryption, and build a whole solution from software to hardware? At their scale, throwing a billion at a problem like this would be irrelevant.

<comment><USER25> That wouldn't solve much, if anything at all, see Kerckhoffs's Principle[1]. The standard encryption algorithms perform perfectly well to the best of our knowledge, why make your own encryption algorithm and risk getting it wrong?

[1] [http://en.wikipedia.org/wiki/Kerckhoffs's_principle](http://en.wikipedia.org/wiki/Kerckhoffs's_principle)</comment></comment>