News Nug |
---|
Were multiple return values Go's biggest mistake? Published: 2025-03-15 | Origin: /r/programming The article critiques Go's error handling and its use of multiple return values, suggesting that these features complicate the language unnecessarily. The author highlights several common criticisms of Go, including the lack of sum types, enums, null safety, const correctness, and generics. They argue that multiple return values, while seemingly harmless, negatively influence the language's design and create complexity, as Go does not have true tuples like some other languages. Instead, to achieve similar functionality, developers must define structs. Overall, |
Fired “Kill Switch” Programmer Faces 10 Years In Jail: What Went Wrong? Published: 2025-03-15 | Origin: /r/programming Davis Lu, a 55-year-old former Senior Software Developer at EATON Corporation, has been sentenced to 10 years in prison for deploying a “kill switch” that disrupted his employer's systems after he was laid off in September 2019. Lu created apps that would trigger chaos in the company's systems when his account was disabled in Active Directory. His hidden server in Kentucky managed these destructive apps, named "Hakai" (Japanese for "destruction") and "Hūnshu |
Milk Kanban Published: 2025-03-15 | Origin: Hacker News The concept of Kanban is often reduced to specific practices like using whiteboards and sticky notes, which can oversimplify its broader principle. Originally, Kanban referred to a visual signal indicating various needs or requests. In typical Kanban systems, a sticky note symbolizes work, conveying information about tasks based on its context, such as color or placement. The author advocates for moving beyond the standard Kanban board design to recognize that Kanban’s essence lies in visual signals. An example provided is an index |
Distributed Locking: A Practical Guide Published: 2025-03-15 | Origin: /r/programming The content highlights the challenges of managing data consistency in distributed systems, where multiple processes or services can simultaneously read and write to the same data. It emphasizes the issue of data corruption, race conditions, and unwanted duplicates that can arise from such concurrent updates. To mitigate these risks, distributed locks are introduced as a solution, allowing only one process to modify a resource at a time. The discussion outlines the need for distributed locking, explores its implementation in popular tools and systems like Redis, ZooKeeper, databases, |
How to Streamline Data Access With Valet Key Pattern? Published: 2025-03-15 | Origin: /r/programming Software applications typically use intermediaries, like servers, to handle data streaming, sharing, and storage. When a client requests data, the service retrieves it and forwards it, which can lead to increased latency, resource consumption, and scalability issues as demands grow. The Valet Key pattern offers a solution by allowing clients direct access to data without intermediaries. It involves a process where clients request access, the intermediary service authorizes them, generates a short-lived security token (valet key) that specifies data |
Programming’s Sacred Cows: How Best Practices Became the Industry’s Most Dangerous Religion Published: 2025-03-15 | Origin: /r/programming Mr. Plan ₿ Publication is a platform welcoming both novice and seasoned writers to share and promote their articles. The author, Terrance Craddock, reflects on his experience of deleting a large Java project and reprogramming it in PHP4, despite his colleagues' concerns about deviating from established "best practices." He argues that the tech industry has turned these guidelines into rigid dogma, stifling creativity. Craddock suggests that many of the most innovative software solutions have emerged from breaking |
I built a high-performance, dependency-free key-value store in Go from first principlesn(115K ops/sec on an M2 Air) Published: 2025-03-15 | Origin: /r/programming The content emphasizes the serious consideration given to user feedback and provides an overview of "nubmq," a high-performance key-value (KV) storage engine built in pure Golang. Designed for high-frequency, contention-heavy workloads, nubmq features native pub-sub support and operates without dependencies. Key functionalities include the ability to dynamically scale, immediate key expiration and removal, polling-free notifications, and non-blocking I/O with dedicated read and write buffers for each connection. The system has been benchmarked on an M |
Experts warn about the 'crumbling infrastructure' of federal government data Published: 2025-03-15 | Origin: Hacker News Failed to fetch content - HTTP Error - Net::ReadTimeout with #<TCPSocket:(closed)> |
Transformers Without Normalization Published: 2025-03-15 | Origin: Hacker News This work explores the use of Dynamic Tanh (DyT) as a replacement for normalization layers in Transformers, arguing that Transformers can perform as well or better without normalization. DyT is defined as an element-wise operation, $$\mathrm{DyT}(\boldsymbol{x}) = \tanh(\alpha \boldsymbol{x})$$, inspired by the S-shaped input-output mappings produced by layer normalization. The incorporation of DyT allows Transformers to achieve performance parity with normalized models, often without the |
Show HN: eli – Embedded Lisp Interpreter Published: 2025-03-15 | Origin: Hacker News The content discusses an embedded Lisp interpreter called eli, developed over 15 years and initially motivated by personal projects. The interpreter has been implemented in various languages, with significant development occurring in eli-java, and efforts are also underway to integrate it with Common Lisp. The author aims to achieve reasonable performance by focusing on Python. The document outlines fundamental types and structures within the interpreter, such as boolean values (true/false), numeric types (integers, floating-point values), sequences (lists, mappings), and |
Ubuntu 18.04 is 7 Years Old (And Other Hard Lessons About Software Engineering) Published: 2025-03-15 | Origin: /r/programming The author recounts taking down two production servers over the past week due to issues stemming from old, unsupported software, despite prior testing of code changes. They highlight that technologies like Rails 6.x, Ubuntu 18.04, and PostgreSQL 13 are outdated, reflecting on how quickly software can become obsolete. The author emphasizes that the real challenges in software engineering lie not in building applications or learning languages, but in naming things, navigating interpersonal dynamics, ensuring clear communication between systems, and dealing with |
Spider-Man (Neversoft) decompilation project Progress Checkpoint - March 2025 Published: 2025-03-14 | Origin: /r/programming The author reports ongoing steady progress in their project, with notable developments shared since mid-February, including 313 commits totaling 1653. They are focusing on completing individual source files, which minimizes context switching and highlights quirky behaviors influenced by the original engineers of the components. One specific observation involves the peculiar way Microsoft Visual C++ generates code for while loops, converting them into a combination of if and do...while statements. This revelation came while analyzing the code for `dcmemcard.cpp`, particularly |
Ruby’s. Yum ت Published: 2025-03-14 | Origin: /r/ruby The content appears to be a corrupted or improperly formatted text file, likely containing binary data or non-readable characters. It includes a mix of characters, symbols, and encodings that do not form coherent sentences or meaningful phrases. As a result, it is difficult to summarize or extract any relevant information from this content. |
The Ultimate Guide to Scaling Sidekiq Published: 2025-03-14 | Origin: /r/ruby The article by Adam McCrea, originally published on Sidekiq's Wiki, discusses the scalability of Sidekiq, a background job processing tool. It emphasizes that while scaling can be as simple as adding more servers, proper optimization and server sizing are crucial for efficiency. McCrea outlines key architectural components of Sidekiq and introduces essential terms related to its operation. He provides recommendations for new applications, suggesting that limiting the number of queues (preferably two or three) can simplify scaling |
Matching Regexps 200 Times Faster Published: 2025-03-14 | Origin: /r/ruby The blog discusses performance optimizations for generating JSON in Ruby, specifically focusing on the json gem. Notably, @byroot's blog series highlights that a significant amount of time in JSON generation is spent in the `convert_UTF8_to_JSON()` function, which converts Ruby Strings to JSON Strings. A lookup table method introduced by @byroot has been implemented in the gem, but further attempts have been made to optimize this process using SIMD instructions, despite the complexities and portability issues involved. The post compares |
Kerning, the Hard Way Published: 2025-03-14 | Origin: Hacker News The author is working on a font characterized by reversed letterforms set against a vertically striped background, drawing inspiration from Schaefer Versalien and modifying elements from their stencil font, Arugula. The focus is on the technical aspects of kerning, particularly between the letters L and T. Traditional kerning methods, like using GPOS lookups, are ineffective due to the nature of the font's design, where overlapping black parts lead to undesirable visual effects. Instead, the author proposes using GSUB |
bflat: C# with Go-inspired tooling (small, selfcontained, native executables) Published: 2025-03-14 | Origin: /r/programming The content discusses bflat, a tool that combines C# with Go-inspired technology to create small, self-contained, native executables. It integrates the Roslyn C# compiler and NativeAOT (formerly CoreRT) for high-performance ahead-of-time compilation. bflat allows for the generation of both native executables and shared libraries, supporting various operating systems and architectures, with future support for musl-based Linux planned. Users can download specific compiler versions based on their host system and integrate them easily into |
Decrypting encrypted files from Akira ransomware using a bunch of GPUs Published: 2025-03-14 | Origin: Hacker News The author of Tinyhack.com shares their experience of helping a company recover data from a variant of Akira ransomware without paying the ransom. They provide detailed insights, including the full source code for their solution, available on GitHub. The specific variant dealt with is from late 2023, while earlier versions had vulnerabilities that were patched after a decryptor was created. The author typically avoids ransomware cases but felt this situation was solvable upon an initial assessment. They mention that brute-forcing based on file |
Finding the opposite of what you have with rails invert_where Published: 2025-03-14 | Origin: /r/ruby The content discusses the new Rails 7 method `invert_where`, which inverts all conditions in ActiveRecord queries, allowing users to easily fetch data that doesn't meet certain criteria. However, it comes with some caveats, particularly concerning default scopes, which can lead to unintended results if not handled carefully. Users are advised to consider the following best practices: 1. **Use Explicit Conditions**: Prefer `where.not` for better clarity and control over queries. 2. **Isolate Inversions**: |
Ruby on Rails Security: Preventing Command Injection Published: 2025-03-14 | Origin: /r/ruby Remote Code Execution (RCE) is a highly severe security vulnerability that allows attackers to gain unauthorized access to a web server, likened to having SSH access. One common type of RCE is command injection, where user input is passed directly to the server's shell, enabling the execution of arbitrary commands. This vulnerability is critical and should be addressed immediately during penetration testing, as bots actively search for exploitable servers online. To prevent command injection in Ruby on Rails, developers should be cautious when using certain |