| News Nug |
|---|
|
Clever code is probably the worst code you could write Published: 2025-04-12 | Origin: /r/programming Engineer’s Codex is a free publication focused on real-world software engineering, featuring case studies, industry stories, and technical insights. The author discusses the challenges faced when learning coding, particularly the frustrations of platforms like Leetcode, which often promote "code golfing"—clever yet poor coding practices. They emphasize that clear and maintainable code is essential in the industry, often being harder to write than convoluted solutions. The author contrasts the clarity of experienced engineers' code with that of less experienced ones |
|
Advanced Messaging Patterns: Blackboard - For Zero-Copy Inter-Process Communication Published: 2025-04-12 | Origin: /r/programming The article discusses the messaging patterns provided by the zero-copy communication library iceoryx2, which are suitable for various inter-process communication scenarios. Current patterns include publish-subscribe for distributing sensor data, request-response for command execution with feedback, and event messaging for triggering actions based on specific events. However, these patterns can sometimes be insufficient for certain use cases. To address this, a new messaging pattern called "blackboard" has been designed and will be implemented in Q2 2025. This pattern |
|
Bold Devlog 2 - Screenshots and Rounded Rects Published: 2025-04-12 | Origin: /r/programming The author initially focused on automating the process of taking screenshots for weekly progress updates, developing code to capture images in both light and dark themes at various pixel densities to avoid blurriness on high-DPI screens. They aimed for consistency in image resolutions, opting for a size of 360x240 pixels while ensuring different pixel densities, despite the limitations of this small resolution. Additionally, they experimented with rendering rounded rectangles but found little guidance on pixel transparency. After a break, they discovered a method involving |
|
Nice things with SVG Published: 2025-04-12 | Origin: Hacker News The content discusses implementing SVG within a JSX (or React) context, emphasizing its use for creating animated and stylized elements. It explores techniques for creating a Table Of Contents (TOC) that is server-rendered to maintain compatibility with Server-Side Rendering (SSR). Since server-rendered elements don't have exact positions, the approach involves using absolute positioning and different components that are stitched together. The main feature is an interactive animated thumb that highlights TOC items as they become visible in the viewport. |
|
I wrote my first ever Lisp-like programming language Published: 2025-04-12 | Origin: /r/programming The content discusses a simple functional programming language consisting of 130 lines of code, highlighting its key features such as first-class functions and a finite field notation. It mentions available REPLs (Read-Eval-Print Loops) for Go and a web version, providing a sample "hello world" program. The author encourages experimentation and discusses translating expressions into specific forms, while outlining challenges with pure and impure functions and their scoping rules. Several implementation ideas are noted, particularly around executing functions in |
|
Emacs Lisp Elements Published: 2025-04-12 | Origin: Hacker News Protesilaos Stavrou, known as "Prot," offers private lessons in Emacs, Linux, and general life skills at affordable prices through his coaching website. His book provides a comprehensive overview of Emacs Lisp (Elisp), the programming language used to customize Emacs, a programmable text editor. While Emacs can be used without coding, programming with Elisp allows users to enhance their editing efficiency by automating repetitive tasks. The author emphasizes the enjoyment and creativity involved in coding, promoting it |
|
A flowing WebGL gradient, deconstructed Published: 2025-04-12 | Origin: /r/programming The content describes a project aimed at creating a flowing gradient effect using WebGL shaders. The author guides readers through the process, starting from fundamental concepts without requiring prior knowledge of WebGL or shaders. The post details building a mental model for writing shaders and includes step-by-step instructions to develop the gradient effect from scratch. Key topics covered include writing shaders, interpolation, color mapping, and gradient noise, with visual and interactive explanations. The guide emphasizes creating a function that takes a pixel's position to return a |
|
A Case for Lua Performance Published: 2025-04-12 | Origin: /r/programming The article discusses the importance of performance considerations when using embedded scripting languages in game engines, particularly focusing on Lua 5.4.7. It highlights that, although Just-In-Time (JIT) interpreters exist, scripted code typically underperforms compared to native code, such as compiled C99. This performance gap is attributed not only to the inherent differences between P-code and machine code but also to how data structures and memory usage impact CPU performance. The author emphasizes that complex algorithms should generally |
|
$70M in 60 Seconds: How Insider Info Helped Someone 28x Their Money Published: 2025-04-12 | Origin: Hacker News On April 9, 2025, a trader made a bold investment of around $2.5 million in call options for the SPY ETF, which tracks the S&P 500, betting on a price increase from below $500 to $509 by the end of the day. These types of options, known as zero-day expiry options, are high-risk and can yield substantial profits if timed correctly. Shortly after the trade was placed, former President Donald Trump announced a pause on tariffs, prompting |
|
Rust to C compiler – 95.9% test pass rate, odd platforms Published: 2025-04-12 | Origin: Hacker News The author provides an update on their Rust to C compiler project, presenting it in a new article format that combines smaller updates rather than a single theme. The major announcement is that they will give a talk about the project at Rust Week in Utrecht, Netherlands, targeting both beginners and advanced audiences. They have achieved a 95.9% pass rate on core tests, improving from 92% previously, with plans to fix about 65 remaining tests that share similar issues. Additionally, the .NET side |
|
Google Is Winning on Every AI Front Published: 2025-04-12 | Origin: Hacker News The author expresses a preference for DeepMind over OpenAI, citing trust in Demis Hassabis as a scientist compared to Sam Altman as a businessman. They reminisce about significant AI milestones like AlphaGo and AlphaZero, reflecting on their long-standing support for DeepMind despite its past shortcomings. The author notes that while Google DeepMind had the resources to create a tool like ChatGPT before OpenAI, CEO Sundar Pichai opted for caution, which they now see as a strategic error. |
|
We should talk more about Architecture Congruency Published: 2025-04-12 | Origin: /r/programming The content discusses the concept of Architecture Congruency in software architecture, emphasizing the importance of alignment in architectural decisions. Each decision involves trade-offs, such as choosing a network connection that prioritizes security over latency or opting for a cloud provider with better support at a higher cost. The critical question architects must address is the purpose of these trade-offs and what they aim to achieve. The author points out a common issue known as incongruency, where decisions made for various benefits—like performance, extensibility |
|
You might not need WebSockets Published: 2025-04-11 | Origin: Hacker News WebSockets enable two-way communication between a client and server via the HTTP protocol, allowing for real-time data exchange. While they are often viewed as ideal for maintaining consistent state in applications, there are drawbacks. For example, if a state object has an invariant condition (like a count that should not go negative), error messages may not be easily linked to their corresponding commands. This is because WebSockets do not inherently associate responses with individual requests, making it challenging to update the user interface with error messages. |
|
Vacheron Constantin breaks the world record for most complicated wristwatch Published: 2025-04-11 | Origin: Hacker News The service offers a fast and secure way to protect watches and jewelry with minimal paperwork and maximum coverage. Users can receive personalized quotes in seconds, and their policy takes effect immediately. Protection is available globally, allowing users to travel and enjoy their items worry-free. There are no deductibles for covered losses, and each item is insured for up to 150% of its value, subject to the total policy value. |
|
Writing Cursor rules with a Cursor rule Published: 2025-04-11 | Origin: Hacker News In the blog post from April 10, 2025, the author discusses their experience using Cursor, a tool for coding with Large Language Models (LLMs). They highlight a key limitation of LLMs: while they have strong contextual memory within a single chat, they lack episodic memory and do not retain information from previous sessions. This means that users must repeatedly instruct the AI on preferences and project standards, likening it to working with an assistant who has amnesia. The author emphasizes the |
|
How we clone a running VM in 2 seconds Published: 2025-04-11 | Origin: /r/programming The content discusses how CodeSandbox allows users to clone and share running development environments rapidly. Users can fork a project in just two seconds, facilitating collaboration. Initially, CodeSandbox executed code directly in the browser, which was fast but restricted to browser-compatible projects. To support larger projects that require environments like Docker, they shifted focus to Virtual Machines (VMs), which traditionally were seen as slow and cumbersome. However, advancements have been made, particularly with Firecracker, a technology developed by Amazon to create lightweight |
|
Erlang's not about lightweight processes and message passing Published: 2025-04-11 | Origin: /r/programming The author reflects on the evolution of Erlang, initially a Prolog library for creating reliable distributed systems, which eventually became its own programming language. Developed at Ericsson during the 1980s and 1990s for telephone switches, Erlang aimed to address the challenges of building systems for high traffic volumes, similar to what is seen today with internet-scale services. After Ericsson discontinued Erlang in 1998, the development team, including key figure Joe Armstrong, opted to open-source it. Armstrong |
|
Adobe deletes Bluesky posts after backlash Published: 2025-04-11 | Origin: Hacker News Adobe's attempt to engage with users on the Twitter alternative Bluesky backfired, leading to a flood of negative comments about the company's business practices. Users expressed frustration over Adobe's subscription model and rising prices, prompting the company to delete all its posts on the platform. Adobe's initial post aimed at connecting with artists received backlash, with comments criticizing its pricing and policies, especially regarding AI-generated art. Although the Adobe and Photoshop accounts remain on Bluesky, their opening posts have been removed, much to |
|
I implemented HOTP & TOTP from scratch to understand how one-time passwords work Published: 2025-04-11 | Origin: /r/programming The author reflects on their experience with authorization and authentication systems at work, particularly focusing on One-Time Passwords (OTPs), which they find intriguing due to their security features. OTPs, like those generated by apps such as Google Authenticator, are temporary codes used for identity verification and are only valid for a single login attempt or a short time frame. This uniqueness helps mitigate risks from password replay attacks. For OTPs to work, both the user and the server must have a shared secret key |
|
Fedora change aims for 99% package reproducibility Published: 2025-04-11 | Origin: Hacker News LWN.net relies on subscriptions to continue providing content. The initiative for reproducible open-source software builds is gaining momentum, particularly among major Linux distributions. Debian has been working towards this goal for over a decade, successfully producing reproducible live CDs. Fedora, which started later, is now aiming for 99% reproducibility in its package builds for the upcoming Fedora 43 release in October. Reaction to this proposal has been positive, focusing on achieving the goal with minimal disruption for developers. The Repro |