skysight-inc/HackerNews huggingface dataset:
Since he said "use" and not "practical use" or "lucrative use" or even "productive use", I'll answer for myself: I really enjoy passing time making fermi estimates and back-of-the-envelope calculations (sans envelope).

For example, any time I go to a new restaurant, I try to work out the annual profits based on the time of day, cost of a dish, number of people, staff, location, etc. I don't want to open a restaurant myself, but it's fun to try to think of all the inputs I can, and do some arithmetic in my head to get an answer. It's an enjoyable way to make time pass while waiting for my meal to arrive. For me, it beats reading Twitter.
In JavaScript, "await" is syntactic sugar for promises.

async function myFunction() {
a();
await b();
let d = c();
return d;
}

becomes something like this:

function myFunction() {
return new Promise((resolve, reject) => {
a();
b().then(() => {
try {
let d = c();
resolve(d);
}
catch (err) {
reject(err);
}
}).catch(reject);
});
}

If you didn't mark `myFunction()` as async, it wouldn't set up the `new Promise()` scaffolding, and there would be no `resolve()` or `reject()` to call.

Note that you can call an async function from a non-async function. Assuming b() is async and a() and c() are not, a manual approach looks like this:

function myFunction(callback)
a();
b().then(() => {
try {
let d = c();
return callback(null, d);
}
catch (err) {
return callback(err);
}
}).catch(callback);
}
Another option is to allow the parent to create an empty child process, and then make arbitrary system calls and execute code in the child, like a debugger does. In most cases the last "remote system call" would be exec.
beyond the demo that's linked in the readme?

https://alvaromontoro.github.io/almond.css/demo/
It is not programmable, but the logitech k860 is nearly a drop-in replacement. I say 'nearly' because it's using scissor switches instead of membrane. The form factor is otherwise the same including the optional footrests being in the correct spot.
I use Mitsuharu Yamamoto's emacs-mac-port, which has smooth scrolling: https://bitbucket.org/mituharu/emacs-mac/src/master/README-m.... Due to the way Emacs works, pdf-tools can't do "continuous scroll" mode. This doesn't bother me much because I always have PDFs set to show the whole page anyway.

I don't sync Org notes with my smart phone. But the nice thing about Emacs (compared to most other notes tools) is that file attachments are in your file system. One Drive's sync backend is very good and smooth, so it's easy to grab a PDF if I want to attach it to an email or view it from my phone or tablet.
JavaScript modules can use top-level `await`, you don't need a function.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
I'm Ukrainian. Thank you all for your support.
Hi, guys. I'm @insky from github (here this nickname is in use).

I'm know many of your are IT guys, and I ask for your help. We need russian fake news and government sites to be DDOSed.

https://github.com/almerico/bombardier

Thanks forehead for your help.
Glory to Ukraine!
Show HN: A more social, Amazon-free alternative to Goodreads
Hey HN, I know reading books isn’t everyone’s thing, but it’s certainly been mine for as long as I can remember.

Unfortunately, I felt like the online book space was missing a platform that does the book community justice. Goodreads is the go-to "social platform", but if you've been on Goodreads before, you'll probably agree that it's not all that social, and overall not all that exciting.

So I set out to build what I personally was looking for (but could never find). The goal: to give the book community a more social and streamlined alternative to Goodreads or StoryGraph.

We also felt like it was important for Booqsi to be independent of Amazon; we care about supporting local bookstores, so every book in Booqsi links you to Bookshop.org to purchase that book (not Amazon).

Here are some of my favorite features launched as part of beta:

- A book-focused social feed (finally!)

- Beautifully-rendered custom bookshelves to show off to your friends

- Streamlined book recommendations to friends

- Easily track reading goals and books you've read

And many more...

It's completely free and easy to use, and we would love your feedback as you explore the platform.
You also mandate a system complex enough to have an MMU.
It's possible to be both not public enough to ruin people's lives and public enough for journalists or concerned individuals to find. In New Zealand, voter registration details are, by law, available to look at but not to copy. Anyone can walk in to a public library anonymously and rifle through the book but the book is chained to the desk and you're not allowed to photocopy it or take photos. Also, it's only present in the local libraries near where the voters live.
There are a few different nuances to this question.

