Laiho
Re:F-strings for C++26 proposal [pdf]
on Monday February 03, 2025 @02:39AM (#42915884)
Is it a coincidence that all these quality life things start to pop up after C++ is facing real competition for the first time? Seems a bit odd to add print after using std::out for 30 years.
Re:C Is Not Suited to SIMD
on Tuesday January 28, 2025 @03:43AM (#42850178)
I've had great success with autovectorization in Rust. Majority of non-branching loops seem to consistently generate great assembly.
Re:Branchless UTF-8 Encoding
on Saturday January 18, 2025 @07:05AM (#42747758)
fn validate_ascii(bytes: &[u8]) -> bool{
bytes.iter().fold(true, |acc, b| acc & (\*b <= 127))
}
This check will likely be the best for english text/code. You can check in varying size chunks depending on how common you think non-ascii will be. If its ascii you can move 128 bytes forward on avx2 in a couple of cycles.
Re:How Gzip Work
on Tuesday September 17, 2024 @08:54AM (#41567127)
If you prefer reading Python, I implemented the decompressor not too long ago: https://github.com/LaihoE/tiralabra
Re:Cold showers on overhyped topics (2017)
on Thursday January 04, 2024 @03:17PM (#38871719)
I've been wondering what is the "new" innovation about concurrency is in Go? Since most languages provide some type of channel/lightweight thread, what is the hype all about? I don't think Go makes the "hard" stuff in concurrency any easier, mainly the easy stuff becomes very easy, but in concurency most your time is spent in the "hard" parts.
Show HN: Gzip decompressor in ~300 lines of readable Python
Contains Method for a Slice
Ask HN: What is a good first task for a new software developer?
Re:Pandas v2.0 Released
on Monday April 03, 2023 @01:41PM (#35428081)
Couldn't agree more about the rust API. Python API seems OK. Found it very complicated to use and just clunky in general.
Re:Thirteen Years of Go
on Friday November 11, 2022 @12:09PM (#33563456)
I find it inconstant to be so pedantic about unused vars/imports to avoid bugs, but then leave error handling to what it is.
Re:Thirteen Years of Go
on Friday November 11, 2022 @10:00AM (#33561599)
I really want to love this language, a fast and simple garbage collected lang, but feel like they missed the spot a little. I just wish they did something different with error handling / nil, doesn't feel right for the language. Also whats up with stuff like unused imports being such a big deal?