HNHacker News
TopNewBestAskShowJobs

csdvrx

2,333 karma · joined March 29, 2019

IMPORTANT: If you are reading my profile and checking my old comments, please do not upvote them!

I use the karma indicator as a cheap way to detect replies to comments and this mess up this simple heuristic.

Conversely, if we are talking and you would like to engage in a discussion, just upvote! (or downvote, whatever!) This will catch my attention and make me check what you wrote.

ABOUT ME: I'm a command line geek with an interest in Arch, Windows, Sixels, ZFS and KVM!

I like new things, even those you may believe are "against the natural of things":

“I've come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the world when you’re born is normal and ordinary and is just a natural part of the way the world works. 2. Anything that's invented between when you’re fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. 3. Anything invented after you're thirty-five is against the natural order of things.”

― Douglas Adams, The Salmon of Doubt

submissionscomments
csdvrx··on Zellij: A terminal workspace with batteries included
After having spent too much time trying to get the simple https://github.com/csdvrx/sixel-tmux/ features into mainline tmux (last November https://github.com/tmux/tmux/issues/3753), maybe it'd be easier to jump ship as use zellij?

Could anyone offer recommendations on "riced" zellij configuations, or just a demo where it shows doing with (say charts of disk usage per folder), watching a movie with mpv + keeping a vim to type on?

csdvrx··on NetBSD 10: Thirty Years, Still Going Strong
With NetBSD, I've discovered an OS that gives me joy in a way that's hard to describe: NetBSD is neat, works everywhere, and its users are friendly.

It's not as well known as FreeBSD (or Linux) but yet you've got everything in a smaller community that's well organized and big enough that you can, share, and learn with them. I like that pace :)

I hope I will be able to offer minimal contributions to the kernel: for now, my project is adding an init_flag to pass the kernel to be loaded,and the init run too, like --init-args do similar on FreeBSD or Linux,

My other project is about boot time metrics: https://old.reddit.com/r/NetBSD/comments/1agmfja/collecting_... My other small project is for metering boot: I'ts just small sqlite database that'll automatically extract tslog boot info to better track regressions, improvements etc: with a kernel that now boots in 60 ms or less, you want very accurate numbers!

csdvrx··on Over the edge: The use of design tactics to undermine browser choice
I can't reproach to Firefox that it's refusing to bite the hand that feeds, but the last time I tried it, there were other issues:

- it was prefilled with icons for facebook and twitter (bit let's say people who switch may be lost without these icons)

- it keeps trying to push pocket to me (no excuse for that)

- if had the feature for antitracking multi-account-containers, but didn't push them

- it lacked advanced anti tracking (ex: fixing the canvas size, the fonts etc)

I'd prefer Firefox with a focus on privacy and antitracking to Edge cool new features, but I think Microsoft has both a financial interest and the technical capacity to protect me from google panopticon while also delivering cool new things.

I don't like Firefox interface including its lack of innovation (edge has tab groups, split screens), and how the only redeeming point that could make me consider Firefox (privacy) is not put front and center.

I will keep checking Firefox now and then, but I don't see much chance of improvement as Google money keeps Mozilla warm, comfortable, and also totally disconnected for what its potential users would like.

csdvrx··on Significant features introduced for recent versions of Perl
> Huh, wonder if people who aren’t familiar with the subject saw “GPT” and thought you were going off into AI gibberish land?

If they don't know GPT is a type of partition table, I think their stereotypical dislike of perl is the least of their problems!

csdvrx··on Over the edge: The use of design tactics to undermine browser choice
Mozilla receives money from Google, so I'd take whatever they say with a pinch of salt.

Right now, the only serious alternative to Google Chrome is Edge, and if Firefox became too good or threatened Google in any way, Mozilla may see the money flow stop.

I wish Google started innovating again, and that Firefox offered a good and competitive free software browser, but reality is what it is.

So I've moved from Windows to Linux, but I keep using Edge, because it's a good browser (vertical tabs etc)

csdvrx··on Significant features introduced for recent versions of Perl
> Bummer you’d been downvoted for that.

Some people have an instinctual dislike of things they've been told it's fashionable to hate. I resent that, because all programming languages are interesting in their own ways.

> It sounds like quite the ambitious project that you’ve nearly got working. Cool!

Oh it's already working, it just needs more polish :)

Check https://github.com/csdvrx/hdisk if you're interested

Actually, I'll try to submit it!

> That is not the sort of thing I’d expect someone to write in Perl, and I’m experiencing an odd mix of “that’s amazing!” and “what on earth were you thinking, my friend?!”

I wanted to do it quickly :)

