Hacker Newsnew | past | comments | ask | show | jobs | submit | raluk's commentslogin

In similar fashon in year 2009 Amazon deleted books from Kindle. One of them was 1984 from George Orwell.

We even have novel writing machines now!

This algebra is also called bicyclic semigroup https://en.wikipedia.org/wiki/Bicyclic_semigroup


In C / C++ there are two kinds of undefined behaviour. One is where there is written in standard what UB is. Another one is everthing else that is not in standard.


Technically, that's only one kind, because it's written in the standard that anything not mentioned in the standard is undefined behavior.


One kind, but two different classes of undefined behaviour.



Spending few weeks trying to understand Kalman filterm, I figured out that I need to understand all if the following:

1. Model of system

2. Internal state

3. How is optimal estimation defined

4. Covariance (statistics)

Kalman filter is optimal estimation of internal state and covariance of system based on measurements so far.

Kalman process/filter is mathematical solution to this problem as the system is evolving based on input and observable measurements. Turns out that internal state that includes both estimated value and covariance is all that is needed to fully capture internal state for such model.

It is important to undrstand, that having different model for what is optimum, uncertenty or system model, compared to what Rudolf Kalman presented, gives just different mathematical solution for this problem. Examples of different optimal solutions for different estimation models are nonlinear Kalman filters and Wiener filter.

---

I think that book on this topic from author Alex Becker is great and possibly best introduction into this topic. It has lot of examples and builds requred intuition really well. All I was missing is little more emphasis into mathematical rigor and chapter about LQG regulator, but you can find both of this in original paper by Rudolf Kalman.


Thanks for your feedback. I am thinking of writing a second volume with more advanced and less introductory topics, but I haven't decided yet. It is a serious commitment and it will take years to complete. If I take this decision, I will consider a chapter on LQG.

Small clarification: nonlinear Kalman filters are suboptimal. EKF relies on linear approximations, and UKF uses heuristic approximations.


Over the hollidays I was working on Steve Balmers interview puzzle. https://rahne.si/optimisation/2026/01/07/steve-ballmer-inter...

What I am most proud of is that I got the solution in the corse of apporx 1 week working on this!


Using only cold water for showers.


What did you feel were the changes before cold showers that you observed.


It improves immune system and geneal wellbeing. It is pain that you can get used to and I kind of enyoj it now in some weird way. It is hard, requires some dedication and brings some benefits, but does not requre extra time or planning. Great morale booster.


What are protental issues with compiler, by just disabling borrow checker? If I recall correctly some compiler optimisations for rust can not be done in C/C++ because of restrictions implied by borrow checker.


Rust can set restricts to all pointers, because 1 mut xor many shared refs rule. Borrow checker empowers this. https://en.wikipedia.org/wiki/Restrict


The crazy part about this is that (auto) vectorization in Rust looks something like this: iter.chunks(32).map(vectorized)

Where the vectorized function checks if the chunk has length 32, if yes run the algorithm, else run the algorithm.

The compiler knows that the chunk has a fixed size at compile time in the first block, which means it can now attempt to vectorize the algorithm with a SIMD size of 32. The else block handles the scalar case, where the chunk is smaller than 32.


Hah I love things like this, where the compiler leaks out.


Without the borrow checker, how should memory be managed? Just never deallocate?


The borrow checker does not deal with ownership, which is what rust’s memory management leverages. The borrow checker validates that borrows (references) are valid aka that they don’t outlive their sources and that exclusive borrows don’t overlap.

The borrow checker does not influence codegen at all.


It would be the same as in any language with manual memory management, you'd simply get a dangling pointer access. The 'move-by-default' semantics of Rust just makes this a lot trickier than in a 'copy-by-default' language though.

It's actually interesting to me that the Rust borrow checker can 'simply' be disabled (e.g. no language- or stdlib-features really depending on the borrow checker pass) - not that it's very useful in practice though.


The same as C++, destructors get called when an object goes out of scope.


"Math nerd explains how to spend 3 days proving 1+1=2" -> Original "From Zero to QED: An informal introduction to formality with Lean 4" https://news.ycombinator.com/item?id=46259343


Years ago I wrote c++ library for stream compostion. Something like C++20 ranges. It turns out that as long as you compose everything with lambdas, compiled code is same as it would be with naive loops. Everything gets optimised.

For example, you can write sum of numbers less than n as:

  count(uint64_t(0)) 
   | take(n) 
   | sum<uint64_t>();
Clang converted this into n*(n-1)/2.


How much is fft used for AI? Seems that attention and convolution could benefit from this.


There are architectures, such as FNO, that utilize FFTs within them. These are particularly popular in deep learning weather prediction problems.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: