Better HN
topnewbestaskshowjobs
Log inSign up

ComputerGuru

32,383 karma · joined Jan 3, 2008 (18y ago) · 8,295 submissions

mqudsi on most sites.
Submissions

comment 4y ago · link · parent

Storing the index of an item in a vector in an actual application (vs in some tightly bounded api of a small, purpose-built library used by said application) is highly non-idiomatic and would emit noticeable stink in any code review. It’s just too hard to remember to update all indices after removing an entry. I’ve seen this mistake made in C, C++, rust, C#, JS, and Python code bases and it is usually someone that hasn’t been around long enough to understand the implicit technical debt in certain approaches that would suggest such a thing, regardless of language.

The most obvious/naive solution along the lines you spelled out (in rust but really for any language) would be a hash map of ids/values, otherwise Rc and maybe some weak references.

comment 4y ago · link · parent

HN loves to assume that if someone bashes a Democrat then they’re big Trump fans. I don’t know GP and I don’t know which way he/she leans politically, but I wouldn’t think that their post should be read as “compared to Trump, Biden is….”

comment 4y ago · link · parent

After starring in The China Syndrome she became a huge anti-nuclear zealot and would hold protests and drew lots of attention and bent many ears her way with her stardom and her Hollywood “expertise.”

comment 4y ago · link · parent

I can see how OP means just that. Nuclear construction went from skyrocketing to free fall after Ronda’s starring in The China Syndrome led her to become an anti-nuclear hyperevangelist. People listened to her and the Three Mile Island incident shortly thereafter could plausibly be said to have been blown way out of proportion with her amplifying voice.

It’s not unreasonable to think that if that movie and Fonda’s anti-nuclear bent never happened, nuclear would have become so profligate that nothing Putin did would have given him a hold over the Western energy sector.

comment 4y ago · link · parent

I’ve had similar thoughts and starting writing my own rust XAML framework with exchangeable backends (backend implementations incomplete) but didn’t find much interest from the community despite how awesome XAML is at separating the UI from the toolkit.

comment 4y ago · link · parent

Cheers!

comment 4y ago · link · parent

Binaries are freely available from package management repos, with the benefit of having a known toolchain you can tag your ML inputs with. All the package managers I've worked with have a strongly structured "upstream" or "repo" field or similar that you can use to get to the source.

comment 4y ago · link · parent

I was so excited for the ATSAMD21 series when I first came across it maybe five or six years ago, because on paper it had most of everything I was looking for while remaining approachable for single-man dev teams and home(lab) assembly. Like OP, I found it extremely difficult to successfully use in practice, and have since then migrated to STMicroelectronics' offerings (STM32 MCUs, available in a huge range that includes Cortex-M0, M3, M4, M7, and now M33 for ARMv8-M). They're much more intimidating on paper, but they actually work like it says on the sticker.

I have a fondness for MIPS as I first learned CPU architecture and more advanced compiler design against it, but I'm surprised OP didn't go with ARMv7 support. The bi-endianness is almost a non-issue as it's effectively a Little Endian architecture with a Big Endian toggle for backwards compatibility - I can't say I'm positive, but my gut instinct would be that it's been forever since ARMv3 shipped defaulting to Little Endian, and most (if not all) of the kernel code has been migrated to Little Endian since then to unify with the most popular targets.

comment 4y ago · link · parent

Windows NT had a fairly complete POSIX subsystem (for the time) [0] (but not virtualization layer) so you’d only be able to use Linux if it could compile as a rump kernel (it can’t).

That was followed by a replacement subsystem, Windows Services for Unix [1], which later used a “real” Unix compatible layer after their purchase of Interix.

WSLv1 was therefore the fourth subsystem available (though it couldn’t do some of what the previous ones did, and did some of what they couldn’t), and the complete rewrite as WSLv2 is at least the fifth such attempt.

[0]: https://en.m.wikipedia.org/wiki/Microsoft_POSIX_subsystem

[1]: https://en.m.wikipedia.org/wiki/Windows_Services_for_UNIX

comment 4y ago · link · parent

Thanks for confirming! The pictures made it seem like it wasn’t VESA compatible.

comment 4y ago · link · parent

This is actually how the bundled, first-party rustdoc that ships with the rust compiler works. Triple slash /// comments above public API members are extracted as-is, rendered as markdown, cross-linked to one another, and rendered to HTML.

comment 4y ago · link · parent

Honestly the latest Windows 10 isn’t bad in this regard and Windows 11 has improved on that without making it a chore (although the other regressions in 11 make it a strong Do Not Recommend for now). The PowerToys expansion for this feature is worth trying (it’s by Microsoft and it’s free).

comment 4y ago · link · parent

I’ve been looking for a replacement for my 16:10 HP zr30w with either high-dpi or high-fps (not that this is particularly either) and have been coming up high-and-dry. This looks like an alternative worth exploring instead of the garbage 16:9 flooding the market with unusable high-dpi real estate.

But it doesn’t have VESA? I’m all for the “save desk space” mantra that’s plastered all over their marketing materials, but my solution was a wall/stud-mounted gas spring fully-articulated VESA mount that I’ve used across several monitors. I definitely don’t want a desk-clamped alternative that will flatter and shake as I type vigorously on my mechanical keyboard (on anything that isn’t a solid, handcrafted wood desk that takes four people to move).

comment 4y ago · link · parent

I’m not trying to be particularly pedantic but that still doesn’t make WinAppSdk built on UWP; it’s mainly an expanded and cleaned-up collection of first-party cross-language wrappers/bridges/ffi to WinRT to hide the COM underpinnings plus unify some of the disparate Win32 vs WinRT APIs.

As you know, WinRT predates UWP. UWP as tech isn’t strictly defined but it includes things that are out of the scope of WinRT itself and aren’t available via WinAppSDK even now that UWP is finally, officially dead.

comment 4y ago · link · parent

You have it backwards, UWP is based on WinRT (which is built on top of the COM underpinnnings) and not the other way around.

comment 4y ago · link · parent

I don’t think msvcrt is exposed to link against in the DDK anymore. I maintain this, with the caveat that you really need to know what you’re doing: https://github.com/neosmart/msvcrt.lib

comment 4y ago · link · parent

Misleading title. Tweet calls for slaughter and arson; I don’t think the use of “fuck” was the problem.

comment 4y ago · link · parent

PDF of the ruling: https://www.supremecourt.gov/opinions/21pdf/20-1530_n758.pdf

As usual, it’s more nuanced than the headline.

2239.

Supreme Court limits EPA’s power to cut emissions(bbc.com ↗)

448 points · by ComputerGuru · 4y ago · 1425 comments

comment 4y ago · link · parent

Error correction and redundancy to make it work with weird lighting, obscured line-of-sight to portions of a card, shadow from the card on top obscuring part of the edge of the card under it, and general error correction to handle reading such a thin strip with a pretty poor camera?

comment 4y ago · link · parent

No problem. (I didn't downvote.)

comment 4y ago · link · parent

Thanks, I missed that it transpiles to SQL.

comment 4y ago · link · parent

The second part of your statement is fine, but the first part is just a complete fallacy.

I can transpile a pure language exposing only `if`, `while`, and `for` with no standard library and no interop to C - that definitely does not make it "trivial" that it can do everything SQL can do.

comment 4y ago · link · parent

(Obvious?) answer conveniently omitted from headline: no.

2245.

Rust limitations implementing generic commutative mathematical operations(neosmart.net ↗)

1 points · by ComputerGuru · 4y ago · discuss

comment 4y ago · link · parent

From a mathematical point-of-view are there any transforms/operations (note: not end results, but actual operations) that this can do that SQL can't or vice-versa?

comment 4y ago · link · parent

@todascerdoti Thanks for submitting this. You might want to drop the trailing "e" from the truncated "mathematical" in the title, though!

comment 4y ago · link · parent

How does yacy handle paywalls? Does it use the cookies from your browser instance or can it use bypass services like 12ft and co?

comment 4y ago · link · parent

https://xkcd.com/806/

https://www.revk.uk/2010/10/xkcd806-compliance.html?m=1

comment 4y ago · link · parent

The schematic/drawing says 2000 meter range, the title and description say 1km. Not sure which to believe!
1
747576
277