For decoding weird formats that mix little and big ending, I think perl unpack/unpack is the fastest way.

Also, for computing crc32, I didn't have to bother much :)

csdvrx··on Significant features introduced for recent versions of Perl
That's what I liked about Windows too. I had to move to Linux, but with wine I know I will able able to use some binaries forever.

If I write something that I plan to reuse or need again later, I will write it in perl

csdvrx··on Significant features introduced for recent versions of Perl
I like perl. Before, I had written a toy web server in perl (it was fun and I learned a lot), then I ported it to cosmopolitan to have it run everywhere!

This year I've written a fdisk replacement in perl, to make hybrid MBR+GPT for bootable media.

First, I wanted to check how they were made, but then I decided I wanted to programmatically write hybrid MBR in a way that's easier than gdisk and that offers more control that xorriso.

It's not complete yet, but the partition reading feature was already very helpful to understand the ins and out of the mfg59 layout that's so popular for optical media, and the final gpt tweaks should only take a few more days.

perl allowed me to write it very quickly and to make sure it will work reliably for the years to come.

csdvrx··on How is a binary executable organized? Let's explore it (2014)
You can have both. APE are generally faster and smaller.

Fat APEs (aarch64 + x86_64) are larger, but interesting in their own way.

csdvrx··on Gaming is now Microsoft's third largest business, bigger than Windows
I understand you mean good, but Apple is less free. WSL2 is nice, but it's more than than- it's knowing that I have the choice (to go with Lenovo, Dell, HP etc) if say I hate the keyboard layout
csdvrx··on Gaming is now Microsoft's third largest business, bigger than Windows
> Can you elaborate a bit on “by default there’s more freedom on Windows” part?

1) You can download and install binaries without using an appstore and without going to some settings.

2) You can install offline and create a login that's not tied to a Microsoft account (but this requires typing special commands).

3) You can then download binaries from their store without a login (ex: to get Windows Terminal)

4) You don't have to pay microsoft money if you want to make programs that run on Windows (ex: crosscompiling to a win32 target)

5) You can run Linux in WSL2 after typing a few commands on a default Windows install

6) If you don't like Linux, Microsoft gives away most of what you need to write code (but I guess XCode is like VSCode)

It's not much, but I enjoyed that freedom when I was using Windows (and I couldn't understand why people could accept to use a Mac!)

csdvrx··on Gaming is now Microsoft's third largest business, bigger than Windows
> What are you talking about?

I was being ironic, as revenue for a company that size is easy. However, deciding what to use it for is hard.

Growing new lines of business is even harder for old companies.

So I was only half joking: given the poor use google had made of the resources they have, I really think they don't have enough resources (both brains and dollars) to grow new business lines because I don't think they have anything in their pipeline that can go big.

Maybe I will be proven wrong (good for google!) but I think they should have been more proactive in the last 5 years: you reap what you saw, but they've cut what was trying to grow, so their harvest will be small.

csdvrx··on Gaming is now Microsoft's third largest business, bigger than Windows
> See, Google, that's how it's done. Invest in an ecosystem for two decades, with many money-losing years, and you might have a shot at breaking in a highly competitive market.

I don't think they have the money or the human resources necessary for that anymore :(

Too little too late won't save google

csdvrx··on Gaming is now Microsoft's third largest business, bigger than Windows
That's like how iphones mean more to Apple than MacOS

Personally, as much as I loved Windows 10 (and then 11!), I saw the writing on the wall and I moved to Linux last year.

I trust Microsoft a little more than Apple, as by default there's more freedom on Windows than on MacOS, but I fully expect both Apple (and Microsoft) to care about about cellphone users (and gamers) than about developers.

