skysight-inc/HackerNews huggingface dataset:
> All of these pale in comparison to the history of our my nation

You're responding to an argument about why the US sees China as having aggressive ambitions by saying the US is allegedly worse? That is irrelevant to the argument and implicitly accedes to my point. Besides, if the US was the evil empire you allege it is it would just make even more sense that China was seen as an enemy given the recent increase in Chinese international belligerence and influence campaigns.

> bombing of civilian infrastructure in Iraq

I can only find a single credible example of the US deliberately bombing civilians in Iraq and that was the Al Jazeera office in Baghdad and that assumes you believe the Mirror reporting is accurate. If it's true then that's bad for sure, but it's not exactly Xinjian-level genocide either. I was surprised with how few accidental bombings there were given how badly conceived the war was!

> atrocities that was the Vietnam War

Vietnamese are still dying from unexploded ordinance etc from that war, but, the Vietnamese are friendly with the United States while distrustful of China. Why is that? Because they have a very very long history of enmity with China, with the most recent conflict being a Chinese invasion of Vietnam in 1979, whereas the USA is seen as preferable to China. Given how terrible the Vietnam War was this stark difference stands out!

> our extensive support for dictators in Latin America throughout the 20th century

Fair criticism if you don't remember that China props up North Korea, a range of dictatorships and corrupt governments in Africa and is itself a dictatorship over more than a billion people!

> When it comes to interfering with elections (and indeed the results of them), we put China to shame.

This is true and would be a reason for those other countries to have enmity to the US but we haven't been able to influence Chinese elections because they aren't free elections and their leader is a dictator. This hasn't stopped them attempting to make our elections less free which is a symptom of their aggression towards the United States, the whole point of my original response.

> I can't pretend that our military industrial complex has been anything but a threat to countless other nations

If by "nothing but a threat to countless other nations" you mean that it's implied the US Military would fight any other country then you're technically correct. If you mean that all they ever do or ever have done is threaten every other group of humans then that is totally ridiculous. NATO is a voluntary defense pact that the US spearheads that Finland and Sweden are currently in the process of enthusiastically joining. Australia and the UK weren't forced at gunpoint to sign on to AUKUS. Dozens of other countries aren't being forced to cooperate on regional security issues. I'll grant the issue is obviously extremely complex but you're denying all the positives which is nonsense.
While impressive I don’t think StarCraft and Diplomacy can be compared to an actual war.

Diplomacy especially has at most three actions that can be taken per turn (move, support, hold) maybe five if you include convoy and retreat. Generally each country does have pretty limited paths to win.

The impressive thing is the natural language processing of the AI and from what I read from one top diplomacy player the fact that the AI doesn’t try and take revenge when betrayed, doesn’t develop trust with any players or let any sort of subconscious feelings get in the way of its goal.

I don’t see a world where, as the article suggests, all war is automated.

I see a world where AI helps us be even more prepared for the last war, and equally unprepared for new wars.
Nice article with some actual results and not too long either.

If one is on more of a budget here's a video by bigclive how he takes PCB photos on a budget.
https://youtu.be/L6sAS-y21xA
I've spent a fair bit of time running a fuzzer on Rust code that parses untrustworthy data. And the thing that saved my code time and time again was that Rust has runtime bounds checks. Even if I messed up index calculations, I'd get a controlled panic, not a vulnerability.
I would be very interested in a call-out guide - say I am going to handover billing to this SaaS API, Instill need to know what events I should identify and call out - it seems to me this is 50%+ of the engineering challenge anyway and I have to do it even if I am not doing in house billing

Simple things like your user just did X, in this country and at this time. This has a tax implication
Sure I mixed up the terms but the difference is how the law is interpreted today.

in many EU countries the ways you can defend against an attacker are in practice much more limited and highly contextual. If you kill someone who is hiking across your property you are most likely going to prison for killing, even "just" using a taser or holding them down until police arives can easily count as unproportional amounts of force and get you sentenced for hurting the trespasser. On the other hand you are much more likely to get away with it in some US states.

Furthermore in some EU countries trespassing laws are also more limited and can even have unexpected "gaps". Like there had been a case in which it was found that activists which trespassed onto a farm to document animal abuse where not found guilty of trespassing as they had a reasonable reason to enter the property.

And sure it's something else if you idk. brake into someones home instead of "just" trespassingly pass through a property (especially if the property is not fenced off, I think in some countries if a property is not fenced of and there is a path especially if its without a sign and it's not just obviously a garden of a house it doesn't even count as trespassing at all).

Lastly people having a gun at hand is also much more rare in many EU countries.
'Protestware': programmers self-sabotaging their own code. Should we be worried?
Except this can't happen happens many and many times in practice so maybe it's time the language bureaucrats got off their high horse (but they won't)
this is dependency-driven inference. Sequence-of-execution (i.e. "time") follows from dependencies. Think "make".

i call this "wave" calculation - as the algo to find the sequence after each input change/stimulus is spreading changes like wave from-the-point-of-change-outwards, in topological sort.
There might be (direct or indirect) recursion allowed, up to some predefined level, or minimum-change-diff thresholds or whatever.

Writing a calculator for such set of rules is relatively easy, from memory they were like 1000 lines in c++, 100 lines python, 200 lines js.. it more depends on the "syntax" and conveniencies for the programmers, than actual engine.

Now, Turning that into full language .. will be really interesting. Kind of turning inside-out the relation wavecalc <--> general-language-of-choice..
This has nothing to do with undefined behavior. Switch the code to unsigned integers, where overflow is perfectly defined as wrapping, and the result is exactly the same.

The compiler, to avoid the division, compares x * 0x1ff with 512 * 0xffff instead of x * 0x1ff / 0xffff with 512. This comparison is obviously bunk, since it doesn't take the uppermost bits of the multiplication into account. But so is the original comparison!

You see the same thing happen in Rust -- https://rust.godbolt.org/z/xf67rM77T -- the difference being that there's a second language-level bounds-check inserted at the lookup site.
Just sharing: If you want to learn photography, buy yourself a film camera and read those two books.

Ansel Adams:

The Camera
https://amzn.to/3gMyCa5

The Negative
https://amzn.to/3U88fsN

The rest is just practice.:)
Lying requires intent. This was a mistake, something that humans are well-known for making, and if the compiler is designed to assume otherwise, it borders on useless in the real world.
I thought the vast majority of plastic in the ocean was from fishing and developing countries?
Pretty much any serious camera, and I think even serious camera-phones these days, will optionally record the image as RAW data rather than encoding as jpeg.

That you want to shoot RAW is pretty much covered in day 1 of intro to digital photography. The only exception to the rule is when you need super-fast frame capture rate, and the bandwidth to storage of much larger RAW files interferes. This is typical of folks shooting sports.
If these intrinsics are used can clang or msvc still compile it?
mpv does this (must enable manually for SSA subs). In VLC you can also add the black bars to the video with a filter so the subtitles draw on top of them, but some renderers won't like the aspect ratio change.

An annoyance is that deliberately absolutely-positioned subtitles (e.g., translating onscreen text) are shifted too -- more ideally the feature would only apply to subs without inline margins. Similarly, the time delay from in the sibling thread is undesirable for subs that are timed exactly to what's onscreen, though that's much less programmatically identifiable.
Yes, the sound mixing in 1899 seemed uniquely bad, which is unfortunate because it’s an otherwise good and interesting sci-fi show.
I mean my understanding is a lot of it was our plastic recycling going there and being dumped in the ocean…

https://www.treehugger.com/europe-s-plastic-recycling-is-get...
some green message showed up after my first guess that i didn't get to read
"unacceptably risky" except I can't think of anything more basic than asking the computer if a > b and it fails at that?
I guess the suggestion engine was local and no spyware BS?
Hmm, I had expected more from the article given the title.

This is about the least surprising UB. It didn't even travel backwards in time.
Signed int overflow being UB is one of the most basic UBs of the language, and what allows generating tight code in loops.

This is not new, -fwrapv was introduced in 2003, but it can quite severely impact code quality, if you don’t care, just set that. Then complain that C is slow, because C is a shit language.
I feel like your definition of rules is my definition of guidelines, and vice versa

same observation, different semantics
Awesome game! Not sure what everyone else is saying - I found it easy to understand and it works fine on iPhone
Yeah it is because DIY wood working usually needs real wood, not particle board.
Reminds me a little of "Lexorank" used in Jira[0], except by using decimals instead of base-36 strings, which I guess could be more efficient? The "rebalancing" aspect is interesting because on a long enough timescale for a document you will definitely want to do it. Would love to read up more on any algorithms for doing this in a p2p manner - with a central server it's probably quite easy using some tombstoning or something.

[0] https://stackoverflow.com/questions/40718900/jiras-lexorank-...
That's C for you. If you want something saner, use Rust or Haskell or Python or even Java or Go or.. almost any other language that's not C or C++.

These days the whole point of C is this Faustian pact with the devil of speed for sanity.
I blame GCC. The C standards committee is some out of touch with reality conglomerate working in a vacuum, taking 50 years of language history into account.

I expect my compiler vendor to be on my side, ie produce a compiler that helps me write good software and not get in my way. GCC is doing the opposite, it's deliberately looking to use the standard to fuck me over in the most subtle and unexpected ways. Signed integer overflow is undefined; that gives compiler authors the liberty to make it do anything they want, including well defined things that anyone would expect and find useful. But GCC decides to fuck you over so their devs can give you an arrogant reply and impose their superiority if you show up on their bug tracker.
Depending on your workloads that sounds like a very expensive way to do development compared to just having a dedicated but efficiently set up work laptop.

