pzmyers@octodon.social ("pzmyers 🦑") wrote:
I pragmatically oppose chickenshit.
https://freethoughtblogs.com/pharyngula/2024/10/17/everyones-views-except-mine-are-extremist/
The wait is over*—The #Mastodon stuffed toy is now available for purchase in the EU! Other regions to come later. Share your pictures with the #Plushtodon hashtag!
Reblogged by fromjason ("fromjason.xyz ❤️ 💻"):
BlackAzizAnansi@mas.to ("Black Aziz Anansi :vm:") wrote:
I'm declaring myself emperor for life of the fediverse.
collinsworth@hachyderm.io ("Josh Collinsworth") wrote:
Increasingly, my strongest frontend opinion is that styles and markup should never, ever come from more than one source.
Send and receive data only.
Turn it into markup after you get it. Style it if you want to. But never, ever let markup or styling in the front door.
Reblogged by fromjason ("fromjason.xyz ❤️ 💻"):
ilovewebsites@social.lol ("I ❤️ Websites Club") wrote:
Death to Bullshit.
This might be the first techno-manifesto I ever read. Looking back, Death to Bullshit feels ahead of its time. It's more relevant today than ever.
pzmyers@octodon.social ("pzmyers 🦑") wrote:
Just two more days of writhing in the bowels of capitalism.
Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):
saul@social.coop ("Saul Shanabrook") wrote:
coop bandcamp! https://subvert.fm/
How you doin'?
Gargron ("Eugen Rochko") wrote:
We're still working on making shipping to other countries possible, and believe me, I will post about it once it is. I want everyone to be able to get one... If you're in the EU and you've missed it you can get yours here: https://shop.joinmastodon.org/products/mastodon-plushie
Gargron ("Eugen Rochko") wrote:
Half of the EU stock for the Mastodon plushie has been claimed over the last two days. What's perhaps even more exciting is that I think some of the first orders should be arriving at people's homes today (depending on locality), and I'm really looking forward to seeing The Creature in the #Plushtodon hashtag.
Reblogged by keul@fosstodon.org ("Luca Fabbri"):
markwyner@mas.to ("Mark Wyner :vm:") wrote:
This made me laugh. The English language is absurd. People capable of learning it as a second language are highly intelligent.
Credit: Bobby Finn
Reblogged by keul@fosstodon.org ("Luca Fabbri"):
plone@plone.social ("Plone") wrote:
23 years ago the first release of Plone 0.1 saw the daylight, and about 23 hours ago the latest release to the Plone project was made. Just how amazing it is, that this open source CMS has been around for so long, and is still being developed further by this active and lovely community?
Happy birthday Plone! 😍 🎂
#plone #plone6 #CMS #opensource #websites #volto #Python #React #community
Reblogged by keul@fosstodon.org ("Luca Fabbri"):
dgar@aus.social ("Dgar") wrote:
The historic moment when humans and germs sign into law the "Five Second Rule".
slightlyoff@toot.cafe ("Alex Russell") wrote:
Fascinating post. Cloudflare Workers are The Right Design (TM) for most "serverless" stuff, and the abstraction of their k/v store is super useful, but I didn't know much about the Durable Objects abstraction:
https://digest.browsertech.com/archive/browsertech-digest-cloudflares-durable/
fromjason ("fromjason.xyz ❤️ 💻") wrote:
Maybe the most harrowing thing I've ever read. This is pure evil.
https://www.nytimes.com/interactive/2024/10/09/opinion/gaza-doctor-interviews.html
Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):
anji@metalhead.club ("Matthijs De Smedt") wrote:
It can never be understated how far ahead of his time, or perhaps exactly -on- the technological frontier of his time, Jimi Hendrix was
He was the pioneer of using dimed Marshall amps, fuzz pedals, octave pedals, and more. So much of the sound of guitar music I love is owed to Jimi
The Rust team is happy to announce a new version of Rust, 1.82.0. Rust is a programming language empowering everyone to build reliable and efficient software.
If you have a previous version of Rust installed via rustup
, you can get 1.82.0 with:
$ rustup update stable
If you don't have it already, you can get rustup from the appropriate page on our website, and check out the detailed release notes for 1.82.0.
If you'd like to help us out by testing future releases, you might consider updating locally to use the beta channel (rustup default beta
) or the nightly channel (rustup default nightly
). Please report any bugs you might come across!
cargo info
Cargo now has an info subcommand to display information about a package in the registry, fulfilling a long standing request just shy of its tenth anniversary! Several third-party extensions like this have been written over the years, and this implementation was developed as cargo-information before merging into Cargo itself.
For example, here's what you could see for cargo info cc
:
**cc** **#build-dependencies** A build-time dependency for Cargo build scripts to assist in invoking the native C compiler to compile native C code into a static archive to be linked into Rust code. **version:** 1.1.23 **(latest 1.1.30)** **license:** MIT OR Apache-2.0 **rust-version:** 1.63 **documentation:** https://docs.rs/cc **homepage:** https://github.com/rust-lang/cc-rs **repository:** https://github.com/rust-lang/cc-rs **crates.io:** https://crates.io/crates/cc/1.1.23 **features:** jobserver = [] parallel = [dep:libc, dep:jobserver] **note** **:** to see how you depend on cc, run `**cargo tree --invert --package cc@1.1.23**`
By default, cargo info
describes the package version in the local Cargo.lock
, if any. As you can see, it will indicate when there's a newer version too, and cargo info cc@1.1.30
would report on that.
The Rust target aarch64-apple-darwin
for macOS on 64-bit ARM (M1-family or later Apple Silicon CPUs) is now a tier 1 target, indicating our highest guarantee of working properly. As the platform support page describes, every change in the Rust repository must pass full tests on every tier 1 target before it can be merged. This target was introduced as tier 2 back in Rust 1.49, making it available in rustup
. This new milestone puts the aarch64-apple-darwin
target on par with the 64-bit ARM Linux and the X86 macOS, Linux, and Windows targets.
Mac Catalyst is a technology by Apple that allows running iOS applications natively on the Mac. This is especially useful when testing iOS-specific code, as cargo test --target=aarch64-apple-ios-macabi --target=x86_64-apple-ios-macabi
mostly just works (in contrast to the usual iOS targets, which need to be bundled using external tooling before they can be run on a native device or in the simulator).
The targets are now tier 2, and can be downloaded with rustup target add aarch64-apple-ios-macabi x86_64-apple-ios-macabi
, so now is an excellent time to update your CI pipeline to test that your code also runs in iOS-like environments.
use<..>
syntaxRust now supports use<..>
syntax within certain impl Trait
bounds to control which generic lifetime parameters are captured.
Return-position impl Trait
(RPIT) types in Rust capture certain generic parameters. Capturing a generic parameter allows that parameter to be used in the hidden type. That in turn affects borrow checking.
In Rust 2021 and earlier editions, lifetime parameters are not captured in opaque types on bare functions and on functions and methods of inherent impls unless those lifetime parameters are mentioned syntactically in the opaque type. E.g., this is an error:
//@ edition: 2021
fn f(x: &()) -> impl Sized { x }
error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
--> src/main.rs:1:30
|
1 | fn f(x: &()) -> impl Sized { x }
| --- ---------- ^
| | |
| | opaque type defined here
| hidden type `&()` captures the anonymous lifetime defined here
|
help: add a `use<...>` bound to explicitly capture `'_`
|
1 | fn f(x: &()) -> impl Sized + use<'_> { x }
| +++++++++
With the new use<..>
syntax, we can fix this, as suggested in the error, by writing:
fn f(x: &()) -> impl Sized + use<'_> { x }
Previously, correctly fixing this class of error required defining a dummy trait, conventionally called Captures
, and using it as follows:
trait Captures<T: ?Sized> {}
impl<T: ?Sized, U: ?Sized> Captures<T> for U {}
fn f(x: &()) -> impl Sized + Captures<&'_ ()> { x }
That was called "the Captures trick", and it was a bit baroque and subtle. It's no longer needed.
There was a less correct but more convenient way to fix this that was often used called "the outlives trick". The compiler even previously suggested doing this. That trick looked like this:
fn f(x: &()) -> impl Sized + '_ { x }
In this simple case, the trick is exactly equivalent to + use<'_>
for subtle reasons explained in RFC 3498. However, in real life cases, this overconstrains the bounds on the returned opaque type, leading to problems. For example, consider this code, which is inspired by a real case in the Rust compiler:
struct Ctx<'cx>(&'cx u8);
fn f<'cx, 'a>(
cx: Ctx<'cx>,
x: &'a u8,
) -> impl Iterator<Item = &'a u8> + 'cx {
core::iter::once_with(move || {
eprintln!("LOG: {}", cx.0);
x
})
//~^ ERROR lifetime may not live long enough
}
We can't remove the + 'cx
, since the lifetime is used in the hidden type and so must be captured. Neither can we add a bound of 'a: 'cx
, since these lifetimes are not actually related and it won't in general be true that 'a
outlives 'cx
. If we write + use<'cx, 'a>
instead, however, this will work and have the correct bounds.
There are some limitations to what we're stabilizing today. The use<..>
syntax cannot currently appear within traits or within trait impls (but note that there, in-scope lifetime parameters are already captured by default), and it must list all in-scope generic type and const parameters. We hope to lift these restrictions over time.
Note that in Rust 2024, the examples above will "just work" without needing use<..>
syntax (or any tricks). This is because in the new edition, opaque types will automatically capture all lifetime parameters in scope. This is a better default, and we've seen a lot of evidence about how this cleans up code. In Rust 2024, use<..>
syntax will serve as an important way of opting-out of that default.
For more details about use<..>
syntax, capturing, and how this applies to Rust 2024, see the "RPIT lifetime capture rules" chapter of the edition guide. For details about the overall direction, see our recent blog post, "Changes to impl Trait in Rust 2024".
Unsafe code sometimes has to deal with pointers that may dangle, may be misaligned, or may not point to valid data. A common case where this comes up are repr(packed)
structs. In such a case, it is important to avoid creating a reference, as that would cause undefined behavior. This means the usual &
and &mut
operators cannot be used, as those create a reference -- even if the reference is immediately cast to a raw pointer, it's too late to avoid the undefined behavior.
For several years, the macros std::ptr::addr_of!
and std::ptr::addr_of_mut!
have served this purpose. Now the time has come to provide a proper native syntax for this operation: addr_of!(expr)
becomes &raw const expr
, and addr_of_mut!(expr)
becomes &raw mut expr
. For example:
#[repr(packed)]
struct Packed {
not_aligned_field: i32,
}
fn main() {
let p = Packed { not_aligned_field: 1_82 };
// This would be undefined behavior!
// It is rejected by the compiler.
//let ptr = &p.not_aligned_field as *const i32;
// This is the old way of creating a pointer.
let ptr = std::ptr::addr_of!(p.not_aligned_field);
// This is the new way.
let ptr = &raw const p.not_aligned_field;
// Accessing the pointer has not changed.
// Note that `val = *ptr` would be undefined behavior because
// the pointer is not aligned!
let val = unsafe { ptr.read_unaligned() };
}
The native syntax makes it more clear that the operand expression of these operators is interpreted as a place expression. It also avoids the term "address-of" when referring to the action of creating a pointer. A pointer is more than just an address, so Rust is moving away from terms like "address-of" that reaffirm a false equivalence of pointers and addresses.
unsafe extern
Rust code can use functions and statics from foreign code. The type signatures of these foreign items are provided in extern
blocks. Historically, all items within extern
blocks have been unsafe to use, but we didn't have to write unsafe
anywhere on the extern
block itself.
However, if a signature within the extern
block is incorrect, then using that item will result in undefined behavior. Would that be the fault of the person who wrote the extern
block, or the person who used that item?
We've decided that it's the responsibility of the person writing the extern
block to ensure that all signatures contained within it are correct, and so we now allow writing unsafe extern
:
unsafe extern {
pub safe static TAU: f64;
pub safe fn sqrt(x: f64) -> f64;
pub unsafe fn strlen(p: *const u8) -> usize;
}
One benefit of this is that items within an unsafe extern
block can be marked as safe to use. In the above example, we can call sqrt
or read TAU
without using unsafe
. Items that aren't marked with either safe
or unsafe
are conservatively assumed to be unsafe
.
In future releases, we'll be encouraging the use of unsafe extern
with lints. Starting in Rust 2024, using unsafe extern
will be required.
For further details, see RFC 3484 and the "Unsafe extern blocks" chapter of the edition guide.
Some Rust attributes, such as no_mangle, can be used to cause undefined behavior without any unsafe block. If this were regular code we would require them to be placed in an unsafe {}
block, but so far attributes have not had comparable syntax. To reflect the fact that these attributes can undermine Rust's safety guarantees, they are now considered "unsafe" and should be written as follows:
#[unsafe(no_mangle)]
pub fn my_global_function() { }
The old form of the attribute (without unsafe
) is currently still accepted, but might be linted against at some point in the future, and will be a hard error in Rust 2024.
This affects the following attributes:
no_mangle
link_section
export_name
For further details, see the "Unsafe attributes" chapter of the edition guide.
Patterns which match empty (a.k.a. uninhabited) types by value can now be omitted:
use std::convert::Infallible;
pub fn unwrap_without_panic<T>(x: Result<T, Infallible>) -> T {
let Ok(x) = x; // the `Err` case does not need to appear
x
}
This works with empty types such as a variant-less enum Void {}
, or structs and enums with a visible empty field and no #[non_exhaustive]
attribute. It will also be particularly useful in combination with the never type !
, although that type is still unstable at this time.
There are some cases where empty patterns must still be written. For reasons related to uninitialized values and unsafe code, omitting patterns is not allowed if the empty type is accessed through a reference, pointer, or union field:
pub fn unwrap_ref_without_panic<T>(x: &Result<T, Infallible>) -> &T {
match x {
Ok(x) => x,
// this arm cannot be omitted because of the reference
Err(infallible) => match *infallible {},
}
}
To avoid interfering with crates that wish to support several Rust versions, match
arms with empty patterns are not yet reported as “unreachable code” warnings, despite the fact that they can be removed.
const
Operations on floating-point values (of type f32
and f64
) are famously subtle. One of the reasons for this is the existence of NaN ("not a number") values which are used to represent e.g. the result of 0.0 / 0.0
. What makes NaN values subtle is that more than one possible NaN value exists. A NaN value has a sign (that can be checked with f.is_sign_positive()
) and a payload (that can be extracted with f.to_bits()
). However, both the sign and payload of NaN values are entirely ignored by ==
(which always returns false
). Despite very successful efforts to standardize the behavior of floating-point operations across hardware architectures, the details of when a NaN is positive or negative and what its exact payload is differ across architectures. To make matters even more complicated, Rust and its LLVM backend apply optimizations to floating-point operations when the exact numeric result is guaranteed not to change, but those optimizations can change which NaN value is produced. For instance, f * 1.0
may be optimized to just f
. However, if f
is a NaN, this can change the exact bit pattern of the result!
With this release, Rust standardizes on a set of rules for how NaN values behave. This set of rules is not fully deterministic, which means that the result of operations like (0.0 / 0.0).is_sign_positive()
can differ depending on the hardware architecture, optimization levels, and the surrounding code. Code that aims to be fully portable should avoid using to_bits
and should use f.signum() == 1.0
instead of f.is_sign_positive()
. However, the rules are carefully chosen to still allow advanced data representation techniques such as NaN boxing to be implemented in Rust code. For more details on what the exact rules are, check out our documentation.
With the semantics for NaN values settled, this release also permits the use of floating-point operations in const fn
. Due to the reasons described above, operations like (0.0 / 0.0).is_sign_positive()
(which will be const-stable in Rust 1.83) can produce a different result when executed at compile-time vs at run-time. This is not a bug, and code must not rely on a const fn
always producing the exact same result.
The const
assembly operand now provides a way to use integers as immediates without first storing them in a register. As an example, we implement a syscall towrite by hand:
const WRITE_SYSCALL: c_int = 0x01; // syscall 1 is `write`
const STDOUT_HANDLE: c_int = 0x01; // `stdout` has file handle 1
const MSG: &str = "Hello, world!\n";
let written: usize;
// Signature: `ssize_t write(int fd, const void buf[], size_t count)`
unsafe {
core::arch::asm!(
"mov rax, {SYSCALL} // rax holds the syscall number",
"mov rdi, {OUTPUT} // rdi is `fd` (first argument)",
"mov rdx, {LEN} // rdx is `count` (third argument)",
"syscall // invoke the syscall",
"mov {written}, rax // save the return value",
SYSCALL = const WRITE_SYSCALL,
OUTPUT = const STDOUT_HANDLE,
LEN = const MSG.len(),
in("rsi") MSG.as_ptr(), // rsi is `buf *` (second argument)
written = out(reg) written,
);
}
assert_eq!(written, MSG.len());
Output:
Hello, world!
In the above, a statement such as LEN = const MSG.len()
populates the format specifier LEN
with an immediate that takes the value of MSG.len()
. This can be seen in the generated assembly (the value is 14
):
lea rsi, [rip + .L__unnamed_3]
mov rax, 1 # rax holds the syscall number
mov rdi, 1 # rdi is `fd` (first argument)
mov rdx, 14 # rdx is `count` (third argument)
syscall # invoke the syscall
mov rax, rax # save the return value
See the referencefor more details.
static
sThis code is now allowed:
static mut STATIC_MUT: Type = Type::new();
extern "C" {
static EXTERN_STATIC: Type;
}
fn main() {
let static_mut_ptr = &raw mut STATIC_MUT;
let extern_static_ptr = &raw const EXTERN_STATIC;
}
In an expression context, STATIC_MUT
and EXTERN_STATIC
are place expressions. Previously, the compiler's safety checks were not aware that the raw ref operator did not actually affect the operand's place, treating it as a possible read or write to a pointer. No unsafety is actually present, however, as it just creates a pointer.
Relaxing this may cause problems where some unsafe blocks are now reported as unused if you deny the unused_unsafe
lint, but they are now only useful on older versions. Annotate these unsafe blocks with #[allow(unused_unsafe)]
if you wish to support multiple versions of Rust, as in this example diff:
static mut STATIC_MUT: Type = Type::new();
fn main() {
+ #[allow(unused_unsafe)]
let static_mut_ptr = unsafe { std::ptr::addr_of_mut!(STATIC_MUT) };
}
A future version of Rust is expected to generalize this to other expressions which would be safe in this position, not just statics.
These APIs are now stable in const contexts:
Check out everything that changed in Rust, Cargo, and Clippy.
Many people came together to create Rust 1.82.0. We couldn't have done it without all of you. Thanks!
Reblogged by collinsworth@hachyderm.io ("Josh Collinsworth"):
aworkinglibrary@mstdn.social ("mandy brown") wrote:
“For an accountability sink to function, it has to break a link; it has to prevent the feedback of the person affected by the decision from affecting the operation of the system.” https://aworkinglibrary.com/writing/accountability-sinks
Reblogged by collinsworth@hachyderm.io ("Josh Collinsworth"):
cederbs@infosec.exchange ("2Spooky4Cederbs") wrote:
You ever seen something so painfully out of touch and oblivious it hurts?
xor@tech.intersects.art ("Parker Higgins") wrote:
I think all the time about when the Markup launched and they had to talk to 8 companies to find somebody who would _build_ the ability to turn off click-tracking for their newsletter https://themarkup.org/newsletter/hello-world/hello-from-the-markup
xor@tech.intersects.art ("Parker Higgins") wrote:
so funny ("funny") when you have some need for a privacy-preserving feature and literally nobody ships it because why would they
Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):
seachanger@alaskan.social ("wet forest moon folklorist") wrote:
Jon batiste / für Elise
cstanhope@social.coop ("Your friendly 'net denizen") wrote:
Rick Astley voice: The horrors persist but so do I.
Reblogged by mbrubeck@mefi.social:
catandgirl@socel.net ("Cat and Girl") wrote:
Red and white.
Reblogged by collinsworth@hachyderm.io ("Josh Collinsworth"):
bw@social.lol ("Blake Watson :prami:") wrote:
The wait is over. HTML for People is OUT NOW!
I feel strongly that anyone should be able to make a website with HTML if they want. This web book will teach you how to do just that. It doesn’t require any previous experience making websites or coding. I will cover everything you need to know to get started in an approachable and friendly way.
And it’s free for all. 🚀
Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):
allisonchinart@mastodon.art ("Allisonchinart") wrote:
Flying in the Light
Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):
0xabad1dea@infosec.exchange ("abadidea") wrote:
(this is from 2018 but it's a gem) speculative execution almost destroyed the xbox 360 https://randomascii.wordpress.com/2018/01/07/finding-a-cpu-design-bug-in-the-xbox-360/
Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):
prahou@merveilles.town ("Tomáš") wrote:
Patrolling 2
Reblogged by fromjason ("fromjason.xyz ❤️ 💻"):
ilovewebsites@social.lol ("I ❤️ Websites Club") wrote:
This is a motherf*cking website.
I revisit this motherf*cking website at least once per year because I make motherf*cking websites for a living.
I love this motherf*cking website. It keeps me motherf*cking humble.
pzmyers@octodon.social ("pzmyers 🦑") wrote:
Would you like to speak to an AI version of a Biblical patriarch? I've seen too much Star Trek, I think it would be fun to try & make it melt down.
pzmyers@octodon.social ("pzmyers 🦑") wrote:
There's no such thing as a non-racist eugenicist.
https://freethoughtblogs.com/pharyngula/2024/10/16/ra-fisher-rises-again/
Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):
wim_v12e@scholar.social ("Wim🧮") wrote:
I participated in a RIPE NCC Open House on Green Tech and Sustainability in Internet Technologies, and the talks by the two other speakers were very interesting
pzmyers@octodon.social ("pzmyers 🦑") wrote:
Old and new(er).
https://freethoughtblogs.com/pharyngula/2024/10/16/found-in-a-back-room-at-my-mothers-house/
Here’s a thorough guide that covers everything you need to know to migrate your CommonJS project to ESM.
Reblogged by kornel ("Kornel"):
be@floss.social ("CEO of Anti-Clock Society") wrote:
Nation’s Indigenous People Confirm They Don’t Need Special Holiday, Just Large Swaths Of Land Returned Immediately
https://theonion.com/nation-s-indigenous-people-confirm-they-don-t-need-spec-1839033177/
Gargron ("Eugen Rochko") wrote:
Good morning! Almost half of the EU stock of the stuffed Mastodon toy was sold yesterday. I've reserved a 100 units for when we can start selling to the UK. The rest still need a loving home!
Reblogged by slightlyoff@toot.cafe ("Alex Russell"):
simon_on_energy@fediscience.org ("Simon Waldman") wrote:
AI really is the new bitcoin: Google and Facebook extend coal burning in Omaha
The question we should be asking of every new technology : is it worth the resources that it costs?
(one of the resources, in this case, being our rapidly diminishing global carbon budget)
Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):
ninawillburger@social.anoxinon.de ("Nina Willburger") wrote:
I'm in awe: holding a 40,000-year-old #IceAge masterpiece in your hand is something you don't get to do every day!
The amazing figurine of a woolly mammoth is carved in mammoth ivory. It will be on display at Archäologisches Landesmuseum Baden-Württemberg from Saturday.Found in the Vogelherd cave on the Swabian Jura, south-west Germany.
And yes, I'm really, really happy 😊
Reblogged by fromjason ("fromjason.xyz ❤️ 💻"):
danilo@hachyderm.io ("Danilo Campos 🇵🇷") wrote:
Among the most tediously evil weasels in the game, yes, but I’m glad their masks are finally off
it’s always exhausting to buy early on “these guys are enormous dickheads”
https://techhub.social/@Techmeme/113314591927833243
collinsworth@hachyderm.io ("Josh Collinsworth") wrote:
I'm sure I'm probably not the first person to coin the term "batshitty," but I feel it's especially apt here, as it implies both insanity and shittiness.
collinsworth@hachyderm.io ("Josh Collinsworth") wrote:
Matt Mullenweg is like a human Advent calendar but where every day just gets more unbelievably batshitty
Reblogged by collinsworth@hachyderm.io ("Josh Collinsworth"):
ComicContext@mstdn.social ("Comics Outta Context") wrote:
Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):
gustedt.wordpress.com@gustedt.wordpress.com ("Jens Gustedt's Blog") wrote:
The C23 edition of Modern C is now available for free download from
https://hal.inria.fr/hal-02383654
This new edition has been the occasion to overhaul the presentation in many places, but its main purpose is the update to the new C standard, C23. The goal was to publish this new edition of Modern C at the same time as the new C standard goes through the procedure of ISO publication. The closest approximation of the contents of the new standard in a publically available document can be found here. New releases of major compilers already implement most of the new features that it brings.
Among the most noticeable changes and additions that we handle are those for integers: there are new bit-precise types coined
_BitInt(N)
, new C library headers(for arithmetic with overflow check) and
(for bit manipulation), possibilities for 128 bit types on modern architectures, and substantial improvements for enumeration types. Other new concepts in C23 include anullptr
constant and its underlying type, syntactic annotation with attributes, more tools for type generic programming such as type inference withauto
andtypeof
, default initialization with{}
, even for variable length arrays, andconstexpr
for named constants of any type. Furthermore, new material has been added, discussing compound expressions and lambdas, so-called “internationalization”, a comprehensive approach for program failure.Also added has been an appendix and a temporary include header for an easy transition to C23 on existing platforms, that will allow you to start off with C23 right away.
Manning’s early access program (MEAP) for the new edition is still open at
https://www.manning.com/books/modern-c-third-edition
Unfortunately they were not yet able to tell me when their version of the C23 edition will finally be published.
https://gustedt.wordpress.com/2024/10/15/the-c23-edition-of-modern-c/
Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):
johncarlosbaez@mathstodon.xyz ("John Carlos Baez") wrote:
The Europa Clipper finally took off! It'll reach this icy, water-filled moon of Jupiter in 2030. But it won't orbit that moon. Instead, it will fly by Europa 44 times, tracing out these wonderful tracks.
Why not orbit Europa? There's too much radiation that close to Jupiter, and the Clipper can collect data much faster than it can transmit it to Earth. If it orbited Europa it would fry before it could tell us very much!
Thus, the Clipper will spend most of its time farther from Jupiter, transmitting data to Earth. Using gravity assists from 2 other moons, it will occasionally swoop down, zip past Europa, and make more measurements.
In its 3½ year life, the Europa Clipper will get 2.8 megarads of radiation from Jupiter. This is about 280 times the amount that would kill you! Jupiter is pretty, but don't try to live nearby.
(1/n)
Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):
Unixbigot@aus.social ("Kit Bashir") wrote:
I was making the Universal Sign of Need A Ride. Standing on the roadside with a travel case and my phone held in front of me, watching an icon of my ride approaching on the map. A really poor map, apparently. because the icon wasn’t lining up with streets at all, it was just heading straight toward me over what the map showed as canefields.
Then I felt my feet lifting off the ground. A blinding light shone from above. I looked up in alarm seeing, as I squinted to reduce the glare, a dark disc with an iris-like central opening.
I was drawn into the iris which closed. leaving me in a round room with a red sofa and a curved wallscreen showing the view out across the fields. There was a glass-doored bar fridge beside the sofa.
A disembodied voce with the telltale cadence of an autotranslator spoke.
“Hello, this is Vl’than your Uber Driver.
Feel free to sit down and help yourself to a beverage.”“Uh, I ah. Wha-what. Is this an abduction?”
“Oh, no, just a rideshare. I was in the area doing some circle work when I saw your job come up. Heading into town, yes?”
Gargron ("Eugen Rochko") wrote:
211 plushies sold on the very first day. Can't wait for folks to start receiving them!
Reblogged by bcantrill ("Bryan Cantrill"):
Last night, @chipsandcheese joined @bcantrill, me, and the Oxide Friends to talk about AMD's new 5th generation EPYC processor, codename: Turin. What's new in Turin and how is Oxide's Turin-based platform coming along?
Reblogged by collinsworth@hachyderm.io ("Josh Collinsworth"):
linc@phpc.social ("Lincoln Russell") wrote:
Is your #WordPress installation secure from Mullenweg-In-The-Middle attacks? 🤔
Gargron ("Eugen Rochko") wrote:
199 now... Almost there! That's amazing.
Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):
djsundog@toot-lab.reclaim.technology ("DJ Sundog - from the toot-lab") wrote:
I haven't looked into https://gosub.io/ too deeply but it seems to be taking the approach I told @ajroach42 I wanted to see in the browser space (modular components working together to provide as much/little of the current modern browser experience as desired)
Gargron ("Eugen Rochko") wrote:
If you've missed the link to the shop, here it is. EU only for now, but we're working on it.
Gargron ("Eugen Rochko") wrote:
I've been sitting on this photo for a while.
📷 Pentax KX
🎞️ Kodak Gold 200
🔭 Pentax M 50mm/1.7
⚗️ Spieker Film Lab#BelieveInFilm #FilmPhotography #AnalogPhotography #35mm #Plushtodon #Merchtodon
Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):
janbeta@chaos.social ("Jan Beta") wrote:
Hey #Commodore kids!
@MoreFunMakingIt is hosting a massive charity event. Lots of interesting items are auctioned via eBay at the moment with the proceeds going to a very good cause. Many bits were donated by some of the best retro YouTubers you know from, well, YouTube! (I am also contributing 2 Commodores.) Lee (MFMI) is going to do a 12 hour live stream on the 19th of October with many guests and the auctions ending live on the air! I'll be visiting, too! Read more: https://www.morefunmakingit.co.uk/mfmi-charity-2024/ 🧵
Gargron ("Eugen Rochko") wrote:
176 now! Could we get to 200 on the first day? That would be quite cool.
Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):
mweagle@hachyderm.io ("Matt Weagle") wrote:
Read about True Value hardware declaring bankruptcy today: https://finance.yahoo.com/news/true-value-declares-bankruptcy-sells-174128698.html
Which seemed odd to me, as they've been around for long time selling low-priced items.
It took me exactly one search to find perhaps another reason beyond the claimed "the housing market stalled and consumers have become far more picky about discretionary purchases like hardware” for the news:
Gargron ("Eugen Rochko") wrote:
144 plushies sold so far today!
Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):
robux4@rivals.space ("Steve Lhomme") wrote:
So many things to say after the publication of the main Matroska document: RFC9559.
It's been more than 2 decades in the making with countless of contributions over the years. It is truly a work of the Internet.
I'd like to thank my co-authors @mosu and @dericed but also all the people who have contributed on GitHub like @ashley, @JeromeM or @reto : https://github.com/ietf-wg-cellar/matroska-specification/graphs/contributors
It's not the end of the journey. We have tags and codecs coming and other new features for Matroska v5.
fromjason ("fromjason.xyz ❤️ 💻") wrote:
Sha’ban al-Daly, a 19 year-old Palestinian, burned to death in a hospital with an IV still in his arm due to an Israeli air strike.
Today, it would cost us nothing to email the White House and the Harris campaign and ask them to do more—whatever more looks like to you—about curbing our participation in genocide.
https://www.whitehouse.gov/contact/
Reblogged by collinsworth@hachyderm.io ("Josh Collinsworth"):
yogthos@social.marxist.network ("Yogthos") wrote:
Genocide explained with rice...
collinsworth@hachyderm.io ("Josh Collinsworth") wrote:
Do gundam fans say "gundammit?" And if not, why?
* We're waiting for our UK VAT number before enabling shipping to the UK to avoid you having to pay any unexpected duties on the package. As for the US, the stock hasn't arrived at the warehouse yet.
The wait is over*—The #Mastodon stuffed toy is now available for purchase in the EU! Other regions to come later. Share your pictures with the #Plushtodon hashtag!
Reblogged by fromjason ("fromjason.xyz ❤️ 💻"):
josemurilo@mato.social ("Ecologia Digital") wrote:
"One way to look at #SWF is companies who have placed a bet on #ActivityPub trying to respond to the momentum of Bluesky and in the ATmosphere, fediverses that use the newer #ATprotocol instead of ActivityPub. But as I'll discuss in an upcoming post, there are also a lot of exciting things happening in the ActivityPub Fediverse."
Reblogged by fromjason ("fromjason.xyz ❤️ 💻"):
Daojoan ("Joan Westenberg") wrote:
you did what with your semen
fromjason ("fromjason.xyz ❤️ 💻") wrote:
Anyway, this story about that missing plane years back is really good if you can fight back the ads.
https://www.smithsonianmag.com/air-space-magazine/the-727-that-vanished-2371187/
fromjason ("fromjason.xyz ❤️ 💻") wrote:
Convinced that the average editor has no idea what the reader experience is like on their own websites.
I’m in the middle of an engaging article—swatting away pop-ups, and adjusting for the constant skipping—and the site just reloads, tossing me to the top of the page again.
Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):
erosdiscordia@onycha.monster ("Mystery Babylon") wrote:
One of the best songs of the 90s.
"Touched", VAST
Reblogged by jakedel@mamot.fr ("S. Delafond"):
freexian@hachyderm.io ("Freexian :debian:") wrote:
By the way, the monthly report for this September is published and is available at https://www.freexian.com/blog/debian-lts-report-2024-09/
Reblogged by jakedel@mamot.fr ("S. Delafond"):
freexian@hachyderm.io ("Freexian :debian:") wrote:
Freexian would like to thank the two recent sponsors: CERN (https://home.cern/) and Copenhagen Airports A/S (https://www.cph.dk/) for sponsoring the Debian LTS offering. Thanks a lot for making it possible to provide security support for Debian for up to 5 years.
Your organization too can sponsor the Debian LTS offering (https://www.freexian.com/lts/debian/) and join the esteemed list of sponsors in the monthly report.
slightlyoff@toot.cafe ("Alex Russell") wrote:
I'm sure there are more important PM skills, but killing jargon and getting people to say what they mean is underrated.
pzmyers@octodon.social ("pzmyers 🦑") wrote:
Lecture idea for my class: rather than teaching about science, stand and sway to music from my iPhone. Anyone think that would fly?
https://freethoughtblogs.com/pharyngula/2024/10/15/hes-not-even-a-good-dancer/
jsonstein@masto.deoan.org ("Jeff Sonstein") wrote:
willing to vote yourself into detention camps & expulsions? be careful what you wish for, ppl… you may not like what you get while mindlessly voting ‘against’
‘“If, and when, they say, when I’m president, the US will once again be stronger and closer [to Israel] than it ever was,” he [Trump] said last week. “I will support Israel’s right to win its war.”’
https://www.theguardian.com/us-news/2024/oct/14/hamtramck-donald-trump-arab-american-muslim
Reblogged by nadim@infosec.exchange ("Nadim Kobeissi"):
scottarc@infosec.exchange ("Scott Arciszewski") wrote:
Last word from me for a while on the WordPress / Automattic / WPEngine / ACF/SCF discussion, and how it intersects with software security, supply chains, and trustworthy computing.
#WP #WordPress #WPEngine #AdvancedCustomFields #SecureCustomFields #PHP #Mullenweg
slightlyoff@toot.cafe ("Alex Russell") wrote:
Everyone working on the web should read Gordon:
https://open.substack.com/pub/subconscious/p/natures-many-attempts-to-evolve-a
Reblogged by slightlyoff@toot.cafe ("Alex Russell"):
nolan@toot.cafe ("Nolan Lawson") wrote:
"An Introduction to Shared Compression Dictionaries" by Anna Monus https://www.debugbear.com/blog/shared-compression-dictionaries
Really feels like a once-in-a-generation kind of performance improvement. Hard to think of anything else of the same magnitude in recent memory.
Reblogged by slightlyoff@toot.cafe ("Alex Russell"):
svoisen@front-end.social ("Sean Voisen") wrote:
Why make software?
Reblogged by collinsworth@hachyderm.io ("Josh Collinsworth"):
mhoye ("mhoye but spooky") wrote:
I don’t think we had a term for going out of your way to make sure that every rake in the yard gets stepped on but it sure seems like “a mullenweg” is a word crying out for a definition these days, so I have a proposal.
Reblogged by collinsworth@hachyderm.io ("Josh Collinsworth"):
Wilto@front-end.social ("Mat “Wilto” Marquis") wrote:
imagine if i hauled off and threw a big embarrassing shitfit because i decided that i should rightfully get a cut of the server costs that responsive image standards have saved faceboowell now actually hold on a second
jsonstein@masto.deoan.org ("Jeff Sonstein") wrote:
seriously disturbing story, still ongoing:
Mystery Drones Swarmed a U.S. Military Base for 17 Days. The Pentagon Is Stumped. - The Wall Street Journal
collinsworth@hachyderm.io ("Josh Collinsworth") wrote:
Congrats to the JavaScript ecosystem on three straight weeks of *NOT* being the one everyone's talking about.
Reblogged by fromjason ("fromjason.xyz ❤️ 💻"):
Sherifazuhur@sfba.social ("Sherifa Zuhur") wrote:
@palestine Yesterday, the Israeli army blocked a World Health Organization blood truck from entering hospitals in northern Gaza.
We are facing an organized genocide, witnessed by governments around the world … I will continue to share updates on what is happening in northern Gaza regularly. Don’t stop talking about us, don’t stop sharing—because we are being wiped out!
pzmyers@octodon.social ("pzmyers 🦑") wrote:
Took a moment to walk down by the White River.
https://freethoughtblogs.com/pharyngula/2024/10/14/spectacular-scenery/
jsonstein@masto.deoan.org ("Jeff Sonstein") wrote:
Tom Barrett, a GOP candidate for the US House from Michigan, took out a newspaper advertisement in the Michigan Bulletin, a Black-owned publication serving Lansing, that says to vote on November 6th.
Election Day is on November 5th.
fromjason ("fromjason.xyz ❤️ 💻") wrote:
If I'm a campaign strategist for the Harris team, watching some of the biggest most well-liked content creators crying about having watched people burn alive, I may be panicking.
Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):
ntnsndr@social.coop ("Nathan Schneider") wrote:
Want to organize your workplace but don’t know where to start? The Emergency Workplace Organizing Committee has some amazing trainings for curious workers coming up: https://workerorganizing.org/training/
Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):
kenshirriff@oldbytes.space ("Ken Shirriff") wrote:
Tiny thumbs-up in the Pentium P5. I found this hidden chip art after removing two layers of metal from the chip. (I don't know who JNL is.)
Reblogged by kornel ("Kornel"):
eob@social.coop ("Éamonn") wrote:
Do you live in one of the countries in red?
If so, your government is pushing for the EU Chat Control law which mandates mass surveillance via fully automated real-time surveillance of messaging and chats
Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):
brunoc@mastodon.sprawl.club wrote:
You know what's cooler than catching a piece of falling rocket? Catching people falling through the cracks of society.
Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):
SrRochardBunson@universeodon.com ("Sir Rochard 'Dock' Bunson") wrote:
You come across this in the woods.
What do you do?
fromjason ("fromjason.xyz ❤️ 💻") wrote:
The Internet Archive and its 916 billion saved webpages are back online - Ars Technica:
"Last week, hackers defaced the Internet Archive website with a message that said, “Have you ever felt like the Internet Archive runs on sticks and is constantly on the verge of suffering a catastrophic security breach? It just happened. See 31 million of you on HIBP!”" https://arstechnica.com/tech-policy/2024/10/the-internet-archive-and-its-916-billion-saved-webpages-are-back-online/
cstanhope@social.coop ("Your friendly 'net denizen") wrote:
Many comics artists have collaborated to create some works to explain the vile agenda outlined in project 2025. Might be useful link for yourself or others:
https://stopproject2025comic.org/
Via https://mastodon.social/@stevelieber/113306062709823517
The comics even have full transcripts!
Note: Don't @ me with debates about voting nor how evil all the sides involved are. Save your keystrokes. I am already thoroughly emotionally and mentally demolished by the knowledge of the world. Thanks.
Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):
thelatestkate@mastodon.art ("The Latest Kate") wrote:
❤️
Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):
elaterite@fosstodon.org ("Bob Tregilus :tux:📷:copyleft:") wrote:
Comet C/2023 A3 Tsuchinshan-ATLAS in the Arizona evening sky, again! This time diving into the Grand Canyon! I can't believe my luck. I planned this trip several months ago before the comet was even on my radar. Now I find myself comet chasing!
(Again, this is a quick edit as my travel laptop is pretty old and junkie with a low resolution monitor that is not color corrected.)#Comet #Astrophotography #Astronomy #Desert #GrandCanyon #Photography #Darktable
Reblogged by jsonstein@masto.deoan.org ("Jeff Sonstein"):
va3db@mastodon.radio ("Diane Bruce VA3DB") wrote:
I have always liked the idea of being able to unhook rotator cables for storms and had been using some dodgy old connectors. Finally got tired of the intermittent connectors and when casting about for a solution someone jokingly suggested power poles. Yes, Anderson powerpoles and in fact, powerwerx suggest that as a use! (Yes I should have used a nicer box but hey it works! And I am not going to chain drill again for a while!)
Here’s my setup.
jsonstein@masto.deoan.org ("Jeff Sonstein") wrote:
projection seems to be his typical psychological defense mechanism... the range of his available coping mechanisms is narrow
https://www.theguardian.com/us-news/2024/oct/13/trump-disaster-funding-warning
nadim@infosec.exchange ("Nadim Kobeissi") wrote:
Some improvements I made to my most underrated software project, Runes of Ardun (https://runesofardun.app) over the weekend:
• Sharper, More Tactical AI
I fine-tuned the AI’s evaluation engine to better exploit weaknesses and capitalize on opportunities. I ran a bunch of sample comparisons against top shogi/chess engines (Fairy-Stockfish) and the results were very promising.• Massive AI Performance Boost with Multithreading!
I finally integrated multithreading using the LazySMP algorithm, significantly enhancing the AI’s performance. The AI can now evaluate moves faster and smarter by leveraging multiple CPU cores (up to 5.5 million positions per second on my M1 Max CPU). This upgrade delivers a noticeably stronger and more responsive opponent across all difficulty levels.• Streamlined AI Cache for Improved Efficiency
The AI cache now consumes much less memory without sacrificing performance. This optimization allows the game to run more smoothly, even during long sessions.• Significantly Faster AI Cache Performance
In addition to reduced memory usage, the AI cache has been supercharged for much faster retrieval times, making the AI even more responsive in critical moments of the game.Runes of Ardun is so underrated, honestly. I'm super proud of it. The AI is now beating the world's top shogi engines, but nobody cares, since nobody cares about shogi and much less Mini Shogi, which is the variant that Runes of Ardun implements.
fromjason ("fromjason.xyz ❤️ 💻") wrote:
Shocking revelations about teens in redacted TikTok documents : NPR:
"Officials at TikTok discovered that there was “a high” number of underage streamers receiving a “gift” or “coin” in exchange for stripping — real money converted into a digital currency often in the form of a plush toy or a flower." https://www.npr.org/2024/10/12/g-s1-28040/teens-tiktok-addiction-lawsuit-investigation-documents
Reblogged by kornel ("Kornel"):
globalmuseum@mastodon.online ("Global Museum") wrote:
Designed by Turkish artist Mehmet Ali Uysal, this giant clothespin sculpture that seems to be holding onto a mound of dirt and grass, resides on the outskirts of Liege, #Belgium.
@Rainmaker1973 #sculpture #art