Better HN
topnewbestaskshowjobs
Log inSign up

bestest

418 karma · joined Dec 26, 2011 (14y ago) · 225 submissions

Submissions

comment 1mo ago · link · parent

I saw it as being "read" and rated as 3 out of 5 on my goodreads. But I didn't leave a comment there unfortunately so it took a while to work out why I rated it in such a way. Your vampire comment instantly clicked. I wanted to like it but vampires were too much.

comment 8mo ago · link · parent

Does the author dislike react? How about preact? Or maybe simply jsx? Or nextjs?

There's nothing wrong with either of these if used correctly. Thus "hate" is a rather shallow argument.

comment 8mo ago · link · parent

Same. MacOS. Tried it. Was okay-ish for several days. But eventually I realised it's worse than WebStorm in basically every aspect, subjectively speaking.

It is slow, it's missing features and it is buggy.

comment 10mo ago · link · parent

Switched to Zed from Webstorm. Only issue is Zed has no vertical tab support. Did create a PR but it got rejected as it does not align with their milestones. Well, using it by monkeypatching the dev build after every upstream sync.

comment 1y ago · link · parent

I have tried it. And would like to reiterate – everyone should use what they like.

But for me Lit is too OOP. It feels like Angular. And that all in turn feels like Java. It's just so heavy and constrained (not saying it's a bad thing though). Too much boilerplate for me.

The whole paradigm is different and does not match my preferences. And while subjective, I do believe React with TS, Tailwind, zod, react-query and zustand is the best stack delivering the best balance of boilerplate and code-delivery and easy of use and entry level and dx.

comment 1y ago · link · parent

It depends on the target product.

I'm working with JS for already 25 years. Tried all of the frameworks, and continue on doing it. And every time I try something new, the refactoring flow turns most of them into NextJS (if it's very UI rich or customer facing or something very web-oriented), or Vite+React+Tailwind (client) and Hono (backend) if it's more of a tinker toy needing more custom solutions.

The boilerplate with NextJS is cleanest (compared to all the other frameworks) and API is the most straightforward one, and you can safely ignore the vendor lock in. Its just a pretext to hate on NextJS. They all have some kind of a "vendor" lock in. Be it a vendor-or-a-specific-approach-or-whatever-lock-in.

And Vite+React+Hono — simplest to set up for quick experiments, and very powerful with minimal boilerplate. Will probably create a starter for this one, as I have been using this stack quite a lot lately.

EDIT:

You can pretend vanilla JS is all you need, but then your app grows, then you suddenly need types, and state, and more events and their handlers, and SSR or something else. Thus React has been the most stable bet for quite a while for me now.

comment 1y ago · link · parent

Well this crashed my Safari like nothing else in quite a while!

comment 1y ago · link · parent

Found out you can use WASD to navigate and Space to shoot.

comment 1y ago · link · parent

I would've probably switched from JetBrains to Zed already. But Zed has no vertical tabs support.

I can't believe people are ok with horizontally layed out tabs.

comment 1y ago · link · parent

  middleware = fn(req) → next(req).
express/koa give you the use() chain. next.js gives you one root, but nothing stops you from chaining yourself. same semantics, just manual wiring.

  type mw = (req: Request, next: () => Response) => Response;
  
  const logger: mw = (req, next) => {
  console.log(req.url);
  return next();
};

  const auth: mw = (req, next) => {
    if (!req.headers.get("x-auth")) return new   Response("forbidden", { status: 403 });
    return next();
  };
  
  function chain(mws: mw[]) {
    return (req: Request) =>
      mws.reduceRight((next, mw) => () => mw(req, next), () => new Response("ok"))();
  }
  
  export function middleware(req: Request) {
    return chain([logger, auth])(req);
  }
root is given, chain is trivial. that’s middleware.

comment 1y ago · link · parent

Since you're here — I'll just pipe in.

Here in this article, the author, failing to comprehend the domain differences, is applying the same approach to call a function everywhere. Of course it won't work.

The fallacy of nextjs is attempting to blend function domains that are inherently different. Stop doing that and you will be fine. Documentation won't work, it will be just more confusing. Blending edge and ssr and node and client-side into one is a mess, and the attempt to achieve that only results in layers upon layers of redundant framework complexity.

comment 1y ago · link · parent

Consider middleware.ts as a root middleware. Nothing is stopping you from creating your own chain (which is trivial) in there. I mean, that would eventually work the same if nextjs implemented that feature — there would be a root somewhere.

comment 1y ago · link · parent

This is terrible and not worthy of HN front.

Terrible from the front-end side of implementation: - performs worse than your average arbitrary-amount-of-rows-that-won't-fit-on-the-screen library (it should perform the same no matter if its 1k, 1m or 1mm rows) - is seemingly buggy - is pointless on its own, because THIS demo is a client-side demo, and no one loads that much data on the client-side.

