skysight-inc/HackerNews huggingface dataset:
If you have infinite monkeys with type writers and sufficient time, other problems will seem insignificant.
It is hardware poetry.

(What is the benefit of rhymes, meter, etc over using prose?)
Something tells me the rate of JS backend frameworks means that JS is not a great choice for backend frameworks
> These do completely different things.

That's exactly the point I see...? To build a website (as opposed to a web application) with mostly static content and maybe some interactive embedded content, do not use N*xt.js. Use a CMS or static site generator or whatever instead. Without any fancy client-side URL routing and whatnot. Just let the browser do its thing.

That being said, some frameworks support a SSR-only approach or even static site generation. That's also fine IMHO. Just use what you like! If you like Ruby on Rails, why not? Angular SSR? Gotcha.

I tried multiple tools like Jekyll and Hugo but found them terribly clunky. Then I found Astro and now I'm happy. Reasonably similar to SPA frameworks, but generates a static site.
This is definitely a downgrade, and not something I managed to do do in the pre-phone days. People are less likely to snoop in my phone, but people around me at the time would open up paper and read it. And it most definitely doesn't fit in women's pockets any better than a phone.

You see, my phone does all of that except provide an ink pen. Plus more. I generally have a map with me. I have a communication device and a camera (which I use quite often to take pictures of otherwise mundane things like manhole covers). I keep some cash and a non-state-supported ID in there. (Passport doesn't fit). I email stuff to myself quite often because it is a quick way to get things from one device to another. I pay for the bus with my phone, pick up packages from the post office with it, and other small things like that.

I'm simply not interested in downgrading to paper for this stuff. I'll use paper for fun (art and stuff) instead.
I recently discovered and recommend to take a look at vite-plugin-ssr https://vite-plugin-ssr.com/.

Vite-plugin-ssr describes itself as "Like Next.js/Nuxt but as do-one-thing-do-it-well Vite plugin.". I use it for https://github.com/inlang/inlang. The control and ownership of the underlying rendering techniques is truly relieving and enables us to run static sites + a high dynamic (client-side rendered) app in one monolith instead of the typical static site + app.domain.com split.
>The giant Canada goose subspecies was believed to be extinct in the 1950s until, in 1962, a small flock was discovered wintering in Rochester, Minnesota, by Harold Hanson of the Illinois Natural History Survey.

No good deed ever goes unpunished.
I'd say this really is an opinion, those choices have deep technical implication and are highly contextual.
Next can also act as a backbone or "backend for frontend", it's not incompatible with using a CMS or building a custom application.
Oh I’ve got to go find that episode. I haven’t seen that one!
It's Facebook's fault for hiring him for a figurehead to not listen to, instead of hiring him for what he is to shake things up.

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

Sometimes a smug frog like Facebook just needs a good poisonous stab in the back.

It's not like they should be shocked after hiring a guy who was famous for making a game about shooting Nazis.
> systems in place to catch you accessing things you shouldn't and you will be immediately fired if you do

Unless you are selling it to the highest bidder on behalf of the company, and that gets you an immediate promotion.
I was thinking of an HN submission or comment a while ago that described how Arizona did this, I found this which appears to agree: https://sustainablewater.com/water-and-fabs-in-arizona/

> Arizona has [some non-water requirements for Semi fab location]; however, it faces water challenges. Semiconductor fabs require tremendous quantities of highly pure water, using between two and four million gallons daily.[1] The fact that Arizona has become a semiconductor fab given these high water requirements may seem bewildering.

> ... Although these companies use vast amounts of water, they also recycle aggressively
There are so many places that fail to become scientific powerhouses that it might still be that only certain cultures have the capability to take on the challenge. Obviously it would be a mistake to try and see scientific progress as uniquely British, because it isn't. But the culture of empiricism and willingness to nurture it probably were cultural.

The Baghdad that was a shining star of achievement probably had a very different culture from today - it'd be interesting indeed to see if it was closer to Britain in the 1800s or Baghdad in 2020. And whether the subculture that was responsible for the actual progress was the same or different from the circles of intellectual muscle that backed the British empire.
> this text input box, is Turing complete, since a human can execute a Turing machine on it.

By using Peano Axioms? Now wait a minute!
After using several of these "second brain" apps & systems and ultimately creating my own "second brain" app, I agree with this, and the general sentiment behind it. This space is just a rebranded subset of self-help. It's the productivity porn market. Roam Research was the first to realize the cash gains to be made in this space. Their marketing hook took off, they got their VC handout, and they haven't been heard from since.

People who use these things are fooling themselves. I used to fool myself. We're not really achieving or producing and we're certainly not "assimilating knowledge." What we're doing is procrastinating. We're wasting time. We're struggling at our current, real endeavors, and we turn to a scapegoat: "oh darn, it's my knowledge management system that needs work; oh, it's just my productivity system that's just not efficient enough". So we find a nice game, a tool game [1], to: (1) distract ourselves (2) give us the feeling of accomplishment - "I'm taking second brain notes in a fun new app - I'm learning!".

For me, the first step to actually getting things done wasn't to optimize my productivity workflow, it wasn't to find the perfect knowledge management app/system, it was to...get things done. When I became dissatisfied with my work, when I hit a difficult obstacle with my projects, I felt pain, and procrastinated to avoid that pain. There was no secret cure. I just needed to realize that playing with these tools and systems is not getting things done - it's just procrastination.

[1] https://news.ycombinator.com/item?id=33135227
The “witch hunt” refers to the actions taken by the incoming Johnson government, who kicked a bunch of generally respected, experienced parliamentarians out of the party because they weren’t “Brexity” enough. We’re not even talking about anti-Brexit people - just the ones that resisted the obviously broken approach that was being taken.

The result was a government forced to bang on about how great an objectively bad process was because nobody was left to say “if you’re going to do this then you need to be realistic about the cost”. And implementing a known-bad policy while trying to pretend it’s great completely fucks a government.
You think you're being clever but you don't get it: it's NOT POSSIBLE to predict complex system for such long times in advance because they "explode"/diverge way too much so no amount of "validity" or "confidence intervals" help you because you do NOT KNOW HOW MUCH THEY WILL DIVERGE: and THEY WILL.

You can't even predict a double pendulum after a second or two: nature is trillions of double pendulums in a chain: you must be delusional to think you can predict that!
Every UWaterloo CS student has to take CS241 (2nd year class, 4 months after learning C). Each student must write tokenizer and parser by hand. The full assignments include about 8 programs in binary and MIPS assembly, a MIPS assembler including support for labels, a scanner for subset of C, SLR(1) parsing, type checking, code gen including pointers and dynamic memory allocation.

In my day there was a unit on compiler optimization, with a code size contest. Constant propagation, register allocation, dead code elimination. Now it seems they replaced that with a section involving writing a loader for a ELF-like file format in assembly language

https://student.cs.uwaterloo.ca/~cs241/assignments/
A tiny bit off topic, but for the record: video games are, for me, extremely important. They are my favorite art form and an oasis in a daily nightmare; if I were unable to play my favorite games, the system I am running would be completely useless. Fortunately, the kind of games I like run mostly fine on Linux.
Static hosting can be found free on sites like gatsby.
I recently had laser eye surgery and subsequently re-evaluated my relationship with glasses over the previous 15 years — obviously I was frustrated enough to get the surgery but hadn’t considered their impact holistically over my life.

My feeling is that glasses are annoying from -1, but their impact is tolerated as being able to see is a net gain.

If I had known of their existence beforehand I might have sought out Ortho-K lenses — you wear them whilst you sleep and then take them out for corrected vision during the day. They are more expensive than surgery in the long term (10+ years), but they are less invasive and might be something worth considering.
There's this view amongst Corbyn supporters that everyone would have voted for him if it wasn't for the evil newspapers.

Setting aside that in 2019 under 15% of the country read a newspaper, it's a moot point. Part of the job of being leader of a political party, just like any business, is to handle public relations. Corbyn's team was awful at this. It's no good whining about it, you have to handle it.

Personally his pro-wealthy attacks on making the care system fairer were one major thing that turned me off. He spent a lot of political capital trying to defend the right of millionaires to not pay for their own care (and thus increasing everyone else's tax burden).
Ask HN: What is the best approach for TypeScript error handler?
Hey all, I would like to know your thoughts on our internal discussion.

We are trying to establish a error handling framework.

My peer came up with this simple POC. The idea is that this function will reduce amount of try catch used in the business logic.

---

function errorHandler(func, ...params) {
try {
return func(params)
} catch (e) {
console.log('error on function ${func}`)
throw e;
}
}

errorHandler(fetch, 'api url')
---

But I think it is not a good idea to have a generic handler like this and it is ok to have try catch for each function.

My question- is the above handler is ok or is there any better way to handle errors? Your input is greatly appreciated.
More likely: It releases happy stuff when you see the right politician, and stop when you see the wrong. Imagine that sort of manipulation at scale and you get the future of brain implants.
It's not just this complaint or similar ones, though. What recourse does a merchant have if you freeze funds and don't provide a reason or don't immediately put them in touch with a human? Stripe generally appears to misrepresent itself as a payment gateway when in fact it takes on merchants and bundles their payments as its own. Then you apparently sever connection with any merchant that might raise a flag with the bank, without giving a clear reason. This isn't "unfortunate" other than in the sense that it's unfortunate someone would be stupid enough to hinge their business on the mistaken belief that your company actually processed credit card payments.
I had no luck trying to find the list of brands to see which ones had the lowest levels, but then I realized it didn't matter: I'd pretty much eat any of them.
Demolition Man is the most prophetic sci-fi movie every made. I even wrote about it: https://papa-andy.medium.com/these-movie-classics-aged-in-cu...
Thats funny to me because my main gripe with Obsidian et al is this Reductio ad absurdum down to unformatted text as the central organizing principle of modern knowledge. Rich text, screenshots, video snips, audio, etc are shoehorned in and don't quite fit. Give me a better organized system of Infinate canvases of whatever I want to throw in there over a souped up html file any day.
Virtual reality has been too abused. Is introduced typically a humorous home video when people is startled, hits some furniture with their fists or jumps over it, and unavoidably broke the very expensive TV in the wall.

Is shown as a room disaster, much more funny for the people watching the player than for the player itself.

And the people still wonder why people is not playing it in mass when you are mocking your own target? This is not how you sell a product.

Maybe stopping the "need for jumpscare to show how awesome is our game" would help. Dunno. Maybe just making the game aware of he surrounding would help (This big square is the limit, if the player walks next the frontier show a warning or made it take one step back).
Ok yeah now that I think about it there are ways to host for free, github pages also comes to mind. Not exactly elegant solutions though. Makes the domain expense even worse in that respect.
Presumably they mean something like, sRGB but with linear gamma

Yes, it’s exactly that, because:

- almost all the time, the display is sRGB, so that’s your gamut;

- almost all the time, you want to do your lighting and compositing in a linear space.

- and sometimes your channels are normals or something, not colors at all, as others have noted.

So it’s linear in the sRGB 0..255 gamut.

It is a bit of a shame that most easy-to-use tools and workflows are limited to sRGB, so it’s really fiddly to support HDR displays and print.
There are still people who are happy enough on Twitter for now, but who might want to share an interesting post from mastodon.social. Not everyone is the comically exaggerated caricature you have in your head, most people are just normal users that want to tweet things to their friends.
This is sick. I also read their post about the making a discrete computer and didn’t expect them to be also writing a compiler from scratch. Something I’ve only been dreaming about.
The decision tree at the bottom starts with "Full-Stack App?" but only lists Express and Nest at the "yes" branch.

Next.js does have an API functionality so it can also be used to create a full-stack app.
So others know where to find you - there's a bunch of tools for that, but unless you use the same one it doesn't work. Can't think of a more efficient way personally. Though I don't think anyone needs to be obnoxious about it with series of tweets and stuff.
It’s not, though. It seems to be a very shallow understanding of the subject (or just insufficient consideration?) stated confidently (as so often happens these days).

As a sibling comment to yours also points out, there are plenty of examples to the contrary - models taught to recognise text from indistinct images. We’ve all been contributing to this for years via Captchas, and now we’ve got to the stage where our iPhones apply the concept locally to text found in our photo libraries.
The dangerous part is "that it's a novel food that was never eaten by humans".

All cultures that eat bad food have died, so there is a survivorship bias because we now think "just eat this food": but only cultures who came up with a healthy diet have survived throughout history.

Nothing guarantees you that this food is "healthy" since we cannot analize the long term of effects of these foods with any modern technology.
Using a javascript/typescript framework to build static sites is so common place now that I'd even go as far as saying it's the standard.

Frankly, I hate working with raw HTML/CSS. It sucks. Using TSX is such a better developer experience. I'm much more productive in a nextjs app, even if it's just static, than I am with plain old markup.
In the UK at least try and get building work done or buy a new car with a credit card and see how far you get...

Credit cards work great for small transactions for both consumers and businesses, but risks get high for the business (espcially small businesses) for larger transactions.
Do you have any evidence for 1) ?
I think you simply missed the point that neo-liberals can't believe the idea that professional neo-liberal politicians might have I'll intent.
> I subscribe to the idea that the most important aspect of democracy is to be able to kick out the incumbents

In think you are wrong on both points. The most important aspect of democracy is that it produces a government that reflects the popular will; being able to throw out the incumbents—at which the US does exceptionally badly—has some instrumental value to that, but isn’t an independent goal. And the pervasive use of FPTP elections is a big part of why the US is bad both at tossing incumbents and at providing effectivelt representative government.
The upside is that the regular cycle means elections are at predictable intervals. US mid-term elections already have low turnout. Snap elections after a vote of no confidence only would decrease turnout.
LZ4[1] intentionally compresses worse than Deflate—where Deflate is LZ77 with Huffman in a bitstream, LZ4 is just LZ77 with a good choice of octet-aligned encoding. It’s “we’re saturating Gigabit Ethernet and have some compute left over” compression, not “we need to squeeze our backups as much as possible” compression. If filtering+LZ4 does better than Deflate, then you’ve chosen the filter well.

Curiously, for some kinds of serialized binary data varints or even zero-packing[2] can be a good enough filter[3].

[1] https://lz4.github.io/lz4/

[2] https://capnproto.org/encoding.html#packing

[3] https://news.ycombinator.com/item?id=24073752
So how would you rate that impact? Was surgery worth it? (it probably depends on your level of myopia)
BASIC uses garbage collection for its strings. But an ownership approach as found in Rust can give you strings that are almost as easy-to-use as BASIC's, without involving the complexity of a GC.
Sorry to say I felt pretty much the same way (although, the acknowledgement that the theory was not new, but the path was not followed simply because of lack of available tech sounds plausible.)

Apparently Helion is a YC company, so if they fooled the investors, than it means those investors are more foolish than you would expect :/ ...

Now, either they'll publish in "Science" or "Applied Whatever", and it's #RoadToNobelPrize ; or they'll get their face on the cover of Time, and we'll know for sure it's a scam.

(In which case, this documentary will serve as reference footage when someone has to shoot the Helion version of "Bad Blood" ?)
People love wasteful spending on jobs programs.
Maybe they should open a restaurant nearby. Source your food locally...
Before deciding on these very dev-oriented metrics, one should probably define the goals of the site/app. Is it a community site where easy content editing / contributions should be prioritized. Or is this a landing page that should have stellar SEO and load blazing fast. What language / framework am I or my team familiar with. The raw performance metrics should probably come last.
EDIT 2: this is really a good software from the limited tests I did.

It is oriented towards bullet points (that from blocks) and match much closer my note taking style.
This would be trivial to build with Amazon speech-to-text / text-to-speech (or IBM's offering for that matter)... I expect there is more than a few of us that have considered building this, so I'd be surprised if it didn't exist by now... although getting traction / monetisation is another thing to support costs...
If your developers are already familiar with React, I think next makes a lot of sense for a corporate website. When used as a static site generator, you can reduce a lot of complexity over wordpress et al. because you don’t need a database and can deploy directly to a CDN.
As a (lamentably) no longer young and (luckily) fairly rich person in London, “tax the rich” is a fucking brilliant idea.

I have received over the past several years a number of stupid tax cuts and energy bailouts that have had precisely zero effect on my family’s well-being or future prospects. Except now I can’t get a fucking doctor’s appointment, the local church is setting up a “warm bank” so that me neighbours don’t die, and my kids will have to pay tens of thousands of pounds for education.

Tax the rich.
>> How did [Baghdad] appear in the first place, and why did it end?

We know why it ended. First, fire was discovered. Then horses were tamed. Then the Golden Horde sacked the city, and destroyed all the libraries.
Do you mean Meta-sized or Meta-stasized?

https://en.wikipedia.org/wiki/Stasi
Yes to Dubai.
US renewables are terribly constrained by regulation as well. Someone here on HN linked this post the other day: https://noahpinion.substack.com/p/the-big-nepa-roundup
You don’t have to watch shorts to get recommended shorts based on a Google profile which includes content-viewing, searches, etc — and may or may not be based on a device, user-login, IP, region, persona-profile, etc.

Basically, regardless if the recommendation was valid, there’s a reason content that niche was suggested.
why can't I post links to my mastodon.social posts then? (I'm on Twitter, and I've been in Mastodon for many years -- this hasn't been the case before).

Can you post links to mastodon.social on Twitter?
It's a lot harder to decentralize when you have decentralized tools...

There's some corollary here to the law of momentum that allows social networks to become juggernauts. It probably applies to repressive governments as well. Maybe: The more entrenched the system is, the more you have to use the system's own tooling to get people to escape it?
Why are the top and bottom person referred to by name, but the middle person is "this dude"?
In Homo Deus, Harari mentions research by DARPA (?) on a focus-enhancing helmet. This was reported some years ago already and the journalist who wrote the piece had experienced the effects first have in a sniping simulation.
So to some degree the tech is already here.
It was designed as a security feature but it's been coopted to block competitors (or anyone else the CEO takes a personal disliking to). Therefore calling it an "anti-Mastadon" filter is accurate in this context, no matter the specifics of how that filter is currently implemented.
It's a long time ago but I'm pretty sure we had similar assignments at utwente. I'm not so sure it's such a must know thing though. Lexers are fairly trivial to write by hand, and parsers are just annoying without code generation. We don't use tools like yacc because parsers are particularly difficult or complex, we use them because there's just a lot to gain from optimisations and fancy features, and without a generator or very powerful language features parsers will be too much work to maintain.

Frankly, I'd expect someone who's never implemented a compiler before make the mistake of not using a parser generator because they are daunted by yacc and think their language is not going to need the complexity of an extra compile step.

By the way if you don't need very fancy features, writing parsers with parser combinators is very easy and fun and doesn't require any metaprogramming tools. You can even write your own little parser combinator library because the concept is so simple.