skysight-inc/HackerNews huggingface dataset:
I haven’t written a post-mortem but I’ll take a quick stab here, and post a more polished post-mortem on my website later.

My demo is Star Traveler, which placed #1 in the 2D Canvas category. The GitHub repository is here: https://github.com/depp/demo-traveler

Source code: https://github.com/depp/demo-traveler/blob/trunk/src.js

What I like about 1K demos is that you can make them in a relatively short amount of time—something like a week or so, without taking time off. After a week of work I was happy with what I had written, out of space, and had diminishing returns when I attempted to reduce the size. By comparison, JS13K can be a lot more work.

The first thing I did was set up a development environment which would reload in the browser every time I saved changes. The development page showed the number of bytes left at the top of the screen and put the exact, submission-ready code in an iframe. Saving changes would trigger everything to be minified and packed again. Packing is done with Terser -> RegPack. No potentially incompatible techniques like method hashing were used, but that’s probably because I didn’t see a size improvement when I tried them. There are some custom transformations on the code during compilation, mostly so I could have ESLint watch my back.

The demo itself has three parts to it. Most of the objects are rendered by callback functions, and there’s a big array of callback functions in back-to-front order. The function closures contain any generated data necessary for drawing the data. The parts are:

1. Mountains and clouds, which are just simple midpoint displacement fractals. The mountains were flipped upside down and stretched to make clouds. Various techniques for generating a fractal were tried, a recursive functional approach ended up being the smallest.

2. Stars, which are just randomly placed in 3D space and randomly resized each frame to make them twinkle.

3. The planet, which is drawn separately. The submitted version draws it over the clouds. This was fixed in the repo, but not re-submitted.

Notes on technique:

- Path2D turns out to be a very efficient way to specify a path for a Canvas. It uses an SVG path string to specify the path, which is more compact than using .moveTo() and .lineTo(). There is room for improvement.

- The 'color' function is a beast, it lets you represent an RGB color as a 3-digit number from 111 to 999, and calculate things like gradients. There was a lot of tweaking to get colors that I liked.

- Did a lot of inlining and un-inlining of functions at the end. For example, if a function f(x) is defined like f(x) = 4 * ..., then you can move the constant out of the function, or into the function from the call sites.

- Checked the minified code to see how functions were being emitted. If they were emitted as (x) => { a; b; }, I would try to change the code so they could be emitted as (x) => (a,b).

- RegPack gives you limited space savings for repetitive code, so use it.

- If you need local variables, just add arguments to your function and use those.
I’m so confused. Didn’t I just read several submissions where almost every person was cheering the government threatening to become involved in Big Tech?
Yeah I agree with you. My post was written in haste and yours captures the intent much better. Thanks!
>We are not an M&A (mergers and acquisitions) country,” Trump said.

What? Can anyone parse this?
Your argument is exactly what Michael Green talks about [1]. The talk I linked is from January of this year and he basically predicted the exact crash we saw in February. Individual stocks were going up and down tracking the S&P 500 exactly, based on no news or any kind of information, just that they were in the S&P index. The price of the stock did not reflect the company's financials or outlook. We're about to see this when Tesla gets added to the S&P 500 - funds will be required to purchase Tesla stock at any price.

The reason that I'm personally an index fund skeptic is that I like to understand what I'm invested in. If you look through the S&P 500 members, there's dozens to hundreds of companies basically no one's ever heard of, and companies that I personally don't see a big future in. If index funds didn't exist, why would I take $100 of Fifth Third Bancorp or TechnipFMC when I could get $100 of Apple or Slack instead? The former is what you get when you invest in the S&P, while the latter are products I use everyday, and I feel that I understand how they make money.

If you hang around investing subreddits long enough, it starts to feel like everyone's parroting the same 5 sentences about expense ratios and diversification, with no analysis or critical thought put into what the actual investments are.

