At least you remembered your pants
hallettj
Just a basic programmer living in California
- 8 Posts
- 215 Comments
hallettj@leminal.spaceto
Programming@programming.dev•Why do so many programming languages have their own package manager?English
5·7 days agoI agree that this doesn’t seem necessary. Personally I think Nix would be a good candidate for dependency management that works consistently between languages. I think that may be partway set up for Haskell, and I’ve noticed that nixpkgs has a good collection of Python dependencies. But for most cases the Nix flow currently usually involves using the language’s bespoke dependency manifest to generate a Nix expression that downloads dependencies from the language’s bespoke package repo.
One advantage of Nix is that you don’t need all packages in one repo. Nixpkgs is mostly geared for the NixOS Linux distro. Each language ecosystem could have its own repo if that makes the most sense, with Nix being the common connective language.
hallettj@leminal.spaceto
TenForward: Where Every Vulcan Knows Your Name@lemmy.world•The hair is doing a lot of the heavy lifting hereEnglish
11·11 days agoI think it would be more clear with an apostrophe at the beginning of the word. But if you do the technically correct thing and put apostrophes at both ends to stand in for both elided syllables then it looks like the whole word is in quotes, and you’re back to square one. It’s a 'nundrum.
I’m using Rust on the server, Typescript on the client. Some very interesting options have appeared in Typescript over time for better ADT handling!
ts-pattern provides a match function that verifies matches are exhaustive. Yes, it’s a static check. It’s got a powerful matching language that does stuff like extract nested properties from complex inputs, like Rust’s match. I recommend reading the documentation - for me it led to some “I didn’t know that was possible!” moments.
I’ve also been using fp-ts to get
OptionandEithertypes. (Eitherinstead ofResultbecause fp-ts is inspired by Haskell.) It has features for processing fallible values as monads which gets close to the conciseness of Rust’s?operator and try Trait, but is more generalized. It also has mtl-ish types likeTaskEitherwhich roughly serve the purpose of a Promise but with an explicit error type.Now that you mention it, must-use detection for
Eithervalues would be helpful. Eslint has a built-in check that does exactly that for Javascript’s native Promise type. I haven’t tried it, but it looks like eslint-plugin-fp-ts has a rule that might do the same for other types.
hallettj@leminal.spaceto
Programming@programming.dev•What do you check first when a CI pipeline passes locally but fails in CI?English
1·1 month agoI try to capture every detail of the build and test environments in Nix devshells. And where I can I try to encapsulate as much as possible in Nix checks and packages which run in build sandboxes - both locally and on the server. Build sandboxes don’t work for everything, but the devshells alone are great for reproducibility.
- Wrong interpreter version? A devshell with a
flake.lockfile ensures every environment is using the exact same interpreter. - Accidentally picking up stuff from the local
.env? Sandboxed checks and builds don’t get any files that aren’t version controlled, so that’s not an issue. But it’s still an issue with devshells. - Accidentally picking up programs or env vars in your environment? Sandboxed builds always get a clean starting environment. If you run
nix develop --ignore-envyou get a devshell that also gets a clean starting state.
Nix doesn’t fix everything.
- File system case sensitivity - depending on where this issue presents (program-generated files vs source files), I use property testing to catch this problem. In fact I was working on exactly that the other day.
- Timing issues - that’s a good old fashioned hard problem. Try to make logical dependencies explicit. It’s really easy to get implicit order dependencies in concurrent code if you aren’t on guard. In languages that support it promises or futures are good for spelling out what needs to happen in what order.
- Edit: Difficulty keeping secrets in sync - one option is to use Sops or Age to put encrypted secrets in version control. Then your CI only needs to be configured with one secret to decrypt the other secrets it needs.
- Wrong interpreter version? A devshell with a
Every time my wife comes back from a work trip she complains that the rental ICE car felt like driving with the parking brake on compared to our little budget EV
It reminds me of Luke Dangler’s flight of the floof painting series
hallettj@leminal.spaceto
Linux@programming.dev•I've tested many portable Linux distros, but PorteuX is the one I keep on my USB driveEnglish
2·1 month agoI’m not sure how to pronounce that name so I’m going to opt for an all-in French pronunciation. That makes the capital X silent!
I haven’t done this, but I think this idea is going to stick with me going forward
hallettj@leminal.spaceto
TenForward: Where Every Vulcan Knows Your Name@lemmy.world•Discussion: Is Kirk actually the womanizer people claim?English
9·3 months agoI think one of those kisses in Exhibit A was an evil duplicate. But yes, you make a strong case
hallettj@leminal.spaceto
TenForward: Where Every Vulcan Knows Your Name@lemmy.world•Might have been useful on a number of occasionsEnglish
11·3 months ago- That alien transporter with a range of 40,000 light years (the spatial trajector) that just can’t work on Voyager because it has an incompatible power supply
- Infinitely fast travel at warp 10 that comes with serious, but entirely curable side-effects
hallettj@leminal.spaceto
Programming@programming.dev•There’s Never Been a Better Time to Study Computer ScienceEnglish
7·3 months agoOh I was pissed when the bubble burst right before I graduated from high school
I’m sorry. I’ve often thought the term “temperate climate” is misleading. That’s clearly bipolar
Oh! Is this how bootlegging works?
hallettj@leminal.spaceto
TenForward: Where Every Vulcan Knows Your Name@lemmy.world•In celebration of International Worker's Day, let's talk DS9 "Bar Association" with an experienced union organizerEnglish
7·3 months agoOk, I don’t really know what I’m talking about. I think the deal is that there is a concept of a “bargaining unit”, and the government usually limits bargaining units to one workplace, or maybe one employer. And employers can’t be compelled to negotiate with a group that is not a single bargaining unit. So in practice organizing has to be done workplace by workplace. Unless I’ve misunderstood.
hallettj@leminal.spaceto
TenForward: Where Every Vulcan Knows Your Name@lemmy.world•In celebration of International Worker's Day, let's talk DS9 "Bar Association" with an experienced union organizerEnglish
8·3 months agoI had a workplace organizing training session the other day, and learned a couple of things. I’m not sure I have all this correct, but from what I recall US laws are strict in what kind of organizing is allowed - I think cross-industry unions aren’t allowed. Contractors aren’t eligible to unionize. (That’s on top of the “wage theft” effect of classifying full time employees as contractors instead of W-2 employees.) Organizing protections for workers don’t extend to managers. It’s a lot of bullshit.
hallettj@leminal.spaceto
Linux@programming.dev•Linux is Getting a New Default Folder in Your Home DirectoryEnglish
6·4 months agoI think Templates is for cases where you make lots of documents that have the same starting structure. Like a letter head, or a spreadsheet you recreate every month. The starting structure can be saved in Templates so you can copy it ever time you need it. Maybe I’ll put a Nix flake template there instead of always copying from a recent project.
Public might be for files that other users have read access to on a multi user system? Or maybe for network shares? Or a personal website? I’m not sure. Edit: I found a comment saying that Gnome file sharing uses Public.
hallettj@leminal.spaceto
Linux@programming.dev•Linux is Getting a New Default Folder in Your Home DirectoryEnglish
13·4 months agoYou can customize the names with a
~/.config/user-dirs.dirsfile. That will work on XDG-compliant programs. instructions
hallettj@leminal.spaceto
Linux@programming.dev•Linux is Getting a New Default Folder in Your Home DirectoryEnglish
3·4 months agoI used to have a scratch directory. Then I realized I can put stuff in /tmp/whatever, and it gets automatically deleted on reboot. I made a shell function that creates a /tmp subdirectory, and cds to it in one command.



I love a good philosophy meme! Reminds me of this philosophy help desk comic: https://existentialcomics.com/comic/51. That one doesn’t have Wittgenstein’s perspective