News Nug
Glojure: Clojure interpreter hosted on Go, with extensible interop support

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

Glojure is an early-development interpreter for Clojure hosted on Go, designed to provide easy access to Go libraries similar to how Clojure interacts with Java frameworks. It allows interop between Go and Glojure values, but users should be aware of potential bugs and performance issues, as backward compatibility is not guaranteed until a version 1 release. Installation requires Go version 1.19 or higher, and Glojure can be run on any platform that supports Go. Users can start

Australian Parliament bans social media for under-16s with world-first law

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

Wayne Holdsworth has become a prominent advocate for prohibiting Australian children under 16 from using social media after his son, Mac, died by suicide following an online sextortion scam. Mac was targeted by someone pretending to be an 18-year-old woman who demanded money for an intimate image he shared. Since his son's tragic death, Holdsworth has visited around 20 schools to educate students about the dangers of social media. In response to such incidents, Australia's House of Representatives has passed a bill aimed

BYD launches sodium-ion grid-scale BESS product

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

BYD, a leading Chinese electric vehicle company, has introduced the "MC Cube-SIB ESS," touted as the world's first high-performance sodium-ion battery energy storage system (BESS). The product utilizes BYD's Long Blade Battery cell and features a unique "CTS super integrated design," boasting an energy storage capacity of 2.3MWh, a nominal voltage of 1200V, and a voltage range of 800V-1400V. Kai Wang, head of BYD Energy

The trouble with struct sockaddr's fake flexible array

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

Subscriptions are crucial for the sustainability of LWN.net, and subscribing helps support its ongoing content. The `sockaddr` structure is integral to the BSD socket API, serving to hold network connection addresses since its inception. The original format from 1983 includes a field for the address family (like AF_INET for IPv4) and a 14-byte data field for the address, chosen based on existing address formats of the time. However, as new protocols emerged, many required larger address formats that

Microbenchmarks Are Experiments

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

A new microbenchmark has been released, showing performance insights for various programming languages, noting that Java and Kotlin are fast due to Google's focus on performance, JavaScript performs well among interpreted languages, and Python is slower without optimizations like PyPy. Despite the excitement, the author expresses frustration with how benchmarks are often misunderstood, emphasizing that they are experiments and not definitive measures of performance. They advocate for a scientific approach to understanding benchmarks, critiquing the focus on flashy animations over meaningful analysis. The author

Show HN: Screen Sharing in the Browser–No Downloads, No Registrations

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

The content emphasizes the importance of user feedback and mentions that all input is taken seriously. It also describes a real-time screen sharing application built with Next.js, WebRTC, and Socket.IO, which allows users to create or join rooms for screen sharing using a simple room code, without the need for downloads or sign-ups. For further details, users are directed to the documentation for available qualifiers.

Send someone you appreciate an official 'Continue and Persist' Letter

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

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

The success and failure of Ninja (2020)

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

The author reflects on their experience creating Ninja, a popular build system comparable to Make, which they released in 2011. Initially hesitant to share their side project, they now view it as their most successful open source endeavor, despite other projects like Chrome having more users. Ninja has changed hands in management since its inception, and the author feels a sense of completion in their participation. They summarize their key takeaway: while programming discussions often focus on technical issues, the importance of architecture and social dynamics frequently outweigh

OReilly Black Friday - 22 Coding Books for $25 - Solid Titles

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

November's Humble Choice includes the games Warhammer 40,000: Darktide and Persona 4 Golden. Since 2010, the Humble community has raised over $263 million for charities worldwide. Humble Bundle and Humble Store are trademarks of Humble Bundle, Inc.

The UX of Lego Interface Panels (2020)

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

The content explores LEGO as a medium for understanding interface design principles, comparing the layout and organization of LEGO panels to complex machine interfaces like those on ocean exploration ships or spacecraft. It highlights the significance of physical designs, such as the "2x2 decorated slope," in learning about user experience (UX) design. The article categorizes various interface layouts, pointing out that some are orderly while others are chaotic. It raises key questions in interface design based on the historical context of B-17 bomber pilots

How Much Memory Do You Need in 2024 to Run 1 Million Concurrent Tasks?

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

The text discusses plans to conduct a memory consumption benchmark for asynchronous programming across various popular programming languages at the end of 2024, building on a comparison from 2023. The benchmark involves launching a set number of concurrent tasks, each waiting 10 seconds, with a focus on using coroutines instead of threads. The author has created two programs in Rust using popular async runtimes—Tokio and Async_std. Other languages included in the benchmark are C#, which features async/await and NativeA

