Meet Zig: the Modern Alternative to the C Programming Language

Systems-oriented developers already have programming languages like C, C++, Rust, and Go, notes InfoWorld.

But now, “we also have Zig, a newer language that seeks to absorb what’s best about these languages and offer comparable performance with a better, more reliable developer experience.”

Zig is a very active project. It was started by Andrew Kelley in 2015 and now seems to be reaching critical mass. Zig’s ambition is rather momentous in software history: to become the heir to C’s longstanding reign as both the go-to portable low-level language and as a standard to which other languages are compared….

Currently, Zig is being used to implement the Bun.js JavaScript runtime as an alternative to Node.js. Bun’s creator Jarred Sumner told me “Zig is sort of similar to writing C, but with better memory safety features in debug mode and modern features like defer (sort of similar to Go’s) and arbitrary code can be executed at compile-time via comptime. It has very few keywords so it’s a lot easier to learn than C++ or Rust.”

Zig differs from most other languages in its small feature footprint, which is the outcome of an explicit design goal: Only one obvious way to do things. Zig’s developers take this goal so much to heart that for a time, Zig had no for loop, which was deemed an unnecessary syntactic elaboration upon the already adequate while loop. Kevin Lynagh, coming from a Rust background, wrote, “The language is so small and consistent that after a few hours of study I was able to load enough of it into my head to just do my work.” Nathan Craddock, a C developer, echoed the sentiment. Programmers seem to really like the focused quality of Zig’s syntax.
While Zig is “approaching” production-ready status, the article notes its high degree of interoperability with C and C++, its unique error-handling system, and its elimination of a malloc keyword (leaving memory allocation to the standard library).

“For now, the Zig team appears to be taking its time with the 1.0 release, which may drop in 2025 or later — but none of that stops us from building all sorts of things with the language today.”

Read more of this story at Slashdot.

The Daring Ruse That Exposed China’s Campaign To Steal American Secrets

The New York Times magazine tells the story of an innocuous-seeming message on LinkedIn in 2017 from Qu Hui, the deputy director of the China-based Provincial Association for International Science and Technology Development.

Federal agents eventually obtained search warrants for two Gmail addresses the official was using, and “In what would prove to be a lucky break, the investigators found that each email address was the Apple ID used for an iPhone, linked to an iCloud account where data from the phones was periodically backed up. The agents were later able to obtain search warrants for the two iCloud accounts [that] opened a treasure trove.”

This included confirmation of what they had suspected all along: that Qu worked for Chinese intelligence. His real name was Xu Yanjun. He had worked at the Ministry of State Security since 2003, earning six promotions to become a deputy division director of the Sixth Bureau in the Jiangsu Province M.S.S. Like so many of us, he had taken pictures of important documents using his iPhone — his national ID card, pay stubs, his health insurance card, an application for vacation — which is how they ended up in his iCloud account. There, investigators also found an audio recording of a 2016 conversation with a professor at N.U.A.A. in which Xu had talked about his job in intelligence and the risks associated with traveling. “The leadership asks you to get the materials of the U.S. F-22 fighter aircraft,” he told the professor. “You can’t get it by sitting at home.” The discovery of evidence of Xu’s identity in an iCloud account makes for a kind of delicious reversal. The ubiquitous use of iPhones around the world — a result of America’s technological prowess — was helping to fight back against a rival nation’s efforts to steal technology.
Qu scheduled a meeting in Brussels with one American target — where he was arrested and extradited to America, becoming the first-ever Chinese intelligence official convicted on U.S. soil on charges of economic espionage.

The prosecution contended that Xu had been systematically going after intellectual property at aerospace companies in the United States and Europe through cyberespionage and the use of human sources. It’s not often that prosecutors find a one-stop shop for much of their evidence, but that’s what Xu’s iCloud account was — a repository of the spy’s personal and professional life. That’s because often Xu used his iPhone calendar as a diary, documenting not just the day’s events but also his thoughts and feelings…. The messages in Xu’s iCloud account enabled investigators to make another damning discovery. Xu had helped coordinate a cyberespionage campaign that targeted several aviation technology companies….

At the end of the trial, Xu was convicted of conspiring and attempting to commit economic espionage and theft of trade secrets…. According to Timothy Mangan, who led the prosecution, the evidence laid out during Xu’s trial goes far beyond merely proving his guilt — it uncovers the systematic nature of China’s vast economic espionage. The revelation of Xu’s activities lifts the veil on how pervasive China’s economic espionage is, according to the F.B.I. agent. If just one provincial officer can do what he did, the agent suggests, you can imagine how big the country’s overall operations must be.
The article notes that the Chinese government “also offers financial incentives to help Chinese expats start their own businesses in China using trade secrets stolen from their American employers.” It also cites a 2019 report from a congressional committee’s security review that found “myriad ways in which Chinese companies, often backed by their government, help transfer strategic know-how from the United States to China.”
The maneuvers range from seemingly benign (acquiring American firms with access to key intellectual property) to notoriously coercive (compelling American companies to form joint ventures with Chinese firms and share trade secrets with them in return for access to the Chinese market) to outright theft. Cyberattacks have become an increasingly common tactic because they can’t always be linked directly to the Chinese government. Over the past few years, however, federal agents and cybersecurity experts in the U.S. have identified the digital footprints left along the trails of these attacks — malware and I.P. addresses among them — and traced this evidence back to specific groups of hackers with proven ties to the Chinese government.
One 2020 indictment blamed five “computer hackers” in China for breaching more than 100 organizations.

Thanks to Slashdot reader schwit1 for sharing the article.

Read more of this story at Slashdot.

Apple’s ‘iMessage’ Texts are Coming To Windows (with Limitations)

Microsoft “is adding iPhone support to its Phone Link app on Windows 11,” reports MacRumors. “The app allows iPhone users to make and receive phone calls, send and receive text messages, and view an iPhone’s notifications directly on a PC.”

Notably, the app brings limited iMessage functionality to Windows. After pairing an iPhone with a PC via Bluetooth and granting some permissions on the iPhone, users can send and receive iMessages and SMS text messages in Phone Link, but there is no support for group chats or sending photos and videos.

The Verge notes you won’t see the full message history in conversations, “as only messages that have been sent or received using Phone Link will be displayed.”

Microsoft isn’t using blue or green bubbles in Phone Link either, as the company isn’t able to differentiate between a standard text message and one sent via iMessage. The Phone Link integration for iOS is basic compared to what’s available for Android, but Microsoft has never supported messaging or calls for iPhone users before, so this is a step in the right direction….

This new Phone Link support arrives alongside a big new Windows 11 update that includes AI-powered Bing on the taskbar, a screen recording feature, better touch optimizations, and more. If you’re interested in testing this new Phone Link support for iOS, it will be available for Windows Insiders in the Dev, Beta, and Release Preview channels, but Microsoft is kicking off testing with a “small percentage” of testers this week.

Thanks to ttyler (Slashdot reader #20,687) for sharing the news.

Read more of this story at Slashdot.

Apple Readies Its Next Range of Macs

According to a report from Bloomberg’s Mark Gurman, Apple is readying a new batch of Macs to launch “between late spring and summer.” This includes a 15-inch MacBook Air and a new 24-inch iMac. From the report: Apple’s next iMac desktop is at an advanced stage of development called engineering validation testing, or EVT, and the company is conducting production tests of the machine. The next iMac will continue to come in the same 24-inch screen size as the current model, which was announced in April 2021. The versions being tested also come in the same colors as the current iMac, a palette that includes blue, silver, pink and orange.

The new iMacs will, of course, be more powerful — with a new M-series chip to replace the M1. There also will be some behind-the-scenes changes. The computer will see some of its internal components relocated and redesigned, and the manufacturing process for attaching the iMac’s stand is different. While development of the new iMacs — codenamed J433 and J434 — has reached a late stage, it’s not expected to go into mass production for at least three months. That means it won’t ship until the second half of the year at the earliest. Still, this is a great development for anyone disappointed that Apple’s all-in-one desktop hasn’t been updated in nearly two years.

Aside from the iMac, Apple is scheduled to launch about three new Macs between late spring and summer, I’m told. Those three models are likely to be the first 15-inch MacBook Air (codenamed J515), the first Mac Pro with homegrown Apple chips (J180) and an update to the 13-inch MacBook Air (J513). The big remaining question is which processors these new Macs will run on. We already know the Mac Pro will include the M2 Ultra, which will provide up to 24 CPU cores, 76 graphics cores and the ability to top out the machine with at least 192 gigabytes of memory. We also know that Apple has developed the next iMac on the same timeline as the M3 chip, so I’d expect it to be one of the company’s first M3-based machines.

Read more of this story at Slashdot.

Apple Launches Its New Classical Music Streaming App For Preorder

Apple is launching a new music streaming service focused on classical music. TechCrunch reports: Based on its 2021 acquisition of Amsterdam-based streamer Primephonic, the new Apple Music Classical app will offer Apple Music subscribers access to more than 5 million classical music tracks, including new releases in high-quality audio, as well as hundreds of curated playlists, thousands of exclusive albums and other features like composer bios and deep dives on key works, Apple says.

However, while the app is being announced today, it’s only available for preorder on the App Store for now. The release date will be later this month, on March 28. In addition, the app will only support iOS devices running iOS 15.4 or newer at launch. Apple Music Classical will present a simple interface for engaging with classical works. Users will be able to search by composer, work, conductor or even catalog number, to locate recordings. These can be streamed in high-quality audio of up to 192 kHz/24-bit Hi-Res Lossless. And thousands of recordings will be available in Apple’s immersive spatial audio, as well.

The app will also let users dive into the recordings to read editorial notes about the composers and descriptions of their key works. Famous composers will have their own high-resolution digital portraits available, which Apple commissioned from artists. These were designed with color palettes and artistic references from the relevant classical period, Apple notes, and more will be added in time. At launch, portraits will be available for Ludwig van Beethoven, Frederic Chopin and Johann Sebastian Bach. The service will continue to be updated with new music over time, too. There’s no additional charge for Apple Music Classical if you’re an Apple Music subscriber. Android support is coming “soon.”

Read more of this story at Slashdot.