Camelia, the Perl 6 bug

IRC log for #mojo, 2011-02-27

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:06 DaTa j-v-e: as many as you wan't if i read the code correctly :)
00:08 j-v-e DaTa: so 2 by default and you can create your own ones afterward ?
00:18 sri only development has special meaning
00:18 sri everything else is made up
00:19 sri you give those meaning
00:20 j-v-e I just noticed that production mode starts logging at the "error" level, while development logs everything
00:23 sri development is the exception
00:26 MisterHatt anyone able to recommend a good module for pagination?
00:26 tempire I've used data::pager in the past
00:26 tempire or maybe it was data::page
00:26 tempire I don't recall
00:26 MisterHatt also sri, I totally thought the raptor logo was for mojo, not perl5, was looking forward to raptor vs unicorn on the new logo
00:26 sri heh
00:27 tempire ah, data::page.  worked well enough.
00:27 MisterHatt tempire: any idea about what's used more recently?
00:28 tempire not sure what you mean by more recently
00:29 MisterHatt well the latest modules I see related to it seem to be from around 2008, not that older code is bad but I was wondering if there is anything more recent, mostly more talored to specific use-cases I guess
00:30 tempire data::page is used heavily, I know.  it probably hasn't changed since 09 because no one has had cause to change it.
00:30 MisterHatt ah I see
00:30 MisterHatt I'll give that a shot then
00:30 MisterHatt thanks
00:31 tempire its pod lists several other cpan modules that have been updated more recently
00:31 tempire haven't used them, though, so I can't say anything about them.
00:31 tempire ack!  some of them use camel casing.
00:32 MisterHatt some of them use moose
00:32 MisterHatt rather a large dependency...
00:33 tempire stick with data::page.  it works.
00:35 tempire sri: what's the official flavor of mojolicious?
00:35 tempire blue raspberry, maybe.
00:37 tempire http://farm4.static.flickr.com/​3067/2571718823_7cc8fb853e.jpg
00:38 tempire delicious!
00:38 purl i guess delicious is social bookmarks; most popular -> http://del.icio.us/popular/ or crazy or holy crap fmh is a (rich) nutcase or candy. candy is delicious
00:38 sri hmmmm
00:38 sri tricky question
00:38 purl hmmm... tricky question is always: since almost all Sweeeedes know a good amount of English, would the average Sweeede want to see a document in English, or its correspondant in Icelandic?
00:40 sri chocolate
00:40 purl i think chocolate is switched for poop or the next win32 perl if we're all really really good
00:40 giwi left #mojo
00:41 giwi joined #mojo
00:41 sri maybe coke
00:41 tempire coke-flavored?
00:41 sri yea
00:41 tempire I miss crystal pepsi
00:42 sri coke as in blow
00:42 minimalist sri, does your template system have filtering capabilities?
00:42 * tempire hides his financial information far away from sri
00:43 sri minimalist: it can do everything
00:43 sri it's just perl
00:43 * sri searches for tempires financial information
00:43 minimalist I'm asking because it reminds me of mason, which can filter the output through something at the end.
00:44 minimalist a good use for this is to filter a form through HTML::FillInForm
00:44 * tempire distracts sri with white glitter
00:44 sri ours is more minimalistic, you use begin/end blocks for everything
00:44 sri we have tag helpers, no need for fillinform
00:44 sri all form tags have sticky values
00:45 sri minimalist: https://github.com/kraih/mojo/blob/mast​er/lib/Mojolicious/Plugin/TagHelpers.pm
00:46 sri that should give you an idea how powerful the system is
00:46 minimalist intriguing. I'll take a look.
00:46 sri we've only just started to explore the possibilities
00:47 sri i wouldn't be surprised to see orm specific tag helpers in the not so distant future
00:48 tempire hmm
00:48 minimalist how is it speed-wise? should be pretty fast if it's that simple
00:48 tempire what are you thinking for orm tag helpers?
00:48 sri we compile templates to perl and keep everything in memory, it won't be a bottleneck
00:50 sri tempire: <%= form_for $record => begin %><%= $_->username %><%= $_->submit %><% end %>
00:50 sri who knows
00:50 purl and it's way past purl's bed time young man!
00:51 sri not unlike rails model driven tag helpers
00:53 sri quite sure we have the fastest pure perl template system actually
00:55 sri http://xslate.org/benchmark.html # microtemplate is a slower early fork of our system
00:55 tempire how's the mojo mongo magic coming along?
00:55 sri slowly, i keep getting distracted -.-
00:57 memowe left #mojo
01:08 ispy_ joined #mojo
01:08 memowe joined #mojo
01:08 perlrocks Twitter: "There will be t-shirts. :) http://t.co/MPNBNqp #perl #mojolicious" --kraih http://twitter.com/kraih/status/41666029616771072
01:09 xantus left #mojo
01:10 memowe left #mojo
01:13 memowe joined #mojo
01:20 memowe left #mojo
01:20 memowe joined #mojo
01:21 memowe left #mojo
01:29 sigue joined #mojo
01:33 memowe joined #mojo
01:34 memowe left #mojo
01:56 daviddelikat joined #mojo
01:56 daviddelikat1 left #mojo
02:27 memowe joined #mojo
02:54 j-v-e Can somebody explain the arguments that can be set in a post_form_ok test ? I'm a bit puzzled...
02:54 j-v-e http://search.cpan.org/~kraih/Mojolici​ous-1.11/lib/Test/Mojo.pm#post_form_ok
02:55 j-v-e first on is the route to test, but how do you check the response of the server ?
02:58 perlrocks Twitter: "Mojolicious-Plugin-DomIdHelper 0.1 by SHAW - http://frepan.org/~shaw/Mojoli​cious-Plugin-DomIdHelper-0.1/" --cpan_new http://twitter.com/cpan_ne​w/status/41693690393137152
03:01 memowe_ joined #mojo
03:01 memowe left #mojo
03:13 j-v-e also, if I only have one test on a get_ok, why do I need to declare use Test::More tests => 3; ?
03:14 j-v-e (I'm fairly new to test::more)
03:14 memowe_ left #mojo
03:19 memowe joined #mojo
03:36 memowe left #mojo
03:40 tempire j-v-e: $t = $t->post_form_ok('/foo' => {test => 123})->status_is(200)->hea​der_is(...)->text_is(...) etc
03:40 tempire get_ok is one test.
03:41 tempire if you have to specify tests => 3, you're running 2 tests elsewhere.
03:41 memowe joined #mojo
03:55 j-v-e tempire: in you post_form_ok, test=>123 is a POST param sent to the server ?
03:56 perlrocks Twitter: "Mojolicious!!" --mojolutre http://twitter.com/mojolutr​e/status/41708202622074880
04:03 tl joined #mojo
04:04 j-v-e tempire: it seems that each mojo::test counts for 3 test::more
04:05 j-v-e when I added the post_form_ok test, I had to increase test::more from 3 to 6
04:05 tholen42 left #mojo
04:05 j-v-e otherwise I get t/shorturl.t .. 1/4 # Looks like you planned 4 tests but ran 6.
04:09 perlrocks Twitter: ""@ Mojolutre: Mojolicious!" Lol sounds like mojitos" (es) --ana_calixto http://twitter.com/ana_calix​to/status/41711437546135552
04:51 daviddelikat left #mojo
05:15 j-v-e IO::Socket::SSL 1.37 required for TLS support at lib/Mojo/Server/Daemon.pm line 299
05:15 j-v-e $ apt-cache show libio-socket-ssl-perl|grep Version
05:15 j-v-e Version: 1.33-1+squeeze1
05:16 j-v-e I always loved Debian for that :)
05:18 j-v-e btw sri : "workers => (`grep processor /proc/cpuinfo|wc -l` * 2)," works wonderfully
05:20 crab what is "epo"?
05:22 daviddelikat joined #mojo
05:22 perlrocks Twitter: "Listen to # uwdc report of # ruby on # rails. I see a powerful resemblance to # mojolicious # perl - but I noticed it before when picking # redmine" (ru) --shoorick77 http://twitter.com/shoorick​77/status/41729960448098304
05:46 j-v-e how come that each worker takes 24MB of virtual memory, with 12MB being resident and 12MB in the Swap ?
05:49 j-v-e using hypnotoad
06:14 daviddelikat left #mojo
06:21 xantus joined #mojo
06:34 giwi left #mojo
06:41 giwi joined #mojo
06:45 josh joined #mojo
06:46 josh left #mojo
06:47 * j-v-e just finished to write an article on mojolicious, time to go to sleep
06:47 j-v-e window 3
07:08 jegade left #mojo
07:08 jegade joined #mojo
07:09 MisterHa1t joined #mojo
07:09 MisterHatt left #mojo
07:17 sherr left #mojo
07:31 j-v-e left #mojo
07:47 sherr joined #mojo
07:58 tholen joined #mojo
09:18 marcus crab: enlighened perl organization - http://www.enlightenedperl.org/
09:32 crab marcus: thanks
10:12 elb0w left #mojo
10:14 elb0w joined #mojo
10:17 PerlNinja joined #mojo
10:17 PerlNinja g'day mojoistas
10:38 marcus yo, mr. ninja
10:52 PerlNinja hola marcus
10:52 PerlNinja what's the procedure if you have a little patch you want to submit for mojolicious?
10:53 marcus github pull request
10:53 PerlNinja that's all? oh.. okay easy enough :D
10:55 PerlNinja made some changes to Mojo::JSON to let it use the boolean module if it's installed, but it's pretty specific to what i'm doing so gotta test it first to see if it'll break anything
12:25 perlrocks Twitter: "Mojolicious::Plugin::Gravatar - http://bit.ly/gYHmXJ" --koorchik http://twitter.com/koorchi​k/status/41836380430663680
12:58 perlrocks Twitter: "More #mojolicious plugins: good. Not seeing them on CPAN but only on GitHub: BAD! Put. Stuff. On. CPAN. Dammit." --perlninja http://twitter.com/perlninj​a/status/41844560317521920
13:29 sri PerlNinja: what would be the advantage?
13:31 PerlNinja of putting modules on CPAN?
13:31 sri of boolean
13:31 PerlNinja oh
13:32 PerlNinja because i have a bunch of objects that come straight out of MongoDB, and I'm using boolean to make sure boolean values get recorded as such
13:32 PerlNinja but if you serialise them with Mojo::JSON, they don't come out right and I get "0" or "1" as value instead of true/false
13:32 PerlNinja since there's only a check for whether or not the passed value is a Mojo::JSON::_Bool object when you serialize
13:33 sri i'm afraid that's not good enough
13:33 PerlNinja why that
13:35 PerlNinja Because not having it basically means I get the additional headache of suddenly finding numerical values in fields that are supposed to be booleans, and the rest of the code relies on the fact it's a boolean, not an integer. I could use JSON::XS for it and solve the problem that way but that's just another dependency I can avoid by using Mojo::JSON
13:36 PerlNinja plus it's not a hard dependency, the way I wrote it up is that it'll use boolean if it's there, if it's not, it'll just do what it's always done. theoretically anyway
13:36 perlrocks Twitter: "The tune made Mojolicious app. Looking at the common menu url_for NYTProf had become a bottleneck because of what was repeated 100 times, to generate the URL manually. Strong earned 100ms." (ja) --5_1_5 http://twitter.com/5_1_5/status/41854233510809600
13:38 sri cpan is full of boolean modules
13:38 sri we can't support them all
13:38 PerlNinja mmm
13:39 marcus sri: what's going on with your mongodb driver?
13:39 PerlNinja given that 'boolean' is the one that seems to be most used and is more or less a pre-requisite for having the mongodb driver treat boolean values right, personally I don't see the problem with it, but if it's not good enough, okay that's alright, I'll keep a forked Mojo::JSON around for my own use then :)
13:39 sri marcus: still working on it
13:39 marcus sri: and will it resolve this issue?
13:39 sri PerlNinja: well, personally i don't care much about the mongodb driver since i'm working on a better alternative
13:40 sri marcus: it will
13:40 PerlNinja ah okay
13:41 PerlNinja problem is, the better alternative isn't there yet :) so yeah i'll just keep my custom Mojo::JSON around :D
13:41 PerlNinja for now anyway
13:41 purl for now is there not any plugin available where in I can provide awake416's user table, roles table, corresponding link and have it done
13:41 sri next someone asks for XML::LibXML::Boolean support
13:41 marcus I can do that :p
13:41 sri boolean will always be a problem, please find a generic solution!
13:41 PerlNinja yeah okay, on the other hand though
13:42 sri or make perl core adopt a boolean module
13:42 PerlNinja I really do like booleans to be stored as booleans - or at least things ending up in a predictable fashion, because I don't want to spend another half day looking for reasons why a boolean field suddenly goes numerical
13:42 PerlNinja like I said, JSON::XS solves the problem, but why go for another dependency if there's already a JSON parser in Mojolicious, etc. etc. :)
13:42 sri http://search.cpan.org/~makamaka/JSO​N-PP-2.27104/lib/JSON/PP/Boolean.pm # this will go core though
13:43 PerlNinja myeah, when
13:43 daviddelikat joined #mojo
13:44 sri interesting
13:44 sri JSON::PP does not support the boolean module either
13:46 PerlNinja ok so question then becomes
13:46 sri i'm not sure JSON::XS will solve your problem
13:47 PerlNinja eh it does, mostly because i kinda forgot i already hacked in boolean support there in a very nasty fashion
13:47 PerlNinja nothing supports boolean, which makes it quite frustrating that the mongodb driver requires it to properly handle booleans
13:47 sri oh, so you lied -.-
13:48 PerlNinja and something going core in 5.14 doesn't help me from a practical standpoint either, I can keep my dev box up to date on perl versions, but I can't very easily go and upgrade 50 machines to a new perl version
13:48 * sri pushes PerlNinja into the alligator pit!
13:48 * PerlNinja eats the alligators with some salt and pepper
13:48 sri nothing in 5.14 will help you
13:48 PerlNinja after  being forced to eat chicken feet... can't get much worse than that
13:48 sri nobody supports the boolean module
13:49 PerlNinja yeah tell me about it, and hypothetically speaking that's nothing short of retarded these days given that every other language and their damn dogs have a boolean type
13:49 sri agree, but this is the wrong channel to complain about that ;p
13:50 PerlNinja I know, I'm just venting :P
13:51 marcus types are for suckers
13:51 marcus magic++
13:51 marcus sigh
13:51 marcus seems iusethis will break badly if I upgrade it to dbix-class trunk
13:51 marcus latest cpan even
13:51 PerlNinja yeah but I'd like it if the magic was magical enough to deal with proper booleans :P
13:52 PerlNinja maybe we need
13:52 PerlNinja voodoo!
13:52 marcus PerlNinja: that wouldn't be magic.
13:52 PerlNinja true
13:52 PerlNinja but it'd work
13:52 marcus I find the truthiness of a normal scalar to be quite sufficient.
13:52 PerlNinja yeah, I agree on that part
13:52 marcus so mongodb is the bad guy in this movie
13:53 PerlNinja not necessarily - it's more mongodb's perl driver that's the bad guy
13:53 marcus well, it was made by the people behind mongodb :)
13:53 sri how is the truthiness of a perl scalar sufficient?
13:53 PerlNinja on the other hand, every other driver seems to do it right given that other languages have proper support for booleans
13:53 sri how would you get clean roundtripping?
13:54 PerlNinja and yes, I could always go the 0/1 route to indicate true or false and get normal scalar truthiness going out of that
13:54 PerlNinja *but*
13:54 marcus sri: sufficient for determining truth or false, not for talking to mongodb :p
13:54 moritz perl has a perfectly fine false value
13:54 moritz why chose 0 over it?
13:54 sri you mean undef?
13:54 marcus undef is not false
13:54 moritz sri: no, false
13:55 sri undef maps to null
13:55 moritz sri: use Devel::Peek; dump !1
13:55 moritz it's a dualvar, and a singleton
13:55 sri how do you detect it?
13:55 marcus perl -MDevel::Peek -le'dump !1'
13:55 marcus Abort trap
13:55 marcus ;)
13:55 PerlNinja ...
13:56 sri i'm open for more B:: magic
13:56 moritz marcus: sorry, it's Dump
13:56 moritz not dump
13:56 marcus moritz: mm
13:56 sri but for clean roundtripping we need to actually be able to detect !1 and !!1 being boolean
13:57 moritz you can never get !!1 right
13:58 PerlNinja or just standardise things by using 'boolean' and the whole problem is solved with an extra impetus to perhaps make boolean a core module ... or maybe I'm a bit too simplistic here
13:58 sri people never upgrade perl their perl from 5.8 anyway...
13:59 sri *-perl
14:00 PerlNinja and so in one way or the other, we're back to the problem where perl's idea of a boolean and mongodb's idea of a boolean are different, and I'm not quite sure it's truly a mongodb "problem", as it were :) not that it's got much to do with Mojolicious either but oh well
14:00 PerlNinja if you're doing a mongodb driver ... :)
14:00 * PerlNinja will return shortly, time for high-octane caffeine intake
14:03 PerlNinja ah... coffee... what would I do without it
14:03 moritz drinking tea, most likely
14:04 PerlNinja not sure, I'd probably make up for it by going for red bull
14:04 PerlNinja then again, I've drank so much of that stuff that I've gotten pretty much immune to the happy effects of the stuff
14:05 kaare joined #mojo
14:08 ispy_ left #mojo
14:32 PerlNinja left #mojo
14:37 breaker313 joined #mojo
15:23 moritz fwiw I get some warnings from Mojo::Exception
15:23 moritz Sun Feb 27 15:50:32 2011 debug Mojolicious::Routes:418 [5435]: Dispatching callback.
15:23 moritz Argument "\0" isn't numeric in subtraction (-) at /home/moritz/perl5//perls/perl-5.12.2/​lib/site_perl/5.12.2/Mojo/Exception.pm line 179, <GEN430> line 103.
15:23 moritz with mojolicious 1.11
15:24 moritz I don't know what I did to trigger that, so feel free to ignore it unless you have a clue what might be wrong
15:33 marty joined #mojo
15:51 xantus left #mojo
16:41 jwang joined #mojo
16:50 j-v-e joined #mojo
17:00 mateu I'm finding that a $self->param('placeholder') is not part of $self->req->params;
17:00 mateu Is that really the case, or am I screwing something up?
17:04 mateu I'm looking to buid a HashRef of all params: placeholder, body and query.  I thought $self->req->params->to_hash might do it, but appears not.
17:15 marcus mateu: I'm not sure your question is clear.
17:15 avkhozov left #mojo
17:15 mateu really?
17:15 marcus yea
17:15 mateu ok, so $self->param is not in $self->req->params.
17:15 mateu is that clear?
17:15 marcus you're setting a query param in your request and it's not showing up in params?
17:16 marcus mateu: usually it's the other way around, $self->param('foo') is based on $self->req->params->{foo}
17:16 mateu I setting a placeholder (as the docs call it param like /page/:id/edit
17:17 marcus mateu: those end up in stash, not param tho?
17:17 mateu so $self->param('id') is populated, but there is not 'id' key in $self->req->params
17:17 mateu both
17:17 marcus ok.
17:17 marcus yeah, that's probably true
17:17 mateu I found it a little confusing, but then heh english is hard ;)
17:18 marcus you're telling me.. :)
17:19 marcus mateu: well, param is documented as 'Request parameters and routes captures.', so it's correct
17:19 mateu my intution expects something that's called param to be in params,
17:20 marcus mateu: I would have found it more confusing if request params would have contained route captures
17:20 mateu it's a name thing, that's all.  Now that I understand the differences I can disregard the name confusion.
17:21 marcus mateu: I had similar problems with Mojo::DOM attrs vs Mojo::Base attr yesterday :)
17:21 mateu the challenges of naming interface methods
17:23 sri it all makes sense in context
17:24 sri everything below ->req is request layer, defined outside of mojolicious
17:24 mateu marcus: if I'm reading the backlog right attr is not related to a tag attribtute.
17:24 sri while ->param is a mojolicious layer higher level helper
17:25 marcus mateu: right, it's the object accessor generator
17:25 mateu sri: that helps
17:27 mateu marcus: like to db accessor generation you demonstrated recently.
17:27 marcus mateu: plausibly
17:27 mateu er crab demonstrated
17:28 marcus I've done that too :)
17:28 mateu __PACKAGE__->attr(db => sub {DBI->connect(...)})
17:28 * mateu nods
17:28 marcus mateu: I actually usually use the helper api for that.
17:28 marcus but I wrap it in the attr api if it needs to be pushed to the children
17:29 marcus so that it's lazy inited on first use rather than in startup
17:36 crab so what's the advantage of using the helper rather than the attr?
17:36 crab i did the attr because i wanted it to be created on-demand
17:36 marcus crab: you can access it on $self from controllers and templates?
17:37 sri helpers are methods, attr generates attributes
17:37 crab marcus: so you're saying i can do ->helper(db => sub { shift->app->db }) and have both?
17:37 mateu and lazy attributes at that.
17:37 marcus crab: yes
17:38 crab marcus: sweet, thanks for the tip.
17:38 mateu now this: https://github.com/kraih/mojo/wiki/Using-mongodb  makes more sense.
17:38 crab though in my case i can just put a sub db { shift->app->db } in my controller base class
17:38 crab just like i did for log.
17:39 marcus crab: but then you can't access it as db->foo in your epl templates =)
17:45 crab ah, i see.
17:45 crab i'll keep it in mind. i'm sure it'll come in handy somewhere.
17:50 marcus crab: cool.
17:50 marcus crab: how old are you?
17:53 crab why, do my questions betray my youth and inexperience? :-)
17:53 crab i'm thirty-one.
17:53 marcus crab: no, I just noticed you'd done open source since 97. So I figured you must be quite old :)
17:53 marcus but it turns out I'm older :-/
17:54 mattastrophe joined #mojo
17:55 minimalist anyone born in the 70s, raise you hand.
17:55 marcus o/
17:56 * marcus nudges crab, chansen
17:56 crab i was born right at the beginning of 1980.
17:58 * marcus born in '76
17:59 * minimalist was born in 74
17:59 marcus crab: 80s... I was imagining you something like this - http://www.vytautas.com/gallery/buthan/24.jpg
17:59 marcus ;-)
18:00 marcus as @arne says - Born in the 90s, how old is that? Old enough!
18:03 crab marcus: haha
18:03 crab once i grew a beard that had just begun to approach sage-ly proportions, but then i got sick of it in the summer and got rid of it
18:04 * marcus has a goatee
18:06 marcus https://picasaweb.google.com/olga.ramb​erg/RhineInFlames#5505741879291691218
18:11 mateu marcus: what's on your chest, a holster for your pistol?  ;)
18:11 marcus mateu: camera bag
18:17 marcus mateu: Not american, remember...
18:17 marcus :p
18:17 mateu come on that's not as exciting
18:17 * mateu lives in the wild west
18:18 minimalist Is there a way to pass template parameters via $c->render?
18:20 mateu Do you mean like  $self->render('baz', two => 24);
18:20 minimalist yes
18:23 minimalist I was trying $self->render( template => 'baz', two => 24 );
18:23 minimalist which didn't work
18:26 tempire marcus: I'll take your approaching sagely proportion, and raise you awesome: http://farm4.static.flickr.com/​3480/3762853352_5878c1c40d.jpg
18:26 perlrocks Twitter: "Mojolicious-Plugin-Gravatar 0.01 by KOORCHIK - http://frepan.org/~koorchik/Moj​olicious-Plugin-Gravatar-0.01/" --cpan_new http://twitter.com/cpan_ne​w/status/41927282763370496
18:32 minimalist How do you get the remote host IP address? $self->req>env->{REMOTE_ADDR} ?
18:38 crab minimalist: look at the Mojo::Transaction manpage
18:38 * sri wonders why everybody wants to go through env
18:39 minimalist sorry, I'm new
18:39 sri hmm, spreadshirts is really not bad, but waiting a few days to get vector images approved sucks :/
18:41 tempire I like that you can put something on the sleeve
18:41 * tempire wants a mojolicious dog bandana
18:42 sri if they insist on .ai files i'm screwed
18:50 crab what do you use?
18:50 sri Sketch
18:51 sri i can produce perfectly fine svg and eps
18:52 sri http://kraih.spreadshirt.de # not much you can do with pixels...
18:53 perlrocks Twitter: "koorchik's Perl blog: Vstrechayte Mojolicious:: Plugin:: Gravatar http://ff.im/yZzyp" (bg) --planetperlru http://twitter.com/planetper​lru/status/41933832026456064
18:54 sri mugs are a little disappointing, you can only put something on one side
18:59 sri do not buy anything, i'm just playing around ;p
19:10 giwi left #mojo
19:11 giwi joined #mojo
19:22 crab is it normal for a ceramic mug to cost EUR22.90?
19:25 sri raptor tax
19:46 sri i guess the mug printing is rather expensive
19:46 * crab stares at his code and thinks very hard
20:11 perlite_ joined #mojo
20:15 perlite left #mojo
20:15 perlite_ is now known as perlite
20:23 jwang is there a quantity discount for mugs?
20:24 jwang Cafepress can get it down to EUR $5.20 each if you get 15 11oz mugs
20:24 * sri has no idea
20:49 tholen left #mojo
20:58 GitHub150 joined #mojo
20:58 GitHub150 mojo: master Sebastian Riedel * d407496 (1 files in 1 dirs): added header example - http://bit.ly/hXqu7O
20:58 GitHub150 left #mojo
20:59 sri crab: it is always an array
21:00 daviddelikat left #mojo
21:03 crab sri: you're right, of course.
21:03 crab sorry, i'm not sure what i saw that made me think it could be a string only.
21:04 crab (i did a bunch of perl -MMojo::Headers -e ... experiments, must have misinterpreted something)
21:04 sri no problem
21:04 sri hope the example makes it more obvious
21:07 crab yep.
21:14 sri http://kraih.spreadshirt.de # ok, added some t-shirts, thoughts?
21:25 daviddelikat joined #mojo
21:37 jwang these all look like the backs. what does the front look like?
21:37 jwang I like "Where is your language on the food chain"
21:37 sri ?
21:38 sri they have perl 5 on the back
21:38 jwang the pics are all the front then?
21:39 sri yea, you can see all sides under details
21:39 jwang ah ok, it's easier to tell with a lighter color shirt
21:39 sri or by clicking on the images
21:39 sri nobody buys lighter color shirts though ;p
21:39 jwang yeah, you don't see much of those
21:41 jwang I think a shirt with "Perl 5" in smaller text on the left chest with the raptor and Where is Your Language on the food chain? on the back might be nice
21:42 jwang wow
21:42 jwang USD $39 for a t-shirt
21:44 otaviof joined #mojo
21:44 jwang at CafePress, shirts start at USD $26 and go down to $12.75 for 18
21:44 jwang EUR 9.27
21:45 sri the quality is better at spreadshirt though
21:45 otaviof left #mojo
21:46 otaviof joined #mojo
21:47 jwang could be
21:47 jwang I haven't heard of B&C before
21:47 jwang but their website looks styling
21:50 toebu left #mojo
21:56 tempire The first one is nice
21:56 tempire though I think it would look better if the "cpan always finds a way" would be somewhere else.
21:56 tempire maybe the back, or one of the sleeves
21:56 jwang I think the first might look better if the "Perl 5 (raptor)" was centered
21:57 jwang and "CPAN always finds away" was somewhere else too
21:57 sri http://kraih.spreadshirt.de/perl-5-raptor-shir​t-limited-edition-A15290767/customize/color/2 # how about this?
21:57 jwang even if it was just under Perl 5
21:57 jwang I like that one better sri
21:58 sri more expensive too
21:58 tempire that's way too ostentatious for me
21:58 jwang I noticed that too
21:58 jwang I'm not sure if this has come up before
21:58 jwang but
21:58 jwang raptors are extinct ;)
21:59 jwang as cool as they are
21:59 moritz not on xkcd.com
21:59 sri *thought* extinct
21:59 sri and fucking badass!
22:03 tempire they were extinct.
22:03 tempire cpan changed all that.
22:04 tempire I'd wear this shirt: http://twitpic.com/44i1lw
22:04 jwang anything on the back?
22:04 jwang would you want anything on the back?
22:04 tempire only if it was small.
22:06 tempire Having "rawr!" in small text would be cool.
22:06 sri tempire: you wouldn't want the cpan text?
22:07 tempire I could handle the cpan text on the back
22:07 tempire it's too much for the front, from a design perspective, I think.
22:07 tempire though that's entirely subjective.
22:08 tempire I suppose it depends on whether you're targeting people who want to wear a perl shirt just to wear a perl shirt, or people who will wear a cool shirt to wear a cool shirt.
22:10 crab i can't imagine wearing a t-shirt that says something on it
22:15 sri hmm
22:16 sri even mixing two of my own images on the front makes the price go up :S
22:16 tempire because of the colors?
22:16 sri no idea why
22:17 sri by 4,50 euro!
22:18 jwang I figured the limited edition shirt was more expensive b/c it uses a shirt from American Apparel vs B&C
22:19 sri oh
22:19 jwang but the B&C shirts are priced at 19.4, 23.9 and 28.4
22:20 jwang so I'm guessing design contributes too
22:20 sri heavily
22:21 sri i can get prices down by uploading more specific images
22:21 sri annoying though
22:24 jwang lower prices are important for me. my computer shirts tend to be free ;)
22:25 jwang I'd buy one if it was reasonably priced
22:39 sri i'll leave the experimental stuff out and start with two basic shirts i guess
22:40 jwang I like the limited edition the best
22:40 jwang out of the ones up there now
22:41 mattastrophe left #mojo
22:41 sri it's gone now ;p
22:41 jwang for the more basic ones, I agree with tempire, "Perl 5 + raptor" on the front and a slogal on the back
22:41 jwang damn! that was very limited!
22:41 sri :D
22:44 breaker313 left #mojo
22:47 minimalist guys, that would be a proper way to route an ajax request?
22:49 sri ajax doesn't need special routes
22:50 sri in fact most ajax apis are general purpose web services
22:52 minimalist true that. I'm migrating my app from Dancer and they had an ajax route which only caught the ajax requests. So just asking.
22:55 sri special ajax routes are stupid
22:56 sri the point of testing for ajax is to reuse code and just render different results for normal and ajax requests
22:56 sri a $self->req->is_xhr check will do that very well
22:56 minimalist fair enough
22:57 sri ajax routes even discourage code reuse, makes no sense at all
22:58 kaare left #mojo
22:59 sri ohoh, my os x is acting weird :S
23:00 sri changing font sizes randomly and not displaying ui elements in my vector app :/
23:07 jwang time to upgrade to lion :)
23:07 j-v-e hello there
23:08 j-v-e having a little question about controller/app exchange of data
23:08 j-v-e how can I access app->defaults->{config}->{site_name} from the controller ?
23:08 j-v-e using mojolicious::lite it returns an empty string
23:09 sri don't do that
23:09 j-v-e ok
23:09 sri please read up on what defaults is for
23:10 j-v-e but, when json_config parses my config files, it puts the values in defaults by itself
23:10 sri and defaults has a very special purpose
23:11 j-v-e "Default values for the stash.
23:12 sri ;)
23:12 j-v-e does that mean my value is located in the stash and I can get it from there in the controller ?
23:13 sri exactly
23:14 j-v-e there is nothing in the stash (checked with dumper), do I need to do the copy manually before ?
23:17 sri i'm certain it is there
23:17 j-v-e I believe you :) I just can't find it :p
23:18 sri if the stash is empty it must be for another reason, we test the config plugin quite well
23:20 j-v-e in my package code I can access the values from the config file (from app->defaults), but from the controller (route get /), the stash only contains two variables: mojo.started and mojo.captures
23:20 j-v-e I'll dump the complete $self to check
23:22 minimalist sri, is $self-render imperative, i.e. does it exit out of the scope right away or you have to return manually?
23:22 sri nothing in mojolicious does that
23:23 minimalist good to know
23:50 marty left #mojo
23:50 marty joined #mojo

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary