Better HN
topnewbestaskshowjobs
Log inSign up

sktrdie

3,485 karma · joined Jul 9, 2008 (18y ago) · 1,064 submissions

http://twitter.com/lmatteis
Submissions

comment 2mo ago · link · parent

Why do we need any job? Check "Bullshit Jobs" by David Graeber. Not saying being a mathematician is a bullshit-kinda job, but there have been so many made up positions way before this AI-era. In that sense AI isn't changing much.

comment 2mo ago · link · parent

> The problem is that once you’ve seen that style 20 times it starts to irritate just from the sheer repetition.

But that's how the algorithm behind LLMs functions. It simply cannot create something unique by stepping out of its existing knowledge base. It has to refurbish existing data, because, well, that's all it has.

One might argue that a human artist also is refurbishing data, made out of experiences and knowledge it has gather throughout its life.

The difference I think comes from something extra (that we're entirely dumb-founded on) that the human mind can contemplate and extrapolate from, to be able to generate something truly unique and different.

I hope (and believe) this extra magical capacity is what will not allow AI (at least in its current statistical form) to be able to match us in terms of creativity & uniqueness.

comment 8mo ago · link · parent

So? Economy is entertainment. When crypto was hype, billions were made and burned from building whatever entertaining thing around that. Now it's AI's turn. Billions will be made and burned. Economy is just a fun game. Let's have fun. The idea that everything needs to be "useful" is highly subjective. What is truly useful? Is it food? Shelter? Medicine?

comment 8mo ago · link · parent

You still care about end result though: in your case, the end result being the puzzled you solved.

AI can make that process still enjoyable. For instance I had to build a very intricate cache handler for Next.js from scratch that worked in a very specific way by serializing JSON in chunks (instead of JSON.parse it all in memory). I knew the theory, but the API details and the other annoyances always made it daunting for me.

With AI I was able to thinker more about the theory of the problem and less about the technical implementation which made the process much more fun and doable.

Perhaps we're just climbing the ladder of abstraction: in the early days people were building their own garbage collection mechanisms, their own binary search algorithms, etc. Once we started using libraries, we had to find the fun in some higher level.

Perhaps in the future the fun will be about solving puzzles within the realm of requirement definitions and all the intricacies that stem from that.

comment 11mo ago · link · parent

What about Call of Duty?

comment 11mo ago · link · parent

I've never personally used Bun. I use node.js I guess. What makes Bun fundamentally better at AI than, say, bundling a node.js app that can run anywhere?

If the answer is performance, how does Bun achieve things quicker than Node?

comment 12mo ago · link · parent

How's this different from... a database? Most modern dbs come with auth and some gui. I guess if you need real-time updates this is cool

comment 1y ago · link · parent

I'll try to review the article with comments to make this a more critical discussion instead of just hates on Next.js (I'm just a Next.js developers for years now and am quite happy with it - but I do agree it requires some deeper understanding)

> React is now using the words "server" and "client" to refer to a very specific things, ignoring their existing definitions. This would be fine, except Client components can run on the backend too

It was hard discussions to come up for naming of these things in the beginning. Even calling them "backend" and "frontend" (as they suggest in article) wasn't clear about their behavior semantics. I understand the naming annoyances but it's a complex issue that requires lots more thought than just "ah we should've called it like this"

> …This results in awkwardly small server components that only do data fetching and then have a client component that contains a mostly-static version of the page.

> // HydrationBoundary is a client component that passes JSON > // data from the React server to the client component. return <HydrationBoundary state={dehydrate(queryClient)}> <ClientPage /> </HydrationBoundary>;

It seems they're combining Next's native hydration mechanism with TenStacks (another framework) in order to more easily fetch in the browser?

To follow on their WebSocket example where they need to update data of a user card state when a Websocket connection sends data. I don't see what would be the issue here to just use a WebSocket library inside a client component. I imagine it's something you'd have to do to in any other framework, so I don't understand what problem Next.js caused here.

What they're doing screams like a hack and probably the source their issues in this section.

> Being logged in affects the homepage, which is infuriating because the client literally has everything needed to display the page instantly

