Better HN
topnewbestaskshowjobs
Log inSign up

codeflo

9,664 karma · joined Jun 14, 2010 (16y ago) · 1,504 submissions

Submissions

comment 9y ago · link · parent

It's undeniable that their main developer Q&A site is a really great thing that saved me many hours of work. However, it was somewhat hostile to its more export users from the very beginning: the reputation system favors quickfire replies to grab the first upvotes, and they seem to put a strong emphasis on "cookbook" answers where many of the more nuanced discussions were closed as "opinion based". I think there are some missed opportunities here to make the Q&A site even more useful.

However, perhaps that wasn't their focus. My impression is the Q&A site was supposed to be mostly a gateway to their other services, and for that to work, the Q&A part simply had to be "good enough". It's an interesting strategy that perhaps didn't work out quite the way they had hoped it would.

comment 9y ago · link · parent

I'm not saying 1 in 1,000,000 is great, but I don't see how the birthday paradox applies. Assume that I want to analyse whether face unlock is secure enough for me -- why is the chance that anyone else's phone gets unlocked by someone else's face even relevant?

comment 9y ago · link · parent

Maybe part of it is energy efficiency. For humans, being idle doesn't save all that many calories compared to how much we burn anyway to keep our body temperature constant. That's probably different for ants, and thus, when individual ants are not running around without purpose, the whole colony can get by with less food.

comment 9y ago · link · parent

I don't any cryptocurrencies, but my perception observing the field somewhat casually is that these kinds of discussion sometimes only appear to be about technical details on the surface level. In reality, one or more of people involved can personally lose a huge amount of money if a certain policy is or isn't adopted. For example, it's usually understood that the inventors of any particular cryptocurrency hold a large sum of "pre-mined" money, but somewhat taboo to state it because the appearance of a benevolent dev team that acts in the best interest of the community has to be maintained.

comment 9y ago · link · parent

It's rather like using the ^ symbol for exponentiation: it's a commonly accepted workaround when you're limited to ASCII, but it's not the proper notation.

comment 9y ago · link · parent

What do you mean by "special"? If you mean "can be encoded in US-ASCII", then that's a bit circular, because that character set was obviously designed to encode the English language. In a parallel universe where the ancient Romans had designed a character set, it would be the English language that would require all those weird unicode characters like "J" and "U" (which didn't exist in the Roman alphabet).

comment 9y ago · link · parent

The gas station scenario has a lot of similarities with the iterated prisoner's dilemma game; "defecting" here means lowering the price. The rational strategy is for the owners to cooperate (and retaliate if someone defects). In that case, the effects of price collusion can happen even without any actual collusion.

In reality, human beings rarely implement a strategy that's game theoretically optimal, but algorithms might.

comment 9y ago · link · parent

Back when I was a kid, in the days before Google, you tried to figure out how things worked just by poking around your computer. For example, I noticed that professional programs were always .com/.exe files, but I only knew how to edit simple batch scripts. So of course, the "logical" thing to try was to write a .bat and save it with a different extension and see what happened.

.exe files created this way wouldn't launch, but a .com created this way would instantly reboot the computer. Even more weirdly, this only worked for the specific command that happened to enter in my first attempt -- it might have been something like "cd games". If I changed anything at all, it no longer worked. Only years later I realized that the characters I typed were directly executed as machine code, and that I must have stumbled upon a set of instructions that caused a CPU exception!

For several years, this weird file was the only way I knew to programmatically reboot a computer, so I renamed it "reset.com" and kept it around. I think it stopped working only in the Windows XP era when DOS programs were finally sandboxed to some extent.

comment 9y ago · link · parent

At work, I have a fast machine with 32 GB of RAM, of which Visual Studio can only access about 3 GB. About once a month, Visual Studio crashes with some kind of out-of-memory error, and more often than that, it slows down to a crawl because it has to garbage collect every few seconds in an attempt to keep its memory usage below this magic limit. Even though the machine has 20 GB of free RAM that Visual Studio just can't use.

The author acknowledges that this can happen:

> So, you’re now out of address space. There are two ways you could try to address this.

> a) Think carefully about your data representation and encode it in a more compact fashion

> b) Allow the program to just use more memory

> I’m the performance guy so of course I’m going to recommend that first option.

As a "performance guy", he should know that using a bit more RAM is essentially free, and much, much easier to code than doing the kind of bit-fiddling wizardry he suggests ("encode it in a more compact fashion"). In practice, that kind of low-level code will not get written anyway, at least not by modern Microsoft, and much less so by most extension authors. Which means that there's an arbitrary and very hard limit on how much you can customize/extend Visual Studio before you hit that 3 GB wall. And again, this is on modern workstation machines with gigabytes of unused RAM lying around.

In short, there may be very valid technical reasons why VS can't go 64-bit, but to claim that this doesn't hurt the product is in my opinion not justified.

comment 9y ago · link · parent

I think you're correct. For the same reason, the proposed "more quickly" growing G(n) is bounded by (constant + n)^n, which is not much of an improvement.

comment 9y ago · link · parent

Exactly, that's what I asked about. I didn't know about setl and thus couldn't figure out how to get around the conditional branch. Thanks for the explanation!

comment 9y ago · link · parent

    buffer_num += (elements[i] < pivot);
