HNHacker News
TopNewBestAskShowJobs

Liskni_si

404 karma · joined March 30, 2018

https://github.com/liskin https://lisk.in/

https://meet.hn/city/gb-London

Socials: - github.com/liskin - linkedin.com/in/pivnik - reddit.com/user/Liskni_si

Interests: Cycling, Fitness, Gaming, Hacking, Hiking, Open Source, Outdoor Activities, Programming, Remote Work, Running

---

submissionscomments
Liskni_si··on Become Shell Literate
If you really intend to parse the output of "git status" (or any command, really) you want the --porcelain option which is guaranteed to stay somewhat stable and parsable by scripts.

Many other commands have such an option. As an example, iproute2 has -json.

Liskni_si··on Gitter now speaks Matrix
It seems only #xmonad on freenode is affected, so I've been asked by @matrixdotorg to report an issue and I'll do that asap.

Also, #xmonad:matrix.org being invite only seems to be another bug. I contacted the room admin who sent me a similar screenshot as you did, showing that the room is _not_ set to invite-only, and they had to upgrade the room version from 1 to 6 to fix it. I can now join the room.

I have to say this has been a very frustrating experience. In addition to these two problems with #xmonad, I also suffer from https://github.com/poljar/weechat-matrix/issues/248, https://github.com/wee-slack/wee-slack/issues/812. I am afraid the takeaway is that Matrix is not ready yet. :-/

Liskni_si··on Gitter now speaks Matrix
Does the IRC bridge work reliably for you? I tried experimenting with Matrix today, I could make it to join #freenode_#xmonad:matrix.org but any message I sent didn't go through to the IRC side. When I then joined #irc:matrix.org it seems several other people were reporting this not working lately.

To make this experience even less amusing, I then tried to join #xmonad:matrix.org, assuming it's the matrix equivalent of #xmonad on freenode, but it just said I'm not invited and that was it.

Can't say I'm impressed. :-(

Liskni_si··on Apple Silicon M1: Black Magic Fuckery
You've got a point that the keyboard problem only affects laptops.
Liskni_si··on Apple Silicon M1: Black Magic Fuckery
> I'll gladly join the groupie crowd once Linux runs stable on it.

There's still the issue with the keyboard having 7 fewer keys than a modern ThinkPad, and compared to the classic 7-row ThinkPad keyboard, 15 physical keys are missing. That's a considerable disadvantage. Mac laptops have superior displays, but we're using keyboard just as often.

Liskni_si··on The Birth of Unix with Brian Kernighan
The thing is that writing a printer driver was quite close to being the simplest thing in the world back then. :-)

I remember that when a friend first introduced me to Linux around 2002 (we were both high school kids), I ended up writing a rudimentary printer driver as the printing support in Linux required installing 250MB worth of packages that I simply didn't have enough space for, as I had installed Linux to a 1GB partition that I got after squeezing the Win98 on my father's laptop into 3GB. I used Red Hat Linux—not the most minimal distro but I had no idea what I was doing. So when I wanted to print something and couldn't install the printing packages, I grabbed the paperback printer manual which described all the low-level commands the printer supported, studied it to find the commands I'd need and then wrote a simple program that took an image and sent it to the printer. It couldn't have been longer than a few hundred lines.

The printers back then were simple and came with real reference manuals that documented how to communicate with the printer, so you could really write a simple printing program/driver without being a UNIX legend (I am not).

Liskni_si··on Moving from Macbook to Linux
If X11 had a future I would've recommended xmonad to you. It's advertised as a tiling WM configured in Haskell, but in reality it's more of a library to make your own WM, as it abstracts most of the low-level details but still lets you change almost anything. It's still quite focused on tiling, yes, so it probably wouldn't be a good fit for you, but the idea of having an abstraction layer above low-level X11/Xlib stuff enabling you to easily build a custom WM is, in my opinion, absolutely awesome.

I find it really sad that in the Wayland world all the window managers are coupled with compositors (and possibly even more than that), which makes it that much harder to roll your own. I wish there was a generic compositor/input server/whatever with some sort of window management RPC interface that would allow running a separate window manager in a subprocess. This would make it so much easier to port xmonad over to the Wayland world and take it from there...

