#musicbrainz-devel

/

      • navap
        !Help I'm debating whether or not to convert the vote display from a table into a dl, but the one thing that's stopping me is that if I don't use a table the name column get's all screwy with different width names :( http://xabbu.net/mb/edit15.png
      • Advice please!
      • jdamcd joined the channel
      • ruaok joined the channel
      • anthonynonso joined the channel
      • nikki
        navap: you could set the width of the left part of the dl (although I'm not sure what would happen with a name longer than the width)
      • navap
        Yeah, and short names end up with excess space on the left :/
      • nikki
        I would probably just leave it as a table, it has rows and columns so it seems enough like tabular data to me :P
      • xiainx joined the channel
      • xiainx
        Hi all, trying to submit my application, does anyone have any ideas as to how to submit code samples?
      • Should I just copy/paste them right into the editor?
      • navap
        Is the code available elsewhere online? It might be better if you were able to provide a link to a CVS of some kind.
      • xiainx
        it's just local
      • hmmm
      • I could upload it to my webpage and link, that's probably easiest
      • alastairp
        or put them on pastebin/gist
      • and link to that
      • pronik`` joined the channel
      • xiainx joined the channel
      • xiainx joined the channel
      • ijabz joined the channel
      • Leftmost joined the channel
      • Leftmost joined the channel
      • xiainx joined the channel
      • xiainx joined the channel
      • xiainx joined the channel
      • xiainx joined the channel
      • xiainx joined the channel
      • philip6137 joined the channel
      • aCiD2` joined the channel
      • aCiD2`
        Ahh, the elusive haircut actually happens today
      • alastairp
        or so it thinks
      • aCiD2`
        nope, mom booked it! no going back now
      • alastairp
        hahaha
      • it must be getting /really/ bad...
      • aCiD2`
        it's over 5 weeks overdue
      • it's bad :P
      • djce joined the channel
      • xiainx joined the channel
      • xiainx joined the channel
      • ijabz joined the channel
      • xiainx joined the channel
      • xiainx joined the channel
      • xiainx joined the channel
      • xiainx joined the channel
      • xiainx joined the channel
      • navap
        aCiD2`: So will you merge in http://codereview.musicbrainz.org/r/636 please?
      • warp
        hello!
      • navap
        TOD!
      • warp pokes aCiD2` too.
      • aCiD2`
        hi warp
      • warp
        hello! :)
      • aCiD2`
        navap: yea, will do it shortly
      • warp
        aCiD2`: I'm messing with MOD_SET_RELEASE_DURATIONS
      • navap
        warp: Thanks for the seconding by the way :)
      • warp
        aCiD2`: the old edit has a cdtoc id, can I just use the same id in the new edit?
      • aCiD2`
        "INSERT INTO cdtoc SELECT * FROM public.cdtoc;" says yes :)
      • warp
        good :)
      • How does foreign_keys work for that?
      • aCiD2`
        you want to load a CDTOC object?
      • warp
        yes
      • aCiD2`
        Well, Data::CDTOC extends Data::Entity, which means it should have get_by_ids. So CDTOC => [ $self->data->{cdtoc_id} ] should work
      • warp
        I made it cdtoc_ids, something was complaining about it not being an ArrayRef with just an Int in data.
      • aCiD2`
        well, 5 is not the same as [ 5 ]
      • I really need to patch MooseX::Types::Structured to actually give half useful output. Truncating the "actual value" that's displayed is useless, and it's impossible to see which field actually failed to validate
      • warp
        I know :)
      • anyway, for now I just do cdtoc_ids => [ $cdtoc ], in upgrade which MooseX::Types::Structured is happy with.
      • aCiD2`
        You could do ArrayRef[Int] | Int, but that's just setting yourself up for more headaches
      • warp
        ah, wee. I get the actual discid visible in the template now.
      • aCiD2`
        http://en.wikipedia.org/wiki/Main_Page bwahahah, nice news today :D
      • nikki
        I like the last one
      • xiainx joined the channel
      • aCiD2`
        :)
      • warp
        ok, now that I got it running I understood enough of it to turn that ArrayRef[Int] back into a regular Int
      • aCiD2`: oh, I didn't create a test for EditTrackLength yet. Your example ( t/edit-migration/edit-release-name.t ) uses Test::Mock::Context which I still cannot install.
      • aCiD2`
        bah, no worries
      • xiainx joined the channel
      • yay for doing 4 hours work in 10 minutes
      • warp
        :)
      • aCiD2`
        warp: are you happy with your icu extension?
      • Also, mbs-136 is about sorting on the website, but your review doesn't actually change any of the Perl code
      • xiainx joined the channel
      • warp
        r/612 is the first step for MBS-136. It's not enough to close the ticket, no.
      • xiainx joined the channel
      • aCiD2`: hm, I don't supposed the range operator (..) can step?
      • s/ed/e/
      • xiainx joined the channel
      • aCiD2`
        warp: I don't think so
      • /achieve? :)
      • warp
        achieve?
      • warp fights with MooseX::Types::Structured some more.
      • aCiD2`
        i meant what are you trying to achieve
      • warp
        I have a list of (id, name, id, name, ...) values, and want to pair them up into a list of hashes
      • map { { id => $foo[$_], name => $foo[$_+1] } } grep { $_ % 2 } (0..$#foo)
      • aCiD2`
        so you want (5 'name' 6 'othername') to be.. [{ 5 => 'name' }, { 6 => 'othername' }] ?
      • rafl
        use List::AllUtils qw(natatime);
      • aCiD2`
        I was thinking use List::MoreUtils 'zip' because it sounds like you have a list of ids (the range) and a list of names, and want ((id name) (id name))
      • rafl
        no, zip zips two sides of something together into one list
      • you could zip @ids, @names to get the kind of list warp already has
      • aCiD2`
        oh, I get the list now
      • then yea, natatime :)
      • rafl tries to remember why that patch adding it to M::Autobox isn't merged yet
      • rafl: do you think autobox is worth the syntax weirdness it causes?
      • I had a play yesterday bringing it in for some list processing heavy stuff... and just thought the whole $whatever->map(sub { }) was too different from map { } @$whatever
      • rafl
        well, given that the syntax weirdness it causes is round about exactly zero.. yeah :)
      • aCiD2`
        then I considered PerlX::MethodCallWithBlock, but I don't trust that with my children
      • rafl
        combine it with lambda or Function::Parameters or something
      • aCiD2`
        I've been considering new code to use MooseX::Types, MethodSignatures and Autobox, but I can't convince myself to use Autobox, MethodSignatures scares me with the whole slow down stuff - and Types we are half using and I have no problem with :)
      • rafl
        i believe @list->map(f ($x) { $x ** $x }) to be rather pretty
      • jensl joined the channel
      • aCiD2`
        ahh, Function::Parameters is what provides f
      • jensl
        hey all
      • aCiD2`
        i was wondering wtf that was in the last snippet I read a few days ago
      • yes, I do this with Function::Parameters, that's quite a bit more readable than: @list->map(sub { my $x = shift; $x ** $x })
      • rafl
        well, it provides 'fun' or something, but i changed it to be whatever you like at import time
      • well, you still have $_, so it could be ->map(sub { $_ ** $_ }) as well
      • aCiD2`
        I've got quite a distate for $_ after using it too much
      • jensl
        which IDE can you suggest for perl development?
      • aCiD2`
        jensl: emacs :)
      • that's what me and warp use
      • rafl
        weirdos
      • aCiD2` bets rafl is one of those hippy vim users
      • jensl
        acid2: i knew this is coming up :)
      • rafl
        right on
      • jensl
        ok fine then i stick to emacs :)
      • rafl
        anyway.. i don't even have to think about using autobox or not anymore. it's a lovely module with basically no drawbacks that you don't already have by using moose
      • MethodSignatures is a whole other thing
      • aCiD2`
        jensl: I have some customizations you might want that make perl coding a bit nicer
      • rafl
        it really depends on which one you're refering to
      • Method::Signatures - do not use - ever
      • jensl
        acid2: would be great
      • aCiD2`
        rafl: I've considered MX::MS and M::S::Simple
      • I figured if we're using Moose we might as well go with MX::M::S
      • (for the extra validation we'd get)
      • rafl
        MooseX::Method::Signatures - use if you want to reduce the code you write greatly, in exchange for lots of slow validation
      • aCiD2`
        I might wait until we launch NGS and see how much space we have to slow it down
      • rafl
        Method::Signatures::Simple - just use it dammit. it makes you write a little less code, which will be easier to read, and has about zero drawbacks
      • aCiD2`
        hah
      • ok, that's good to hear then
      • jensl: http://gist.github.com/351889 that's most of the stuff I couldn't live without
      • jensl
        acid2: thanks
      • aCiD2`
        http://search.cpan.org/~ewilhelm/lambda-v0.0.1/... you have got to be fucking kidding me.
      • Um warp, are you working on MOD_REMOVE_RELEASES?
      • because... I've already done that :(
      • rafl
        aCiD2`: hardly rocket science
      • (lambda)
      • getting Devel::declare to work together with utf8.pm might be, so we could make Function::Parameters register that nice symbol for us as well :)
      • aCiD2`
        rafl: i meant that in a bad way, not a good way
      • warp
        aCiD2`: hey, it wasn't in progress on jira
      • aCiD2`
        yea, it seems to be the only one that /didn't/ have a time clocked for it