#metabrainz

/

      • armalcolite
        alastairp: u mean ticket for timestamp problem?
      • 2016-07-20 20201, 2016

      • Freso
        I don't think the Last.FM import should import "now listening".
      • 2016-07-20 20202, 2016

      • alastairp
        yep
      • 2016-07-20 20203, 2016

      • alastairp
        Freso: no. it shouldn't. which is the fix to the bug that ruaok and I were seeing
      • 2016-07-20 20212, 2016

      • Freso
        Alright then.
      • 2016-07-20 20218, 2016

      • alastairp
        armalcolite: yes
      • 2016-07-20 20239, 2016

      • JesseW joined the channel
      • 2016-07-20 20239, 2016

      • armalcolite
      • 2016-07-20 20232, 2016

      • alastairp
        perfect. I get notifications of changes to all LB tickets, so I like keeping up-to-date with what you're working on
      • 2016-07-20 20245, 2016

      • alastairp
        please try and use the "start work on" actions, etc
      • 2016-07-20 20222, 2016

      • alastairp
      • 2016-07-20 20230, 2016

      • alastairp
        which I think will be useful when you're making this change
      • 2016-07-20 20241, 2016

      • alastairp
        (and also for the json split PR)
      • 2016-07-20 20205, 2016

      • alastairp
        can you see on the example that Gentlecat linked, we use a new line for every single different item in the query
      • 2016-07-20 20249, 2016

      • alastairp
        ah, actually. not quite, sorry
      • 2016-07-20 20253, 2016

      • alastairp
      • 2016-07-20 20244, 2016

      • armalcolite
        alastairp: oh, i made some changes in api_compat PR regarding this.
      • 2016-07-20 20231, 2016

      • alastairp
      • 2016-07-20 20234, 2016

      • alastairp
        same query,
      • 2016-07-20 20248, 2016

      • alastairp
        but every item is on a new line
      • 2016-07-20 20216, 2016

      • alastairp
        this makes viewing diffs much nicer. If you add or remove a single column, you can easily see what was changed
      • 2016-07-20 20236, 2016

      • armalcolite
        ah, i have to move items in separate lines.
      • 2016-07-20 20236, 2016

      • alastairp
        by adding the comma to the beginning of a line, it means that when adding a column you only change one line, not two
      • 2016-07-20 20251, 2016

      • alastairp
        the same with every clause in the WHERE
      • 2016-07-20 20200, 2016

      • armalcolite
        sure. I'll make these changes across the PR's
      • 2016-07-20 20205, 2016

      • alastairp
        note also that instead of "select * from a,b WHERE a.id=b.id" I used a JOIN
      • 2016-07-20 20218, 2016

      • alastairp
        technically in postgresql there is no difference between these two forms
      • 2016-07-20 20221, 2016

      • armalcolite
        yeah, i noticed it today.
      • 2016-07-20 20229, 2016

      • alastairp
        but again, for consistency, we should use a single form in all of our code
      • 2016-07-20 20254, 2016

      • alastairp
        because your column names are the same, you can use USING (id) instead of a separate ON listen.id=listen_json.id clause
      • 2016-07-20 20255, 2016

      • armalcolite
        though, WHERE clause seems much more intuitive. But yes, consistency is must.
      • 2016-07-20 20214, 2016

      • alastairp
        I used to write with FROM/WHERE clauses
      • 2016-07-20 20244, 2016

      • alastairp
        but when I started using different join clauses (especially LEFT JOIN), it started making more sense to me to be consistent on what what effectively the same operation
      • 2016-07-20 20255, 2016

      • alastairp
        one more thing,
      • 2016-07-20 20222, 2016

      • alastairp
        we use the sqlalchemy text() helper in acousticbrainz (you can see it in the other example I linked to)
      • 2016-07-20 20229, 2016

      • alastairp
        this means that placeholders are like :this
      • 2016-07-20 20253, 2016

      • armalcolite
        even i have used it a lot of places.
      • 2016-07-20 20258, 2016

      • alastairp
        and then you pass a dictionary as the second argument to connection.execute
      • 2016-07-20 20214, 2016

      • armalcolite
        consistency again, i have used dict as well at many places.
      • 2016-07-20 20219, 2016

      • alastairp
        please make the query a separate string: query = text("""select...""")
      • 2016-07-20 20226, 2016

      • alastairp
        and then the actual query in a separate line
      • 2016-07-20 20228, 2016

      • alastairp
        for readability
      • 2016-07-20 20249, 2016

      • alastairp
        unfortunately none of these guidelines are written down. it's something that we should do in the future
      • 2016-07-20 20257, 2016

      • Gentlecat
        or just put it into an execute call
      • 2016-07-20 20227, 2016

      • JesseW has quit
      • 2016-07-20 20234, 2016

      • armalcolite
        my lastest commit put it directly in the execute call.
      • 2016-07-20 20240, 2016

      • armalcolite
        *latest
      • 2016-07-20 20248, 2016

      • alastairp
        for multiple line queries I don't like putting them directly in the execute call
      • 2016-07-20 20206, 2016

      • armalcolite
        this is the latest formatting i did
      • 2016-07-20 20207, 2016

      • armalcolite
      • 2016-07-20 20238, 2016

      • Gentlecat
        this seems cleaner without simple variable assignments that are just used on the next line https://github.com/metabrainz/acousticbrainz-serv…
      • 2016-07-20 20230, 2016

      • Gentlecat
        armalcolite: also, it's probably better to specify rows instead of using `RETURNING *`
      • 2016-07-20 20255, 2016

      • armalcolite
        Gentlecat: yeah, i have a lot of formatting to do.
      • 2016-07-20 20217, 2016

      • alastairp
        oooh, yes :)
      • 2016-07-20 20232, 2016

      • armalcolite
        I am trying to complete the feature and documentation part.
      • 2016-07-20 20259, 2016

      • armalcolite
        then i'll just to these formatting/guideline issues.
      • 2016-07-20 20232, 2016

      • Gentlecat
        and I think it would be better if you just define functions for database access the way we currently do (without wrapper classes)
      • 2016-07-20 20235, 2016

      • armalcolite
        For the new code i write, i'll surely remember to stick to these. And i gradually improve every line i encounter.
      • 2016-07-20 20251, 2016

      • armalcolite
        fine.
      • 2016-07-20 20245, 2016

      • Gentlecat
        alastairp: I might start documenting this toay
      • 2016-07-20 20250, 2016

      • Gentlecat
        today*
      • 2016-07-20 20253, 2016

      • alastairp
        👍
      • 2016-07-20 20209, 2016

      • alastairp
        google docs? wiki?
      • 2016-07-20 20224, 2016

      • diana_olhovyk joined the channel
      • 2016-07-20 20228, 2016

      • Gentlecat
        I was thinking about having a wiki-like repo
      • 2016-07-20 20202, 2016

      • alastairp
        hmm
      • 2016-07-20 20206, 2016

      • Gentlecat
        with documents about general workflow and things specific to each language/framework we use
      • 2016-07-20 20220, 2016

      • alastairp
        we do actually have the musicbrainz wiki
      • 2016-07-20 20239, 2016

      • alastairp
        I know it's not markdown, but adding another source of info to what we use...
      • 2016-07-20 20255, 2016

      • Gentlecat
        I also like having a way to pull request and talk about changes if needed
      • 2016-07-20 20203, 2016

      • alastairp
        talk page?
      • 2016-07-20 20229, 2016

      • alastairp
        shrug. let's make a start, and see how it goes
      • 2016-07-20 20231, 2016

      • modwizcode
        https://en.wikipedia.org/wiki/HTTP_451 I didn't know about this!
      • 2016-07-20 20253, 2016

      • alastairp
        yeah, it's newish
      • 2016-07-20 20207, 2016

      • regagain joined the channel
      • 2016-07-20 20259, 2016

      • modwizcode
        I should make all my pages return that + the original content.
      • 2016-07-20 20239, 2016

      • Mineo joined the channel
      • 2016-07-20 20240, 2016

      • chirlu has quit
      • 2016-07-20 20250, 2016

      • chirlu joined the channel
      • 2016-07-20 20227, 2016

      • mihaitish has quit
      • 2016-07-20 20218, 2016

      • Leo_Verto
        hmm, did anyone else get that spam?
      • 2016-07-20 20256, 2016

      • rahulr
        bitmap: Hi! Can you provide some feedback on the refresh functionality I've just added to the dialog. Same PR.
      • 2016-07-20 20208, 2016

      • bitmap
        rahulr: sure
      • 2016-07-20 20215, 2016

      • bitmap
        good to hear that was added
      • 2016-07-20 20234, 2016

      • rahulr
        It's a bit hacky, but idk. Couldn't think of other way.
      • 2016-07-20 20256, 2016

      • bitmap
        hmm
      • 2016-07-20 20251, 2016

      • bitmap
        if the query succeeds, the refresh button acts the same as the search button, right?
      • 2016-07-20 20209, 2016

      • bitmap
        I was thinking it'd only be visible in the center of the dialog if it fails
      • 2016-07-20 20238, 2016

      • bitmap
        s/refresh/retry/ in that case, since I don't see a point in refreshing otherwise
      • 2016-07-20 20233, 2016

      • rahulr
        Yeah. Mostly it does the same thing. I'll move it to center.
      • 2016-07-20 20208, 2016

      • bitmap
        100% of my searches are timing out right now, but from the logs it looks like it's working otherwise :)
      • 2016-07-20 20210, 2016

      • MBJenkins
        Yippee, build fixed!
      • 2016-07-20 20211, 2016

      • MBJenkins
        Project acousticbrainz-server build #186: FIXED in 7 min 32 sec: https://ci.metabrainz.org/job/acousticbrainz-serv…
      • 2016-07-20 20207, 2016

      • bitmap
        and let me look at this (Syntax Help) spacing issue before I forget again
      • 2016-07-20 20221, 2016

      • alastairp
        Gentlecat: I updated https://github.com/metabrainz/acousticbrainz-serv… and will merge it now
      • 2016-07-20 20226, 2016

      • alastairp
        then start the evaluator
      • 2016-07-20 20232, 2016

      • alastairp
        results!
      • 2016-07-20 20210, 2016

      • Gentlecat
        nice
      • 2016-07-20 20203, 2016

      • alastairp
        I always ran model training in my home directory
      • 2016-07-20 20209, 2016

      • alastairp
        I guess we should set up a daemontools
      • 2016-07-20 20243, 2016

      • alastairp
        now we store intermediate data we should run it as the acousticbrainz user
      • 2016-07-20 20247, 2016

      • MBJenkins
        Project acousticbrainz-server build #187: SUCCESS in 7 min 49 sec: https://ci.metabrainz.org/job/acousticbrainz-serv…
      • 2016-07-20 20203, 2016

      • alastairp
        for now I can make a screen and run it as the acousticbrainz user. this means that only I'll be able to connect to the screen though
      • 2016-07-20 20229, 2016

      • KodeStar
        it's not mb related, but making my head hurt, does anyone have any thoughts on storing a phash or libpuzzle hash and then using postgres to calculate the hamming distance?
      • 2016-07-20 20212, 2016

      • alastairp
        Gentlecat: when was the last time we made the virtualenv for the AB user?
      • 2016-07-20 20218, 2016

      • alastairp
        it has no gaia
      • 2016-07-20 20249, 2016

      • Gentlecat
        don't remember
      • 2016-07-20 20226, 2016

      • alastairp
        there's a gaia dir in ~acousticbrainz, I'll reinstall into the ve
      • 2016-07-20 20210, 2016

      • Gentlecat
        I created a separate virtualenv for beta
      • 2016-07-20 20249, 2016

      • Gentlecat
        it's in ./acousticbrainz-beta/venv
      • 2016-07-20 20200, 2016

      • Gentlecat
        but that's irrelevant probably
      • 2016-07-20 20241, 2016

      • MBJenkins
        Project acousticbrainz-server build #188: SUCCESS in 7 min 52 sec: https://ci.metabrainz.org/job/acousticbrainz-serv…
      • 2016-07-20 20211, 2016

      • chirlu
        Leo_Verto: Which spam?
      • 2016-07-20 20259, 2016

      • Leo_Verto
        about 10 users noticing me about some channel being fascist and that I should report it
      • 2016-07-20 20214, 2016

      • alastairp
        Gentlecat: ah, right. that's fine then
      • 2016-07-20 20227, 2016

      • alastairp
        since we're working with the same database, I just ran it from the main server repository
      • 2016-07-20 20231, 2016

      • alastairp
        running!
      • 2016-07-20 20233, 2016

      • alastairp
        results!
      • 2016-07-20 20254, 2016

      • alastairp
      • 2016-07-20 20201, 2016

      • Gentlecat
      • 2016-07-20 20229, 2016

      • Gentlecat
        fassssst
      • 2016-07-20 20254, 2016

      • Gentlecat
        not like there are any actual results there yet
      • 2016-07-20 20202, 2016

      • alastairp
        the biggest reason is because they all have less than 20 items :)
      • 2016-07-20 20222, 2016

      • MBJenkins
        Project acousticbrainz-server build #189: SUCCESS in 7 min 39 sec: https://ci.metabrainz.org/job/acousticbrainz-serv…
      • 2016-07-20 20227, 2016

      • chirlu
        Leo_Verto: No, didn’t get anything like that.
      • 2016-07-20 20236, 2016

      • alastairp
      • 2016-07-20 20244, 2016

      • alastairp
        (not part of your challenge, but I told the guy to run it)
      • 2016-07-20 20202, 2016

      • MBJenkins
        Project acousticbrainz-server build #190: SUCCESS in 7 min 39 sec: https://ci.metabrainz.org/job/acousticbrainz-serv…
      • 2016-07-20 20211, 2016

      • chirlu has quit
      • 2016-07-20 20227, 2016

      • djwhitey joined the channel
      • 2016-07-20 20249, 2016

      • chirlu joined the channel
      • 2016-07-20 20246, 2016

      • MBJenkins
        Project musicbrainz-server_master build #514: SUCCESS in 20 min: https://ci.metabrainz.org/job/musicbrainz-server_…
      • 2016-07-20 20203, 2016

      • CallerNo6 has quit
      • 2016-07-20 20213, 2016

      • FergusL has quit
      • 2016-07-20 20226, 2016

      • Gentlecat
      • 2016-07-20 20244, 2016

      • RJ2 has quit
      • 2016-07-20 20204, 2016

      • RJ2 joined the channel
      • 2016-07-20 20225, 2016

      • CatQuest
        alastairp: if you need me to stop scrobbling (ie turn of the stream) for a bit, for testing. just ping me about it, it's cool) :D
      • 2016-07-20 20247, 2016

      • CatQuest
        [16:34] <armalcolite> But CatCat is not that frequent song lover.
      • 2016-07-20 20247, 2016

      • CatQuest
        I'm not??
      • 2016-07-20 20210, 2016

      • armalcolite
        CatQuest: :P
      • 2016-07-20 20229, 2016

      • CatQuest
        i basically listen 24/7
      • 2016-07-20 20217, 2016

      • armalcolite
        its mostly coincidence that whenever i used to test-scrobble you weren't listening.
      • 2016-07-20 20227, 2016

      • CatQuest
        yea. it probably was :)
      • 2016-07-20 20247, 2016

      • armalcolite
        i even used your channel in my memory-test a while ago: https://github.com/pinkeshbadjatiya/memory-leak-t…
      • 2016-07-20 20209, 2016

      • creature has quit
      • 2016-07-20 20240, 2016

      • creature joined the channel
      • 2016-07-20 20240, 2016

      • creature has quit
      • 2016-07-20 20240, 2016

      • creature joined the channel
      • 2016-07-20 20204, 2016

      • colbydray joined the channel