(I'm aware of waymonad's existence, but I believe the process barrier between compositor and WM is really practical, especially during development where the WM rapidly changes, sometimes crashes, but the session still survives.)

Liskni_si··on Is there still somebody in the Cairo community who is able to make a release?
Note that just updating Cairo will not automatically bring subpixel positioning to Gtk. Pango still defaults to rounding glyph positions to full pixels (rightly so, as there's no released version of Cairo that would render it correctly otherwise), and there's absolutely no code in Gtk that would allow disabling this rounding. I reminded Matthias about this half a year ago: https://gitlab.gnome.org/GNOME/gtk/-/issues/7#note_795665 but it still hasn't been resolved (the issue is marked as closed but that, I believe, is a mistake). I suspect they're not going to enable this in Gtk until Cairo with support for subpixel positioning is released.

Anyway, I've manually built a snapshot of Cairo for Debian: https://salsa.debian.org/liskin/cairo/-/commits/debian/maste... and I have a wrapper around Pango which enables subpixel positioning: https://github.com/liskin/dotfiles/tree/79cef7167a57dde02edf.... It really it noticeably prettier! :-)

Liskni_si··on Google Widevine Content Decryption Module DMCA
The proper way to add stuff into the dmca repository is to fetch the entire git history from the repo, git merge --allow-unrelated-histories, and then make a pull request from that. This way, we could just

    git fetch https://github.com/github/dmca  225ce7ac70aec3002599ba4cc8cee7197e0f1cee
to update our existing clones of widevine-l3-decryptor from the dmca repo.

So... can someone push that please? I don't have the recent commits. :-(

Liskni_si··on macOS Big Sur
Same here. My extension these days approaches 3000 users across Chrome/Firefox, but only a fraction of those visit the donations link and send something. It just makes no sense to pay $99 to maybe get a few donations. I don't want to make this a paid extension and then spend time and money on marketing and hope that maybe I will one day break even. I just want the extension to be available to users, that's all!

Is that too much to ask?

Liskni_si··on Background Features in Google Meet, Powered by Web ML
A few people commented that the foreground/background detection cannot keep up with movements fast enough. Here's an idea that might help, although I'm not sure if it can realistically be done:

When the video is encoded, the codec does motion estimation (among other things) to reduce the bandwidth required. So why don't we use the motion vectors from the video codec to modify the foreground/background mask in real time? Obviously this is going to create weird artifacts pretty soon, but it might just be good enough for a few frames before the ML model produces another accurate mask.

Liskni_si··on New youtube-dl release: v2020.11.01.1
I took this "shell wrapper around youtube-dl" thing a bit further: I have a script that uses youtube-dl to download and enqueue music to mpd. I mainly use it to listen to bandcamp albums that I don't know yet so I can decide whether to buy them or stop listening to them. The script also automatically deletes stuff after a while so I don't accidentally keep listening to albums I haven't bought.

Source here if anyone's interested: https://github.com/liskin/dotfiles/blob/home/bin/youtube-dl-...

Liskni_si··on New youtube-dl release: v2020.11.01.1
That's not entirely true. youtube-dl, used as a library in a media player like mpv, is quite literally used for watching videos.
Liskni_si··on How journalists use youtube-dl
Actually Chrome on Linux doesn't use hardware acceleration for video playback and never did, while the most recent Firefox almost does, if one turns a couple of experimental knobs.
Liskni_si··on BleedingTooth: Linux Bluetooth Zero-Click Remote Code Execution
Note that Intel's advisory has since been corrected to say "All Linux kernel versions before 5.10 that support BlueZ" are affected. The fix is not in 5.9 nor any stable, so this is essentially a 0day.

For more details, see https://lwn.net/Articles/834325/ and other comments on the LWN article.

(other HN posting of this article here: https://news.ycombinator.com/item?id=24779230)

Liskni_si··on BleedingTooth: Critical Linux kernel Bluetooth vulnerability (prior to 5.9)
Note that Intel's advisory has since been corrected to say "All Linux kernel versions before 5.10 that support BlueZ" are affected. The fix is not in 5.9 nor any stable, so this is essentially a 0day.

For more details, see https://lwn.net/Articles/834325/ and other comments on the LWN article.

Liskni_si··on Reddit's Stock Threads Become a Must-Read on Wall Street
While it's probably stupid to think about it this way, anyone who's done nothing for the last 10 or 20 years and then bought TSLA one year ago can today be described as having beaten index funds over the last 10 or 20 years. :-)
Liskni_si··on Q3 Linux touchpad update: Multitouch gesture test packages now ready
> I don't want to spend my precious spare time fixing my tools…

You get the entire GNU/Linux desktop for free, so you aren't in a position to complain. If you value your precious spare time, part with some of your money. Pay someone to fix this for you. Ask your employer to pay someone so that your "tool" works. Whatever.

> In any case, a non-kernel developer fixing it in a day of coding is IMHO wildly unrealistic.

Please... at least read the linked issue to see what the problem really is. This isn't kernel development. This is a userspace library, and the problem in question is isolated to a single C function that spans one or two screens. This really isn't rocket science. I wouldn't hesitate to ask students to fix an issue like this in a followup programming course.

Liskni_si··on Q3 Linux touchpad update: Multitouch gesture test packages now ready
> My point is that it's incredibly unfair to take something with which you're obviously quite familiar with and claim it takes longer than buying an app online, just because with experience you can do it that fast.

You're kind of right and kind of not. It is indeed incredibly unfair to claim that anyone can do it in 2 minutes if I could, especially considering that I did it this fast after mentally preparing to do it fast to demonstrate that it can be done fast.

But also remember that I really do believe that we should all participate in the development of the software that we get to use for free. Fixing a bug in some piece of software should, in my opinion, be the most normal thing you do every once in a while. Just like everyone can use a screwdriver at home, every programmer should be able to modify, build and run the software they use. If we did live in such a world, this wouldn't be specialized knowledge, this would really be something most people could do under 10 minutes.

Yeah, I realize that we don't live in a such a world. But please don't take away my hope that if we all try hard enough, one day we just might. :-)