csdvrx··on I just wanted Emacs to look nice – Using 24-bit color in terminals
Agreed - COLORTERM has its own problem. I prefer your approach, it looks very sound!

A fork of terminfo may be needed if the description of modern terminal capabilities can't be added -- or if old and deprecated attributes repurposed for that job (like in your padding example): if you're automating the correction/creation of terminfos in ~/, IMHO, it may be better to piggyback on tic as much as possible.

Anyway, to backport modern terminal descriptions to legacy programs, creating correct binary terminfos in ~/.terminfo seems the best practice. You can also invent new TERM. When I wanted to have italics etc about everywhere, personally that's just what I did for sixel-tmux: https://github.com/csdvrx/sixel-tmux/?tab=readme-ov-file#ste... : just declare a new $TERM you know to be right, and use that in the apps that let you use a little logic in their configuration file

I do that in my .vimrc:

   " If Vim doesn't know the escape codes to switch to italic
   let &t_ZH="\e[3m"
   let &t_ZR="\e[23m"
   " Italics pseudo-auto toggle: force italics if we recognize it's supported from TERM
   if match($TERM, "xterm-256color-italic")==0
    highlight Comment cterm=italic
   endif
BTW you should package your emacs config file with the emacs APE from https://cosmo.zip/pub/cosmos/bin/emacs to do a cuteemacs, to carry your config files and everything in a portable binary: https://github.com/csdvrx/CuteVim

Another idea: have you considered that the "program that would be run by .bashrc" to generate the "unambiguous 24-bit color capabilities" could set environment variables to communicate them? Like, if you can't stuff them in terminfo, stuff them in environment variables! Env var work well on Windows, and the configuration files of terminal programs could just use these when available to override.

It's be like adding friends to your proposed TERMVERSION: TERMSETF24 etc where you've have a finer control than COLORTERM

csdvrx··on Show HN: Open-source x64 and Arm GitHub runners
> because Ubicloud needs to grow its own copy-on-write features for block device snapshots, things we lack today.

Just, why? CoW (or your own CoA) are ripe with performance problems. How exactly do you benefit from their use?

csdvrx··on Show HN: Open-source x64 and Arm GitHub runners
> One counter-intuitive thing we found is that it's slow to save and restore caches, but the machines have good CPU, so for us it's been faster to disable cache entirely and just redo everything on each build.

The link to SPDK was very interesting: https://www.ubicloud.com/blog/building-block-storage-for-clo.... I use filesystems for very high performance applications, and I've found ZFS to often be the limiting factor when compared to simpler solutions of XFS +- mdadm +- encryption.

It's a controversial point, but others have made similar findings: https://klarasystems.com/articles/virtualization-showdown-fr... : "Although I suspect this will surprise many readers, it didn’t surprise me personally—I’ve been testing guest storage performance for OpenZFS and Linux KVM for more than a decade, and zvols have performed poorly by comparison each time I’ve tested them"

OpenZFS seems to be starting to consider optimizations to better perform on modern drivers (SSD, NVMe) which have very different performance profiles to what ZFS was built for (spinning rust)

In the SPDK summary they say "To make VM provisioning times go faster, we changed our host OS from ext4 to btrfs" (...) "Also, when we switched the host filesystem to btrfs, our disk performance degraded notably. Our disk throughput dropped to about one-third of what it was with ext4."

Ubicloud: the problem seems to be generic to CoW filesystems, and it's interesting you came with a slight variation (CoA) but have you considered the even simpler alternative of any journaling filesystems (XFS, Ext4...) with overlays?

Or just UFS2 + snapshots to restore from a given state (initialized, ready for each test) then restore to this state between tests?

I think customers finding that disabling cache works better means the CoA has similar issues to CoW.

Personally, I'd have just tried to using SR-IOV with a namespace per customer, and call it a day instead of bringing extra complexity, but there must be good reasons for it. I'd love to know what these reasons are.

csdvrx··on Ubuntu Looking at Applying Low-Latency Optimizations to Its Generic Kernel
I've posted my configuration here, for an 12th gen intel alder lake P, both the kernel .config and the cmdline.

Check the specs or ask GPT ("on many separate on-die cache does the 12th gen intel Alder Lake P i7 1270 has?") and you'll see it's simpler to think about it as having 3 groups of cores with different features because:

- the 1st group has 4 performance cores each with their own L1 and L2: that's where I put the OS, with core 0 as usual and the other in NO_HZ, and the interrupts on power core 4 (here I'm using 0 and 4 to match what coretype reports P-CORE=0..7 that's due to hyperthreading)

- then the next 2 groups have 4 efficiency cores each, sharing the L2 (The L3 is shared all over, so it doesn't matter)

You could try to use my configuration as a base, and if it's not enough, you could try pinning the audio app on the power cores (obviously not 0 and 4 that are used, but like 1-3 and 5-7, which you could make tick if you prefer, you could also use more than 100 HZ depending on your needs)

It will take you some experimentation, but as a fellow audiophile I'd be curious about the results it'd get you!

csdvrx··on Ubuntu Looking at Applying Low-Latency Optimizations to Its Generic Kernel
I love windows, so when I moved to Linux I tried to replicate this on my Linux box

I've found a lot of drivers like to spread their interrupts all over the place, so it's not as simple as using cpu affinity (or pinning processes) outside core 0 :(

csdvrx··on Ubuntu Looking at Applying Low-Latency Optimizations to Its Generic Kernel
> what's the point of setting CONFIG_HZ=1000 with it?

Agreed, if you go "tickless", you want to go to the lowest value for what's still ticking: I have my own kernel configs, and I generally use HZ=100:

# zcat /proc/config.gz |grep HZ_

CONFIG_NO_HZ_COMMON=y

# CONFIG_HZ_PERIODIC is not set

# CONFIG_NO_HZ_IDLE is not set

CONFIG_NO_HZ_FULL=y

CONFIG_HZ_100=y

# CONFIG_HZ_250 is not set

# CONFIG_HZ_300 is not set

# CONFIG_HZ_1000 is not set

CONFIG_MACHZ_WDT=m

For Little.Big heterogeneous cores (like on the i7-1270P Alder Lake P), I suggest also thinking about how the cores are arranged to group the interrupts intelligently, and not just go by which cores are efficiency/power as /usr/local/bin/coretype simply reports:

P CORES: 0..7

E Cores: 8..19

You should check which cores are on a core.id with:

cat /proc/cpuinfo |egrep "physical|core.id|cache.size|processor" |grep -E "core.id|processor"

On my cpu: processor : 0 core id : 0 processor : 1 core id : 0 processor : 2 core id : 4 processor : 3 core id : 4 processor : 4 core id : 8 processor : 5 (....)

Therefore you could want to:

- Leave efficiency cores 8..19 as-is (nohz_full is not ideal and consumes power, leave the efficiency cores alone - they are made to be efficient!)

- Use power core 0 as normal

- Put all the other power cores 1-7 but 4 in NOHZ_FULL

- Put all IRQ and callbacks on power core cpu 4: for performance + a race to sleep

So on my i7-1270P, I use: `nohz_full=1-3,5-7 rcu_nocbs=0-3,5-7 irqaffinity=4`

In theory, you get the best of both worlds.

In practice, unfortunately, it's not perfect as the NVMe and WIFI drivers require extra care or they'll sprinkle interrupts everywhere which you can check with just cat /proc/interrupts

For NVMe, you can limit the queues for nocbs with `nvme.poll_queues=1 nvme.write_queues=1`

For wifi, you can try to limit its eagerness to have more interrupts with a simple script like `for irq in $(grep -v " ...: ......... 0 0 0 ......... 0 0 0 0 0 0 0 0 0 0 0" /proc/interrupts |sed -e 's/:.//g' -e 's/^ //g' -e 's/ .//g' |grep -v '^$') do [ -f /proc/irq/$irq/smp_affinity_list ] \ && echo 4 > /proc/irq/$irq/smp_affinity_list \ || echo skipping $irq done`

BTW, if you have more IO and you prefer having interrupts spread a little more, you can use both cores one of the avx512-less efficiency core.id 8 with irqaffinity=4-5

Then the cmdline becomes: cpu0_hotplug nohz_full=1-3,5-7 nr_running=1 rcu_nocbs=0-3,6-7 irqaffinity=4-5

EDIT: I added some clarifications, it's very late but I realized it required a little more context

csdvrx··on Ubuntu Looking at Applying Low-Latency Optimizations to Its Generic Kernel
> to improve a driver that was buggy for many years that I hacked in a way that made it work awesome but would never be accepted upstream because it violated FCC regulations

Now I want to know more! Was it a misbehaving wifi? Did it violate the spirit, or the letter of the regulations?

I've had the opposite problem, trying to make a card respect FCC regulations (ieee80211_regdom=US) while its firmware seems to have another country hardcoded.

I think it would be far better to use regdom=US instead of letting the card do whatever's ok in the country the card believes it's still operating in, yet it would also "violate" FCC regulations to let me write into its firmware that it should follow US rules by default from now on.

ebay + a worldwide market + "can't trust people to change the firmware" = problems

I wish there was more flexibility in the drivers to correct such misbehaviors, because I believe most people want to do the right things.

csdvrx··on Accuracy of Commercial Sleep-Trackers Compared to Research-Grade Tools
Personally, I don't drink, and I've noticed sleep to be the best indicator of my coding performance but YMMV
csdvrx··on Accuracy of Commercial Sleep-Trackers Compared to Research-Grade Tools
> It’s just collecting data for the sake of collecting data.

No, sleep is one of the most important parameters for health!

If in 2024 you are not collecting data on your sleep to take action (and for ex, stop overtraining, reduce drinking etc) to reduce the risks of future brain problems, you are doing it wrong.

> Even if it was accurate, I can just tell by feel

I can't, and I fear it may be the same "overconfidence" issue that cause car accidents when drunk.

I collect logs with my sqlite based bash history collection that I've been running for 5 years: https://github.com/csdvrx/bash-timestamping-sqlite

Thanks to my garmin, I have identified a pattern where I feel ok, but my garmin reported less REM sleep than usual: in the day, I run more commands than usual but I have way more mistakes (as can be seen by the non-zero return values)

So now, when my watch reports low REM sleep, I try to be very careful to avoid negative-productivity days

csdvrx··on Pixel owners report problems after installing January 2024 Google Play update
There are several similar formats allowing to do the exact same thing with other chips: I'm most familiar with mediatek, but essentially it's always a read-only bootloader, in case the normal boot can't start.

I can't imagine google forgetting to add an EDL-like reflash mode for their SoC.

I can however imagine them not providing the files needed for the reflash, since that's been true since they used Qualcomm.

csdvrx··on Pixel owners report problems after installing January 2024 Google Play update
> Those of us in large corporations see that pattern quite often.

It's sad there's such a dilution of responsibility such problems are allowed to persist, and that nobody cares they are killing random people phones.

csdvrx··on Pixel owners report problems after installing January 2024 Google Play update
> That's way beyond most ordinary users though.

To take a broken phone to the mall where there're a small store that's known to fix phones?

csdvrx··on Pixel owners report problems after installing January 2024 Google Play update
> It's incredible to me that there is no bullet proof recovery mode for this, even something as dumb as an Arduino can recover from almost every form of abuse.

There's a bullet proof recovery mode, check my comment below ( https://news.ycombinator.com/item?id=39145490 ) where I detail the steps and provide links.

The EDL firehose mode is just the phone showing up on a very unique USB-ID and waiting to be spoon fed the data to be rewritten to its flash. It needs partition specifications (think like a GPT partition table) + the binary data for each partition (think like the EFI partition for the bootloader, the Windows partition for the actual operating system etc)

It would take litteraly 1 minute for someone with access to the QPST to post it to archive.org and help all the people who've been affected by the bug.

It would take each of them about 5 minutes to restore their phone to a working state. You may object that not everyone may have the technical ability to do that, but I'm sure the small businesses fixing phones in the malls would be happy to charge for the "service" of plugging the phone on a Windows computer, double-clicking on an icon, drag and dropping the right files and clicking on another button.

IMHO, the fact this situation is allowed to persist, even after multiple reports of similar pixel phone problems in the past, can only have 2 explanation: 1) the good people at google writing this software have less understanding that you and I, 2 random HN users or 2) there's money to be made in not fixing the problem, as it will increase the update cycle (people with a dead phone will buy another phone)

