HNHacker News
TopNewBestAskShowJobs

palmfacehn

1,334 karma · joined September 15, 2023

HN face palm

echo '0.0.0.0 news.ycombinator.com' >> /etc/hosts

submissionscomments
palmfacehn··on NPM debug and chalk packages compromised
Yes, that would be a compelling change. Like a language agnostic HotJava platform. We're overdue for a more coherent approach, from the bottom up.
palmfacehn··on Caterham Seven 160 achieves 57.6mpg (24.5kml)
Kei cars are designed to be primarily city cars. I'm sure there are many areas where it would lack in comparison to a modern vehicle. It is based on an old racing design from the creator of Lotus. The focus was always on power to weight and less is more.

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

People generally build kits resembling this design with more powerful motors. This is a factory build with a streetable config.

palmfacehn··on Caterham Seven 160 achieves 57.6mpg (24.5kml)
I felt that this was notable because the mileage is achieved with a Suzuki K-car engine and simplicity, rather than a more complex hybrid drive train.
palmfacehn··on NPM debug and chalk packages compromised
A batteries included standard lib included with the runtime is one approach. Yes, you would know upfront the version which the browser implements. From there you could dynamically load a polyfill or prompt the user to upgrade.

Alternatively, because there are now (often ridiculous) build systems and compilation steps, we might expect similar behavior to other compiled binaries. Instead we get the worst of both worlds.

Yes, JS as it is is some kind of standard, but at a certain point we might ask, "Why not throw out the bad designs and start from scratch?" If it takes ten years to sunset the garbage and offer a compatibility shim, that's fine. All the more reason to start now.

A purely compiled WASM approach with first class DOM access or a clean scripting language with a versioned standard lib, either option would be better than the status quo.

palmfacehn··on NPM debug and chalk packages compromised
There's also the option of including that standard lib with the runtime.
palmfacehn··on NPM debug and chalk packages compromised
Things like this are good illustrations as to why many feel that the entire JS ecosystem is broken. Even if you have a standard lib included in a language, you wouldn't expect a bigger binary because of the standard lib. The JS solution is often more duct tape on top of a bad design. In this case tree shaking, which may or may not work as intended.
palmfacehn··on NPM debug and chalk packages compromised
It isn't uncommon in crypto ecosystems for the core foundation to shovel slop libraries on application developers.
palmfacehn··on NPM debug and chalk packages compromised
I'm often surprised at the number of JS experts who struggle with the basics of the browser API. Instead of reasoning through the problem, many will reach for a framework or library.
palmfacehn··on Ohio senator introduces 25% tax on companies that outsource jobs overseas
I'm happy to elaborate if you can be more precise with your question.
palmfacehn··on Ohio senator introduces 25% tax on companies that outsource jobs overseas
Perhaps it isn't as popular as some tropes would suggest. Those who would buy influence would prefer state interventions in the market to benefit their interests, rather than an open playing field. The best way to sell those interventions to the public might be appeals towards "fairness" and the aforementioned tropes.
palmfacehn··on Rug pulls, forks, and open-source feudalism
>This would seem to imply that the established internet, what we had before this relenting, was somehow left wing.

I would omit the left-wing characterization as a debatable generalization. Perhaps it would be better described as the specific platforms being opposition partisans, rather than the Internet itself.

palmfacehn··on Ohio senator introduces 25% tax on companies that outsource jobs overseas
More and more parallels to Peronist econ are emerging in the US. All that is missing is a rationalization of taxes on exports. Both sides of the aisle seem opposed to laissez-faire liberalism.
palmfacehn··on Freeway guardrails are now a favorite target of thieves
Failed central planning, excessive barriers to commerce, rent seeking bureaucrats and other anti-market forces. Paradoxically, poverty as an outcome of economic mismanagement is used to rationalize further interventions.
palmfacehn··on <template>: The Content Template element
>GUI apps have struggled with this as well

And when we made mistakes there, it was usually because we took short cuts instead of respecting clean abstractions.

>So you have to think of all the machinery to change as few DOM nodes as possible.

This is where I get off the train in regards to JS frontend frameworks. We should know the state our data. We should also know the state of our display components, whether they are canvas elements rendering more complex data or mere tables. KISS principles apply here.

"All the machinery" of a framework isn't necessary to handle the synchronization between the two. Especially when it mandates ridiculous build steps, thousands of dependencies, opaque "magic", huge blobs of minified JS and loading spinners.

>The difficulty usually comes from people mixing up two concepts: the state of data, and the state of the UI.

Agreed 100%. Which is why I like the <template> element. It is a dose of sanity allowing explicit separation of code and document. I suspect this is the other poster's objection to HTML inside of JS.

palmfacehn··on <template>: The Content Template element
>That's true, but state management became such a big problem because of the trend of SPAs and fat clients.

I find it strange that so many developers struggle to maintain the state of a page. Then they turn to "magic" frameworks to handle it for them. What's wrong with having a canonical Object or other data structures to represent the state? Why would anyone want a generalized framework to (mis)represent the core model of your application?

We've been creating applications with internal state for decades now. GUI applications with an internal state existed before the web. Typically it is achieved via code hygiene and sane abstractions. As an example, the template element keeps your document structure out of your logic.

Yet in the modern JS world, display, state and now even the backend are all shoveled together into an unmanageable monstrosity. From this point, even more magic is added to duct tape over the madness. As a result, the accepted norm is now 10mb of cruft to display a static page.

palmfacehn··on Why are so many Americans obsessed with working?
>In Ireland, people work to live, but too many Americans live to work. If you ask someone in Ireland to tell you about themselves, you will probably find out what county they are from, what sports they follow, and even their position on Ireland's most closely-fought controversy (Lyons vs Barry’s). Ask an American, and you will immediately find out what they do for a living.

I've always found this to be weird and off-putting. Okay, ask if it is important, but if they don't understand the response, that's on them. I understand that people frame things through their own experiences, but it is strange when wage based employment is assumed to be the only way to earn or live. It is a poor way to start a casual conversation.

palmfacehn··on Evidence that AI is destroying jobs for young people
Even if we take the empirical claims from highly partisan sources at face value, obvious axiomatic problems remain. AI employment doom, like other forms of neoluddism is predicated on a zero-sum view of economics.

As an example, consider the claim, "Steam shovel adoption is destroying entry level jobs in ditch digging"

Yes, we want more productive technologies to be used where applicable. We want workers to specialize and become more productive with less hours worked. This isn't destructive at all. Framing it as such is either deliberately misleading or demonstrates a misunderstanding of basic econ.

palmfacehn··on <template>: The Content Template element
This, and separation of concerns. HTML stays in HTML or your preferred SSR template where it belongs.

Another reason I like <template> is the ease of prototyping. A very straightforward approach is to mock up your HTML+CSS with placeholders of what your populated elements might look like. Instead of translating that into JS element generation code, you can simply remove the populated data and enclose the barebones element in a <template> tag.

Back in JS, you might have a simple initializer to add these elements as needed and a function to (re)populate them.

Simple, to the point and no libraries or frameworks required.

palmfacehn··on Tell HN: I kinda want to go back to Java
Didn't you find the verbose style readable when you opened a project after a long time?

For me the time spent coding is the last step. The more important task is always in identifying a problem worth solving and formulating what I hope to be a coherent design.

The actual typing, while tedious, is the least important part. Just the same, I am sometimes feeding a snippet to a LLM and having it fill out the tedium. Results vary, but the verbose style and longWindedDescriptiveNames seem to help. A few inline comments pick up the rest. The LLM will also expand these into Javadoc type comments.

palmfacehn··on NPM: How did we get here?
Does anyone have a work around for the tree view of package dependencies breaking the terminal environment when piped through |less ?
palmfacehn··on Debt has always been the ruin of great powers. Is the U.S. next?
Yes, but the utility is relative to the next peer competitor?
palmfacehn··on [dead]
I skimmed the article. It was mostly anonymous or pseudoanonymous quotations of chats or message boards. The above poster is right to call out the partisan alarmism. This flavor of journalism isn't helpful.
palmfacehn··on Treasury Secretary Says Government Weighing Declaring National Housing Emergency
Perhaps if he cannot get lower rates out of the Fed, he will stimulate via other means? There's very little substance to the article.
palmfacehn··on Next.js is infuriating
Use what you know. Build the backend first. You probably won't know what the frontend requires before this.

Once you know what is actually going to be on your site, you can style the output with CSS and add the necessary interactivity with JS. Browser APIs have mostly standardized as compared to the bad old days. Using them directly instead of libraries or frameworks will keep your site lean and fast.

All of your CSS, HTML and browser API knowledge will continue to serve you for the years to come. In a few years, people will be arguing about a new magic framework.

palmfacehn··on Next.js is infuriating
Your observations apply generally. Debugging "magic" frameworks is often more complex than starting with simple basics and a coherent design. As a bonus there are less dependencies, less build issues and lighter pages or binaries.
palmfacehn··on Next.js is infuriating
I'm not a React or Next.js user. Others will disagree, but personally I prefer to minimize my exposure to JS by decorating traditional HTML+CSS documents with vanilla JS as needed.

I was somewhat surprised when I noticed simple Next.js landing pages would break in Firefox. Worse yet, the failure mode was to overlay all of the content with a black screen and white text, "An application client side error has occurred". It was surprising in that a simple landing page couldn't render, but when I discovered that the cause was a JS frontend framework, I felt that it was par for the course.

Perhaps it makes sense to the advocates, but for those of us not on the bandwagon, it can be sincerely baffling.

palmfacehn··on Stone Age settlement found under the sea in Denmark
One of the reasons why control groups are so important in science.
palmfacehn··on Ask HN: How do you fight YouTube addiction and procrastination? I'm struggling
I've come to accept unproductive downtime as a counterbalance to highly focused times. If it becomes too extreme, the best bet is to unplug totally. Schedule some tasks out of the house, preferably in nature.

Before you begin, take some time to outline the tasks you need to complete. Now when you return to the home office, you are only there for one reason.

If problems persist, you may need to find more interesting projects.

palmfacehn··on RFK Jr. Must Go. and He's Not the Only One
Yes, "I am The Science", was another scientismic proclamation.

In fairness, I would allow that when emotions run high, the individuals involved are not as precise as they could be. Alternatively, we might take their words as stated and simply interpret it as Scientism. Either way a pattern is emerging.

If the individual resigning truly wished to communicate the potential harm, he would have been better served by explaining it more precisely. Assuming malicious intent makes it hard to take seriously, especially in today's media landscape.

palmfacehn··on RFK Jr. Must Go. and He's Not the Only One
>I am unable to serve in an environment that treats CDC as a tool to generate policies and materials that do not reflect scientific reality and are designed to hurt rather than improve the public’s health...

Okay, that's fine if he's the master of and exclusive license holder for "scientific reality", but I do take exception with his ability to divine malicious intent. Maybe I am missing something here. Did this person uncover a massive conspiracy? If documents were found where this malicious intent was outlined, I would like to see some citations. Perhaps it is more probable that this is a highly charged partisan issue and the statement is marred by hyperbole.

← PreviousPage 4 of 26Next →