HackerTrans
TopNewTrendsCommentsPastAskShowJobs

sktrdie

no profile record

comments

sktrdie
·قبل 4 أشهر·discuss
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?
sktrdie
·قبل 4 أشهر·discuss
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.
sktrdie
·قبل 7 أشهر·discuss
What about Call of Duty?
sktrdie
·قبل 7 أشهر·discuss
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?
sktrdie
·قبل 8 أشهر·discuss
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
sktrdie
·قبل 8 أشهر·discuss
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 :)
sktrdie
·قبل 9 أشهر·discuss
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!
sktrdie
·قبل 9 أشهر·discuss
> 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.
sktrdie
·قبل 9 أشهر·discuss
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
sktrdie
·السنة الماضية·discuss
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?
sktrdie
·قبل 4 سنوات·discuss
He said there were no divorces! /s
sktrdie
·قبل 5 سنوات·discuss
Yeah but leaking such data from an ISP would be considered illegal.
sktrdie
·قبل 5 سنوات·discuss
I think of Satoshi as a genius for the invention. Unfortunately the invention is causing a global climate crisis. Similar to how Einstein's laws helped create the atomic bomb.
sktrdie
·قبل 7 سنوات·discuss
Sorry to bring my ethical and philosophical view on the subject but I don't agree with forcing a capitalist system to something that is essentially volunteer work.

Open source has worked fine being just volunteer for the past several decades. In fact I'd argue it's one of the only ecosystem that keeps on being awesome. I don't think adding money to the equation will change any of this. In fact it might risk making it worst.