Liskni_si··on Q3 Linux touchpad update: Multitouch gesture test packages now ready
There are a million ways to do it, but dpkg-buildpackage has been here for ages and if all you need is rebuilding a package for your personal use and for your current system and architecture and don't mind installing builddeps into your system, it's definitely the easiest.

The other options are good if you need to ensure the package will build elsewhere, or if you need to cross build for a different architecture (which you might need if you're running a multiarch system and you need to patch a library like Mesa that's still needed by some 32 bit apps), or if you don't want to clog your system with build deps or something like that.

Last time I needed to do that, I used cowbuilder, but I'm not really an expert in this area, I'm just a Debian power user, not involved with the project directly.

Liskni_si··on Q3 Linux touchpad update: Multitouch gesture test packages now ready
There are some suggestions here: https://gitlab.freedesktop.org/libinput/libinput/-/issues/28...
Liskni_si··on Q3 Linux touchpad update: Multitouch gesture test packages now ready
I agree that this isn't an ideal user experience. On the other hand, recompiling libinput in 2020 takes about as much time as taking out a credit card from your wallet and paying for another closed source macOS app.

I just timed myself doing it on a fresh vagrant VM, and it took me less than two minutes. One full minute was downloading and installing build dependencies, and that would normally be a few seconds as most people already have gcc.

The steps I took were:

  sudo apt build-dep libinput
  sudo apt install fakeroot
  apt source libinput
  cd libinput-1.12.6/
  grep -r tp_detect
  vim src/evdev-mt-touchpad.c
  dpkg-buildpackage -b
  sudo dpkg -i -O ../libinput*.deb
Oh and I'm tempted to argue that this is, in fact, a user experience we deserve. ThinkPads are used by many developers worldwide. Most of my friends at Red Hat have it. Last time I could check (2011), Google gave developers ThinkPads with Linux as one of the options. Any single one of us could have fixed this bug in one day, and then spend maybe another full day communicating with Peter to get the fix in shape and merged. Yet it still isn't fixed.

Free software often is free as in beer, but the real point is that we can, and we should, participate. Throwing money through GitHub Sponsors is one option, but often the best way is to just roll your sleeves up and do the work.