Can it be done? sure:

let bar = await foo();
return bar + 1;

can be converted to:

let resultPromise = foo();
while (!resultPromise.isComplete()){
sleep(10);
}
let bar = resultPromise.value();
return bar + 1;

the issue is that this is terribly inefficient as you are asking every 10ms whether or not the result is ready.

One of the reasons this is so inefficient is that you have to spend time checking (which is wasteful if it isnt ready) and waiting. If you check more frequently, you're wasting CPU. If you spend more time waiting, you can waste up to that much time if the result is ready right after you go to sleep.

The alternative is to have the operating system tell you when its ready. This is done through the event loop. So this would turn the code transformation into something like the following:

let resultPromise = foo().then(function(bar){
return bar + 1;
});

but what do you return? you have to return a promise (i.e. a callback). Therefore, all callers of this function have to be ready to handle this.
Saving you a shit ton of work down the road because you on a quick glance caught a weirdness.
For anyone intimidated by fine dining, I'd say approach it by recognizing that the people involved are really excited about providing a memorable experience for you, and that they've worked years at perfecting the whole performance of it, and making you feel comfortable and welcome (with adult boundaries) is their vocation. For a lot of professional waiters and cooks, it's like performing music, so be interested and curious and let yourself be delighted. It can also be a bit overwhelming, so even though you have probably eaten in restaurants before, treat fine dining like a new experience, as they've tried to make it one.

Professional staff can handle just about anything, and there's not much they haven't seen. The secret I think is to know before hand who is paying, have a sense of the budget from online menus before ordering so you don't have to focus on the prices, respect the personal boundaries of the servers, and if it's your first time, consider that you'd like to be welcome back.

I don't think any of them have a gong they smash whenever they see someone using their dinner fork for the salad, and some decorative table settings actually break with convention and can be a bit mystifying, so if you don't know what's what, ask. They can accomodate most things, but make dietary restrictions known during the reservation, as they'll usually prep for them. They're about providing a unique experience, so if your needs aren't medical, consider whether you're open to a new experience before spending a lot on one. Fine dining restaurants employ dozens of people with specialized skills, and provide livings that support families, so go, get treated like royalty for a bit, and use it as a waypoint for how well you can be treated and how good something as simple as food can be, then use the expereince to enrich your life.
I think getting As correlates pretty well with grinding through interview questions. Perhaps not the same type of questions, but it's still "learning standardized skills from a prescribed area of study".

I don't think most algorithm interviews correlate with what you actually do on the job though. There's a lot more communication (eg trying to figure out what the boss/client/pm really wants, explaining non-trivial concepts to impatient/bored colleagues, or trying to convince other people that your "crazy" idea is actually sane), and a lot less hard problems thrown "in your face" (eg. prove that there is no solution for a^n + b^n = c^n where n > 2), but a lot more hidden traps that don't show themselves until something blows up in production (eg. turns out a minor version difference of python triggered a serious outage).
It's a failure of the UI and windowing frameworks to enable this level of programmable personalization. Designers chasing fads are just the opportunists that fill the gaps left by Apple's rigid design ethos, Microsoft's random gyrations, and Linux's ever-delayed Year of the Desktop.

As ridiculous as it first sounds, VR will likely provide the technology for the way forward.
Splitting fork and exec allows you to do stuff before calling exec, for example redirecting file descriptors (like stdin/out/err), creating a pipe, modifying the child's environment, and so on.
Surely this is what happens to ALL internet packets in room 641A

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

downloading any app (much less using it) results in billions of worlds .....
It's a sense of what numbers are. As a decimal, 1/6 is 0.1666.., so that will mean that 6 times 16 is around 100.

