News for hackers. Stuff that matters.

MawKKe

Re:Two-Stack Sliding-Window Aggregation on Friday October 16, 2026 @08:21AM (#50117495)
Would be nice to have some example code how the class is intended to be used
Well, that's the danger of using software without version pinning.

Also, usually tools like Ruff can be configured to enable/disable project-specific formatting rules (via a config file), allowing you to suppress the defaults you disagree with, or whose consequence you don't want to deal with _right now_. Some tools might even support suppressing specific rules per-file, so you can migrate codebase over time instead of in one go.

Having a config that explicitly defines the rules enforced in the project is really useful, and perhaps even crucial the bigger the project grows.

Sounds like the issue is not the tools themselves, but that the project management / stewardship allows someone to replace tools willy-nilly leaving others to pay the cost of migration?

At $WORK we have "code guardians" whose responsibility is do to this kind of migrations strategically in the background. The intent is that most other developers should not need to do any (or very little) extra work beyond the task they are actively working on.

Re:Have You Restarted Your Computer This Week? on Thursday July 02, 2026 @07:55AM (#48760026)
This might be nvidia driver thing, I've had similar soft-bricking happen on ubuntu as well
FYI you can add description text to a photo in the (default) Photos app. Just swipe up and there should be a text box. You can (usually) find a photos based on what you've written
Re:I taught my neighbor to keep the volume down on Sunday February 01, 2026 @04:57PM (#46849784)
https://en.wikipedia.org/wiki/Co-channel_interference

One could argue that "interference" is not entirely a objective technical definition, but also subjective w.r.t quality of the service expected.

Also, in this scenario, if the two remotes were to transmit simultaneously, it is possible both boxes could have received some mangled, unregonizable waveform due to the interference.

Re:Fast on Wednesday July 30, 2025 @05:18PM (#44739622)
Similar thing happened (to me) with Hackaday around 2010-2011. I used to check it almost daily, and then never again after the major re-design.
Re:Reflecting on a Year of Gamedev in Zig on Friday May 02, 2025 @05:58AM (#43867903)
There's also `std.fmt.allocPrint()` which functions similarly to `format!()`. Although I'd argue its rather poorly named, like many of the functions in the stdlib...

For wanting to avoid fiddling with multiple repeated alloc/defer-free, it's often convenient to use the arena allocators that allow you to release everything with a single `defer arena.deinit()`

Re:Why performance optimization is hard work on Wednesday April 30, 2025 @05:20AM (#43842871)
Was the need for optimization work something that was on your mind the whole time? Like a nagging feeling in the back of the head that the code is not working as well as it _should_ be working? i.e. stress.

And when you finally "fixed" the issue through optimization, your mind allowed itself to let go of these open loops (borrowing the GTD terminology), leading to relaxation?

Isn't the new one also horribly type-unsafe? Since you can put (parent) objects of any kind into the list without any mechanism to detect which is which?
Zig builds a statically linked library called "cgo_static_linking" from Zig sources. Zig places the artifact into "./zig-out/lib/cgo_static_linking.a" (or maybe some other extension). The library is exported with C ABI, which Go (cgo) compiler supports.

The #cgo line tells the Go compiler to add custom compilation flags: -l flag tells the compiler that you wish to link to a library called "cgo_static_linking" in to the binary. However, the cgo compiler can't find it since it is not in the default search paths for libraries. The -L option extends the library search path to "./zig-out/lib/", allowing "cgo_static_linking" to be found.

The "#include" line inserts the header file contents as-is into the source file (main.go), bringing the definition of the function available to the compiler. The compiler is then able to compile the Go source, and later link it with the other build artifacts to produce the final executable.

The key here is the "C ABI" which acts as common ground for both languages. The rest is just scaffolding to let the compilers find and connect appropriate files together.

Re:War story: the hardest bug I ever debugged on Thursday March 27, 2025 @03:36PM (#43497253)
numpy as well. and tensorflow
Re:Bzip3: A better and stronger spiritual successor to BZip2 on Saturday February 01, 2025 @06:21PM (#42903611)
Quick glance of zstd github repo shows they do provide CMake build scripts?
I mean, it's possible that at some point evolution produced such nuclear reactored individual, but who got "naturally selected" rather quickly for obvious reasons
Re:Developing inside a virtual machine on Wednesday January 01, 2025 @06:45PM (#42570266)
VScode devcontainer can build from existing Dockerfile. You can develop the project image as usual, and then reference the Dockerfile from devcontainer.json. This means you can build and run from the command line via `docker` command if needed. The VScode extension just makes this slightly easier.

Not sure how GP's company does it, but that is how I would configure it.

Caveat: the default devcontainer initialization workflow does _not_ create the Dockerfile, only the .json.

At $work we don't use devcontainer.json, but we can launch the development environment image such that you can SSH into it as if it was a regular VM.

Re:Apple. Apple Please on Sunday August 11, 2024 @03:50PM (#41218868)
If you think about it, a CLI argument parser takes in a sequence of tokens and transforms the information into some kind of internal repsentation, which is then later interpreted. Just like what a compiler/interpreter does, except now the input is already tokenized. So there does not seem to be a practical way to "standardize" this interface any more than you can standardize a compiler for all languages.

It's kinda whacky to think about that every sufficiently complicated CLI app out there implements its own ad-hoc, informally-specified, bug-ridden, slow implementation of half of common lisp _just_ to prepare running the actual program payload...

Re:Enum class improvements for C++17, C++20 and C++23 on Sunday August 04, 2024 @06:54PM (#41156858)
IMO that's the typical experience with many of the features in modern C++ standards. You read about a really neat useful thing they added, something that seems to provide a safe and practical way to overcome a shortcoming in the language. You may even get a little excited...until you try to actually use it and realize its full of new footguns and weird limitations
Re:No More Blue Fridays on Monday July 22, 2024 @01:39PM (#41037131)
Embrace, extend, ...
Create value for shareholders vs. create value for customers
Re:Magic Numbers on Friday April 26, 2024 @05:59AM (#40167532)
it always takes just one a-hole to ruin it for everyone else
Re:TSAC: Low Bitrate Audio Compression on Tuesday April 09, 2024 @08:43AM (#39978803)
Reminds me of what it sounds like to tune an old FM radio
Re:Billion File Filesystem on Thursday February 08, 2024 @07:31AM (#39301158)
> I’ve done this before, but this time I made it a little simpler for me to do it again: everything in one Rust program rather than clunky scripts.

Warms my heart

Re:Check Out These Self-Soldering Sleeves from World War II on Friday February 02, 2024 @09:17AM (#39228723)
Next up: self-sealing stem bolts
Re:Idea for a new hand tool: Automatic Wire Twisting Pliers on Friday January 26, 2024 @05:15PM (#39149401)
The traditional(?) version of that tool[1] could also maybe work if you are allowed to make a loop of the wires for twisting. The tool itself is just a hook on a angled axle that rotates in the handle. It's called 'surrauskoukku' in finnish, not sure about the english name

[1] https://www.youtube.com/watch?v=X1BJQorsaCQ

Re:AutoGen: Enable Next-Gen Large Language Model Applications on Wednesday October 18, 2023 @09:16AM (#37928190)
Is Microsoft chronically incapable of coming up with original names?
Re:Apple Bricked my AirPods and now wants me to buy new ones on Friday October 13, 2023 @03:24AM (#37867775)
see my question in the other post https://news.ycombinator.com/item?id=37867368
Re:Not setting up Find My bricked my MacBook on Friday October 13, 2023 @02:44AM (#37867505)
to clarify what I mean: GP lost the right one, but is it possible the replacement pod was never actually associated as the "right" one due to a mixup? In this situation, the charger case would have left and right pods, but neither of them would be associated with the "pair"
Re:Not setting up Find My bricked my MacBook on Friday October 13, 2023 @02:23AM (#37867368)
any possibility that the apple rep screwed up and unpaired/replaced the wrong pod? i.e your "pair" would now have two pods, neither of which are actually associated with the hardware you have access to

Older »