Is this really branchless though? I'm curious what the generated assembler code looks like.

comment 9y ago · link · parent

That's great for you, but unfortunately doesn't match my experience. Large, old codebases tend to become a mix of all "eras" of C++. That's either because old code was never completely reworked, or because newer programmers pick stuff up in the wrong place, for example from an old blog post.

The problem then is that some of the advantages of modern C++ are a bit "all or nothing". Just to pick an example, for exception safety in the current sense to really work, basically all of your code has to be written in a certain style, which is something that's really hard to achieve.

Maybe that's less of a problem for codebases started after 2011 that have been written in the modern style from the beginning. But given the way the C++ language continues to evolve, my bet is that even those will eventually run into the same problem with whatever new feature is introduced in 2026. There really needs to be a way to deprecate old language features.

comment 10y ago · link · parent

Flipping the mute switch on the side of the phone is difficult?

comment 10y ago · link · parent

A small probability of a high (but known) fee is something that can in principle be insured against, no?

comment 10y ago · link · parent

And in a lot of ways, that would be an improvement to randomly dumping files all over the source tree.

comment 11y ago · link · parent

Thanks for the clarification. So what does it mean to release "a language"? Is there a specification in addition to the test suite? Is the specification frozen from that point on? Or will it change, but only in backwards compatible ways?

comment 11y ago · link · parent

So, like probably many people, I was very hyped about Perl 6 in the early 2000s, followed the mailing lists and so forth, but became disappointed and stopped caring when it became painfully clear that there had been no net progress for a decade.

So please excuse my skepticism, because I'm still fascinated by Perl 6's ideas and potential. But is this another "Rakudo Star" where they just take whatever current mess they have and label it "release", or is Perl 6 really finally ready now?

comment 11y ago · link · parent

But how would they prevent other producers from re-entering the market once the price rises again? Capital requirements are not a huge barrier to entry when you're competing against governments.

comment 11y ago · link · parent

If I understand the argument correctly, this is a problem that some DI frameworks already address. And in others, there's an easy workaround.

Say you have a class CustomerHandler (stupid example, pseudo-C#) with a constructor like this:

     public CustomerHandler(Guid customerId, ILogger logger, ISomeExtraDependency whatever) { ... }
Now, let's say another class needs to create CustomerHandlers for specific customers, but doesn't want to care how they are created. Autofac, the .NET DI framework I'm most familiar with, let's you inject factory delegates:

    public RequestProcessor(Func<Guid, CustomerHandler) customerHandlerFactory) { ... }
(Every type not mentioned in the Func<> is auto-injected.) This is very convenient because you can change the dependencies of CustomerHandler without messing up the rest of the code.

Of course, even in the absence of such an auto-factory feature, you can still create a dedicated CustomerHandlerFactory class and inject that. That's not quite as convenient, but it's still a lot better to have only one extra place that has to know CustomerHandler's dependencies than having them all over your codebase.

comment 11y ago · link · parent

I'm not a biologist, but my understanding is that animals that can interbreed but usually wouldn't are (if at all) divided into subspecies within the same species.

See https://en.wikipedia.org/wiki/Subspecies

"A taxonomist decides whether to recognize a subspecies or not. A common way to decide is that organisms belonging to different subspecies of the same species are capable of interbreeding and producing fertile offspring, but they do not interbreed in nature due to geographic isolation or other factors."

comment 11y ago · link · parent

If those developers target Visual Studio exclusively, they are actually correct: https://msdn.microsoft.com/en-us/library/12a04hfd.aspx

comment 11y ago · link · parent

Also, a fast approximation with a good error bound might be good enough for many applications in biology.

comment 11y ago · link · parent

Language is what it is, and the "specification" was invented long before anyone needed precise algorithmic rules. IMHO, the real WTF is that Unicode decided to reuse the ASCII codepoints for "i" and "I" to encode the Turkish alphabet.

If you think about it, it doesn't make sense to use "LATIN SMALL LETTER I" as the lowercase form of "LATIN CAPITAL LETTER I WITH DOT ABOVE". Four new codepoints for Turkish ı/I and i/İ would have solved so many problems.

comment 11y ago · link · parent

This breaks down as soon as your expressions are slightly more complicated than single-letter variables:

    account.Balance -= order.Amount*order.Item.Price - order.Rebate;
is not readable at all, which is why many coding standards require whitespace around binary operators.

comment 11y ago · link · parent

I don't think that's true: (x y) is (x . (y . nil)) and shouldn't match (1 . (2 . (3 . nil))), because nil would have to match (3 . nil).

comment 11y ago · link · parent

There's a lot of crapware disguising as adblockers that unsophisticated users can fall for...

comment 11y ago · link · parent

Making fun of economists who assume efficient markets is a lot like making fun of physicists who assume frictionless motion. Or computer scientists who assume an infinite Turing tape. Simplifying assumptions can be very useful if you know their limitations.

It seems that in the author's beauty contest game, most people are unable to analyze this game correctly at the top of their head. Maybe some people don't even bother and just pick any random number. But assume that this game is played repeatedly and for real money (like in a stock market). I think people will notice that low numbers consistently win, which will cause a downward trend towards the Nash equilibrium in very few iterations.

1
444546
51