Better HN
topnewbestaskshowjobs
Log inSign up

styfle

1,940 karma · joined Sep 20, 2016 (10y ago) · 531 submissions

https://styfle.dev

[ my public key: https://keybase.io/styfle; my proof: https://keybase.io/styfle/sigs/k5Jx2P3fJ9JOZsHyU2TLChLetDsvmL2mHK7wJMj-nKk ]

Submissions

91.

TypeScript 4.5 Beta(devblogs.microsoft.com ↗)

3 points · by styfle · 5y ago · 1 comment

92.

TypeScript 4.4(devblogs.microsoft.com ↗)

5 points · by styfle · 5y ago · 1 comment

comment 5y ago · link · parent

Parody aside, we actually need something like this.

Here’s a non-exhaustive list of breaking changes to the web platform:

https://github.com/styfle/breaking-changes-web

comment 5y ago · link · parent

Also see TextEncoder or WebAssembly which shows the version support of Node.js and others

https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder...

https://developer.mozilla.org/en-US/docs/WebAssembly#browser...

comment 5y ago · link · parent

I learned the power of a fake tweet last month[1].

Some backstory: I found that Twitter’s use of emoji is not immediately recognizable because they render their own image rather than relying on the native implementation. So I tweeted what appeared to be Twitter hash flags for hex colors by using square emoji colors. I went to bed after it got 1 or 2 likes. And in the morning I found that hundreds of people thought it was real.

[1] https://twitter.com/styfle/status/1401002863787192322?s=20

comment 5y ago · link · parent

A somewhat counterpoint to the first example in the article:

I created a Reddit account (11 years ago) without an email address and forgot the password.

Now there is no way to reset the password and recover the account.

I never bothered to create a new account so I just stopped using Reddit in most cases.

comment 5y ago · link · parent

Looks like they’re using feature detection and Firefox is missing that feature

https://github.com/webcompat/web-bugs/issues/76550#issuecomm...

comment 5y ago · link · parent

https://www.youtube.com/watch?v=ANikp1R8zX8

comment 5y ago · link · parent

Indeed, there are a lot of options out there https://github.com/styfle/awesome-online-ide

100.

TypeScript 4.3(devblogs.microsoft.com ↗)

10 points · by styfle · 5y ago · discuss

comment 5y ago · link · parent

fetch() is a notable web feature missing from Node.js core

comment 5y ago · link · parent

It would be great to move robots.txt to .well-known instead.

Same with favicons, although you can specify an arbitrary path to most favicons using index.html

comment 5y ago · link · parent

Yes, but it will likely show up as punycode in the browser address bar, for example http://xn--938h.to

And sadly, you can't post emoji on hackernews comments :(

comment 5y ago · link · parent

I was kinda confused at first to see the top suggestions were all Doctor’s Offices. Then I figured it out.

https://twitter.com/styfle/status/1358186671007760385

comment 5y ago · link · parent

This parody website is probably close to 10 years old so it’s a bit outdated.

But the premise still stands, just needs more feature checkboxes :)

comment 5y ago · link · parent

Video games that didn’t need software updates :)

comment 6y ago · link · parent

The order seems arbitrary, why not put the best options first?

If I were building a static website in 2020, I would expect my provider to not only host the static files, but build from source when I `git push`. That narrows down the list to 5 so I would put those at the top.

Second, I would expect the products that don't come with static hosting out of the box to be at the bottom of the list.

For example, number 4 says "Heroku is free for non-commercial apps. It doesn’t offer hosting for static websites out-of-the-box but need some hacky tricks".

Disclaimer: I work for Vercel, one of the static hosts in this list :)

108.

Songwhip – Share a music link to every platform(songwhip.com ↗)

153 points · by styfle · 6y ago · 46 comments

comment 6y ago · link · parent

That’s a great example!

You looked at the size and determined that it might not be worth bringing on a small dependency when you can implement it yourself (or rather use String.prototype.padStart).

It’s not just size alone but size of transitive dependencies.

Both examples you gave don’t have any dependencies (the publish size matches the install size).

Take a look at some popular dependencies like request or jest and notice the number of transitive dependencies.

https://packagephobia.com/result?p=request

https://packagephobia.com/result?p=jest

comment 6y ago · link · parent

There’s a lot of different metrics to look at when determining if one should install a dependency or not.

One such metric I found to be missing for npm dependencies was the install size, which is why I created https://packagephobia.com

We need more tools to help make this decision because its easy to add a new dependency but its often hard to remove a dependency.

comment 6y ago · link · parent

I used to play Worms Armageddon back in the day and picked up Worms 3D a few years later. The 2D version always had a special place in my heart but I must have lost the CD-ROM over the years.

It’s exciting to see this game is still worked on, I’ll have to dust off the old PC and try it out again!

I noticed there is a version for iOS—will iOS also get the update?

comment 6y ago · link · parent

Question for the author:

Why does Rust destructuring require the struct name? The example uses:

  let Person { name, city } = person;
This seems a little verbose since I would expect the type system to know that person is of type Person already.

Is this because destructuring syntax is trying to be compatible with the pattern matching syntax?

comment 6y ago · link · parent

Using stdin also solves the problem of special characters in argv being interpreted by the shell. Even something like a hyphen might be mistaken for a flag.

cli add user1 -passWord

cli add user2 passw*

etc

comment 6y ago · link · parent

You can add a `Cache-Control` response header with `s-maxage` in your Serverless Function to cache at the Edge.

https://vercel.com/docs/v2/serverless-functions/edge-caching

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ca...

115.

Should Stimulus Checks Last Forever?(thethreadweekly.com ↗)

1 points · by styfle · 6y ago · discuss

comment 6y ago · link · parent

I’ll have to find something wrong with HOCON and add it to my list :)

https://twitter.com/styfle/status/1237182409239658500

comment 6y ago · link · parent

What you described here is basically how Next.js works :)

The blog post mentions the 3 APIs that make this possible:

- getStaticProps (Static Generation): Fetch data at build-time.

- getStaticPaths (Static Generation): Specify dynamic routes to prerender based on data.

- getServerSideProps (Server-Side Rendering): Fetch data on each request.

comment 6y ago · link · parent

Also don’t forget about JS Map which is ordered

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

119.

Typing Objects in TypeScript(2ality.com ↗)

2 points · by styfle · 6y ago · discuss

comment 6y ago · link · parent

A couple things I noticed when comparing to webpack:

1. This doesn’t bundle

2. This doesn’t support source maps

12345
18