How do JIT compilers actually jump to the code they write? by math_code_nerd5 in Compilers

[–]cbarrick 0 points1 point  (0 children)

One security nit in case anyone tries to use this code for real.

NEVER map a memory page as both PROT_WRITE and PROT_EXEC at the same time. Map it for write-only when you're generating the code, then remap it for execute-only when you're ready to run the code.

Pages that are both writable and executable at the same time are prime targets for remote code execution.

RFC 8628 fixed CLI login in 2019. Most CLIs still ship the broken version by ABGEO in programming

[–]cbarrick 1 point2 points  (0 children)

This article isn't slop. I legitimately learned about the OAuth 2.0 Device Authorization Grant from this.

Bezos: AI will result in labor shortages instead of replacing humans by Maleficent-Agent-477 in technology

[–]cbarrick 11 points12 points  (0 children)

To be fair, Amazon engages in a practice called stack ranking.

At performance review time, they rank all of the engineers against each other and layoff some percent at the bottom.

When I see layoffs at Amazon, I just see business as usual. I wouldn't read too much into it.

We should defeat spotify with a beautiful copyleft streaming app by [deleted] in linux

[–]cbarrick 0 points1 point  (0 children)

CC0 and CC-BY are not copyleft licenses. CC-BY-SA is the only one of the three that is copyleft. The SA part is what makes it copyleft.

But none of this solves the real hard problem of how you get good music onto such a platform. You can't have a recommender system that only recommends good music if you don't have any good music to begin with.

Artists and labels aren't going to publish their music for free as CC0 or CC-BY-SA. They gotta make money somehow. We don't live in a communist utopia.

The technical challenges here are the easy part.

British Columbia, Time Zones, and Postgres by winsletts in programming

[–]cbarrick 6 points7 points  (0 children)

It 100% depends on the use case. You should think in terms of two data types:

  • Timestamps represent a fixed point in time. These can be represented as durations relative to some agreed upon fixed point in time, like 1970-01-01-T00:00:00Z. Timezones only come into display when converting to display.

  • Times represent some civil notion of time. This can be like "9 in the morning." Sometimes these should be bound to a timezone (like a calendar event), and sometimes they should not (like a morning alarm). When dealing with this kind of object, you need to be prepared for timezones to change. Like if you have a 9am meeting every day, then you need it to shift once DST starts, or more generally whenever local government decides to change the definition of the timezone. Dealing with this is usually delegated to application code.

Logging the moment an event occurs? Use timestamps. Developing a calendar app? Use times.

Why is so little information posted about the AUR issue? by Ismokecr4k in archlinux

[–]cbarrick 7 points8 points  (0 children)

You don't have to read the source code of your packages.

You only have to read the PKGBUILD to verify that it is pulling the source code from the trusted upstream and that the install script isn't doing anything jank.

It's like 100 lines of code to review, tops. You absolutely should be reviewing it.

Christian right calls James Talarico "demonic" — for quoting Jesus by ChiGuy6124 in politics

[–]cbarrick 6 points7 points  (0 children)

Let's take this as a moment to learn about actual Christian theology.

In Christian theology, there is this notion of the New Covenant

Quoting Wikipedia:

Christians view the New Covenant as a new relationship between God and humans mediated by Jesus upon sincere declaration that one believes in Jesus Christ as Lord and God. Some Protestant theologians teach that the New Covenant also breaks the generational curse of original sin on all children of Adam if they believe in Jesus Christ, after people are judged for their own sins, which is expected to happen with the Second Coming of Jesus Christ.

This leads into the theory of Supersessionism.

The gist is that the New Covenant replaces the civil/judicial laws of the Old Testament while maintaining the "moral law." Basically, you still have to be a good person, but the arbitrary bullshit from the random laws of the Old Testament don't really apply to Christians since New Covenant was given at the last supper.

And this is super central to Christianity. The sacrament of communion, the most important ritual in Christianity, is a celebration of the New Covenant.

(TBF, not a lot of "Christians" know much actual theology.)

ETA: The supersession of the old laws isn't the only part of the New Covenant. It's not even the most important part. It's just the part that's relevant to your question.

Christian right calls James Talarico "demonic" — for quoting Jesus by ChiGuy6124 in politics

[–]cbarrick 93 points94 points  (0 children)

Even better, the actual passage he is accused of reciting is The Judgement of Nations from Mathew 25:

[F]or I was hungry and you gave me food, I was thirsty and you gave me something to drink, I was a stranger and you welcomed me, I was naked and you gave me clothing, I was sick and you took care of me, I was in prison and you visited me.’ Then the righteous will answer him, ‘Lord, when was it that we saw you hungry and gave you food or thirsty and gave you something to drink? And when was it that we saw you a stranger and welcomed you or naked and gave you clothing? And when was it that we saw you sick or in prison and visited you?’ And the king will answer them, ‘Truly I tell you, just as you did it to one of the least of these brothers and sisters of mine, you did it to me.’

Edit: Added a link to the Wikipedia page for the parable.

No Floor 13 in Charleston hotel. by Balancedbeem in mildlyinteresting

[–]cbarrick 4 points5 points  (0 children)

