HNHacker News
TopNewBestAskShowJobs

rom1v

2,087 karma · joined June 23, 2015

https://blog.rom1v.com
submissionscomments
rom1v··on Linux: We need tiling desktop environments
I think tiling is great for terminals, but not for the whole desktop (I don't want my web browser or video player to be resized because I open a new program).

So I use a "normal" floating environment (xfce, but could be another one), and I use Terminator in full screen enabled on a specific shortcut, so that I have tiled terminals.

rom1v··on Ask HN: Changing my mind about JavaScript
> Do you have any tip for learning js at it's fundamentals?

I would recommend:

- https://eloquentjavascript.net/

- https://javascript.info/

rom1v··on Do not factory reset your Pixel until at least 15 minutes after a system update
I had the same problem on a Pixel 4a, it worked perfectly, I performed a factory reset, immediately after it refused to boot due to "battery issue" (I don't remember the exact message). So I think Pixel 4a is also impacted by the "brick on factory reset" issue.
rom1v··on Show HN: I created an After Effects alternative
For AudioData and VideoEncoder, it should be possible to enable webcodecs by setting dom.media.webcodecs.enabled to true in about:config.

- https://github.com/mozilla/gecko-dev/blob/af09c55c0e6253ba8f...

- https://github.com/mozilla/gecko-dev/blob/af09c55c0e6253ba8f...

rom1v··on FUTO Keyboard
Oh, thank you. https://alternativeto.net/software/heliboard/about/

> HeliBoard is a fork of OpenBoard, continuing the project from where it stopped.

rom1v··on FUTO Keyboard
What are private and open source keyboards on Android?

I use [OpenBoard](https://f-droid.org/fr/packages/org.dslul.openboard.inputmet...), but there is no update since 2022 (it works well though).

rom1v··on Virtual Reality Live Streaming YC Start Up School
> every 1 second to rerun Scrcpy because it kept crashing

You mean "disconnecting"? What was the error message in the console?

rom1v··on The FCC needs to stop 5G fast lanes
In France, I pay monthly 27.48€ (~$29) for 1Gbps down and 500Mbps up (in theory, in practice, it's more like 500~600Mbps down, 250~300Mbps up). This includes a TV option for 2€ (without it, it's 25.48€).

My provider is SFR (the only one giving access to optical fiber in the small village where I live).

EDIT: I'm talking about home internet. For mobile internet, I pay 19.99€/month for unlimited access (5G), but I haven't done a speedtest.

rom1v··on Backdoor in upstream xz/liblzma leading to SSH server compromise
Btw, this is not the only project providing a source tarball different from the git repo, for example libusb also does this (and probably others):

- https://github.com/libusb/libusb/issues/1468#issuecomment-19...

- https://github.com/orgs/community/discussions/6003

rom1v··on How I Backup
On Linux: https://www.borgbackup.org/
rom1v··on Sorry you feel that way: why passive aggression took over the world
I cannot pass the captcha either, it keeps looping.
rom1v··on The Dunning-Kruger effect is autocorrelation
If Y = X + estimation_error, then substracting X (in Y-X) removes the correlation rather than adding it.
rom1v··on Scrcpy 2.2 adds Android camera mirroring
It calls the Android camera2 API directly (without any app).
rom1v··on The Relativity of Wrong (1989)
On a related note, sometimes someone may be wrong because he knows more about the subject (but not enough).

A canonical example could be about the "leap year" rules.

For context, the Earth makes a full rotation around the Sun in about 365.2425 days, so we use leap years to compensate:

- add 1 day every 4 years (365 + 1/4 = 365.25)

- but not every 100 years (365.25 - 1/100 = 365.24)

- but add a day anyway every 400 years (365.24 + 1/400 = 365.2425)

Suppose most people only know the first part (1 additional day every 4 years). If we ask "is 2000 a leap year?", they would answer "Of course, 2000 is a multiple of 4". And they would get the correct result.

Now, suppose someone started to study the "subject" (here, there is nothing to study, this is a trivial example for illustration), and is aware of the second rule (but not the third one). He would say "Ahah, no, 2000 is not a leap year, because it is a multiple of 100". But he would get the wrong answer.

My impression is that this kind of mistakes happens often while learning a subject: by studying, we encounter exceptions or surprising facts, that we may apply too broadly (to the point we make absurd claims, but that appear absurd for the wrong reasons).

rom1v··on How to find time to learn after work (2017)
> Read 3 books: 12 hours

Definitely not technical books.

rom1v··on Qalculate – A multi-purpose cross-platform desktop calculator
There is also the command line version: `qalc`.

I use it since I discovered it.

rom1v··on Scrcpy: Display and control your Android devices connected over USB or TCP/IP
https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#devi...
rom1v··on Scrcpy: Display and control your Android devices connected over USB or TCP/IP
To minimize artifacts, you can increase the bitrate (`scrcpy -b12M`) or use h265 (`scrcpy --video-codec=h265 -b12M`). Depending on your device, the latency with h265 may be higher though (but it might also be lower).
rom1v··on Scrcpy: Display and control your Android devices connected over USB or TCP/IP
Thank you for your kind words Guillaume :)
rom1v··on Scrcpy: Display and control your Android devices connected over USB or TCP/IP
Once the authorization popup is on the screen, press Tab, Enter, Tab, Tab, Enter (of course, it's more difficult if USB debugging is not enabled at all).
rom1v··on Rust's Poor Composability
The main criticism expressed in this blog post is that in Rust, transforming a language construct into a seemingly equivalent one (typically using .map()) works in some cases (described as the "hello world" cases, which might be a bit exaggerated), but sometimes not (due to lifetime, fallibility, async…).

For example, this code (real world example from two days ago):

    fn main() {
        let value = None;
        let _processed_value = match value {
            Some(value) => Some(process(value)),
            None => None,
        };
    }
    fn process(_value: u32) {}
can be transformed into this equivalent form:

    fn main() {
        let value = None;
        let _processed_value = value.map(|value| process(value));
    }
    fn process(_value: u32) {}
But in async Rust, this code works:

    #[tokio::main]
    async fn main() {
        let value = None;
        let _processed_value = match value {
            Some(value) => Some(process(value).await),
            None => None,
        };
    }
    async fn process(_value: u32) {}
But this one does not work:

    #[tokio::main]
    async fn main() {
        let value = None;
        let _processed_value = value.map(|value| process(value).await); 
    }
    async fn process(_value: u32) {}
    
It fails with the following error:

    error[E0728]: `await` is only allowed inside `async` functions and blocks
     --> src/main.rs:4:64
      |
    4 |         let _processed_value = value.map(|value| process(value).await); 
      |                                          -------               ^^^^^^ only allowed inside `async` functions and blocks
      |                                          |
      |                                          this is not `async`
This is basically what is described as the sandwich problem: https://blog.rust-lang.org/inside-rust/2022/07/27/keyword-ge...

I have to admit that I often need to refactor parts of code while I'm writing Rust code due to such issues, so I understand the author's point of view.

rom1v··on Bicycle
Same. The blog is just incredible.
rom1v··on Scrcpy 2.0 mirrors Android devices with audio forwarding
https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#hido...
rom1v··on Scrcpy 2.0 mirrors Android devices with audio forwarding
Note that scrcpy has an OTG mode which allows to use the computer keyboard and mouse "as if" they were connected via an OTG cable: https://github.com/Genymobile/scrcpy/blob/master/doc/hid-otg... (in that case, USB debugging is not necessary)

> Can also plug in a keyboard and use that if you know the sequence.

For information, once the phone is unlocked and the authorization popup is open, the sequence to validate the authorization popup is Tab, Enter, Tab, Tab, Enter. The difficult part is to enable USB debugging to get the authorization popup without adb though.

rom1v··on OsmAnd 4.3 for Android devices
> 2.5D projection

Awesome, this feature was really missing.

rom1v··on Debian to vote on its firmware path
> Voting period starts 2022-09-18 00:00:00 UTC

> Votes must be received by 2022-10-01 23:59:59 UTC

https://lwn.net/ml/debian-vote/YyZXnYNs1rXDCDY0@roeckx.be/

rom1v··on You’re muted – or are you? Videoconferencing apps may listen when mic is off
I always use the key mute button on the Thinkpad, but anyway it can be muted in the system menu easily (at least in XFCE).

(In fact, I just checked in Gnome, the menu does not expose microphone volume, it's only available from the settings window.)

rom1v··on Difftastic: A diff that understands syntax
It might be useful for reviewing merge/pull requests. But is there a way to display the diff "interleaved" instead of 2-columns side-by-side? (when executing `GIT_EXTERNAL_DIFF=difft git log -p --ext-diff` for example)
rom1v··on Mozilla’s Vision for the Evolution of the Web
`about:config` on the Android version.
rom1v··on Buffet – An All-inclusive Buffer for C
(following a discussion from https://github.com/alcover/buffet/commit/eab9648ff19483f57fd...)

> if nobody's looking, we are go

https://github.com/alcover/buffet/blob/dee3eb65f37ca07ea3d27...

And otherwise, when is it freed?

The refcount mechanism looks wrong to me: either the ownership of internal data is shared between instances (it seems it is not the case), either the owner is well defined and does not need a refcount.

It appears that the refcount is used to avoid freeing the owner data if Buffet views are still alive. But using the views after freeing the referenced data is incorrect usage anyway, so it looks like defensive programming, trading a use-after-free for a leak.

← PreviousPage 2 of 5Next →