News Nug
The best new features and fixes in Python 3.14

Published: 2025-05-16 | Origin: /r/programming

The first beta release of Python 3.14 has been launched, introducing several new features aimed at enhancing the programming experience for developers. One major addition is the template strings, or t-strings, defined in PEP 750. These allow for advanced string formatting by enabling the manipulation of variables within a template's structure rather than just its output. For example, a template can automatically clean HTML tags from variables or transform parts of the string. This feature simplifies writing custom template engines like Jinja2

OpenJDK talks about adding a JSON API to the Java Standard Library

Published: 2025-05-15 | Origin: /r/programming

Failed to fetch content - HTTP Error - Net::ReadTimeout with #<TCPSocket:(closed)>

Building AI Applications in Ruby

Published: 2025-05-15 | Origin: /r/ruby

In this second part of a series on creating web applications with generative AI integration, Ed Izaguirre argues that Ruby may be a superior choice over Python for building such applications. While Python dominates the AI landscape due to its robust frameworks like PyTorch and TensorFlow, Ruby's strengths become apparent when addressing the complexities of modern web development. Izaguirre highlights that many clients express concerns about the complexity associated with contemporary web applications, primarily driven by the rise of single-page applications (SP

A leap year check in three instructions

Published: 2025-05-15 | Origin: Hacker News

Falk Hüffner discusses an efficient method for determining if a year in the range 0 to 102499 is a leap year using minimal CPU instructions. The leap year calculation is based on the proleptic Gregorian calendar, extending backward from its introduction in 1582, allowing years before 1582 to be treated uniformly without negative values. Hüffner presents optimizations to typical leap year checks, replacing certain modulo operations with simpler bit masking techniques. For instance, instead of checking

Initialization in C++ is bonkers (2017)

Published: 2025-05-15 | Origin: Hacker News

The program in question raises a question about the values of `a.a` and `b.b` in C++, revealing that `a.a` will be 0 while `b.b` will be indeterminate, leading to undefined behavior. This is attributed to the complex nature of initialization in C++, which involves concepts like default-, value-, and zero-initialization. In a simplified outline of C++11 rules, global and value-initialized variables default to 0, whereas other variables

The unreasonable effectiveness of an LLM agent loop with tool use

Published: 2025-05-15 | Origin: Hacker News

Philip Zeyliger discusses his recent work on an AI Programming Assistant called Sketch, which utilizes a large language model (LLM) for programming tasks. He describes the simplicity of the core operation in using the LLM with tools, highlighting that a general-purpose tool like bash allows the AI to tackle various programming problems effectively. Zeyliger notes that Sketch can streamline tasks such as git operations, merges, and type-checking by automating them. He emphasizes the adaptability of the tool, which

Baby is healed with first personalized gene-editing treatment

Published: 2025-05-15 | Origin: Hacker News

Failed to fetch content - HTTP Status - 403

Deactivating an API, One Step at a Time

Published: 2025-05-15 | Origin: /r/programming

The article discusses the process of decommissioning an API, highlighting the importance of ensuring that no one depends on the API set to be shut down to avoid unpredictable consequences. It recounts the author's experience in replacing an older API with a more capable version while managing existing consumers. To mitigate issues, the author first limited access to the old API by blocking new consumers through a token-based authentication system, allowing only those with tokens generated before a specific date to continue using it. The next step involved identifying existing

10 Years of Stable Rust: An Infrastructure Story

Published: 2025-05-15 | Origin: /r/programming

By visiting the website, users consent to a privacy policy concerning cookies and tracking. Necessary cookies that ensure site functionality do not require consent under GDPR. Users can choose to accept additional cookies for analytics or decline them, allowing only essential cookies. Additionally, the Rust Foundation marks the 10th anniversary of Rust's 1.0 release on May 15, 2025, with a guest blog by Graydon Hoare, the language's initial author. Hoare reflects on Rust’s evolution over the

Microsoft support for "Faster CPython" project cancelled

Published: 2025-05-15 | Origin: /r/programming

The content discusses the cancellation of Microsoft's support for the Faster CPython project, which resulted in layoffs for most of the team members, causing emotional distress for those affected. The author reflects on attending the Python Language Summit at PyCon, where discussions about improving Python continued despite the recent challenges. They emphasize the resiliency of open source development, noting that collaboration among long-time community members persists regardless of corporate changes. The author also expresses disappointment over the lack of sponsorship for beneficial projects like Faster CPython and encourages

Launch HN: Tinfoil (YC X25): Verifiable Privacy for Cloud AI

Published: 2025-05-15 | Origin: Hacker News

The authors argue that solving AI privacy issues will lead to more valuable AI applications, similar to how TLS enabled secure online transactions. They have backgrounds in cryptography and security, with expertise from institutions like MIT and companies like NVIDIA and Cloudflare. They believe traditional privacy techniques, such as personally identifiable information (PII) redaction or legal contracts, are inadequate. Instead, they propose using secure enclaves—isolated areas on a chip that allow secure AI model inference in the cloud without exposing data to

Good runbooks are a MUST - unless you want to risk a heart attack

Published: 2025-05-15 | Origin: /r/programming

Bojan Vukojicic describes a typical, stressful on-call scenario when he receives a critical alert about increased errors in a spam service right after returning home. Despite initial panic, he follows the runbook but realizes he cannot fix the issue and calls his team for help, allowing him to free up his evening. He emphasizes the importance of effective runbooks in making incident response smoother, especially when under stress. Reflecting on his experience as a Reliability Operations Engineer in a newly formed team,

Oh Sh*t, My App is Successful and I Didn’t Think About Accessibility

Published: 2025-05-15 | Origin: /r/programming

Jacob’s Tech Tavern offers free subscriptions for in-depth articles on iOS, Swift, tech, and indie projects, with paid subscribers receiving advanced tips and early access to long-form articles. The content emphasizes the importance of considering accessibility (a11y) in app development, noting that 16% of users have some form of accessibility requirement. Often, during the rush to launch new features, developers neglect this aspect, which can harm user perception once the app becomes successful. The article provides guidance on improving

Demystifying the protobuf wire format - Part 2

Published: 2025-05-15 | Origin: /r/programming

The post discusses advanced features of protocol buffers (protobuf), focusing on packed repeated fields, maps, and negative numbers. Repeated fields allow multiple values of the same type in a single field, with each value typically encoded as separate tag-value pairs. Packed repeated fields offer a more efficient encoding option for numeric types, allowing multiple values to be stored in a single length-delimited field. Maps in protobuf represent repeated key-value pairs, with each entry encoded as an embedded message. For encoding negative numbers,

New research reveals the strongest solar event ever detected, in 12350 BC

Published: 2025-05-15 | Origin: Hacker News

Failed to fetch content - HTTP Status - 400

Ask HN: What's your go-to message queue in 2025?

Published: 2025-05-15 | Origin: Hacker News

The content discusses the various options available for message queues in distributed architectures, highlighting different types of communication methods (asynchronous vs. synchronous), queue designs (FIFO vs. priority and delay queues), and broker types (intelligent vs. minimal). The author seeks insights from individuals who have built production systems about their experiences with different message queues, including choices made, challenges faced, and any regrets related to adding complexity. The conversation reflects a mix of technical considerations and emotional biases toward certain technologies, with references to

Lazarus - Delphi risen from the dead?

Published: 2025-05-15 | Origin: /r/programming

The author reflects on their experience with programming languages from the 1990s, particularly comparing their use of Visual Basic to a colleague's use of Delphi, which allowed for the creation of standalone programs. They express jealousy over Delphi's features, particularly its ability to compile without requiring a runtime. Fast forward to 2024, the author revisits Pascal and Delphi while searching for ways to compile code across multiple platforms and discovers Lazarus, an open-source cross-platform alternative to Delphi, allowing compilation on systems

do {...} while (0) in macros

Published: 2025-05-15 | Origin: /r/programming

The content discusses the importance of defining macros carefully in C programming to avoid unexpected behavior. It specifically highlights the use of the `do { ... } while(0)` construct in macros, commonly seen in Linux kernels and other C libraries. According to Robert Love from Google, this construct allows macros to operate consistently, particularly with regards to semicolons and nesting in `if` statements without curly brackets. The article explains that without `do/while(0)`, multi-statement macros can lead

Ruby 3.4.4 Released

Published: 2025-05-15 | Origin: /r/ruby

Ruby 3.4.4 has been released ahead of schedule, featuring fixes for a YJIT bug related to local variables and a build issue with GCC 15 on Windows, alongside other minor bug fixes. Upcoming stable Ruby versions are planned for release every two months, with 3.4.5 expected in July, followed by 3.4.6 in September, 3.4.7 in November, and 3.4.8 in January. Any significant changes that

Human

Published: 2025-05-15 | Origin: Hacker News

Of course! Please provide the content you'd like me to summarize.