Revisit this when this demo is performant AND data is loaded from the backend.

Ignoring that, every front-end JS developer should explore these kinds of libs and also try to implement them themselves, because they're basically front-end 101.

comment 1y ago · link · parent

That is fine as long as your forms are simple text inputs and buttons. Now plug in drag-and-drop and multiple file uploads and selects and checkboxes and radios and more of these various inputs you're in the world of pain.

I've recently, once again, gave native inputs a chance in a new project. It lasted as long as I've described in the first sentence. And I've been in the frontend world for 20 years. Trust me, you don't want complicated native forms.

And react-hook-form is just what you need (albeit it also is boilerplate-ish, so I always end up wrapping it up in a simpler and smarter hook and component).

edit: Same, in a sense, for HTMX. It's ok for simple things. But eventually you may end up trying to build a house with a fork. The fork in itself is not a bad tool, sure. But you also don't need a concrete mixer with your morning toast.

comment 1y ago · link · parent

Enter this in the console:

document.body.onwheel = (e) => e.stopPropagation();

comment 1y ago · link · parent

Author also mentions his thoughts on expanding to the russian market. So many red flags here. Pun intended.

comment 1y ago · link · parent

I would suggest them to repeat the experiment while including sets from answers to "choose heads or tails" AND "choose tails or heads", ditto for numbers or rephrase the question to not include a "choice" (choose from 0 to 9 (btw, they're asking to choose from 0 to 10 inclusive, which is inherently wrong as the even subset is bigger in this case)), but rather "choose a random integer".

comment 1y ago · link · parent

It is AI related, but I don't think it's only "train". I believe Musk is a real visionary (villain?), and he's going to replace the whole government apparatus with AI. POTUS included.

comment 2y ago · link · parent

I used to be their web developer 10 years ago. Yes, it was always their goal to be like Apple. The apple aesthetic, pixel perfect websites, smooth transitions, similar fonts etc.

comment 2y ago · link · parent

I filled out a lengthy prompt in the demo. submitted it. an auth window pops up. I don't want to login. I want the demo. such a repulsive approach.

comment 2y ago · link · parent

an amazing 3d map implementation of the taken images here: https://archive.eso.org/scienceportal/home

comment 2y ago · link · parent

Josh really does have a lot of nice and shiny stuff. But Josh should also learn to optimise. Downloading 7MB of stuff for minimally interactive above-the-fold content is overkill.

comment 2y ago · link · parent

nice. will probably try it in the future.

but the for-some-reason-not-obvious revelation that it's just a product that some team somewhere is working on and the fact that a browser is an important piece of software brought me back to safari (not sure if joke's on me, but in this case I trust apple engineers to do a more thorough job in ensuring my data is secure).

comment 2y ago · link · parent

the developers working with firebase should enforce common-sense document crud restrictions in the rules. that's just how firebase is. everyone knows it.

now, when talking about ARC BROWSER, i am seriously starting to doubt the competence of the team. I mean, if the rules are broken (no tests? no rules whatsoever?), what else is broken with ARC? are we to await a data leak from ARC?

any browser recommendations with proper vertical tabs and basically everything working like it does in ARC?

comment 2y ago · link · parent

Coolify! https://github.com/coollabsio/coolify

comment 2y ago · link · parent

all good here on macos and arc (chromium). how about the direct link to the frame? https://plainvanillaweb.com/blog/articles/2024-08-30-poor-ma...

comment 2y ago · link · parent

I am also still struggling with this. Tried various prompts along the lines of "draw me the inside of a cylindrical space habitat rotating along it's axis to create artificial gravity", like a more detailed:

"Create a highly detailed image of the interior of a massive cylindrical space habitat, rotating along its axis to generate artificial gravity. The habitat's inner surface is divided into multiple sections featuring lush forests, serene lakes, and small, picturesque villages. The central axis of the cylinder emits a soft, ambient light, mimicking natural sunlight, casting gentle shadows and creating a sense of day and night. The habitat's curvature should be evident, with the landscape bending upwards on both sides. Include a sense of depth and scale, highlighting the vastness of this self-contained world."

flux kind of got the idea but the gravity is still off.

comment 2y ago · link · parent

that's so subjective it's a wonder this is an actual post.

comment 2y ago · link · parent

I only redirect urls with ids. E.g. the canonical is "/:id-some-slug", so if the url matches the id but not the slug — I redirect it to the canonical.

For everything else you can just have a nice 404 with suggestions of links that probably are a match.

comment 2y ago · link · parent

i don't usually read long articles, especially paginated ones. but this one got my attention and I don't regret it. such a nice mix of tech and suspense mystery thriller. thanks!
12345
8