Standalone WebAssembly games using I/O devices - <AUTHOR> https://medium.com/wasmer/wasmer-io-devices-announcement-6f2a6fe23081 <comment><USER2> When people write games for ie. Steam, I assume they either use a 3D engine or something custom written in C++ for OpenGL, DirectX or Vulkan.

When people write interactive 3D graphics for the web, there's ThreeJS and WebGL.

Where does WebAssembly games using I/O devices fit in all of this?

<comment><USER3> You can compile unity to web assembly. There are several other similar engines out there that compile to wasm.

<comment><USER2> Yes, and while that is super cool and nifty, I am struggling to find the perfect use-case for this.

<comment><USER3> F2P Games that run in browsers.....

<comment><USER2> Fair enough!

</comment></comment></comment></comment></comment><comment><USER4> I'm a little out of the loop with WASI. Is there a way to play sound with it too? or is it just video output for now?

<comment><USER5> wasi doesn't have sound or video, it appears wasmer exposed a nonstandard api via wasi file streams.

</comment></comment><comment><USER6> Does the WebAssembly community really need to reinvent the wheel and create yet another set of new platform APIs?

<comment><USER7> There are no cross-platform APIs for something as simple as "blit a bunch of pixels to the screen" anyway, so WASI is pretty much free to define its own.

I'm sure over time, and if desired, WASI will get a set of higher level platform-wrapper APIs for rendering, audio, input and networking, but the requirements are somewhat different from traditional "native" APIs, for instance, compatibility with web APIs is useful. So we'll probably see the WebGPU API for 3D rendering, instead of Vulkan, D3D12 or Metal.

<comment><USER8> What about OpenGL?

<comment><USER7> OpenGL is on the way out, and for rendering 2D image data it requires too much setup code (need to create the GL context, a swap chain, a texture, and (unless GL 1.x is used) a vertex buffer, shader and setting up tons of render state).

For 3D rendering, WebGPU would be the better option to support in WASI because it has standalone native implementations:

