Sender | Message | Time |
---|---|---|
12 Aug 2024 | ||
Crower set a profile picture. | 13:15:41 | |
kyub left the room. | 16:59:10 | |
kyub joined the room. | 17:00:44 | |
13 Aug 2024 | ||
atagen | how would I enumerate attrs? for example, if I have:
how can I process this to get
| 02:18:12 |
atagen | * how would I enumerate attrs? for example, if I have:
how can I process this to get
| 02:18:26 |
atagen | * how would I enumerate attrs? for example, if I have:
how can I process this to get
? | 02:18:42 |
atagen | I don't care about the order of evaluation, only that n is unique for each member | 02:19:01 |
infinisil | atagen: There's a PR proposing imapAttrs : https://github.com/NixOS/nixpkgs/pull/270049 | 02:20:59 |
emily |
| 02:21:56 |
emily | (why do you want this?) | 02:21:58 |
atagen | In reply to @emilazy:matrix.orgI have a home-manager option that generates firefox profiles w userchrome removed, unique .desktop files etc to make pseudo-PWAs - the IDs need to be unique and sequential for firefox to respect all entries in the profile ini | 02:24:54 |
emily | I see | 02:25:20 |
emily | you might want to skip the listToAttrs part depending on your usecase | 02:25:28 |
emily | also, since there's no ordering guarantees, if renumbering would matter at all you might just want it to be a list to begin with | 02:25:54 |
atagen | I appreciate the help, I'll have a poke around at it | 02:25:55 |
atagen | anything beats setting them manually at each site | 02:26:32 |
atagen | In reply to @emilazy:matrix.orgthough hmm yeah | 02:26:36 |
@adis:blad.is | Attrsets are sorted | 02:27:03 |
atagen | now I think about it, if I remove one and the number decrements, firefox will probably start using the data of the old profile from the wrong app | 02:27:08 |
@adis:blad.is | So you'll get numbering in lexicographical order | 02:27:20 |
atagen | * now I think about it, if I remove one and the number decrements, firefox will probably start using the data of the old profile from the wrong app.. perhaps I can do some symlink crimes based on app names and some stateful stuff in home dir | 02:29:21 |
emily | In reply to @adis:blad.isuh, TIL | 02:30:38 |
emily | In reply to @atagen:imagisphe.reI'm confused, surely the reason Firefox profile directories are named after key mashes is to avoid this? | 02:31:15 |
emily | are you sure the ordering is not just to determine the list some UI presents or something? | 02:31:37 |
atagen | I honestly have no idea | 02:31:50 |
atagen | hmm, they do have a Path key in the INI, but I don't know if I have simple access to that part of the hm firefox machinery lol | 02:32:51 |
atagen | you may well be right that it's just for UI/selections. either way, no longer a Nix lang problem 👍️ | 02:33:58 |
atagen | * hmm, they do have a Path key in the INI, but I don't know if I have simple access to that part of the hm firefox machinery lol. but if that's all it is then I guess it's fine until I literally reuse an app name | 02:34:25 |
@aloisw:kde.org | In reply to @adis:blad.isHowever the order is inconsistent between operations; most user-facing things (like attrNames or printing) use lexicographic order, but comparison uses symbol table order. | 07:43:03 |
emily | : ( | 09:23:49 |