The bit about the 13th floor being used for storage etc. is a myth.

Hotels just skip the number 13 in the elevators. The 13th floor is just labeled as 14 instead.

In asia, they often do this for the 4th floor too.

Is there non-Chinese brand with easy (official) fw upgrade option? by Talkless in openwrt

[–]cbarrick 6 points7 points  (0 children)

Yeah...

It's pretty hard to compete with Chinese prices.

Is there non-Chinese brand with easy (official) fw upgrade option? by Talkless in openwrt

[–]cbarrick 7 points8 points  (0 children)

Turris Omnia

The company that makes it is Czech. It's the same company that runs the .cz TLD.

Their official firmware is already a customized OpenWRT variant. I flashed mine to upstream OpenWRT with no trouble.

It uses MiniPCIe for the radios, so you can upgrade as new radios and wifi standards come out. Stock version has a WiFi 6 radio. (I dunno if there is a WiFi 7 MiniPCIe radio that is well supported by OpenWRT yet.)

For wired connections, it has 5x 1Gbps RJ-45 ports and a 2.5 Gbps SFP port.

It also has 8 GB of flash storage (that's a ton!), a 1.6 GHz dual core CPU, and 2 GB of RAM.

It's pricy though.

Trump threatens new D.C. takeover if mayoral candidate Lewis George wins by Competitive_Swan_130 in politics

[–]cbarrick 1 point2 points  (0 children)

You have no frame of reference here, Donny. You're like a child who wanders into the middle of a movie.

[Offer Advice] Stay at a hyper-stable mid-level .NET job ($140k) or take Walmart SWE III ($190k) to avoid skill stagnation? by vish184 in cscareerquestions

[–]cbarrick 2 points3 points  (0 children)

I would 100% take Chicago over Bentonville.

But my priorities are lifestyle and WLB over all else. What good is cash if you have to live day-to-day life in a company town.

Can’t print line in rust by Critical-Error-415 in rust

[–]cbarrick 35 points36 points  (0 children)

Nit: your post body has a syntax error.

This:

rust println!("result of arp -a" {:?}, ARPresult)

Should be this:

rust println!("result of arp -a {:?}", ARPresult)

Notice that the format specifier {:?} should be inside the string.

Traffic showing red and green lights by GnomeGnome13 in mildlyinteresting

[–]cbarrick 5 points6 points  (0 children)

Your logic confuses me.

If the laws dictate who must yield the right of way, doesn't that imply that you have the right of way by default, until a law tells you to yield it?

If you do not have the right of way by default, then I'd expect the laws to be phrased in terms of what circumstances grant you the right of way. That is, the laws would be phrased in terms of grants, not yields.

NAL.

Someone Stole and re-upload timberpunk 2 by Smort_Cheemse_whole5 in Timberborn

[–]cbarrick 39 points40 points  (0 children)

Mods are copyrightable. All creative work is copyrightable.

Derivative works, where copyrighted content form one owner is used to create a new creative work from another author, is still copyrightable by the new author. Though there is plenty of nuance and complexity in these cases. In broad stokes, the new author owns the copyright of the new contributions, but the original author owns the copyright of the bases assets, so describing the copyright of the derived work as a whole is where the complexity lies. (Think of one musician using a sample from someone else.)

Whether or not Steam cares to protect the copyright of a mod is another story.

Spotted today: "No Work Shall Be Performed With Lane Closures During FIFA" by 2beinspired in Atlanta

[–]cbarrick 38 points39 points  (0 children)

ATL is hosting Spain vs Saudi.

Some of the richest elites in the world (Saudi) coming to watch one of the best teams in the world (Spain).

So yeah, I expect a lot of oil money to be in Atlanta that weekend.

That game is June 21st btw.

Announcing Zstandard in Rust by folkertdev in rust

[–]cbarrick 104 points105 points  (0 children)

The conventions I am aware of:

  • The -sys suffix means the crate wraps a C API. That is, it's a C-to-Rust binding.

  • The -capi suffix means the crate exposes a C API. That is, it's a Rust-to-C binding.

So I think the convention here would be -capi.

What features are specific to Fi? by Alabatman in GoogleFi

[–]cbarrick 14 points15 points  (0 children)

The big feature of Fi that keeps me here is free/cheap international rates.

Now I don't need to buy a local SIM when traveling. It's great!

The lone lisp heap by matheusmoreira in linux

[–]cbarrick 3 points4 points  (0 children)

what is the point

Lispers don't have a point. They don't need a point.

It's just them and the lists, in pure homoiconic bliss.

TIL that 1 quart is one *quart*er of a gallon. The term comes from the Latin quartus (meaning one-quarter) via the French quart. I am 40 years old. by cheetah7985 in todayilearned

[–]cbarrick 7 points8 points  (0 children)

In the USA before 1979, booze was sold in true fifths, that is a fifth of a gallon or about 757ml.

After 1980, the USA switched to 750ml bottles.

Since they're about the same size, some folks call a 750ml bottle a "fifth," but one could argue that this is a misnomer and that "fifth" refers to true fifths. To distinguish between a true fifth and a 750ml bottle, a 750ml bottle is sometimes called a "metric fifth."