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 CSS-Powered 3D Engine (2014)
There is one project I know of that is bringing webrender to desktop apps: https://news.ycombinator.com/item?id=18312983
styfle··on Y Combinator Resources for Developers
The source code says the data is only valid for 10 weeks. If Google releases a new version of Chrome every 6 weeks, then a user could never skip a single version of Chrome without becoming vulnerable.

That doesn't seem like it's enough time. I would expect one year or at least 6 months.

styfle··on Show HN: DeskGap – Like Electron, but uses the system webview
Thanks for making DeskGap!

I have been watching these types of tools (desktop js frameworks) and I'm glad the DeskGap docs[0] explain the difference between existing tools like Electrino and Quark although the most notable difference is that those two projects are no longer maintained.

I just added DeskGap to my list of Awesome Desktop JS frameworks[1].

[0]: https://deskgap.com/#there-are-already-similar-attempts-elec...

[1]: https://github.com/styfle/awesome-desktop-js

styfle··on Ask HN: Developers aged 50, how have you gotten around age discrimination?
The Midwest has a lot of age 50+ devs. Java and ASP.NET rule the land and it’s almost all B2B like hospitals and other large orgs that don’t want bleeding edge tech. For example, trying to find React devs in the Midwest proved difficult.
styfle··on A Primer on Type Systems
I have to post this parody lightning talk because Gary Bernhardt is hilarious and the slides demonstrate some of the (exaggerated) confusion around static vs dynamic types.

https://www.destroyallsoftware.com/talks/useing-youre-types-...

styfle··on Porting 30K lines of code from Flow to TypeScript
This links to the same code as my post. You might just have an older bookmark. See this PR[0].

[0]: https://github.com/agentcooper/typescript-play/pull/24

styfle··on Porting 30K lines of code from Flow to TypeScript
> unfortunately when you share a TypeScript playground link, those settings are not saved in the URL. For this reason, you have to manually set them when you open any TypeScript playground link from this article.

There is a much better typescript playground[0] that supports all options in the permalink, for example see this link[1] that has `removeComments` enabled.

[0]: https://typescript-play.js.org

[1]: https://typescript-play.js.org/?removeComments=true#code/PTA...

styfle··on Generate your document site in 3 seconds
Also, this is very similar to ZEIT Now[1]

[1]: https://zeit.co/now

styfle··on Doom 3 in WebAssembly
NaCl was not cross platform and not standardized the same way that Web Assembly is.
styfle··on Show HN: Vector Logo Zone – SVG logos for your readme or credits page
It looks like that xlink syntax was deprecated in SVG 2 but it still works in most browsers.

https://css-tricks.com/on-xlinkhref-being-deprecated-in-svg/

styfle··on ECMAScript modules in Node.js: the new plan
Is this documented anywhere?
styfle··on V8 release v7.2
Google search results will be rendered useless.

"V8 release v8"

At least when it's spelled out like this, they always use capital V8 for the engine and a lowercase v8 for the version.

I can imagine the verbal V8/v8 confusion probably forces everyone to say "version 8"

styfle··on Serverless Computing: One Step Forward, Two Steps Back
Another alternative is ZEIT Now 2.0 which is supposed to be cloud-agnostic serverless. It puts a few more layers of abstractions between the developer and the cloud providers.

https://zeit.co/blog/now-2

styfle··on Grafana Loki – Like Prometheus, but for logs
> once [a reboot] occurs, constant rebalance happening because it puts the load to the rest of system and eventually bring them down, all around

I have this same problem with a 3 node cluster, no Kubernetes. This was using Elasticsearch 2.3 and it worked for a year or two and then all of a sudden, any network interruptions would cause the thing to get split brain and all indices would go red. It would take 8+ hours to go back to green and usually required a reboot of all servers or else it would never recover.

It was happening often enough that the decision was just run a single ES node since the total data was only 25GB :(

styfle··on TypeScript in 5 minutes
Great question!

No, you don't need to inherit or implement which is one of the great features of TypeScript!

In this example, the `greeter` function accepts any object that has a `firstName` and `lastName` property defined, regardless of what the object/type is called. No need for inheritance.

In fact, the `Person` interface is not even emitted in the JS output because interfaces are only used at compile time, not at run time.

styfle··on You should never spend $825K on a domain – but here’s why I’m glad I did
This is a great list! Twitch.tv is #31 according to Alexa!

One thing to point out, is that 4 of those are country-specific TLDs (or the historic .net) which have been around for awhile so they might still have some familiarity.

It starts to look very unfamiliar to non-tech people when URLs have a long TLD, such as:

example.blog

example.website

example.foundation

example.engineering

example.international

styfle··on You should never spend $825K on a domain – but here’s why I’m glad I did
Most users are able to identify example.com as a URL but not example.gq because they have been trained for years to look for .com

This training will take some more time for other TLDs and will take more time to become normal.

Even now, companies that start with a strange TLD but grow large enough will eventually buy the .com which repeats the cycle that only .com is legit for commercial services.

Anyone know of popular companies in the USA that don’t use .com?

styfle··on Demoboard
Code Sandbox is great for general purpose coding. I have a whole list of Online IDEs that you might be interested in comparing.

https://github.com/styfle/awesome-online-ide

styfle··on Sousveillance
Also see The Circle[1] movie for a glimpse into a reality where everything is recorded.

[1]: https://www.imdb.com/title/tt4287320/

styfle··on A cheaper, smaller Raspberry Pi 3 is now available
That’s a good point. The Pi is really meant for quick prototypes or teaching students, not enterprise work.
styfle··on The Power of Web Components
For those following along at home, the reason why you don't need HTML Imports once JS Templates and Modules exist is because HTML Imports are not usable without JS! So you can implement a more elegant solution yourself with a couple lines.

Let's assume you want to use 3 different HTML templates on a page (the html content doesn't matter much for this example).

