Readit News logoReadit News
William_BB commented on Why tail-recursive functions are loops   kmicinski.com/functional-... · Posted by u/speckx
alternatex · 14 days ago
Pure functional isn't too difficult once you understand how to put everything that causes side effects on the side. You can write a domain layer in a purely functional manner and feed it data from non-pure sources. It's definitely a shift in thinking for people used to something like OOP, but once you make it, writing software functionally is not difficult. There's really not many ways to approach it, unlike OOP for which there are hundreds of books and approaches.
William_BB · 14 days ago
I studied FP in college. I currently work on a large low latency C++ codebase. I honestly have no idea how I'd use pure functional concepts everywhere in this context. I'm also probably doing it wrong.
William_BB commented on NautilusTrader: Open-source algorithmic trading platform   nautilustrader.io/... · Posted by u/Lwrless
William_BB · 20 days ago
Interesting stuff. I'm a bit confused on several points though.

If your strategies care so much about performance, can you really achieve the same or comparable performance with Cython? At that point, wouldn't those strategies be better suited for a custom "re-implementation"?

I suppose I'm not exactly sure how "high performance" and "low latency" this project is. Are there any latency stats on this project?

William_BB commented on C++26 Reflections adventures and compile-time UML   reachablecode.com/2025/07... · Posted by u/ibobev
William_BB · 23 days ago
You sound like you subscribe to "Orthodox C++".

Speaking seriously, I agree there's definitely a lot of bloat in the new C++ standards. E.g. I'm not a fan of the C++26 linalg stuff. But most performance-focused trading firms still use the latest standard with the latest compiler. Just a small example of new C++ features that are used every day in those firms:

Smart pointers (C++11), Constexpr and consteval (all improvements since C++11), Concepts (C++20), Spans (C++20), Optional (C++17), String views (C++17)

William_BB commented on Does the Bitter Lesson Have Limits?   dbreunig.com/2025/08/01/d... · Posted by u/dbreunig
logicchains · 25 days ago
>It's not better because of huge computation resources, it's actually more computationally efficient than some classic alternatives

It's similar with options pricing. The most sophisticated models like multivariate stochastic volatility are computationally expensive to approximate with classical approaches (and have no closed form solution), so just training a small NN on the output of a vast number of simulations of the underlying processes ends up producing a more efficient model than traditional approaches. Same with stuff like trinomial trees.

William_BB · 25 days ago
Interesting. Are these models the SOTA in the options trading industry (e.g. MM) nowadays?
William_BB commented on Enough AI copilots, we need AI HUDs   geoffreylitt.com/2025/07/... · Posted by u/walterbell
motorest · a month ago
> There's no way this would work for any serious C++ codebase. Compile times alone make this impossible

There's nothing in C++ that prevents this. If build times are your bogeyman, you'd be pleased to know that all mainstream build systems support incremental builds.

William_BB · a month ago
The original example was (paraphrasing) "rerunning 10-100 tests that take 1ms after each keystroke".

Even with incremental builds, that surely does not sound plausible? I only mentioned C++ because that's my main working language, but this wouldn't sound reasonable for Rust either, no?

William_BB commented on Enough AI copilots, we need AI HUDs   geoffreylitt.com/2025/07/... · Posted by u/walterbell
cadamsdotcom · a month ago
Love the idea & spitballing ways to generalize to coding..

Thought experiment: as you write code, an LLM generates tests for it & the IDE runs those tests as you type, showing which ones are passing & failing, updating in real time. Imagine 10-100 tests that take <1ms to run, being rerun with every keystroke, and the result being shown in a non-intrusive way.

The tests could appear in a separated panel next to your code, and pass/fail status in the gutter of that panel. As simple as red and green dots for tests that passed or failed in the last run.

The presence or absence and content of certain tests, plus their pass/fail state, tells you what the code you’re writing does from an outside perspective. Not seeing the LLM write a test you think you’ll need? Either your test generator prompt is wrong, or the code you’re writing doesn’t do the things you think they do!

Making it realtime helps you shape the code.

Or if you want to do traditional TDD, the tooling could be reversed so you write the tests and the LLM makes them pass as soon as you stop typing by writing the code.

William_BB · a month ago
There's no way this would work for any serious C++ codebase. Compile times alone make this impossible

I'm also not sure how LLM could guess what the tests should be without having written all of the code, e.g. imagine writing code for a new data structure

William_BB commented on Use Your Type System   dzombak.com/blog/2025/07/... · Posted by u/ingve
William_BB · a month ago
What do you think about this but in C++ (e.g. with explicit constructors)? Has anyone had any experience with it? Did it succeed or fail?
William_BB commented on Mathematics for Computer Science (2024)   ocw.mit.edu/courses/6-120... · Posted by u/vismit2000
overfl0w · a month ago
It's unbelievable that the average human being has access to the lectures of some of the best universities in the world for free. 31 hours of in-depth mathematics by some of the best people in their field.

Although I have always been struggling with keeping up with long lecture playlists. I always try to find shorter videos which explain the concept faster (although probably lacking depth). And end up ditching it halfway as well. Perhaps the real motivation to keep up with the material comes from actually enrolling the university? Has anyone completed such type of lectures by themselves? How do you stay consistent and disciplined?

I find courses in some platforms (coursera/khanacademy) a bit more motivating because they kind of push me with deadlines. I guess I am used to deadline-oriented studying.

If anyone else is struggling with attention span and is looking for shorter lectures (although they may not have the same depth): https://www.youtube.com/@ProfessorDaveExplains/playlists

William_BB · a month ago
In my experience, coursera/khan academy courses have never been able to compete with a rigorous university course. They're great resources when you need alternative explanations, but never stood up on their own.

I think long lecture playlist is a feature, not a bug. It's much harder to commit to such material when you're not full timing education.

William_BB commented on My experience with Claude Code after two weeks of adventures   sankalp.bearblog.dev/my-c... · Posted by u/dejavucoder
pragmatic · a month ago
Could you elaborate a bit on the tasks,languages,domain etc you’re using it with?

People have such widely varying experiences and I’m wondering why.

William_BB · a month ago
The reason is probably complexity and the task at hand.

In my experience, LLMs are great at small tasks (bash or python scripts); good at simple CRUD stuff (js, ts, html, css, python); good at prototyping; good at documentation; okay at writing unit tests; okay at adding simple features in more complex databases;

Anything more complex and I find it pretty much unusable, even with Claude 4. More complex C++ codebases; more niche libraries; ML, CV, more mathsy domains that require reasoning.

William_BB commented on The messy reality of SIMD (vector) functions   johnnysswlab.com/the-mess... · Posted by u/mfiguiere
camel-cdr · 2 months ago
Here is an example using google highway: https://godbolt.org/z/Y8vsonTb8

See how the code has only been written once, but multiple versions of the same functions where generated targeting different hardware features (e.g. SSE, AVX, AVX512). Then `HWY_DYNAMIC_DISPATCH` can be used to dynamically call the fastest one matching your CPU at runtime.

William_BB · 2 months ago
Thank you so much, this explains it well. I was initially afraid that the dispatch would be costly, but from what I understand it's (almost) zero cost after the first call.

I only code for x86 with vectorclass library, so I never had to worry about portability. In practice, is it really possible to write generic SIMD code like the example using Highway? Or could you often find optimization opportunities if you targeted a particular architecture?

u/William_BB

KarmaCake day42September 28, 2024View Original