!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
2010-04-01 09132, 2010
navap
Advice please!
2010-04-01 09139, 2010
jdamcd joined the channel
2010-04-01 09147, 2010
ruaok joined the channel
2010-04-01 09135, 2010
anthonynonso joined the channel
2010-04-01 09141, 2010
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)
2010-04-01 09134, 2010
navap
Yeah, and short names end up with excess space on the left :/
2010-04-01 09119, 2010
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
2010-04-01 09120, 2010
xiainx joined the channel
2010-04-01 09158, 2010
xiainx
Hi all, trying to submit my application, does anyone have any ideas as to how to submit code samples?
2010-04-01 09104, 2010
xiainx
Should I just copy/paste them right into the editor?
2010-04-01 09104, 2010
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.
2010-04-01 09101, 2010
xiainx
it's just local
2010-04-01 09105, 2010
xiainx
hmmm
2010-04-01 09116, 2010
xiainx
I could upload it to my webpage and link, that's probably easiest
aCiD2`: I'm messing with MOD_SET_RELEASE_DURATIONS
2010-04-01 09158, 2010
navap
warp: Thanks for the seconding by the way :)
2010-04-01 09132, 2010
warp
aCiD2`: the old edit has a cdtoc id, can I just use the same id in the new edit?
2010-04-01 09156, 2010
aCiD2`
"INSERT INTO cdtoc SELECT * FROM public.cdtoc;" says yes :)
2010-04-01 09122, 2010
warp
good :)
2010-04-01 09105, 2010
warp
How does foreign_keys work for that?
2010-04-01 09149, 2010
aCiD2`
you want to load a CDTOC object?
2010-04-01 09128, 2010
warp
yes
2010-04-01 09134, 2010
aCiD2`
Well, Data::CDTOC extends Data::Entity, which means it should have get_by_ids. So CDTOC => [ $self->data->{cdtoc_id} ] should work
2010-04-01 09154, 2010
warp
I made it cdtoc_ids, something was complaining about it not being an ArrayRef with just an Int in data.
2010-04-01 09121, 2010
aCiD2`
well, 5 is not the same as [ 5 ]
2010-04-01 09159, 2010
aCiD2`
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
2010-04-01 09159, 2010
warp
I know :)
2010-04-01 09118, 2010
warp
anyway, for now I just do cdtoc_ids => [ $cdtoc ], in upgrade which MooseX::Types::Structured is happy with.
2010-04-01 09127, 2010
aCiD2`
You could do ArrayRef[Int] | Int, but that's just setting yourself up for more headaches
2010-04-01 09128, 2010
warp
ah, wee. I get the actual discid visible in the template now.
ok, now that I got it running I understood enough of it to turn that ArrayRef[Int] back into a regular Int
2010-04-01 09153, 2010
warp
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.
2010-04-01 09156, 2010
aCiD2`
bah, no worries
2010-04-01 09106, 2010
xiainx joined the channel
2010-04-01 09111, 2010
aCiD2`
yay for doing 4 hours work in 10 minutes
2010-04-01 09126, 2010
warp
:)
2010-04-01 09105, 2010
aCiD2`
warp: are you happy with your icu extension?
2010-04-01 09158, 2010
aCiD2`
Also, mbs-136 is about sorting on the website, but your review doesn't actually change any of the Perl code
2010-04-01 09134, 2010
xiainx joined the channel
2010-04-01 09134, 2010
warp
r/612 is the first step for MBS-136. It's not enough to close the ticket, no.
2010-04-01 09106, 2010
xiainx joined the channel
2010-04-01 09127, 2010
warp
aCiD2`: hm, I don't supposed the range operator (..) can step?
2010-04-01 09136, 2010
warp
s/ed/e/
2010-04-01 09134, 2010
xiainx joined the channel
2010-04-01 09151, 2010
aCiD2`
warp: I don't think so
2010-04-01 09101, 2010
aCiD2`
/achieve? :)
2010-04-01 09149, 2010
warp
achieve?
2010-04-01 09124, 2010
warp fights with MooseX::Types::Structured some more.
2010-04-01 09122, 2010
aCiD2`
i meant what are you trying to achieve
2010-04-01 09157, 2010
warp
I have a list of (id, name, id, name, ...) values, and want to pair them up into a list of hashes
2010-04-01 09135, 2010
warp
map { { id => $foo[$_], name => $foo[$_+1] } } grep { $_ % 2 } (0..$#foo)
2010-04-01 09122, 2010
aCiD2`
so you want (5 'name' 6 'othername') to be.. [{ 5 => 'name' }, { 6 => 'othername' }] ?
2010-04-01 09153, 2010
rafl
use List::AllUtils qw(natatime);
2010-04-01 09113, 2010
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))
2010-04-01 09147, 2010
rafl
no, zip zips two sides of something together into one list
2010-04-01 09103, 2010
rafl
you could zip @ids, @names to get the kind of list warp already has
2010-04-01 09157, 2010
aCiD2`
oh, I get the list now
2010-04-01 09102, 2010
aCiD2`
then yea, natatime :)
2010-04-01 09146, 2010
rafl tries to remember why that patch adding it to M::Autobox isn't merged yet
2010-04-01 09108, 2010
aCiD2`
rafl: do you think autobox is worth the syntax weirdness it causes?
2010-04-01 09141, 2010
aCiD2`
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
2010-04-01 09144, 2010
rafl
well, given that the syntax weirdness it causes is round about exactly zero.. yeah :)
2010-04-01 09100, 2010
aCiD2`
then I considered PerlX::MethodCallWithBlock, but I don't trust that with my children
2010-04-01 09147, 2010
rafl
combine it with lambda or Function::Parameters or something
2010-04-01 09120, 2010
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 :)
2010-04-01 09148, 2010
rafl
i believe @list->map(f ($x) { $x ** $x }) to be rather pretty
2010-04-01 09157, 2010
jensl joined the channel
2010-04-01 09106, 2010
aCiD2`
ahh, Function::Parameters is what provides f
2010-04-01 09106, 2010
jensl
hey all
2010-04-01 09116, 2010
aCiD2`
i was wondering wtf that was in the last snippet I read a few days ago
2010-04-01 09137, 2010
aCiD2`
yes, I do this with Function::Parameters, that's quite a bit more readable than: @list->map(sub { my $x = shift; $x ** $x })
2010-04-01 09138, 2010
rafl
well, it provides 'fun' or something, but i changed it to be whatever you like at import time
2010-04-01 09120, 2010
rafl
well, you still have $_, so it could be ->map(sub { $_ ** $_ }) as well
2010-04-01 09146, 2010
aCiD2`
I've got quite a distate for $_ after using it too much
2010-04-01 09154, 2010
jensl
which IDE can you suggest for perl development?
2010-04-01 09100, 2010
aCiD2`
jensl: emacs :)
2010-04-01 09104, 2010
aCiD2`
that's what me and warp use
2010-04-01 09114, 2010
rafl
weirdos
2010-04-01 09123, 2010
aCiD2` bets rafl is one of those hippy vim users
2010-04-01 09134, 2010
jensl
acid2: i knew this is coming up :)
2010-04-01 09140, 2010
rafl
right on
2010-04-01 09142, 2010
jensl
ok fine then i stick to emacs :)
2010-04-01 09116, 2010
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
2010-04-01 09124, 2010
rafl
MethodSignatures is a whole other thing
2010-04-01 09129, 2010
aCiD2`
jensl: I have some customizations you might want that make perl coding a bit nicer
2010-04-01 09136, 2010
rafl
it really depends on which one you're refering to
2010-04-01 09144, 2010
rafl
Method::Signatures - do not use - ever
2010-04-01 09149, 2010
jensl
acid2: would be great
2010-04-01 09150, 2010
aCiD2`
rafl: I've considered MX::MS and M::S::Simple
2010-04-01 09114, 2010
aCiD2`
I figured if we're using Moose we might as well go with MX::M::S
2010-04-01 09128, 2010
aCiD2`
(for the extra validation we'd get)
2010-04-01 09134, 2010
rafl
MooseX::Method::Signatures - use if you want to reduce the code you write greatly, in exchange for lots of slow validation
2010-04-01 09109, 2010
aCiD2`
I might wait until we launch NGS and see how much space we have to slow it down
2010-04-01 09110, 2010
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