HNHacker News
TopNewBestAskShowJobs

mastax

6,420 karma · joined January 15, 2015

submissionscomments
mastax··on Writing a simple windows driver in Rust
Thanks. A looong time ago I looked into accomplishing it using AppContainers but that approach looked even more confusing and difficult than the kernel driver.
mastax··on Writing a simple windows driver in Rust
Huh my Documents folder is weirdly empty, where did-

> Shortcut to Documents (OneDrive - Personal)

Oh good, now all that garbage is being synced across machines. Lovely.

mastax··on Writing a simple windows driver in Rust
I had an idea to write a filesystem filter driver which would let you configure path remapping rules of sorts, depending on the application. Things like:

- %userprofile%\.vscode -> %appdata%\vscode

- %CSIDL_MYDOCUMENTS%\Call of Duty -> %userprofile%\Saved Games\Call of Duty

Because my documents and home directories filling up with a bunch of garbage which has a designated place on the filesystem filled me with impotent rage. I scaffolded out a project to write a filter driver in rust, read through the minifilter documentation, realized how much work it was going to be, and gave up.

I have made my peace with the fact that a windows system is just going to be filled with garbage.

mastax··on OpenWrt 24.10.0 – First Stable Release
I went searching the OpenWRT forums and wiki for recommendations and ended up with the GL.iNet MT-6000. The stock firmware is a gui around a modern OpenWRT and they don’t try to lock it down at all so flashing is easy.
mastax··on Bunkers in Albania
> The construction of prefabricated bunkers alone cost an estimated two percent of net material product, and in total the bunkers cost more than twice as much as the Maginot Line in France, consuming three times as much concrete.

Incredible.

mastax··on FFmpeg by Example
I can vouch for GStreamer as an API. I was using the Rust bindings so not super familiar with the C API but it looks good. GObject makes some things verbose but once you understand it you can interact with every object in the API consistently. There is a ton of necessary complexity (video is hard) but it’s really well designed and pretty well implemented and documented.

If you have a pretty normal use case the Bins (decodebin, transcodebin, playbin) make that pretty easy. If you have a more complex use case the flexibility of the design makes it possible.

mastax··on Why is my CPU usage always 100%?
Karliss above found docs which mention:

> This request requires up to three timer clock cycles. If the selected timer is working at slow clock, the request could take longer.

Let's ignore the weirdly ambiguous second sentence and say for pedagogical purposes it takes up to three timer clock cycles full stop. Timer clock cycles aren't CPU clock cycles, so we can't just do `nop; nop; nop;`. How do we wait three timer clock cycles? Well a timer register read is handled by the timer peripheral which runs at the timer clock, so reading (or writing) a timer register will take until at least the end of the next timer clock.

This is a very common pattern when dealing with memory mapped peripheral registers.

---

I'm making some reasonable assumptions about how the clock peripheral works. I haven't actually dug into the Marvell documentation.

mastax··on Nvidia announces next-gen RTX 5090 and RTX 5080 GPUs
> Also 60fps is pretty low, certainly isn't "high fps" anyway

I’m sure some will disagree with this but most PC gamers I talk to want to be at 90FPS minimum. I’d assume if you’re spending $1600+ on a GPU you’re pretty particular about your experience.

mastax··on Databases in 2024: A Year in Review
I think that just means they aren’t allowed at career fairs etc.
mastax··on 3D-printed neighborhood nears completion in Texas
This only helps with the framing and cladding. You still need all the labor for interior finishings, plumbing, electrical, HVAC, roofing, foundation, and site prep. That’s 80%+ of the cost. Assuming the 3D printed walls are even cheaper than wood frame, which is doubtful.
mastax··on Gordon Mah Ung has died
I grew up on Gordon’s rant of the week on the Maximum PC podcast. I’ll miss him.
mastax··on Xerox to acquire Lexmark
Dell printers are also rebadged Lexmark’s. Or at least they were 20 years ago.
mastax··on Why we use our own hardware
ZFS replication is quite unreliable when used with ZFS native encryption, in my experience. Didn't lose data but constant bugs.
mastax··on Borrow Checking, RC, GC, and Eleven Other Memory Safety Approaches
Yeah C# is very well designed for gradually introducing low level concepts for performance.
mastax··on The humble for loop in Rust
It's a little bit surprising to me that LLVM can't eliminate the grow_one check. It looks like there's a test ensure it's not needed in the easier case of vec.push(vec.pop()) [0]. With the iterator the optimization is handled in the standard library using specialization and TrustedLen[1].

[0]: https://github.com/rust-lang/rust/blob/master/tests/codegen/...

[1]: https://github.com/rust-lang/rust/blob/d4025ee454169fbd22f57...

mastax··on Intel announces Arc B-series "Battlemage" discrete graphics with Linux support
In the Hardware Unboxed Podcast, Intel's Tom Peterson gave some explanation (@ 24:00) for the difference in transistor density:

1. There are dummy transistors included in the design for various manufacturing reasons, and there's no standard as to whether those are included in the numbers.

2. SRAM cells in particular are highly optimized and the amount of SRAM (e.g. cache memory) on the chip versus logic will have a big influence on the transistor density.

He said he's still asking around the engineering team for a more complete explanation but that's the supposition.

mastax··on China's Salt Typhoon recorded top American officials' calls, says White House
When the state wants to go to war already and is looking for a justification.
mastax··on Replace Philips Hue Automation with Home Assistant's
They can still be controlled through HA when directly bound.
mastax··on Replace Philips Hue Automation with Home Assistant's
With zigbee you can “bind” devices together, so that their interactions work without needing the hub to intervene. I bound my IKEA buttons to my IKEA lights with my homeassistant controller (with some difficulty) so that even when the controller is offline the buttons will still work.
mastax··on The deep roots of Americans' hatred of their health care system
In the American political system currently the reward for passing a large piece of legislation, even one which eventually becomes popular, is to be voted out at the next midterm elections. So why bother? Don’t worry about legislation, just tweet.
mastax··on "BGP at home": getting a DIA circuit installed at home
Very similar to the process I took getting DIA to a commercial building. They said they spent $60,000 pulling fiber half a mile through a business park (we didn’t pay this). We only have one ISP device in our rack (Verizon truly ships their org chart). We paid our contractor to have fiber installed from the DEMARC to the server room but apparently the ISP would’ve done that for free, oops.

And yeah the quality of customer service we’ve gotten from three different business providers has been exceptional. It’s crazy to have actual engineers you can call who know what’s going on. You get what you pay for.

mastax··on Intel announces Arc B-series "Battlemage" discrete graphics with Linux support
Yes, the slide deck mentions reBAR is still required.
mastax··on Intel announces Arc B-series "Battlemage" discrete graphics with Linux support
Those numbers are identical to the A770, and don't match the numbers from the preview[0], so I think that's a copy paste error.

If we use the numbers from the preview:

    |        |Arc A770|Arc B580|RTX 4060|
    |--------|--------|--------|--------|
    |Process |N6      |N5      |N5      |
    |Die Size|406mm^2 |272mm^2 |159mm^2 |
    |Trans.  |21.7B   |19.6B   |18.9B   |
    |Mem Bus |256 bit |192 bit |128 bit |
    |TDP     |225W    |190W    |115W    |
    |~Perf   |90%     |110%    |100%    |
In terms of performance per die area it's a big improvement over A770 but still far behind Nvidia. It's interesting that the transistor density is so much lower than the 4060 despite having the same (or at least similar) process node. Speculating about why that may be:

- Nvidia has better layout. - Intel is using higher performance (larger) transistor libraries or layout in order to hit the higher boost frequencies (2800 vs 2460). - Wider bus interface takes up more space. - The B580 may have 1 render slice and 64-bits of memory bus disabled, and they're not including those transistors in the count, but they still take up area.

[0]: https://www.techpowerup.com/review/intel-arc-b580-battlemage...

mastax··on Intel announces retirement of Pat Gelsinger
AMD has a big wafer supply agreement with GlobalFoundries, and has since the spinoff. It was exclusive until the seventh WSA in 2019 which allowed AMD to purchase 7nm and beyond from other suppliers (without paying penalties) which was the only reasonable resolution after GloFo cancelled their 7nm fab (which may have been the best thing to happen to AMD). But AMD increased their GloFo orders in May and December 2021 during the chip crunch to $2.1B total through 2025. If you look at the first WSA amendment from March 2011 it includes AMD agreeing to pay an additional $430M if they get some (redacted) node in production in time.

Anyway, whatever woes GloFo is facing you can’t blame them on AMD. They had an exclusivity deal for a decade which only got broken when it was no longer tenable and AMD still buys a ton of their wafers. I suppose AMD may have bought more wafers if their products didn’t suck for most of that time but it had nothing to do with shifting production to TSMC which only happened after GloFo gave up.

mastax··on Volunteer DEF CON hackers dive into America's leaky water infrastructure
> What about Department of Homeland Security's Cybersecurity and Infrastructure Security Agency (CISA), where are they in all of this?

The CISA does this type of thing all the time. Here is an example just from their recent news releases in the past week: https://www.cisa.gov/news-events/alerts/2024/11/21/cisa-rele...

The CISA offers to assist infrastructure providers in a number of ways: https://www.cisa.gov/resources-tools/services/assist-visits Presumably the NRWA could have asked the CISA for help with this initiative.

The CISA has 3,000 employees and a budget of $3B, which is a lot, but not enough where they can be involved in everything. For reference there are 12,500 utility scale power plants and 148,000 public water systems in the United States. The scale of the problem means they must be mostly an advisory organization, where most of the work gets done by people at the infrastructure organizations or, sure, volunteers.

Now, I’m not saying that the CISA is doing a good job, I genuinely have no idea. Determining that would take a lot of knowledge, probably insider knowledge, and weighing what they’re doing against what resources they have available. But them not being involved in some random project that showed up in your newsfeed doesn’t mean they have severely failed.

mastax··on AAA – Analytical Anti-Aliasing
Viewing the article in Safari.
mastax··on AAA – Analytical Anti-Aliasing
I’m definitely seeing similar artifacts when at 2x on an iPhone 15 Pro.
mastax··on I sent an Ethernet packet
I was recently bringing up a custom board with a W6100 chip and it’s funny how closely my experience paralleled this one.

I also had (a different) issue with SPI communication (the W6100 uses a little different protocol).

I still couldn’t get any Ethernet packets to send/receive with a real machine, so I did basically the same debugging step: bought an off the shelf W6100 dev board and planned to use their arduino library to compare against. That’s where I left that project.

mastax··on Mind-Bending Soviet Era Oil Rig City on the Caspian Sea
Google Maps' satellite photography only extends a bit into seas, where it transitions to bathymetric data. It looks like the Caspian Sea doesn't have any bathymetric data though, which is strange. Even the great lakes have it.
mastax··on Trump wins presidency for second time
The president has huge amounts of executive authority over tariffs. I don’t know where the boundaries are but I wouldn’t be surprised if we saw huge tariff increases in the first hundred days.
← PreviousPage 5 of 34Next →