News Nug
We spent $20 to achieve RCE and accidentally became the admins of .mobi

Published: 2024-09-11 | Origin: Hacker News

In a recent blog post, watchTowr Labs shared an intriguing discovery stemming from their light-hearted research into vulnerabilities in WHOIS clients. While exploring how these clients parse responses from WHOIS servers, they found that the WHOIS server for the .MOBI top-level domain (TLD) had changed and that the previous domain, whois.dotmobiregistry.net, had expired. Seizing the opportunity, they quickly registered the expired domain. On August 30, 2024,

Ruby on Rails 7.1: Partial Strict Locals and Their Gotchas

Published: 2024-09-11 | Origin: /r/ruby

Ayush Newatia discusses the evolution of Rails partials in web development, noting their limitations as simple ERB snippets lacking a structured object foundation. He highlights the emergence of libraries like ViewComponent and Phlex, which enhance template semantics. However, he still finds Rails partials effective for many scenarios. A key improvement in Rails 7.1 is the introduction of "strict locals," which allows developers to specify the local variables a partial accepts, along with default values, enhancing clarity and reducing errors.

AppleWatchAmmeter

Published: 2024-09-11 | Origin: Hacker News

The content discusses how to turn an Apple Watch (specifically models newer than Series 5) into an ammeter for measuring DC currents using its built-in magnetometer. By wrapping a coil of wire around the watch, users can create a magnetic field that corresponds to the DC current being measured. The document details the calculations involved in producing the magnetic field and provides guidelines for using an app, such as 'Sensor-App,' to read the magnetometer data. With a 5-turn coil setup, the

Possibly all the ways to get loop-finding in graphs wrong

Published: 2024-09-11 | Origin: /r/programming

Simon Tatham discusses the challenges of creating puzzle games that involve connecting points to form graphs without creating loops. Examples of such puzzles include Net, Slant, and certain configurations of Bridges. Tatham notes the need for puzzle programs to check for loops in graphs to ensure correct solutions and to identify any loop-causing edges for players. Over time, he has developed numerous algorithms to address this issue, many of which were unsatisfactory, prompting him to consider documenting his mistakes as a case study on ineffective problem

Struggling with Container HTTP Logs? Meet Logmink

Published: 2024-09-11 | Origin: Hacker News

Logmink.hub is a centralized logging platform that facilitates the collection and storage of logs from agents deployed across various containers. It offers a user-friendly "Plug-N-Play" setup for capturing HTTP logs without needing code changes. This solution aims to simplify the challenges posed by other log management tools like Logstash and Prometheus. A skeleton configuration for the sidecar implementation of Logmink.agent is provided, which can be customized and attached to a valid service in a separate compose file. Users can

The magic of DC-DC voltage conversion

Published: 2024-09-11 | Origin: Hacker News

The article discusses the necessity of DC voltage conversion in consumer electronics, highlighting that devices often require different voltage levels for various components like motors and chips. Internal voltage converters, such as charge pumps in microcontrollers, further complicate the landscape, yet many users find voltage conversion concepts challenging. Although outdated linear ICs are still in use alongside modern microcontrollers, there's often a lack of understanding regarding their appropriate applications. The piece aims to demystify voltage conversion, starting with the basic principle of a resistor-based

Building the same app using various web frameworks

Published: 2024-09-11 | Origin: Hacker News

The author is considering migrating their web app stack from FastAPI, HTML, CSS, and some JavaScript to a modern framework, specifically exploring FastHTML, Next.js, and Svelte. To evaluate these frameworks, they built the same app, "Look at Your Data," which features CRUD functionality, using each of the frameworks while utilizing SQLite as the database. Starting with FastAPI, they found it straightforward and focused on functionality rather than aesthetics. For FastHTML, the author used documentation, created

Chai-1: Decoding the molecular interactions of life

Published: 2024-09-10 | Origin: Hacker News

Chai Discovery Team announced the release of Chai-1, a state-of-the-art multi-modal foundation model designed for molecular structure prediction, particularly useful in drug discovery. Chai-1 can predict various biomolecules including proteins, small molecules, DNA, and RNA, and is available for free via a web interface for commercial use. Non-commercial use comes with model weights and inference code. The model achieved a 77% success rate on the PoseBusters benchmark, slightly outperforming AlphaFold3

Lottery Simulator (2023)

Published: 2024-09-10 | Origin: Hacker News

Shri Khalpada has created the PerThirtySix Lottery Simulator, a tool designed for interactive exploration of lottery probabilities and ticket simulations. The simulator allows users to investigate the odds of winning various American lotteries or customize their own lottery rules in the Setup section. The Simulation section enables users to select numbers and simulate thousands of lottery tickets per second, providing visual feedback on results. The tool makes simplifying assumptions, such as ignoring taxes and assuming only one jackpot winner. Khalpada encourages users to subscribe for more

Tutorial on diffusion models for imaging and vision

Published: 2024-09-10 | Origin: Hacker News

The content discusses the arXiv Accessibility Forum and introduces arXivLabs, a framework for developing and sharing new features on the arXiv website. It emphasizes that both individuals and organizations collaborating with arXivLabs share key values of openness, community, excellence, and user data privacy. The forum invites ideas for projects that can benefit the arXiv community. Additionally, it mentions the availability of operational status notifications via email or Slack.

