hallettj

@hallettj@beehaw.org

Programmer in California

I’m also on leminal.space/u/hallettj

This profile is from a federated server and may be incomplete. Browse more on the original instance.

hallettj, (edited )

git rebase --onto is great for stacked branches when you are merging each branch using squash & merge or rebase & merge.

By “stacked branches” I mean creating a branch off of another branch, as opposed to starting all branches from main.

For example imagine you create branch A with multiple commits, and submit a pull request for it. While you are waiting for reviews and CI checks you get onto the next piece of work - but the next task builds on changes from branch A so you create branch B off of A. Eventually branch A is merged to main via squash and merge. Now main has the changes from A, but from git’s perspective main has diverged from B. The squash & merge created a new commit so git doesn’t see it as the same history as the original commits from A that you still have in B’s branch history. You want to bring B up to date with main so you can open a PR for B.

The simplest option is to git merge main into B. But you might end up resolving merge conflicts that you don’t have to. (Edit: This happens if B changes some of the same lines that were previously changed in A.)

Since the files in main are now in the same as state as they were at the start of B’s history you can replay only the commits from B onto main, and get a conflict-free rebase (assuming there are no conflicting changes in main from some other merge). Like this:


<span style="color:#323232;">$ git rebase --onto main A B
</span>

The range A B specifies which commits to replay: not everything after the common ancestor between B and main, only the commits in B that come after A.

hallettj,

Power tells you how large of a gap in grid capacity-vs-demand storage can cover while renewables are below peak production. That’s the important number, as long as the energy stored is sufficient to last until renewable output goes back up.

Giving an energy storage number by itself could be misleading because it seems the batteries that have been built take longer than an hour to discharge. So for example 26 GWh storage does not equal 26 GW grid capacity.

But this article, like many others does seem to be loose with the power-vs-energy metrics:

If 6,600 MW doesn’t sound like that much, consider it is enough to supply electricity to about 6.6 million homes in California for 4 hours

Maybe the implication is that the total energy storage is 26,400 MWh?

hallettj,

This is an interesting idea! When I was learning Nix, and feeling frustrated, I often thought that a type-checked language would help with discoverability. But it seems like it might be difficult to combine strong type-checking with Nix expressions’ use of lazy self-reference. So with Garn you get the type-checking, but lose the laziness. I’m interested to see how that goes.

hallettj,

It’s because new phones are too big! I’m planning to take my reasonably-sized phone to the grave!

hallettj,

Just a guess: I think Inform fits your description

hallettj,

I recommend Borg with a CLI frontend like Borgmatic. It’s efficient for running frequent backups, storing only changes since the last backup. It gives you snapshots of each backup. You can mount any snapshot using a virtual filesystem without having to copy everything over.

hallettj,

This points to an interesting feature that appears in English: phrasal verbs. This is where a verb is made up of a verb word used in combination with one or more prepositions or “particles”. For example in the phrase “put cheese on the pizza” the verb word “put” combines with the preposition “on”. (There is no particle in this example.) Even though the words “put” and “on” are not consecutive, and even though “on” has its own function as a preposition, “put on” together form a verb that is lexically distinct (has different meaning and rules) from “put” used with a different preposition or particle.

IIUC you even get a different meaning if you use the same words with a different function. With “on” as a preposition you get, “put cheese on the pizza”. But with the particle form of “on” you get a different verb with a different meaning: “put on a coat”.

The use you posted, “put cheese”, looks like a transitive form of “put” which would be distinct from both of the phrasal verbs I described. My guess is that this is dialect-specific: maybe some English speakers perceive transitive “put” as valid, while others only use “put” as part of a phrasal verb.

Language is messy, and there is no authoritative set of rules for English so you’ll find lots of cases where people disagree about correct grammar. One of the classics is whether “where” substitutes for a prepositional or a noun phrase. Lots of people feel it is correct to say, “Where is that at?” while others think that sounds wrong, like saying, “It’s at by the corner.” (I think this might be the basis for the made-up rule, “don’t end sentences with a preposition”.)

