[-] hallettj@leminal.space 23 points 3 weeks ago

From what I've learned revolutions are often accompanied by circumstances where people are desperate due to lack of basic necessities, especially food.

The French revolution was preceded by a serious food shortage. Remember that "let them eat cake" comment? One of the key events, the Women's March which displaced the king and queen from Versailles, was specifically motivated by demands for food.

The European People's Spring saw lots of revolutions across Europe in 1848-1849 including in France, Italy, Bavaria, Austria, Hungary. That was about the same time as a continent-wide grain shortage on top of an economic crisis.

The Russian revolution of 1917 came at a time when a combination of WW1, bad leadership, and an extra cold winter led to food shortages, and fuel shortages so people were starving and freezing at the same time.

[-] hallettj@leminal.space 20 points 1 month ago

There are other galaxy clusters. Gravitational binding is not unique to the local cluster. From Wikipedia,

Notable galaxy clusters in the relatively nearby Universe include the Virgo Cluster, Fornax Cluster, Hercules Cluster, and the Coma Cluster.

The expansion of the universe is very tricky to explain. Oversimplifying can lead to an explanation that seems to be contradictory.

16

I installed StarCraft: Mass Recall which is an impressive project that recreates the original StarCraft and Brood War campaigns in StarCraft 2. Everything works except that the cinematics and some of the game assets are flat, blank red. For example some of the video portraits in the briefing rooms display correctly, but Mengsk is a solid red square. In the first mission Raynor's vulture is flat red while everything else looks correct. Sound works correctly including in cinematics.

The game assets aren't a huge deal, but the cinematics are a big part of the reason for playing these campaigns IMO.

I've tried everything I can think of. I tried some different Wine runners. I tried disabling DXVK. I installed a number of dependencies that look like they provide video codecs:

  • amstream
  • devenum
  • quartz
  • xvid
  • ffdshow

Does anyone have ideas about what else I might try?

What I did figure out is a working command to run the mod, which took me a while. I used Bottles, installed Battle.net through the Bottles program installer, installed StarCraft 2 via Battle.net, and finally installed Mass Recall by unzipping and copying its files to the StarCraft Maps/ and Mods/ directories. Then I was able to run Mass Recall with this command:

$ bottles-cli shell -b "<bottle name>" -i '"C:\Program Files (x86)\StarCraft II\Support64\SC2Switcher_x64.exe" "C:\Program Files (x86)\StarCraft II\Maps\Starcraft Mass Recall\SCMR Campaign Launcher.SC2Map"'
45
submitted 2 months ago* (last edited 2 months ago) by hallettj@leminal.space to c/linux@lemmy.ml

Passkeys seem like a great idea, and we are at a point where, although things are still very much in flux, software passkeys managed by password managers are starting to be usable. I thought I'd share the workflow that's working for me on Linux with some sites, and ask the community for more tips & tricks.

A passkey is a client certificate - which is an old idea, but now there are some new standards in place*. When you log into a website, instead of sending a password you send a message signed using the private key on your hardware security device, or stored in your password manager. If you use a password manager the flow is about the same as with passwords: your password manager pops up and asks if you want to log in to the given website. But instead of sending a password to the browser, message signing takes place in the password manager. Unlike passwords those signed messages can't be replayed. Arguably you can skip sending MFA codes and get about the same (or maybe better) security with passkeys than you were getting with passwords + MFA.

Complications come up because support for passkey APIs is still patchy. On Linux I think there is system-level support for hardware keys, but not for passkey managers (password managers that can do passkey signing). But you can close that gap using browser extensions! I'm using Enpass with it's Firefox extension. Signing into websites in Firefox using passkeys works quite well in some of the sites I've tried. (I've also tested with Bitwarden's browser extension, and it works just as well.**) Although creating passkeys doesn't work on all of those sites.

  • I was able to create a passkey on Github, and sign in with it.
  • I was able to create a passkey for the demo at https://www.passkeys.io/, and sign in with it.
  • I couldn't create passkeys for Google, but I could log in with passkeys created on another device, and synced by Enpass to my Linux machine.
  • I can use a passkey for MFA on Discord, but they don't seem to be using them for logins yet.
  • I'm not getting options to use my passkeys on Amazon or Paypal, but I was able to create passkeys for these sites on Android.

Without using a browser extension Chrome on Linux does have a feature to sign in with passkeys on mobile devices. I don't think this works with third-party passskey managers. On some sites Chrome gave me the option to log in using the automatically-generated, Google-managed passkey on my phone. It didn't actually worked for me - my phone showed a message saying "connecting to device" but never actually connected.