Here's the example usage of HTML Templates from html5rocks.com:

  <script>
    function handleLoad(e) {
      console.log('Loaded import: ' + e.target.href);
    }
    function handleError(e) {
      console.log('Error loading import: ' + e.target.href);
    }
  </script>
  <link
    rel="import"
    href="example1.html"
    onload="handleLoad(event)"
    onerror="handleError(event)"
  />
  <link
    rel="import"
    href="example2.html"
    onload="handleLoad(event)"
    onerror="handleError(event)"
  />
  <link
    rel="import"
    href="example3.html"
    onload="handleLoad(event)"
    onerror="handleError(event)"
  />
  <script>
    function importHtml(selector) {
      var content = document.querySelector(selector).import;
      var el = content.querySelector('.warning');
      document.body.appendChild(el.cloneNode(true));
    }
    
    importHtml('link[href="example1.html"]');
    importHtml('link[href="example2.html"]');
    importHtml('link[href="example3.html"]');
  </script>
Now let's compare the same feature with ES6 Modules and Templates using a `helper.js` file.

  export async function importHtml(url) {
    try {
      let res = await fetch(url);
      let html = await res.text();
      let template = document.createElement('template');
      template.innerHTML = html;
      let el = template.content.querySelector('.warning');
      document.body.appendChild(el.cloneNode(true));
    } catch (e) {
      console.log(`Error fetching html: ${url}`);
    }
  }
Then we can import the modules on the page in a very clean way...no HTML Imports spec here.

  <script type="module">
    import { importHtml } from './helper.js';
    importHtml('example1.html');
    importHtml('example2.html');
    importHtml('example3.html');
  </script>
My point is that you don't need HTML imports and you'll have to use JS even with HTML imports so just use JS all the way :)
styfle··on Show HN: Smallest Node.js Docker images
That was my first thought too but scratch-node is a bit smaller than alpine-node. I created a ticket to see if alpine-node could get smaller: https://github.com/mhart/alpine-node/issues/133
styfle··on A 100k Botnet Turns Home Routers to Email Spammers
Not to mention the idea that you might Bork your router during installation and have no internet therefore no way to install the old fw version.
styfle··on Leapfrogging the IDE
What if all the features of an IDE existed for online coding tools? I actually maintain a list of these tools[0] and several of them are very close to the native experience.

In particular, CodeSandbox has come a long way by basically running VS Code in the browser.

[0]: https://github.com/styfle/awesome-online-ide

styfle··on Carlo – Web rendering surface for Node applications
I have a whole list of Desktop JS platforms here: https://github.com/styfle/awesome-desktop-js
styfle··on Introducing Hooks
Decorators haven't been adopted because they are not specced or shipped.

There is no decorator feature in the ES7 (ES2016) spec.

However, there is a proposal for decorators that it is not finalized yet.

https://github.com/tc39/proposal-decorators

styfle··on Microplastics found in 90 percent of table salt
"One of the oldest and most ubiquitous food seasonings might be killing you. Find out after this commercial break..."
styfle··on RawGit is now in a sunset phase and will soon shut down
I am having a similar problem with npm. I guess people decided to upload warez to npm and it's affecting my tool that reads from npm. This is why we can't have nice things :(

https://github.com/styfle/packagephobia/issues/141#issuecomm...

styfle··on Why open office design makes people less productive
The worst is when someone walks over and starts talking but no one knows who they are talking to: Just me? My boss? Everyone? Is it rude if I don’t look and continue to focus on my work?

Everything can be heard and seen in an open office so I think it makes communication worse.

styfle··on Delete Your Account Now: A Conversation with Jaron Lanier
I think some mastodon[0] servers are run this way: users pay a small portion to cover hosting costs and there is usually some topic that brings that server/community together. However, you are not limited to a single mastodon community because they are federated (similar to email where gmail users can communicate with hotmail users).

[0]: https://github.com/tootsuite/mastodon

← PreviousPage 5 of 15Next →