HNHacker News
TopNewBestAskShowJobs

styfle

1,940 karma · joined September 20, 2016

https://styfle.dev

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

submissionscomments
styfle··on Deno 1.10 Release Notes
fetch() is a notable web feature missing from Node.js core
styfle··on Security.txt
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

styfle··on I bought 300 emoji domain names from Kazakhstan and built an email service
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 :(

styfle··on Fake_contacts: Android app to create fake phone contacts, to do data-poisoning
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

styfle··on A framework that makes things worse on purpose
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 :)

styfle··on Why are new devices dependent on the Internet but made with little forethought?
Video games that didn’t need software updates :)
styfle··on Free hosting providers for static websites in 2020
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 :)

styfle··on Dependency
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

styfle··on Dependency
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.

styfle··on Worms Armageddon 3.8
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?

styfle··on Rust for JavaScript Developers – Pattern Matching and Enums
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?

styfle··on Show HN: Tiny password manager with all data stored encrypted on your machine
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

styfle··on Show HN: Watchmespendmoney
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...

styfle··on MessagePack: like JSON, but fast and small
I’ll have to find something wrong with HOCON and add it to my list :)

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

styfle··on Next.js 9.3 – Static Site Support, 32 KB Smaller Runtime
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.

styfle··on Python dicts are now ordered
Also don’t forget about JS Map which is ordered

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

styfle··on Zwitterion: a web dev server that lets you import anything
A couple things I noticed when comparing to webpack:

1. This doesn’t bundle

2. This doesn’t support source maps

styfle··on NPM lockfiles can be a security blindspot for injecting malicious modules in PRs
I believe npm blocks publishing packages with similar names to existing packages.

https://stackoverflow.com/a/54135900/266535

styfle··on GitHub Actions is my new favorite free programming tool [video]
In this case, google cloud vision, it seems like the docs are fine. It’s the platform that’s confusing because it requires too much ceremony to get started.
styfle··on Jumping to Conclusions: When People Decide Based on Insufficient Information
Admittedly, I jumped to conclusions thinking someone finally made the Jump To Conclusions game from Office Space :D

https://youtu.be/sDEL4Ty950Q

styfle··on Zeit SWR - remote data fetching library for React Hooks
Strange, this should have been a duplicate of the previous post here: https://news.ycombinator.com/item?id=21381172
styfle··on Who Killed the Scrollbar?
On iOS, you can tap the top of the address bar to scroll to the top (I think since iOS 3.0 or so). This became 2 taps when they started hiding the address bar (one to show it, and another to invoke the "back to top" feature).

In Chrome (and probably other browsers), you can use CMD+Up to jump to the top and CMD+Down to jump to the bottom.

styfle··on TypeScript 3.7 Beta
Thats a good point. It is probably rare for proposals to change after stage 3 which is why the TypeScript team does not implement a ECMAScript feature until it reaches Stage 3.

In this case, members of the TS team were actually championing these ES proposals :)

styfle··on TypeScript 3.7 Beta
Not to be confused with `const enum` which act more like a preprocessor and emits in the value at compile time.

    const enum Directions { Up, Down, Left, Right }
    console.log(Directions.Left)
    // emits js file with console.log(2)

https://www.typescriptlang.org/docs/handbook/enums.html#cons...
styfle··on History and Effective Use of Vim
This is my philosophy with most software. I expect to get 80-90% of the way with zero configuration and then maybe for some advanced features I’ll touch the config and personalize some things.

The added benefit to becoming proficient with default configuration is that it is really easy to upgrade to a new computer and start from scratch.

And of course with vim, the benefit is the ubiquity when using ssh or docker or VMs which typically use the defaults.

styfle··on Static web – back to the roots?
Another similar approach is using “Serverless Pre-rendering” which is a fancy way to say serve stale and update in the background.

There is a demo using Notion as the “backend” which is kind of like Google Docs. I could see this being a great solution for less technical authors who only want to deal with content.

In the end, it’s like a static site but you don’t wait for a build step.

https://zeit.co/blog/serverless-pre-rendering

styfle··on Faster Smarter JavaScript Debugging in Firefox DevTools
The first three bugs you listed are related to source maps. I haven’t used Firefox in a long time but I have experienced the same behavior in Chrome and VS Code when debugging TypeScript. It turns out, there was a bug in the loader that was generating source maps. Perhaps your issue is tooling and not the browser?
styfle··on I Miss Rails
That’s a fascinating tool! Now I realize I need to use more enjoyable words when discussing TypeScript :)
styfle··on Nova
This reminds me of Fluid from 2007

https://news.ycombinator.com/item?id=93381

https://fluidapp.com

styfle··on K3s – Lightweight Kubernetes
I'm guessing they sliced the "8" down the middle which makes a "3"
← PreviousPage 4 of 15Next →