HNHacker News
TopNewBestAskShowJobs

ricksharp

256 karma · joined June 15, 2017

https://ricklove.me
submissionscomments
ricksharp··on An Honest Review of Gatsby
When I found gatsby, I immediately stripped everything out and hooked into the dynamic createPages so I could just give it a list of components to turn into pages. (I thought the graphQL parts were horribly bloated boilerplate, so I didn’t want to even touch it.)

It also works well with async import for runtime loading of components.

Other then that, I don’t use any of it’s features. (I found a markdown react on npm and manually move the images to the public folder and use normal image tags.)

I’m quite happy with the runtime results, and develop re-render works pretty quickly. However, the production build takes about 30 secs which is pretty slow and I also ran into “out of heap memory“ on node during build and had to increase node’s heap size.

So I’m sure I’ll end up needing to build my own SSR eventually, but it should be easy to do.

ricksharp··on Samsung Ads – Demand-Side Platform
I have 2 TLC Roku TVs. One I use as a large monitor for my desktop. I’m very happy with them. I mostly watch Netflix, YouTube, and Amazon Prime video and have never noticed the ads on the navigation screen (since they are just tv shows).

I’m planning to get YouTube premium to remove ads there and vote with my money for an ad-free Internet.

I never imagined that they would be spying on the actual video output, but I would consider that not only a major violation of privacy but corporate espionage (because I use it for work).

I don’t believe that is the case, but I’ll be researching if that is being done.

ricksharp··on Reasons Revealed for the Brain’s Elastic Sense of Time
That’s awesome. I learned more about DNA in 5 mins than all my biology classes.
ricksharp··on The Failed Promise of Web Components
Here’s a decent list through time for JavaScript frameworks: http://todomvc.com/

For my own experience with things that were specifically MVC or MVVM:

In C#: Asp.net MVC, WPF (with/without Prism)

In Typescript: Knockout, Angular 2.0+ (I guess it wasn’t mvc really - I disliked it for other reasons)

React (with hooks) on the other hand is the embodiment of a pure Functional Programming UI.

I can literally write a component with a single import and a single function.

For every reason functional patterns beats OOP patterns, react beats mvc - and achieves true separation of concerns (feature aligned concerns).

ricksharp··on The High Privacy Cost of a “Free” Website
millionshort.com - I don't see that as an option.

wiby.me - looks like this is a 1990s website generator

ricksharp··on The Failed Promise of Web Components
Ah, makes sense on the stripe component.

I did notice that for some components I need to show a loading indicator while they are loading async (for a slow connection).

Thanks for letting me know!

ricksharp··on The Failed Promise of Web Components
Good idea :) I’ll add that.

I guess I’ll know if someone finds the Bitcoin.

Update: I added a few more nerd lore passwords - thanks for the idea!

ricksharp··on The Failed Promise of Web Components
It’s not a static site.

Type “dir” in the header (or other activities in the “cool-stuff” post).

Moreover, I can build anything I want very quickly - with great engineering - and still get performance comparable to a static site.

ricksharp··on The Failed Promise of Web Components
MVC - because spending 50% Of your time looking for the other file with the almost identical name is fun... wait now we need the view... nope back to the controller again... why can’t these files be next to each other...

It’s ironic that this is done in the name of “Separation of concerns“ -

You know what separates concerns: having everything that affects this component - in one place. That’s true separation of concerns.

I’ve worked in multiple frameworks in multiple languages and nothing does it better than modern react (especially with webhooks).

ricksharp··on The High Privacy Cost of a “Free” Website
I'm just going to leave this here:

http://www.themostamazingwebsiteontheinternet.com/

ricksharp··on The High Privacy Cost of a “Free” Website
I don't think the web-rings ever worked well, but maybe there exist a search engine for the little guy:

- Adfree Only (No Ads or Tracking Allowed on the domain)

ricksharp··on The Failed Promise of Web Components
Ok, here it is https://ricklove.me

Here is a post that explains some of the content that is interesting: https://ricklove.me/cool-stuff

Let me know how it does on a slow connection.

ricksharp··on The Failed Promise of Web Components
In lighthouse, I see a score of 100 performance and time to interactive at 1.8secs.

This is comparable to hacker news home page (which is purely static), but my first contentful paint was slightly faster (probably because my site is slightly smaller).

Both sites were about 4 times faster (TTI) than google home page and typescript home page.

ricksharp··on The Failed Promise of Web Components
My website which is entirely built in react (and uses Gatsby).

Takes 4kb to full page render (1 file - static only - JavaScript disabled).

That’s smaller than most any html+css especially if using some css library.

Of course once that is loaded and if JavaScript is enabled, then it will start to load interactive stuff and prefetch (which is around 100kb - but I have a lot of interactive stuff - including a zork style adventure Easter egg in the site header).

ricksharp··on The High Privacy Cost of a “Free” Website
I remember an internet without ads. We had alot of "in construction" gifs though :)
ricksharp··on The High Privacy Cost of a “Free” Website
wordpress.com is often used by internet marketers because it has loads of tools for that and content management.

But that doesn't mean it has to include all the tracking plugins.

Also, there are plenty of site builders like wix.com, squarespace, etc. that can launch a site in minutes.

