News for hackers. Stuff that matters.

wmu

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.
Re:Accelerated SQL for JSON with AVX512 (Golang) on Tuesday May 17, 2022 @10:39AM (#31411377)
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.
Re:Yes Hello on Thursday January 20, 2022 @03:57PM (#30014868)
There are many scary things in the world. But the scariest is the line "Hi, I have a quick question". :)
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.
DuckDuckGo is also not good. Last week I switched to Bing and its results are surprisingly good.
Re:You can't copy code with memcpy on Wednesday December 29, 2021 @06:27PM (#29731486)
- It looks like a virus... - But it's the antivirus!

:)

Re:Bit Test and Reset vs. Compilers on Friday December 24, 2021 @09:00AM (#29673616)
Thanks, that's a really elegant approach.
Re:Bit Test and Reset vs. Compilers on Thursday December 23, 2021 @06:45PM (#29667976)
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. :)
Re:English has been my pain for 15 years (2013) on Wednesday December 22, 2021 @07:03AM (#29648176)
> 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.

Re:Ask HN: How do you track your billable working hours? on Wednesday August 25, 2021 @03:31PM (#28305860)
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

Re:Programming Idioms on Sunday August 15, 2021 @04:40PM (#28192326)
There's a similar project http://rosettacode.org/wiki/Rosetta_Code.
Re:Three Fundamental Flaws of SIMD on Tuesday August 10, 2021 @04:07PM (#28133644)
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.
Love the whole project, she's my hero. :) I'm wondering how much did she pay in total to look like a billionaire.
Re:C++ Alternative Operator Representations on Friday April 23, 2021 @02:23PM (#26917589)
I often use "not", "and", "or" to clearly express logical conditions. Bit operations look better as cryptic symbols "&", "|" and "~". :)
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.
Re:Show HN: I wrote a book about Go on Wednesday March 24, 2021 @01:00PM (#26569927)
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...
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).

Re:.DS_Store on Friday March 12, 2021 @04:18PM (#26441067)
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?
Re:Zluda: CUDA on Intel GPUs on Saturday February 27, 2021 @10:43AM (#26285520)
Trivia: the Polish word "cuda" means "miracles", "zluda" ("złuda") means "a delusion". Nice pun.
Re:Create diagrams with code using Graphviz on Wednesday June 10, 2020 @03:05PM (#23480815)
Really nice, well written introduction. Graphviz is a cool tool, we used this when debugging some graph-related algorithms.
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.
Re:Regex2fat: Turn your favorite regex into FAT32 on Wednesday April 15, 2020 @04:51PM (#22882891)
There's the first issue: "`regex2fat` is nine characters long" (https://github.com/8051Enthusiast/regex2fat/issues/1) :)
After series of interviews I compiled questions to employer, maybe that would help others: https://github.com/WojciechMula/interview-questions
Re:Things Markdown got wrong on Saturday April 04, 2020 @01:01PM (#22779558)
A thing for people not familiar with reST: check out ASCII-art tables - https://docutils.sourceforge.io/docs/user/rst/quickref.html#... :)
> 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".

Re:New Grad vs. Senior Dev on Saturday March 28, 2020 @05:55PM (#22714613)
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.
Re:Compile-time version strings in CMake on Wednesday February 19, 2020 @02:51PM (#22369337)
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.
Re:Using floating-point numbers for money on Saturday January 25, 2020 @04:19AM (#22145522)
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.
Re:Use Noexcept for Exception Handling in C++ Programs on Wednesday January 01, 2020 @04:22PM (#21930753)
In GCC runtime the terminate handler is called after stack unwinding.

Older »