skysight-inc/HackerNews huggingface dataset:
Defining `left - 1` to be green `right` to be red can be thought of as "padding" the input to ensure that there is at least one green and one red, but I'll concede that it is sneaky.

(A less sneaky version is to explicitly define new predicates: `is_green2(i) := (i == left - 1) || is_green(i)` and `is_red2(i) := (i == right) || is_red(i)`, where `left` and `right` refer to the function's original parameters (inclusive-exclusive). These predicates can be used as the invariants, and are sufficient for showing that at the end of the loop the result is either the first red, or one-past-the-end if everything is green.)

An alternative is to tweak the invariants:

Let `left` and `right` be the function's original parameters (inclusive-exclusive), and let `l` (that's a lowercase L) and `r` be the variables used in the loop (exclusive-exclusive).

The original invariants are `is_green(l)` and `is_red(r)`, which require sneaky definitions when `l = left - 1` and `r = right`.

The tweaked invariants are `is_green(i) for all i where left <= i <= l` and `is_red(i) for all i where r <= i < right`. In other words, everything up to and including `l` is green, and everything from `r` onward is red.

These invariants are vacuously true when `l = left - 1` and `r = right`, so they hold before the loop (without having to define `left - 1` to be green and `right` to be red).
I am not sure either follows. But it depends how we even define "older languages", especially considering differences between python 3 and 2, are they the same age (based on the original python release) or are they treated for their respective release version?

Just taking some simple release dates [1] or wikipedia I found:

Ages of "Yes" group: 49, 36, 22, 26, 26, 12, 31

Ages of "No" group: 11, 14, 33, 7, 32, 45, 26, 34, 21

Averages: Yes 28.85, No 24.78

With the ambiguity around what "age" even means for the language here (e.g., counting the age of node.js or python) it is probably meaningless, but it seems well mixed independent of age.

[1] https://blog.sunfishcode.online/bugs-in-hello-world/
You are probably thinking of splice(2).
> 2. Node.js is not a language. JavaScript is a language,

This criticism is the wrong way around. All of the author's "languages" are actually language implementations like NodeJS. You can tell because he produced the results by running the code, rather than by reading a spec.
For me using elementary OS for a bit was truly awful: its UX was the worst I ever used.

It just felt like a gnome reskin, some clunky apps and insane defaults settings on top of ubuntu making everything worse just to please mac users. And yet it doesn't bring anything new on the table and is still way less pleasing to use than macOS (or mac has been doing really bad since the last time I used it).