That brings me to the Android side. Since some sites will let me log in with passkeys but not create them it's helpful to have another option for creating passkeys. Android is further along in implementing system level passkey support (only in Android 14 or later). But it's not perfect yet. Firefox for Android is not working with passkey managers yet, but there is a ticket to track this. Third-party passkey managers work in Chrome for Android, but only if you enable an experimental flag:

  • open chrome://flags/
  • find the setting "Android Credential Management for passkeys"
  • set the value to "Enabled for Google Password Manager and 3rd party passkeys"

* "Passkey" seems to be an umbrella term for WebAuthn or FIDO U2F. It looks like WebAuthn is a part of FIDO2.

** From a cursory look at the two I feel more comfortable with Enpass' browser extension than with Bitwarden's. I'm not positive, but it looks like Bitwarden loads credentials in the extension itself which puts all of your secrets in the browser process. OTOH the Enpass extension uses IPC to send requests to the Enpass desktop app. But as many will point out, Bitwarden's clients are open-source and audited while Enpass' software is closed-source.

[-] hallettj@leminal.space 45 points 2 months ago

It's likely a myth that Rasputin was sleeping with the czarina. (Although there's no proof either way.) He had a very close relationship with the czar and czarina because their son had hemophilia, and Rasputin's presence seemed to help his condition. It was a serious illness, and the parents were desperate for anything that could help. But the hemophilia was a secret so nobody outside the family knew why the czar and czarina kept Rasputin so close despite dangerous rumours that Rasputin was the one running Russian policy. The idea that Rasputin was sleeping with the czarina was a popular theory because Rasputin was a well-known horny motherfucker.

[-] hallettj@leminal.space 21 points 3 months ago* (last edited 3 months ago)

I work on a remote team with three Australians who live in three different states. I'm sure they'll appreciate this! Especially the Ausalabaman guy!

[-] hallettj@leminal.space 25 points 3 months ago

Until I read the caption I thought I was looking at giant fingers grabbing the dwarf to stick him in the computer slot

[-] hallettj@leminal.space 32 points 3 months ago

I would install a systemd user service with the setting Restart=always. If your window manager is started with systemd, or defines a systemd target you can configure the waybar service to start and stop automatically with the window manager.

[-] hallettj@leminal.space 17 points 3 months ago

Yes, I use passphrases for stuff like my password manager, my computer login, and my disk encryption. For my login (which I type a lot) it's four words; for occasional stuff like disk encryption it's six. I'm sold on the argument that a passphrase is way easier to memorize compared to a comparably-secure random password.

The number of possible passphrases is the number of words in the dictionary you use to generate passphrases raised to the power of the number of words in your passphrase (assuming a small chance of reusing the same word in a passphrase). I use this command to generate a random phrase using my stock OS word list:

grep -v '[^a-z]' $WORDLIST | shuf --random-source=/dev/urandom | head -n5 | paste -sd ' '

grep -v '[^a-z]' $WORDLIST filters out words with apostrophes or other weirdness. On my system the filtered list is 77,866 words.

For four words, 77,866 ^ 4 ≈ 3.7 × 10^19 possible passphrases.

Compare that to randomly-generated passwords. I'll assume that random lowercase & uppercase letters, numbers, and symbols add up to 46 characters. The number of combinations is 46^n where n is the length of the password. A four-word passphrase is the same order of magnitude as secure as a 12-character password, which has about 9 × 10^19 possible combinations.

I'm sure that if you make up your own passphrases instead of randomly generating them then the security is much lower.

[-] hallettj@leminal.space 27 points 3 months ago

Is that why the characters are offended? Not because they're being told they can't elope?

9
submitted 3 months ago* (last edited 3 months ago) by hallettj@leminal.space to c/nix@programming.dev

It took me some time to work out how to get my ssh agent set up in Niri so I though I would share what I did. I'm using NixOS and Home Manager. I put this in my Home Manager config:

services.gnome-keyring = {
  enable = true;
  components = [ "pkcs11" "secrets" "ssh" ];
};
home.sessionVariables.SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/keyring/ssh";

I'm using GDM according to NixOS' default configuration which I think runs gnome-keyring (I thought I saw it in the process list before I set up the user unit), and I think that configuration is automatically unlocking gnome-keyring when I log in via PAM integration. But apparently I need to run gnome-keyring again in my window manager session. Home Manager's services.gnome-keyring adds a systemd user unit that does that.

[-] hallettj@leminal.space 20 points 3 months ago* (last edited 3 months ago)