[1] https://youtu.be/x-rJciYZmi0
I was under the impression that the US does not allow you to revoke your citizenship purely for tax reasons.
The worst political development over the last decade is the very wide embracing of corporate censorship. It is now widely accepted that media platforms have an explicit duty to control public opinion.

In this context any large foreign media outlet becomes a threat.
This falls in line with studies that show when most people hit the upper middle class, more money doesn’t automatically equate to happier. And if someone doesn’t have a purpose beyond money, I could see more money making them less happy. “What do I do now?”
> 1. China doesn’t play with the same rules ...

> 2. They don’t allow ..., why should we let them to?

Because, as you said in your first point, we play by different rules. Do you want everyone to start playing by China's rules instead?
Entered which market? Yandex works (and has always worked) fine in the US as far as I can tell. I'm not getting your point.
> TikTok is not a national security problem, no more than Whatsapp or Telegram or Skype is a national security problem.

Yes, TikTok is potentially a national security problem. Sending a lot of citizens' personal info to an opposing super power is a national security problem. This is especially true when we are in disputes on many fronts like Taiwan, Hong Kong, islands in South China Sea

Telegram, maybe, but the founder makes it clear that he escaped from Russia, and Russia wants to imprison him(?).

Whatsapp and Skype are US companies, so they send info to US. There's not much security risk here. Their founders are US citizen or in a country that is aligned with US.

> Just because Trump says something (while providing no proof) does not make it true.

There's never proof in any geopolitical issue/scandal. At best, you have expert hearsay. Maybe CIA's opinion from wikileaks.

If we had to wait for proof for any geopolitical issue, US would probably already collapse for being incompetent long ago.

Now are you trying to say TikTok will never ever send personal info to Chinese government (if China requests)? I hope you're not. We know this isn't true.

Saying US and China having no tension against each other is just very strange; The tension is blatantly obvious for decades. I'm not sure if you aren't truly aware or you just pretend you don't know.
Read “How the elderly lose their rights” in the New Yorker.

Guardianship in the US is a travesty.

https://www.newyorker.com/magazine/2017/10/09/how-the-elderl...
I agree with your points, but in this case it was not obfuscated at all and as the article shows, not really difficult to figure out. Furthermore, this knowledge can now be shared with others.