How many seconds in a day? It's 60 times 60 times 24, but 24 is around 25, which is 100/4. So it's 60 times 15 times 100, and 6 times 15 is about 6 times 16, which is 100, so it's 10 times 100 times 100, which is 100,000.

But that's too big by about 4% (because we used 25 instead of 24) and another 6% or 7% (from using 16 instead of 15) so it's about 11% smaller.

So seconds in a day is about 88,000.

All small numbers, few facts, but being comfortable in using them quickly with a side order of sanity checking.
No, find is slow.

Locate, sure.
A similar point was raised in https://www.researchgate.net/publication/348755905_The_Seduc... which was surfaced at https://news.ycombinator.com/item?id=30354969.
Are they really going to freeze every wallet that has been tainted by transactions from a certain wallet? If that was the case...if I was in charge of those wallets I would absolutely send a little bit of crypto to all of the major exchange wallets so they end up on a freeze list. Maybe even hit up some of the bigger crypto players as well (some US govt entities, mostly local ones, accept crypto now).
I'm talking about practice, not theory. You can buy waterfall keyboards easily enough. There is no equivalent for the electric piano. There are only three or so Rhodes simulations on the market... Arturia, Lounge Lizard, Clavia Lab... Clavia Lab seems defunct, maybe reducing this list to two.

The Hammond simulation is just way easier. As a player, you're manipulating a bunch of key switches. The circuitry inside may have a lot of quirks, but those quirks are just a lot simpler to model than a Rhodes. Leslie simulation is something else... IMO, buying a real Leslie or DIYing something similar is far more convenient than buying a B3, and far less expensive than buying a Rhodes. Part of the price here is that a B3 is almost 200 kg.

Maybe Rhodes simulations have gotten better since the last time I used them. I have an old keyboard from circa 2010, it's not designed specifically for organ players but even so the Hammond patches are pretty damn good... but the Rhodes patches leave a lot to be desired. Getting a good Hammond sound out of some kind of simulation is just so much easier than getting a good Rhodes sound.
This was the first thing that came to mind. Still blows me away how amazing the art, music, gameplay, everything is. He even wrote some of the tools he used to make the game, like pxtone which he used for the music.
The font-end part is already open source anyway.
I can't speak for anyone else, but for my mental math (which admittedly is only so-so, not spectacular), I make pretty liberal use of factoring. Want to multiply a number by 15? Multiply it by ten, then multiply it by five, and add them together.

Usually that's good enough to get me a rough number, if I need a precise number I whip out my phone.
American Prestige focuses on American foreign policy but has been doing a segment covering the war from a heterodox perspective. The podcast is left leaning but reasonable and consistent in its analysis.
Because there are many, many use cases where you don't want to call exec() immediately after fork().

Want to constrain memory usage or CPU time of an arbitrary child process? You have to call setrlimit() before exec(). Privilege separation? Call setuid() before exec(). Sandbox an untrusted child process in some way? Call seccomp() (or your OS equivalent) before exec(). And so on and so forth. Any time you want to change what OS resources the child process will have access to, you'll need to do some set-up work before invoking exec().
> In hindsight, data logic should be in the database itself.

This is the reason we are creating TigerBeetle [1] at Coil, as an open source distributed financial accounting database, with the double entry logic and financial invariants enforced through financial primitives within the database itself.

This is all the more critical for financial data, because raw data consistency is not enough for financial transactions, you also need financial consistency, not to mention immutability.

The performance of doing it this way is also easier. For example, around a million financial transactions per second on commodity hardware, with p100 latency around 10-20ms.

[1] https://github.com/coilhq/tigerbeetle
Memorizing the tables past 12 is something stressed in older education, but isn't necessary. It really comes down to knowing strategies to simplify the calculation. If you can round the operands to a more easily used number, say 23 becomes 22 or 20, it's much simpler to do the mental math.
> Of course nobody knows exactly how many piano tuners there are in New York, but you could guess about how many piano owners there are, how often a piano needs to be tuned, and how many tuners it would take to service this demand.