Using those tools doesn't necessarily imply ads or tracking. (But I would agree it would be impossible to know for most uses if it did have tracking in the background.)

And yes, I wrote my first web page in the 90s, but that doesn't mean we don't have nicer tools that anyone can use now. (Wow, I'm trying to remember how I figured that out as a teenager. I think my dial-up isp had a tool on their website and instructions for creating a path and uploading your own web files.)

ricksharp··on The High Privacy Cost of a “Free” Website
Exactly.

I’ll pay to host my own content - but if it’s just static content - that’s essentially zero.

Also, I’ll make tools to make it easy for anyone to create their own self-hosted website.

No ads needed.

And if I make a product or service of value, I’ll sell it - without ads.

Word of mouth recommendations are great. Somebody can make a review or a blog post about it because they like it.

Others can find it when they search for it - because they need it.

Think about it - how many things/services do you buy because you saw an ad versus because you had a need and sought out the best product that could fulfill it.

In fact, I think it would be awesome if a new search engine could step up - ad free web search (excludes any website that uses ads).

ricksharp··on The High Privacy Cost of a “Free” Website
Good enough for what?

My site is just a blog with a bunch of prototypes and games.

My goal is an ad-free Internet.

If the client is worried about surveillance then it would be up to them to use an appropriate vpn - but if a three letter agency cares about who reads my blog, I‘ll probably have a lot more problems then a visitor.

ricksharp··on The High Privacy Cost of a “Free” Website
I just used blacklight with my own site and found a perfect score.

My site costs me essentially nothing* to host (netlify and aws serverless technologies that are mostly under the free tier).

*My highest cost so far was when I was debugging serverless websockets and had a bug in my code that caused constant messages between the browser clients I was testing (which I left open for a day when I started work). That cost me $7 dollars.

I have my own service-hosted playground using little more than git and a few cli tools.

We need to rebuild the ad-free web.

ricksharp··on Show HN: A SQL database implemented purely in TypeScript type annotations
That looks pretty nice. I’ll have to check that out.
ricksharp··on Social Cooling (2017)
And even if we aren’t more Vulcan then the norm, we like to think we are :)
ricksharp··on Social Cooling (2017)
Interesting.

So instead of an ad blocker, we could have background bots in our browser visiting random urls and clicking on every ad in sight (of course it would need to mimic human UI input).

I wonder what affect that would have.

ricksharp··on Show HN: A SQL database implemented purely in TypeScript type annotations
Wow, when I read this earlier, I was dismissive (because I am really happy with typescript). But reading through the comparison - it seems to have many of the great parts I like in Typescript.

Then, I noticed it has the pipe operator! I'm going to be giving this a try.

ricksharp··on Show HN: A SQL database implemented purely in TypeScript type annotations
Yes, I only meant similar in the sense that it attempts to use typescript types as the primary source for the definition of the database schema.

I agree my wording could have been better.

ricksharp··on Show HN: A SQL database implemented purely in TypeScript type annotations
Awesome!

I was just searching for that and all I could find were old github issues saying it was working as intended.

Thank you!

ricksharp··on Show HN: A SQL database implemented purely in TypeScript type annotations
You can import a json document directly into typescript and the entire document is a readonly constant type of the entire json object literal.

I've used this with a template JSON document that has an instance of all possible types in the runtime json.

Sometimes you might have to loosen the type slightly, but it works great for a quick start.

ricksharp··on Show HN: A SQL database implemented purely in TypeScript type annotations
Not exactly (there is no duplication), a string constant in typescript is it's own type:

  const sql = 'SELECT ...';
  type SQL = typeof sql; 
  // type SQL = "SELECT ..."
ricksharp··on Show HN: A SQL database implemented purely in TypeScript type annotations
Cool, I never knew what that was called. Thanks!
ricksharp··on Show HN: A SQL database implemented purely in TypeScript type annotations
Object.keys() is always frustrating.

Also, the array access not returning an optional type (I wish there was a strict option for that) often gets me.

We need a middle ground: “TypeStrict“ that can clean up some of the edge cases.

If you need strict integers, you can create your own fake type:

type Int32 = number & {__type:'Int32'};

I do this with strings sometime when I want a string subtype that can’t be accidentally assigned by a normal string.

ricksharp··on Show HN: A SQL database implemented purely in TypeScript type annotations
Thinking about this more. I think this project has some promising practical uses when combined with code generation from the typescript ast (which is what my project does).

Since the type system can parse the SQL strings, then it becomes possible to include those strings as a source for the ast. Then the code generator can use the typescript parser to parse all the types and the sql. From that it can generate all the required code to create the runtime queries.

I don’t like ORMs because they make it very difficult to write complex queries (and my own attempt did not solve that very well - I still had to manually type any complex queries). However, if this could essentially allow writing a complex query in raw sql and have it type-checked at code-time, it becomes easier to use. Then the code generator would convert that into a type-safe runtime library which solves 2 problems: 1. The poor editor performance of the type system inferring so many nested types. 2. Actually having a runtime that executes the queries.

The outstanding problem would be migrations...

Anyway, this is certainly a thought provoking project.

← PreviousPage 2 of 6Next →