When niri runs applications it will now put them into transient systemd scopes. One concrete benefit is that when an application uses too much RAM and systemd-oomd kills it, niri won't go down alongside the app, so the rest of your session will stay intact.

Does Gnome do this? I've certainly had my entire session crash when a certain LSP server used up all of my memory. I appreciate this feature!

I think it's time for me to try Niri as my main WM. The main thing I want to figure out is getting XWayland going so my Wine games will work. I know there is info on this in the Niri docs, so I'll start there.

Edit: The key to getting the games working is gamescope! It runs a nested X session. Lutris does not work without X, but Bottles does and it has a handy gamescope checkbox in the bottle settings.

11
submitted 3 months ago by hallettj@leminal.space to c/nix@programming.dev
[-] hallettj@leminal.space 24 points 3 months ago

Those look nice!

Have you considered a Creative Commons license, maybe with the BY-SA (Attribution-ShareAlike) terms?

11
submitted 4 months ago* (last edited 4 months ago) by hallettj@leminal.space to c/neovim@programming.dev

I'd like a treesitter query that matches a Rust struct together with all of its attributes. For example,

#[derive(Debug)]
#[serde(rename_all = "camel_case")]
pub struct MyType {
    pub foo: i32,
}

The lines beginning with # are attributes that are logically connected to the struct declaration. But the treesitter grammar for Rust parses attributes as adjacent nodes, not as children of the struct declaration:

  (attribute_item ; [27, 0] - [27, 16]
    (attribute ; [27, 2] - [27, 15]
      (identifier) ; [27, 2] - [27, 8]
      arguments: (token_tree ; [27, 8] - [27, 15]
        (identifier)))) ; [27, 9] - [27, 14]
  (attribute_item ; [28, 0] - [28, 35]
    (attribute ; [28, 2] - [28, 34]
      (identifier) ; [28, 2] - [28, 7]
      arguments: (token_tree ; [28, 7] - [28, 34]
        (identifier) ; [28, 8] - [28, 18]
        (string_literal)))) ; [28, 21] - [28, 33]
  (struct_item ; [29, 0] - [31, 1]
    (visibility_modifier) ; [29, 0] - [29, 3]
    name: (type_identifier) ; [29, 11] - [29, 17]
    body: (field_declaration_list ; [29, 18] - [31, 1]
      (field_declaration ; [30, 4] - [30, 16]
        (visibility_modifier) ; [30, 4] - [30, 7]
        name: (field_identifier) ; [30, 8] - [30, 11]
        type: (primitive_type)))) ; [30, 13] - [30, 16]

How can I get produce a query that I can use in mini.ai that matches the struct, and all attributes?

I've tried this query using Neovim's new built-in :EditQuery command:

((attribute_item)* . (struct_item)) @custom_capture.outer

It looks like it does what I want. But when I try using @custom_capture.outer in mini.ai it matches the struct declaration, but not the attributes.

I tried using #make-range! like this,

((attribute_item)* @_start . (struct_item) @_end
  (#make-range! "custom_capture.outer" @_start @_end))

That matches the struct and the second attribute, but does not get the first attribute. I'm guessing that's because the . specifies that nodes must be adjacent, and the second attribute is the only one that is adjacent to a struct_item. Following that thinking I tried this,

((attribute_item)? @_start . (attribute_item)* . (struct_item) @_end
  (#make-range! "custom_capture.outer" @_start @_end))

That gets the struct and all the attributes, but only if my cursor is on the first attribute line when I use the textobject. If my cursor is on any subsequent line then I get the second attribute and the struct, but the first attribute is missed.

One problem is I'm not clear whether ((attribute_item) . (struct_item)) matches an attribute_item and a struct_item that are adjacent, or matches an attribute_item that precedes a struct_item, but does not also match the struct_item. I tried experimenting with the second interpretation and used this query,

(((attribute_item) 
  . [(attribute_item) (struct_item)])* @_start
  (struct_item) @_end
  (#make-range! "custom_capture.outer" @_start @_end))

That captures what I want, but in some cases if I have two struct declarations and I try to match only the second one the query selects both structs instead.

Is that the way to do a lookahead? Or is there another way?

I've kinda hit a wall looking at documentation, other examples, and running my own experiments. Does anyone have any pointers to help understand these queries on a deeper level?

Edit: It looks like this stuff is in flux, so I should mention that I'm using the latest nightly as of March 2 2024, and I made sure that all of my plugins are up-to-date.

[-] hallettj@leminal.space 41 points 4 months ago

And then the replies to the reporter are also AI-generated!

view more: next ›

hallettj

joined 4 months ago