deleted_by_author

  • Loading...
  • hallettj,

    There are specs for that!

    For system-wide installation the Filesystem Hierarchy Standard essentially says:

    • put it in /usr/local/bin/ if you want to drop a script somewhere
    • or put it in /usr/bin/

    Both should be in the default $PATH for most systems.

    For single-user installs the XDG Base Directory Specification says,

    User-specific executable files may be stored in $HOME/.local/bin. Distributions should ensure this directory shows up in the UNIX $PATH environment variable, at an appropriate place.

    Those locations will work in 99% of cases.

    Nothing will work for every case because Linux systems are many and varied. For example I’m on NixOS which doesn’t adhere to that particular provision of XDG, and doesn’t adhere to any of FHS.

    hallettj,

    I’m doing well here. There is pressure to make Halloween live up to the huge hype that the kids put into it. I think as long as there is candy they will be satisfied.

    One of my biggest concerns rn is my eldest’s fascination with all things military and police - which in my mind equates to being drawn toward a violent hierarchy. We’ve had talks about how some bad cops do terrible things, and the good cops don’t do enough to hold the bad ones accountable, and on the horrors of war. It doesn’t seem to sway him. I’m hoping he grows out of it. (He’s 11.) Anyway his Halloween costume consists of carrying a Nerf rifle, wearing full camo (which is his daily wear anyway), along with any military-type accessories he can find.

    hallettj,

    Aw, thanks for the reassurance! I’m sure you’re right - he’s a good kid; he’ll turn out just fine.

    hallettj,

    There are a few history channels I enjoy:

    • History Buffs
    • History Matters
    • Extra History

    For the rise and fall of modern empires: AntsCanada

    If you’re interested in history, but specifically in relation to painted works of art, I very much enjoy: Art Deco

    For in-depth social justice analysis: ContraPoints

    For gamers: TierZoo

    hallettj, (edited )

    After some more digging I think I figured it out.

    I was trying to use nix repl nixpkgs to interactively query packages. But I forgot that that command loads the flake, not the package set. You have to prefix everything with legacyPackages.x86_64-linux. to access packages in this environment. I got better results running nix repl followed by :l angle-bracket nixpkgs angle-bracket. (Btw the repl tells me how many variables have been loaded. Is there a way to list them? That would be helpful.) (Edit: nix repl nixpkgs#legacyPackages.x86_64-linux also works)

    I eventually found github.com/NixOS/nixpkgs/blob/…/rust.section.md?p… which tells me that what I want is pkgs.rustPlatform.buildRustPackage

    I would still like a way to search for nested attributes.

    hallettj,

    Oh very nice - thanks!

    hallettj, (edited )

    Yes, I use Wren. The best endorsement I have is from Wendover Productions - after doing a piece on how many carbon offset programs are scams they later said that Wren seems to be better. But that statement did come in a message sponsored by Wren. My hope is that Wendover would not have accepted Wren as a sponsor if they thought it was garbage.

    Here is the carbon offsets piece: youtu.be/AW3gaelBypY

    Here is a comment from Wendover on their ads for Wren: www.reddit.com/r/WendoverProductions/…/jcnlunq/

    Edited to add links

    hallettj,

    I think the takeaway from that episode is that many carbon offsets are scams, not necessarily all. So don’t take corporate claims that they offset their emissions at face value, and consider carefully before you buy offsets.

    Take a look at my other comment about Wren and Wendover Productions. (This John Oliver episode happens to include an excerpt from the Wendover piece I mentioned.)

    Used keyboard I bought has keys that don't respond when pressed. Any hope in saving?

    Its a Razer Blackwidow elite I got for cheap, the listing just said “sold as is” and had some pictures. Didn’t mention anything about bad keys. Kicking myself now for trying to cheap out. My question is if there is anything I can do to repair it. If so is it worth doing? The switches are not hot swappable if that’s...

    hallettj,

    It’s likely fixable. It might need some switches replaced, or there might be some damaged circuit board connections or traces that could be re-soldered or bypassed. I think any fix is going to require soldering, and maybe a multimeter. Whether fixing it is cheaper than buying a new board depends on whether you can borrow tools, and the cost of replacement switches if you need those.

    I know the switches are not hot-swappable, but you can de-solder switches on just about any mechanical keyboard. Add a solder sucker to your tools list if you need to do that. There are guides online for replacing keys on the specific board you have.

    More details would be helpful for diagnosing the problem:

    • Are there rows or columns of keys that don’t work? (This could indicate a problem with the circuit board, or maybe a diode that needs to be re-soldered or replaced. I don’t know if the Blackwidow has diodes or not. In any case it’s multimeter time.)
    • Or is it a key here and there that doesn’t work? (This is more likely to be a problem with switches. The might need their solder joints touched up, or they might need to be replaced.)
    hallettj,

    Thanks for looking that up! I could be wrong, but I think that boards with N-key rollover generally do use a matrix but with the addition of diodes to prevent ghosting. (Details on Deskthority.) The only designs I’ve seen that don’t use a matrix are small split boards with fewer two dozen keys per side/controller where it’s practical to get a controller with enough IO pins to use a separate pin for each key.

    hallettj,

    Yeah, with those options it’s easier to back up your whole home directory, and then daily backups only take a minute or so and a small amount of additional space to back up what’s changed since the day before.

    Cross platform terminal emulator?

    Is Termius the only cross platform emulator that includes Android as one of the platforms? It is quite good, in my limited experience, but too expensive for a hobbiest. I like that I can use my Linux desktop, MacOS laptop, and Android tablet/phone and the UX is the same across them all. The sync (trial for free, then charge) is...

    hallettj,

    I’m seeing some hints that Wezterm can be built for Android. But l haven’t found specific instructions, and I don’t think it has a feature to sync hosts and keys.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • InstantRegret
  • mdbf
  • ethstaker
  • magazineikmin
  • GTA5RPClips
  • rosin
  • thenastyranch
  • Youngstown
  • osvaldo12
  • slotface
  • khanakhh
  • kavyap
  • DreamBathrooms
  • JUstTest
  • Durango
  • everett
  • cisconetworking
  • Leos
  • normalnudes
  • cubers
  • modclub
  • ngwrru68w68
  • tacticalgear
  • megavids
  • anitta
  • tester
  • lostlight
  • All magazines