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

This doesn’t render very well on mobile. I wish the Git team would write their docs as a .md so GitHub could render as HTML with word wrap in all its glory.

362.

Object rest/spread: not yet Stage 4 in TC39(github.com ↗)

1 points · by styfle · 9y ago · discuss

comment 9y ago · link · parent

This is great! TypeScript (another Microsoft language) did something similar not long ago but used a flag to opt-in to strict null checks. It seems this setting is strongly encouraged.

Looking at the examples, the compiler can determine if not null by reading the if statement like so

    if (str != null)
But what about if the code uses the following?

    if (!string.IsNullOrEmpty(str))
TypeScript has a way to solve this using the `is` keyword but I'm not sure if this is introduced in C# yet.

comment 9y ago · link · parent

As a dev, that was my favorite part of Code Sponsor: being able to see which repos were doing well and on what days impressions/clicks increased.

I could see a correlation between posting to Hacker News and the amount of impressions/clicks for that day.

comment 9y ago · link · parent

Do you have a link to this feature/mode?

comment 9y ago · link · parent

How does Glitch compare to Heroku or ZEIT Now?

367.

Type test scripts for TypeScript testing(blog.acolyer.org ↗)

2 points · by styfle · 9y ago · discuss

comment 9y ago · link · parent

As a developer, I find containers much easier to update, especially in scenarios where you need to update to a new patch with a fix for OpenSSL.

The solution, is to bump the version in the dockerfile, rebuild, and deploy.

This is especially useful when you want to test the latest version before deployment or when you need to deploy to many machines.

Conversely, using a VM and trying to patch it means the updates are not part of the normal development process so you would need to spin up a new VM to test before patching production VMs.

Now sysadmins and developers think differently so this is purely subjective (note I’m a dev), so surely there are merits to the other approach, but I prefer the container approach.

comment 9y ago · link · parent

Snyke posted “The State of Open Source Security” not long ago

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

comment 9y ago · link · parent

There was a fund raising website written 15 years ago that a team I was on was responsible for (I never actually worked on it).

There were fraudulent credit card donations for $1 which became really obvious when the zip code was garbage.

The “solution” was to disabled the credit card page until the month of the fund raising event when it was enabled again in hopes of the scammers would not try during that month.

comment 9y ago · link · parent

I think you just gave me an idea for a weekend project :)

comment 9y ago · link · parent

What about Amazon Prime Video? That still isn't on the Apple TV but is available on every other device.

comment 9y ago · link · parent

Where can I find the formatting syntax for Hacker News? Clearly it's not markdown :P

comment 9y ago · link · parent

> then when React has loaded, replace it with a React component

What you described is basically `hydrate` which is how to enable React event handlers like onClick after a server-side render.

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

comment 9y ago · link · parent

I believe you can stream the <head> while still waiting for any react components to render like so:

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

376.

BountySource suspended from GitHub(github.com ↗)

67 points · by styfle · 9y ago · 51 comments

comment 9y ago · link · parent

Could the performance be improved if you call React.createFactory() and then stream the factory call like this[0] code?

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

comment 9y ago · link · parent

I use a combination of both template string literals and React SSR streaming.

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

comment 9y ago · link · parent

I've used a CSA before and it was nice to get random assortments of fruits/vegetables that I otherwise wouldn't buy. But the convenience of just shopping online for what you want is lost.

That's why my friend started Market Wagon[0] which acts as a middle-man between farmers who have crops and people who want to buy the food. The experience is like shopping on Amazon but you're buying local.

[0]: https://marketwagon.com

comment 9y ago · link · parent

Also TypeScript and Turbo Pascal and Delphi.

> He currently works for Microsoft as the lead architect of C# and core developer on TypeScript.

https://en.wikipedia.org/wiki/Anders_Hejlsberg

comment 9y ago · link · parent

I have one project[1] with 0% CTR.

I have another project[2] with 3% CTR.

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

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

Both have less than 200 impressions total.

comment 9y ago · link · parent

I've been using Code Sponsor for a month or two now.

The best way to describe it is something between a generic Google Ads network and a invite-only Carbon Ads network. And it's really meant to go in your README.md file.

So this results in a few things:

1. Broker. Sponsors can select which repos/languages/tech/etc they want to advertise to and developers can select which sponsors are relevant to them.

2. Transparent. Developers can see which ads a sponsor will display and how much they pay per click (usually $0.40). The ads are usually just text with a couple emoji that fit well into the README.md design and are loaded as an svg.

3. Limited. Sponsors pay a fixed amount so if a repo is really popular and displaying ads, it may stop displaying after the money is paid out to the developers. This means you may just get a generic ad that recommends using Code Sponsor near the end of the month, like this repo: https://github.com/styfle/geoslack

Caveats: it seems the Code Sponsor is not open source :(

comment 9y ago · link · parent

Google has produced APIs that only shipped in Chrome...SPDY, NaCl, WebSQL, chrome extension APIs.

I think the difference is Google wants other browsers to implement those APIs by providing a path to standardization.

SPDY was replaced with HTTP2.

NaCl was replaced with Web Assembly.

WebSQL was replaced with IndexedDB.

Chrome extensions kind of became Web Extensions.

comment 9y ago · link · parent

> you look back at the code and wonder "what in the hell was the author thinking?" (and then you git blame and it’s you… because it’s always you)

I love this quote. I think I've heard it said a little differently but it is most definitely true if you work anywhere more than a year.

385.

The State of Open Source Security(snyk.io ↗)

1 points · by styfle · 9y ago · discuss

comment 9y ago · link · parent

A couple questions with regards to the SQL -> ES:

1. Does it sync deltas or do you have to import the whole table each time?

2. Does it listen for changes to a table or does it require a manual invocation?

3. Can you explain more about the algorithm/implementation?

comment 9y ago · link · parent

It was super interesting to hear how React was moving from team to team internally before it was finally open sourced.

comment 9y ago · link · parent

My first thought is any SSMS specific plugins such as RedGate SQL Search and version control.

comment 9y ago · link · parent

Are there historical records for number of "critical" vulnerabilities found in browsers? It would be interesting to compare the number for different browsers.

Update Maybe this:

http://www.cvedetails.com/product/15031/Google-Chrome.html?v...

http://www.cvedetails.com/product/9900/Microsoft-Internet-Ex...

comment 9y ago · link · parent

> The same people might be scourging for hours on ubuntuforums because Ubuntu filled up their /boot partition with obsolete kernels and won't boot anymore. But its still perceived as "stable".

This is totally unacceptable. I started using ubuntu in production thinking it was "stable". After 6 months, the server wouldn't boot because of this reason. I don't think I ever manually installed updates. It just updated itself and broke itself.

1
121314
18