Camelia, the Perl 6 bug

IRC log for #mojo, 2012-12-27

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

All times shown according to UTC.

Time Nick Message
00:00 cfedde xaka: cool.
00:00 cfedde and thanks!
00:01 cfedde xaka++ # do we count karma here?
00:13 Molaf__ joined #mojo
00:21 good_news_everyone joined #mojo
00:21 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/s8pCjw
00:21 good_news_everyone mojo/master 947e67f Sebastian Riedel: better example for custom template systems
00:21 good_news_everyone left #mojo
00:21 sri guess that's more realistic
00:50 egopro joined #mojo
01:00 * tempire wonders when he's going to get a wempire irc account
01:03 good_news_everyone joined #mojo
01:03 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/mXhAFw
01:03 good_news_everyone mojo/master 8d1633c Sebastian Riedel: tweaked custom template system recipe
01:03 good_news_everyone left #mojo
01:04 laouji joined #mojo
01:04 sri tempire: you mean wempirc
01:04 tempire close enough
01:05 tempire wric
01:05 tempire goodbye perlrecruiter
01:05 tempire we hardly knew ye
01:12 Mike-PerlRecruiter_ joined #mojo
01:14 hlin joined #mojo
01:16 ka2u joined #mojo
01:37 PanzerBjorn joined #mojo
01:37 PanzerBjorn Hey guys, I have a quick question. I am trying to use this route in my app package in startup: $r->any('/:id.html', id => qr/\d+/i)->to('general#view')->name('view');
01:38 PanzerBjorn When I navigate to /1234.html it says there is no matching route. Did I miss something in the pattern? If I take out the id => qr/\d+/i then it works fine.
01:39 PanzerBjorn I only want to match numerics for the id placeholder.
01:55 tempire PanzerBjorn: that syntax works for $r->route
01:56 tempire $r->route(...)->to(...)
01:56 PanzerBjorn Ah, I didn't think there was any difference between route and any.
01:56 tempire ->any/get/post/etc are shortcuts that work a little differently
01:56 PanzerBjorn Can route still receive a via() to restrict the HTTP methods?
01:57 tempire yes
01:57 PanzerBjorn Awesome, I'll give that a try then.
01:58 tempire see mojolicious::lite docs for instruction on how to use the shortcuts
01:58 tempire http://mojolicio.us/perldoc/Mojolic​ious/Lite#Restrictive_placeholders
01:58 PanzerBjorn Ah, for full apps should I avoid using the shortcuts and just stick with $r->route() from now on then?\
01:59 d4rkie joined #mojo
01:59 PanzerBjorn (Is that best practice?)
01:59 tempire doesn't really matter.
01:59 tempire I use the shortcuts, personally.
01:59 d4rkie joined #mojo
02:00 tempire marcus' uses routes.
02:00 tempire sri doesn't need either, he routes by sheer force of will
02:00 PanzerBjorn The Lite link you directed me to doesn't show how to use $r-> in a full app, though.
02:01 tempire the arguments to get are what you want to look at.
02:01 tempire or any, in this case
02:02 tempire any '/:bar' => [bar => qr/\d+/]
02:03 PanzerBjorn So that translates to $r->any('/:bar' => [bar => qr/\d+/])->to(...) ?
02:06 kryptonite joined #mojo
02:08 tempire yes
02:09 crab i always get tripped up by that, so i just use ->route() for all those cases
02:10 xaka wait, is it [ ... ] or { ... } ?
02:11 Miked joined #mojo
02:32 Averna joined #mojo
03:22 guest-quest joined #mojo
03:23 guest-quest hey, guys!
03:25 guest-quest anybody success used the uWSGI+Mojolicious?
03:32 noganex_ joined #mojo
03:47 egopro joined #mojo
03:51 jnbek^dt joined #mojo
05:22 ka2u joined #mojo
06:13 zivester joined #mojo
06:20 spleenjack joined #mojo
06:24 hotsnow joined #mojo
06:24 * hotsnow
06:45 ver joined #mojo
06:56 kitt_vl joined #mojo
07:32 Vandal joined #mojo
07:39 PanzerBjorn left #mojo
07:41 Miked joined #mojo
07:59 yakudza joined #mojo
08:12 amirite poo
08:20 Vandal joined #mojo
08:30 mattastrophe joined #mojo
08:34 Foxcool joined #mojo
08:34 dod joined #mojo
08:43 dod joined #mojo
08:47 memowe \o
08:50 mattastrophe joined #mojo
09:52 SmokeMachine joined #mojo
10:07 wircus sri: What do you think about $self->respond_to( xhr => 'template' ) ?
10:07 wircus guest-quest: that's how dotcloud deploys mojo apps afaik.
10:46 mire joined #mojo
11:04 jiyuperl joined #mojo
11:09 ObseLeTe joined #mojo
11:27 b2b joined #mojo
11:32 trexy joined #mojo
11:36 trexy hi
11:36 trexy was hoping you guys could help me with a hot deployment prob I'm having
11:37 trexy using hypnotoad in production and everything is working well
11:37 trexy I can do hot deployment when logged into the server
11:37 trexy shell> hypnotoad /path/to/script
11:37 trexy does a hot deployment no problem
11:38 trexy - however I would like to run this script remotely
11:38 trexy using ssh
11:38 trexy it seems it does not hot deploy under ssh - any ideas?
12:03 nic trexy: that's something I've been pondering too; I was wondering about having a second instance running, which could restart the real one via commandline equivalent
12:03 nic (I haven't looked into the existing code yet, to see if there's already an avenue via signals for example.)
12:05 nic (I had thought about kill -USR1, but that wouldn't be portable)
12:40 Molaf_ joined #mojo
12:49 egopro joined #mojo
12:51 goodbuddy joined #mojo
12:53 ObseLeTe joined #mojo
13:10 d4rkie joined #mojo
13:13 Mike-PerlRecruiter_ joined #mojo
13:21 rem_lex| joined #mojo
13:36 egopro joined #mojo
13:37 b2b joined #mojo
13:40 avkhozov joined #mojo
13:44 egopro joined #mojo
13:56 inokenty joined #mojo
14:12 gryphon joined #mojo
14:25 ryozi joined #mojo
14:32 kitt_vl joined #mojo
14:48 basic6 joined #mojo
15:00 egopro joined #mojo
15:10 Miked joined #mojo
15:11 trexy I ended up sending the parent pid USR2 manually
15:11 trexy and all seems to work well
15:13 basic6 left #mojo
15:13 basic6 joined #mojo
15:13 mire joined #mojo
15:17 nic ah, that's a nice simple solution.  Should be easy enough to set that up for https admin remote control
16:10 jberger joined #mojo
16:17 anewkirk joined #mojo
16:18 jberger laziness++ https://github.com/kraih/mojo/pull/433
16:20 jberger sri: thoughts?
16:25 dabudabu joined #mojo
16:25 ObseLeTe joined #mojo
16:26 sri jberger: i don't find it aesthetically pleasing
16:28 jberger really? oh, to me its more aesthetically pleasing
16:28 jberger to each his own I gues
16:28 jberger s
16:28 jberger reject if you want, it only took a few minutes
16:28 jberger it was easier to just do than to explain first :-)
16:29 jberger fyi it could be as easily done with key value pairs rather than a hashref
16:29 jberger if you prefer
16:31 sri don't think i care enough to reject right away
16:35 cstamas sri: this seems interesting http://events.ccc.de/congress/20​12/Fahrplan/events/5374.en.html
16:35 sri https://github.com/kraih/mojo/blob/mas​ter/lib/Mojolicious/Command/get.pm#L42
16:36 bluescreen joined #mojo
16:36 sri that would also be more consistent, the use of a hashref seems unnecessarily verbose
16:36 inokenty jberger: my %spec = ref $_[0] ? %{+shift} : @_;
16:38 sri cstamas: how so?
16:40 yakubori joined #mojo
16:41 trexy left #mojo
16:42 jberger inokenty, thats the idea
16:43 jberger keeping the passed-in hashref is more memory friendly which is why I did it the other way around though
16:44 jberger gonna hafta do it later though, I have actually run out of time here
16:44 sri when would that matter?
16:44 jberger first thing when I get back
16:44 jberger sri: it wouldn't
16:44 jberger tiny optimizatino
16:45 sri less verbosity would be the more sensible optimization imo
16:45 sri considering the whole point is lazyness
16:46 cstamas sri: a w3c staff talks about an ongoing effort to add more security capabilities to browsers
16:46 cstamas this seems as a "whole review" instead of hotfixes and workarounds everywhere
16:46 sri cstamas: web crypto has been in talks for years
16:47 sri and there have been javascript implementations like forever, am i missing something?
16:48 cstamas this will go into a standard
16:49 cstamas "last call working draft in May"
16:49 sri ok, but what makes this draft particularly interesting?
16:49 sri seems more like a nice to have from what i can see
16:51 cstamas i was and i am always interested in security that's all
16:55 sri jberger: no idea why i'm arguing actually, i don't like either version :)
16:57 sri https://github.com/kraih/mojo/pull/433 # but the new travis integration is prettty neat
16:57 nic travis++
16:58 sri doctor who christmas special \o/
17:02 bluescreen joined #mojo
17:16 xaka joined #mojo
17:36 anewkirk joined #mojo
17:41 rem_lex joined #mojo
17:56 Vaewyn joined #mojo
17:58 Vaewyn Howdy all... wondering if anyone knows how to call up cookies during routing... ie I would like to use a prexisting SSO cookie to authenticate people in an 'under' sub or such before I let them go on in the routes.
18:00 vervain Does this help: http://mojolicio.us/perldoc/M​ojolicious/Controller#cookie
18:04 Vaewyn I already tried that... but I can't figure out how to get a $c at that point... in the chain... does the sub get an argument pushed in that can be used as such?
18:04 anewkirk joined #mojo
18:05 vervain sub => { $c = shift; ... }
18:07 Vaewyn vervain, Thanks...  seems to have worked :P  it makes sense totally.. but man I didn't see a single example using that at all :)
18:08 vervain Should I convert this https://groups.google.com/d/msg/mo​jolicious/HTjcYuJyaHE/k3Db8-jKQLEJ into a github issue since my reporting here and in the google group is just crickets?
18:26 anaio joined #mojo
18:27 sri jberger: taking back my vote on the issue, gonna leave it open so others can chime in
18:37 anewkirk joined #mojo
19:11 yakubori joined #mojo
19:17 tempire the monkey_patch params aren't bad...I don't know that they're necessary, though.
19:26 sri tempire: you don't think the inconsistency of "monkey_patch $caller, 'foo', sub {}" and "monkey_patch $caller, {foo => sub {...}}}" is quite ugly?
19:27 tempire if anything, I don't like the unecessary usage of a reference.
19:30 tempire I'm used to that inconsistency, but I prefer to only use references when necessary.
19:30 Vaewyn Can a plugin being called from an 'under' sub do redirect_to  ?  I'm trying it and instead of redirections I am getting "None of these routes match..." messages
19:32 tempire I guess what I'm effectively saying is that I don't like the inconsistency either, but probably for different reasons.
19:52 mire_ joined #mojo
19:59 mattastrophe joined #mojo
20:11 Britzel joined #mojo
20:12 avkhozov joined #mojo
20:45 bpmedley_ joined #mojo
20:59 ObseLeTe joined #mojo
21:13 yakubori joined #mojo
22:11 jberger hi, ok I'm back
22:11 jberger and the hobbit was better than the reviews I've read
22:12 jberger personally I like the reference for a few reasons:
22:12 jberger 1) it works with my indentation and comma style
22:13 jberger I like a trailing comma on hashes, so I don't like ending on a semicolon, hashref lets me get around that
22:13 * jberger is very neurotic sometimes
22:13 jberger but ...
22:13 gryphon joined #mojo
22:14 jberger 2) if you pass a hashref in this case, you already have created the hash so then monkey_patch doesn't have to create it while copying from the @_ stack
22:14 jberger I always try to avoid copying lists if the structure you want makes sense earlier
22:15 yakubori joined #mojo
22:15 jberger a hash is the logical structure to use, so why copy a list? yes its probably overdesigning or premature optimization, but it makes sense in my head
22:16 jberger again, its rather easy to allow both:
22:16 jberger my  $spec = ref $_[0] ? shift : { @_ };
22:27 Vaewyn left #mojo
22:33 kryptonite joined #mojo
22:45 Adura joined #mojo
22:54 tempire oh, looks like the new skitch still shares to custom location
23:05 sri jberger: if it supports hashref i vote -1, if it's just a list of pairs i'm neutral
23:05 jberger I can make it support the list of pairs easily enough
23:06 sri not convinced it's a useful feature though, it's more lines of code than before after all
23:08 ifim joined #mojo
23:10 sri half of our use cases are loops, that don't benefit at all
23:11 jberger those loops could be maps :-P
23:12 jberger like I said before, I like the aesthetic and that was my reasoning
23:12 jberger without that, its more lines for less function calls
23:12 jberger not a huge win
23:12 sri function calls at compile time, pretty much no win
23:12 jberger true
23:13 jberger well I pushed the interface change
23:13 jberger but again, I like how it made ojo look
23:13 jberger if you don't theres really no gain
23:14 sri jberger: you forgot to remove the quotes from the names
23:14 jberger haha, oops
23:14 jberger I meant to, and must have forgotten to do that
23:15 sri you can remove one line with my ($class, %spec) = @_; too :)
23:16 jberger true, now that I've dropped the ref handling
23:17 jberger yikes, I was going fast this morning
23:18 sri sub j also shouldn't be public
23:18 sri pretty sure that broke pod tests
23:19 jberger that was just to make it look nicer, in my first round I made three calls to monkey_patch in ojo
23:19 jberger above j, j, and below
23:19 jberger and I guess I haven't been running the pod tests
23:19 jberger and neither is travis
23:19 jberger that might be something that you want travis doing actually
23:20 sri yea
23:21 sri pretty sure that's not hard to do
23:22 sri i guess we could even test ssl, ipv6 and stuff
23:22 * sri investigates
23:33 jberger http://pastie.org/5586301
23:33 jberger ::Lite with fewer "loops"
23:33 jberger not sure I'm recommending it
23:33 jberger but it would work
23:34 sri $_ in closures always makes me nervous
23:34 sri almost certainly there are edge cases i don't know yet :)
23:35 jberger I did say I'm not sure I'm recommending it
23:36 * jberger wishes there was snow in chicago, I feel like throwing some snowballs
23:37 sri only rain in germany :(
23:37 sri warmest winder ever here or so i heard
23:37 jberger $_ is localized to the map block, so it SHOULD be ok
23:37 sri s/d/t/
23:37 jberger we had our warmest winter ever last year
23:38 jberger guess I have to start admitting to global warming
23:38 jberger (note I'm not a right wing kook, I'm a scientist who thinks that the models are suspect, there's a BIG difference)
23:39 jberger (sad that I have to say it that way too)
23:39 jberger (thats a different story)
23:39 * jberger throws a waterballon at sri
23:40 sri not really, being a scientist means being sceptical, there have been climate changes in the past too
23:40 jberger big ones
23:41 jberger and I don't doubt that climate may be changing, or that we may be hurting it
23:41 jberger I just think that its really hard to model temperature data from the last 1000 years from carbon percentage in ice core data
23:41 jberger for the pure reason that we have nothing to compare the model to
23:42 ObseLeTe joined #mojo
23:42 jberger I make models, and they must be compared to reality
23:42 jberger https://metacpan.org/module/Physics::UEMColumn
23:42 jberger my magnum opus
23:43 sri i'm just glad germany is switching to renewable energy
23:43 jberger I'm glad everyone is thinking that way
23:43 jberger I'm not convinced wind power is going to be the solution
23:44 jberger I would LOVE to see big banks of solar panels in deserts
23:44 jberger wind turbines are pretty detrimental to the local environment
23:44 jberger still probably better than coal though
23:45 jberger what is germany doing?
23:45 sri we have wind towers everywhere here
23:45 sri but there are so many cool alternatives
23:45 jberger its an exciting time to be a scientist
23:45 sri like tidal power plants
23:46 jberger we have some green energy researchers at UIC
23:46 jberger thats a cool idea
23:46 jberger I don't know much about it
23:46 sri or geothermal energy
23:47 sri they try everything around here
23:47 jberger and they should
23:48 jberger plus it stimulates the economy to pay skilled laborers to install the new thing
23:48 sri the latest trend is power plants that reinvest all energy into creating hydrogen for fuel cell power plants, so we can store energy more efficiently
23:49 jberger have they fixed the "storing hydrogen" problems
23:49 jberger ?
23:49 jberger :-P
23:50 sri no clue, but surely it's easier than storing current ;p
23:50 jberger but more explosive
23:51 sri actually i
23:52 sri 've only seen it on advertising flyers from one of our providers :)
23:53 sri ooooh, travis can be configured with irc announcements when testing state changes
23:53 jberger nice
23:57 lukep joined #mojo
23:59 good_news_everyone joined #mojo
23:59 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/o7kDRw
23:59 good_news_everyone mojo/master 9632953 Sebastian Riedel: modernized ".travis.yml"
23:59 good_news_everyone left #mojo
23:59 sri lets see how it goes :)

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