hallettj

joined 2 years ago
[–] hallettj 3 points 10 months ago

It's like Ned Flanders says, "Oh, January 1st! Better get going on those taxes Neddy."

[–] hallettj 3 points 10 months ago (2 children)

Although they're not in the search, they are in the manual so you can find them searching that page. This one is listed as,

security.pam.services..fprintAuth

But it does take some inferences to find this, and to realize that you can put doas in place of ``

[–] hallettj 13 points 10 months ago* (last edited 10 months ago) (7 children)

I did some digging around in the manual, and I tested this option which seems to work:

security.pam.services.doas.fprintAuth = true;

On my machine that adds this line to /etc/pam.d/doas:

auth sufficient /nix/store/fq4vbhdk8dqywxirg3wb99zidfss7sbi-fprintd-1.94.2/lib/security/pam_fprintd.so # fprintd (order 11400)

Edit: Note that the NixOS option puts in the full path to pam_fprintd.so. That's necessary because NixOS doesn't put so files in search paths.

Without doing more research I don't know how to add arbitrary options to pam files in case you run into something that isn't mapped to a NixOS option yet. The implementation for the pam options is here; there might be something in there that would work.

[–] hallettj 3 points 10 months ago
[–] hallettj 6 points 10 months ago

Here is a source with lots of detail on how carbon emissions compare: https://www.theguardian.com/business/2023/dec/23/do-electric-cars-really-produce-fewer-carbon-emissions-than-petrol-or-diesel-vehicles

The tl;dr is that EVs have lower lifetime emissions. If the relevant grids use low-carbon sources then emissions are far lower. (But not as low as bicycles.)

[–] hallettj 2 points 10 months ago

Oh, I didn't know about the Teflon coating. From what I just read virtually all razor blades - both double-edged and cartridge - have PTFE coating. (Where PTFE is a PFAS compound, and PFAS is the family of compounds also known as Teflon.) But there is some hope for an alternative someday. https://www.pcimag.com/articles/111660-a-close-shave

So I guess I would say stick with double-edged. Or maybe electric would be better specifically with respect to water pollution? Since that's the big issue with PFAS. I don't know, just a guess.

[–] hallettj 7 points 10 months ago (1 children)

I did not realize nano implemented syntax highlighting!

[–] hallettj 4 points 10 months ago (1 children)

Oh right, there are some particular things that are helpful for a deeper language understanding.

Type classes and algebraic types are for sure standout features of Rust that make it better than most languages. Much of my experience before Rust was Typescript, but I have some background in Haskell so I was fortunate to have a head start on these concepts. I haven't done any Rust interviews - my current role switched from Haskell to Rust after I joined. So I don't know what interviewers are asking.

None of the prior languages you listed use manual memory management (which was the same for me). And even if you have that background, Rust does some things differently. (Although from what I understand explicitly codifies a number of ideas that experienced C++ devs have in their heads as "good practice".) I think you'll want to study up on how memory works. One of my favorite resources for this is Logan Smith's Youtube channel. Those videos get me thinking about how this stuff I take for granted really works. The first two Rust videos on there, Use Arc Instead of Vec and Choose the Right Option are good ones to watch. Even if you opt not to use Arc<[T]> or Box it's useful to understand how those differ from Vec and String.

Closures are weird in Rust, and are worth understanding. You have to choose between Fn, FnMut, and FnOnce. Plus there is the move keyword. I love the post Finding Closure in Rust for explaining what's going on there. (It takes the implement-your-own-version approach which is a genre where I've incidentally seen some other gems, like Implementing a simple Promise in Javascript, and The Git Parable for understanding how git really works.)

Another area that is helpful to study is Rust's implementation of async. It is similar to async as you've seen it before, but also different. For example in Javascript when you call an async function like, say, fetch it dispatches network requests right away. But in Rust a Future does not do anything until you call await on it. Learning about async leads into understanding of some more general language features. At the shallower end you learn about functions that return types based on trait, like impl Future or Box> because Future types often can't be named directly so you have to describe what trait they implement instead. (This is very similar to how you work with functions that return closures.) At the deeper end you learn about working with Pin. You can get a deep dive on that in Pin and suffering by fasterthanlime. All of that guy's posts are useful, but they are deep plunges so it can take some motivation to read them.

Since I seem to be recommending people to learn from I'll add Mara Bos' blog. She's the Rust Library team lead. Her blog gets into some of the nitty-gritty stuff that gets you thinking about the language on a deeper level. She also wrote a book recently, Rust Atomics And Locks. I haven't read it yet, but it looks useful.

[–] hallettj 8 points 10 months ago (3 children)

Hey, you're on a similar path to me. I've been on a Rust job for the past year.

Being a general-purpose programming language Rust can be used in a lot of contexts. The work I'm doing is all API server stuff, which I'm sure you already have a solid background in. There are some niches where Rust stands out that might be worth studying depending on your interest, but none of these are essential to Rust work generally.

  • Crypto startups seem to be enthusiastic adopters of Rust. It's not an area I want to get into personally, but this is likely the fastest path to a Rust job.
  • Rust is probably the best language for compiling to WASM for running in browsers, in lightweight server-less functions, and as plugins. That could dovetail with your frontend experience. Although it's a bit of an uphill battle to argue for WASM over Javascript in these cases.
  • Rust makes an appealing choice for embedded programming as a safer alternative to C. This kind of work involves learning to program with nostd, and learning about controlling hardware.
  • In non-embedded systems low-level pieces like device drivers are another good candidate for Rust.
[–] hallettj 29 points 10 months ago (1 children)

Wayland replaces the older X protocol. It doesn't have to operate with older protocols. You might be thinking of XWayland which is a proxy that receives X API calls from apps written for X, and translates those to the Wayland API so that those apps can run under Wayland implementations. Window managers can optionally run XWayland, and many do. But as more apps are updated to work natively with Wayland, XWayland becomes less important, and might fade away someday.

PipeWire replaces PulseAudio (the most popular sound server before PipeWire). Systems running PipeWire often run pipewire-pulse which does basically the same thing that XWayland does - it translates from the PulseAudio API to the PipeWire API. It's a technically optional, but realistically necessary compatibility layer that may become less relevant over time if apps tend to update to work with PipeWire natively.

So no, both Wayland and PipeWire are capable of operating independently of other protocols.

[–] hallettj 16 points 10 months ago (3 children)

Oh this is just the thing for playing bard, and casting "vicious mockery" several times per combat

[–] hallettj 24 points 10 months ago (1 children)

The justification for invading Iraq was a claim that they were developing nuclear weapons. It was well known at the time that the evidence was flimsy, and that even if true it was a flimsy excuse for an invasion. The main piece of evidence was an intercepted shipment of aluminum tubes that were soon shown to have nothing to do with a nuclear program. (See https://en.m.wikipedia.org/wiki/Iraqi_aluminum_tubes). That one is not a conspiracy theory.

view more: ‹ prev next ›