HNHacker News
TopNewBestAskShowJobs

hpb42

518 karma · joined October 9, 2020

https://heitorpb.github.io/
submissionscomments
hpb42··on Benchmarking OpenZFS vs. EXT4 for My NAS
I use ZFS on my laptops and desktop but kind of considered Btrfs for this new NAS. What made me decide to use ZFS instead is that Btrfs does not have [yet] transparent encryption, I'd need to use dm-crypt/LUKS. ZFS has that natively, so :shrug: When transparent encryption lands on Btrfs, I may consider it for new machines (or Bcachefs if it gets back in the Linux Kernel).
hpb42··on Flash media longevity testing – 6 years later
Wouldn't a ZFS Scrub get the job done?
hpb42··on A picture of the sun, taken with a neutrino detector, at night through the Earth
> Also, has anyone though of how mind-numbingly wasteful solar fusion is? All that energy, and only a tiny fraction makes it to Earth with the rest getting dumped wastefully into space. Seems like an area that's ripe for disruption by a startup.

That energy can be captured by a Dyson sphere:

> A Dyson sphere is a hypothetical megastructure that encompasses a star and captures a large percentage of its solar power output

- https://en.wikipedia.org/wiki/Dyson_sphere

hpb42··on IBM nearing a buyout deal for HashiCorp, source says
Maybe Incus[0] as an alternative instead of fork.

- [0] https://linuxcontainers.org/incus/docs/main/

hpb42··on HashiCorp Exploring Potential Sale
In case one wants to switch from Hashicorp to alternatives that are similar enough or forks, what would that stack be?

Hashiternative stack:

- vault -> openbao (fork)

- terraform -> opentofu (fork)

- consul -> ?

- nomad -> slurm + something that runs/orchestrates windows jobs?

- hcl -> dhall + nix?

hpb42··on Cve-rs: Fast memory vulnerabilities, written in safe Rust
Oh, cool. They implemented a `download_more_ram()` function![0]

Does it crash safely as well? I did not test it, I more than 640 KB of ram.

- [0] https://github.com/Speykious/cve-rs/blob/d51f52dd64f148a086e...

hpb42··on China is building nuclear reactors faster than any other country
> billions of dollars' worth of safety measures

Is this a bad thing? Investing a lot into safety measures to avoid catastrophes seems better than investing significantly less because we assume is safe.

Could you elaborate on why this investment is an argument against nuclear?

I once talked to people that worked at Angra Nuclear Power Plant in Brazil and they said the real danger is actually the spent nuclear fuel. The power plant itself is safe due to many redundant safety measures, continuous tests and monitoring. I don't have a source for this, and don't take my words for absolute truth, I'm not an expert in the subject.

> kept from harming us by a large crew of skilled people

I'm glad to hear people working with nuclear are skilled ;) I assume people working in solar/wind/hydro are also skilled at their craft. And I'm sure you didn't imply that, maybe the phrasing wasn't the best?

hpb42··on Proposal on implementing permanent time zones in the European Union
Brazil abolished daytime change a couple of years ago. Our time is the same all year, no more +1 and then -1 hour.

It was mess on the day there should a change, many people arrived on their appointments one hour before or later. Many automatic systems changed their time, different clocks at home reported different hours.

This chaos lasted one morning. After some time, nobody now complains about not having it. Many people don't remember about the change anymore. The only people that complains about daylight change are the ones that work with people from countries that have that.

Abolishing daytime change is not the same as adopting an "universal" (country-like?) timezone, but shows that it is _possible_ to do on a "big country spanning a lot of latitude as well as longitude and tens of millions on wildly different work and sleep schedules".

Maybe the main issue is that many people fear change? (Which is quite "funny", as winter/summer time is a change in time...)

hpb42··on Extremely large telescopes at risk
Don't confuse extremely large telescope[0] with Extremely Large Telescope[1].

[0] https://en.wikipedia.org/wiki/Extremely_large_telescope

[1] https://en.wikipedia.org/wiki/Extremely_Large_Telescope

hpb42··on The first stable release of a memory safe sudo implementation
One of those left out features is `sudoedit` or `sudo -e`. I use this a lot when editing files in /etc or any file that my user does not have permissions. The flag first copies the file to a temporary location with permissions for my user to edit, then opens my text editor (defined via $SUDO_EDITOR env var) as _my user_, without any sudo permissions. After I close the editor, the file is copied back with the original permissions only if there were any changes.