[https://dawn.googlesource.com/dawn](https://dawn.googlesource.com/dawn)

[https://github.com/gfx-rs/wgpu](https://github.com/gfx-rs/wgpu)

But for blitting CPU-generated 2D image data to the screen WebGPU is also sort of overkill (of course it would be possible to create a much simplified wrapper library in WASM).

<comment><USER9> No, OpenGL is not "on the way out". Please back up your claims.

<comment><USER10> "Apple deprecates OpenGL across all OSes": [https://www.anandtech.com/show/12894/apple-deprecates- opengl...](https://www.anandtech.com/show/12894/apple-deprecates-opengl- across-all-oses)

<comment><USER9> Apple is not Khronos.

They haven't supported OpenGL for years anyway, so the fact they deprecate it now is irrelevant.

<comment><USER11> A cross platform library loses its potency if it doesn't work cross platform.

<comment><USER9> OpenGL does not stop being cross-platform just because it does not work natively in 1 platform.

In any case, abstraction layers for macOS already exist.

And, going by your definition, if Apple only allows Metal, then no API will be cross-platform ever anyway.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER12> Why use WebAssembly to create standalone programs, instead of some commonly used languages for writing desktop apps, like C++ or Java?</comment>


The United States Is Angry That China Wants Crypto Backdoors, Too - <AUTHOR> http://motherboard.vice.com/en_ca/read/the-united-states-is-angry-that-china-wants-crypto-backdoors-too

<comment><USER2> I love how they cherry pick quotes out of context to make their point. From the linked article:

 _Ironically, the US government sent a letter to China expressing concern about its new law. "The Administration is aggressively working to have China walk back from these troubling regulations," US Trade Representative Michael Froman said in a statement._

But if you actually looks into the quote, it doesn't have anything to do with crypto backdoors. From [1]:

 _"China's new regulations on the use of information and communications technology in the banking industry go directly against a series of China's bilateral and multilateral trade commitments. For example, the rules would require technology transfer and use of domestic Chinese intellectual property as a precondition for market access—both of which China has committed not to do," said Froman.

The rules aren't about security. They are about protectionism and favoring Chinese companies," he said. "The administration is aggressively working to have China walk back from these troubling regulations."_

[1] [http://9to5mac.com/2015/02/27/china-technology- rules/](http://9to5mac.com/2015/02/27/china-technology-rules/)

</comment><comment><USER3> They are angry at anyone that does the same as them, nuclear bombs, invasions, crypto backdoors, you name it.

<comment><USER4> Just wait till the armed drones fly over.

</comment></comment><comment><USER5> They're angry because this is a copyright infringement to them. The US wanted this first, so nobody else can use it.</comment>


Here's How the U.S. Postal Service Can Increase Revenue By Millions of Dollars - <AUTHOR> http://www.centernetworks.com/us-postal-service-increase-revenue?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Centernetworks-+%28CenterNetworks+-%29 <comment><USER2> Check out a really cool service that offers this service and much more: <http://earthclassmail.com/How-Mail-Management-Works>

They scan the outside of every piece of mail that comes in, and you can view it online and choose to have it opened and the contents scanned for you to view online, have the piece of mail recylcled or shredded, or have it forwarded to you onopened.</comment>


Google+ Now Lets You Conference People Into Hangouts With Free Voice Calls  - <AUTHOR> http://techcrunch.com/2011/12/01/hangouts-voice-calls/

<comment><USER2> It seems like Google+ is going to become highly useful whether you like it or not. I'm not sure whether I like Google+, but I admire Google's endurance behind it.

</comment><comment><USER3> I don't get it. It just feels like they are trying to do too much too soon. I don't know any other than marketers who are building content on Google+ and I wonder what their engagement metrics look like.

Another thing is for conference calls, there are already several free and dead easy solutions out there, so its unclear who this is aimed at.

<comment><USER4> What's not to get? This is clearly the leading free multi-way video conferencing solution. My team recently ditched Skype's paid version; it was flaky as all hell, while hangouts is rock solid. This brings me and 6 other people back to google+ every day. It also got 5 of those 6 people to sign up for google+ at all.

So given:

\- "hangouts" is a compelling product with early traction (anecdotal but strong)

\- it drives continued engagement to their strategic product

\- it accelerates google+ adoption by providing a concrete reason for people to register there, because "that's where the meeting is"

Therefore, the right thing to do is to invest more in hangouts.

<comment><USER3> If Google+ is aimed to be a utility then yes, I agree with your point of view. But if they are looking to create a competing product to Facebook then, I am not sure that creating a free multi-way video conferencing solution is the going to help. And, I feel, users who signup to Google+ to use this free service, are not likely to adopt Google+ for their social networking needs just because they are using this free utility.

I agree that Google may acquire a few new users with this but this cannot help them compete with Facebook. They need to get the core (the critical mass, social sharing dynamics etc.) right where as, I feel, they are investing in building utilities to get users which they are not getting based on the basic social networking product.

This is what I meant when I said "I don't get it".

<comment><USER5> I wouldn't say Google+ is a utility, I'd say that Google+ is about integrating existing and new services that Google offers so that the overall package is more useful and more compelling. For instance, there is integrated support for jointly watching a YouTube video or sharing and editing a Google Doc from a Hangout (though, oddly, the first requires an ordinary Hangout and the second requires Hangouts with Extras).

The reason Google+ is primarily social is that, before Google+, most of Google's services were, at best, poorly integrated from a social perspective (if they were socially integrated at all). That naturally encroaches on Facebook because they provide a number of social services, but the more I look at it, the less I think Google+ is about "beating Facebook". I think it is more about addressing weaknesses in Google's service portfolio that Facebook (and Twitter, etc.) have highlighted. And that can be done without "beating" or "replacing" alternative social services.

For example, one thing Google+ is _very_ good for is for interacting with Google engineers and product teams. That's a part of Google+ that has nothing to do with Facebook (or Twitter, etc.), but is still social and very valuable to Google.

</comment></comment></comment></comment><comment><USER6> yeah! let's all hang out on the web!

you go do that, i'll grab a beer with my non-imaginary friends.</comment>


Guerrilla Guide to CNC Machining, Mold Making, and Resin Casting - <AUTHOR> http://lcamtuf.coredump.cx/gcnc

<comment><AUTHOR> This guide was updated since the previous HN discussion [1] two years ago.

[1] [https://news.ycombinator.com/item?id=4679939](https://news.ycombinator.com/item?id=4679939)</comment>


Ask HN: How can I set up an Instagram account if I keep getting Instabanned? - <AUTHOR> This must seem like the dumbest question ever, but every time I try to set up an account for my business via the website, I get "Something went wrong please try again later."  Then when I try again later it tells me the email/username has been taken (I'm running out of ideas for usernames now that make sense for the business).  If I try logging in with the supposed failed sign up credentials I get told that the account has been banned for violating the terms & conditions (not sure how I can violate the T&Cs without ever having logged in or even successfully sign up). Visiting the help pages for Instagram gives some promising forms to fill in, but upon submitting I get a "This page does not exist." error showing up.
I did manage somehow to get hold of a human, perhaps via email@example.com, but they told me to go see the help pages and fill in the broken forms, and when I replied that they are broken they told me "I cannot help you through this channel".  (so much for "support")
The help pages mention that to appeal a banned account I must use the App, but I don't really feel like installing the App given how useless the experience has been so far.  Is this really the only way I can resolve this?
Any ideas on how I can get this fixed, help me please HN! <comment><USER2> Are you behind a proxy? Firewall? Ad blocker?

<comment><AUTHOR> I have a PiHole, I'll try disabling it and signing up (yet again!)

<comment><AUTHOR> Holy crap! That was it.

There is nothing in the T&Cs to say you may not use an ad blocker, what planet are they on to think that breaking their sign up process if you _do_ have an ad blocker is a good idea?

Thanks for the help!

<comment><USER3> There are multiple sites that will block your access completely if they detect an ad blocker - that isn't ad related.

I contribute to the EasyPrivacy list a bit, and there are a number of sites that do massive device fingerprinting, loading Java, Windows Media, attempting to livestream, enumerate your ports with websockets, port scan your LAN after getting your LAN subnet via WebRTC, if you refuse any of these your account is flagged as fraud.

<comment><USER4> With all this stuff you get to a point where you think Stallman retrieving pages and emailing them to himself was the smart move.

<comment><USER3> I would be unsurprised if Instagram was collecting a lot more than just this, but the web-login for Facebook used to use websockets to portscan VNC/RDP/etc ports on localhost in addition to all the fingerprinting and enumeration, so this entire situation wasn't exactly surprising</comment></comment></comment></comment></comment></comment>


The Sixth Extinction? (2009) - <AUTHOR> http://www.newyorker.com/magazine/2009/05/25/the-sixth-extinction

<comment><USER2> Reminds me of the "Mass/Group animal deaths" of various swarms of birds, heards of cattle, and schools of fish, that seemed to gain a lot of news headlines around 2011.

[0] [https://www.google.com/maps/d/viewer?ll=64.320872,16.171875&...](https://www.google.com/maps/d/viewer?ll=64.320872,16.171875&t=h&source=embed&iwloc=0004991c2e41cf55affcb&ie=UTF8&msa=0&spn=87.534022,210.585938&z=2&mid=zwZIrJM6ctH8.kF50bazbbGyA)</comment>


The feature that makes D my favorite programming language - <AUTHOR> https://opensource.com/article/20/7/d-programming <comment><AUTHOR> UFCS is a syntactic sugar in D that enables chaining any regular function on a type (string, number, boolean, etc.) like its member function of that type</comment>


My First Exit - <AUTHOR> http://kzhu.net/my-first-exit.html

<comment><USER2> _" No "hockey stick" growth, just small victories we fought for and earned each day. Somedays, we messed up. We couldn't always give 100%. I probably beat myself up too much for it."_

This is important. Sometimes founders question themselves when they do not see hockey stick growth. Your product may not be in the kind of business that sees such growth or you may be growing slowly and steadily. The OP's persistence paid in the end.

Congratulations.

<comment><AUTHOR> Yes, I think we pulled out hair out a lot waiting for that moment. "If we just get that blog to cover us or if only had that big partnership". We'd get spikes every now but no silver bullets. Steady compounding growth won it for us in the end.

<comment><USER3> Hey! I am also in this position, where I am eagerly doing so much marketing everyday hoping for a hockey stick growth.

I've always thought startups has to have this hockey stick growth, because if we're going to fail, it's better to fail fast than spend another year not growing rapidly.

But where would you draw the line? Would having a growth that generates enough revenue to cover operation cost enough?

<comment><AUTHOR> I think it depends on the type of business. Our model was retail so didn't require a critical mass of users or a repeat behaviour. We knew customers loved our product so the challenge was to finding ways of reaching more IG users. If you have a risky and expensive to test hypothesis, I imagine big growth will be something you'll look for to validate whether it's a worthwhile pursuit.

That said, most startups experience plateaus and dips. These are the moments that truly test the fortitude and resolve of the team.

<comment><USER4> Can you give some points on how you reached these customers? I have a product right now that my target audience (new mothers) love and could use some tips on accessing this audience that I'm probably not thinking of.

<comment><AUTHOR> Sure. Drop me an email.

</comment></comment></comment></comment></comment></comment><comment><USER5> _" My employers, Mint Digital, were willing to take a gamble and allowed me to start it from within the agency. I am tremendously grateful to have been given the resources, mentoring and autonomy to follow my instincts."_

Always good to hear about employers encouraging employees' start-ups. Congratulations to you and your team.

<comment><AUTHOR> Thank you. I think the key was getting the autonomy coupled with the support network. All too often with agency projects too many chefs early on can easily spoil things. This is especially true when you have more rigid hierarchies to deal with.

</comment></comment><comment><USER6> > I remember 3am on our first Christmas eve, staring down an inbox full of > customers who hadn't received their orders, knowing each one was a gift that > would go unfulfilled.

How did this error come about? I'd love to see the management debugging trail on this frequently repeated problem with smaller companies.

<comment><AUTHOR> It was mostly down to the various postal services around the world messing up. Every year lots of mail gets misplaced during the xmas rush. There were a few tweaks we learnt to combat this in the future but largely it was out of our hands. That said we still took full responsibility for the situation. It felt crummy that they wouldn't get their presents and we made sure to compensate everyone that contacted us.

</comment></comment><comment><USER7> Congrats. I'm happy that your persistence paid off. I'm very interested in knowing how you did it under your employer. Did they fund you? Did you work it during office hours (like Google's 20% project)? etc.

</comment><comment><USER8> Congrats!! Hakkasan, did this exit get you enough cash for a Yacht? :-)

</comment><comment><USER9> Cant say much to that apart from congratulations. Seems like a nice product, well executed.

</comment><comment><USER10> Congrats! Can't wait to see what you do next, London's loss is SF's gain :)

</comment><comment><USER11> Congratulations! I'm excited to see what you choose to do next, enjoy San Francisco!

</comment><comment><USER12> Glad you said thanks to all who helped you. Shows class. Congrats.

</comment><comment><USER13> Nice read! Congratz!

<comment><AUTHOR> Thanks mate

</comment></comment><comment><USER14> Kudos!

<comment><AUTHOR> Cheers</comment></comment>


Judge Signs Off On $415M Settlement To Resolve Tech Industry Anti-Poaching Case - <AUTHOR> http://consumerist.com/2015/09/03/judge-signs-off-on-415m-settlement-to-resolve-tech-industry-anti-poaching-conspiracy-case/

<comment><USER2> This is blogspam. The original article, which they link to at the bottom, is more informative:

[http://www.mercurynews.com/crime- courts/ci_28751080/silicon-...](http://www.mercurynews.com/crime- courts/ci_28751080/silicon-valleys-415-million-poaching-settlement-final)

That article says:

 _" The overall settlement provides payouts of about $5,000 per employee."_

So the employees who were harmed (by getting lower salaries than they could get in a competitive job market) got almost nothing (maybe one or two weeks' salary), and the companies who entered into the illegal anti-poaching agreement got off with a slap on the wrist.

 _" The judge's main concern with the final settlement centered on fees for the employees' lawyers -- she slashed their original $81 million request in about half in her final order."_

So the big winners here were the lawyers, who walked away with about $40 million.

</comment><comment><USER3> Previously discussed: [https://news.ycombinator.com/item?id=10168214](https://news.ycombinator.com/item?id=10168214)</comment>


Cathode Ray Tube Safety Issues - <AUTHOR> http://arcadecontrols.com/files/Miscellaneous/crtfaq.htm#crtcsa <comment><USER2> I remember our old console CRT TV when I was a kid was starting to go. All the colours were getting fuzzy. My dad and cousin had the back off and were adjusting parts of the CRT tube using screwdrivers wrapped in electrical type while wearing gloves.

My dad was a EE and cousin a CompSci. I think even then as a kid, I realize how incredibly dangerous this was. It really didn't seem worth it. They did get the colours sorted out and it lasted like 8 or 9 months before it started going again and my dad gave up on it. Seems like an incredible amount of disk to to take to squeeze out a little more use.

<comment><USER3> Get this: There were people who worked on televisions _every day_ back then. My dad owned a TV repair shop until I was about 10 (when he went back to school to get a degree in engineering). He showed me how to discharge a CRT and capacitors when I was about that old.

<comment><USER4> Yup, my dad fixed ship's radar at work and then did TV repairs for neighbours sometimes on the weekend. UK, 625/405 dual standard monochrome teles and early colour teles. On the back room table. Hand in back pocket when going near what we called the EHT...

</comment></comment></comment><comment><USER5> The best part of CRTs: phosphorescence effects and vector monitors.

When any other kind of monitor tries to imitate what vector games look like or how things looked on old television sets, they really can't do it justice.

Stella (Atari 2600 emulator) has had a phosphorescence effect emulation as an option for quite some time, but it isn't the same. The differences in intensity in ghost images that fade can not be trivially reproduced.

</comment><comment><USER6> Interesting coincidence: I just got my first LCD monitor this week.</comment>


Show HN: Setup GMail for mailto: - <AUTHOR> https://email-f9i9hfujqjh1.runkit.sh/ <comment><USER2> Honestly not entirely sure what the purpose is, also it seems to have a few bugs: [https://i.imgur.com/ciqnlbg.png](https://i.imgur.com/ciqnlbg.png)

<comment><AUTHOR> Yeah it's not clear. Sorry about that.

The form is just a mailto form to test how mailto links are handled in your browser / setup.

The real purpose is to use the bookmarklet at the bottom of the page on GMail.

The real question is why didn't I just change it and make it more clear? I don't know. I like mailto / protocol forms. They're pretty cool. Sending data from browser to _almost anywhere_ , not just HTTP POST and GET. I really like that. One reason is it signals the vast affects you can have with something so simple as plain old HTML.

Ok, I'll make the font-size of the Bookmarklet bigger. _Done_

 _Edit:_ I also noticed the Runkit site is slow sometimes. Here is a CodePen version in case anyone needs it: [https://codepen.io/dosy/full/aLMOBQ](https://codepen.io/dosy/full/aLMOBQ)</comment></comment>


Mobile App Developers Are Suffering - <AUTHOR> https://blog.branch.io/mobile-app-developers-are-suffering <comment><USER2> I like his first proposal of "Better Discovery Through Decay", not sure about the second one "App Caching and Cache Ejection".

We jump from websites to websites because we consume their content, there's no learning how to use the content. People don't jump from (web) apps to (web) apps because there's a learning curve each time you do.

I think we don't need that many apps to start with, just a core of apps (about 20 ?) that cover 90% of your needs and the rest is superfluous.

Maybe we will have to accept that unless you come up with something revolutionary it's just not possible to earn money with an "OK" app.</comment>


C, what the fuck??! - <AUTHOR> https://bowero.nl/blog/2019/12/15/c-what-the-fuck/ <comment><USER2> This is about that ancient EBCDIC (IBM's ASCII "competitor") specific hack called trigraphs, which in modern compilers are opt-in anyhow: "To understand this, I have to admit one thing: I have to pass -trigraphs to a modern version of gcc before this actually works. "

C++17 actually removed support for these.

<comment><USER3> Trigraphs were not specific to EBCDIC: they were also a bad accommodation for the ISO 646 ASCII variants that supported European languages, which used characters {\|} etc. for letters. This is why the newer better header with alternate spellings for restricted character sets is called <iso646.h>

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

<comment><USER4> The reasonable accommodation is to substitute with characters that are available in the ISO 646 ASCII variant being used, preferably the characters with the same binary representation as in US ASCII.

Outside of silly games like IOCCC, did anybody actually use trigraphs? I find it really hard to believe that anybody tolerated trigraphs for serious C programming. Was there an obscure European government agency that actually wrote code with trigraphs?

<comment><USER5> IBM opposed their removal in C++1x

From [http://www.open- std.org/jtc1/sc22/wg21/docs/papers/2009/n291...](http://www.open- std.org/jtc1/sc22/wg21/docs/papers/2009/n2910.pdf)

 _> The biggest argument against deprecating trigraph is the fact that we know there are source code from world-wide companies, based on an internal survey of our customer problem reports that make heavy use of trigraphs for one reason or another, and customer testimonials. Google code search doesn't find them because these are proprietary code. Further discussions with some of these customers have shown serious dissatisfaction with WG21's intention to deprecate trigraphs, because they do not wish to make any changes to their source code. It doesn't seem fair to force this group of existing users to change their source code for no apparent benefit, other then reducing an annoyance to another group._

ISO 646 is probably nowhere near as relevant to their argument as EBCDIC is.

 _> Trigraph deprecation is vexing for existing world-wide companies (of which IBM is one such user) because of their use of EBCDIC variant code pages. It makes it difficult to start in a code page neutral manner, establish what the active code page is, then start using invariant characters. We use a pragma filetag("IBM-1047") to toggle the code page, then we can use #. Prior to that we are in a code page neutral environment and must use the trigraph ??=_

</comment></comment></comment></comment><comment><USER6> Digraphs were supposed to be a easier-to-read alternative to trigraphs. Unfortunately, the extended list of digraphs with many additional logic operators by C++ never entered C, i.e.

        %:%:    ##
        compl   ~
        not     !
        bitand  &
        bitor   |
        and     &&
        or      ||
        xor     ^
        and_eq  &=
        or_eq   |=
        xor_eq  ^=
        not_eq  !=

C only has basic ones (still more intuitive than trigraphs).

        <:  [
        :>  ]
        <%  {
        %>  }
        %:  #

Last time, I had to type a C program on a touchscreen, and those symbols were extremely difficult to enter. I knew digraphs can help, but then realized that I couldn't use the digraphs for logic operators without programming C under C++.

<comment><USER7> C has the named operators as macros in <iso646.h>.

<comment><USER6> Great tip, thanks. Have to remember this magic ISO standard number.

<comment><USER8> Also, have to remember to #undef them in any file that includes something that includes iso646.h.

</comment></comment></comment></comment><comment><USER9> TL;DR: Trigraphs. That at least makes the '??!' in the title meaningful.

It's still clickbait, though.

<comment><USER10> Especially that it requires enabling a compiler flag. If you need to require that then you could require "#define true false" as well.

</comment></comment><comment><USER11> What is the probability of something like this appearing in a normal program written by somebody who is unaware of trigraphs?

I am also not aware of any professional who would use multiple question marks in any kind of serious code that could be read by anybody else because that kind would reflect negatively on the perception of his professionalism.

<comment><USER7> Nice "No true Scotsman" logic there. Sure, if you see multiple question marks as an indicator of unprofessionalism, then by definition, no professional would use that. At the same time, your definition of professional is not one that is useful in any other context.

In code written by people whose job it is, in part, to write code, i.e. what I would call professionals, multiple question marks do sometimes occur.

<comment><USER11> Did I really produce a Scotsman there? I would break it down like this:

* Professionals want to appear professional to the people who pay them.

* People who read the code can have an influence on the people who select which professional gets hired. (At least negatively if they find examples of poor practices.)

* Professionals therefore avoid any behavior that would be interpreted as unprofessional.

* Multiple question marks appear unprofessional and are therefore avoided. (Or would you concur???)

* I could not find a counterexample in my memory.

If this can be interpreted in a "no true Scotsman" way then it would be: "All Scotsmen who showed the behavior have been denied the citizenship." and then in turn they really wouldn't be true Scotsmen anymore because they lost the citizenship.

<comment><USER7> I think that last point illustrates the problem: you base your idea of "professional" on the professionals you have worked with or whose code you have read, who might not write such things. At the same time, in code I have read, I have seen it in ways that did not look out of place to me. What that tells me is that this is not a professional vs. unprofessional thing, it is just different programming norms. It is similar to how I think we can agree that neither tabs nor spaces are unprofessional, but insisting on either in a codebase already written using the other style is.

</comment></comment></comment></comment><comment><USER12> The author purposely misleads the reader by doing syntax highlighting wrong. A trigraph-aware editor would keep the third line green.

<comment><USER13> Plot twist: Many developers are using editors that are not trigraph-aware.

</comment></comment><comment><USER14> > Therefore, this line actually says:

        !didIMakeAMistake() || CIsWrongHere();

> If you understand how short-circuit evaluation works, you can understand > that this will result in the following:

       if (!didIMakeAMistake())
          CIsWrongHere();

Can someone explain this? I'd have thought that was right without the !

<comment><USER6> It must be a typo.

Function calls have the highest priority here, followed by logic NOT and logic OR.

        !didIMakeAMistake() || CIsWrongHere();

_!didIMakeAMistake()_ is evaluated first ( _or you can say didIMakeAMistake() is executed and evaluated first, then its result is inverted and checked_ ), if it's true, evaluation is finished. If it's false, _CIsWrongHere();_ is evaluated.

It is indeed equivalent to

       if (didIMakeAMistake())  /* !didIMakeAMistake() == false? */
          CIsWrongHere();

Without the invertion.

<comment><AUTHOR> Thank you guys so much! I've changed it immediately.

</comment></comment></comment><comment><USER15> Well, I did always think less of people who // wrote comments like this????

</comment><comment><USER16> Seriously, at this point C should be considered dangerous and should be actively discouraged. I would even go so far as to legislate it. We can't have this sort of thing in 2019.

<comment><USER17> Please don't comment on the state of programming in 2019 if you're an Angular developer.

<comment><USER16> Angular is one of the many tools I use.</comment></comment></comment>


Wal-Mart shortened the length of its store receipts saving more than $7M - <AUTHOR> http://www.foxbusiness.com/features/2017/10/10/wal-mart-plans-further-cost-cuts-as-competition-with-amazon-intensifies-update.html <comment><USER2> Actual title : "Wal-Mart Plans Further Cost Cuts as Competition With Amazon Intensifies"

Far more ominous to me than the recept trick was this: "Over the past two years, Wal-Mart has already cut costs by eliminating thousands of corporate and store jobs, increasing the fees charged to its suppliers to deliver goods to stores and demanding lower prices on goods."</comment>


Ask HN: Who has been using google wave and for what reasons? - <AUTHOR>

Ask HN: Who has been using google wave and for what reasons? <comment><USER2> I've been using Wave for startup product collaboration (a development project with 2 people on one location and the 3rd person on another location). The way Wave has been used is roughly like a digital shared whiteboard for product ideas and requirements.

The reasons why I use Wave is because it works relatively good (except that it gets somewhat less responsive on very long threads) and that it needs zero maintenance from our side.

<comment><AUTHOR> Do you embed google docs into your wave for requirements...etc?

<comment><USER2> no, mainly write requirements directly into wave (do some embedding of graphics and files though).</comment></comment></comment>


California will pay people unable to work because of Covid-19, and their carers - <AUTHOR> https://www.cdph.ca.gov/Programs/OPA/Pages/NR20-012.aspx <comment><USER2> Please don't editorialize titles by cherry-picking a detail. If you want to say what you think is important about an article, that's fine, but please do so in a comment. Then your view is on a level playing field with everyone else's.

" _Please use the original title, unless it is misleading or linkbait; don 't editorialize._"

[https://news.ycombinator.com/newsguidelines.html](https://news.ycombinator.com/newsguidelines.html)

<comment><USER3> This isn't a cherry-picked detail. It's the second major point of the article, and, arguably, the most important point.

<comment><USER2> "Second"/"arguably" restates the issue. That's editorializing. HN submitters need to use the title field for articles' actual titles, rewriting them only if they're misleading or linkbait, and then only in ways that are accurate and neutral.

Unlike on some other social news sites, on Hacker News submitting an article confers no special rights over the submission and, in particular, no right to frame for others what they should consider important. Titles are the most powerful influence on threads—by far, actually—so this is a big deal.

[https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...](https://hn.algolia.com/?dateRange=all&page=0&prefix=false&query=by%3Adang%20%22level%20playing%20field%22&sort=byDate&type=comment)

<comment><USER3> No, I'm sorry, it is not editorializing. You are right that the title has a huge influence on the submission's fate. When an article buries the lede that far, I want it exposed in the submission title.

</comment></comment></comment></comment><comment><USER4> I think people and small businesses are going to need a bailout, similar to the banks during the Great Recession. I wonder a) would the gov't do it and b) what will be the financial impact. W.r.t. (b), the banks were able to pay back the funds with interest. I don't expect that will be the case for individuals and small businesses.

<comment><USER5> There's talk about cutting checks to Americans directly in the mainstream now (MSNBC). It's almost UBI-esque (it's at least technically a "conditional cash transfer program").

The reasoning being that right now they're just doing rate cuts, but that only affects investment at the top level, it does nothing to help the americans living paycheck to paycheck.

<comment><USER3> I haven't seen that. Do you have a link?

<comment><USER5> Here's a compilation: [https://www.youtube.com/watch?v=S1wbBvQ0j_E](https://www.youtube.com/watch?v=S1wbBvQ0j_E)

</comment></comment></comment></comment><comment><USER6> Related: [https://www.worldbank.org/en/news/press- release/2020/03/03/w...](https://www.worldbank.org/en/news/press- release/2020/03/03/world-bank-group-announces-up-to-12-billion-immediate- support-for-covid-19-country-response)

</comment><comment><USER7> The range for disability insurance payouts in California is $50-$1300 per week.

> For claims beginning on or after January 1, 2020, weekly benefits range from > $50 to a maximum of $1,300. To qualify for the maximum weekly benefit amount > ($1,300) you must earn at least $28,145.01 in a calendar quarter during your > base period. Your WBA may vary if you receive other income (such as sick > leave pay, paid time off, etc.) while receiving DI benefits from the EDD.

[https://www.edd.ca.gov/Disability/Calculating_DI_Benefit_Pay...](https://www.edd.ca.gov/Disability/Calculating_DI_Benefit_Payment_Amounts.htm)

<comment><USER8> Keep in mind disability payments aren't taxable. Even in California, its a workable amount of money (though maybe a little uncomfortable if you make well over $100k/year).

</comment></comment><comment><USER9> This virus is going to expose so many institutional problems that have infested the American system as we've enjoyed decades of excessive comfort, breeding complacency and incompetence.

Take notes, the next few months will produce enough material for an encyclopedia, if you're the book writing type. The entire geopolitical stage is already being disturbed.

Hell, if all of the shit happening before the virus wasn't enough, on top of what's already going on internationally and domestically from the virus alone, oil prices just fell 30%. The world is changing, right now, and it is absolutely morbidly fascinating.

<comment><USER10> I wonder why this virus will and not H1N1?

I still remember how scared people were during that pandemic.

<comment><USER9> Because this virus is far more virulent. China Italy just put 16 million people on lockdown overnight.

This time it isn't just a scare.

<comment><USER11> [https://en.wikipedia.org/wiki/2009_flu_pandemic#United_State...](https://en.wikipedia.org/wiki/2009_flu_pandemic#United_States)

 _CDC estimates that between 43 million and 89 million cases of 2009 H1N1 occurred between April 2009 and 10 April 2010. The mid-level in this range is about 61 million people infected with 2009 H1N1._

 _CDC estimates that between about 195,000 and 403,000 H1N1-related hospitalizations occurred between April 2009 and 10 April 2010. The mid-level in this range is about 274,000 2009 H1N1-related hospitalizations._

 _CDC estimates that between about 8,870 and 18,300 2009 H1N1-related deaths occurred between April 2009 and 10 April 2010. The mid-level in this range is about 12,470 2009 H1N1-related deaths._

</comment></comment></comment></comment><comment><USER3> > Individuals who are unable to work due to having or being exposed to > COVID-19 (certified by a medical professional) can file a Disability > Insurance (DI) claim.

> Disability Insurance provides short-term benefit payments to eligible > workers who have full or partial loss of wages due to a non-work-related > illness, injury, or pregnancy. Benefit amounts are approximately 60-70 > percent of wages (depending on income) and range from $50 - $1,300 a week.

This isn't going to be enough to cover a lot of peoples' monthly expenses. After taxes, $1300/week barely covers my rent, much less food and other necessities.

Edit: does anyone downvoting care to actually explain why they disagree? Or, are y'all just offended by the statement?

<comment><USER12> A perceived sense of entitlement, perhaps? Do people have the right to maintain their lifestyles during tragedy at the expense of their fellow taxpayers? In some cases, maybe, but it also doesn't hurt to prepare so one can weather a crisis without being too reliant on others.

<comment><USER13> A cap of $1,300 a week means more than just a lifestyle cut in some areas of California.

<comment><USER14> How much are other states giving?

<comment><USER3> How is that relevant, when the article is referencing California specifically?

<comment><USER14> Because everyone is complaining about the amount of the benefits in California. I want to see what other states offer in comparison.

<comment><USER3> The point is, it's probably not enough to live on for people who may already be in a precarious financial state, anyway. No comparison is needed to make that point.

<comment><USER14> Sure but it looks like most states don't offer anything better. Most offer none.</comment></comment></comment></comment></comment></comment></comment></comment>


Show HN: SHA-256 Animation - <AUTHOR> https://github.com/in3rsha/sha256-animation <comment><AUTHOR> I wanted to understand how SHA-256 works, so I made a terminal animation that shows the bitwise operations at each step. I wrote a text guide in the README.md to explain what's going on. I think my technical terminology is okay.

I'm new to hash functions though, so I don't yet know why SHA-256 has been designed in the way it has (e.g. why exact numbers were chosen in the bitwise rotations).

As far as I understand, the Sigma functions promote diffusion of bits to help prevent collisions, and Choice/Majority/Addition help to make it a one-way function, but I'm not entirely sure. I'd be interested in learning more about the design if anyone has experience in this field.

<comment><USER2> 1) I loved this video.

2) I did have to take a sip of tea and think about my life when I realised I was watching a video by a Welshman about mining.

3) Although having said this, 'Welsh Bitcoin Miner' is going to fit seamlessly into my West Country themed cyberpunk adventure 'Cider Punk'.

<comment><USER3> You could call it CIDR Punk if you want to be a bit more on-the-nose ;)

</comment></comment></comment><comment><USER4> This is phenomenal. The animations at the top were way too quick for me to understand, but they pulled me in. The step-by-step explanations below (alongside the relevant parts of the animation) were very clear and interesting.

I had the big picture from the top of the page, and each section gave me a little more insight into what was going on. Great use of animation, and also very clearly written!

I also like the testimonials.

<comment><AUTHOR> Thank you for being so kind, it means a lot.

</comment></comment><comment><USER5> I once heard about a meeting where someone did a presentation for the best part of an hour to a room full of Japanese people. They all nodded along, smiling as the presentation progressed. It wasn't until the end that the presenter asked them what they thought. They all just kept smiling, but no answer. Someone at the front turned and talked to the room (in Japanese) then turned to the presented and said "they do not speak any English, but they are sure from this presentation that you are very, very intelligent".

I feel like the Japanese people. I don't understand what you're doing here but I am convinced it is very clever.

<comment><USER6> You need to watch his video, very cool, it really helps to understand how this works: [https://www.youtube.com/watch?v=f9EbD6iY9zI](https://www.youtube.com/watch?v=f9EbD6iY9zI)

<comment><USER7> There's a few things in there that are factually incorrect -- in particular, the false notion that "every input has a unique output" can be quite dangerous in some cryptographic settings.

That said, the purpose of this talk is about the mechanics of the function, and not its properties or how to use it safely. So don't let that detract from what is, really, an awesome presentation.

<comment><USER8> I'm sorry, could you please elaborate? I was always under the assumption that hash functions have to be deterministic, and thus, that "every input has a unique output" was a correct statement.

AFAIK the contrary is invalid, so that "not every output is the result of one and only one input".

<comment><USER7> A function being deterministic means that any input will have a single output. But it is not unique for any hash function, SHA-256 included. The definition of a hash function is any function which takes an arbitrary length input and outputs an n-bit output for some fixed value of n. By virtue of the fact that you have infinite inputs and finite outputs, the outputs cannot be unique.

Generally when people make this claim, what they're actually referring to is what's called Collision Resistance (CR) and/or Weak Collision Resistance (WCR), which instead make claims on difficulty of finding such collisions (of which infinitely many exist).

WCR, necessary for almost any cryptographic use, states that for any given input it should be difficult to find a different input which hashes to the same value. CR, generally desirable for cryptographic hash functions, states that it should be difficult to find two different inputs such that their hashes are equal. CR implies WCR, but WCR does not imply CR -- for example, SHA-256 (currently) exhibits CR but SHA-1 only exhibits WCR.

</comment></comment></comment></comment></comment><comment><USER9> Very nice!

This also has potential for landing in many movies where a hacker at work is involved.

<comment><USER10> Indeed, I'm _hoping_ that it ends up in movies so they finally have actually relevant visuals. Someone send this to Hollywood.

</comment></comment><comment><USER11> Here's the author doing an in-depth explanation of how SHA-256 works using this code: [https://www.youtube.com/watch?v=f9EbD6iY9zI](https://www.youtube.com/watch?v=f9EbD6iY9zI)

I'm halfway through, but looks very well done, thanks!

<comment><USER12> Wow, this was just what I asked for in a comment before seeing this comment. Thanks.

</comment></comment><comment><USER12> This looks great, though it requires quite sometime to go through it (and figure out what could possibly be understood by someone with knowledge of programming and bit wise operators, and what can just be skipped because it's something only cryptographers can understand).

If someone were to make a slower video explaining it with all the sections from this dissection, that'd be even more awesome.

Edit: Seems like the author created a video for this — [https://www.youtube.com/watch?v=f9EbD6iY9zI](https://www.youtube.com/watch?v=f9EbD6iY9zI) (thanks to 1_player's comment at [https://news.ycombinator.com/item?id=23165906](https://news.ycombinator.com/item?id=23165906))

On a tangent, here's an animation (by someone else) explaining AES encryption — [https://m.youtube.com/watch?v=gP4PqVGudtg](https://m.youtube.com/watch?v=gP4PqVGudtg) (thanks to harrigan's comment at [https://news.ycombinator.com/item?id=23165821](https://news.ycombinator.com/item?id=23165821))

</comment><comment> jagged-chisel I would love to build something like this for encryption algorithms that twiddle bits (DES and friends.) Even for the math-based algorithms, but I have a had time imagining how to make those interesting.

<comment><USER13> I have Excel spreadsheets showing every bit of the calculation of AES and DES: [https://www.nayuki.io/page/aes-cipher-internals-in- excel](https://www.nayuki.io/page/aes-cipher-internals-in-excel) ; [https://www.nayuki.io/page/des-cipher-internals-in- excel](https://www.nayuki.io/page/des-cipher-internals-in-excel)

Also, some people have been sharing a video explanation of AES/Rijndael. It is actually rendered from someone's Shockwave Flash movie. [https://web.archive.org/web/20051124061027/http://www.cs.bc....](https://web.archive.org/web/20051124061027/http://www.cs.bc.edu/~straubin/cs381-05/blockciphers/rijndael_ingles2004.swf)

</comment></comment><comment><USER14> Love the animations but they go by too fast. It would be nice if you could add a single step capability so the user could follow along at human pace.

Also, I wanted to see how you updated the bit strings in place and was surprised not to find anything special. It looks like you use nothing but puts statements, which, as I understand it, simply add a carriage return at the end of a string but how then does the cursor move back up to the first line? Can some explain the technique being used here?

<comment><AUTHOR> If you add the third optional argument of "enter" when running the sha256.rb script you can use your keyboard to step through. I haven't set this up for the individual animations though.

ruby sha256.rb sizzzzlerz enter

I didn't do anything special for the terminal animation. I just work out the current state of the hash function at each step, clear the terminal, and print the entire state back to the screen. I know it looks like I'm directly manipulating each individual bit in your terminal, but really I'm just redrawing your screen.

I'd like to do something more practical in future, but for this I just did what I needed to do to get an animation working. Still, every bit you are seeing is correct.

<comment><USER14> Thanks! I detected a few flashes in some lines that weren't active but I didn't believe you could clear and reprint the entire screen that fast. Very cool!

</comment></comment></comment><comment><USER15> I was surprised to see addition in there.

Hash functions use bit-wise operators. This is a world where "integers" are simply convenient fixed-sized blobs of bits and all bits are equally significant.

Addition is an arithmetic operation. Bits have significance in this world. The state of the input bits have more "influence" over the left hand bits of the result than the right hand bits.

Look at abcd+efgh=ijkl (Ignoring any overflow'd bits per SHA-256.)

To find the value of bit l, you only need to know bits d and h. You need to know all eight input bits to know the value of bit i.

</comment><comment><USER16> This is so interesting to watch. Can you do it for other hash or encryption methods?

<comment><AUTHOR> I have thought about it. Any particularly interesting ones?

<comment><USER17> Interesting candidates are blake2b, sha-3/keccak, and the much simpler siphash-2-4 that's used in many hashtable implementations.

</comment></comment></comment><comment><USER18> I think this might end up being used in a hacking scene in a movie ... with bright green text of course.

<comment><USER19> IIRC, hackertyper has been used numerous times.

</comment></comment><comment><USER20> Shameless plug: [https://jrvidal.github.io/aes- demo/](https://jrvidal.github.io/aes-demo/)

I like this one better though.

<comment><USER12> Looks nice, but an explanation of each step would be more helpful to understand it (along with a coverage of the overall algorithm). The animation was a little too quick for me to follow along.

</comment></comment><comment><USER21> I feel like there are lots of mathematical / programming concepts that could be explained through animation. Anyone got any good examples?

<comment><USER22> 3blue1brown is great, e.g. his Fourier transform animation is super intuitive: [https://youtube.com/watch?v=spUNpyF58BY](https://youtube.com/watch?v=spUNpyF58BY)

He has opensourced his animation engine "manim" used in his videos: [https://github.com/3b1b/manim](https://github.com/3b1b/manim)

<comment><USER23> Thank you for showing me that Fourier transform video. I've never understood how it worked because usually they just show the integral and call it good.

</comment></comment></comment><comment><USER24> I remember that in my first year of CS, the professor asked us to implement this algorithm. We had just learned our first computer language(C by the way). Result: nobody was able to do it, and everybody got a 10 after the professor realized it.

<comment><USER25> Hehehe, yea, no, there's a good five to ten steps necessary to grok all that.

</comment></comment><comment><USER26> Great animation! And I still have no idea what happened there :D

</comment><comment><USER27> This is amazing! Really fun to watch the example in the readme and just shows how much happens behind the scenes nearly instantly.

</comment><comment><USER28> Psh! I never trust a program with my hashing; pen & paper is your friend here, much more secure.

</comment><comment><USER29> There are microprocessor out there that does most of this in single instruction, :O

</comment><comment><USER30> Make a screensaver out of this!

</comment><comment><USER25> I get it! Fantastic work.

I hope you get lots of requests to include it in teaching materials.

</comment><comment><USER31> I forsee this being in a blockbuster movie featuring a "hacker"

</comment><comment><USER32> Could be a in a movie

</comment><comment><USER33> That's some brilliant work. (Y)

</comment><comment><USER34> I subscribed to your YouTube channel.

[https://youtu.be/f9EbD6iY9zI](https://youtu.be/f9EbD6iY9zI)

</comment><comment><USER35> Great work! Any idea where we may find an equivalent in Python?

<comment><USER13> Maybe this: [https://www.nayuki.io/res/cryptographic-primitives-in- plain-...](https://www.nayuki.io/res/cryptographic-primitives-in-plain- python/sha256hash.py) ; [https://www.nayuki.io/page/cryptographic-primitives- in-plain...](https://www.nayuki.io/page/cryptographic-primitives-in-plain- python)

<comment><USER35> awesome, thanks</comment></comment></comment>


Ask HN: I'm a Developer, I make good money, Where do I put it? - <AUTHOR>

I'm a young developer in mid 20's and make decent money. I am no economic or market wiz and don't have any outstanding loans or credit owed. I have a nice liquid backup that I'm comfortable with. Now where should I be putting my money?!
More info: I contribute max to my company's 401k to maximize my matching, the startup I was a part of was bought by aforementioned company so I get payouts quarterly, and my investment strategies so far have been centralized around the stock market, mostly in index funds.
Advice appreciated!
Edit: My main goal is to have generalized advice, so it doesn't just pertain to me, but to a wider audience, especially young developers who have excess income each month and want to be smart about preserving and growing their net worth intelligently. <comment><USER2> I'd stick with index funds. Personally, I'm a big fan of Vanguard funds -- they're really low expense ratio.

I'd do 90% stocks, 10% bonds, assuming you don't need the money until retirement. You could go down to 80% or up to 100% (I actually do 100%, but I also do individual stocks plus index funds).

S&P 500, a broader-market fund (3000-5000 companies in the US market, to get smaller businesses too not covered in the S&P), and some kind of global fund. Depending on how your 401k is held, you want to take that into account when allocating the rest of your money, and be careful because a lot of 401k plans have horrible funds (high expense ratios).

You might want to look at Roth IRAs too --it's a post-tax contribution, but never taxed on the gain or withdrawal. There are income limits to contribute, but there's a backdoor by contributing to an IRA (not income limited) and then converting it to a Roth.

<comment><AUTHOR> Good advice. How do you recommend contributing? That's one thing that confuses me. Let's say every month I have excess income, how do I decide when and at what interval to put that money into a given index fund? Do I just set an automatic transfer or do I try to time my investments?

EDIT: And as for as I know, IRA's have a income ceiling of $110k/yr correct?

<comment><USER2> Generally the advice is to not try to time the market; set it up to be automatic and forget about it. You're investing for (presumably) 40-60 years, so a 5% move now shouldn't be that big a deal. The bigger thing is to just keep contributing even in down markets (when you might otherwise be reluctant), because by putting in the same amount every month, you buy a larger number of shares when prices are depressed.

However, I always wait until the end of the tax year to contribute (due to laziness) or do it at the beginning of the year (because I have extra cash then).

</comment></comment></comment><comment><USER3> Index funds are great when you want to do direct deposits every month.. the don't have front-load costs so you can just set up an automatic transfer.

If you invest in ETF's which are traded like stocks then you have to contend with trading fees. The rule of thumb (I've garnered from reading blogs/ literature) is that if your portfolio is < $50,000, then set up automatic payments for all index funds.. however if you have a larger portfolio then it would be worth getting a discount brokerage account and using that to invest in ETFs. This is because having a larger portfolio means that your brokerage house will offer you a discounted trading fee. The advantage of ETFs is generally a lower management-expense ratio than index funds and more importantly you get access to things like REITs and other non-standard financial vehicles.

<comment><USER4> I wrestled with the ETF vs. Index mutual fund debate too, but I realized that pretty much each Vanguard ETF has an index fund equivalent with the same expense ratio if you invest at least $10,000 to get Admiral Shares. For example, VFINX: [https://personal.vanguard.com/us/FundsSnapshot?FundId=0040&#...](https://personal.vanguard.com/us/FundsSnapshot?FundId=0040&FundIntExt=INT).

At this point, there are only two differences between the two: 1) You can't day trade index funds 2) You can't auto invest in ETFs

Auto investing was really important to me for dollar cost averaging, so I decided to go with index funds rather than ETFs in the end.

By the way, Vanguard does have index funds for REITs: [https://personal.vanguard.com/us/funds/snapshot?FundId=0123&...](https://personal.vanguard.com/us/funds/snapshot?FundId=0123&FundIntExt=INT)

</comment></comment><comment><USER5> I put mine into new opportunities.

Mostly equipment for the day I might venture out on my own.

I have an entire music studio (hardware and software), creative studio (cintiq, nice cameras [video and still], adobe creative suite), and the start of an electrical engineering lab in my apartment. I have built a pretty good home theater in my living room (projection system), and lots of DVDs for inspiration. Lots and lots of boooooks.

It's pretty expensive, but makes me feel more secure. I'm not worried about money; I am worried about boredom. Make sure to get good insurance.

I would spend some of it curating a taste in something as well.

The most important thing you have to spend is time. Whatever you can buy to save time (without losing control over things you need control over) is a good investment.

<comment><USER6> I see a problem with this approach. In 5 years much of your equipment will be obsolete and have almost zero value on the second hand market. And if you do decide to use them, everyone will have moved on to new media/software.

<comment><USER7> Technology only becomes obsolete when it no longer solves a problem you have. It becomes irrelevant when it solves a problem you no longer have.

He is investing in stuff that will allow him to create. The only problem is if he can't create stuff faster than his competitors (not much of a problem if you have enough talent and skill) or if people suddenly become no longer interested in the stuff that he wants to make (which also seems unlikely).

<comment><USER6> I don't see anyone creating anything with an 8-track or VHS tape except as a novelty because it would be painfully slow and the quality not up to par compared with what we have now. It's only useful if he's creating stuff and earning money/fame/fulfillment or whatever rocks his boat. But as 'investment' for some future date when he decides to use them he might be better off investing the money pending that future date which brings us back to square one.

<comment><USER7> You're describing obsolete formats. Some stuff that was first created during the 8-track era is still desirable and available in other formats.

Besides, I took his comment to mean that he's buying the equipment to develop new and marketable skills.

</comment></comment></comment></comment></comment><comment><USER8> I've started putting more and more money into lendingclub. The returns have been great and you can scale how much you put in slowly. Would definitely suggest checking it out.

Ping me offline if you have any questions.

<comment><USER9> That's pretty interesting, I didn't know about those services in the U.S.

Here's an article on Mint.com which educated me on its existence:

[http://www.mint.com/blog/investing/should-you-take-the- plung...](http://www.mint.com/blog/investing/should-you-take-the-plunge-into- lending-club/)

Too bad there isn't a similar service here in Uruguay, it would absolutely kill the competition - OTOH credit risk and regulations are both a lot harder here, that's why lenders can get away with 43% annnual interest rates, which after inflation and costs mean they're getting at least 20% return on their money (I used to work for Equifax Uruguay, and they were doing extremely well).

Lending Club offers 9% according to that article, but it's lower risk.

I would suggest investing in Uruguay, but investing abroad is not for everyone, and most likely not for someone in his mid-twenties.

Angel investment or venture capital or soft loans for startups in Uruguay / Argentina would be very welcome, though :) and I'm pretty sure there's a good opportunity there.

</comment></comment><comment><USER10> Real Estate has proven profitable for me. Look for cheap multi-family units. You could live in one-side rent the other for tax benefits, or rent both sides.

Stocks, bonds. 80% stocks, 20% bonds given your age and the fact you are already saving for retirement.

If you own a home, pay extra on your mortgage. Depending on how much extra, you could pay off your home in 5-10 years versus a standard 30.

Or you could use it for advancing freelance/etc. For instance, I pick up freelance web-dev jobs and do some advertising consulting with my background in the printing industry.

One last thing, still have fun with it. It gets easy to become so focused on investing that you are living for 10 years from now, and missing living-in- the-moment.

<comment><USER11> > pay extra on your mortgage

Unless your mortgage is like 8% or more, it would be wiser to put that money in stocks for the long term.

You're borrowing money at (say) 4% to own a home. That's a great rate, why be in a hurry to pay it back if you could earn 8% per year over the next 10yrs in the stock market?

Secondly, I believe we're on the cusp of significant double digit inflation. So your debt will inflate itself away. Put that cash you have now into something that will protect against inflation, that means something that will inflate itself. Stocks aren't a bad choice for that either.

If it turns out to be economic collapse type inflation, well then you might want to spend that money on actual hard things, like firearms, ammunition, food, fuel.

Obviously if you have any credit card debt in the range of 15%, pay that off first.

</comment></comment><comment><USER12> Coming from someone who has intensively studied stocks and done very well in the market over a few years:

Invest in index funds. First max out your 401k match, then your Roth IRA, then the rest of your 401k, then open a taxable account.

I highly recommend Vanguard's LifeCycle funds. Asset allocation is one of the most important factors in determining your returns, and Vanguard will automatically adjust your asset allocation while charging very small fees.

</comment><comment><USER13> Get a copy of this book: "I will teach you to be rich" by Ramit Sethi. It answers all your questions and has information on more.

</comment><comment><USER14> How do you decide what index funds to put money into?

edit: Furthermore, how did you come to the decision to put money into index funds instead of something else?

<comment><AUTHOR> My limited reading and research into stock market investing. I liked the sound of low cost management as opposed to mutual funds, as well as history has shown index funds to do fairly well. I have chosen funds based on companies I respect that are larger percentages that the index fund allocates to, such as S&P 500.

<comment><USER15> You might want to look at index funds of different countries not just the US stock market (S&P). Then your portfolio becomes a question of how you weight countries rather than choosing stocks.

</comment></comment></comment><comment><USER16> Your you want to invest in a startup or company?

<comment><AUTHOR> I make good money, but not at any position to be an angel investor. My main goal is to grow my net worth and not lose money because it sits in a bank account somewhere and loses because of inflation

<comment><USER17> The upcoming JOBS and CROWDFUNDING acts are close to becoming law. This means that non-accredited investors will be able to invest small amounts of money in startups that advertise through funding portals. Think Kickstarter but for capital raising. I wouldn't be surprised to see Startup Index Funds that invest across many startups thus making everyone an angel investor.

</comment></comment></comment><comment><USER18> Http://www.wealthfront.com was built for you.

</comment><comment><USER19> Buy an old domain from Flippa. Hire cheap writers, put ads. Repeat.

<comment><USER20> Does this actually work? Could I email you offline about your process?</comment></comment>


How and Why Silicon Valley Gets High - <AUTHOR> https://www.nytimes.com/2018/08/23/opinion/elon-musk-burning-man-drugs-lsd.html <comment><USER2> _No one does a stupid tweet on weed like they might on alcohol," he said. "The most that happens is that you get lazy and eat badly."_

Is just one sentence illustrating the general lack of depth in this article. Already starting with the reporter, seemingly never having tried any of the mentioned drugs, rejecting the possible effects they could have on beforehand and without first-hand experience. Erm, is this reporting?

Also, just cherry-picking here as other commenters are already pointing out other mistakes, but with respect to weed: saying the most that happens is 'get lazy and eat badly' is so extremely misguided I can hardly believe anyone says that. The most that happens to me is close to a full trip on mushrooms for instance, thoughts going everywhere, creativity all over the place, extremely detailed self-reflection, sometimes profound dissociation, including visual and auditory hallucinations. Granted that depends on dosage, circumstances, tolerance, way of administration, but it does show that the 'just weed' sentiment needs to be taken with a grain of salt.

<comment><USER3> I agree that the piece is pretty vapid, but it's clearly labelled as an opinion piece so it's explicitly _not_ reporting.

<comment><USER2> Fair point, but in the first sentence the writer uses the word reporter when referring to herself so I kinda missed the opinion thing.

</comment></comment></comment><comment><USER4> This is a totally ridiculous article.

> That is why everyone he knows microdoses, saving the longer-acting drugs > like Ecstasy for the rare occasions when they want to party and relax.

I presume that "microdoses" means LSD, but who knows. MDMA is _not_ per se longer-acting than LSD or Psilocybe spp.

<comment><USER5> Doesn't LSD last like 2x as long as MDMA?

<comment><USER4> They're so different that's it's very hard to say. The LSD peak lasts 2-6 hours, depending on the dose. Effects trail off gradually after that. Marijuana intensifies them dramatically, however, and produces something like a secondary peak. And short-term memory gets totally nuked, which can be very frightening. So I don't recommend that, unless you have an experienced friend around.

Anyway, I've never stayed awake long enough (without redosing or taking some other drug) to tell when LSD effects become imperceptible. Effects are pretty much gone after 6-8 hours sleep. But the next day, or even the next week or two, you can clearly feel some effect. There's also transient tolerance.

I don't have much experience with MDMA. I was never very impressed with the visuals. I liked the body vibes, albeit too much like amphetamines. It's great for dancing and intimate sex, as everyone knows. And yes, the effects don't last for more than several hours, unless you take a lot and/or redose.

</comment></comment></comment><comment><USER6> As a coder, the only real drug I've ever really needed has been caffeine. This didn't start until recently so I'm not sure if I can attribute it to age (early 30's). My real dependence on caffeine is mainly due to staying up too late the night before (like right now, about 0200 here) and needing to get up and function with 5hrs of sleep and maintain my mental acuity for the workload I have.

To give you an idea of my caffeine intake...about 2 venti black coffees and an 8oz Red Bull.

<comment><USER7> You may know this, but you're kidding yourself if you think your mental acuity is anything near optimal on 5 hrs of sleep. I don't care what you're drinking.

<comment><USER6> It takes about an hour before I can start churning clean code and start any code reviews, so I think I'm ok. Really, it's the 3 in the afternoon feeling that is the drain for me. Alertness fades and I can't even listen to music without an occasional syntax error.

</comment></comment></comment><comment><USER8> Everyone isn't microdosing. You're not missing out. This article doesn't belong in the NYTimes.

<comment><USER9> Of course people microdosing are a minority. But that doesnt mean you are not missing out. LSD should be used as a last resort for people with treatment resistant adhd/depression, but it can be a total miracle drug. I wonder why you are so quick to bash a drug that is increasingly being shown to be effective.

</comment></comment><comment><USER10> I use to take adderall until I discovered its a false prophet and hurts way more than it helps. Marijuana would help calm my brain after a busy day of coding, but as I get older I'm looking for more ways to do better without the drugs.

</comment><comment><USER11> Gwern did a blind experiment with microdosing and didn't find any effects.

[https://www.gwern.net/LSD-microdosing](https://www.gwern.net/LSD-microdosing)

<comment><USER12> [https://link.springer.com/article/10.1007/BF01965761](https://link.springer.com/article/10.1007/BF01965761)

Roland Fischer did an experiment in the 70s and found that students on lsd were able to identify parallel lines more accurately.

Iirc in gwerns experiment he dosed every day, and lsd tolerance builds pretty fast.

</comment></comment><comment><USER13> Must be make sh*t up day.

</comment><comment><USER14> This is a rather flat article that doesn't go into the whole thing properly. And it has a rather anti drugs hint to it, if anyone wants to know some more about drugs from users/expert, who have a normal constructive conversation, i'd recommend this: [https://www.youtube.com/watch?v=HM8WDZIhs3M](https://www.youtube.com/watch?v=HM8WDZIhs3M)

<comment><USER15> Agreed, I was hoping for something a bit more substantive. The following podcast episode with Cole Marta is what turned me on to learning more about research into Ketamine and MDMA.

[http://www.duncantrussell.com/episodes/2016/9/14/dr-cole- mar...](http://www.duncantrussell.com/episodes/2016/9/14/dr-cole-marta)

<comment><USER14> Thanks for sharing, I'll look into this one as well. And researching these drugs is rather interesting, there has only been very limited papers due to bans on active substances.

Also channels like: [https://www.youtube.com/channel/UCvRQKXtIGcK1yEnQ4Te8hWQ](https://www.youtube.com/channel/UCvRQKXtIGcK1yEnQ4Te8hWQ) are interesting to see people take these substances, but still everyone can have different effects from the same thing.

</comment></comment></comment><comment><USER16> I've never done drugs or even tobacco, but Steve Jobs claimed dropping acid changes your perspective on reality and was a big factor in his success. That gives me pause.

<comment><USER17> It can also trigger undiagnosed mental conditions like schizophrenia.

<comment><USER18> I would think it's self-evident that chemically (forcibly) modifying your perspective and the timbre of your subjective/emotional experience, a change that without chemical assistance would be slow, difficult to achieve, and often impossible, would not be entirely safe. But, safety isn't everything.

</comment></comment></comment><comment><USER19> Not that many people take drugs in Silicon Valley...at least not most devs I know.</comment>


Silicon Valley Could Get Pass in Democrats' Antitrust Crusade - <AUTHOR> http://www.bloomberg.com/politics/articles/2016-07-20/silicon-valley-could-get-pass-in-democrats-antitrust-crusade <comment><USER2> I'm glad to see antitrust enforcement in the Democrats' platform, but surprised that Warren is naming Google, Apple, and Amazon as prime examples. Comcast/TWC/SBC^H^H^HAT&T/Verizon seem like a much bigger problem.

The only thing that needs to be done about Amazon is to deal with the sales tax problem: either an interstate sales tax, or make Amazon pay state sales tax for every state they ship to.

</comment><comment><AUTHOR> Crony Capitalism at its best. Make threats, then watch the donations roll in.</comment>


Patent trolls have cost innovators half a trillion dollars - <AUTHOR> http://arstechnica.com/tech-policy/news/2011/09/study-patent-trolls-have-cost-innovators-half-a-trillion-bucks.ars

<comment><USER2> I imagine a lot of patent trolls (e.g. Intellectual Ventures) just read this headline and interpreted it as:

      Patent sector profits rise to half a trillion.

The This American Life piece on patent trolls[1] (Which I am sure a lot of you listened to) was certainly eye opening, but one take-away was the huge investments that companies like IV have coming in from 3rd parties that expect serious returns.

From what I would tell, IV operates a lot like an insurance company.

They hoard 10s of thousands of patents which they enforce through 1 of 1300 subsidiary companies and larger companies like Microsoft, Samsung, HTC, etc. can pay a monthly or yearly membership fee to IV in order to "lessen the chance of being sued by IV or one of the child companies".

Of course it is cheaper for all of them to pay their membership fees and IV enforces this behavior by violently attacking anyone that decides they don't want to pay up.

There is an implied threat[2] to not playing along.

(this isn't me postulating, the "When Patents Attack" piece covers this).

In turn, investors step in and invest billions into IV to get a cut of the growing patent market, like I might invest in a fund.

I understand financial and legal systems are complex, but what IV has created seems to me to be this dystopian-esque octopus of circular self-leveraging that is designed to be impossible to untangle.

[1] [http://www.thisamericanlife.org/radio- archives/episode/441/w...](http://www.thisamericanlife.org/radio- archives/episode/441/when-patents-attack)

[2] <http://en.wikipedia.org/wiki/Extortion>

<comment><USER3> If you read my article, you'll see that's not what the study finds. They estimate that less than 10 percent of the wealth lost by defendants goes to patent trolls. The rest is destroyed.

<comment><USER4> Some people are willing to steal money directly. A dollar lost is a dollar gained. They make me mad.

There is quite another type, alive and well in our political and legal system, that have no problem stealing or ruining thousands for a few dollars gain for themselves. I well and truly wish these folks hadn't been born.

I feel as soon as humanity grows out of the stage where this kind of behavior is tolerated, we'll be well on our way to the utopia that most of us hope for. Once you nip this impulse in the bud, it won't matter if the systems are socialist, capitalist or whatever, they'll probably work just dandy. _This is why we can't have nice things_.

</comment></comment></comment><comment><USER5> _the patent system is actually becoming a net disincentive to innovation, especially software. We hope Congress and the Supreme Court are paying attention._

Don't blame the Supreme Court. They were paying attention 39 years ago with Gottschalk v. Benson.

<http://supreme.justia.com/us/409/63/case.html>

They reluctantly outlawed patents on software for general-purpose digital computers. I say reluctantly, because they really thought Congress should be addressing the question.

"The technological problems tendered in the many briefs before us [Footnote 7] indicate to us that considered action by the Congress is needed."

Confusingly, they were overruled by a lower court (Federal Circuit: In re. Alappat, State Street Bank & Trust v. Signature Financial Group). More on this at <http://ourdoings.com/ourdoings-startup/2011-07-28>

One interesting note in all this is that even in 1972 they knew that it was impossible to expect the patent office to rigorously review software patents. Gottschalk v. Benson quotes the President's Commission on the Patent System as follows:

"The Patent Office now cannot examine applications for programs because of a lack of a classification technique and the requisite search files. Even if these were available, reliable searches would not be feasible or economic because of the tremendous volume of prior art being generated. Without this search, the patenting of programs would be tantamount to mere registration, and the presumption of validity would be all but nonexistent."

</comment><comment><AUTHOR> "... We hope Congress and the Supreme Court are paying attention ..."

Instead of hope just contact your representative: <http://www.usa.gov/Contact/Elected.shtml>

We have enough people on HN to pull it off.

<comment><USER6> Also: <https://www.popvox.com/bills/us/112/s968>

and

<https://www.popvox.com/bills/us/112/s23>

</comment></comment><comment><USER7> I rarely do this any more, because I consciously assume that an expert knows more about their field than I do, unless I am certain of specific facts. (And, perversely, I _want_ this article to be true, because I loathe the patent system in its current incarnation and I think it is a serious problem for our society.) That aside, there were a few things from this that didn't make sense to me:

> _The theory is simple: a company's stock price represents the stock market's > best estimation of the company's value._

This is contrary to all of the very little bit that I understand of the stock market. Investors attempt to find companies which are undervalued, and invest in them; by definition, that would mean that the market is not accurately estimating the company's value. A company's "real value", however you care to measure that, might be some kind of attractor in the market graph, but that's about the best I'd give it. Not that I know anything about this stuff.

> _If the company's stock drops by, say, two percent in the days after a > lawsuit is filed, then the market thinks the lawsuit will cost the company > two percent of its market capitalization._

I am more certain of four problems here. One, that companies can take a stock hit for a variety of reasons, all, some, or none of which may be related to a patent issue. Two, although I can't be arsed to find an example at the moment, I'd wager a fair amount that there have been no shortage of data points where a company's stock market value _rises_ , or stays level, in correlation with a patent issue. Three, "the market" doesn't "think". The market is simply an abstract construct composed of a huge number of individuals following individual goals and algorithms. Anthropomorphisation of complex systems often leads to faulty conclusions -- like using those systems to evaluate the value of individual elements. And fourth, since we can't accurately tie the company's value to its stock price in the first place, then concluding that a two-percent loss of stock price represents a two-percent loss of the company's fortunes is erroneous.

> _But with a large sample of companies, these random factors should mostly > cancel each other out..._

And I am _very_ certain that this is an error. Why "should" these random factors cancel out? Have there been any studies finding that they do, or are there any lemmas in statistics that supports this? Aren't the accumulation of errors in statistics usually represented as minima and maxima values, i.e., "we think the value could be here, but it could be as low as there or as high as there..."?

I like the conclusions but I'm uncertain of the claims.

<comment><USER8> _> > The theory is simple: a company's stock price represents the stock market's best estimation of the company's value.

>This is contrary to all of the very little bit that I understand of the stock market. Investors attempt to find companies which are undervalued, and invest in them; by definition, that would mean that the market is not accurately estimating the company's value. A company's "real value", however you care to measure that, might be some kind of attractor in the market graph, but that's about the best I'd give it. Not that I know anything about this stuff._

It's a tautology that the value of something is defined by what people are willing to pay for it. When the markets are open, shares of a large company are changing hands hundreds to thousands of times per minute. It sounds like you are suggesting that a company has some kind of "real value" that's divorced from its current selling price -- if so, how would one determine what that is?

The efficient market hypothesis (which most pros believe is accurate, at least in its weakest form) tells us that it's not possible to pick stocks that are "undervalued." The EMH dictates that all information relevant to the value of a company is incorporated in the price, so it's not possible for any one investor to rationally discern that a particular stock is undervalued.

</comment></comment><comment><USER9> It doesn't look like they attempted to figure out how many firms were simply never started, so the costs may be much higher.

</comment><comment><USER10> And there is the cost to the public itself, for the courts and such, which the article did not mention.

Maybe the Government should change the law and require all patent disputes settled via mediation before anything can even go to court.

</comment><comment><USER11> There's a linked article ([http://arstechnica.com/old/content/2008/07/book- review-7-08....](http://arstechnica.com/old/content/2008/07/book- review-7-08.ars/4)) and at one point it asks why Bill Gates appears to support patents, given how bad they seem to be for large non-pharma / chemical firms. My guess is, big companies don't want to argue against patents, because that would create an even worse PR storm when they sue their competitors for patent infringements, and could possibly give competitors some kind of protection through Estoppel (I don't know, and I'm not a lawyer, but I'd imagine there might be some kind of legal risk to talking down patents then trying to enforce them).

<comment><USER12> That's probably true, and it's also not clear that patents are a net loss for large established companies. Sure they have to pay off or fight the trolls, but they can use questionable patents themselves to shut down competitors, as we're seeing now with Apple and Microsoft trying to kill Android. It's the same principle as Walmart supporting minimum wage increases or Mattel supporting more extensive product testing regulations.

<comment><USER13> "they can use questionable patents themselves to shut down competitors"

Particularly small competitors, who cannot afford to go into a legal battle with a large multinational. Android is kind of a special case in that Google has a warchest of patents and a lot of money. Most companies would be forced to simply roll over because of the expense of five years of legal proceedings.

<comment><USER14> Google did not have a warchest of patents until they purchased Motorola's mobile division.

<comment><USER15> Which is interesting because until then they managed without. When they needed to create a warchest they had the cash to do it and it didn't think long. It probably wasn't a bad strategy to wait until the last minute to start buying patents. Sure they might have overpaid compared to what they would have paid years ago, yet back then they needed the money to grow, now they have enough for patents.

</comment></comment></comment></comment></comment><comment><USER16> I like the way $500 billion in losses to others translates to $7.6 billion in revenue to the trolls and far less than that to the hapless inventors they claim to represent.

Similarly, five hundred dollars in losses to the power company translates into fifty bucks at the recycling center for stolen wire. I see no moral difference.

</comment><comment><USER17> Patent trolls are not new and have been around for as long as capitalism has. They are an essential and useful function of the market. The only reason they've come to light is that the industry moves so quickly now and the legal system around patents does not.

</comment><comment><USER18> Trolls? Still?

There are a million definitions for 'patent troll,' and all of them stink, capturing some good activity along with the bad.

The problem is the number of junk patents out there (obvious, prior art, etc.).

<comment><USER19> The article defines them: "patent trolls ("non-practicing entity" is the clinical term)".

<comment><USER18> If NPEs are trolls, that implies 'lacking starting capital' is trollish. Small company locked out of an industry? Troll.

Robert Kearns pitched his wiper system to Ford and Chevy, but they preferred to build it without paying him. "NPE = troll" means he was the villain. (He should have, what, kept his invention secret until he built a rival car company?)

There are several other definitions of 'troll.' Lawyers who own patents. Groups who buy patents from others. All of these catch some sheep with the goats. (I'm leaving these as an exercise for the reader.)

It's far more direct to attack patents rather than people. Attack the patents which are obvious or prior art.

As a bonus to this approach, it smacks less of a sort of blind bigotry against the poor, lawyers, or investors. (Even if you do hate one of those groups, attacking the problematic patents directly affords a way of being discrete about it.)

</comment></comment></comment><comment><USER20> Our patent system is FUBAR.</comment>