A pretty visualisation of the European power grid (2022)

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

The content discusses a map of the European electrical transmission network, highlighting the connection points where local settlements connect to the grid and nearby power plants generate electricity. An optimisation algorithm is employed to determine the optimal power flow by calculating the appropriate power generation needed over specified time slots and connection points. This algorithm iteratively guesses the production levels of each power plant to ensure total generation meets consumption while minimizing costs. The results of this optimization can be visualized on the map, with data sourced from the pypsa-e

Shrinking a Postgres Table

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

The author shares their experience managing disk space issues with their self-hosted Postgres database on Linode, after acquiring the podcast hosting platform fireside.fm. While investigating a slow query, they discovered that the database was at 87% disk space usage. Unlike managed solutions, self-managed setups offer less visibility into disk space consumption. A conversation with GitHub's Copilot led to identifying the downloads table as the primary culprit for the high disk usage, which held a large number of records from as far

Stimulus Features You (Didn’t) Know

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

Stimulus is a lightweight framework that enhances existing HTML with various features, including the ability to check the existence of attributes through the existential attribute option across its APIs (targets, classes, values, outlets). It offers lifecycle methods like connect and disconnect, as well as specific target callbacks ([name]TargetConnected and [name]TargetDisconnected) for when targets are connected or disconnected, which is especially useful with Turbo Streams. Attributes can be easily passed to methods using a standard structure (data-[identifier]-

Unusual Git IDs

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

The content discusses the author's exploration of unusual commit IDs on GitHub. They became curious about whether commit IDs might be intentionally altered and discovered the existence of tools, like git-vanity-hash, that can generate "vanity" commit IDs through brute-force methods. However, the author is more interested in naturally occurring unusual commit IDs. Using GitHub's CLI tool, they initially managed to query a limited number of their public commits but eventually wrote a bash script to retrieve all of their approximately

Weaponizing SSO for profit -- a rage blog post to be able to move on with my life

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

The article critiques the trend among SaaS vendors to place Single Sign-On (SSO) capabilities behind premium pricing tiers, effectively turning a crucial security feature into a costly add-on. As awareness and regulatory requirements for enhanced security grow, SSO has become essential for many organizations to manage user access effectively. However, it has become common for SaaS providers to require customers to pay for higher subscription levels to access basic security features like SSO, two-factor authentication, and password management. This pricing strategy forces

Writing Composable SQL using Knex and Pipelines

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

SQL is a powerful tool for handling complex queries, CRUD operations, and ensuring data integrity through constraints. It supports transactions that allow operations to be rolled back. However, SQL can be challenging to integrate with programming languages like JavaScript and Python due to the difference in paradigms, as SQL queries are usually written as strings within the code, complicating composable programming. Object-Relational Mapping (ORM) libraries, such as Hibernate, help address this issue by modeling databases with objects, but they

Code Exercises & Slides for RubyConf 2024 Workshop: "How To Build Basic Desktop Applications in Ruby"

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

The content announces the GitHub repository and online slides for the RubyConf 2024 workshop titled "How To Build Basic Desktop Applications in Ruby." Attendees can access the code exercises and slides at their convenience. The GitHub repository is provided, along with a link to the online presentation. It thanks participants of the workshop and the follow-up Hack Day, highlighting that attendee Scott Werner created an AI joke generator desktop GUI app using Glimmer in Ruby.

macOS Tips for Programmers: Threading

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

The content discusses the challenges faced by programmers who are not familiar with macOS when writing code that will run on this operating system. It emphasizes the importance of understanding macOS's unique features, particularly regarding energy consumption, which is a major priority for Apple. The M1 Pro processor, for example, has a significant range in power consumption, from 10 mW to 40 W, necessitating careful consideration of how to optimize performance versus energy use. The post advocates for assigning "quality of service

A Beginner's Guide to Switches

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

The author intends to expand their writing beyond switch reviews to include topics like modifications, lubing, and frankenswitches, driven by the support their website has received and questions from newcomers to the keyboard community. They appreciate the engagement from fans, including those new to keyboards, and aim to create comprehensive documents accessible to all skill levels. Recently, the author received a significant package of switches, boosting their collection to 700 unique switches, which they find astonishing. They express gratitude to those who have contributed