The cool thing is running the editor via my user, which loads my user's configuration/plugins, instead of the root user's.

hpb42··on Ask HN: Can you suggest advanced books on integral calculation?
I really liked the calculus book by Swokowski. The books starts with a revision of the requirements to start learning derivatives, has sections dedicated to applications of that and then goes on to integrals, analytical geometry and differential equations. It will keep you entertained for months.
hpb42··on Lego MRI Scanners donated to hospitals to help children cope with anxiety (2022)
I worked with designing a local oscillator for NMR spectroscopy, seeing this in LEGO makes me remember all the nice things from that period :)

Would love to buy a LEGO set to have my own NMR machine at home. I couldn't find online, maybe they will release someday?

It would be nice to extend the room with the actual racks of electronics and power amplifiers, they only added the operator computers.

hpb42··on An exabyte of disk storage at CERN
> CERN’s data store has now crossed the remarkable capacity threshold of one exabyte, meaning that CERN has one million terabytes of disk space ready for data!

1MTB -> 1EB ready for data. It is _effective space_, not raw space. And it keeps growing.

hpb42··on Show HN: Servicer, pm2 alternative built on Rust and systemd
Kudos for making it daemonless!

I think Servicer can be a good starting point for people to learn how to use Systemd services and systemd-run. Systemd is huge and can be scary to learn, so providing a set of steps to get a service running is very instructive.

But then, Servicer requires super user priviliges to modify the system, instead of running everything as the non-privileged user, via `--user` flag for systemctl or via systemd-run...

There are few commands to learn the basics when setting up a new system wide service: systemctl and journalctl. Some examples: - systemctl daemon-reload: reload all unit files - systemctl start/stop/status/restart <service>: quite intuitive, don't you think? - journalctl -u <service>: to see all logs from that service. I like to also use `-f` flag to follow new log entries. - man systemctl: the manual for systemctl - man journalctl: the manual for journalctl

Writing new service units is the "hard" part, but there are plenty of "templates" on the net, or you can browse `/usr/lib/systemd/system/` for examples.

But don't let the critics here demotivate you. You made a tool, you published it, congrats!

hpb42··on Firefox finally outperforming Google Chrome in SunSpider
The article links to the benchmarks in https://arewefastyet.com/linux64/benchmarks/overview?numDays...

Some benchmarks evaluate "execution time", so the lower the better.

Some benchmarks have a "score" instead, that the lower the higher in the chart. I'm not familiar with these benchmarks and don't know how to interpret it. Is higher score worse or better?

hpb42··on Developers are building communities that act as their own miniature power grids
Cool! Thanks for the link.

A 10 kWh flywheel that can charge/discharge at 20 kW (lasts for 20~30 min at this power) costs ~11500 USD + installation and control system.

A Tesla Powerwall has 13.5 kWh capacity, delivers power at ~6 kW and costs ~11500 USD.

That doesn't seem a large difference to me.

hpb42··on Developers are building communities that act as their own miniature power grids
> A flywheel can provide frequency stabilisation, or it can provide energy storage, but it can't do both at the same time.

Ah, that's a good point to know. I thought flywheels could to both at the same time. Do they also help with keeping the load resistive? I guess their high inertial mass would add some inductance, which is how they stabilize the frequency?

Do you have some resources about this topic to share to a layman like me?

hpb42··on Developers are building communities that act as their own miniature power grids
I always wondered if flywheels[0] would be a good alternative to batteries to store energy. Flywheels can absorb peak current, help stabilize grid frequency[1] and can have high efficiency.

But I haven't seen much on the topic, and a lot in chemical batteries.

What are the prices and downsides of flywheels? Does anyone have an up date comparison of commercial solutions with TeslaWall and similar?

- [0] https://en.wikipedia.org/wiki/Flywheel_energy_storage - [1] https://en.wikipedia.org/wiki/Flywheel_storage_power_system#...

