Recent submissions

Comment · 1 year ago
Or you can set the vm.swappiness sysctl to 0.
Comment · 2 years ago
I'm happy with a TFA Dostmann 31.5009.02 Monitor CO2 AIRCO2NTROL Coach. Does what it says and you can get the measurements over USB if you want too.
Comment · 2 years ago
[yet another reference to Ansible, sorry! :)]

This looks like infinity times better than Ansible in some cases and somewhat worse in others (python.call every time I'd need to access a previous operation's result feels clunky, though I certainly understand why it works that way).

Do you think it would be possible to use Ansible modules as pyinfra operations? As in, for example:

  - name: install foo
    apt:
      pkg: foo
      state: present
could be available as:

  from pyinfra import ansible

  ansible(name='install foo').apt(pkg='foo', state='present')

where the `ansible` function itself would know nothing about apt, just forward everything to the Ansible module.

Note 1: I know pyinfra has a way to interface with apt, this is just an example :) Note 2: It's just my curiosity, my sysadmin days are long gone now.

Comment · 3 years ago
https://rnote.flxzt.net/ is pretty nice on Linux (for one-off drawings, not really for organizing them I think)
Comment · 3 years ago
If I understand correctly, you mean turbo roundabouts https://www.ms2soft.com/resources/turbo-roundabouts/ ?

If so, IMO they're the best thing that happened to roundabout design ever. You do need to choose a lane before entering but it's similar to how you'd choose a lane on a traditional two-lane roundabout. However, then you don't change lanes while on the roundabout, with ~zero visibility to the other lane while turning in a fairly tight circle.

This may differ across countries but around here you're supposed to: * pick the inner lane unless you're taking the first exit (to the right) * change to the outer lane just before your exit

which is about infinity times more stressful in traffic (you have very little time, it's hard to see the outer lane and the outer lane has right of way). It would work fine if everybody followed the rules but 1. they don't since it's unsafe in a tragedy of the commons sort of way and 2. then you end up with an informal turbo roundabout anyway.

A compromise that's becoming fairly common is a "soft" turbo roundabout where the lanes are divided not by ridges but by solid lines you can't cross only legally, not physically :)

Comment · 3 years ago
Comment · 3 years ago
> Also, side note, the “copy con outputfilename.txt” idiom is one that I still can’t ever remember how to do the equivalent on UNIX/Linux!

cat > outputfilename.txt

Comment · 3 years ago
I used external FHD displays and the result was a blurry mess with obvious fractional scaling applied (nothing was aligned to pixel boundaries)
Comment · 5 years ago
or

    fn twiddle<I>(foozles: I)
    where
      I: Iterator<Item=Foozle>
(or probably IntoIterator<Item=Foozle>). `impl T` is (modulo some details I don't remember right now) just syntactic sugar for this.
Comment · 5 years ago
Same. It takes a little effort to read but it's understandable and it does feel Croatian or thereabouts. On a somewhat funny note, Chrome decided to translate the page in Interslavic from Czech to Polish and did a passable job.

What I find fascinating about Slavic languages is that I can speak Polish in Slovakia*, get responses in Slovak and mostly understand each other. It has basically zero chance of success in the Czech Republic to the point where it's easier to find an English speaker. I speak neither Czech nor Slovak and I cannot really distinguish them but I had this experience multiple times. In written form, both are similarly understandable to me (I can get the gist and guess the rest).

* the caveat about szukanie czegoś do picia still applies though.

Comment · 5 years ago
> It really depends on what the meaning of None is.

Exactly. This will generally be application specific so we can't choose The One Right Definition for adding `Option<i32>`s.

> Yours make sense if it means "zero", but that's far less useful.

Not in my experience but I agree there are different situations. Personally, I'd default to `Option<i32>::None` meaning "no number there, so just skip it"[1] and prefer `Result<i32, E>::Err` to denote "there should be a number here but we don't have one", which would behave like a SQL NULL (propagate in all calculations).

1. What's the length of data in a header-only packet? I wouldn't say it's zero, especially when trying to fit a read() like API on top of a framed protocol (read() returning Ok(0) marks the end of file).

Comment · 6 years ago
I agree with all your other points but

> > We can’t perform arithmetic on an Option<int> any more than we could on a List<int>.

> Why not? One sensible definition is (...)

It's not the only sensible definition. It would be equally sensible to implement it as:

    Some(x) + Some(y) => Some(x+y)
    Some(x) + None => Some(x)
    None + Some(y) => Some(y)
    None + None => None
Comment · 6 years ago
Is this viable as a backup/archive format? Would it make sense to e.g. have an incremental backup as a DwarFS file, referring to the base backup in another DwarFS file?
Comment · 6 years ago
Exclamation mark. e.g.

    println!("hello, world");
or

    todo!();
are macro invocations.
Comment · 6 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton