skysight-inc/HackerNews huggingface dataset:
C and C++ have implicit fall through for switch statements. So without a “break”, each case will execute after the one chosen.

Most control structures compile down to labels and jumps under the hood. That “while” is jumping to that “do” regardless of whether or not we’ve “executed” that line.

Combine those two facts and you have the what. If you go to “case 5”, you’ll execute cases 5, 4, 3, 2, and 1; then jump up to the “do” to continue looping as normal.

As to the why: “loop unrolling”. A technique to eke out performance when things are truly tight.

Executing a loop is work. There are things to add or subtract, comparisons, etc. If you know a loop will execute 4 times, it can be faster to just repeat the statement 4 times.

If your statement is repeated more than that, it can get unwieldy. But you can reduce the number of loops if you know there’s a number you can divide by. If you have to perform 15 loops, you can loop 5 times, repeating your statement 3 times in the loop.

Duff’s device is a way to do this for loops of unknown sizes. The first iteration of the loop essentially begins in the middle of the loop, then each subsequent iteration is done in groups of 8.

It’s old-school “clever” code. And back in the day, it was a way to save clock cycles when that mattered more. I wouldn’t do this today unless everything else has been tried
Unexpected keyboard [^1] has been a game changer for me. As far as I know, it's the only full-size keyboard that features swiping towards the corners of keys for numbers and special characters instead of tapping and holding. As a bonus, it weighs in at under a megabyte.

Edit: another comment mentioned Thumb-Key [^2], which has a similar swipe feature.

[^1]: https://f-droid.org/packages/juloo.keyboard2/
[^2]: https://github.com/dessalines/thumb-key
I need to see a picture, but fyi some of components of an antenna are "electrically" disconnected, but still play a role, wave guides being one example.