hpb42··on Ask HN: Who wants to be hired? (August 2023)

  Location: UTC-3, flexible
  Remote: Yes
  Willing to relocate: No
  Technologies: Linux, Python, Bash/shell, git, Docker/Podman, CI/CD, backend, microservices, infrastructure
  CV: https://heitorpb.github.io/Heitor-resume.pdf
  Email: heitorpbittencourt at gmail.com
  Interests: Python, Rust, Nix, infrastructure, systems engineering, distributed systems, high performance computing, open-source
  LinkedIn: https://www.linkedin.com/in/heitorpb/
  GitHub: https://www.github.com/heitorPB
  Website: https://heitorpb.github.io/
7+ years of experience in Software Engineering.

I'm a self-starter that get things done. I have experience in software engineering for highly scalable and distributed systems (I've built a few large scale clusters on a data center), backend development (containers with REST APIs), software and systems development (I love building CLIs), bare-metal and cloud systems; I like documenting projects, processes, and code; I've worked in small startups and also in large teams; I enjoy sharing my knowledge, mentoring new teammates and contributing to open-source communities. I am able to operate autonomously and at the same time be a strong team player.

I like to build simple solutions to address user's needs, without sacrificing security or compatibility. I work hard to build systems that are pleasant to use, well documented, and robust (scalable, resource efficient and secure).

hpb42··on Open Source Outdoor Air Quality Monitor
I'm curious, why N-mode only? What is the issue with a/b/g?
hpb42··on Samsung sees 95% drop in profits for a second consecutive quarter
> It appears Samsung brought in a profit of 0.67 trillion ($523.5 million) Korean won (KRW), which is a drop in the bucket to the 14.12 trillion KRW ($11.06 billion) it made last year.

Their profit was _only_ 500 million dolars, while previously was 11 billion dollars. That's still profit. And I dare to say good profit.

hpb42··on LXD Maintainership Being Limited to Canonical Employees
There's a difference between maintainer and contributor. Canonical is now the maintainer of LXD, but I think they would still accept contributions from the community. I've contributed in the past to some projects from Canonical, I hope they continue accepting contributions.

The main point I see here is: LXD is not a community-driven project anymore. LXD now follows what Canonical wants/needs, not necessarily what the community wants/needs.

hpb42··on Interview with Senior Rust Developer in 2023 (Parody) [video]
> TIL that Python just introduced the case/switch statement.

"took 15 years for that"

I laughed out loud there. I haven't seen Python's switch/case before, it is very sweet and powerful.[0] TIL as well :)

[0] https://docs.python.org/3/tutorial/controlflow.html#match-st...

hpb42··on Ask HN: Could you share your personal blog here?
https://heitorpb.github.io/

I recently re-wrote this again, with high hopes of getting back to writing more frequently. I have started more drafts this year than I have finished posts... Hope to change that soon (tm)

hpb42··on Passwords Are Fine
I use 2FA for GitHub with KeePassXC, on my desktop. I don't have a GitHub app on my phone. You can setup a TOTP app for GitHub without their mobile app.
hpb42··on Proton Pass end-to-end encrypted password manager is here and free for everyone
I Use KeePassXC[0] on the desktop and is really great. It is open-source; not an Electron app, it is written in C++[1]; there are browser plugins to auto-fill user/password/TOTP codes; it is local-first: not tied to any cloud vendors and you can easily sync the database file via any cloud system if you want; there is an Android app that can use the same database.

[0] https://keepassxc.org/ [1] https://github.com/keepassxreboot/keepassxc

hpb42··on Diaphora: an open-source program diffing IDA plugin
Wikipedia entry for IDA Pro: https://en.wikipedia.org/wiki/Interactive_Disassembler

I'm curious to know how much a license costs, I couldn't find easily on their website.

hpb42··on PhpBB
I'd say that Discourse is an alternative, some people consider it good, but I personally don't like it.

What I like in PhpBB forums I joined is the organization of topics, usually hierarchical; balance of information density, not too high, not to low; good pagination that is fast to load; ctrl-f does what you expect: search in current page; theming that usually makes each forum look unique; profile and signature customization; no gamification of usage; and probably many other stuff I forgot.

Many of these things are personal and YMMV of course.

hpb42··on XFS Metadata Corruption on Linux 6.3 Tracked Down to One Missing One-Line Patch
Is there a position open on your team? This sounds like the stuff I'm into!
hpb42··on Why I Blog
I recently redesigned mine, here's the post about it: https://heitorpb.github.io/bla/rewriting-in-rust/

And if you look a list of all entries, there's my "hello world" there as well.

Page 1 of 3Next →