I'm not sure I understand this part. They mention their app is not static but instead is fully dynamic. Then, how would they avoid NOT showing a loading state in between pages?

> One form of loading state that cannot be represented with the App Router is having a page such as a page like a git project's issue page, and clicking on a user name to navigate to their profile page. With loading.tsx, the entire page is a skeleton, but when modeling these queries with TanStack Query it is possible to show the username and avatar instantly while the user's bio and repositories are fetched in. Server components don't support this form of navigation because the data is only available in rendered components, so it must be re-fetched.

You can use third-party libs to achieve this idea of reusing information from page to another. Example of this is motion's AnimatePresence which allows smooth transitions between 2 react states. Another possibility (of reusing data from an earlier page) is to integrate directly into Next.js new view transitions api: https://view-transition-example.vercel.app/blog <- notice how clicking on a post shows the title immediately

> At work, we just make our loading.tsx files contain the useQuery calls and show a skeleton. This is because when Next.js loads the actual Server Component, no matter what, the entire page re-mounts. No VDOM diffing here, meaning all hooks (useState) will reset slightly after the request completes. I tried to reproduce a simple case where I was begging Next.js to just update the existing DOM and preserve state, but it just doesn't. Thankfully, the time the blank RSC call takes is short enough.

This seems like an artefact of the first issue: trying to combing two different hydration systems that are not really meant to work together?

> Fetching layouts in isolation is a cute idea, but it ends up being silly because it also means that any data fetching has to be re-done per layout. You can't share a QueryClient; instead, you must rely on their monkey-patched fetch to cache the same GET request like they promise.

Perhaps the author is missing how React cache works (https://react.dev/reference/react/cache) and how it can be used within next.js to cache fetches _PER TREE RENDER_ to avoid entirely this problem

> This solution doubles the size of the initial HTML payload. Except it's worse, because the RSC payload includes JSON quoted in JS string literals, which format is much less efficient than HTML. While it seems to compress fine with brotli and render fast in the browser, this is wasteful. With the hydration pattern, at least the data locally could be re-used for interactivity and other pages.

Yes sending data twice is an architecture hurdle required for hydration to work. The idea of reusing that data in other pages was discussed before via things like AnimatePresence.

What's important to note here is that the RSC payload exists at the bottom of the HTML. Since HTML is streamed by default this won't impact Time-to-first-Render. Again, other frameworks need to do this as well (in other ways but still, it needs to happen)

I totally understand the author's frustrations. Next.js isn't perfect, and I also have lots of issues with it. Namely I dislike their intercept/parallel mechanism and setting up ISR/PPR is a nightmare. I just felt like the need to address some of their comments so maybe it can help them?

As a first I would get rid of tanstack since it's fighting against Next.js architecture.

Or yeah just move entirely elsewhere :)

comment 1y ago · link · parent

I mean, if you want to be an artist, you really can. I've lived off a van for almost a year... just for adventure. Traveled close to beach where I could shower. I spent literally close to nothing day-to-day. I could remake my weekly expenses just working at a few restaurants in the weekend, and enjoy the beach the rest of the week surfing.

Now that I'm back to my normal office coding job, I feel like I'm actually saving less money because I have rent, and general city life to spend money on. It's all about the comforts one is used to.

The story of artists not having enough money is probably about people that are used to too many comforts. I've seen people complain they didn't have money to go by, whilst living in an apartment close to a densely populated city and having a car... get rid of those comforts if you want to make it!

comment 1y ago · link · parent

> then why am I paying for a senior ?

Because they know how to talk to the AI. That's literally the skill that differentiates seniors from juniors at this point. And a skill that you gain only by knowing about the problem space and having banged your head at it multiple times.

comment 1y ago · link · parent

Cool but how does it compare to something like subreddits? There are still biased moderators behind the scene just like subreddits. Seems to not have the upvoting/downvoting side of it which imo is crucial to democratize the entire thing.