If some few people really find it nice to use, good for them. But it's no suprise elementary OS is failing.
Works extremely well, until I try crouch-jumping (space-ctrl-W). Firefox interprets this as ctrl-w and asks me if I want to close the tab (and the mouse pointer doesn't get re-confined again).

I'm not even using a QWERTY layout, so I have to contort to press W... It's a common issue with US-made games.
Useful tool, thanks.
PostgreSQL has a number of companies providing support, the db is free and open source. Ray is offered for free, Anyscale provides support. Quansight offers qhub for free and provides support. Those are just a few off the top of my head. Disclaimer: I work at Quansight and contribute to ray.
Ask HN: Clicking confirmation on captcha without verification
In many websites the image is not shown in the captcha page but only the check box with label "I am not a robot" is present. On clicking it authorizes. What's the point of this click?
Visible Lisp Computer: embedded real-time display of Lisp workspace using uLisp
I recently had to upgrade my really old iPad. I'm not exactly poor but I went for a pretty cheap model as I couldn't mentally justify the prices of the higher end models. The iPad is the only Apple device I'm willing to buy, it's great.
For Monte Carlo integration you want low discrepancy sequences or blue noise, not random numbers.
The last intel macs run way too hot still. They get up over 80dC. The 2014 ones would hard reboot when building large Java projects.
I use it mostly every day. Thanks for your work, Rishi.
I'm annoyed at how narrow their concept of "use cases" is.

I mean, are there really so many "pros" that need 18 streams of 8k video? Seriously? That's where all the money is? How does the market support so many "creative pros"?

Meanwhile, I know that Fusion 360 is going to suck as it always does, with its crappy slow graphics and clunky UI, and my docker containers will run dog slow.
https://www.quora.com/TranferWise-lost-my-2300-transfer-what...
Everyone in my data science team is using MacBook Pros right now. At least in a corperate environment, I don't know why you would even want to train models locally. We either do it in the cloud (Databricks / SageMaker) or remote into on-premise workstations for research & experiments.
Ukraine war: Why has 'Z' become a Russian pro-war symbol?
Abortion in the Surveillance State
There is no money anymore in Desktop linux (and it is debatable there ever was)

I mean there's no money anymore in Desktop computing period.

But Linux is stuck with GTK and QT/C++ while a lot has moved to .NET and Swift (and other tech - heck even Electron)

All most people need now is a web terminal.
That comes with the territory.
even their graphs don't look legit.
they look like what you see in boxes of vitamins found on ransom websites.
Got to wait for independent benchmarks with well explained scenarios. anything can run twice faster than anything with some specific tweaks to the program that runs.
Nothing in the article supports the claim made by the headline.

It is actually rather unlikely that this guy lost his cryptocurrency to a browser driveby attack as claimed, odds are he did something far more stupid to get owned.
Thanks for following up! (BTW, double line breaks if you want to make a HN comment more readable, or double leading spaces for blockquotes)

> We follow a "trusted devices" model, where you 2FA using your phone number for the first login on a device

It sounds like associating and verifying a phone number is required to sign up and use the service - is this something you're open to changing?

> I assure you there won't be a "refer your friends" badge blinking on the home page of the app

That's great! And TBH I wouldn't mind terribly as long as it can be permanently disabled after a first view.

> We hear from most people that iOS or Android are their preferred platforms, so we have to start there

Understandable. At the very least it would be a huge boon if we can expect to run the Android app without hickups on a fully degoogled Android device (e.g. GrapheneOS).

Will keep an eye on how things develop :)
Do you have any evidence they are doing this? I rather think they are using a threshold like > 10 complaints in a certain time period.
I didn't mean queues in general, my bad. I meant, as you pointed out, enterprise grade queuing systems: there are lot of stuff going on there that are not exactly the stuff one learns in the Data Structures 101 course.

> And the implications of rate in > rate out is pretty obvious for anyone that's ever had a clogged sink.

Well, many developers I know are in their early 20s. I'm not sure they ever had to deal with clogged sinks :)
Too Bad Linus once called them Clowns [3]...but hey there's also [1] and [2] ;)

1: https://hardenedbsd.org/

2: https://www.openbsd.org/

3: https://www.spinics.net/lists/kernel/msg2540934.html

2008 (Linus):

>>I think the OpenBSD crowd is a bunch of [self-stimulating] monkeys

2019 (Greg KH):

>>OpenBSD was right on disabling hyper-threading
“New”?

Aren't these the people who have always been, and the “new”, is the small majority on Twitter thinking they represent the vast majority of society?

Thinking about it further, my government appears to listen to a lot of what Twitter has to say.

I wonder if it's easy to control a country using a high number of well-placed Twitter commentators designed to usher in whatever those in power actually wanted.
So happy they finally made this. Ever since I got my first retina MacBook Pro a decade ago, I’ve wanted a good companion display for it. The LG UltraFine worked, but was never good. Iiyama and the other knock-offs were worse.

Basically instapurchased this. Now just have to wait two weeks for it to show up…
Agreed.

If I have an issue, I’ll go speak to who I need to when I have an issue.

Maybe it’s because I’m introverted, a person of few words and no nonsense but I’ve always found 1:1s to be corporate lip service. I’m in a place I’m happy, my employer happy with my work and I have no interest in career paths etc. That doesn’t mean I’ve no interest in being better/doing better work, which I’m constantly doing, I just have no interest playing the game going through different org chart paths as happy where I am and certainly don’t want to do management.

1:1’s are offical company time so if you share your being stressed or other issues I’ve seen that used against people before, it’s not a private confidential chat, it’s a manager/employee chat.

I find it’s best for me to smile, nod my head and ask the other person how they are.

Experiences outside of corporate I found it more genuine the ceo randomly saying hey do you want to get a coffee/lunch instead of a prescribed scheduled 1:1.
Yeah, I’ve been finding my one on ones useless recently, and this article seems to have some more useless “wisdom” here summed up in a nice package. Kind of annoying to me that the writer implies the one on one is for me to fill his valuable time. I’m loving my work, don’t have any issues with my coworkers, and like my current position. I really don’t have critical feedback to bring to the table every one on one. To be honest, if everything is going smoothly, all I can do is talk about what I’m excited to work on next and how life is going. Which is a status update.

By the way, I found the “figure out my problems and solve them” line very rich. Every morning we have a standup where my manager tells me what his main concerns are and then I change my priority of work to keep his stress (and thus mine) low on whatever the new issue is. That’s generally how managers and employees work. You’re probably doing something very wrong or are very green if you don’t know what your managers chief stressors and concerns are, because I have no idea how you’d manage your work properly otherwise.
> Well, it's his property. Why should he give it up/away?

Legally sure but thinking more pragmatically the company is already struggling financially, why not take the money they offer and leave on good terms?

The friendship/business contacts are probably worth more than the company shares. And if the company rebounds and you miss out, well that is life. You still have been founder of a great company and that will open many future doors.

In German we would say that the smarter one compromises. Arguing only leads to both sides loosing.
There's a lot of different options at different levels of maturity, but fundamentally yes there are options that work well. I also wouldn't necessarily call Bundler a gold-standard dependency management solution, it's good but lacks more advanced features necessary for reproducible builds.
The worrying use of deepfakes in election campaigns
>This is almost the opposite of a hash function.

I would hesitate to say that. Look at hash functions built upon a sponge construction. One way to describe a sponge is that it absorbs a seed and then you can squeeze out random numbers. When building a hash function you absorb the input data and just squeeze out N bytes.
My master's thesis was about PRNGs in gaming, mostly about applications but I also did comparison of performance of several generators.

Linear Congruential was the fastest of the ones I've tried. ~27 vs ~25 FPS over more complicated generators in a simple 2d arcade game where everything was randomly generated on the fly to showcase how you can use PRNGs in games.

I don't remember if I tested xorshift or some other LFSR, it was back in 2009.

The results were highly dependent on how many times you use the generator without changing the seed, and I think most games will have similar distribution (over 50% of the time you use the same seed less than 100 times without changing) or even more skewed.

Thesis is in Polish so probably won't be of much use, but if anybody's interested:

https://easyupload.io/ub59ej
I don’t think so. It is trying to solve the wrong problem, and the problem it manages to solve has simpler solution already.

You are solving the problem where an entity (the whitehouse) wants you to know that a message came from them. Yes they can use blockchain to sign it, but they can also just put it on their website, invite the press pool for an announcement, and have their PR folks reiterate the message every so often anyone asks.

This is not the problem with deepfakes. Imagine that a harmfull footage of the president saying something terrible emerges and someone has to decide if it is real or fake. This someone might be a simple citizen, a journalist, an editor etc. They check the blockchain and see that it is not signed by the whitehouse. Does that mean that it is fake? Maybe, maybe not. Maybe the president just wants to surpress it. Maybe it was an off the cuff remark while they thought nobody is recording them, or maybe they realised that they made a mistake and decided to not sign the footage after all. Which means that the person judging the authenticity of the footage haven’t gained anything from checking the blockchain.

Just as an example: during the Trump presidential campaing the now infamous “grab them by the p*sy” footage emerged. Obviously it wasn’t an official endorsed message from his campaign. Would you say it was fake just because it wasn’t signed by them?

So how would this blockchain thing help exactly?
I was thinking more of seeing a video and the being able to verify it with the original source. Like a hash.
I've never understood why 2x27" is supposedly "crucial" for music/video production. I had two large monitors for a while; eventually I went back to one slightly larger monitor because I found it was more comfortable and ergonomic to be staring at a single surface perpendicular to my eyes.
What I mean is, “live your day like it's the last one for everyone”.

I am uncertain if robbing a bank or killing someone makes much sense if there will be no tomorrow for everyone.
Yes you are right about the differences.

So what I'm proposing is to put JavaScript in the language column (like other languages such as Java) and note the usage of Node.js as the implementation in the second column together with version (similar to Java ->
openjdk 11.0.11 2021-04-20).

Would that make sense?
Yeah but not tipping is just a civilian. Not paying off an officer of the law in a country is where things start to get a little scary, because of the authority that they wield :/

Also Americans should just get rid of tipping culture already, and pay employees what they deserve. You're a democracy, right?
That would be at best a Linux extension, not some general C behavior you can assume when writing your program.

That said though, I can't even reproduce what you're saying on Linux:

printf '%s\n' '#include <stdio.h>' 'int main() { setvbuf(stdout, NULL, _IONBF, 0); int r = fputs("Starting\n", stdout); fflush(stdout); fprintf(stderr, "%d\n", r); }' | cc -x c - && ./a.out >&-
// Prints '0' instead of dying
I built and rewrote the CSS Auditors website
Exactly - unless you are bitter and hate the company, why would you like to cause harm, in effect reduce the value of your stake?

Inactive, uninterested founders in general will only be a burden. Either you are engaged or you are not.
Russia mined the path they themselves had designated as a humanitarian corridor before. To target civilians. This is reported from Mariupol.

Please, don't come with conjectures about Ukrainians using civilians as a meat shield, this is either utterly bollocks or you need a pretty convincing source for that statement.
The data the linker is running on will generally largely be in memory (in their posted example, which is a warm compile, completely in memory).
Definitely thought-provoking. A few responses here on HN disagree with calling this a bug, so maybe the user owns the error. This is all related to what kind of contract we have in mind when creating and using such a program.

If `puts` were to be used for debug messages, it might be right not to fail so as to not disturb the rest of the program. If the primary purpose is to greet the world, then we might expect it to signal the failure. But each creator or user might have their own expected behaviors.

If a user expects different behavior, then perhaps it is a feature request:

> There's no difference between a bug and a feature request from the user's perspective.
(https://blog.codinghorror.com/thats-not-a-bug-its-a-feature-...)

The question is how the behavior can be made more explicit. I think it's a reasonable default to make programs fail often and early. If some failure can be safely ignored, it can always be implemented as an (explicit) feature.
It depends -- with a community build script, you're relying on (and trusting!) a third party to maintain it and not do anything malicious. Much easier to pay a few bucks for first party binaries. At least in my eyes.
Sending notifications programmatically: let me count the ways
I'm keeping an eye out too. I've seen a few vulnerabilities mentioned already for this tech. This site (https://hacks.mozilla.org/2020/04/experimental-webgpu-in-fir...) suggests that setting the options
“dom.webgpu.enabled = true” and “gfx.webrender.all = true” to false (where needed) could prevent it from running. I'm also guessing it's use will depend on javascript which I block by default.
Only feature missing is making the database mutable.
Indeed, first result and no error checking:

https://gobyexample.com/hello-world
Depends on level of specialisation, but yes. The problem is the same, though: the only way to guarantee 100 % utilisation is to have a long queue of things waiting to be done so nobody runs out of work. But a long queue also means high latency.

In order to reduce latency, you have to have a short queue, which means people will run out of work sometimes and be idle.
Any possibility to also add index to a virtual table in SQLite? Normally you can’t: https://sqlite.org/vtab.html
I thought crypto was invented to prevent this kind of stuff ?
Right this second it reports that transferring 10,000 GBP would give you 12,000.71 EUR vs the 11,949.73 EUR you would get by using Wise, which is probably the best known competitor. Seems pretty good to me!
Optimizing Lambda Performance for Your Serverless Applications
"Prosumer" is also a somewhat vague term. It's probably supposed to mean consumers with lots of disposable income, but if you're an engineer, developer, video editor, or studio musician it just means you think of Apple hardware as a business expense.
I think I already addressed "rational self-interest" (and how it can lead to stupidity) elsewhere in the thread. It's not an end-all be-all of human nature.
I get it. I've had my share of bad managers.

What you described sounds like a performance review... I think 1:1s should be monthly or weekly, depending on the team.
But Lunduke must have known.
Note that Aseprite is source-available but not FOSS, the license explicitly forbids redistribution. It used to be FOSS at the past though.
I built a file upload service without any external library, just pure JavaScript
APC Ups – Critical-Vulnerability
> It's not just prosumers; it's normies who just want a good computer made by a company they've heard of and trust vs. a cheap plastic 3rd tier PC from a manufacturer they're vaguely familiar with

It's like when people say their iPhone is better quality than a $200 Xiaomi phone. Well, duh??? Why are you even comparing them? If you look at higher tier Xiaomi phones, or in your example, laptops from reputable companies such as Dell, HP, Lenovo, Asus, they're much closer in build quality, have a choice of tradeoffs ( you can choose if you want small, light, long battery life, type of screen, ports, performance, etc. and not have Apple choose), and were still quite a bit cheaper than equivalent specs Macbooks. That's no longer quite as valid for laptops due to the M1s l, but is still valid for phones.
That's a POSIX thing. It doesn't apply to all C implementations but it does apply to many more than just Linux-based ones. You've not got a closed pipe so you wouldn't see it, you've just got a closed file descriptor. Try running it as

./a.out | :

and you will probably see it. I say probably because there is a timing aspect as well, the write may happen before the pipe gets closed in which case it will not fail, but it is unlikely to.
The vast majority of people with 120hz+ displays do not play video games. They're standard in mid-range TVs. They're standard in mid to high-end phones. They're standard in high end tablets. Gamers are a minority of the 120hz panel market. They're certainly also a minority of the people discussing this panel on reddit, 5k is too high resolution for gaming and 120hz is too slow, people weren't wanting a 5k120hz panel to play games, they wanted it for productivity and at most to play games on the side.

Low refresh rate is bad for pros for the same reason it's bad for gamers, it makes it harder to quickly and accurately perceive things in motion and it slows down your ability to accurately execute inputs. I feel the effects of the reality distortion field has caused everybody to believe that quite simply no real professionals could dislike working on 60hz LCDs and the disappointment is all caused by all those silly gamers.
Good points and you raise some issues I hadn’t considered. I honestly don’t know :)

My idea of the blockchain is that it is a chain that could be a chain of trust. Since it seems it is hard to temper with whoever owns an endpoint. But like you say there are other means for that.
Previously:

https://news.ycombinator.com/item?id=6913467 (2013, 145 comments)

https://news.ycombinator.com/item?id=10491768 (2015, 11 comments)

https://news.ycombinator.com/item?id=18206463 (2018, 22 comments)
On this day, 5 years ago, AlphaGo beated the Go Master Mr Lee Sedol
>L1: 128 KB instruction, 64 KB data, L2: 4 MB

Writing this would make no sense, knowing how many (more) transistors M1 has. In very simple terms one bit of SRAM is 6 transistors (+some extra for addressing).

Also comparing M1 Ultra to consumer grade chips is quite pointless, x86-64 consumer grade ones have just 2 memory channels.
> Also, if a program produces output with a well-defined syntax, then the termination status may be superfluous; the truncation of the output can be detected by virtue of that syntax being incomplete.

The author covers this (or rather, the possibility that truncation can not be detected).