Latest Tech News

Stay updated with the latest in technology, AI, cybersecurity, and more

Filtered by: fn Clear Filter

Diffsitter – A Tree-sitter based AST difftool to get meaningful semantic diffs

diffsitter Disclaimer diffsitter is very much a work in progress and nowhere close to production ready (yet). Contributions are always welcome! Summary diffsitter creates semantically meaningful diffs that ignore formatting differences like spacing. It does so by computing a diff on the AST (abstract syntax tree) of a file rather than computing the diff on the text contents of the file. diffsitter uses the parsers from the tree-sitter project to parse source code. As such, the languages sup

Alternative Blanket Implementations for a Single Rust Trait

July 01, 2025 #rust #traits #patterns Serhii PotapovJuly 01, 2025 Rust's trait system is famously powerful - and famously strict about avoiding ambiguity. One such rule is that you can't have multiple blanket implementations of the same trait that could potentially apply to the same type. What Is a Blanket Implementation? A blanket implementation is a trait implementation that applies to any type meeting certain constraints, typically via generics. A classic example from the standard librar

Gene therapy restored hearing in deaf patients

“This is a huge step forward in the genetic treatment of deafness, one that can be life-changing for children and adults,” says Maoli Duan, consultant and docent at the Department of Clinical Science, Intervention and Technology, Karolinska Institutet, Sweden, and one of the study’s corresponding authors. The study comprised ten patients between the ages of 1 and 24 at five hospitals in China, all of whom had a genetic form of deafness or severe hearing impairment caused by mutations in a gene

Deaf Teenager and 24-Year-Old Gain Ability to Hear After Experimental Gene Therapy

In recent years, gene therapy has emerged as a promising treatment for genetic forms of congenital deafness—hearing loss that’s present at birth—in children. A new study shows that gene therapy can bestow hearing in teenagers and adults with this condition, too. The study, published Wednesday in the journal Nature Medicine, recruited patients with deafness or severe hearing impairment caused by mutations in the OTOF gene. This gene manufactures a protein called Otoferlin, which plays a critical

Weird Expressions in Rust

Rust has a very powerful type system, but as a result it has some quirks, some would say cursed expressions. There’s a test file, weird-expr.rs , in the rust repository that tests for some of these and makes sure there consistent between updates. So I wanted to go over each of these and explain how it’s valid rust. Note that these are not bugs, but rather extreme cases of rust features like loops, expressions, coercion and so on. Strange fn strange () -> bool { let _x : bool = return true ;}

Topics: fn let match return u8

Higher: Favourite Haskell type classes for Rust (2023)

higher The functor hierarchy and other terrible ideas for Rust. Yes, this gives you generalisable monads in Rust. No, they're not very nice compared to Haskell, because Rust's functions aren't quite as first class from the type system's perspective as you might like them to be, type constraints in trait implementations can be a serious headache when you want to implement, say, Functor for HashSet , and the type system can be particularly obtuse at times and need a lot of additional and extreme

Topics: f1 f2 fn target type

Augmented Vertex Block Descent (AVBD)

Augmented Vertex Block Descent (AVBD) Vertex Block Descent is a fast physics-based simulation method that is unconditionally stable, highly parallelizable, and capable of converging to the implicit Euler solution. We extend it using an augmented Lagrangian formulation to address some of its fundamental limitations. First, we introduce a mechanism to handle hard constraints with infinite stiffness without introducing numerical instabilities. Second, we substantially improve the convergence in th

Simplest C++ Callback, from SumatraPDF

SumatraPDF is a Windows GUI application for viewing PDF, ePub and comic books written in C++. A common need in GUI programs is a callback. E.g. when a button is clicked we need to call a function with some data identifying which button was clicked. Callback is therefore a combo of function and data and we need to call the function with data as an argument. In programming language lingo, code + data combo is called a closure. C++ has std::function<> and lambdas (i.e. closures). Lambdas convert