I think upvoting/downvoting is a crucial aspect to news/information/knowledge. But we've been doing it with just numbers all along. Why not experiment with weights or more complex voting methods? Ex: my reputation is divided in categories - I'm more an expert in history then politics hence my vote towards historical subjects have more weights. Feels like that's the next big step for news. Instead of just another centralized aggregator?

No offense to the cool system and website though

comment 1y ago · link · parent

Next.js hydrates only client components - so effectively it's doing island architecture. And it's react end to end. How's that different from Astro? Stating things like "Components without the complexity" doesn't really mean anything unless you do some comparisons?

comment 1y ago · link · parent

I was inspired by Bret's articles at a young age. Made be think of software more from a visual perspective. Even re-reading this article now, after many years, inspires me to think of possible ways we can improve building visual systems - thinking more from a designer's perspective; rather than an engineering one. And how far ahead his thinking was.

Even his imaginary "snapshot/example driven design tool" (described at the end of the article) seems quite intriguing and thought provoking. I wonder if with AI being so easily accessible nowadays, a retake on this tool can provide something that is actually usable and useful to people?

comment 1y ago · link · parent

Will this whole idea of writing more server-side logic pay off?

I'm not sure. It felt like we were moving towards dumb backends that sync automatically towards frontends that would contain most logic. Things like https://localfirstweb.dev/ or https://electric-sql.com/ felt like the future

Writing more server code (as quoting/react-server-components are suggesting) will increase the surface area where errors can occur. Limiting that to either just the server/client feels like a much saner approach

comment 1y ago · link · parent

I've been a webdev for 20 years, and I didn't understand what any of that post meant.

comment 1y ago · link · parent

How did they get a hold of the enron.com domain?

comment 1y ago · link · parent

To me this is what all AI feels like. People want "hard to make things" because they feel special and unordinary. If anybody with a prompt can do it, it ain't gonna sell

comment 2y ago · link · parent

I agree with many of the points, but how do they relate with the article at hand?

comment 2y ago · link · parent

https://www.sciencedaily.com/releases/2020/03/200309221340.h...

comment 2y ago · link · parent

Apart from food packaging, one great way to easily ingest plastic is to use synthetic clothing. Just a basic rubbing of a synthetic sleeve on your nose causes thousands of polyester particles to release in thin air, readily breathable.

Not just clothing, but also bedding is a huge issue. With pillows, mattresses and towels mostly made of synthetic fibers.

My usual instinct is: try rubbing the synthetic material; if it releases thousands of particles in thin air, stay away from it

comment 2y ago · link · parent

My biggest beef with this is: why humanly shaped? Our shape is the outcome of evolutionary survival in an environment that is very much different from... a household?

comment 2y ago · link · parent

I’d trust way more that group of experts to make a decision for me.

Otherwise we’d get Walmarts all over the place

comment 2y ago · link · parent

Isn’t it simple economics? There’s no incentives

Perhaps entertainment might fund it? Like a reality show on the moon? Still doubt it will finance billions

comment 2y ago · link · parent

If out of all the species that ever existed, we're the only ones that understand our own mortality, it makes me wonder what else, by sheer probability, we have yet to understand.

comment 2y ago · link · parent

Cool but doesn't the Apple Watch have all kinds of sensors to make it work against your wrist? Putting in this case will kind of remove the point of all those nifty hardware gadgets.

26.

Evolu, local-first SQLite syncing platform using TypeScript and React(evolu.dev ↗)

2 points · by sktrdie · 2y ago · discuss

comment 2y ago · link · parent

I think a large benefit to "DB in browser" is about the whole "local-first" software movement. A good overview is written here https://sqlsync.dev/posts/stop-building-databases/

The essence of the approach is that a large majority of FE apps have constructed quite complex caching layers to improve performance over "querying backend data" - take a look at things like Next.js or React Query <- as the post above mentions, they're essentially rebuilding databases. So instead this approach just moves the db to the browser, along with a powerful syncing layer.

I think it's an approach that deserves more attention, especially to improve DX where we end up writing a whole lot of database-related logic on clients. Mind as well then just use a database on the client as well

28.

Creating Daylight (The Website)(basement.studio ↗)

2 points · by sktrdie · 2y ago · discuss

12345
36