#metabrainz

/

      • naiveai
        I thought +250 would sweeten the deal for him, but no, he's like top 5% already, it's small beans for him :P
      • but when someone that experinenced describes this as a "feat", you know you're gonna have a bad time
      • Leo_Verto
        well, you're always going to have problems with py2 and unicode
      • naiveai
        the problem with stackoverflow bountying is that it doesn't really help all that much - it's still one of the questions in a pack of - what? 366 now! a lot of which have insane bounties like +500
      • well, not a lot, only 2 have +500 currently, but still >-<
      • github joined the channel
      • github
        [picard] zas closed pull request #803: Simplify search dialog save/restore states code (master...search_dialog_states) https://git.io/vNzHQ
      • github has left the channel
      • harshtiku_ has quit
      • naiveai
        holy sh*tballs I have a new answer
      • SothoTalKer
        naiveai do you even remenber 2012? (:
      • naiveai
        yes, very clearly actually, because it was the year I first learned how to program
      • Leo_Verto: don't merge just yet, this answer just might work
      • travis-ci joined the channel
      • travis-ci
        metabrainz/picard#2902 (master - 1403e13 : Laurent Monin): The build passed.
      • travis-ci has left the channel
      • SothoTalKer
        (:
      • naiveai
        HIS ANSWER WORKED
      • OMIGODOMIGODOMIGOD
      • Leo_Verto: there is very small modification to DummyApp required to make the tests pass
      • like, one characther
      • Leo_Verto
        okay, I'm going to let this one slide but don't add any more features :P
      • naiveai
        yeah, but I mean come on, 👍 is crucial, it's the intuitive way people vote
      • and also, VICTORY
      • my stackoverflow repuation SAVED THE DAY :D::D::D:D:D::D:D
      • jesus christ, this is not what normal 14-year-olds are happy about
      • Leo_Verto
        I want just 👍
      • to work for binary votes
      • naiveai
        yeah, np
      • SothoTalKer
        i never vote wirh emiticons
      • naiveai
        it's a regex change
      • SothoTalKer: don't ruin this for me
      • seriously, sotho
      • d00d.
      • SothoTalKer
        just saying i dont :)
      • Leo_Verto
        SothoTalKer: emojis are a vital part of any tech company in this day and age
      • naiveai
        Leo_Verto: that'll be no problem. Am I allowed to push directly to the master?
      • probably not
      • Leo_Verto
        why else is everyone using slack?
      • naiveai
        but still
      • SothoTalKer
        because my client does not support them ;p
      • Leo_Verto
        just add it to the PR
      • naiveai
        well, it's kind of unrelated... but ok
      • KassOtsimine
        !m naiveai
      • BrainzBot
        You're doing good work, naiveai!
      • naiveai
        :D
      • SothoTalKer
        typing +1 or yes is faster than looking up some unicode emoticon
      • KassOtsimine
        NOW FEATURE FREEZE ZOMG :P
      • SothoTalKer
        but young people are all in for the graphics
      • naiveai
        KassOtsimine: excuse to me, I do recall you saying that that should work :P
      • KassOtsimine
        i took it back when leo sid it would be hard D:
      • naiveai
        Leo_Verto: are you sure I shouldn't open a different PR? :P It changes self.output('something') to self.output(u'something')
      • KassOtsimine
        right. now I go outside to overcome my fear of snow
      • \o
      • wish me luck!
      • Leo_Verto
        okay, make a new PR then
      • good luck, KassOtsimine !
      • outsidecontext joined the channel
      • so I just introduces naiveai to the skin colour modifier for emojis :P
      • s/introduces/introduced
      • drsaunders has quit
      • naiveai
        KILL ME
      • SothoTalKer
        will do :3
      • naiveai
        it's getting split again :(
      • Leo_Verto
        back to stackoverflow then :P
      • drsaunders joined the channel
      • UmkaDK joined the channel
      • outsidecontext has quit
      • naiveai
        Leo_Verto: where should I keep utilities functions that are not specific to a particular plugin but are still needed for mine?
      • Leo_Verto
        either base.py or make a new file in that dir and import it in base.py
      • kartikeyaSh_ircc joined the channel
      • naiveai
        the function is a regex escape function, will it fit in base.py (i am aware of re.escape, it does not work with unicode very well)
      • suriv has quit
      • Leo_Verto
        then just put it in a utils.py and import that in the plugin
      • SothoTalKer
        you should make an upstream patch then to make re.escape work better ;)
      • Leo_Verto
        or that :P
      • do you know if it's better in recent py3 versions?
      • SothoTalKer
        both parallel is best ^^
      • naiveai
        Leo_Verto: actually, even on py3.6 it's not exactly as I need it to be
      • the problem is re.escape(u"\U0001f44d\U0001f3fb") results in the backslashes being escaped
      • which in our case is completely wrong
      • Leo_Verto
        why do you even need to escape that?
      • naiveai
        Not that particularly
      • But the thing is, in the VOTE_SHORTUCT_TO_NAME dictionary, there is an entry for "+" and "-"
      • which do need to be escaped for my general solution to work
      • I don't wanna duplicate information in the regex and dictionary, ideally
      • But it looks like that might be my only real option
      • also, the order is important which also complicates things
      • Leo_Verto
        yeah, just store them in escaped form
      • naiveai
        but then when they're checked in the _parse_vote, they will be in the escaped form
      • the other option is to re.escape the option in _parse_vote as well
      • but that won't work, actually
      • because of the same unicode issue
      • UmkaDK has quit
      • ok, there has to be an elegant solution here, even more issues are popping up...
      • Leo_Verto
        and your github profile pic comes into play again :P
      • KassOtsimine has quit
      • KassOtsimine joined the channel
      • naiveai
        this was already an issue before this, it just got exposed here
      • it's somewhat true, but it's a good challenge
      • if it was easy, none of us would get paid :D
      • well, I'm not, but you get what I mean
      • Leo_Verto
        neither am I :P
      • naiveai
        well, not for open-source, but presumably you do have a day job
      • Wizzup gets paid to work on open source
      • too many clasues :P
      • Slurpee has quit
      • Leo_Verto
        nope, I'm a poor student :P
      • but at least I'm not accumulating student loans like bitmap is :D
      • naiveai
        YUROP
      • Leo_Verto: the best solution is indeed to use a custom escape function, it's the cleanest one. re.escape inserting unncessary backslashes is a well-documented problem, but an upstream patch probably won't get accepted since it's a breaking change
      • KassOtsimine has quit
      • KassOtsimine joined the channel
      • SothoTalKer
        Leo_Verto: i'm really crying for you poor student now :p
      • Leo_Verto
        eh, at least I'm eligible for GSoC :D
      • SothoTalKer
        what for? a free tshirt? :D
      • naiveai
        free tshirt is literally the bomb by the way
      • SothoTalKer
        i know
      • Leo_Verto
        SothoTalKer: mostly, but also that sweet Google money
      • SothoTalKer
        wanna get money from the devil? (:
      • naiveai
        Leo_Verto: as it turns out, I am stupid and re.escape works fine
      • Leo_Verto
        nice :P
      • SothoTalKer
        hehe
      • UmkaDK joined the channel
      • naiveai
        Leo_Verto: I'm rebasing and force-pushing one last time, because I was doing it earlier anyway, but I won't do it in future PRs
      • Leo_Verto
        okay
      • KassOtsimine has quit
      • KassOtsimine joined the channel
      • UmkaDK has quit
      • samj1912
        naiveai: was prefixing the strings with u the problem?
      • (in py3)
      • naiveai
        samj1912: in py3 the solution is a lot lot cleaner
      • samj1912
        I would assume so
      • naiveai
        in py2 (in narrow python installations, like the one on my computer) if you put an two-char emoji into [], they will be interpreted as two seperate characters to match
      • HSOWA joined the channel
      • HSOWA has quit
      • HSOWA joined the channel
      • KassOtsimine has quit
      • outsidecontext joined the channel
      • HSOWA has quit
      • KassOtsimine joined the channel
      • might have messed the git history a little bit. but the whole commits are now squashed, which is not that bad
      • mistakes were made
      • Leo_Verto: pushed.
      • Leo_Verto
        thanks
      • Zastai joined the channel