Even giving people a headless Intel NUC to connect their laptops too would be way, way cheaper (assuming you're just doing development).
All good advices. I've been taking pictures for a decade and reading books really does help more than a lot of online stuff you find. Also, looking at masters' photographs and reasoning about how they were made. After some time when I thought composition was all that mattered, I realised that light is all that matters. I use only natural light, so that means I shoot only when the intersection of good light and free time is not empty, but this has improved my craft.
It’s only a good thing if it actually reduces environmental impact, but as others have pointed out, for biopolymers that’s not the case.

Anything that reduces environmental impact is worth pursuing, but many products like this are actually even more environmentally harmful, just sometimes in different ways. It turns out sometimes the best approach for now is reducing and mitigating the impact of plastics rather than eliminating their use at all costs. Sometimes those costs can be too high.
Kai-Fu Lee hinted at reasons why China would surpass the USA in AI in his book "AI Superpowers" https://www.goodreads.com/book/show/38242135-ai-superpowers?...
Your team might want to use asdf https://github.com/asdf-vm/asdf to run multiple native versions of PostgreSQL and Redis in parallel. Even with one project you might have multiple versions of those tools in different releases of the project. You standardize by using a .tool-versions file. I've been using that for a team targeting Linux and developing on Ubuntu, Mac and WSL (or was that an Ubuntu VM in Windows?)
Nikola (US public company) was a grift and thousands of retail traders lost money despite all the protections of the SEC and other regulators. The CEO is going to jail but most people will get very little in compensation, if anything.

If the current system is so flawless, why does this keep happening? Clearly the system is not flawless.

I myself am extremely technical and able to understand the crypto industry. I can separate scams from not-scams.

Similarly, the Machine Learning / AI industry is chock full of charlatans and scammers who have stolen billions from investors. For example, Watson from IBM is a hyped technology and product that has now been shuttered.

The unique element of crypto is a retail investor can put their life savings into a scam. This is unfortunate but not a reason to ban the tech.

Nothing stops a lower-class person from entering a casino or using a sports betting app and losing their house. The pearl clutching on HN is legendary.
Good advice. A film camera forces you to learn, while digital will "fix" things for you
> Half of computer repairs result in snooping of sensitive data study finds

Obly half ? They shall redo the study.
Single-page app. Basically JS takes over most browser functions and you have your application running in a single "page", so to speak. For example, clicking on a link is a state transition in the app, so instead of telling the browser to go to the new link, the app will push new history to the browser history stack and do the transition itself.

Think youtube.
five pages down.
Nitpick: it's not the behavior of the program that becomes undefined, but of the execution that it occurs in. For example, consider a program that reads argv[3] without making sure there's at least 4 arguments. If you call it with too few arguments, that entire execution is undefined (even stuff that happens before the out-of-bounds access), but if you call it with enough arguments, it is well-defined and the compiler has to emit code that will work.
It doesn’t matter what x is. Without prior undefined behavior, there is no way to justify “if (i >= 0 && i < sizeof(tab))” passing when (as demonstrated by the printf) i is not actually in that range.

Edit: Though, incidentally, the comparison does not work the way it was probably intended to work. In `i < sizeof(tab)`, `i` is converted to `size_t`, so an unsigned comparison is performed, making the `i >= 0` part redundant. But the result is the same as what was intended.
> Most people who answer telephones for a living are not paid to answer telephones. They're paid to answer customers.
If I'm speaking to someone who's worked too much for their capacity (whatever that is) and I get a curt, wrong, or bad-mannered answer I'm very likely to take my business elsewhere

(Warning: anecdote) I've just phoned my son's school to tell them he's poorly and won't be there today. The receptionist who answered the phone is "the grumpy one" (there are two at this school, the other one is lovely).

Of course it's possible that the grumpy one could well morph into being lovely if only they were given more time off, but I doubt it. I've spoken with both of them dozens of times, and it's utterly predictable, one is always lovely, one always isn't. Some people are great with customers, others just aren't.

> some positions do need to fill shifts and it is what it is, but you can always split them between more people

There are small businesses where teams are, unsurprisingly, small. Having worked both with and in such places, I'm not sure how feasible the "split between more people" actually is.
I'm the exact opposite - if a TV show/film doesn't have subtitles available then I won't even watch it. I don't enjoy going to the cinema for the same reason.
If this is really true - and frankly I’m not sure I buy it completely (though I do partially) - well, then, fuck those guys.

I like Jews.

They’ve always been really nice to me despite my brash Texas attitude and total disrespect of social graces. Every Jewish person I’ve met has been really down to earth, nice, and intelligent. Obviously that can’t apply to each and every one of them - they’re human beings, after all, just like everyone else - but that’s been my experience, and it’s one I’m eager to repeat.

Sadly, however, I am not a hiring manager.

I wish it was possible to definitively identify the people who sincerely refuse to hire Jewish folks, just so I know which companies not to bother applying to. After all, I’m a Texan. As such, I have an extremely low tolerance for bullshit.

And bigotry, in any form for any reason, is most assuredly bullshit.
Ask HN: Do you feel optimistic about the future?
It's true that doesn't work because you can't mix types with methods and types with no methods. But that's a far cry from "Go doesn't have generic types" or "may as well stick with interfaces for anything but trivial boilerplate".
I've come to perceive that all human society worldwide is optimized for isolation and compartmentalized.

Even the more communal cultures, like Middle-Eastern or Asian, with extended families living in the same household for multiple generations.

We have distinct "spheres" with minimum overlap but almost no interfaces to mingle between them: Work, home, civilian, government, policing, shops, services, online, offline...

People in different spheres only interact for specific transactions, and then they're on their different ways.
> I think the average worker actually prefers just being required to work a certain amount and as long as you aren't extremely bad at your job, you'll be fine even if you have a slow week/month. Rather than being frequently being audited for results and pressured to work longer hours to keep your output up with everyone else.

I agree. It seems like this is another new trend that's coming up because we still haven't found the solution to high-stress IT work. I don't think this is it.
Caspian report is good
A compiler can’t know why you fucked up, it can’t even know that you fucked up, because UBs are just ways for it to infer and propagate constraints.

If an optimising C compiler can’t rely on UBs not happening, its potential is severely cut down due to the dearth of useful information provided by C’s type system.
Yes. To spell it out: undefined behaviour doesn't just affect specific values nor just the behaviour of your program after triggering UB. It's the entire behaviour of your programme. So UB can 'travel backwards in time'.

Fun fact: not closing a string literal is UB. Ending a non-empty source file in anything other than a newline is also UB.
This is interesting to me. I think I actually dislike coding but am good at it.
Computational photography is coming to "real" cameras now, too.

I just upgraded to an Olympus OM-D E-M1.3. Olympus has, unlike most manufacturers, in-body image stabilization. That means that there are tiny actuators moving the sensor around to offset shaky photographer hands. Doing the stabilization in-body gives some other nifty side effects.

Olympus cameras over the past several years have a "super resolution" mode that uses this. My sensor is only 20MP, but using super resolution I can get 50MP or 80MP (on a tripod) out of it. The camera accomplishes that by using the IBIS system to move the sensor by fractional pixels and combining them as you describe. And as you note, this in turn has the side effect of cutting noise.

I was just taking advantage of this a couple weeks ago out at Fort Davis, TX, near the McDonald Observatory, which has some of the darkest skies in the continental USA. Astrophotography is notorious for causing headaches with noise, but this technique goes a huge way to cutting that down with zero extra work from the photographer (except that the shot takes 9 times longer to record).
This looks pretty cool, might wanna add “Show HN:” to the title as you made this.

I checked out your pricing, any reason for the seemingly random numbers, 1->5->17?
This right here.
Gamers were burnt by SEGA's past consoles and SONY's hype machine was running on all cylinders.
SONY was promising Toy Story level graphic and all sorts of nonsense with their "emotion engine".
That infographic is pretty awkward. The colon punctuation is wrong: it should be "step 1:" instead of "step: 1".

"Boiling all water" should be "Boil all water".

The instruction to boil for at least 3 minutes is inconsistent with the actual notice text, which says 2 minutes.

And step 3 and 4 are not actually steps in the procedure, but examples of cases where it is easy to forget to boil water. (For a second there I was wondering how and why I would send my boiled water through the chilled water line of a refrigerator...)
> The principles involved haven't changed much in the intervening decades.

My problem with many old-time tutors is that they refuse to recognize that photography has gotten a lot easier. We don't need to learn the craft the way they did.

For example, you don't need stuff like the "sunny 16" rule of exposure if you have real-time previews in the camera. You use visual feedback, usually with better accuracy.

In the same vein, you probably don't need to learn about flash guide numbers when modern continuous LED illumination covers 99% of use cases without any guesswork.

Or, you don't need to learn about optical filters (perhaps except for the polarizer) when almost all their functions can be accomplished in software without loss in fidelity.
I'm really not a fan of that docs website/static page generator - or maybe it's the way the content has been laid out - it shouldn't take so many clicks and full screen refreshes to get basic information that could each be a heading on a single page so you can grep for words, use the mouse less etc....
Watching Andor recently this was in full effect: I was riding the volume control since even with a 3.1 setup, actors were still too quiet and explosions way too loud.
Ah but the trap is that if the compiler can reason that UB always occurs (in reality it will reason that code is dead because the constraints it computes don’t allow for its execution) then it can remove the entire thing.

See Raymond Chen’s well known “undefined behaviour can result in time travel”.