Why I Prefer Exceptions to Error Values

Published: 2024-09-10 | Origin: /r/programming

Good error handling is essential for creating robust programs, yet it often frustrates programmers due to the challenge of accounting for every edge case. Traditional object-oriented languages use exceptions for immediate error reporting by breaking the regular control flow. In contrast, newer languages like Go and Rust employ functional-style error handling, encoding errors in return types (e.g., Go uses (res, err) tuples, and Rust uses Result<T, E>). While these approaches aim to make error handling more explicit and encourage programmers to consider

SQLite is not a toy database

Published: 2024-09-10 | Origin: /r/programming

SQLite is an ideal tool for a variety of roles including developers, data analysts, QA engineers, DevOps, and product managers due to its versatile features. Key benefits include an intuitive console for data analysis, which simplifies tasks like importing CSV files and supports basic SQL functionalities. Data can be effortlessly exported in formats such as SQL, CSV, JSON, Markdown, and HTML, making it user-friendly for those who prefer Business Intelligence (BI) tools like Metabase or Superset. The platform excels at handling

Chrome ends support for First Input Delay

Published: 2024-09-10 | Origin: /r/programming

In May, the Chrome team officially replaced First Input Delay (FID) with Interaction to Next Paint (INP) as the Core Web Vitals metric for measuring interaction responsiveness. This follows an announcement in January about phasing out FID. As of now, FID is no longer supported in Chrome tools, though developers can still measure it using the PerformanceObserver API. Key tools like PageSpeed Insights and the Chrome UX Report will stop reporting FID in the coming days. Additionally, the documentation on

The Sage Programming Language🌱

Published: 2024-09-10 | Origin: /r/programming

The content provides an overview of the Sage programming language, which is a compiled language suitable for a wide range of applications, from operating system development to web programming. It includes sections such as FAQ, Community, Author, Examples, Install, Playground, and Documentation, offering resources for users. A video explaining compilers and the workings of Sage is also suggested. The content is attributed to Sage Programming Language and is dated 2024.

ClickHouse Data Modeling for Postgres Users

Published: 2024-09-10 | Origin: Hacker News

Failed to fetch content - HTTP Error - undefined local variable or method `response' for SummaryGenerator:Class if response.code.between?(200, 299) ^^^^^^^^ Did you mean? respond_to?

Good software development habits

Published: 2024-09-10 | Origin: /r/programming

The post details personal strategies that have helped the author maintain good habits and enhance productivity in software development. Key points include: 1. **Small Commits**: Keep commits small to easily identify and revert changes if necessary, avoiding merge conflicts. 2. **Continuous Refactoring**: Follow the principle of making easy changes to improve the codebase regularly, aiming for half of all commits to be refactorings. This prepares the code for future requirements. 3. **Code as Liability**: Treat all

A good day to trie-hard: saving compute 1% at a time

Published: 2024-09-10 | Origin: Hacker News

Cloudflare has announced a new open-source Rust crate aimed at reducing CPU utilization, thus enabling its CDN to better handle increasing web traffic. This initiative stems from the release of Pingora, a Rust-based proxy service, which processes over 60 million HTTP requests per second. A key component of this service, called "pingora-origin," is responsible for transmitting user requests to their final destinations while removing internal routing information. Currently, pingora-origin processes around 35 million requests per second. A specific function

Injecting syscall faults in Python and Ruby

Published: 2024-09-10 | Origin: /r/ruby

The content discusses the challenges of testing system call (syscall) behavior in software, particularly how issues like disk space shortages or network timeouts can lead to syscall failures. It highlights the utility of the tool `strace` for tracing and modifying syscalls, allowing users to simulate errors, delays, and other behaviors to test code resilience. The author has added functionality in a project called Cirron that enables easy use of `strace` features from Python and Ruby. This includes simulating insufficient disk

Lazarus Group Targets Software Developers in New VMConnect Campaign

Published: 2024-09-10 | Origin: /r/programming

CyberInsider reports a new wave of cyberattacks linked to North Korea's Lazarus Group, targeting software developers through fraudulent job recruitment schemes, as revealed by ReversingLabs. In the ongoing VMConnect campaign, attackers impersonate recruiters from major financial firms and distribute malicious Python packages disguised as coding tests to compromise developer systems. First identified in August 2023, this campaign exploits the trust between recruiters and developers, using tactics like fake LinkedIn profiles to entice victims into downloading malware-laden

Rails 7.1 adds support for composite key multi-column ordering in ActiveRecord::Batches

Published: 2024-09-10 | Origin: /r/ruby

The content describes the background of a full-stack Software Engineer skilled in React, JavaScript, and Rails, who has been working remotely for two years after founding a hyperlocal delivery startup for remote villages. It explains the ActiveRecord::Batches module in Rails, which facilitates processing records in batches to manage memory efficiently. Prior to Rails 7.1, its methods only supported sorting records by a single primary key (ID) either in ascending or descending order, limiting the ability to sort by multiple columns