#musicbrainz-devel

/

      • nikki
        I wonder what counts as open
      • I can see it in finder, but I'm in one of the parent directories (using the tree view)
      • bitmap
        yeah
      • if I use the tree view like that, it doesn't count as open
      • only when it's the directory in the window title, I guess
      • Leftmost
        Wow. That sounds like some FS breakage. :P
      • kepstin likes how linux filesystems handle it very simply - you can put any character except '/' or NULL in a filename, and no parsing is done on it whatsoever :/
      • bitmap
        oh, it's not that I have the window open. It's whether I drag the file into Picard specifically, or just the folder that contains it
      • as long as I don't actually select the file, it triggers the bug
      • Mineo
        it gets weirder every minute ;p
      • Leftmost
        Hmm. I thought Linux filesystems used NFC to store filenames.
      • kepstin
        most linux software uses UTF-8 with NFC, but there's no requirement for that.
      • Leftmost
        Well, tend to use.
      • kepstin
        the same text encoded with NFC and NFD on linux could create two completely separate files on the FS :)
      • Leftmost
        Could, yeah.
      • bitmap
        anyway, http://paste.pocoo.org/show/454212/ fixes it for me
      • luks
        linux filenames are just series of bytes
      • bitmap
        though I wonder if that's ideal if someone is saving to a filesystem other than HFS+ on darwin
      • luks
        I guess it wouldn't cause any problems
      • kepstin
        bitmap: good test would be a fat32 external drive
      • luks
        but if I remember correctly, the HFS normalization is not exactly NFD
      • it has some specifics
      • can't remember what's different though
      • Leftmost
        Oy. Reading an article about some guy encouraging using normalized filenames and having FUD and misinformation thrown at him.
      • One guy responds that one of the advantages would be that "a" and "A" would be equivalent. Guy obviously knows nothing about normalized forms. :P
      • kepstin
        hmm. wikipedia's reference link for the HFS+ normalization is dead :/
      • Leftmost
        Other people saying it would break 40+ years of Unix programs running on Linux. (If they're treating filenames a bytestream, how will normalizing filenames break them?)
      • *as a
      • kepstin
        hmm. that doesn't actually say any differences.
      • nikki
        I remember testing nfc/nfd on fat32 in osx
      • but I don't remember what happened :/
      • bitmap doesn't have a fat32 drive to test with
      • no usb sticks?
      • kepstin
        most modern Linux applications use UTF-8 encoded NFD, but make no particular requirements for normalization when reading files, and can even read files using other character sets (it'll print junk characters and a note saying that the filename wasn't properly encoded)
      • nikki looks for hers
      • bitmap
        I have three or four USB sticks but they always dissapear when I need them
      • nikki
        kepstin: nfd? it's always been nfc for me
      • aha, found it
      • kepstin
        er, NFC. yes. the names are too confusing :)
      • bitmap
        s/dissapear/disappear
      • nikki
        I might even still have my test files on there
      • hehe
      • I do :D
      • Leftmost
        I don't know why, but for some reason I prefer NFC for filename storage. One of those totally insane preferences.
      • kepstin
        NFC uses fewer bytes :) save a couple bytes per filename.
      • Leftmost
        Heh, another article says that all four normalization forms should be tried when opening a file on Linux.
      • a) That won't work. Who says it's normalized?
      • b) NFKC/NFKD? Really? No.
      • kepstin
        it doesn't matter what normalization form something's in when you're just /reading/ it...
      • as long as the encoding's correct, just read it and re-normalize it to what you want to use internally.
      • Leftmost
        kepstin, the guy clearly doesn't really understand the issue. :P
      • Especially if he's assuming something would be stored in NFKC/NFKD.
      • Leftmost immediately writes a letter to the kernel list insisting that all filenames should be stored as NFKD.
      • To hell with equivalence!
      • nikki
        on fat32, osx reads nfc filenames, but displays them as nfd. nfd filenames appear if there's no nfc version, but vanish when you try and select them
      • so you can only use nfd with hfs+ and nfc with fat32
      • Leftmost wonders why they decided to use NFD with HFS+...
      • to be awkward
      • Leftmost
        Clearly.
      • Now, someone find me a nice Android notetaking app with both keyboard input and a draw function. :P
      • bitmap
        nikki: so OSX lets you write NFD filenames to fat32 but they don't work?
      • nikki
        I suspect it automatically converts them to nfc
      • I only tested creating the files in linux and looking at them in osx
      • kepstin
        well, when storing filenames on fat32, it has to reencode them to legacy windows 'codepage' character sets, iirc...
      • bitmap
        ah
      • kepstin
        so weirdness may result :/
      • Leftmost
        I believe that there's a codepage for UTF-8, though.
      • nikki
        I mean... I originally used a fat32 external drive with osx and never had any problems with picard
      • then I used an ext3 formatted drive mounted via a vm and didn't have any problems either (it seemed to automatically convert to nfc there too)
      • bitmap
        nikki: if I made an app bundle with that patch applied, would you be able to test saving to the fat32 drive? :)
      • nikki
        sure :)
      • kepstin
        hmm. so there is, codepage 65001 is UTF-8.
      • bitmap
        luks: so do you think that patch is okay to commit?
      • luks
        if nikki agrees with it :)
      • bitmap
        okay, I'll make this app bundle first
      • nikki: http://users.musicbrainz.org/bitmap/MusicBrainz... sorry that VMWare was so damn slow >:(
      • nikki
        no problem :)
      • nikki leads a rather uninteresting, uneventful life and is usually not in a hurry ;)
      • Leftmost
        I do not like python for loops. I do not like them, Sam-I-Am.
      • bitmap
        huh, what about them do you not like?
      • Leftmost
        I don't like that I have to go out of my way to iterate over a list and keep an index on hand.
      • bitmap doesn't know where you'd have to do that
      • bitmap
        if you're using enumerate() you shouldn't have to keep track of an index
      • Leftmost
        I'm matching something based on regex. I want to modify that match based on a function call and then replace it. There may be more than one match.
      • So to iterate over all of the groups in the MatchObject while still being able to get start and end indices, I have to keep track of index.
      • bitmap
        I probably shouldn't say anything without seeing the code, then
      • nikki
        bitmap: it writes a precomposed character in fat32
      • Leftmost
        bitmap, I'll pastebin it in a bit. It's turning out a bit dirtier than I'd like, but I blame that on me not knowing python too well.
      • bitmap
        nikki: ah, thanks for testing that!
      • I'm glad it does that instead of completely breaking
      • nikki
        heh, and finder still shows it as nfd
      • voiceinsideyou1 suspects Amazon _might_ be blocking cover art downloads if you haven't recently requested art from a browser on the same IP address :(
      • I wonder if it *always* provides nfd filenames to programs
      • bitmap
        nikki: let me know if you're happy with the patch later too (i.e. no unintended side effects)
      • Leftmost
        Oh gdi... I can't do m/foo/g with re.search()?
      • luks
        what does m/foo/g do?
      • Leftmost
        Match all instances of foo.
      • luks
        re.findall?
      • Leftmost
        I want the MatchObject, though.
      • finditer, apparently.
      • voiceinsideyou1
        more sad times: Error downloading http://musicbrainz.org:80/ws/2/release?release-... - server replied: Bad Gateway'
      • Leftmost
        I keep trying to use semicolons. :P
      • bitmap
        you can if you really want, it's just a waste of space ;)
      • ijabz joined the channel
      • Leftmost
        Okay, this isn't going to be exactly pretty, but it'll work.
      • Yay. My guess mix case script works. :P
      • So ugly.
      • outsidecontext joined the channel
      • Got some tweaking to do, but it'll all work out eventually. :P
      • navap joined the channel
      • ijabz joined the channel
      • Muz joined the channel
      • jdamcd joined the channel