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 9y ago · link · parent

I have similar experience but I'm not so quick to say I'm back to PHP. "Use the best tool for the job" is the way I think about it.

PHP is great for marketing websites that don't need a lot of javascript.

But Node.js still wins for javascript heavy web apps. This is because you can write a js validator that will run on the client-side and server-side. Sometimes this is called Isomorphic JS (or Universal JS).

For example, this app[0] shows how to render React on the server and the client with shared props.

That being said, my personal website[1] still runs PHP and I'm glad I haven't taken on all the build dependencies of a modern web app just to host a simple blog.

[0]: https://github.com/styfle/react-server-example-tsx

[1]: https://www.ceriously.com/blog/

comment 9y ago · link · parent

What was your experience upgrading a dotnet-core app?

We had a couple experiments at my company but going from 1.0 to 1.1 had breaking changes so we couldn’t upgrade easily.

comment 9y ago · link · parent

The problem is the implementation, not the feature.

The postMessage API provides a safer way for Windows/Tabs to communicate.

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

comment 9y ago · link · parent

Agreed. This is one of the things people hate about type systems is fighting with them saying "I know better".

This example is quite interesting because javascript itself does not provide a way to check the type of an array, unlike a primitive. This is likely due to the fact that an empty array doesn't really have a type for it's items yet.

Here is an example where typescript can infer the type using the `typeof` runtime check but provide compile time checking.

https://www.typescriptlang.org/play/index.html#src=function%...

comment 9y ago · link · parent

This would be great!

I’m actually dealing with this right now with a project[0] that was forked from an unmaintained repo that wouldn’t accept any pull requests.

[0]: https://github.com/styfle/geoslack

comment 9y ago · link · parent

> Drag/drop list reordering, pan/zoom image cropper

I'm curious, were these implemented using a 3rd party library or developed in-house?

comment 9y ago · link · parent

Did anyone's website or web app break because of this change in Chrome 56?

I ask because the article lists a couple things that could break such as drag 'n drop but I have not noticed anything breaking in my experience.

comment 9y ago · link · parent

Here is my example with React + TypeScript + Webpack

https://github.com/styfle/react-server-example-tsx

comment 9y ago · link · parent

It’s great to see the new LTS land on Halloween!

I wrote about Shipping ES Modules[0] if anyone is interested. Or just checkout the code on GitHub[1].

[0]: https://hackernoon.com/es6-modules-today-with-typescript-229...

[1]: https://github.com/styfle/copee

comment 9y ago · link · parent

Woohoo! It’s great to see the new LTS land on Halloween!

I wrote about Shipping ES Modules[0] if anyone is interested. Or just checkout the code on GitHub[1].

[0]: https://hackernoon.com/es6-modules-today-with-typescript-229...

[1]: https://github.com/styfle/copee

comment 9y ago · link · parent

I'm a fan of React + TypeScript :)

I have boilerplate repo[0] that demonstrates using server-side rendering (SSR) with React.

[0]: https://github.com/styfle/react-server-example-tsx

402.

Node.js 8 Moves into Long-Term Support, Node.js 9 Becomes Current Release Line(medium.com ↗)

211 points · by styfle · 9y ago · 81 comments

comment 9y ago · link · parent

I thought HTTP2 was born out of the experimental SPDY protocol which was used in the wild for quite some time, maybe 5 years. I think SPDY was released around 2010.

HTTP2 is like the good parts of SPDY and what was learned over that time period (I think).

comment 9y ago · link · parent

That's odd because I seem to recall that I switched to Chrome from Firefox shortly after Chrome was released because it shipped with Dev Tools circa 2009.

I mean 5 years ago, Chrome added debugging Web Workers[0] so clearly Chrome Dev Tools were already quite mature by 2012.

[0]: https://blog.chromium.org/2012/04/debugging-web-workers-with...

comment 9y ago · link · parent

I believe stage 4 requires an actual implementation in a browser so it’s not surprising to see a feature ship before Stage 4.

comment 9y ago · link · parent

I actually like how it currently works because it doesn’t matter if Chrome 32 didn’t support feature X because no one is using it. The boxes are sized by their current usage and aligned based on the stable version.

It’s a perfect chart to show your boss when someone complains about Firefox 4 not working. Clearly that person missed a few updates :)

That being said, I would like a year on each column for the occurrences when time/year is relevant. Currently I just Show All.

comment 9y ago · link · parent

The first snippet calls robot.jump() every loop. The second doesn’t not.

comment 9y ago · link · parent

Would it be possible to write a service that connects twitter into a mastodon instance so that mastodon users can follow twitter users? I’m thiking outloud here but besides scale, are there any other drawbacks?

comment 9y ago · link · parent

From what I've heard, Samsung Internet Browser is trying to lead the way with WebVR (Virtual Reality).

https://webvr.rocks/samsung_internet

comment 9y ago · link · parent

MDN didn't do a good job of advertising itself as a wiki. It wasn't until recently that you could login with a GitHub account.

When you google "can i use flexbox", caniuse.com comes up but MDN does not.

The other thing missing from MDN, is that caniuse.com shows browser support as a percentage. Now I know I'm safe to use flexbox since its supported by 97.74% of browsers in the wild.

When a new feature comes out, I add it to both MDN and caniuse. It would be great if these two could be integrated as well.

comment 9y ago · link · parent

For some reason, the theme/colors were a bit of a shock to my eyes. I can't explain why...maybe because it was my first time seeing it.

Compare these two pages:

https://devdocs.io/javascript/global_objects/array/entries

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

I think the blue "sections" on devdocs are really <h3> so they are not sections at all and it throws me off.

comment 9y ago · link · parent

I am working on a tool[0] to record a video of a website or web app. Instead of A/B testing, I am using it to capture Repro Steps.

[0]: https://github.com/styfle/magnemite

comment 9y ago · link · parent

This would have been try a couple years ago, but every Mandrill user has a MailChimp account since the merger.

comment 9y ago · link · parent

There were similar feature articles about security.txt and humans.txt on Hacker News in the past.

Someone create an issue[0] to see if these could be merged into one standard.

[0]: https://github.com/mozilla/contribute.json/issues/79

415.

Contribute.json – like package.json for websites(contributejson.org ↗)

4 points · by styfle · 9y ago · 1 comment

416.

ES6 Modules Today with TypeScript(medium.com ↗)

1 points · by styfle · 9y ago · discuss

comment 9y ago · link · parent

I assumed Microsoft EdgeML was related to Microsoft Edge browser...it is not. It sounds like and “edge device” refers to an IoT device.

comment 9y ago · link · parent

Could be used to generate automated code coverage in headless mode?

comment 9y ago · link · parent

I was concerned that it would be difficult to use the new `--strictFunctionTypes` flag due to all the 3rd party typings not conforming to this flag. However, sandersn fixed[0] many popular packages not long after this feature landed.

I've been using TypeScript for 5 years[1] and it has been a great experience,! Even these (occasional) "breaking" changes are relatively easy to navigate.

[0]: https://github.com/Microsoft/TypeScript/pull/18654#issuecomm...

[1]: https://blogs.msdn.microsoft.com/typescript/2017/10/02/types...

420.

VS Code issues related to “icon”(github.com ↗)

2 points · by styfle · 9y ago · 1 comment

1
131415
18