[-] 2xsaiko@discuss.tchncs.de 1 points 59 minutes ago

Ah, alright. Thanks for looking!

[-] 2xsaiko@discuss.tchncs.de 2 points 59 minutes ago

I wouldn’t even know how to hold a local music library on macOS these days. The app that used to be iTunes is now just called Music right?

Yeah. I have a local library consisting of some albums I bought, some which aren't on streaming services, and some other stuff such as game soundtracks + also use Apple Music streaming. They complement each other really well.

[-] 2xsaiko@discuss.tchncs.de 1 points 1 hour ago

The bingo one actually uses crossbeam channels instead of mutexes, so that's nice. I haven't looked too closely at it though.

I don't think you can do too much about the Spectrum one if you want to keep the two threads, but here's what I would change related to thread synchronization. Lemmy doesn't seem to allow me to attach patch files for whatever reason so have an archive instead... https://dblsaiko.net/pub/tmp/patches.tar.bz2 (I wrote a few notes in the commit messages)

Just to give the reason for Rc in the current project. I’m reading in a M3U file and I’m going to be referencing it against an Excel file. So in the structure for the m3u file, I have two BtreeMaps, one for order by channel number and one by name. Each containing references to the same Channel object.

So basically it's channels indexed by channel number and name? That one is actually one of the easy cases. Store indices instead:

struct Channels {
  data: Vec<Channel>,
  by_number: BTreeMap<u32 /* or whatever */, usize>,
  by_name: BTreeMap<String, usize>,
}

// untested but I think it should compile
fn get_channel_by_name(ch: &Channels, name: &str) -> Option<&Channel> {
  Some(&self.data[*ch.by_name.get(name)?])
}
[-] 2xsaiko@discuss.tchncs.de 5 points 9 hours ago

Not for the built-in Eq derive macro. But you can write your own derive macros that do allow you to take options, yeah.

[-] 2xsaiko@discuss.tchncs.de 8 points 9 hours ago

Do you have some public code you could link to that you’re having this issue with? There isn’t a one-size-fits-all solution for Rc/RefCell, I think.

[-] 2xsaiko@discuss.tchncs.de 1 points 9 hours ago

Whoa nice, I need to keep this in mind.

[-] 2xsaiko@discuss.tchncs.de 1 points 10 hours ago

Interesting. I can’t find anything about the FLAC licensing issues. Do you have a link?

(Also, correction — Wikipedia says macOS in general can play FLAC. I guess it’s just the Music app that can’t import them.)

[-] 2xsaiko@discuss.tchncs.de 2 points 1 day ago* (last edited 1 day ago)

Yep. Lack of format support is usually to blame on the one who doesn't support the format. You can absolutely blame Apple for this too though, their apps can't open e.g. Matroska video or FLAC.

And perplexingly, they don't support uploading HEIC, their own image format of choice, on the web iCloud Photos. So there's that too.

(At this point my music library is stored as ALAC because it's well supported in both Linux and Apple's OSes. Really wish it wouldn't have to be that way though. Someone needs to tell them about ffmpeg.)

For example they used to have their own video container .mov

It's always very very funny every time someone mentions MOV, because while it's very similar to MP4, it's actually an open format while MP4 isn't (!). You actually have to pay for the MP4 standard document while Apple just gives you the MOV documentation.

Also at least taking a screen capture on macOS still gives you a MOV container, actually.

[-] 2xsaiko@discuss.tchncs.de 2 points 1 day ago

Meeeeh, that sucks though compared to iCloud. I haven’t tried it but it seems like it will upload only and not download, and it will not store the entire Photos database (including faces, etc.).

[-] 2xsaiko@discuss.tchncs.de 48 points 1 day ago

Would be cool if this results in being able to store the Photos library in Nextcloud. Not holding my breath though.

[-] 2xsaiko@discuss.tchncs.de 5 points 4 days ago

Yes, it even uses BitTorrent to distribute videos.

[-] 2xsaiko@discuss.tchncs.de 8 points 6 days ago

The article starts with a table of contents with the change highlights as the first item.

30

I wanted something like GIMP for iOS with which I can stitch together/overlay/crop images, add text, blank out parts, draw on the image, and so on. Nothing in the app store looked appealing, most of what I could find seems to be geared towards photo post processing, so I had the idea of trying Freeform for this, because well, it lets you place various objects on a canvas. And it works pretty well!

Create a new board with the image inside, set it to no rounded corners and no shadow, and then do whatever you want to it with Freeform’s tools.

Then, when you’re done, select Export to PDF and convert it to an image. You can use this share sheet shortcut which I made which makes an image out of it and also cuts away the white frame it generates around the PDF: https://www.icloud.com/shortcuts/fa5e2386588742b2a1f5d41401f2238e

There you go, straight forward basic image editing with a free stock app.

It unfortunately doesn’t preserve the original resolution of the image but it’s definitely good enough for me.

29

I'm looking for something like GitHub's user activity indicator that gathers information from a list of git repositories regardless of where they are hosted (as long as they are public), that I can put on my webpage, kind of as a thing to show what I'm working on at the moment.

Is this a thing that already exists? I'd started writing one a while ago but instead of reviving that it would be great if there's something that already exists and I can just use :^)

19
29
submitted 11 months ago by 2xsaiko@discuss.tchncs.de to c/linux@lemmy.ml

According to this Phoronix article, Linux should support the birth time attribute in the NFS server since 5.18. However, it doesn't show up in the stat output when looking at the file through the NFS mount, or elsewhere (at least, the Dolphin file browser and also a macOS client):

% stat file
  File: file
  Size: 0               Blocks: 0          IO Block: 1048576 regular empty file
Device: 0,70    Inode: 103416894   Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/   saiko)   Gid: (  100/   users)
Access: 2023-12-17 03:22:45.368950609 +0100
Modify: 2023-12-17 03:22:45.368950609 +0100
Change: 2023-12-17 03:22:45.368950609 +0100
 Birth: -

What gives? Running stat on the server directly, it shows the attribute. The backing file system is ext4, kernel 6.5.12. The client is using kernel 6.1.63.

view more: next ›

2xsaiko

joined 1 year ago