Liskni_si··on Q3 Linux touchpad update: Multitouch gesture test packages now ready
I don't think this is as much about Red Hat not caring as it is people in general not caring. This issue is affecting many ThinkPads. I've seen it on T25, T470 and T440p, which happens to be the most popular laptop of /r/thinkpad these days as it's easy to take apart and switch components, and as we've seen in this thread it affects many other ThinkPads as well. So we're talking about thousands, possibly tens of thousands of hackers having a suboptimal touchpad experience, every one of them being able to fix it in a day of coding. No one did yet. Why?

My best guess is that it just isn't annoying enough to most people. Another way to understand this is to imagine what happens when you put someone with bad visual acuity in charge of font rendering: they'll think it's good enough, and you can't blame them. It _is_ good enough, as far as they can see (pun intended).

Liskni_si··on Q3 Linux touchpad update: Multitouch gesture test packages now ready
You're most likely experiencing https://gitlab.freedesktop.org/libinput/libinput/-/issues/28.... The workaround is very simple: just comment out the tp_detect_wobbling call in tp_process_state. The real fix is a bit more involved, and I've been meaning to get to it for the last few years, but since commenting out that one line just works, there's little motivation.
Liskni_si··on Calibre 5.0
Did they? There's no /usr/bin/python any more in testing/unstable since last week, but python2 is still there and I don't think it's going away very soon. Even if it did, you can always grab python2 from stable.
Liskni_si··on Calibre 5.0
It's possible to use DeDRM tools from the command line, the plugin just makes it easier.

Simply git clone https://github.com/apprenticeharper/DeDRM_tools/ and then:

  python2.7 DeDRM_tools/DeDRM_plugin/k4mobidedrm.py \
    -k ~/.local/share/wineprefixes/kindle/drive_c/users/*/Local Settings/Application Data/DeDRMPrefs/kindlekey.k4i' \
    ~/Documents/My\ Kindle\ Content/book.azw .
or

  python2.7 DeDRM_tools/DeDRM_plugin/ineptepub.py \
    adeptkey.der book.epub book_dedrm.epub
(I'm not exactly sure where to get adeptkey.der but I'm certain it can be extracted from an old python2 Calibre + DeDRM installation.)
Liskni_si··on Finally, I Closed My LinkedIn
Similar story here, I got rid of my car a few years ago after not using it for a few years and only pushing it around when the street was closed for cleaning. Later I realized that with so little use, it would've been cheaper to use taxis than paying insurance for the car. :-)

These days our city is full of carsharing cars so should I ever need a car to carry something heavier, I only need to walk a few blocks to find the nearest car that I can borrow. Costs about a half of what I'd pay for a taxi, so it's not cheap, but still cheaper than owning a car and not using it.

Liskni_si··on Ask HN: Dark mode for HN please?
> the background of body is still white for me

Had the same problem, changed "body" to "html", added background: #fff, now it works.

I turned it into a bookmarklet to make it easy to use on any website:

javascript:styles='html {filter: invert(1) hue-rotate(180deg) brightness(.9); background-color: #fff; }'; newSS = document.createElement('style'); newSS.type = 'text/css'; newSS.innerHTML = styles; document.documentElement.getElementsByTagName('head')[0].appendChild(newSS);void(0);

Liskni_si··on Convincing-looking 90s fonts in modern browsers
Quite likely this is because Firefox 68 didn't support subpixel positioning so it aligned all glyphs to full pixels. Chrome 80 (and Firefox 76 in some configurations, or if gfx.text.subpixel-position.force-enabled is enabled) uses subpixel positioning if possible, which improves kerning of normal fonts, but in the case of these "retro" fonts, it's harmful. Maybe it's possible to adjust the glyph metrics so they're aligned to full pixels even if subpixel positioning is used, but I'm not sure if this can be really be done so it works everywhere.
Liskni_si··on Complexity Has to Live Somewhere
But this only works if you push each commit separately. If you push them all at once, it only tests the last one. Also, whenever you rebase, only the last commit is tested.

I tested this here: https://github.com/liskin/nodejs-hello-world/pull/1

← PreviousPage 6 of 7Next →