You don't want to know how often a piano needs to be tuned. You want to know 1) how often the average piano owner pays to get their piano tuned, and 2) how often the outliers (like Julliard) pay to get theirs tuned. For #1, my own ears doubt there's much if any relationship to how often they need to be tuned.

I feel like this is a common problem with this approach-- something about starting the journey leads one to choose an imagined ideal contingency rather than one that is practical. Almost like the deeper you go, the more likely the thing you're guesstimating will be a fantasy.

Edit: clarification
The only thing that needs doing during war is be safe and support others.

Other jobs, especially like software dev, is literally pointless and not important like at all. One corp will close - another one will open and the world won't even notice it.
All I've heard is the danger of calcium precipitating out of your blood and causing arterial blockages. Apparently D3 potentiates this so that the concentration of blood-borne calcium doesn't need to be as high for this to begin.

I've always been wary of going up to max-dose levels for that reason.
Someone already linked you evidence that this isn't true.

https://www.cbinsights.com/research/report/blockchain-trends...

That shows over 700% growth and your excuse is that everything is going down except for NFTs?

Meanwhile you haven't linked anything to back up your claims.
At the risk of sounding crass and embarrassing myself, here's the quote I keep at the top of my emacs config file:

;;; init.el --- welcome to church

;; Well then get your shit together. Get it all together, and put

;; it in a backpack, all your shit, so it's together. And if you

;; gotta take it somewhere, take it somewhere. You know? Take it to

;; the shit store and sell it. Or put it in a shit museum, I don't

;; care what you do, you just gotta get it together.

;; Get your shit together.

-- Morty, from Rick and Morty
JS does - just wrap all your code in an async function, and then you can await within.

> async function run() {

// call your program logic here

await myCode()

}

> run()
Seems like a simple solution would be to add "Or Canadian" to the Jones Act.

If there was a war I'm sure Canada would help with any marine shipping needed, and it would simplify things for some operators.
The good/evil/etc. here seem to be defined exclusively around "performance above all else", and - more specifically - performant primitives over performant application architecture.

It strikes me that performance gains associated with sharing address space & stack are similar to many performance gains: trade-offs. So calling them "good" and "evil" when performance is seemingly your sole goal and interest seems a bit forward.
Well that's my exact point. If everything boils down to math, it's all well and good. But I don't think that's the case.
That would be hell. One of the best tactics I remember using on the paper one was skipping things and coming back later.
This is how my mother-in-law prepares food. It is a genuine pleasure to eat at her table. The experience, love, and innovation she puts into her recipes are amazing.
In JS, Python and similarly built systems async is inherently coupled to an inversion of control.

When you write (Python):

await sock.write("fooooooo")

write will, after several layers of abstractions and wrappers, look like this (on a reactor/readiness-oriented system):

def write(self, data):
while data:
try:
written = self._socket.write(data)
except EWOULDBLOCK, EAGAIN:
yield 'writable', self._socket
data = data[written:]

"yield" here means to pass a bit of data up to the event loop (neé coroutine scheduler), and that event loop will watch (using select/epoll) for that socket to become writable and then hand control back.

Because this inversion of control doesn't happen unless you (usually) explicitly wrap a coroutine (e.g. asyncio.run_until_complete) with an event loop, you can't just call a coroutine. It doesn't know when to resume in these designs, and your synchronous function doesn't know how to, either.
Glory to Ukraine!
I use fork a lot in my Python science programs. It's really great - you can stick it in a loop and get immediate parallelism. It's much better than multiprocessing, etc, as you keep the state from just before the fork happened, so you can share huge data structures between the processes, without having to process the same data again or duplicate them. I've even written a module for processing things in forked processes: https://pypi.org/project/forkqueue/
If you have one thread, and it's just in a loop checking and rechecking on a promise to resolve, you will deadlock, because nothing is actually running the async function.