As long as RE is legal (and even when it isn't...), people will figure things out.

We need a GDPR-sized hammer to fix this.

AFAIK, RE for interoperability (which this is absolutely an instance of) has always been and is likely to remain legal in the EU.
Ah yeah, but when you're already sitting in a boiling pot you may as well add some seasoning.
It is a classic example of "on the internet" patent,

The problem is not Peloton persay, the problem is the Patent office allowing these obvious "Thing in the real world -> On the internet" patents to pass right on through
I am okay with this... mostly because I don't think even someone/organization with the best intentions could possibly ship this without establishing this sort of clause up front.

If anything, not doing so, would make me _more_ concerned because it seems like overconfidence, or refusing to acknowledge how long it normally takes to do clinical trials on something before releasing it the public.

I know there are predatory pharmaceutical companies who would put their own profits way ahead of others... I just don't think in a global pandemic its going to be easy to intentionally lie about, or misrepresent, the effects of a cure to said pandemic. No amount of signed contracts would protect the company from the sheer volume of people marching to take their heads.
The distinction is meaningful. The language designers of Go are a small group of people with a history of innovation outside of Google who had established the context in which Go was made prior to joining Google. Just because Google signed the check, they should get credit? Go would have happened no matter who hired the team.

Google's engineering ethos has a negative effect on the products of developer labor, and it shows in their stewardship of Golang as well as all of their other products.

I know you work at Google and have been busy in this thread trying to cognitive dissonance your way around this problem, but the fact is that Google sucks at engineering and I have argued to support this point.
Cahasing Butterflies in the Days of War
A story of an autistic boy who thought butterflies were more important than wars.
I train at home on a no-name steel frame I built up myself with spares scavenged or traded at a swap-meet, sitting on a second-hand (non-digital) Kurt Kinetic resistance unit, total build cost ~ $250, excl. my own labour and home workshop.

Honestly prefer training this way to the gamified Zwift experience, there's something deeply off-putting about gluing my eyes to a screen when I'm meant to be focusing on 4x5 intervals. I have a Wahoo Kickr; I hardly ever use it.

I didn't have any prior wrench experience, this was a project in part to gain some. All I had were some Youtube videos, a copy of Leonard Zinn's The Art of Road Bike Maintenance, and some basic tools. I did, however, already know my fitting dimensions.

The bikes I race on are what you'd expect though. More expensive than my car.
I think they ended up using Phaser. I left before they actually released a game with that new stack. As mentioned below the cons are that you will need to invest more in making your tooling and it’s way harder for anyone whose not a programmer to use it. The pros were that it was very easy to work with, HTML first, and had a long enough track record to have ironed out a lot of common developer problems.

I recall our unity engineer quite liked Defold, which had an integrated builder tool, but for some reason the lead dev didn’t want to go with it.

I don’t want to be throwing shade on Play Canvas though, it’s possible if we did the same assessment today we would have gone with that engine.
I don't think the issue is that simple. For example, a Lyme disease vaccine was pulled from the market over dubious safety issues [1]:

> This panel, described by one participant as raucous and riotous [35], provided a forum for all of the stakeholders [36]. In support of the vaccine, the FDA summarized the VAERS data and concluded that the evidence did not support a causative association. The vaccine manufacturer, now GlaxoSmithKline following a corporate merger, assured the assembled parties that the LYMErix™ vaccine did not cause harm to its recipients. They reviewed the status of their phase IV post-marketing surveillance. Practising physicians spoke of vaccine efficacy by describing the dramatic reduction in Lyme disease cases in their own practices.

> Others raised concerns about the vaccine's safety. Scientists argued a potential role for genetic susceptibility and OspA-related autoimmunity in vaccine complications. Poignant presentations by several ‘vaccine victims’ described in detail their suffering. The prosecuting lawyers for the largest class action suit claimed that manufacturers suppressed reports of adverse events from the licensing trial and provided inadequate warnings to genetically susceptible individuals.

> After hearing compelling testimonies from all the interested parties, the panel concluded the benefits of LYMErix™ continued to outweigh its risks. The panel made no changes to the product's labelling or indications. However, the FDA required the manufacturer to provide more vaccine safety and efficacy data by increasing the enrolment in their ongoing phase IV trial. The LYMErix™ vaccine remained available for public use.

> Market withdrawal
> Spawned by the press coverage of vaccine risks and the ongoing litigation, vaccine sales fell off dramatically in 2001. On 26 February 2002 GlaxoSmithKline decided to withdraw LYMErix™ from the market citing poor market performance [37].

> On 9 July 2003 the pharmaceutical giant settled the class action suits with Sheller, Ludwig & Bailey as well as several other smaller law firms. The final agreement included over 1 million dollars in legal fees for the prosecuting lawyers, but provided no financial compensation to the ‘vaccine victims’. The plaintiffs’ attorneys stated that the voluntary removal of LYMErix™ from the market accomplished the main goal of the suit. Despite the settlement, the manufacturer continued to deny that LYMErix™ caused harm and indicated that the decision to settle represented a choice based on economic concerns (i.e. the desire to avoid the costs of lengthy litigation) for a product showing relatively poor performance in the market.

1. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2870557/
I'm not sure people understand the scale that vaccines work at. Right now--because we are close to wiping out polio--more people die every year from the polio vaccine than the actual disease. When you give billions of people a vaccine, even a one-in-a-million problem will still lead to thousands of deaths. It could be very hard to have wide-scale vaccines if we allowed people to sue for every death.

(Just to be clear: I am very pro-vax. Get all recommended vaccinations.)
Yep, this is good. Just trying to be general here on hn, or I'll get someone saying the other case ;)
If you want to take this kind of thing to the next level, check out Node-RED. It's a visual programming environment that's well-suited for home automation.

One of my most-used automation setups is a dust collection fat near the cat litter boxes. The basic idea is to turn the fan off, if it's on, when the cats approach, then turn it on five minutes after they leave and turn it off ten minutes later. The cats are detected using a PIR sensor hooked to an ESP8266 running ESPHome. I've also got an automation which will turn the fan on and ignore the PIR sensor for ten minutes so that I can clean the litter without breathing in a bunch of dust - this part is kicked off via an input_boolean that's exposed to HomeKit, so I can tell Siri to turn it on and it triggers a whole bunch of work.
> Stripe's founder mentioned that the internet is probably going to trend back toward "dinner party" type apps rather than "town square" type apps

Isn't that already happening in the last five years, with more and more people abandoning "public" social networks and spending much more time in private friend chat groups?
The data seems quite old (pre 2015)
You have to look at the entirety of the response over time, which we can’t judge until this is over.

If everyone ends up about the same as Sweden, then lockdowns were a mistake.
You are probably better off doing this in a tax advantaged account, or if you have a large lump sum you want to invest you can do the rebalancing by adding money over time instead of selling the winner and redistributing it to the loser.

The strategy would fail if both interest rates went up and equities went down or stayed flat. While the potential exists for an underperform condition there in a couple of years I personally suspect the fed won’t raise rates unless equities are performing spectacularly. I’m quite skeptical if their 2 year time frame, even to say we may be looking at the new normal.
They are never awarded posthumously. But my completely unreliable gut instinct is to believe that most honourees are in their 50s and 60s, and that too few people die before that age for it having a significant impact here.

Plus, of course, nominees tend to be very similar in most regards including age to the eventual winners.
As far as I can tell it's a pretty frank and accurate observation of the social failings of your engineering process. Google is soulless and trains its engineers to be soulless. Just because it's a hard truth doesn't make it less true.

The cognitive dissonance of Google employees online is unreal. You're in a cult.
that should be a temporary swing though right? once the P/E capacity normalizes to the lower interest rates appreciation should be proportional to the base rate.
> One thing that could end this is someone hacking into the databases and changing scores.

While they're at it, perhaps they can change some US senators' bank balances just for fun.
So does an equivalent increase in the share price of the underlying
Except for there being this joker called "national security" which magically allows practically anything to be ordered by the executive, because you can obviously reframe anything into a matter of national security, even short video clips of dancing teenagers.
You're too optimistic that the money will be injected in the local economy. Apple clearly doesn't know what to do with all of it
I really like WSL, but I can’t turn off cortana from running at the same time.
These things are grandfathered in.
It feels bizarre that a device playing a role in space travel has a password.

But I guess a lot of Space-X stuff surprises me that way. It’s a very consumer focused spaceflight system.
Is China a free market for non-Chinese companies?
> Just hate the fact that no Republican opposes him anymore.

Many do, few have the guts to admit it publicly. Politics is still a business after all.

As an example, The Lincoln Project is made by past and current republicans strongly opposing Trump. https://lincolnproject.us/
There was allegation of elder abuse regarding Stan Lee's last years of life. For some reason, I thought that you were talking about.

I think we remembered the same story, but can't quite place where or when it was written.
Exactly! It's so meaningless they shrugged and flipped a switch when asked to do so in a single blog post. Try that feat with any policy decision google actually does care about!
If you've been at Google for 6 years then you know that my point about the promo system is the dominate opinion held by engineers there. Not that Memegen is the best barometer but you should check that out around promo time since it does comport with the opinions of engineers I talked with in other contexts. I had thought that would be the least controversial point.

When I was there they added "Landing a product" as perf criteria as opposed to "Launching a product" and they added some lip service towards maintenance tasks being perfable which is a reflection of the problems I laid out.

I don't know you or your situation and there are always exceptions (e.g. Bram Moolenaar, of course, and others not as famous) but in my experience the more tenure an engineer had the worse they were. The best engineers I've met in my career were ex-Googlers who were only there for a few years (some of them became Xooglers while I was there).

My assertion is that generally speaking the people who stay are the ones who don't see the problems in the system because they don't have the talent, experience, or perspective OR they have other priorities in their life (raising a family) and Google makes it easier for them.

What I encountered was that many long time engineers just weren't aware of what else was out there, the advances in the state of the art, and how things could be better because they were cozily ensconced within the Google ecosystem for so long. It's an incredibly ossified environment.
I keep hearing this mostly from the conservative side when Trump got elected mostly by bypassing traditional media and using Twitter and social media.

What do you propose? More government involvement to tell tech what they can do on their own platform? Isn’t it kind of hypocritical that the anti regulation party wants regulation when it suits them?
The Peirce family are some of America’s most under appreciated mathematicians and logicians.
If you decide to invest it (in an index fund, for example SPY or IWM), I am not seeing any downside to selling cash secured puts. For example, on SPY, you could sell a short 48-dte 30-delta put (strike $312 on Sept 18) for $616 premium. If it is assigned (SPY goes below $312 on Sept 18), you will get 100 shares of SPY for $31,200 but you are no worse off than if you had bought today and also you will have reduced your cost basis to $30,584. If SPY goes up, the shares will not be assigned; pocket the $616 premium and repeat the cycle. Repeat this loop until your entire $450k is invested. This also has the advantage of spreading out your purchases, and thus dollar cost averaging them. Just a thought... I welcome any criticism of this approach :-)
> IIRC, Foreign companies need to have majority-owner Chinese partner entities to "own" business operations in China.

You recall incorrectly. You're describing the situation about 30 years ago, in the early stages of China's opening up. In the intervening time, restrictions have been dropped from most sectors (including the automotive sector - Tesla's Shanghai factory is a demonstration of this).

The Chinese market is open both to direct investment (FDI, which I mentioned above), and to imports of foreign goods. American companies have much greater penetration into the Chinese market than vice versa. It's blindingly obvious if you've been in both countries.
And what will be the retaliation? China has already banned just about every major US equivalent. It's mind numbing how many people are crying about trade reciprocity finally reaching China.
Why? To hide the fact that something is global behind mutation by reference?

"global" is a fine way to do that when you need it. Simple and says what it means.
Treating foreign media as a "national security issue" is extremely scary. This is not something that free societies do.
Tiktok is the only platform where Trump supporters aren't banned. Not to mention, (white) zoomers lean very much to the right.
Direct database access as required by the CCP
The political will to move forward is a great counterpoint to my original post, and I disagree that the USA has a lot of that. If anything the USA seems ruled by an entrenched political caste wedded deeply to old ideas and old ways of doing things and much too comfortable.

A lot of people who don't ordinarily vote R voted for Trump in the hope that at least he'd shake some things up. (I didn't, but I can't blame them all that much.) Most of them are very disappointed and won't be voting for him again, but that leaves Biden who is yet another member of that same calcified political class.

Maybe we just have to wait for them all to retire or die off. Sad, but might be true. People can continue to learn and grow as they age, but it seems like a lot of people choose not to. At some point they decide they know everything and are right about everything and they just stop there.

I disagree about India though. India has loads of talent. They have corruption and other issues but so does China and so do we. Africa is further behind but I'm bullish on it over a long (25-50 year) time frame. Values and culture wise Africa is probably a lot closer to the USA than many people would imagine... or at least that's the impression I get. Africa seems to be slowly becoming politically stable, and political instability is historically the reason Africa has remained so dysfunctional. Who wants to invest in a place where the next perennial revolution might destroy everything?
Which home device/software is running the VPN server?