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

comment 7y ago · link · parent

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

152.

Quicklink – Faster subsequent page-loads by prefetching links during idle time(github.com ↗)

2 points · by styfle · 7y ago · discuss

comment 7y ago · link · parent

> 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 :(

154.

GitLens 9.0.0 – VS Code Extension(gitlens.amod.io ↗)

2 points · by styfle · 8y ago · discuss

comment 8y ago · link · parent

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.

comment 8y ago · link · parent

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

comment 8y ago · link · parent

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?

comment 8y ago · link · parent

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

comment 8y ago · link · parent

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

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

comment 8y ago · link · parent

That’s a good point. The Pi is really meant for quick prototypes or teaching students, not enterprise work.

comment 8y ago · link · parent

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 :)

162.

Slack and Stack Overflow for Teams(stackoverflow.com ↗)

2 points · by styfle · 8y ago · discuss

comment 8y ago · link · parent

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

comment 8y ago · link · parent

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.

comment 8y ago · link · parent

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

comment 8y ago · link · parent

I have a whole list of Desktop JS platforms here: https://github.com/styfle/awesome-desktop-js

167.

Carlo – Web rendering surface for Node applications(github.com ↗)

177 points · by styfle · 8y ago · 92 comments

168.

Who contributes the best code to open source projects?(lgtm.com ↗)

11 points · by styfle · 8y ago · discuss

comment 8y ago · link · parent

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

170.

Desktop Progressive Web Apps(developers.google.com ↗)

1 points · by styfle · 8y ago · discuss

171.

Omi.js – Render Views Using JSX, Web Components, Proxy, Path Updating(omijs.org ↗)

2 points · by styfle · 8y ago · discuss

comment 8y ago · link · parent

"One of the oldest and most ubiquitous food seasonings might be killing you. Find out after this commercial break..."

comment 8y ago · link · parent

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...

comment 8y ago · link · parent

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.

comment 8y ago · link · parent

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

comment 8y ago · link · parent

As someone who hasn't used Go, it sounds like GOPATH is very similar to an Eclipse IDE Workspace.

177.

Awesome VS Code – List of Visual Studio Code Packages and Resources(github.com ↗)

2 points · by styfle · 8y ago · discuss

comment 8y ago · link · parent

I started getting friend suggestions from facebook very regularly about 6 months ago. They show up as notifications and there are typically more suggestions then actual direct communication notifications. I used to see things like: you were tagged in photo, friend commented on your post, etc. Now all I see is: you might know John Johnson. I don't even see a setting to disable these suggestions. So it's not surprising to me how people end up with 1500 friends.

comment 8y ago · link · parent

Yes, this appears to be the date google shows next to the search results.

Every time I write a blog post, I submit manually via webmaster tools "Fetch as Google" so that it gets indexed immediately. That way, the date google shows matches the date I published the article.

1
567
18