Recent submissions

Comment · 10 years ago
Generic code working with reference types can be shared, but passing structs for generic parameters forces JIT compiler to generate separate instances of generic methods or classes for each combination of structs. From there inlining becomes trivial. But yes, being able to pull stuff like this is one of the cooler parts of .NET.
Comment · 10 years ago
That's a little bit too harsh. The solution is a no-brainer if you come from C#/Javaland, but if you don't... well, we get a nice illustration to the saying that "there are no stupid questions".
Comment · 10 years ago
> The answer is not just "var" because you have now completely dismissed local variable immutability (something C# does not have)

It is something that C# does have. It just doesn't allow immutable variables to be implicitly typed, i.e. you can't write something like "const var x = 0;" This lack of let or val in C# is a reminder that "var" was introduced in the language not just to reduce visual clutter, but to support anonymous types, which were in turn introduced to greatly enhance LINQ experience allowing for such nifty feature as "let" clauses in query expressions...

Comment · 10 years ago
> Autocratic states ultimately can't work with democratic ones. Its unfair to expect one group to 'follow the rules' and another to go off willy-nilly when it serves them.

Libya's "no fly" zone, Iraq, Kosovo, nationalistic coup against a democratically elected president.... etc etc etc

I don't even what to say when reading texts like this. It's like democracy is the racism of the 21st century. White infallible democrats versus autocratic niggers.

Comment · 10 years ago
From the description, almost 90% of created tasks in this benchmark are tiny "leaf" tasks, which are quite likely to be optimized away completely. So it looks like the benchmark compares how well these compilers optimize one particular case, and not general performance of goroutines/tasks/whatever...
Comment · 10 years ago
And who killed Paul Khlebnikov in 2004? He was a Putin-apologist and chief editor of Russia Forbes. Unfortunately, a lot of journalists die in Russia every year, and has been for the past quarter of century. Cherry picking some of them proves nothing.
Comment · 10 years ago
"Why act like pointing out an obvious motive is the focus or even a main point of the report?" Because this motive is quoted in articles to link this crime to Putin. I certainly don't care about Lugovoi, Kovtun, their motives, was it even a crime and not an accident, involvement of the British secret services etc. etc. Britain should have known better when it welcomed all the dirty money from Russia...
Comment · 10 years ago
"Fourth, the causes espoused by Mr Litvinenko – such as the FSB’s alleged responsibility for the apartment bombings, the war in Chechnya, and alleged collusion between President Putin and other members of his administration and organised crime – were areas of particular sensitivity to the Putin administration. "

"Finally, there was undoubtedly a personal dimension to the antagonism between Mr Litvinenko on the one hand and President Putin on the other. The history between the two men dated back to their (only) meeting in 1998, at a time when Mr Putin was the newly appointed head of the FSB and Mr Berezovsky and Mr Litvinenko still hoped that he might implement a programme of reform. In the years that followed,Mr Litvinenko made repeated highly personal attacks on President Putin, culminating in the allegation of paedophilia in July 2006"

That is from the report. Call me a Putin-apologist, an agent from Olgino, but these motives look like garbage. There is an entire industry of "making highly personal attacks" on Putin and blaming all kinds of things on him. The name of these "Putin's critics" is legion, they have been doing it for more than a decade, and they've had zero success... that is, of course, if by "success" you mean making Russians believe what they say, and not just selling shocking stories about the darkest secrets of the KayGeeBee to British tabloids...

Comment · 10 years ago
No, it's mentioned in the article that their new IDE is just a frontend for R#.
Comment · 10 years ago
And why would the US do such a thing? Denying poor crimeans who suffer under brutal Russian occupation these small pleasures of life...
Comment · 11 years ago
There is no way to allocate objects of reference types on stack because references can easily outlive objects, leaving you with dangling references. And as I understand ByVal in VB.NET is redundant since it's the default option. It's just a leftover from VB6 where the default was ByRef. Crazy language.
Comment · 11 years ago
Huh, author even uses exceptions as a part of normal workflow, instead of checking if "previousVersions" list is empty before calling Min on it he instead catches InvalidOperationException. I don't want it to look like an ad hominem argument, but... Anyway, C# authors had Java in sight when designing the language and after some contemplation they didn't include checked exceptions in the language. And their main argument is that in the vast majority of cases ignoring the exception and allowing it to propagate further up the stack is exactly what you want to do, simply because there is nothing you can do about it but to log it and tear down the entire object graph or write an error message to the user.
Comment · 11 years ago
Videos of such experiments would be greatly appreciated.
Comment · 11 years ago
It is one of those cases where you can actually leak memory with a GC. But at least Java gives (gave?) you a choice: to create a new string a use the current one, in .NET substring always returns a new string.
Comment · 11 years ago
To author, please use "location.replace" instead of "location.hash". -avid pewpew player.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton