Rare and hardest to crack Enigma code machine sells for $437k - <AUTHOR> https://www.zdnet.com/article/rare-and-hardest-to-crack-enigma-code-machine-sells-for-437000/ <comment><USER2> In the Boston area there is a guy who reliably attends ham radio and antique radio swap meets (Flea at MIT, NEARC)- he always shows off his Enigma machines. This adds tremendously to the atmosphere of these events, and I always appreciate seeing his exhibit.

Damn Covid, these shows are all canceled for now..

<comment><USER3> The MIT flea is awesome and I've met him a few times. Definitely visit if you get the chance.

</comment></comment><comment><USER4> It's HN so most of you probably already know and love Neal Stephenson's writing, but any time Enigma comes up I feel compelled to recommend "Cryptonomicon", one of my all-time favorite novels in any genre.

<comment><USER5> I want to love that book -- it's everything I'm interested in -- but _oh my god_ that book is so verbose. For example, he spends 1.5 pages describing what the clouds in the sky look like and it has nothing to do with the plot. I tried twice to read it but gave up at halfway. It's 918 pages, but I think it could lose at least 300 pages and still keep all the brilliant ideas. If someone created a condensed version of it, I think the book could reach a whole new audience.

<comment><USER6> Yeah, I think a lot of that comes down to whether you enjoy his writing style. I would read what Stephenson writes even if it's devoid of ideas, just for the joy of the style.

For myself, the scene where he describes Randy eating breakfast in Cryptonomican is one of my favourite passages in any book (partly because I identify with the source material :-) ), but others have cited that to me as an example of gross excess.

</comment></comment></comment><comment><USER7> So a Norwegian ex-colleague of mine randomly found a _very_ pristine Enigma machine in the attic of his parents house (presumably left there by a grandparent, who had likely gotten hold of it in the spring/summer of 1945, _somehow_ ), about 13 years ago. I was a bit jealous about that find. Apparently only 250 or so remain, altogether.

Photos here:

[https://web.archive.org/web/20070622082533/http://my.opera.c...](https://web.archive.org/web/20070622082533/http://my.opera.com/TMS/albums/show.dml?id=46514)

(The guy who took/posted the photos is separate from the lucky guy who found it. Please don't bother him.)

<comment><USER8> "Enigma machine at Opera", so this ex-colleague of yours work at Opera the ex- awesome browser making company?

<comment><USER7> Yeah, we both worked there at the time. Back when it was actually awesome :).

<comment><USER9> Back then (2003,2004) Opera showed me what the web could be. The tool outshined everything else on the market. Hell, I remember loving dragonfly and presto and it's what got me interested in web stuff. So thanks!

<comment><USER7> That's great!

</comment></comment></comment></comment></comment><comment><USER10> > he declared that the Allies could not possibly have deciphered his Enigma > messages

One should always assume deciphering.

I would have used one-time pads on top of the Enigma. There weren't that many U-boots, so it should have been workable.

<comment><USER11> Their first mistake was rolling their own crypto. Never roll your own crypto.

<comment><USER12> To be fair, those days there (fortunately) wasn't really a useful cryptographic standard to use.

</comment></comment></comment><comment><USER13> What do you think the present-day cryptological equivalent of the Enigma machine and its decryption is? I'm most interested in examples of consequence (e.g. saving lives by shortening war) rather than comparisons of technical achievement.

<comment><USER14> Things are quite different these days. Code makers seem to have run far in advance of code breakers.

Since there are no major wars running, if someone did break something significant they would save it for later.

<comment><USER15> And yet I feel we are living in the golden age of signals intelligence. The only reason to not say that is because trends point towards an even better golden age. Already the scale of the open source stuff out there has never existed before. And then add speculative stuff like saving encrypted content to decrypt it later decades down the line when methods and hardware have improved. Just a single insider can walk out with an USB stick full of the crown jewels of a place supposed to keep secrets... Pretty sure the US intelligence community didn't have records of basic data of each individual living in europe in WW2 times, but they certainly do now, simply thanks to electronic records systems collecting the data and them just having to harvest the data fruits whether it's by hacking or other means.

<comment><USER16> Mostly, yes. Though for perspective: when engaged in a hot war you tend not to care too much about what your opponent can figure out in a few decades.

Even enigma would have been mostly good enough, if the allies had taken a few weeks to decrypt each message.

In peace time learning old secrets is comparatively more useful.

<comment><USER15> > when engaged in a hot war you tend not to care too much about what your > opponent can figure out in a few decades.

IDK if the allies would have had a list of gay Germans from encrypted data they collected decades prior they could have used that data for extortion. Even if it took decades of progress, they'd have had ample time. The question is, does collecting data now put you into a better position than not having such collections. And the answer is maybe to yes. Even if it's just maybe it's probably worth the investment for the DoD.

<comment><USER17> Did the NSDAP even bother to encrypt their little lists[1]? I'd thought they kept them in the clear, on IBM punched cards.

For an interesting Paperclip-like connection to the founding of the BND, see: [https://en.wikipedia.org/wiki/Operation_Scherhorn#Aftermath](https://en.wikipedia.org/wiki/Operation_Scherhorn#Aftermath)

[1] [https://www.youtube.com/watch?v=CWo_3CIcTBQ](https://www.youtube.com/watch?v=CWo_3CIcTBQ)

</comment></comment></comment></comment></comment></comment><comment><USER18> Four rotors. Now that would tire out your fingers.

The limitation on the number of rotors is key pressure. A 3-rotor Enigma has a huge key travel and you have to push hard. (I've had the opportunity.) The friction between the contacts is high. That's why these machines were not built with enough rotors to be really secure.

The next step up was the Lorenz 10-rotor machine, but that had to be motorized. But the crypto design of that was botched, and it's easy to crack. A real 10-rotor alphabetical Enigma-like machine without a "reflector" would have been secure against any attacks of the period.

<comment><USER19> > But the crypto design of that was botched, and it's easy to crack.

This seems like it depends upon a perspective unavailable at the time.

Until June 1943 (by which point Germany has in fact lost the war though it will fight on for a long while, the Eastern Front campaign is going terribly and the United States is increasingly diverting resources to a "Europe First" strategy which Germany can't conceivably overpower) the only breaks of Lorenz at Bletchley were based on what they called depth. Multiple ciphertexts using the same key, a fatal flaw for a cryptosystem even today.

For example a German radio operator begins encoding and transmitting an important message, and then is interrupted by some matter, after a few minutes they begin again but use the same key because it hasn't been impressed upon them that they absolutely must use a fresh key each time. If they make even a trivial typographical error the two ciphertexts will be different and that's enough to recover the messages.

Only in July 1943 do Bletchley begin actually decrypting any messages for which there is no depth. They do this because they have a (very primitive) electronic codebreaking machine, something that has never before existed. This machine is unsatisfactory in many ways but it's ludicrously faster than manual codebreaking.

So it seems unfair to critique Lorenz based on the fact that a suitably powerful electronic machine can break it. No such machines had ever existed before. Plus it took several years to even conceive of how to do the attack before the machine could be built, because of course programmable computers didn't exist yet.

<comment><USER20> > Multiple ciphertexts using the same key, a fatal flaw for a cryptosystem > even today.

To avoid confusing readers, one should mention that modern ciphers separate the key, which can be reused but must be kept secret, from the initialization vector (IV), which must not be reused but can be transmitted in the clear.

These correspond roughly to the Enigma's daily settings and per-message rotor start positions, but AIUI the procedure for selecting and transmitting the latter changed over the course of the war, and at times insecure even if done according to the procedure.

<comment><USER21> It was actually far worse for the Lorenz (Tunny) traffic. The wheel patterns - the equivalent of the key in, say, AES - were changed quite infrequently early on. The five χ-wheels (in Bletchley parlance) were only changed monthly, while the five ψ-wheels were changed quarterly. While the two μ-wheel patterns were changed daily, there was little consideration given to what those patterns actually were. The χ-wheels generated the first of two sets of bit patterns to be XORed with the plain text; the ψ-wheels generated the second set. That would have been fine, except that the two μ-wheels together determined whether or not the ψ-wheels advanced - μ1 advanced on every keystroke along with the χ-wheels, μ2 would advance only if μ1 was a 1, and the ψ-wheels advanced only if μ2 was a 1 - and bad patterns on the ψ-wheels would mean that the ψ-wheels would be essentially frozen for extended runs of the message. What was meant to introduce a sort of dither to make it harder to determine how the key was being generated became the Achilles heel that highlighted the mechanism. (Not to take anything away from Bill Tutte and the rest of the crew at all. There was still a lot of cleverness and tedious attention to detail involved.) With a month of life on the χ patterns and three months on ψ, depths and near- depths on the message settings (the nonce or IV) were absolute killers. Later on, all of the wheel patterns were changed daily, and the μ-wheel patterns were verified for short stall lengths, but by then the machine's mechanism was well understood, pattern-derivation methods had been devised, and Colossus had largely eliminated the χ component from the puzzle.

<comment><USER21> The phrase "and bad patterns on the ψ-wheels" should have read "and bad patterns on the μ-wheels". Sorry if there was any confusion; I caught that too late for editing.

</comment></comment></comment></comment></comment><comment><USER22> How do these come into private possession?

<comment><USER23> Actually in general, what _should_ happen to the property of a government that gets dismantled?

On the one hand, this stuff probably gets into private hands by theft at some point, and it hardly seems just to legitimize opportunistic plundering.

On the other hand ... the state which owned it went out of existence. It's not as though there was a German government whose property rights were being infringed.

Perhaps the Allies could have fastidiously gathered all the assets of the German military and held a big liquidation sale at Alexanderplatz, and used the proceeds to buy food for the refugee camps.

<comment><USER16> > On the other hand ... the state which owned it went out of existence.

The current German government sees itself as the successor to the previous German governments.

See [https://en.wikipedia.org/wiki/Legal_status_of_Germany](https://en.wikipedia.org/wiki/Legal_status_of_Germany) for more detail than you ever wanted to know.

<comment><USER24> Exactly. It was Germany--the same one that exists today--that marched into its neighbors, conquering them and enslaving segments of their population. In the U.S., it's common to hear people say "The Nazis invaded Poland" or "The Nazis bombed London" but if you go to Poland, they'll say "The Germans invaded us" and if you go to London they'll say "The Germans bombed us."

I don't know why it's common to pretend otherwise.

<comment><USER25> When speaking about the state, I (UK) fairly often hear people refer to "Nazi Germany", instead of just Germany (and sometimes used as "Nazi Germany invaded Poland"). With the people though, it's generally just "the Germans".

</comment></comment></comment></comment></comment><comment><USER26> On that note, I just finished a very interesting biography of Elizebeth Smith Friedman who is a total unsung hero and the founding mother of the science of cryptography. Her team with the Coast Guard cracked enigmas in parallel to Turing. The Woman Who Smashed Codes, by Jason Fagone.

</comment><comment><USER27> Was hoping someone at least bid a prime number. Sadly, $437 is also divisible by 19 and 23

<comment><USER28> The actual number was £347,250, which is £17 over the nearest prime number. In USD, the actual number was $437,955 (headline rounds down for some reason), $2 over the nearest prime. They were probably limited to 250$ differences, though, and 347 is prime, so that's something.

<comment><USER16> Primes are pretty dense. So any random amount will be close to a prime number.

</comment></comment></comment><comment><USER29> I believe Romania still has some of those left from switching sides in WW2.</comment>


Finnish-born journalist: Americans make crucial mistake in how they look at life - <AUTHOR> http://www.businessinsider.com/anu-partanen-americans-make-a-crucial-mistake-in-how-they-view-aging-2017-11 <comment><USER2> "Foreigners tend to view Nordic countries as "these socialist nanny states where everybody has a collectivist mindset," Partanen said. But "in fact a lot of these services really support everybody's independence.""

I pay a ton of taxes in the U.S. I don't get how Finland warrants an accusation of a collectivist mindset, while America takes and redistributes just as much money. Is it because spending on defense, instead of social services, doesn't qualify as a collectivist mindset?

<comment><USER3> In Norway, you pay an annual tax on basically everything you own (update: yes, everything you _own_ , not everything you _earn that year_ ) past the first ~$180k. I don't really care what sort of "independence" this supports for somebody, I'm not going to live somewhere that makes you rent everything from the state, after paying exorbitant taxes to "buy" it.

update: corrected the cutoff figure with new exchange rates and policy updates, seems that two parties in NO are looking to eliminate the wealth tax.

added: keep in mind purchasing power differences in Norway, where basically everything is more expensive relative to the U.S. exchange value of the kroner. 1,480,000 NOK (source of the $180k figure) will buy you about 40 sqft of suburban apartment in Norway, on average.

<comment><USER4> Taxes are not rent. Taxes are the share of expenses you pay for the services and security the state provides. In European countries, especially in the Scandinavian ones it's commonly understood and agreed upon that the stronger ones carry more of that burden. That may sound like communism to people from a country with a stronger "each for his own good" mindset, but pretty much all statistics point in the direction that it makes for fewer extremely rich people but to an overall happier society. Not having to worry about health care is one of contributing factors. And when looking at the fact that a medical incident in the family nearly bankrupted the last Vice President of the US, you really have to be one of the few insanely rich to be certain that such an incident won't hit you.

<comment><USER3> A wealth tax is exactly equivalent to a rent. There is a genuine owner (the state) which has control of the property in a default, there is an unlimited recurring fee set by the owner (the state), and access to the property is predicated on paying that fee.

<comment><USER5> Of course not. You still own whatever you own, and can still sell it, destroy it, modify it, whatever.

You do pay tax on owning it, in a system that taxes wealth, but that does not mean someone else owns it.

Calling it rent and calling the state the true owner doesn't really make sense --you're conflating two separate ideas, I think, to play on people's emotions ("oh noes, the state owns everything!"). It's not true or accurate, though.

<comment><USER3> > _You still own whatever you own_

Not if you don't pay the rent.

> _and can still sell it, destroy it, modify it, whatever_

And when you sell it, you're basically selling a rental agreement.

> _Calling it rent and calling the state the true owner doesn 't really make > sense--you're conflating two separate ideas, I think, to play on people's > emotions ("oh noes, the state owns everything!"). It's not true or accurate, > though._

Call it whatever you want, I want to actually own my property, instead of having to pay for it on an ongoing basis on threat of deprivation. At the end of the day, the state _is_ the owner, because they are the only ones who don't have to pay to keep it. We can chase our tails all day and nitpick about definitions, but in the purest sense, the government owns almost everything in Norway, if people stop paying the rent/tax/fee.

<comment><USER4> If your definition of ownership is that the state can take things from you because it has the monopoly on power there's a very sad message I have for you: It's basically everywhere like that. Try not paying the taxes due on land and housing property in the US and see what happens.

<comment><USER3> That may be the case for most or all land in the U.S., but it at least doesn't apply to musical instruments, couches, computers, and cars (except in some jurisdictions).

If the best I can do is pay the wealth tax _only_ on real property, then that's what I would prefer.

<comment><USER4> The IRS will happily impound your valueable instruments if you fail to pay taxes. Looks like the government still owns everything you call your own.

<comment><USER3> Sure, but owning a cello doesn't increase my real property taxes.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER6> Two examples of the holistic view:

\- Finland is adopting a more holistic education system than compartmentalised subjects [http://www.bbc.com/news/world- europe-39889523](http://www.bbc.com/news/world-europe-39889523)

\- (Not Finland but really cool) retirement home with a co-located pre-school benefits both the elderly and the young kids [https://www.theatlantic.com/education/archive/2016/01/the- pr...](https://www.theatlantic.com/education/archive/2016/01/the-preschool- inside-a-nursing-home/424827/) :

> Another resident with advanced Alzheimer's whose speech was incomprehensible > garble was able to speak in complete, fluid, and appropriate sentences the > moment she was wheeled into the baby room. "You could immediately see that > she had accessed some part of her brain that had raised several kids," > Hoover says.

</comment><comment><USER7> That guy was born in Finland and it shows. He should know only people from the USA can criticize the anything American, due to the notion that America is "special", which is being spoon-fed since childhood to all citizens through movies, TV, politics, radio, etc.

</comment><comment><USER8> > "The choices Nordic countries have made have little to do with altruism or > kinship," Partanen wrote for The Atlantic in 2016. "This is what Americans > fail to understand: My taxes in Finland were used to pay for top-notch > services for me."

This is an odd statement to me. Any wealth redistribution system has both "givers" and "receivers". What do the "givers" in Nordic countries actually think? Do the the "givers" share this perspective that the system isn't altruistic? Or do they not consider this money theirs? Are they conditioned by a young age to see themselves as "receivers"? Or do they not think about which they are, and prefer the ambiguity? Or are they silenced? I'm very curious to hear a "giver's" perspective, because this sounds a bit brain-washy to me.

<comment><USER9> The point was that a lot of the redistribution is in principle just moving money from the the working age self to the young and older self.

I pay taxes which funds students today but I get that back later when other fund my kids to go to university.

The point is that the bulk of the money is paid by the middle class for services used by the middle class. You pay more in some stages of your life than you receive but you get more back in other stages.

That was the finnish point of looking at this hollistically.

<comment><USER8> That makes a lot of sense now, thanks. I think the point about people being givers and receivers at different periods in life is a good one. Americans who are fortunate do this at the family level, but obviously many cannot.

</comment></comment></comment><comment><USER10> Hmmmm. But yet she moved to America.

I wonder why?

</comment><comment><USER11> Also americans love anti-adblockers.

</comment><comment><USER12> Yeah yeah yeah I have heard it all. When nordic corporations stop spreading corruption outside of their countries they can talk shit about other countries. Besides not everyone would want social democracy. Believe me not everyone in Europe is happy about that either. Just because it can work in Finland it does not mean it can work anywhere else.

<comment><USER9> Except it is always people who have never even tried it who claims it wont work elsewhere. Why not try proven ideas than some wacky idea you feel good about but which has never proven itself anywhere?

The nordic model is not based on companies being angeles who do good by their own accord. You need government, press, unions etc holding them accountable.

You can't have frer for all capitalism and wait for private enterprise to start being nice and take social responsibility.</comment></comment>


Academic Culture Wars - <AUTHOR> http://chronicle.com/temp/reprint.php?id=q4n6v4sdvxr3xpyjcmsqcx3dfz3cjcg8 <comment><USER2> I'll be the first to admit that we're seeing way too much political rhetoric on Hacker News lately but I'd like to defend this article. The point of this article isn't that one side is right and the other is wrong it's that people who are thoroughly entrenched in their positions refuse to listen to each other.

When we at Hacker News or out in the blogosphere discuss issues we tend to believe that logic will win out but that isn't always the case. Knowing that is important and seeing it in a field that's supposed to revere logic (academia) makes that point very powerfully.

So let me give just one example of how this could be considered technology related. Much of the tech surrounding "web 2.0" companies relies on the wisdom of the crowd and the idea that the crowd will be impartial and judge things on their merits. The question about motivations, biases, etc... is never brought up even though it's a huge flaw in that system and something that should be discussed.

This article's powerful statement on that subject might serve to open some eyes on that.

<comment><USER2> Real quick follow up point. How many times have you seen two educated, well thought out comments on a Hacker News item but one has 27 points and the other has 3 because the 27-point item is the one everyone agreed with?

I vote items up when I think they're smart whether I agree with them or not and I think others should do the same. That's the point this article makes and that's why I think it should be on Hacker News.

<comment><USER3> I like the "vote up smart comments regardless of agreement" approach. My Kantian nature then expects to see interesting comments at the top.

I also like the "vote to agree or disagree with the 'poll' (aka comment)". This prevents dozens of "I agree/I disagree" responses.

The second approach is my first instinct. They're voting triangles, right? Like a poll?

The first approach yields less answer-based statistics but more interesting reading material.

One button fits all v too many buttons problem.

</comment></comment></comment><comment><USER4> Maybe there's _some_ HN value here - I've been thinking for some time the next great establishment to lose most of its influence due to the Web will be academia.

Universities seem like record companies ca. 1996, or media companies ca 2000 - too confident and self absorbed to realize reality is routing around them right now, making most of them obsolete with a few years.

<comment><USER5> I don't the university's role as "the place to meet smart people" diminishing anytime soon. Where else is there? IRC?

</comment></comment><comment><USER6> Not quite sure what this is doing on Hacker News.

<comment><USER7> I was fairly interested in the article. It was a little short on context but, from what I gathered, Horowitz et al. posit that college professors lean dramatically left and pressure their students to do so as well.

Based on my experience, this seems to hold pretty true, with a few notable exceptions (miron and pinker jump to mind) in most 'softer' departments (english/theology/psych/etc). In an english course I took last semester (ostensibly about democracy/law), papers I wrote that were critical of traditional liberal/socialist thought were critiqued more harshly than papers were more in line with the orthodoxy. Nothing flagrant enough to be improper (and I actually enjoyed the class), but the bias was definitely there.

Even in some of the harder sciences (chomsky and krugman, as two obvious examples) this seems to hold true.

Of course, professors should hold whatever political view they like, but I think the real question is if they are using their power to improperly/abusively coerce their students.

Personally, I haven't seen anything that rises to that level in college (but there was a horrible and grossly inappropriate bias at my high school), but I think that it is definitely worth investigating.

I don't want my professors preaching their politics any more than I want them preaching their religion.

<comment><USER8> I agree with your point. Far too many teachers in the humanities use their position to push their political views on their students.

For the record, neither Chomsky nor Krugman are in the harder sciences. Chomsky is a linguist and Krugman is an economist.

<comment><USER7> I guess it's a matter of definitions. The kind of linguistics Chomsky worked on were rather mathematical, for example, see the Chomsky Hierarchy (<http://en.wikipedia.org/wiki/Chomsky_hierarchy>) which is used extensively in Computer Science.

And Krugman's actual papers are basically pure math. I'm having trouble finding many of his papers that aren't behind a pay wall, but see <http://www.princeton.edu/~pkrugman/scale_econ.pdf> or <http://www.princeton.edu/~pkrugman/geography.pdf>. And if memory serves, didn't he also write a paper on the effects of special relativity on the time value of capital? (I can't seem to find a copy ...). I know econ is only a 'dismal science,' but don't be too hard on it ;-)

<comment><USER9> "The theory of interstellar trade": <http://www.princeton.edu/~pkrugman/interstellar.pdf>

"This paper, then, is a serious analysis of a ridiculous subject, which is of course the opposite of what is usual in economics." Although he calls it "serious", it's full of little jokes, some of them very good.

<comment><USER10> <http://news.ycombinator.com/item?id=331284></comment></comment></comment></comment></comment></comment>


Ask HN: why don't startups/high growth companies raise debt rather than equity? - <AUTHOR>

For the earliest stage companies, it's pretty obvious why they don't: they can't. But it seems like a lot of companies with great traction (~$1 MM in revenue), recurring revenue (subscription to content, products or software) and need are out there raising VC money in what amounts to equity (I'm counting convertible debt here, too).  Why don't they try to use forward receivables to raise debt either between or in place of an equity round, which even at a high interest rate, is cheaper than equity? <comment><USER2> because no investor wants to take an equity like risk for a limited upside return which debt is. If the company is still early, but doing well, you want the full upside.

<comment><USER3> There are definitely investors that like venture debt risk/reward like the following firms:

[http://www.goldhillcapital.com/](http://www.goldhillcapital.com/) [http://www.westerntech.com/](http://www.westerntech.com/) [http://www.orix.com/](http://www.orix.com/)

There are also some commercial banks with venture debt arms like SVB, Comerica, and Square 1

<comment><AUTHOR> Both answers are correct, and make sense. I guess my question is fundamentally: is this a problem of supply (i.e. - not a lot of appetite to fund debt at these levels) or one of demand (entrepreneurs just prefer equity).

<comment><USER4> supply. Banks theoretically would provide debt to a company with 1mm in revenue, as long as they show the ability to cover the debt payments. But those companies typically can raise more money based on equity than debt.

<comment><AUTHOR> So the concern is that a debt financing would be smaller than a potential equity financing by some order of magnitude, as it's constrained by trailing cash flow rather than future opportunities?</comment></comment></comment></comment></comment>


What Does Perlin Noise Sound Like? - <AUTHOR> http://gpfault.net/posts/perlin-sound.txt.html <comment><USER2> Running it through a FFT, the noise looks similar to blue noise, but with a lowpass at 1000 Hz

</comment><comment><USER3> Unfortunately, the audio clips do not play in Safari mobile.

<comment><USER4> Why does Safari struggle to open files in common and free formats?

<comment><USER5> AFAIK iOS (and tvOS) devices only support playing formats+codecs with native hardware decoder support; they don't have any pure-CPU decoding implementations.

This, from what I recall, was an intentional choice to disincentivize developers from making the "easy choice" to ship assets in the same format+codec for all devices, where such a format would burn the iOS device's battery doing CPU decoding. Instead, most developers will choose to separately encode their assets for iOS, so that they can use the iOS media frameworks—which coincidentally means that they'll be using the efficient hardware encoding and not burning much battery at all.

However, you _can_ ship custom CPU decoding in your app if you want (e.g. VLC.ipa).

Websites, obviously, aren't ( _usually_ ) built for single architectures, though, so it's a bit of a pain for them. Larger web video providers (most porn sites, for example) keep iOS-specific encodings on their CDN and try to detect the browser's user agent to decide which version to deliver. Other providers just give up on the concept and build specific iOS-specific apps in order to ensure the correct media is delivered (this being why there are more "video-sharing site" apps for iOS than for Android.)

<comment><USER6> When iOS was first released everybody and his dog was still running their own proprietary movie (container) format. Microsoft was pushing .wmv, websites used Flash, illegal sources were using .avi files.

Apple forced these sites to provide their streams in a standardized format, MP4.

It might not be the standard you want because it isn't patent free but at least it is a standard, it's not controlled by Apple and it works on just about any device and works pretty well.

</comment></comment></comment></comment><comment><USER7> This sound kind of reminds me of one of these "Space Engine Sounds" on youtube, especially the Firefly/Serenity themed track.

I used to love it for sleeping, it's rather relaxing.

<comment><USER8> To me the first sample sounded like some subway passing by but when you're still far away yet.

That said, after about 15 to 30s of attentive, continuous listening, it started making me increasingly uneasy, as I perceived the sound as being extremely oppressive and ominous, in a very chthonian way. I'm not going to try to listen to that any longer because I'm half sure that could almost turn into a panic attack of sorts or something. Really unsettling.

The second, fractal one didn't produce that effect unless I turned the volume _way_ up, and even then, not as much.

<comment><USER9> The concept of getting a panic attack in response to listening to some audio is completely foreign to me. Is it normal to have that reaction? It sure seems like it wouldn't be.

<comment><USER10> IIRC there's some evidence that very low-frequency sounds may cause feelings of anxiety and fear in human subjects. Very low frequency sounds may occur prior to catastrophic events like earthquakes, and some animals have been known to react to it. It's plausible that humans have evolved a similar protection mechanism which has gradually atrophied. That being said, I'm talking about sub-20 Hz frequencies here. I don't think these recordings contain that and I don't think it would be possible to reproduce on regular headphones anyway...

<comment><USER8> Missing funtamentals are a thing though.

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

</comment></comment></comment></comment></comment><comment><USER11> My initial reaction was like "Oh, like white noise!"

I could not have been more wrong. There is very clear structure in Perlin Noise. Great write-up and I learned something.

<comment><USER12> The article doesn't adjust for the inherent lowpass/highpass/aliasing behavior of function parameter rate vs sample rate, which is responsible for most of the audible difference, especially the similarities to real life low-passed- noise situations (airplane cabin, high building) noted by the author. Still, I agree, you can hear some residual tones!

Spectra of the 3 noise samples: [http://imgur.com/a/gaiVm](http://imgur.com/a/gaiVm)

I haven't read up on perlin noise recently enough to know whether that's inherent to its structure or whether there's a more mundane explanation like distortion or encoding tomfoolery.

<comment><USER10> Thanks for the spectrograms! I'm not exactly sure which aliasing you're referring to... I'm trying to adjust the sampling rate of the noise function so that it maps to "real" seconds in a way that makes sense. By looking at the waveform in the audio editor, it looks exactly like a visual representation of 1D perlin noise to me ([http://imgur.com/a/bM4tn](http://imgur.com/a/bM4tn)). Looking at your spectrograms though, I'm seeing something in the higher- frequencies (and I think I can hear those as well), but I actually have no explanation for where those could have come from.

<comment><USER12> That's a completely reasonable thing to do, especially because it might allow you to pick up distortion due to interpolation.

However, you should do the same thing to the white noise [1] if you are going to compare them. If we write the white noise's continuous reconstruction [2] as a function of time, w(t), we could stretch out w(t) until it wiggles at about the same rate as the perlin noise, p(t), and then sample them together at a rate several times higher than that at which they wiggle. Both waveforms would then have the same "muffled roar" sound you get in airplanes, buildings, underwater, etc.

Another mundane explanation for the bands is that they might be "JPEG artifacts" for ogg's compression. Amplitude is logarithmic, so they're probably not as important as they look.

[1] To be pedantic we should call it band-limited white noise, because the sampling+reconstruction process limits the bandwidth, and infinite bandwidth white noise can't actually exist, because it has finite energy per bandwidth * infinite bandwidth = infinite energy. This isn't a theoretical problem. Oscilloscopes have fatter "no-signal" traces in proportion to their bandwidth, the resolution bandwidth ("RBW") of spectrum analyzers lifts the noise floor at higher settings, the field of thermodynamics fell apart in the "ultraviolet catastrophe" before we understood how quantum mechanics effectively limits the bandwidth of thermal radiation, etc.

[2] w(float t) rather than w(int n), obtained by interpolation. Sinx/x interpolation is the interpolation that gives 0 distortion and produces no higher spectral content. It's the time domain equivalent of doing a Fourier Transform, scaling the spectrum, and doing an Inverse Fourier Transform. IIRC Perlin noise is a spline, not sinx/x, so I'd expect its interpolation to produce higher harmonics. By applying perlin-like (spline?) interpolation and sinx/x interpolation to the white noise, you could isolate the audio effects due to the randomization vs the interpolation of the perlin noise. If you were so inclined :)

</comment></comment></comment></comment><comment><USER13> I've heard this before! In some Nine Inch Nails tracks. I always thought it was white noise + bandpass + clipping or distortion.

<comment><USER14> > I always thought it was white noise + bandpass

That would be equivalent to this approach, right?

</comment></comment><comment><USER15> Didn't really understand how he got to it, but would be interesting to hear this noise source across the larger spectrum (not just the low freqs)

It might sound/be more natural/fractal than pure white noise (+LPF), I can't tell. But it won't work to drown out office chatter because its the high freqs there that matter.

</comment><comment><USER16> It might be interesting to use Perlin noise to craft a melody by mapping the reals onto a musical scale.

In particular, it seems like it would have some nice properties for melodies since it will keep the melody in a comfortable range and won't throw in a bunch of large leaps.

</comment><comment><USER17> To me it sounds like the ships background noise in Star Trek.

</comment><comment><USER18> Does this use Perlin noise to generate the PCM values?

If so, what would it look like to use Perlin noise as the input to an inverse FFT function?

</comment><comment><USER19> LOL. I just finished putting up a pergola with a clear polycarbonate roof. The recommendation is to apply a foam adhesive tape to the purlins (battens) to prevent noise caused by movement of the sheets from thermal expansion. I[https://www.bunnings.com.au/suntuf- access-25mm-x-20m-purlin-...](https://www.bunnings.com.au/suntuf- access-25mm-x-20m-purlin-tape_p1010469) \- I thought it was a strange topic for HN ;-)</comment>


Buy 1,427 items for $5 Regularly –$7,890 - <AUTHOR> https://itch.io/b/520/bundle-for-racial-justice-and-equality <comment><USER2> The HN title is not helpful. I recommend instead:

"Itch.io Bundle for Racial Justice and Equality -- Buy 1,427 items for $5 (regularly ~$7,890)"

<comment><AUTHOR> Agreed, but I think this is too long for HN.

</comment></comment><comment><USER3> There's an 'official' highlights list[1] and a community built spreadsheet[2] with details including type, platforms, genres and more.

[1] [https://itch.io/c/891735/bundle-for-racial-justice-and- equal...](https://itch.io/c/891735/bundle-for-racial-justice-and-equality- selections)

[2] [https://docs.google.com/spreadsheets/d/1cbOqO6rq0YYWPKmci8Pg...](https://docs.google.com/spreadsheets/d/1cbOqO6rq0YYWPKmci8Pgv4YGWcl4NQUX9EAj221Ze30/edit#gid=782418878)

</comment><comment><USER4> I bought this bundle on the weekend when it was "only" ~750 items. There is more digital content included than a normal person could consume in a lifetime. A couple of game recommendations: Super Hexagon, Minit, Night in the Woods, A Short Hike, Oxenfree, Dr Langeskov...., Quadrilateral Cowboy.

<comment><USER5> This bundle is wonderful, but I'm finding that the majority of these games won't play on OS X Catalina due to lack of 32-bit support.

<comment><USER5> e.g., Non working: A short Hike, Quadrilateral Cowboy, nuclear throne, mu cartographer

</comment></comment></comment><comment><USER6> Can anyone recommend some Linux games from the bundle? I started Oxenfree earlier today and it's been really cool so far. I've also played A Short Hike and Celeste previously and they're really great.

</comment><comment><USER7> It's really confusing what this is: "Buy 1,427 items for $5 Regularly –$7,890 (itch.io)"

I thought this was going to be about someone's bot that randomly buys $5 items from Amazon, or similar.

It's not clear that this is a $5 bundle of games. Even when I visited the site it took me a long time to realize that it was a bundle of games.

<comment><USER8> I thought it was going to be an article pointing out all the questionable bundles of electronic media I see shilled on various content sites (Ex. "Start your career in coding with this 10 book coding bundle, normally $300, but for only $25 for a limited time!")

</comment></comment><comment><USER9> Huge amount of stuff in here and the low entry price makes it a very good decision. I wish there was a way to filter by platform in the big bundle list though.

<comment><USER10> [https://docs.google.com/spreadsheets/d/1cbOqO6rq0YYWPKmci8Pg...](https://docs.google.com/spreadsheets/d/1cbOqO6rq0YYWPKmci8Pgv4YGWcl4NQUX9EAj221Ze30/edit#gid=782418878)

</comment></comment><comment><USER11> Tons of great games here. Super Hexagon alone is worth $5.

</comment><comment><USER12> I was hoping this was a shipping container.

</comment><comment><USER13> I don't understand why this was flagged. It's for a good cause and a great deal, which might interest a lot of the HN crowd.

<comment><USER14> Looks like it got rescued, and I'm glad.

</comment></comment><comment><USER15> So itch.io is using the current racial protests in the USA for a marketing stunt.

Well done, now I know what itch.io is...</comment>


Ask HN: How do you build the perfect SDK? - <AUTHOR>

Hello HN, we are building 2 sdks (iOS & Android) to create an easy way for developers to connect their apps to our PaaS. (www.xensify.com) We already have the first release up and running but we are working to create something that is truly remarkable in terms of B2D or devops experience.
Are there any must-read guides we should follow? Any tip, hint, suggestion, dos and donts some experienced Sdk/library developer could share with us?
A note: the sdk is wrapping a RESTful set of Apis
Thanks! Cheers <comment><USER2> I always focus on simplicity for the people who have to do the integrations -

1) make it super easy to integrate your SDK into any project

2) documentation solves common requirements and problems

3) samples provide a starting point for getting additional value

To help this I try and minimizing steps required for integration, my preferred method of integration is "copy this folder to your project" which is something developers of all backgrounds can achieve easily, and then I write documentation and code examples that emphasize how you can get started immediately, and samples for more specific examples.

You can see my approach in action at [http://playtomic.org](http://playtomic.org) (lots of examples) and [http://playtomic.org/api/as3.html](http://playtomic.org/api/as3.html) (lots of docs with code samples).

<comment><AUTHOR> thank you for the advice, it's very appreciated</comment></comment>


Time Warner Cable comes back from nationwide Internet outage - <AUTHOR> http://money.cnn.com/2014/08/27/media/time-warner-cable-outage/index.html

<comment><USER2> rumor has it it's BGP issues</comment>


Show HN: H-app-proxy – Application server inside haproxy - <AUTHOR> https://bl.duesterhus.eu/20180511/ <comment><AUTHOR> GitHub repository: [https://github.com/TimWolla/h-app- roxy](https://github.com/TimWolla/h-app-roxy)

Live demo: [https://bl.duesterhus.eu/20180511/demo/DWhxJf2Gpt](https://bl.duesterhus.eu/20180511/demo/DWhxJf2Gpt)

Note that links expire after 60 seconds in the live demo. As stated at the bottom of the post: I don't want to be liable for links pointing to nefarious content.</comment>


Ask HN: Why is the spelling poor on HN? - <AUTHOR>

I'm over 50 and wondering: is spelling less a part of education these days?
On any post with a lot of comments, I see obvious misspellings, not just loose for lose, but things spellcheckers catch easily, such as descretely for discretely, etc.
This surprises me because commenters here likely have higher IQs than most other public internet forums. <comment><USER2> For many people here (like me) English is second language. I try to improve my english by writing comments. I think it may be the reason why you see so many misspellings.

<comment><AUTHOR> Thanks, vojant. Makes sense.

</comment></comment><comment><USER3> > This surprises me because commenters here likely have higher IQs than most > other public internet forums.

That should only surprise you if you assume higher IQs correlate to better spelling. Have you seen studies that indicate a correlation exists?

<comment><USER4> locally we can expect a positive correlation exists. don't see too many dull kids winning selling bees

<comment><USER3> > don't see too many dull kids winning selling bees

Assuming for the moment all people who win spelling bees have high IQs that doesn't mean all people with high IQs spell well. That's just inappropriate generalization[1] on your part.

I think you're also failing to consider people leaving comments on forums are often more concerned with the content getting their point across than making errors (e.g. you wrote _selling bees_ instead of _spelling bees_ ).

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


Stronger Than Steel: Synthetic Spider Silk [video] - <AUTHOR> https://www.bloomberg.com/news/videos/2019-08-22/stronger-than-steel-synthetic-spider-silk-is-real-video <comment><USER2> There are two main objectives when designing conventional structures: strength and serviceability. We want to make sure structures have sufficient strength under very rare and severe loading to prevent collapse. But we also want to make sure they don't move too much under normal loading. It sounds like using silk would be a challenge to satisfy both objectives in many applications. In order to actually mobilize the tensile strength, it would require huge strains that would be incompatible with conventional materials. Or everything would need to be pretensioned up to some high stress. Likewise, for serviceability it would require either lots of strand under low stress or pretensioned strand.

That's not to say these are insurmountable problems, just something Ive never thought about before.

<comment><USER3> The "obvious" solution to using spider silk is to create a weave of it, like a textile, and then use the spider-silk in the form of a composite.

Imagine spider silk replacing fiberglass threads for example, or carbon-fiber threads. Its not fiberglass or carbon-fibler per-se that makes the material strong, its the composite. The mixture of plastic (which provides compressive strength) with fiber (which provides tensile strength).

There are a ton of composite fibers in the marketplace. I'm not a materials engineer, so I don't know exactly what people are looking for in their fibers (aside from high tensile strength). Probably low-weight, high strength... and probably low-compressive strength (or at least, people ignore the figure).

"Elasticity" in spider-silk sounds interesting, but I'm not sure if thats good or bad for a composite.

\</comment></comment><comment>-----

The composite for structures is going to be Reinforced concrete: Steel Rebar provides tensile strength, while Concrete provides compressive strength.

Where spider-silk (or fiberglass / carbon fiber composites) shine, are low- weight applications. Bicycles, bullet-proof armor, and flywheels. The question is if spider-silk is actually any better than carbon fiber (or Kevlar)

That's the thing: we have a LOT of manufactured fibers. Maybe spider-silk has a niche that can be used. But its competing against Carbon Fiber, Fiberglass, and Kevlar.

\</comment><comment>-----

It seems like Spider-silk has less tensile strength than Carbon Fiber / Kevlar. However, due to its flexibility, spider-silk can absorb significantly more energy before breaking (aka "Toughness").

So spider-silk might be superior for stopping bullets in a composite weave, but it would be awful as a load-bearing structure (unless that load-bearing structure were expected to be "catching" objects a lot). Hmmm... maybe a Tennis Racket would be the ideal use of Spider Silk...

<comment><USER2> Because I'm a structural engineer, I like to think about the future of structures, not bicycles. Many good ideas came about by taking something from one obvious application and transferring it to another. I also don't think we will be using reinforced concrete in the year 2070 the same way or as extensively as we are now - the carbon footprint is too large. Maybe these new materials can spawn completely new types of structural systems that were never possible with conventional strengths and stiffness. Low weight is ultimately a goal of structural engineering as well, but not to the same extreme as sporting goods. Obviously cost comes into play, but many things that were once prohibitively expensive are now used on structures, including carbon fiber.

Elasticity (or in the case of conventional materials, ductility) is a trait that has applications in seismic design, so I disagree with your last claim. The trick is combining the good parts of that material with the good traits of other materials into a composite that achieves stability under gravity and predictable deformability under seismic loads.

</comment></comment><comment><USER4> The problem with these silk biotech companies will be scale up and competing with existing cheap and abundant fibers.

Silkworm silk already has issues with water and such clothing has to be professionally cleaned. Many silks have the property of supercontraction and will shrink by 50% upon exposure to water.

Furthermore, these silk companies claim they can produce stuff as strong as natural spider silk, but that's a very tall hurdle to jump. They stole VC interest by claiming that the fiber properties are engineerable, but very little academic research has been done in that space.

So you have to wonder what is the market for expensive fibers that don't perform well in the context of clothing that gets wet.

Already you see companies like Bolt Threads pivoting towards cosmetics, because why not? The technical challenge is much lower and the profit per gram should be much higher.

</comment><comment><USER5> Is this strong enough for a space elevator?

<comment><USER6> Spider Silk has a tensile strength of 1.3GPa, at a density of 1.3g/cm^3 [0]. This translates to 1300 kg/m3, or a specific strength around 1,000,000.

So short answer is probably "maybe?", based on the equations here [1], however there are other mitigating considerations, everything from how would you mass produce it, to the fact it can constrict up to 50% when wet. Hopefully those are just engineering problems.

[0] [https://en.m.wikipedia.org/wiki/Spider_silk#Density](https://en.m.wikipedia.org/wiki/Spider_silk#Density) [1] [https://en.m.wikipedia.org/wiki/Space_elevator](https://en.m.wikipedia.org/wiki/Space_elevator)

<comment><USER7> All the synthetic silk products I've ever seen are very susceptible to UV damage. Modern synthetic winch lines are synthetic silks, and while they are very strong, they need to be kept covered to ensure UV stability.

<comment><USER5> That's very informative! What do you figure are potentially new applications for this that aren't possible without it?

<comment><USER7> Safety. It's light, and doesn't store a lot of elastic energy, so when it does fail it doesn't whip. That is a feature for winch lines and webbing bits for climbing.

Usually with these new fibers, the applications are lightness, since for applications without weight sensitivity steel is pretty awesome.

</comment></comment></comment></comment></comment><comment><USER8> Whats the point of using such a good invention for making shoes?

What is the right kind of application for using spider silk?

<comment><USER9> It's just a concept shoe made from spider silk. There can be many more application.

It's biodegradable (I guess) so probably we can use it to replace plastics.

Instead of plastic or metal or wood, we might end up using proteins.

<comment><USER10> I can really take stronger biodegradable grocery bags. The corn plastic based ones are an exercise in softness.

</comment></comment></comment><comment><USER11> I think another problem is high heat applications, how well does spider silk stand up to fire?

</comment><comment><USER12> So, did they tried weaving a 1-cm diameter rope, and testing it against a similar diameter steel rope?</comment>


The One Day iPhone App Experiment - <AUTHOR> http://gamesfromwithin.com/?p=227

<comment><USER2> Informative post, I can confirm a lot of the same experiences and frustrations except we had a much different experience with timing. It definitely DID NOT take 2 weeks from start to finish for us.

They must have improved the developer approval process and bank contract processing significantly. It took nearly 7 weeks for our bank contracts to get approved, and we used a major int`l bank - Wells Fargo. By the time it was all said and done, our first app took over a month to get on the store.

</comment><comment><USER3> Mine was approved in 2 business days.. It caught us all off guard! It was a free app to control a specific piece of really expensive hardware ($5k-10k whole house audio systems) so that might have made it easier.

What was odd is that the app doesn't do anything without the hardware, and there was nowhere to provide additional testing information, so as far as I can tell they didn't really use it. Perhaps they just scan the binary (or source?) for bad things.

<comment><USER2> That's just a load of crock... we had an app rejected 3 times for very, very, very tiny UI inconsistencies. I look at the AppStore and it amazes me what gets through.

</comment></comment><comment><USER4> "a sales update for those of you curious about it: In the first three days, Tea Time! sold 83 units."

<comment><AUTHOR> And a week and a half after release, it's up to 150 units. I guess that's more or less what I would expect of a niche app that was thrown in the App Store without any marketing.</comment></comment>


Pokémon Go Hacking Journey - <AUTHOR> https://medium.com/@salqadri/a-peek-into-the-pokémon-go-hacking-scene-68d219134b14 <comment><USER2> It's kinda sad that Niantic shut down lots of services for playing Pokemon Go. I think the hacking community were doing some neat stuff. In fact that was the first type I've heard of proto buff

Me and my friends enjoyed playing Pokemon Go, given that we can use apps and tools. However, when they started shutting them down it seems like Pokemon Go became less interesting. It became work instead of play.

<comment><AUTHOR> Yea the open nature of the endeavor really lead to a lot of people getting to learn more about what goes on hidden beneath the game, and that is undoubtedly a good thing. But I do think that unfortunately, they really had to try and shut it down because it was placing a very high amount of load on their surver.</comment></comment>


80 Columns Text on the Commodore 64 - <AUTHOR> http://www.pagetable.com/?p=901 <comment><USER2> I remember the 80 colum hacks for the C64 looked better on a monitor than a tv set at the time. The C64 and its custom chips were hackable and affordable. Like a poor person's Apple 2.</comment>


Stripe: Open Source - <AUTHOR> https://stripe.com/open-source <comment><USER2> Usually it feels like companies open source projects are kind of lame or just to look fashionable. These projects are extensive and awesome. I love the personal projects section at the bottom of the page. You can see why Stripe is so successful. They truly have a dev culture and that's a lot more than most companies that just say they have a dev culture. At Stripes scale and size that's a big success.

<comment><USER3> > Usually it feels like companies open source projects are kind of lame or > just to look fashionable.

I don't understand this. You think Netflix and Facebook's Open source projects are lame?

<comment><USER4>
        I don't understand this. You think Netflix and Facebook's Open source projects are lame?

Whoah, I didn't notice that Netflix and Facebook became the _only_ tech companies on Earth.

<comment><USER3> No, but from what I understand op saying is that most open source from companies are lame, and I haven't seen any lame open source projects from companies, even if in languages I don't like. So by saying "Usually it feels like companies open source projects are kind of lame or just to look fashionable." it comes off that op things that.

</comment></comment></comment></comment><comment><USER5> Love the logo! Did something similar here [1] for our blog's creative/digital arm [2] with actually a somewhat similar approach. Probably a few months ago. Their's is a little more elegant though :)

I just want to make a quick comment: Everything the Stripe's front-end guys touch is pure and magical perfection. They definitely have a killer front-end team - design, UI/UX, and more.

[1] [http://codepen.io/ncerminara/pen/MYvELv](http://codepen.io/ncerminara/pen/MYvELv)

[2] [https://digital.scotch.io](https://digital.scotch.io)

<comment><AUTHOR> Glad you noticed the easter-egg on the logo :p

<comment><USER5> Had no idea you could animate SVG coordinates.

Edit: Or at least I think that's how it works...

<comment><AUTHOR> Yup, you're right!

</comment></comment></comment></comment><comment><USER6> Love Conway's Game of Life in the background.

<comment><USER7> Toally. I actually removed the <header> (id="intro") node to see more of it. Awesome touch.

</comment></comment><comment><USER8> Any chance you could let me click on a cell in the game of life in the background to add another cell? That would surely result in lots more time wasted on that page :)

<comment><USER9> Check out the footer on [http://www.dotjs.io/](http://www.dotjs.io/) to be able to do that :)

</comment></comment><comment><USER10> (I work at Stripe.) We're also accepting applications for our second Open- Source Retreat: [https://stripe.com/blog/open-source- retreat-2016](https://stripe.com/blog/open-source-retreat-2016)

<comment><USER11> Nice program! There seems to be a typo relating to start/end dates, though: It says the grant lasts for "three months", but the quoted period is "from January 15th until March 15th, 2016".

<comment><USER10> Good catch, we've updated the post. It does indeed end in April (3 months!)

</comment></comment></comment><comment><USER12> Some of the projects (e.g., jepsen) are quite impressive. I bet that displays like this one beat any office perk when it comes to hiring.

<comment><USER13> Make sure you check out [https://aphyr.com/tags/jepsen](https://aphyr.com/tags/jepsen) if you have't seen these write-ups before. Truly on another level.

<comment><USER14> Aphyr's also given a bunch of great talks on Jepsen, well worth watching.

</comment></comment></comment><comment><USER15> Would be interested to hear from the devs about the actual reasons they chose to write unilog ([https://github.com/stripe/unilog](https://github.com/stripe/unilog)) instead of using multilog (which ships with Daemontools).

Agreed that multilog is arcane and weird but what are the _actual_ problems with it that unilog solves?

<comment><USER16> (I'm an infrastructure engineer at Stripe)

This actually took a fair amount of digging! We've been using some version of unilog for over 4 years now (longer than I've been at Stripe), and we'd mostly forgotten why we switched. What follows is more the result of historical exploration and guesswork than authoritative statement of original truth.

I'm fairly confident that the impetus for unilog was timestamp prefixes for our log lines. We wanted timestamps (so that we weren't dependent on all applications adding them). multilog is capable of doing writing out timestamps, but it formats them with TAI64N. We wanted something more human- parseable.

Once we had it, we started adding other features. These days, I'd say the most useful thing unilog does for us is buffer log lines in memory. We would occasionally see disk writes on EC2 hang for long enough that the in-kernel (64k) pipe buffer would fill up and cause applications to stall.

<comment><USER16> And an update! I talked with the engineer that wrote unilog originally.

The original headline feature of unilog was that it wouldn't block writes if the disk filled up. multilog does - if it can't write a line to disk, it stops ingesting data off of stdin, which eventually causes the application to hang writing to stdout.

unilog sends you an email and starts dropping log lines, which we decided better matched the tradeoffs we wanted to make - losing logs sucks, but not as much as blocking your application until you figure out how to free up disk.

<comment><USER15> Wow--thanks for the update. Buffering to memory before writing to disk is definitely a great feature (especially when operating out of AWS) and could be enough for us to switch to unilog.

Regarding the timestamps. We've actually gotten quite used to TAI64N--it's definitely not human parseable but it is _extremely_ specific :) We end up just piping logs through tai64nlocal or converting it at the logstash stage.

</comment></comment></comment></comment><comment><USER17> Some great stuff here! The 'personal projects' are a nice touch: I've been using Goji ([https://github.com/zenazn/goji](https://github.com/zenazn/goji)) for a while now as my 'go to' router+context combo for Go web services. Small, extensible and compatible with the other tools out there.

</comment><comment><USER18> Stripe's front end game is on point so hard. Jezus!

<comment><USER19> OP (Benjamin de Cock) is one talented guy. Some of his work is phenomenal.

</comment></comment><comment><USER20> Wow, the "Personal projects" section is a really great idea.

</comment><comment><USER21> On the subject of the jquery.payment lib, I remember noticing that the validation functions it provides for various credit cards are not exactly the same as the ones in stripe.js, and actually better.

I would have to look at my commit history to remember what exactly were the differences though. I think it could match the various credit card types with fewer digits entered or was better for cvv validation of amex cards.

<comment><USER22> I get the impression that stripe has abandoned jquery.payment (or at least it's a side project and not part of their core offering?). Because it does not actually work out of the box with the stripe.js library (see [https://github.com/stripe/jquery.payment/issues/160](https://github.com/stripe/jquery.payment/issues/160) , which has a lot of "+1's" from other people but no response from stripe or whoever it is that maintains this library).

<comment><USER23> It's definitely not abandoned! We're using it in Stripe Checkout, we're aware that it needs some love, and we've got plans to that effect. Stay tuned!

(I'm an engineer at Stripe)

</comment></comment></comment><comment><USER24> why did you guys invent mosql [1] ? you are clearly loving postgres and cannot get rid of it... but potentially with jsonb in 9.5 [2] you can get rid of mongodb.

With the kind of resources you have, you could fix the few things about postgres that you dont like.

[1] [https://github.com/stripe/mosql/blob/master/README.md](https://github.com/stripe/mosql/blob/master/README.md)

[2] [https://wiki.postgresql.org/wiki/What's_new_in_PostgreSQL_9....](https://wiki.postgresql.org/wiki/What's_new_in_PostgreSQL_9.5#JSONB- modifying_operators_and_functions)

<comment><USER25> Or use ToroDB ([http://www.torodb.com](http://www.torodb.com)) that speaks the MongoDB protocol but stores the data relationally, in PostgreSQL. Directly. No ETL, no mosql required :)

(ToroDB developer here)

<comment><USER26> I just checked out the page. This seems like an interesting project, but how would rewriting unstructured documents into relational form be faster to query than just retrieving the whole document as jsonb or whatever?

<comment><USER25> Pulling a document together back from its parts cannot be faster than jsonb or whatever. But it can be orders of magnitude faster if you are pulling a collection out of a query and you avoid scanning the whole thing. Let me elaborate.

When you search in MongoDB (or PostgreSQL with a single table with a jsonb column) the executor needs to visit every single document, every single key, to try to see whether that documents matches the query criteria. This means that in the absence of indexes (or inability to use them, as it happens in MongoDB, where they are not used under many circumstances) the whole db would be scan to answer every single query.

I contrast, ToroDB effectively is "partitioning" the data "by type" (being the type the shape of the documents). See this explanation for more detail: [https://github.com/torodb/torodb/wiki/How-ToroDB-stores- json...](https://github.com/torodb/torodb/wiki/How-ToroDB-stores-json- documents-internally). To answer a given query, ToroDB only reads those tables with potential documents involved in the result, which usually is a small % of the while database. And this, of course, leads to significantly less I/O and queries that can run up to orders of magnitude faster.

</comment></comment></comment></comment><comment><USER27> I really like the bottom section where they are highlighting individual projects from members of their team. I think that really helps instill a sense of ownership and would definitely me make me excited about working there if I was featured.

</comment><comment><USER28> That game of life animation background is really mesmerizing to watch!

</comment><comment><USER29> Wow! That logo and animation has scaringly close resemblance to the one on [https://digital.scotch.io](https://digital.scotch.io)

<comment><USER30> I don't find them to be at all similar aside from the larger concept of having "large pixels convene to form pixelized text", which I'm sure has been done plenty of times before.

The text is different. The color is different. The animation is different. The code is different. It's a unique implementation.

</comment></comment><comment><USER31> Cool that you guys are show-casing your work. I've looked over mosql before. Cool stuff and worth checking out.

</comment><comment><USER32> Very nice page & I like that they put employee's personal projects at the bottom!

</comment><comment><USER33> Shit, Benjamin! So good. Every time. Great work :)

</comment><comment><USER34> Beautiful website. Props!

</comment><comment><USER35> I am very like UI :)</comment>


Why is it so difficult to find an office for my startup? - <AUTHOR> http://spaciousapp.com/blog/why-is-it-difficult-find-office-online/ <comment><USER2> The post seems slightly melodramatic and certainly doesn't mirror my experience finding an office for our company in the same area.

I'll agree that trying to find an office in London _online_ is pretty futile - the best thing to do is leave the desk and take a walk.

Allocate an afternoon or two to pound pavement and start calling all the letting agencies with signs on the outside of buildings.

In one afternoon I managed to get two viewings sorted for the same day and several for the following days. Most of the agents would email us a daily summary of new properties they'd get in which met our requirements (1500sq ft, Old Street area etc.)

We had our new office sorted within two to three weeks. 6 month rolling lease.

Only fly in the ointment is that I'm still getting emails!

<comment><USER3> Hi Leonroy

I'm Tushar, co-founder of Spacious (email@example.com)

I'm glad that you found the process easy once you called up the relevant agents.

The problem we are trying to fix is finding the space online. A lot of people don't want to commit the time to pounding the pavements and physically calling numbers. They would rather be able to browse space online, see all the relevant information and be able to make an informed decision about what they would like to view. In an age where we can browse most things from the comfort of our home, why should commercial property be different? This is especially the case for those who don't live near the area they would like to move into.

Again, everyone's different and I do very much appreciate the feedback!

I agree there are some agents out there who are excellent, and we maintain a very good relationship with them over here in London.

<comment><USER2> Hi Tushar, you raise a fair point and you're right spaciousapp does solve a problem that could do with being a little easier for us couch surfers :)

Site looks pretty good. Like the app, and I think once our lease is up (sometime this year) we might just be using it!

</comment></comment></comment><comment><USER4> This may not apply anywhere else (though I suspect it does), but in the Netherlands the office space market is deliberately kept obscure due to the much higher supply than demand. Many thousands of square meters of office space are currently vacant, and real estate investors are terrified of the paper value of that office space collapsing.

As a result, cost and availability are deliberately kept obscure. Cheap small office space is abundant, but usually not offered publicly. You have to ask, and then you get things like "sure, we can split this huge space into smaller units", or "we'll throw in x-months free rent" (so they can officially keep the rent, and therefor the value, high).

<comment><AUTHOR> Hi Bowlofpetunias,

Absolutely, this is the norm rather than the exception. However, asymmetric information only works as long as most parties in the market are acting in this way. As soon as people start being more open, this changed the landscape very quickly, which is what we are seeing in London.

If the market does indeed stay that way, rather than wasting time talking to individual spaces we are working on technology that should be able to inform all those with space (even if they keep the price hidden) of search and budget requirements of a potential. This should at least open dialogue.

</comment></comment><comment><USER5> Feedback on the actual app:

Make the pictures click-able in the search view. In fact, why not make the whole search result click-able...

Also the -/\+ and the </> buttons are just a bit of a strange UX feature and have too small a hit area for such an important feature.

I was a bit confused as to what the '£500' actually meant, turns out it's pppm. I now notice you have a hover state, but hmmmm.

Also the font looks _horrible_ on Win 7 Chrome. I know, I know, it's Chrome's fault, but it still looks horrible.

Overall, nice app, looks good.

<comment><AUTHOR> Cheers for the feedback, all valid.

We've heard some of those things before and will definitely keep iterating on it!

Appreciate you taking the time to comment!

</comment></comment><comment><USER6> This post really underlines my own experience of trying to find an office space for a startup in London. There are so many sharks out there, and everyone tries to get you to sign a 3 year (or more!) lease. We might not be around in 6 months! But co-working spaces are sometimes just as bad, especially the ones which are basically just feeder funnels for landlords who want you to upgrade to one of their serviced offices / large units (looking at you, ClubWorkspace). I think what Spacious is doing is really cool therefore - and I'll definitely be trying out the service when our current office space expires at the end of March :)

<comment><USER7> "We might not be around in 6 months!"

What kind of premium were you prepared to pay for this risk to the owner? If your answer is <10%, or even <50% depending on the actual amounts we're talking here, do you find it irrational that you had trouble finding an office?

<comment><USER5> What risk?

That they'll have to pay advertising again?

Because if you don't move in, it's still empty.

<comment><USER7> This post just shows that you have never let out any real estate. Let me tell you, it's not as simple as this.

It's not just the 50$ or whatever to put up one online ad. You need to advertise on several websites plus offline. You need to show around various candidates, and do background checks on the serious ones. You have to transfer utilities, deal with mail, and other assorted tasks when somebody moves in. All of this for (in terms of yield) slim margins. And assuming that nothing is damaged or needs fixing up after somebody moves out.

Now, for commercial space it gets worse. When they go out of business, it's highly unlikely that you will recover the owed rent - likely several (2-3) months. Commercial real estate is vacant for longer, and having a tenant 'in between' basically 'resets' the cycle of getting a new tenant. (businesses take a few weeks to months before deciding, residential is usually faster, i.e. faster turnover)

Also, businesses usually make changes when they move in, not always for the better (network rewiring, dividing space etc for offices - for storefront it's much worse still). If they go bankrupt, you as the owner are stuck with the cost of repairing. The deposit (a paltry 2 or 3 months rent) is usually not sufficient.

Again, all of this is assuming that there are no 'real' troubles - no lawyers involved, no 'real' renovations needed after they move out, ... Just the cost of getting somebody to dispose of an abandoned office full of furniture costs a month rent, because second-hand office furniture isn't worth anything!

For me, I don't bother with terms of < 6 months for rentals, not even for a 100% premium (residential that is, I don't do commercial). And 1-year leases I only take as a 'probation' period, if it's clear from the beginning that they have no or little intention on staying longer, I won't accept such a candidate. Financially it just doesn't make any sense, and I'm not even counting the stress and the hassle.

<comment><USER5> _For me, I don 't bother with terms of < 6 months for rentals...I don't do commercial_

Well there you go. The standard in residential is 6 months - year, so what are you talking about?

It sounds like someone trashed your residential house and you're personally angry about it.

Being screwed over is a risk of doing any business and you can't take it personally. Some people will screw you over, not pay invoices, bills, etc.

You can't base all your future dealings off that one event.

<comment><USER7> What? How can that be what you take away from my post? I don't know what geographic area you know about and if 6 months to a year are anything but exceptions there, but my whole point was that short term (< 1 year) rentals don't make financial sense, unless you put a big premium on it. The premium would be 100% or so (as I said, for others, who can be bothered, which I can't), whereas the discount for >5 years is 0, or 5% at best.

Nobody trashed any of my properties, and the disputes I had were settled in my favor by the courts. I'm a lawyer, I can take care of myself. My point wasn't about me - it was about illustrating that short term rentals don't make financial sense at the rates people expect, and that most prospective tenants don't see that. Everybody thinks that real estate is easy money, but it's very competitive, the margins are slim and one decision on who to rent to can make or break your ROI for that year.

</comment></comment></comment></comment></comment></comment><comment><USER8> Personally I think this would have worked better for me if it were a 'Show HN:' type post rather than a blogvertisement.

That said, look at www.42Floors.com, clean, crisp, right to the point. Better yet hope they don't open a London branch :-). As an exemplar for an online experience tailored to a particular demographic (small space seekers, ie startups) they hit a lot of the right pain points. Sort by neighborhood? check, space constraints? Check, it goes on but I'm not here to advertise them, I'm just comparing notes.

If you're catering to startups, and it looks like you are, then the 'office space' problem is probably the CEO or VP Ops' "other" job. Their needs change from seed, to series A, to series B+. How do you transition them into 'bigger' space and hand over the reigns to dedicated facilities person in the company? Do you co-ordinate other services? Janitorial, snacks services, 'fix it' type services? How about vetting/rating landlords, another useful service for the startup founder. If you want to be the "AppStore of Space" you need to consider that the person using your service really doesn't want to make it their life's work, and at the same time doesn't want to look stupid for picking "this space."

<comment><AUTHOR> Thanks Chuck!

Really appreciate the feedback and we have indeed looked at 42floors

The other points you mentioned are things we are thinking hard about at the moment and building out solutions using a lot of customer discovery

</comment></comment><comment><USER9> I have literally all the problems you outlined in the blog and so I checked out the app. It looks cool but why on earth do I have to signup for an account after browsing for a bit? I understand that at some point you want people to login for the enquiry but it makes browsing a new application very very irritating.

Additionally, my biggest annoyance with the commercial real estate is the "MANY OFFICES UP TO Xsqft/FROM £Y". I was hoping this would be something where the lettor had to list offices as opposed to just a general space that can be broken up.

</comment><comment><USER10> When we started our project Peer.im ([http://peer.im](http://peer.im)), we were very lucky to find an office in Santa Clara for merely $500 a month. The space is large enough for 6 people. If anyone is interested, here is the address. 3200 Coronado Drive, Santa Clara.

</comment><comment><USER11> It would be helpful to see different map markets for shared/serviced/SA, or to have the markers change with tab selection.

<comment><AUTHOR> Thanks pc86 - really helpful feedback!

</comment></comment><comment><USER12> It's easy to see how this benefits startups, but what's the upside for the landlords?

<comment><AUTHOR> Hi Nikanj,

We think this is of enormous benefit to landlords:

1\. Fill vacant space for which you are business rates (UK specific)

2\. Be more visible in search for when companies are looking for space

3\. Have visibility over the state of the market and what type of space people are demanding

4\. Have confidence that if you let your space on a flexible basis, that you will always be able to sustain a high rate of occupancy

5\. A beautiful profile of your space online, where thousands of businesses looking for space in your area can come across you

</comment></comment><comment><USER13> Linkbait

<comment><USER3> Hey apunic

Thanks for the feedback!

We were initially hesitant in posting this on HN because of this exact reason. However, this was actually posted on our blog and people actually found the content useful. This included not only those who were searching for space, but also serviced office operators and some of the largest commercial agents in London.

We decided to post it on here this week to see if people had the same problems in London, but also in other cities.

The market is very opaque, so it took us a while to figure out and articulate these issues.

</comment></comment><comment><USER14> So what do you do apart from just list spaces?

<comment><USER3> Hey there ahtomski!

I'm Tushar, co-founder of Spacious (firstname.lastname@example.com).

Our vision is to make renting an office easy by pulling together a fragmented market and presenting the company searching with all the options available for their specific criteria.

Once you know where you want to move to, we help you arrange your entire move, storage, furniture, utilities etc.

If you are renting out excess space, we manage the entire headache of taking rental payments and licencing agreement for your space.

Do let me know if you have any more questions!

</comment></comment><comment><USER15> Why is it so difficult to read that font?

<comment><USER3> Apologies n0! We just started blogging and are yet to optimise our post page for design.

I agree with you - it needs to be easier on the eyes!

<comment><USER16> You need to stop hotlinking all your images too:

www.washingtonparent.com, creativeteachersupport.files.wordpress.com, www.nicoletschampel.com, etc...

<comment><AUTHOR> All valid - thanks for the feedback!</comment></comment></comment></comment>


Norwegian Air CEO Says $69 Flights from U.S. To Europe Coming Soon - <AUTHOR> http://www.nbcnews.com/business/travel/norwegian-air-ceo-says-69-flights-u-s-europe-coming-n439686 <comment><USER2> According to Wikipedia you can have 200 people in a 737 MAX, at $69 each that makes $13'800 for a one way fare.

I'm sure that $69 guaranties you that you always travel at 100% capacity but once they pay the pilots, the flight attendants, kerosene and the cost of the plane, I'm not sure they get a substantial profit.

<comment><USER3> Wouldn't they charge more and more as seats get booked?

<comment><USER4> What if it's the other way around? The $69 seats are only available if there are still some seats remaining 4 hours to take off?</comment></comment></comment>


Sharing Audio in React with useContext - <AUTHOR> https://campedersen.com/2020/04/21/react-audio/ <comment><AUTHOR> Author here - happy to answer any questions!</comment>


Fixing a Small Calc.exe Bug - <AUTHOR> https://www.petertissen.de/?p=77 <comment><USER2> This is _hilarious_!

Some of you might recall how all Zune devices died on 12/31/08.

Windows_Globalization_Calendar_AddMonths_System_Int32 was the root of it all, apparently.

(For further reading on the Zune outage: [https://techcrunch.com/2008/12/31/zune-bug-explained-in- deta...](https://techcrunch.com/2008/12/31/zune-bug-explained-in-detail/))

<comment> King-Aaron Also reminds me of the old "Printer won't print on Tuesdays" bug

[https://bugs.launchpad.net/ubuntu/+source/cupsys/+bug/255161...](https://bugs.launchpad.net/ubuntu/+source/cupsys/+bug/255161/comments/28)

<comment><USER3> I mean, this is a great example of how complex systems exhibit unpredictable, emergent behavior. You think you are doing some process X (say, printing), but it turns out that X relies on some more generic layer Y (a file utility layer) which is running a set of arbitrary filter functions that you have no idea exist. One of these filters then happens to check for some magic strings in your data. And these hardcoded strings turn out to be strings that can also occur in unrelated kinds of data...

What's the underlying issue, really? Is it that detecting file types by checking for magic strings is always a bad idea? Or is it something more basic about the architecture here, more like the leaky abstractions problem?

<comment><USER4> The problem here is that the printing pipeline uses the 'file' tool to detect what the data to be printed is (e.g. PostScript), but 'file' can only ever guess the content of a file. It is a heuristic, and as soon as you have a heuristic, you will always run into cases where it gives a wrong result (otherwise it's not a heuristic anymore, obviously).

So, I would actually disagree with the author that it is strictly a bug in the 'file' utility, as there is simply no completely reliable way to determine intended file type by just looking at the content[1]. You have to transmit that information out of band, and this is why we have MIME types sent through Content-type: headers in HTTP or email headers. File extensions are another method (though also ambiguous: .TXT and .EXE are almost certain, but a .DB or .BAK can be one of many things).

CUPS is probably applying this heuristic for convenience ("send anything to your printer and it just prints!"), at the cost of correctness.

[1] A simple proof for that is the existence of "polyglots", which in this context are source code that happens to be a valid program in two or even more different programming languages (often doing the same or similar things for sport). Were CUPS to differentiate printing based on the programming language, e.g. by applying different syntax highlighting, it would not know what language to choose, and without out of band information there hardly even is a "right" answer. In practice though you can detect a file type more reliably than 'file', but at much more complexity than "let's check some magic numbers in some offsets to give the user an idea of what this might be", and it still wouldn't be perfect.

<comment><USER5> It still _is_ a bug in the data for file, though. As the respective bug states, the spaces should have been escaped and so file actually misidentified everything with »Tue« in that place of the file contents as the wrong type.

</comment></comment></comment></comment></comment><comment><USER6> Impressively, they did actually merge the fix: [https://github.com/microsoft/calculator/pull/553](https://github.com/microsoft/calculator/pull/553)

It's good to see that Microsoft's "open source" programs aren't just code- dumps

<comment><USER7> For what it's worth, VS Code merges a tremendous number of PRs from the community, despite having a dedicated team: [https://github.com/microsoft/vscode/pulls?q=is%3Apr+is%3Aclo...](https://github.com/microsoft/vscode/pulls?q=is%3Apr+is%3Aclosed)

New MSFT really "gets" open source. It's an exciting time.

<comment><USER6> Sure- but that was conceived from the beginning as an open-source project, and isn't even truly "compiled"; it's designed to be hackable. Calc.exe is a core Windows utility, and was open-sourced after the fact.

<comment><USER8> Chakra was a many years old code base that was open sourced a few years ago, and we got a large number of pull requests from the community merged and shipped with windows and in chakracore releases. Object.fromEntries is one that immediately comes to mind but I know there were more. It happens across a lot of our projects!

</comment></comment></comment></comment><comment><USER9> Time is hard. But like what does it even mean to say something is 4 months away when the months could be different lengths? 4 months is a shorter time if that period includes the end of February. This fixed result is strange but does it even matter?

<comment><USER10> _what does it even mean to say something is 4 months away when the months could be different lengths?_

The same thing it means when something is 2 years away when the years could be different lengths?

The month is a well-defined unit _within the context of a certain calendar_. And since a normal date representation contains the month as a singular component, month additions are usually well-defined (the obvious exception being, adding N months to yyyy-mm-31 -- the result is undefined, though most people will assume it to refer to the first day of the month following).

There is no need to bring mathematical strictness into it, because months are never used for that purpose. Moreover, no calendar system is built for mathematical strictness anyway, so arguing for that kind of strictness is like building a house on quicksand.

<comment><USER11> You're right, but I think the problem does arise for "four and a half months away". That actually requires you to pin down how many days are in a month.

<comment><USER12> It only requires you to know how many days are in _each_ month, and you have to know what you're counting. That's the problem with calc: it discards the semantics of "how I got here,"

<comment><USER13> I think it's more complicated, and depends on assumptions made by the speaker and the listener: if I say "two and a half months from now", is the half-month equal to 15 days or 14? If the target duration is February, perhaps I'd assume 14; but otherwise I probably assume 15; but what if February is one of the whole months in between?

In my experience (in my culture), we avoid these problems by just assuming that we'd never convey a precise date in this manner: anything more than a week away we tend to convey with the exact date (March 15th); or, we might say "exactly two weeks from today" or "exactly one month ago" (implying the same numerical day-of-month, regardless of how long each month is), but I don't think we'd ever say "exactly one and a half months from now".

And this is why calendars are hard: it's as much (or more) anthropology as it is arithmetic.

</comment></comment></comment></comment></comment><comment><USER14> Interesting. This bug is reproducible in the 'new' Windows 10 calculator store app, but not in the old Windows 7 calc.exe. So looks like a regression, unless they completely re-wrote the whole calculator app (for which there seems to be no reason).

<comment><USER15> > unless they completely re-wrote the whole calculator app (for which there > seems to be no reason).

That's actually exactly what happened. The original calc.exe (in all versions up to Windows 8.1) came from Windows 1.0, in plain C, very seldomly updated over the years.

The one in Windows 10 is totally rewritten in C++ using the "Universal Windows Platform" as an API rather than classic Win32.

<comment><USER5> The Windows 10 UWP calculator retains the math engine from before, which actually _has_ been rewritten. The ancient calculator used standard floating- point math, with the fun problems that entails, like 0.1 + 0.1 showing 0.19999999998. The current engine uses rational numbers as long as possible and configurable precision for trigonometry, roots, etc. It also got further upgraded over the years so that the root of a perfect square is always an integer.

As for the bug in question, it could not have happened in the old calculator, as that one didn't have the date math panel.

So for the UWP version they merely redid the UI and added a few things. The actual calculator part is still the same as before (just open-source now).

<comment><USER14> Are you saying that the 'old' (i.e. Windows 7 calculator) didn't have a Date calculation panel? Because I'm seeing it right now in front of me.

<comment><USER16> I had no idea that was in there along with all of the other things like a PMT calculator and unit conversion. I would normally switch to the scientific calculator after getting a fresh Windows 7 and never open that menu again.

</comment></comment></comment></comment></comment><comment><USER17> I just tried the same thing on Windows 7 and got some curious results:

      From July 31 2019 to Dec 30 2019: "5 months; 6 days", 152 days
      From July 31 2019 to Dec 31 2019: "5 months", 153 days

I agree that there are 153 days from July 31 to Dec 31 (aug+sep+oct+nov+dec = 31+30+31+30+31 = 153) but I'd say that there are too many Februaries among the months in the first result.

</comment><comment><USER18> Somewhat offtopic but this reminded me of a tutorial from ages ago which showed how to add line numbers to notepad.exe . It was part of the things I followed while learning about cracking and reverse engineering.

I remember being super happy when I replicated the functionality, using wdasm32 and HIEW to patch my notepad code.

<comment><USER19> Link to tutorial?

<comment><USER18> Oh man, this was ages ago, so I don't even know if it is still available on the web.

The best I could found is a similar tut where they are adding other features to notepad:

[http://www.kaoteq.com/sites/fravia/fravia- darkridge/nnhnpad....](http://www.kaoteq.com/sites/fravia/fravia- darkridge/nnhnpad.htm)

This brought me lots of memories, learning from +ORC, tKC and +HCU was the bomb back when I was in University.

I could not find the one specific for adding line numbers though.

</comment></comment></comment><comment><USER20> "Never work with children, animals, or calendar math.."

</comment><comment><USER21> It should be clarified in the title that it is about the UWP calc not the original Win32 calc.exe.

</comment><comment><USER22> This blog is the general information for the feature. You got a good work for these blog.We have a developing our creative content of this mind.Thank you for this blog. This for very interesting and useful.

[https://www.gangboard.com/business-intelligence- training/tab...](https://www.gangboard.com/business-intelligence- training/tableau- training?utm_source=backlinks&utm_medium=cmt&utm_campaign=coursepage&utm_term=tableau&utm_content=jp)

</comment><comment><USER23> Why did this change get merged without a unit test?

<comment><USER24> I've noticed a new way GitHub can show tests. There's a new checks tab at the top of the issue. There[0] you'll find thatall unittests were successfull.

[0] [https://github.com/microsoft/calculator/pull/553/checks](https://github.com/microsoft/calculator/pull/553/checks)

<comment><USER25> I think he meant that unit tests were not added for the scenario detailed.

</comment></comment></comment><comment><USER26> One thing I find interesting, and which I like: As far as I can tell, this commit was merged without the submitter needing to sign a CLA or otherwise assign copyright.

<comment><USER27> The author signed a CLA. "7 checks passed", and if you click "View Details" you see:

> license/cla All CLA requirements met.

Also mentioned in [https://github.com/microsoft/calculator/blob/master/CONTRIBU...](https://github.com/microsoft/calculator/blob/master/CONTRIBUTING.md#contributor- license-agreement)

<comment><USER26> That's good to know, and annoying, but also a little confusing.

The page you linked indicates that a bot will comment on the PR. I am looking at [https://github.com/microsoft/calculator/pull/553](https://github.com/microsoft/calculator/pull/553), but I do not see any bot-generated comments, other than the "All CLA requirements met." status line you mentioned; and I do not see a "cla-signed" or a "cla-not-required" tag on the PR.

Still annoying, regardless.

<comment><USER28> It says "you only need to do it once for Microsoft projects on GitHub". So maybe the author signed it before.

</comment></comment></comment></comment><comment><USER29> The PR is not merged yet. They better do it before July 31st!

<comment><USER30> eh, it still gives a wrong result, except one is visibly wrong and the other subtly wrong.

<comment><USER29> It's merged but not released yet I guess.

<comment><USER31> I don't think we're at the point where Microsoft is doing Continuous Deployment to millions of Windows PCs for calc.exe :)

</comment></comment></comment></comment><comment><USER32> A "month" is a poorly defined unit of time and shouldn't be used to describe a duration.

<comment><USER33> Months are pretty well and exhaustively defined. There are 13 of them. It's just that it's not enough to say that there is a 3-month interval. You need to specify either the dates or the months.

To say months shouldn't be used is sort of like saying that complex numbers or vectors shouldn't be used. They are absolutely useful. We just deal with their component parts separately.

<comment><USER34> A month is not a well defined unit. There are four different month units: 28, 29, 30, 31 days. If you do calculations respecting this there will be no problem.

Complex numbers and vectors are not a good analogy.

<comment><USER35> I believe you fail to grok GP's point.

The mapping from "month" units to "days" units is well-defined. It's just some function that happens to be non-constant over the month ordinal.

Heck, if we start down the "precise time definition" rabbit hole, though, then neither does "day" have some philosophically unassailable notion, _cf._ leap seconds. Even the unit of "second" ends up pulling in a whole heck of a lot of physics machinery just to nail down some semblance of rigor.

Anyway, despite being such an intuitively simple and practically functional concept, the notion of time amd time measurement turns out to be suprisingly subtle and to have a fascinating history. I highly recommend jumping down that rabbit hole. Hehe

Anyway, I'm surprised calc.exe doesn't calculate with and store dates using some kind of epoch time.

</comment></comment></comment></comment><comment><USER36> Never use an unsigned type for numbers.

</comment><comment><USER37> Hi

</comment><comment><USER38> After reading it, I think it is an acceptable bug. Just can't test it.

May be the strategy when doing this is change to a different approach. Not calc as in unix or try hard to do it. But to it as a separate rule based program.

</comment><comment><USER39> OMG why does this get repeated constantly. Microsoft released the source code to Windows Calculator, a Windows Store App. They did not release the source code to the venerable calc.exe

<comment><USER40> I think the software referenced in the article is the only calculator you get on Windows 10, and the binary _is_ named calc.exe so you're technically correct and incorrect at the same time

<comment><USER41> No, it's named something more like "Calculator.exe", but calc.exe is a stub that will just activate the UWP app if present so that people and software can still invoke calc.exe.

The old calculator was briefly shipped as a separate component called "win32calc.exe" in 10-based versions without apps, and that's what the calc.exe stub defers to in those cases.

<comment><USER42> It's not important, but you're definitely wrong here.

</comment></comment></comment></comment><comment><USER43> You said calc.exe and I thought you meant the one that's closed source. I imagined you using IDA to find and fix the bug. This is definitely not as cool.

Also, props for working for free for a multibillion corporation.

<comment><USER44> > Also, props for working for free for a multibillion corporation.

Sure, because no one should be proud of fixing a bug for the millions of people that use that operating system. Satisfying intellectual curiosity and helping somebody for free, the big evils of our time!</comment></comment>