Better HN
topnewbestaskshowjobs
Log inSign up

MawKKe

480 karma · joined Jan 26, 2016 (10y ago) · 125 submissions

Programming enthusiast. Electronics hobbyist.

https://github.com/MawKKe

https://www.youtube.com/user/MawKKe

https://www.reddit.com/user/MawKKe

https://twitter.com/MawKKe (Although I don't use it..)

Submissions

comment 1mo ago · link · parent

Would be nice to have some example code how the class is intended to be used

comment 4mo ago · link · parent

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.

comment 4mo ago · link · parent

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.

comment 4mo ago · link · parent

This might be nvidia driver thing, I've had similar soft-bricking happen on ubuntu as well

comment 6mo ago · link · parent

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

comment 9mo ago · link · parent

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.

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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()`

comment 1y ago · link · parent

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?

comment 1y ago · link · parent

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?

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

numpy as well. and tensorflow

comment 1y ago · link · parent

Quick glance of zstd github repo shows they do provide CMake build scripts?

comment 1y ago · link · parent

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

comment 1y ago · link · parent

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.

comment 2y ago · link · parent

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...

comment 2y ago · link · parent

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

comment 2y ago · link · parent

Embrace, extend, ...

comment 2y ago · link · parent

Create value for shareholders vs. create value for customers

comment 2y ago · link · parent

Don't give people ideas https://gist.github.com/MawKKe/1fafc1f4a5eb79ed654cf0567c284...

comment 2y ago · link · parent

it always takes just one a-hole to ruin it for everyone else

comment 2y ago · link · parent

Reminds me of what it sounds like to tune an old FM radio

comment 2y ago · link · parent

related to recent events? https://old.reddit.com/r/linux/comments/1brhlur/xz_utils_bac...

comment 2y ago · link · parent

> 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

comment 2y ago · link · parent

Next up: self-sealing stem bolts

comment 2y ago · link · parent

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

comment 3y ago · link · parent

Is Microsoft chronically incapable of coming up with original names?

comment 3y ago · link · parent

see my question in the other post https://news.ycombinator.com/item?id=37867368

comment 3y ago · link · parent

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"

comment 3y ago · link · parent

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
12345