#musicbrainz-devel

/

      • SultS joined the channel
      • leonardo joined the channel
      • sddg joined the channel
      • sddg
        Does anyone know what song this is? http://youtu.be/7tdlNxw-19k
      • misterswag joined the channel
      • natethomas1 joined the channel
      • SultS joined the channel
      • SultS joined the channel
      • JonnyJD_ joined the channel
      • SultS joined the channel
      • JesseW_not_logge joined the channel
      • SultS joined the channel
      • JesseW_not_logge
        What is the recommended way to form an edit search URL, like: http://localhost:5000/search/edits?auto_edit_fi... ?
      • I assume I should use $c->uri_for_action, but how should I form the query parameters?
      • andreypopp joined the channel
      • ianmcorvidae
        JesseW_not_logge: I'd look at the stuff for the "refine this search" link, in that one we build it up as a hash of parameters and then pass it along
      • JesseW_not_logge
        will check.
      • can you suggest a file to look in?
      • ianmcorvidae
        Controller::User::Edits or Controller::Role::EditListing, both do that, the URL itself is then built in root/edit/list_header.tt
      • JesseW_not_logge
        thanks.
      • ianmcorvidae
        not sure what you're doing, so I don't know if the add to stash/build in the template approach is correct, but that gives you an idea
      • JesseW_not_logge
      • so I suppose I could create a new action, /edit/between/5/10 and use the approach you mentioned, but I'm not sure it's necessary...
      • ianmcorvidae
        I'd just link to the appropriate edit search, it doesn't need a new endpoint
      • JesseW_not_logge
        yes, that seems better
      • SultS joined the channel
      • Yay, I've got it working! Now to make the pull request...
      • CatCat joined the channel
      • SultS joined the channel
      • SultS joined the channel
      • SultS joined the channel
      • SultS joined the channel
      • UmkaDK joined the channel
      • Mineo
        sooo, a question for you perl guys: https://bitbucket.org/metabrainz/musicbrainz-se... seems to create a copy of the stashs pager, causing $pager->total_entries in line 185 to always be 0 (even if some release groups were loaded in line 178). is there some clever way to make pager only a reference thingie to the stashs pager or
      • nikki
        a backslash is usually used to get a reference, so \$c->stash->{pager} might work, although I'm not really sure
      • nikki tends to avoid having to worry about references
      • Mineo
        thanks
      • nikki wonders if that's thanks for responding or thanks it's worked
      • although I've noticed that an easier solution seems to be to just use the length of $release_groups
      • the former :)
      • reosarevok joined the channel
      • CallerNo6 joined the channel
      • ruaok joined the channel
      • misterswag joined the channel
      • JonnyJD_
        "\$c->stash->{pager}" and I wonder why people think perl is not a "nice language"
      • nikki
        complaining about perl not being pretty enough helps nobody
      • demonimin joined the channel
      • JonnyJD_
        yes it does. Deciding to do parts of the code not in perl (in "some future"). And last time we discussed this, I didn't see this being acknowledged as part of a problem.
      • it doesn't help anything right now, that is true, though
      • nikki
        because we should base our choices on how pretty people think the code is, sounds like a great plan
      • JonnyJD_
        This is exactly what I am talking about. You don't seem to get the difference between "pretty" and easy to read and understand
      • Sorry, but this is not at all about pretty
      • It's about doing things with as few characters/lines as possible. Which is powerful, but not very "readable"
      • nikki
        no, it's just about taking every fucking opportunity to complain about perl
      • if people don't like perl, they're welcome to rewrite all of mb for us
      • JonnyJD_
        this is not about rewriting all of mb. This is about taking chances to change language when parts are rewritten
      • nikki
        which we're already doing.
      • JonnyJD_
        fine then ;-)
      • reosarevok doesn't really understand all the perl hatred. If I can mostly understand what I'm doing, it can't be that hard
      • Leftmost
        I have some issues with Perl and wouldn't mind seeing MB in another language, but it wasn't a particularly constructive comment.
      • JonnyJD_
        noted. Seeing that construct really ticked me off, but I didn't expect that this again would tick nikki off like that
      • nikki
        I'm just sick of seeing people complain about perl every chance they get, just because they can
      • Leftmost has a love-hate relationship with it.
      • JonnyJD_
        Yes.. I try to stop that.
      • Something completely different: if Olivier Kaloudoff is online or known here: kalou.net seems to be offline and with it the metaflac Picard plugin. I can host it on one of my servers, but possible this is just a temporary problem (reported for 2 days now)
      • SultS joined the channel
      • JesseW_not_logge joined the channel
      • CallerNo6 reads http://onlyjob.blogspot.com/2011/03/perl5-python-ruby-php-c-c-lua-tcl.html
      • CallerNo6
        haha. "OK, if Java not optimised for strings, please let me know what exactly Java is optimised for."
      • JonnyJD_
        Didn't we want to stop language bashing for today?
      • CallerNo6
        of course. I thought it was funny that the author(s) couldn't help him/her/themselves.
      • Of course, that's a three year old page. I wonder if the performance stats are still true-ish.
      • JonnyJD_
        I can only talk for python (again): the benchmark uses "+" for strings. Which is fine if you use it once or twice, but not for a benchmark (join() is faster and making an array and joining the elements is even more faster and so on...)
      • faster as in "more than 10 times faster", not "you save 1%"
      • CallerNo6
        was that true in 2.5? maybe the stats were /never/ very truthy.
      • JonnyJD_
        well, what benchmark is..
      • CallerNo6
        lesson learned :-)
      • JonnyJD_
      • MightyJay joined the channel
      • I tested that some time ago for server software I wrote. It was different for recent Python, but I could still make things considerably faster
      • CallerNo6 was just looking at that. 2004
      • ijabz joined the channel
      • ijabz
        I think what is making that Java test so slow is that it has to compile the regular expression each invocation of the loop
      • what you should do is compile it once and reuse, http://docs.oracle.com/javase/7/docs/api/java/l...
      • Also I dont know perl but when it does replace doesnt it just call a c library to do that, so its not really testing perl
      • We have perfect right to moan about perl because weve been told for so long that perl is up to the job, when it clearly is not
      • Its not even a programming langage really, from wikipedia 'as a general-purpose Unix scripting language to make report processing easier'
      • xlotlu
        yawn
      • Cliff` joined the channel
      • reosarevok joined the channel
      • derwin
        [citation needed]
      • having seen perl run gigantic applications at scale
      • I disbelieve that perl is not "up to the job"
      • alastairp joined the channel
      • murdos joined the channel
      • Cliff` joined the channel
      • JesseW_not_logge
        I want to switch between three different messages depending on whether a variable is 0, 1 or more. Should I use nested ?: , given/when, or something else?
      • UmkaDK joined the channel
      • and updated my pull request for mbs-3346: https://bitbucket.org/metabrainz/musicbrainz-se...
      • ijabz joined the channel
      • misterswag joined the channel
      • uk joined the channel
      • sv2241 joined the channel
      • andreypopp joined the channel
      • ocharles joined the channel
      • JesseW_not_logge joined the channel
      • and updated again with ianmcorvidae's suggestion of us ln(). Thanks!