#musicbrainz-devel

/

      • Leftmost
        I'm not really sure what the purpose of load_subscription() is in lib/MusicBrainz/Script/SubscriptionEmails.pm. Can anyone lend any insight?
      • 2013-02-01 03225, 2013

      • warp
        Leftmost: if you look in Entity::ArtistSubscription, you'll see it has an artist_id and an artist property.
      • 2013-02-01 03254, 2013

      • Leftmost
        So it takes the ID and fills in the artist object?
      • 2013-02-01 03255, 2013

      • warp
        Leftmost: $self->c->model('Artist')->load($subscription) in this case will take that artist_id, load the data from the database and assign it to artist.
      • 2013-02-01 03207, 2013

      • warp
        yes, something like that.
      • 2013-02-01 03245, 2013

      • warp
        c->model('Artist')->load refers to the load() method of MusicBrainz::Server::Data::Artist
      • 2013-02-01 03237, 2013

      • Leftmost
        Yeah, I was looking at that too. I just wasn't sure I understood what load_subobjects() was doing and whether that would work for collections, since collections have no similar load() function.
      • 2013-02-01 03219, 2013

      • warp
        I don't think there is currently any entity with a collection_id or something like that, so having a ->load would be a bit pointless.
      • 2013-02-01 03255, 2013

      • Leftmost
        warp, I'm implementing collection subscriptions.
      • 2013-02-01 03229, 2013

      • warp
        ok, so you've created CollectionSubscription.pm ?
      • 2013-02-01 03237, 2013

      • Leftmost
        Yeah.
      • 2013-02-01 03245, 2013

      • warp
        then you probably get to be the one to implement a ->load on Data::Collection as well :)
      • 2013-02-01 03209, 2013

      • Leftmost
        Yep. :)
      • 2013-02-01 03229, 2013

      • Leftmost
        Would load_subobjects() work on Collection since it's a CoreEntity?
      • 2013-02-01 03216, 2013

      • warp
        I don't know, I haven't really touched those parts of the code much.
      • 2013-02-01 03245, 2013

      • Leftmost
        ocharles, any idea?
      • 2013-02-01 03232, 2013

      • reosarevok joined the channel
      • 2013-02-01 03259, 2013

      • reosarevok
        heh
      • 2013-02-01 03206, 2013

      • reosarevok
      • 2013-02-01 03203, 2013

      • nikki joined the channel
      • 2013-02-01 03216, 2013

      • Leftmost
        What the heck do you use an Excel file with every MB song for? What can open that without exploding?
      • 2013-02-01 03224, 2013

      • warp
        let's implement a webservice for it so someone can click save as on a link to http://musicbrainz.org/ws/all_the_things.xls
      • 2013-02-01 03240, 2013

      • ocharles
        Leftmost: I can look in a bit
      • 2013-02-01 03245, 2013

      • luks
        heh, it has 17 bids
      • 2013-02-01 03254, 2013

      • Leftmost
        Alright, thanks.
      • 2013-02-01 03249, 2013

      • nikki joined the channel
      • 2013-02-01 03202, 2013

      • warp
        Excel 2007 has maximum of 1,048,576 rows, afaics this hasn't changed in Excel 2010 or Excel 2013.
      • 2013-02-01 03239, 2013

      • reosarevok
        warp: apparently nobody told 17 people! :p
      • 2013-02-01 03243, 2013

      • Leftmost
        We only have 13,200,110 rows in track. :-P
      • 2013-02-01 03208, 2013

      • warp
        I was looking at recording, which is still about 12,000,000
      • 2013-02-01 03257, 2013

      • reosarevok
        I like how one tag is "data entry"
      • 2013-02-01 03207, 2013

      • reosarevok
        :p
      • 2013-02-01 03222, 2013

      • warp
        for about $50
      • 2013-02-01 03216, 2013

      • Leftmost
        I would guess that the rate of track creation would exceed the ability of anyone to enter tracks.
      • 2013-02-01 03258, 2013

      • reosarevok
        Leftmost, you killjoy
      • 2013-02-01 03200, 2013

      • reosarevok
        :p
      • 2013-02-01 03245, 2013

      • Leftmost
        That's what I'm here for.
      • 2013-02-01 03227, 2013

      • djce joined the channel
      • 2013-02-01 03226, 2013

      • alastairp
        reosarevok: man, I'm so tempted :-P
      • 2013-02-01 03209, 2013

      • ocharles
        aw yeahhhh
      • 2013-02-01 03214, 2013

      • ocharles
        musicbrainz-data-service can create relationships
      • 2013-02-01 03221, 2013

      • Freso
        ocharles: :)
      • 2013-02-01 03225, 2013

      • ocharles gets a cup of tea and gets back to Leftmost
      • 2013-02-01 03238, 2013

      • Freso
        In Soviet Russia, relationships can create musicbrainz-data-service.
      • 2013-02-01 03203, 2013

      • Freso
        Beat that, ocharles.
      • 2013-02-01 03216, 2013

      • ocharles
        In Soviet Lambda, Haskell creates everything.
      • 2013-02-01 03201, 2013

      • Leftmost sips mead.
      • 2013-02-01 03208, 2013

      • reosarevok
        at the beginning was the monad?
      • 2013-02-01 03210, 2013

      • derr84 joined the channel
      • 2013-02-01 03222, 2013

      • Freso
        warp: Is there a reason you haven't assigned you to http://tickets.musicbrainz.org/browse/MBS-5801 ?
      • 2013-02-01 03238, 2013

      • Freso
        warp: I do I just need to poke you more about it?
      • 2013-02-01 03207, 2013

      • ocharles
        ok Leftmost, what are you trying to do?
      • 2013-02-01 03240, 2013

      • Freso
        That's a grand question, dude.
      • 2013-02-01 03209, 2013

      • voiceinsideyou joined the channel
      • 2013-02-01 03227, 2013

      • Leftmost
        I've created a CollectionSubscription class and I'm trying to load the collection corresponding to a CollectionSubscription's ID attribute.
      • 2013-02-01 03231, 2013

      • Leftmost
        I tried copypastaing the MusicBrainz::Server::Data::Artist load() method over to Collection, but right now it's telling me that validation failed for 'Collection'.
      • 2013-02-01 03258, 2013

      • reosarevok
        Go go go developing-through-copypasting!
      • 2013-02-01 03205, 2013

      • MBJenkins
        Oliver Charles: Add support for submitting relationship trees
      • 2013-02-01 03220, 2013

      • reosarevok
        (not sarcastic or anything :) )
      • 2013-02-01 03255, 2013

      • Leftmost
        Admittedly, I don't really understand how load_subobjects() works.
      • 2013-02-01 03253, 2013

      • ocharles
        Why do you think you need to load the collection, out of interest?
      • 2013-02-01 03256, 2013

      • ocharles
        Also, paste code
      • 2013-02-01 03224, 2013

      • Leftmost
        To get the collection name for subscription emails.
      • 2013-02-01 03250, 2013

      • ocharles
        Ok, on wards to the pasting :)
      • 2013-02-01 03254, 2013

      • ocharles
        onwards...
      • 2013-02-01 03254, 2013

      • Leftmost
      • 2013-02-01 03204, 2013

      • Leftmost
        If there's anything that's unclear or you need more context, let me know.
      • 2013-02-01 03246, 2013

      • ocharles
        Hm
      • 2013-02-01 03252, 2013

      • ocharles
        you've got isa => 'Collection'
      • 2013-02-01 03200, 2013

      • ocharles
        have you actually defined what it means to be isa => 'Collection'?
      • 2013-02-01 03231, 2013

      • ocharles
        MusicBrainz::Server::Entity::Types defines that, and you should `use` that module in Entity::Collection
      • 2013-02-01 03240, 2013

      • ocharles
        I think that's your problem
      • 2013-02-01 03221, 2013

      • Leftmost
        Ahh, okay. I'll give that a try.
      • 2013-02-01 03235, 2013

      • Leftmost
        Looks like Entity::Collection pulls it in, but nothing collection-related is defined in there.
      • 2013-02-01 03240, 2013

      • Leftmost
        That might have done the trick. Let's see if I get an email.
      • 2013-02-01 03226, 2013

      • nikki
      • 2013-02-01 03242, 2013

      • MBJenkins
        * Oliver Charles: Add a 'ResolveReference' instance for 'RelationshipType'; drop relationship_type in favour of exiting link_type table
      • 2013-02-01 03243, 2013

      • MBJenkins
        * Oliver Charles: Export 'viewRelationships' from 'MusicBrainz.Data'
      • 2013-02-01 03246, 2013

      • nikki
        ocharles: http://tickets.musicbrainz.org/browse/OTHER-129 (guessing it probably should be reported on github instead?)
      • 2013-02-01 03254, 2013

      • Leftmost
        Woo!
      • 2013-02-01 03258, 2013

      • Leftmost
        ocharles, thanks for your help.
      • 2013-02-01 03220, 2013

      • ocharles
        yay!
      • 2013-02-01 03239, 2013

      • Leftmost
        Now all I need is the ability to display edits for a collection and the ability to create subscriptions and we're good to go. :-P
      • 2013-02-01 03247, 2013

      • ocharles
        nikki: Yea
      • 2013-02-01 03243, 2013

      • reosarevok
        Leftmost: so you already get mails if someone does what to a collection, add/remove releases?
      • 2013-02-01 03257, 2013

      • Leftmost
        reosarevok, modify releases in the collection.
      • 2013-02-01 03213, 2013

      • reosarevok
        Oh, you already get that much? :)
      • 2013-02-01 03217, 2013

      • reosarevok
        Sweet
      • 2013-02-01 03225, 2013

      • Leftmost
        My impression of the previous discussion was that receiving notifications on adding/removing releases wasn't a hot feature right now.
      • 2013-02-01 03247, 2013

      • reosarevok
        Yeah, agreed - that'd be more useful for collaborative collections that we don't yet have
      • 2013-02-01 03209, 2013

      • Leftmost
        Yeah. It's also harder to implement, since subscriptions currently revolve around edits.
      • 2013-02-01 03240, 2013

      • reosarevok
        heh, ok
      • 2013-02-01 03253, 2013

      • reosarevok
        I thought it would be easier, but yeah, guess there's no code to copy for that :)
      • 2013-02-01 03252, 2013

      • djce joined the channel
      • 2013-02-01 03235, 2013

      • djce joined the channel
      • 2013-02-01 03257, 2013

      • adhawkins
        Anyone know what ruaok wanted me for yesterday evening?
      • 2013-02-01 03210, 2013

      • adhawkins
        Was it to do with the WS meeting?
      • 2013-02-01 03238, 2013

      • Freso
        adhawkins: I think so.
      • 2013-02-01 03257, 2013

      • adhawkins
        Oh ok. I guess I'm a bit late then :)
      • 2013-02-01 03219, 2013

      • Freso
        Somewhat, yes. :)
      • 2013-02-01 03234, 2013

      • ocharles
        yea, it was for what we ended up blogging about
      • 2013-02-01 03203, 2013

      • adhawkins
        Ok, I'll read the blog entry./
      • 2013-02-01 03214, 2013

      • adhawkins
        I don't think that woudl break my usage (flactag).
      • 2013-02-01 03229, 2013

      • adhawkins
        The lib just parses and packages up whatever is returned in the XML, so shouldn't affect the lib either.
      • 2013-02-01 03257, 2013

      • adhawkins
        One of the things on my todo list is to optimise flactag. I think it's making more queries than is strictly necessary. And each query might be asking for data that it doesn't use.
      • 2013-02-01 03202, 2013

      • ocharles
        seeing as we don't show elements that are empty, it shouldn't break any libraries
      • 2013-02-01 03209, 2013

      • ocharles
        cause you can't really assume the presence of elements
      • 2013-02-01 03258, 2013

      • adhawkins
        Yep
      • 2013-02-01 03235, 2013

      • andreypopp joined the channel
      • 2013-02-01 03220, 2013

      • Leftmost
        I don't totally understand the structure of classes and I'm not sure how much of it is Moosey. If a package has `with WhateverRole', can I take one of the methods from the role, override it to do an auth check, and just call the parent method?
      • 2013-02-01 03242, 2013

      • nikki
      • 2013-02-01 03211, 2013

      • warp
        nikki: yes. we don't have a process for merging stuff into beta for people who don't have commit access, and github makes it hard to see shippits.
      • 2013-02-01 03217, 2013

      • warp
        nikki: I'll do that one now.
      • 2013-02-01 03244, 2013

      • djce joined the channel
      • 2013-02-01 03247, 2013

      • Freso
        warp: Do 10 too? :)
      • 2013-02-01 03230, 2013

      • warp
        ok
      • 2013-02-01 03249, 2013

      • voiceinsideyou joined the channel
      • 2013-02-01 03238, 2013

      • Freso
        It was the first pull request after the decision to change to GH PRs for now, and possibly the simplest one to date as well... yet it hasn't gotten merged yet. We really need a better way to see shipit-ready PRs. :)
      • 2013-02-01 03224, 2013

      • warp
        Freso: I had this https://frob.nl/tmp/github.shipits.hack.png , but the serverside bits don't work very well.
      • 2013-02-01 03241, 2013

      • warp
        ok, 11 and 10 merged and pushed to beta.musicbrainz.org
      • 2013-02-01 03245, 2013

      • nikki
        thanks
      • 2013-02-01 03257, 2013

      • Freso
        \o/
      • 2013-02-01 03223, 2013

      • warp
        I do really like that github auto-closes those even if I didn't merge them through their interface.
      • 2013-02-01 03206, 2013

      • Freso
        I also like that GitHub allows to easily rm branches that have been merged.
      • 2013-02-01 03209, 2013

      • ocharles
        Starting from Perl 5.10.1 (well, 5.10.0, but it didn't work right), you can say
      • 2013-02-01 03210, 2013

      • ocharles
        use feature "switch";
      • 2013-02-01 03215, 2013

      • ocharles
        that's my documentation find of the day
      • 2013-02-01 03222, 2013

      • Freso
        ocharles: \o/
      • 2013-02-01 03231, 2013

      • warp
        I've read that.
      • 2013-02-01 03247, 2013

      • ocharles
        (I had set use 5.10.0 at the top of my file and it wasn't working)
      • 2013-02-01 03255, 2013

      • warp
        oh, haha
      • 2013-02-01 03226, 2013

      • ocharles
        Writing Perl these days feels like i'm programming under an army instructor who's constantly trying to make me quit and give up
      • 2013-02-01 03227, 2013

      • Freso
        ocharles: DROP AND GIVE ME 20!
      • 2013-02-01 03212, 2013

      • ocharles cries
      • 2013-02-01 03250, 2013

      • Leftmost
        ocharles, I'm feeling a bit like that too.
      • 2013-02-01 03259, 2013

      • nikki
        warp: did you set the tickets to in beta testing?
      • 2013-02-01 03235, 2013

      • Freso
        Ugh. I'm not sure I added a link to the ticket for my PR, come to think of it. D:
      • 2013-02-01 03239, 2013

      • Freso is bad peeps
      • 2013-02-01 03207, 2013

      • Freso
        Oh, no, I did!
      • 2013-02-01 03211, 2013

      • Freso is good peeps :D
      • 2013-02-01 03246, 2013

      • Leftmost
        ocharles, if I have "with 'MusicBrainz::Server::Controller::Account::SubscriptionsRole';", can I take the add method, override it in the class, and call the SubscriptionsRole version?
      • 2013-02-01 03217, 2013

      • ocharles
        http://i.imgur.com/GhJgjHF.png \o/ a work URL relationship in NES
      • 2013-02-01 03223, 2013

      • reosarevok
        http://forums.musicbrainz.org/viewtopic.php?pid=2… you clever people, someone help this guy with his dbdefs?
      • 2013-02-01 03227, 2013

      • Leftmost
        Woo!
      • 2013-02-01 03257, 2013

      • kepstin-work joined the channel
      • 2013-02-01 03209, 2013

      • ocharles
        Leftmost: i don't quite get what you mean by 'take' and the 'override in the class'
      • 2013-02-01 03228, 2013

      • Leftmost
        Sorry, not communicating well today.
      • 2013-02-01 03255, 2013

      • Leftmost
        So SubscriptionsRole has an add() method for /account/subscriptions/${whatever}/add. I have a class that implements SubscriptionsRole, but I want to have add() do a check to make sure the person can subscribe to the collection, then call the add() from SubscriptionsRole.
      • 2013-02-01 03214, 2013

      • Freso
        Leftmost: If nothing else, couldn't you do something like ```sub _parent_add { MusicBrainz::Server::Controller::Account::SubscriptionsRole::add }``` and then call self._parent_add ?
      • 2013-02-01 03224, 2013

      • Freso
        (In the add function.)