Await actually pauses your function and allows the async runtime to work on other stuff, such as completing the function you just awaited on.
They're clearly just trying to insert a bit of humour into their text...
"in return for a full withdrawal of Russian forces from the Donbas region and an end to Russian support for the independence of the two Moscow-backed separatist regions in eastern Ukraine, a demobilisation along the Russia-Ukraine border and an assurance of Ukrainian sovereignty"

And what's the guarantee Putin wouldn't attack Ukraine anyway after few years? Russia did assure Ukrainian sovereignty in the past and apparently it wasn't worth the paper it was written on.

Anyway, that's not compromise Russia would have accepted, back in December they demanded essentialy reverting NATO to its 1997 state.
Microsoft employees will return to a campus in transformation
I don't think I've ever seen a prix fixe/chef's selection menu that wasn't going to leave me absolutely stuffed. If you go somewhere and order a la carte and plan to spend "normal" nice restaurant prices (say, $30-40) sure you'll get a smaller size. But if you're spending like $70+, you'll almost always leave full. The one actually starred restaurant I went to, I skipped lunch and could still barely walk home it was so much food. 6-12 courses add up, even if they're small.
And many people see computers just as the magic internet box.

If all you see the article as is info on cooking, I'm of the opinion that you're missing the point.

The last line of the article points this out - mise-en-place is about optimizing for consistency/efficiency in $THING_YOU_CARE_ABOUT
I don't understand the function of LEDs on keyboards. Is it purely aesthetic ? How much cost does the LED add to an already expensive split keyboard? Think of the engineering and coding that could be saved without the LEDs.

The sales copy touts: "The LEDs can serve as visual support for your changes. Use different lighting for different layers, or use them to improve your touch-typing."

Do people really use it for that?

I suppose there is a difference between why people buy something (shiny feature) and how they actually use it. If the manufacturer is competing with other keyboards with the LED feature, I suppose they don't want to risk losing a sale.

I just wish I could type comfortably without expensive hardware.

</rant>
Braid shouldn't be on there. While it was done by a single programmer, he didn't do the artwork. He was smart enough to hire someone with good taste.
I love how the author came in with an open mind and let herself be taken away by the experience. It's rare that you see an article that's just about enjoying the experience and not scrutinizing it.

I've been to a few Michelin starred restaurants. For me, it's surprisingly inconsistent. I can have a meal that I absolutely adore (L'Astrance) and a meal that's merely decent (Pujol). That said, I try to enter each experience with an open mind. There's no cause for cynicism at the dinner table.
And you wonder what happens around politics season..
Russia is the new sick man of Europe, ironically enough given the old Russian empire used the term originally to describe the aging Ottoman empire. They seem to be the only ones that can't see it.

They don't have anything that anyone particularly wants anymore. Germany can switch to LNG. USA is net energy positive these days (although the shale might only last another 10-15 years). And finally nukes just aren't worth that much with MAD.
But async doesn't imply IO in many languages, it could just be a timer or a cross thread operation. At the limit is just lazy evaluation.

Similarly the absence of async doesn't guarantee the absence of IO, the function could be doing plain old sync IO or scheduling continuations on the event loop by hand.

IMHO there isn't any justification for async in "high overhead" languages, i.e. most of the dynamic languages that are not going to spawn tens if thousands of concurrent coroutines; those languages are better served by green threads or some sort of stackful continuations (the existence of async in python is particularly baffling).

It is more of a necessary evil in high performance languages were dedicating a call stack is a comparatively large cost. Even then I strongly believe that async functions should be awaited by default and any forking should be explicit.

YMMV.
"let's avoid having any laws governing the internet, because all governments are evil, corporations are good and ignorance is freedom!" /s
Interesting.

The idea if quantum immortality was one of the first things I thought when I read about multiple universes.

I never did research on it an it was just a week ago that I heard this was "a thing" but it wasn't a sound theory, for all the reasons that wiki article mentions.

I guess, I wanted to live with the thought that it was possible, that's why I never researched about it.

Thanks for the link, I imagined that my life would become like in the story too, lol.
This is why most good laws are written with the understanding that disputes will be solved by a complicated neural network that draws on distributed resources for consensus.