I'm all for making money, but not if the consequence is creating ewaste, and forcing people who may not have deep pockets to spend more money on yet another broken-by-design phone.

csdvrx··on Pixel owners report problems after installing January 2024 Google Play update
> How hard would it be to revert to the previous working version?

In Qualcomm EDL firehose mode? Super simple if you have the QPST: the phone is waiting for an image to write to the flash. It's actually waiting for the image to immediately reboot once it's written.

But google doesn't release these images, so it's like having computer permanently bricked after the hard drive was corrupted because there's no install media available.

I think we (as people who are on HN and can understand the problem) have a responsibility in not letting such things happen, if only because they hurt the people who don't understand the problem, the simplicity of the solution, and may just have a phone as their only computing device.

csdvrx··on Pixel owners report problems after installing January 2024 Google Play update
I've posted a small summary below, with links to consistent reports of this happening + a software course of action to unbrick the phones.

It's totally on google who's refusing to release the QPST files. It's creating ewaste for no acceptable reason.

Hopefully, someone will leak the QPST files to allow a restore from the Qualcomm EDL firehose mode.

csdvrx··on Pixel owners report problems after installing January 2024 Google Play update
I don't use smartphones but I find their software stack very interesting. I just investigated a Pixel 5a phone that was brought to me for "sudden death". The owner reported the screen showed an update attempt, then ended up bricked.

