HNHacker News
TopNewBestAskShowJobs

wmu

293 karma · joined September 20, 2014

I'm a programmer, here is my website http://0x80.pl
submissionscomments
wmu··on Efficient C++ Programming for Modern 64-bit CPUs: Chapter 4/part 2
That's a very important point. For instance on Intel's CPUs multiplication is pipelined - its latency is 3 cycles, but throughput is 1 cycle. Thus completing N multiplication takes 2 + N cycles (in the best case), not 3 * N.
wmu··on Accelerated SQL for JSON with AVX512 (Golang)
Disclaimer: I'm one of the authors of sneller core. We have been working on this project for more than a year. It's has got neat AVX512-centered architecture and many neat tricks inside.
wmu··on Yes Hello
There are many scary things in the world. But the scariest is the line "Hi, I have a quick question". :)
wmu··on “Fast Kernel Headers” Tree -v1: Eliminate the Linux Kernel's “Dependency Hell”
It was already said by the author, that approx ~70% of patches can be applied independently in various part of the source tree. The rest has to be synchronised.
wmu··on Google no longer producing high quality search results in significant categories
DuckDuckGo is also not good. Last week I switched to Bing and its results are surprisingly good.
wmu··on You can't copy code with memcpy
- It looks like a virus... - But it's the antivirus!

:)

wmu··on Bit Test and Reset vs. Compilers
Thanks, that's a really elegant approach.
wmu··on Bit Test and Reset vs. Compilers
Author here. I cannot use BSR, because have to execute code for all bits, regardless their value. The range is: the last bit to the first with value 1. It's a non-obvious iteration schema. :)
wmu··on English has been my pain for 15 years (2013)
> In continental Europe I have often been in a room with people from 10 different countries say Germany, France, Italy, Russia, Poland, India, China, Korea, England. Everyone could understand each other's broken English with the exception that half of the people couldn't understand English guy.

The problem is that most people are not exposed to real-life English. It's either quite artificial language during classes or well spoken lines in movies. Words are spoken slower and clearer. Native speakers speak fast, use linking, colloquial language, multitude of idioms, phrasal verbs, and tons of stuff never ever touched during classes.

wmu··on Ask HN: How do you track your billable working hours?
I use my own, simple CLI tool* (not only to track working hours, but also to track open source or hobby activiets). For many years I used Toggl, which is great and powerful - I just needed something that works offline.

[*] https://github.com/WojciechMula/timetracker

wmu··on Programming Idioms
There's a similar project http://rosettacode.org/wiki/Rosetta_Code.
wmu··on Three Fundamental Flaws of SIMD
We can call these things "flaws" or "traits", it doesn't really matter. The reality is SIMD hardware is ubiquitous, while the alternatives the article mentions are niche. Maybe except ARM SVE, which appeared this year on the market.
wmu··on Artist faked being a billionaire to photograph New York City’s best views
Love the whole project, she's my hero. :) I'm wondering how much did she pay in total to look like a billionaire.
wmu··on C++ Alternative Operator Representations
I often use "not", "and", "or" to clearly express logical conditions. Bit operations look better as cryptic symbols "&", "|" and "~". :)
wmu··on IBM employee forced to stop kernel work under personal email address
The sentence in question is misinterpreted. I read it like this: our contract applies all the time, not only when you're directly working for the company. We don't know what the contract exactly says. Likely there's an agreement not to work on IBM-related products in spare time.
wmu··on Show HN: I wrote a book about Go
Looks great! Seems there were some issues in conversion into HTML chapter titles. For example https://www.practical-go-lessons.com/chap-31-logging#log.fat...
wmu··on Performance comparison: counting words in Python, Go, C++, C, Awk, Forth, Rust
Regarding the C++ version: instead of copying data to a vector and then sorting the vector, it might be more profitable to use std::multimap<size_t, string>. This is a sorted container (likely rb-tree based) that handles duplicated keys.

Also, as somebody else mentioned, iostreams are slow. Even simple reading of file can be several times slower than plain C (http://0x80.pl/notesen/2019-01-07-cpp-read-file.html).

wmu··on .DS_Store
The article mentions that the format was reverse-engineered, but the link goes to some extension database page, without any further details. Is the format really known?
wmu··on Zluda: CUDA on Intel GPUs
Trivia: the Polish word "cuda" means "miracles", "zluda" ("złuda") means "a delusion". Nice pun.
wmu··on Create diagrams with code using Graphviz
Really nice, well written introduction. Graphviz is a cool tool, we used this when debugging some graph-related algorithms.
wmu··on Is Haskell really the language of geniuses and academia?
There's is an interesting supposition: if Haskell wasn't pure functional (had imperative constructions) it would be more popular. But Ocaml is not pure functional and is not popular.
wmu··on Regex2fat: Turn your favorite regex into FAT32
There's the first issue: "`regex2fat` is nine characters long" (https://github.com/8051Enthusiast/regex2fat/issues/1) :)
wmu··on Questions to ask at the end of a technical interview (2017)
After series of interviews I compiled questions to employer, maybe that would help others: https://github.com/WojciechMula/interview-questions
wmu··on Things Markdown got wrong
A thing for people not familiar with reST: check out ASCII-art tables - https://docutils.sourceforge.io/docs/user/rst/quickref.html#... :)
wmu··on Bosses panic-buy spy software to keep tabs on remote workers
> The irony was that I was probably the most productive person in that office (in my humble opinion).

It's a cognitive bias. I'm pretty sure I came across such example in Kahneman's "Thinking, Fast and Slow".

wmu··on New Grad vs. Senior Dev
Well, this is a nice example of lack of knowledge flow. The senior developer spent his time explaining things that should have been put in the procedure's comment. Yes, that's what comments are for.
wmu··on Compile-time version strings in CMake
Instead of creating C code inside cmake scripts it's better to use command configure_file (https://cmake.org/cmake/help/latest/command/configure_file.h...). The command creates a source file based on a template file.
wmu··on Using floating-point numbers for money
You can, but you shouldn't. Use of fixed-point numbers is way more reliable, often faster as it's implemented with integer numbers, you can easily detect overflow, you can increase/decrease precision if you need, etc.
wmu··on Use Noexcept for Exception Handling in C++ Programs
In GCC runtime the terminate handler is called after stack unwinding.
wmu··on Use Noexcept for Exception Handling in C++ Programs
A perfect example of the small-scale-example syndrome. As somebody else noted here, throwing an exception in a noexcept context calls std::terminate. Figuring out why terminate was triggered in a large, multithread program sounds like a funny task until you have to do it by yourself.

The only place for noexcept are getters that return a copy of a POD value or a (const-)reference. Placing noexcept anywhere else is a call for problems.

Page 1 of 6Next →