Also note, if you are just receiving signals you have more freedom to experiment. Antenna tuning matters a lot more when transmitting (especially at larger powers). (Not implying that it doesn't matter with reception)
I look forward to a (updated) version of this blog post.

Simple ways to find exposed sensitive information (from LLMs)

https://www.trickster.dev/post/simple-ways-to-find-exposed-s...
I usually use overleaf because I need collaboration. Getting your parents onto collaborative LaTeX is harder, particularly because the continual recompiling of PDFs tends to upset things like OneDrive and Dropbox if two people are editing and syncing at once.
Which ABI has red hat broken between minor versions? Can you give some examples that weren't bugs that got fixed?
Please make it trivial to use a designated "remote user" header so upstream reverse proxy could handle auth.
> Firmware updates are delivered automatically while your AirPods are charging and in Bluetooth range of your iPhone, iPad, or Mac that's connected to Wi-Fi.

https://support.apple.com/en-us/106340
A hack is to put a sensor on the chair
This is exactly it.

The entry level market is getting more and more over saturated. It is bleeding upwards to mid level slowly. But if you are a skilled senior you are still in high demand. If not your resume probably sucks or you are not as skilled as most seniors.
I thought about it.

For example, the sidebar page tree supports keyboard navigation.

The UI library I am using, Mantine, follows accessibility best practices and has full keyboard support.

There is still a lot to do in this regard. As the project progresses, more support will come.

In the past, I built a Twitter bot (@threadvoice) to help people listen to Twitter threads in audio format ( https://twitter.com/Philipofficial9/status/11899711858004869... ). I had accessibility as one of my motivations while building it.
There’s a saying, if everywhere you go smells, check your shoe.

I have had the opposite experience in life. There are people out there who I would support through what they’re doing, and those people support me no matter how silly it is. I’m in a band, and we’re recording an album at the moment. It’s costing us money and an enormous of time to do it but my partner supports me doing it because she knows i enjoy it.
It's essential for me too, ended up just using SwiftKey / GBoard with the network permission revoked on GrapheneOS.

I switched from GBoard because it's predictions for Arabic were horrendous, made swipe typing unusable.
the thing is, you can't know if i'm an ai generated comment or not. this is the thing.
I guess the irony is lost on those people who justify this by painting corporations as evil entities not interested in their welfare. I also keep reading grievances about jobs being outsourced to low-cost locations and this adversely affecting the local economy in addition to the quality of the product.

So, when individual employees outsource their work in a similar fashion, are they considering the welfare of the low-cost resources and their local communities or are they exploiting them?

Also, I believe that many of them will bristle if the same thing is being done to them by others. For example, what if the school teacher of their kids hires some, unknown, person to take classes or score assignments? Or, their doctor, lawyer, etc. offload their case to "shadowy" people?

Lastly, what happened to two wrongs don't make a right?
Yep, that's almost certainly the explanation.
A DAW is short for digital audio workstation.
This is irrelevant to what I said
Same for Vietnamese Telex, I think there's only one fork of openboard supporting it...
> I'd love to pay like a $100 to a person with disabilities to use my website for a couple of hours and shit on the experience.

Meta comment, but this made me smile. I love the vivid expression, the raw humility, and the philosophically deep but humorous and light hearted commentary on how it feels to have your code evaluated :-)
Show HN: Add Speech to Text for Your Claude Chats
I just built a simple chrome extension which uses Groq with a whisper model to do Speech to Text so that we can give speech inputs to Claude. I really liked being able to do speech to text with ChatGPT and missed that quite a bit with Claude, hence built this.

Why Groq?
They have a free tier and super fast, so anyone can create an account and add their API key to the extension.

Privacy?
The only API calls that are there are to Groq servers, so as long as you have read their T&C you should be fine

This was done and tested in a few hours and quite buggy still but works. Feel free to drop some feedback. Will push more updates, if anyone else actually finds this useful
Hmmmmm that's not a bad idea, I'll have to see how to do that, though. I don't want cables restricting me.
You will use the AI model and you will like it.
No company is anything "forever". What kind of statement is this, or is it just /r/antiwork propaganda.
There are some other good explanations in the other comments, but I suspect you might want a balance between more detail and the deluge of information in the wikipedia page for loop unrolling.

You might first write something like memcpy as:

void memcpy(char* from, char* to, int n) {
if (n == 0) return;
do {
*from++ = *to++;
} while (n-- > 0);
}

(Yes, this is oversimplified, and also you'd probably have size_t instead of int as the type for n, but it's simplified for explanatory purposes.)

Consider that the loop boils down to something like:

loop:
*from++ = *to++;
if (n-- > 0) goto loop;

Each iteration of the loop corresponds to a single memory write and a single check of the loop condition (branches are generally expensive). If you unuroll your loop once, you might write something:

int iterations = n / 2;
if (n % 2 == 1) {
*from++ = *to++;
n--;
}
do {
*from++ = *to++;
*from++ = *to++;
} while (iterations-- > 0);

This gets you two memory writes for a single check of the loop condition! That said, since you're advancing by two bytes each time, you need to handle the case where you have an odd number of overall bytes to copy.

You can pretty easily show that this code is equivalent to:

int iterations = n / 2;
if (n % 2 == 1) {
goto one;
}
do {
*from++ = *to++;
one:
*from++ = *to++;
} while (iterations-- > 0);

which in turn is not that far from Duff's device with 2x-loop unrolling:

int iterations = n / 2;
switch (n % 2) {
case 0: do { *from++ = *to++;
case 1: *from++ = *to++;
} while (iterations-- > 0);
}

(The core observation here is that ifs, switches, whiles, and other conditional constructs are all conditional jumps under the hood.)
Kafka Replaced Redis in Slack
In war games the terms “turn” and “round” are inverted from how board gamers usually use them.
> I have seen C wizardry up close that I know I simply cannot do.

I have written C at least a few times per year for over 30 years. About ten years of that was OS development on Solaris and its derivatives.

Articles like this show crazy things you can do in C. I’ve never found the need to do things like this and have never seen them in the wild.

The places that wizardry is required are places like integer and buffer overflow, locking, overall structure of large codebases, build infrastructure, algorithms, etc. Many of these are concerns in most languages.

> auto reject C PR’s if they didn’t use the syntax if (1==x) rather than if (x==1)

When I was a student in the 90s advice like this would have been helpful. Compiler warnings and static analyzers are so much better now that tricks like this are not needed.
I solved the issue by linking my lights to a switch that I turn on when needed. It has worked very well so far, with no false detection at all!
Isn't it logical to assume that the US has also already been doing these shenanigans considering that their space program is claimed to be far more advanced than those of Russians? Maybe, even the Chinese are doing it?
I'm not sure if this is a joke but no using something that might fulfil the laws of a monad doesn't mean you need to know what a monad is generally. Many features of imperative languages can be described using category theory, but only in Haskell do you need to actually understand the generalisation. Why is that? Why can't you just "use monads and not worry about it"? Well the problem is that in Haskell there is a huge leveraging of very general functions that apply to these entities generally, for example "fmap" ">>=" ">>" "<>", etc. and those are simple examples. Therefore understanding the rules and definition of the generalisation* is required.

It's not enough to just point at an example of a monad and say "look, the example is simple, therefore the generalisation is simple". As many philosophers have pointed out, particulars are easier to point out than universals. The latter requires a lot of thought.
As the parent post observes, I've also yet to see a GUI that works with Markdown and static site generators. This doesn't mean it's a bad idea. It has to be good enough to dogfood.

It'd be nice to implement the non-technical workflow as producing a pull request via a branch. Each save (even autosave after N minutes) could be its own commit.

The user could see their changes from their branch in near realtime. Markdown isn't an issue, it's a benefit, although explicit support for images and diagrams is needed.

The GUI workflow could see if an automatic merge works, if not, it is fine to require manual intervention. Another option is to swap branches, copy main branch, rollback main branch to the place before any conflicts emerged, and then apply changes.

Bonus points for using CRDT for handling multiple users working together on a page during a conference call on the same branch.
Indeed. I am reminded of the major catalyst that got me to become serious about learning vim: I saw a senior developer flying around in his text editor, editing things like a ninja, and I had to learn that skill. I've been extremely glad I invested the time.

Had the same feeling now three times while watching vision, impaired people using accessibility tools. They can absolutely fly through things much faster than a typical user can. Aside from the general awesomeness that is taking something that most people would consider a disability and turning it into a superpower, it makes me think that I am really missing something by not having that skill.

Has anybody done this before and can offer some advice for how to start, and where to go with it? I am a Linux-only user, which I assume is going to matter for the tooling.
Faustino Oro Becomes Youngest Ever International Chess Master at 10
Fwiw I have found recent distros with later versions of pipewire to be ‘better’. I also have one BT USB adapter which will establish a connection, but be totally non functional after the connection sound.
Linkers, Loaders and Shared Libraries in Windows, Linux, and C++ [video]
Inverse kinematics of a ball balancing robot [video]
To be clear, the microphone sounds good, sound output is garbage.
Take-off dynamics and energy efficiency in spring-driven jumping robots
I may be unusual, but I much prefer the environment variables in a docker compose file. A .env feels like an anti-pattern to me honestly.
Non-ionizing radio waves are generally safe for humans.

The only mechanism besides ionization that could harm humans is through the transfer of lots of power into the human body (think soldiers keeping themselves warm by stepping in front of a radar emitter).

So let's try to do a ballpark estimate of how much that could matter.

I haven't found (from a quick search) any data regarding the transmission power, but the data sheet at https://fcc.report/FCC-ID/2AD56HLK-LD2410B-P/6620025.pdf says the average current consumption is 79mA at 5V, which means it uses 0.4W.

How much of that is actually transmitted? I'd guess 10%-50% (likely much less, but let's go with this more conservative estimate, from a safety perspective), so now we're in the range of 40mW to 200mW.

If you absorb 1/4th of that (again, somewhat conservative estimate; you'll likely also reflect some, and most of it is going to pass you), we're at 10mW to 50mW extra power that is absorbed by your tissue.

Again, this is a super high (and thus for our purpose, conservative) estimate. Somebody else in this thread mentioned microwatts being absorbed, which sounds much more plausible.

To put this into context, the base level of power that an adult human operates on at rest is about 100W. This is a factor of 500 to 2500 more than the power absorbed from our millimeter wave radar. Unless all the absorption happens by a very specific and sensitive part of the body (like your eyes or so), this should just be background noise.

If you want another perspective, you could try to compare it with whatever radiation (both RF and heat) that your phone emits, that you likely carry in your pocket for hours at a time.
The deepest-dwelling fish ever caught on camera
What you had understood and what he's describing is the situation pre-1984 and now post this judgement.

I think a lot of the reason this thread has blown up is that the Chevron doctrine was really very strange and not at all how you'd expect the US legal system to have been working. It doesn't line up with any standard teaching of civics, for instance. The Supreme Court clearly felt the same way and has now instructed courts to go back to doing what everyone thought they were doing already.
It doesn’t match my experience. I developed features faster than the rest of my team and implemented a bunch of practices that are not known in the industry. As a result we delivered more and I got promoted.

Also be vary of someone saying that just because things aren’t measured it is just an opinion. Most important decisions you make won’t be measurable (a lot will though), that does not mean there aren’t good and bad decisions.
Do you have the links to the studies?

The heart disease part is basically what I said about the saturated fat.

The diabetes and cancer risks are generally tougher to track. There are other factors at play that are had to control for. For example, you could grill your red meat and increase cancer risk from that (just like other grilled meats). Processed red meat is also usually included in these studies and that has known cancer and diabetes risks (just like other processed foods).

Many of these are high level observational studies which are unable to fully account for all the factors (because we still don't know all the factors). We can show correlation, but there are things like consumption varying by age group, people earing red meat are more likely to be eating other saturated fats as well. People choosing healthy diets are also making other changes than just not eating red meat.

There have been some smaller studies about stuff related to this. Things like plant based diets reducing high risk interorgan fat. So it may not be the red meat itself, but rather the impact of the red meat on things like that interorgan fat. Or how more red meat in a diet can impact gut bacteria, which we are just learning about how important these gut bacteria are. So it's one factor that can influence that.

At this point, I'm not convinced that we know enough of the factors and mechanisms to say the risk is fully linear at the low end of consumption. I do believe it increases as consumption increases, but only beyond a certain point and likely in some logarithmic way.
The key feature IMO was the ability to return at any terminal. When every Walmart had one it became a great resource on cross country road trips with younger kids.
This reminds me of some silly C code I once wrote for fun, which counts down from 10 to 1:

#include <stdio.h> // compile & run: gcc -Wall countdown.c -o countdown && ./countdown
int n = 10; int main(int argc, char *argv[]) { printf("%d\n", n) && --n && main(n, NULL); }

Python version:

import sys # run: python3 countdown.py 10
def main(n:int): sys.stdout.write(f"{n}\n") and n-1 and main(n-1)
main(int(sys.argv[1]))

Shell version:

# run ./countdown.sh 10
echo $1 && (($1-1)) && $0 $(($1-1))
This is an amazing app. I had some data to reverse engineer just a few days ago, happened to try imhex and within a couple hours I had a description with some slightly complex data structures. The format language is quite easy to learn if you program in anything and it supports lots of weird cases. I just wish it had some more date/time formats built-in, but otherwise no complaints.
It's for freight, though, and if I understand it correctly, the force of the upward movement is automatically converted to horizontal movement by the pulley/rail system. So there's potentially no need for anyone to be on the boat as it transits the tunnel.

Not that that this looks practical - the tunnels would be huge, just for starters.
You already know this, but I would be remiss if I didn't first point out that this is bad practice for a number of reasons.

That said, I have had to do this before and if I ever have to do it again, I will be going right for a base image that has systemd. Red Hat provides UBI images that have systemd in it for reasons similar to this. Assuming that a pod or deployment using something like podman is not an option, This what I would use personally.
Show HN: B2V – Protection against impersonation attacks
Hi HN, I’m the founder of B2V (https://b2v.xyz), a service that protects organizations against impersonation attacks.

The problem I’m trying to solve stems from the following observation: while end-user authentication methods are becoming more advanced as cybersecurity evolves, organizations aren't experiencing the same improvements when we reverse the roles, i.e. when organizations authenticate themselves to their users. This imbalance leaves a gap in secure communications that B2V aims to close.

Bad actors have countless ways to pose as trusted entities — through phishing, smishing, vishing, and more. These catchy terms may sound trendy, but the technology to combat them often lags behind. While some larger companies do offer some customised solutions such as in-app notifications, most approaches are still reactive like updating email filters after an attack is detected or requesting takedowns of fake domains long after the damage is done. It's surprising that more proactive measures aren't in place, especially considering the serious consequences of these attacks.

How B2V tackles this problem:

- Mutual authentication: During critical communications, a member of an organization can initiate an authentication session and share it with a user via a unique URL. When the user opens it, the session provides a one-time password that the user can verify. These single-use ephemeral sessions also protect against man-in-the-middle attacks, ensuring that the person you're communicating with is truly who they claim to be. This could also be described as *conversational authentication*.

- Digital signatures: You can easily prove the authenticity and integrity of information relating to your organization with public-key cryptography. This is especially useful for verifying that text or links posted on platforms/media outside of your control — such as job boards, paper invoices, forums, or messages — truly come from a trusted entity. For example here's the signature of this post's URL: https://b2v.xyz/b2v_/lnIel9YXtwcqO7?s=https://news.ycombinator.com/item?id=40836872

- Verified online identities: Organizations can link their online identities, similarly to the way Keybase does it. For instance, here's the proof of ownership of this HN account: https://b2v.xyz/b2v_/NMiMMr9KWov6oE?s=hn:b2v

- Privacy by design: This system respects your privacy by never tracking or storing plaintext identifying information, only digests and signatures.

- For custom integrations, an API is also available.

Any feedback would be greatly appreciated, thanks!
When memristor came into the scene, thought it would be a reasonable substrate for network based learning system … anyone know more about what happened after?
Modafinil doesn't really affect decision making ? Being exhausted is probably way bigger impact, even under Modafinil.
China calls on scientists of all nations to study lunar samples
Since Obsidian is Markdown, it should be pretty straightforward to write an import program for it.

When I start working on the import feature, this will be possible.
The update to the law that requires a brief explanation of what is carcinogenic is helpful.
For me, it was Turkey TV on Nickelodeon: https://en.m.wikipedia.org/wiki/Turkey_Television
Advice I'd give myself:

Finish what you're doing.
>soldiers keeping themselves warm by stepping in front of a radar emitter

Holy, did people actually do this? A quick search yielded no results. Not sure if thankful or not.
Would Dream Studio do what you want? https://beta.dreamstudio.ai
Early Review of the Watchy 3.0
There’s a short and fun book called Blitzed about “PED” use in WWII. Covering German pharmaceutical industry’s monopoly over certain stimulants, Hitler’s unlikely doctor who shot him up with everything under the sun, and the ultimate consequences for everyone involved (addiction, exhaustion, insanity).
Law of Shitty Clickthroughs (2011)
> An agency interpreting the law that governs their mandate is at least nominally trying to do so in a manner that yields effective policy

Ideally. In practice ambiguities in statutes governing agency mandates are always interpreted by agencies in whatever way would maximize their own options and power. That's the written justification for the APA in the first place: reeling in excessive "zeal" amongst administrators.

The courts don't get powers from the law directly (except meta-powers like the one this case is about), so there's no direct benefit to judges from interpreting law in a maximally agency-advantageous way. That's why countries (not just the US) have courts resolve ambiguous law. It's a core part of their job.
Yes, and with undefined behavior, the compiler has to emit code that has the behavior defined by the code up to the operation that has undefined behavior.
draw.io is excellent; it stores source code as comments in the PNG/SVG

Perhaps equivalently, use Markdown and store directly in the rendered HTML?