It's allegedly impossible, due to the A/B update mode. Yet it managed to end up bricked, so the question is how, and what can be done.

After investigation (you can do it very simply by looking at the USB ids), it's currently in Qualcomm EDL firehose mode: this is likely due to a failed attempted update https://xdaforums.com/t/fix-pixel-3-qusb_bulk_cid-xxxx_sn-xx...: "because the bootloader has been corrupted during an attempted update - it's in EDL mode because there's nothing else it can boot into. I'd speculate it has some link with that "clever" new approach of being able to update the OS in the background and switch to it on the next boot"

The "clever approach" that causes the problem is called the FOTA (or OTA, for "Over The Air") update, done by the carrier. This is known and documented on https://issuetracker.google.com/issues/248340373

To leave EDL mode, it needs to be fed a bootloader + an image matching its model, to flash the eMMC memory inside.

On Windows, it's easy to do Qualcomm Flash tool (GPST/QFIL) , which is easily available from many places like https://github.com/stanislawrogasik/Pixel5-VoLTE-VoWiFi/tree..., and the process is documented on sites like https://imobiefix.com/qualcomm-prog-emmc-firehose/

Ideally, the MBN file has to exactly match the model, brand (etc) so if you have a 5a, you need a 5a MBN (and maybe a XML file, still reading)

According to https://support.google.com/fi/thread/227549262/sm7520-or-sdm... the model SM7520 or SDM765 ; this is confirmed by https://github.com/hoplik/Firehose-Finder/blob/master/ForFil... because it's listed as a "Snapdragon 765G" / 0011E0E1

According to https://xdaforums.com/t/bricked-google-pixel-4a-5g-mbn-file-... "Google does not make QPST files available for the Pixel series" but someone else might have uploaded that somewhere

Based on https://discuss.grapheneos.org/d/9656-brick-5a-help it's a well known problem: "The Pixel 5A has some hardware issues. I had mine poop out on me recently. Contact Googles repair team. If you have warranty they will replace it" : It's described extensively on https://suspiciouslygeneric.com/2022/11/11/the-hidden-flaw-k...

According to https://xdaforums.com/t/ipsa-pixel-5a-extended-warranty-i.46... "Due to the Pixel 5a Black Screen of Death issue, Google has extended the warranty on 5a devices for one year beyond the original device warranty"

However, google has denied the extended warranty, even while clearly being the cause of death of the phone.

Shame on you google, for creating more e-waste by refusing to release the QPST. If anyone reading this works at google, try to do something. It's not nice to put perfectly usable phones in a landfill just because a QPST is not released.

I hope someone will leak the QPST, because for people who don't have the money, it's also serious expense.

← PreviousPage 4 of 34Next →