Camelia, the Perl 6 bug

IRC log for #mojo, 2011-01-12

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

All times shown according to UTC.

Time Nick Message
00:41 ashleydev left #mojo
01:11 GabrielVieira joined #mojo
01:30 ok22 left #mojo
02:09 ashleydev joined #mojo
02:19 MojoGuest406 joined #mojo
02:19 MojoGuest406 From: http://news.ycombinator.com/item?id=1277067 (156 hits)
02:19 MojoGuest406 left #mojo
02:22 tempire alnewkirk: sri is responsible for all of mojolicio.us
02:22 tempire https://github.com/kraih/mojolicio.us
02:27 alnewkirk the design is nice
02:27 alnewkirk nice UI
02:37 verrens left #mojo
02:49 alnewkirk is now known as alnewkirk[got
02:50 alnewkirk[got is now known as alnewkirk
03:07 perlrocks Twitter: "Mojolicious - Web framework for Perl http://www.findbestopensour​ce.com/product/mojolicious # FOSS" (no) --bestopensource http://twitter.com/bestopenso​urce/status/25026056289263616
03:22 yakudzo left #mojo
03:29 perlrocks Twitter: "All glory to the hypnotoad. #mojolicious" --obfuscurity http://twitter.com/obfuscuri​ty/status/25031636059947008
03:47 kvorg joined #mojo
03:47 ashleydev left #mojo
04:11 perlrocks Twitter: "Mojolicious:: Lite and Data:: Model with AJAX and jQuery I made a chat - it filtered its programmers Isuzu http://dlvr.it/D87RK Sunday" (ja) --RtestR http://twitter.com/RtestR/status/25042052525858816
04:14 ashleydev joined #mojo
04:21 yakudzo joined #mojo
04:42 jwang left #mojo
04:46 alnewkirk we need a section on mojolicio.us for sites/products built with mojolicious
05:13 avkhozov joined #mojo
05:37 tempire alnewkirk: create it in the wiki
05:37 tempire I'm sure it will be linked to if it becomes high profile enough
05:44 alnewkirk tempire: cool, will do
05:49 alnewkirk tempire: done
06:07 jwang joined #mojo
06:16 ysyrota joined #mojo
06:20 alnewkirk where should I look for session support? I looked in M::Sessions but I'm not sure thats what I want.
06:34 ltriant left #mojo
06:44 alnewkirk MojoX::Session fails - t/plugin.t
06:53 ashleydev left #mojo
07:00 kaare joined #mojo
07:09 Cyrus joined #mojo
07:20 koban joined #mojo
07:24 yko alnewkirk: M::Sessions usually quite enough, i'm not sure how MojoX::Session is supported now
07:24 yko sri: yes, i did, just had to go to bed :p
07:26 yko it goes in a terrible way: just runs vim, forces it hl template and grabs result
07:26 alnewkirk yko: M::Sessions doesn't go into much detail as to practical usage
07:29 yko alnewkirk: there's example with naive auth/state keeping https://gist.github.com/764609
07:29 yko and there some about usage http://mojolicio.us/perldoc?Mojoli​cious/Guides/Growing#State_Keeping
07:29 marcus There is still no support for SVG, Animated GIF, Web Sockets or other HTML5 stuff (besides HTML5 compatibility in 2.2). And there is no support for Device Motion, accelerometer, camera or speech support, as promised in Google IO (see video1 — starting at 6:00 — and video2).
07:29 * marcus shakes fist at google
07:30 yko alnewkirk: last one even better
07:31 yko module's pod doesn't give usage details usually. all documentation belongs to guides (c) Coding Guide
07:31 Christian joined #mojo
07:31 Christian good morning
07:31 purl Lies!
07:31 yko haha :)
07:31 yko mrnng
07:33 alnewkirk I didnt know session support (cookies mind you) was default
07:35 yko well, when you whant to find something for your situation you should look through guides
07:35 yko and usually begin from Growing. it's like The Hitchhiker’s Guide to the Galaxy
07:35 alnewkirk i did, i couldnt find anything
07:35 alnewkirk i noticed the default session() object in your gist example
07:36 alnewkirk its all theorectical though, no actually exmaple code
07:36 yko perldoc Mojolicious::Guides::Growing | grep session should give you enough :p
07:37 alnewkirk shit, i must have missed that
07:37 alnewkirk i see
07:37 alnewkirk sorry
07:37 yko alnewkirk: both my gist and Final Prototype in Growing are working code
07:37 yko np, everyone do :)
07:38 yko question is that auth should be little less naive than $c->param('user') eq 'foo'
07:38 alnewkirk yko: i dont follow
07:40 yko you mentioned that in my example sessions are used only theorectical, i'm trying to tell you that i'ts absolutely working code
07:40 alnewkirk no, I was saying that the couple paragraphs I read in Growing I thought were theorectical
07:40 alnewkirk your example was fine (good)
07:41 yko ah. sorry. that should be my bad english
07:41 alnewkirk question, the default 404 page, how do I change that, or other status pages
07:42 * alnewkirk wonders if he should grep the guides again?
07:42 yko place not_found.htm.ep into your templates dir
07:42 yko *.html.epl
07:42 yko damn! not_found.html.ep :)
07:43 yko are you ::Lite now?
07:43 alnewkirk no, full app
07:43 yko oh. that you should already have it. no?
07:43 alnewkirk brb
07:44 yko htere was little changes last month. let me check it
07:44 alnewkirk not in public or templates
07:45 yko oh. it's compiled in controller now.
07:45 yko you can get it with mojo inflate --class=Mojolicious::Controller
07:45 yko in that way youll have exception.html.ep and not_found.html.ep in your templates dir.
07:46 yko but actually if you know how your 404 should look - just place the code into templates/not_found.html.ep
07:47 alnewkirk okay cool, thanks
07:49 breaker313 joined #mojo
07:51 alnewkirk man this is fun
07:54 yko but remember that M::Sessions are stored userside (signed). don't put there your credit card # and mother's maiden name
07:55 yko but i think you can use both as secret() :)
08:08 alnewkirk why not server-side sessions (as files)?
08:09 alnewkirk i always liked storing files for session handling
08:16 moritz as soon as you want to bind sessions to accounts (and not individual log-in procedures) you need to store server side stuff anyway
08:19 yko it been told that server side sessions sucks :)
08:20 koban left #mojo
08:20 koban joined #mojo
08:20 moritz yko: that's a bold overgeneralization
08:20 moritz both have advantages and drawbacks
08:20 yko mortiz: absolutely!
08:20 purl Quite so.
08:21 zipkid Sure!
08:21 zipkid Hi btw :-)
08:21 yko btw, if somebody really need something more than M::Session for serverside, you should know
08:22 yko that failing test in mojox-session is a lie. it's test fails, not mojox-session :)
08:22 yko from other hand it shows how this package is maintained. so, consider
08:23 yko anyway if you want tests to run there's patch https://github.com/yko/mojox-session you can use it
08:24 alnewkirk lol
08:24 alnewkirk vti?
08:24 purl it has been said that vti is awesome!
08:24 yko lol
08:24 yko ye
08:25 alnewkirk yko: thanx, forgot about github hehe
08:25 yko oh. sorry. he applyed patch
08:25 yko dont use my repo! :D
08:26 yko clone from original https://github.com/vti/mojox-session/
08:28 alnewkirk ah, cool
08:28 koban left #mojo
08:28 alnewkirk vti, release release release
08:29 koban joined #mojo
08:45 kaare left #mojo
08:46 kaare joined #mojo
08:48 ok22 joined #mojo
08:48 kvorg left #mojo
08:50 kaare left #mojo
08:53 sri moin
08:53 zipkid llo
08:55 sri alnewkirk: sessions in files are always bad
08:55 sri they are slow, don't scale across multiple servers...
08:56 yko sri++
08:57 sri client side sessions are more than enough most of the time, if you need to store state server side you should just make it part of your normal model
08:58 moritz one server is enough most of the time too :-)
08:58 alnewkirk moritz++
08:58 sri scaling is hard lets go shopping!
08:59 * moritz goes shopping
08:59 alnewkirk and deciding to switch from File.pm to Memcache.pm seems pretty painless to me, as far as scale is concerned
08:59 moritz alnewkirk: you don't want memcache fuer sessions
08:59 moritz because memcache is, well, a cache
08:59 zipkid Anyway... who of you is going to FOSDEM?
08:59 moritz and might lose data when the memory fills
09:00 alnewkirk moritz: jus sayn
09:00 sri cookie sessions are a nice middleground and just work in 99% of all sensible use cases
09:01 sri it encourages sensible sessions use imo
09:01 zipkid sri: safe enough?
09:01 sri since if you're storing more than a user name and a flash message you're usually doing it wrong
09:01 sri zipkid: they are signed
09:02 sri sensible information should be store in the user profile, on the model layer
09:02 zipkid s/sensible/sensitive/ ?
09:02 sri right
09:03 zipkid ok :-) Just wanted to be sure.
09:03 alnewkirk sri: cant say i disagree (atm)
09:04 perlrocks Twitter: "mojolicious try to move. Perl is hard I wish. . ." (ja) --alpha_ajax http://twitter.com/alpha_aj​ax/status/25115827875348481
09:04 sri what i like most about cookie sessions is that they are about as RESTful as a session can be
09:06 alnewkirk should I put my auth-check in $r->bridge('/')->to(cb => sub{...})
09:06 alnewkirk even though '/' is my index page
09:07 sri $r->under(sub {...});
09:07 sri looks better imo
09:07 zipkid alnewkirk: i have an example.... https://github.com/zipkid/mojolicious-login
09:07 * zipkid does not claim it to be the best, but it seems to work...
09:08 yko sri: i think there should be at least one route behind bridge to let user log in :) or just a static file at least
09:11 alnewkirk zipkid: thanx, but i believe under() is the best way, and i dont see the need for two routines to handle display and processing of login
09:12 alnewkirk we're spoiled, remember CGI, if ($q->method eq "POST") or some such
09:12 spleenjack joined #mojo
09:12 zipkid alnewkirk: i had one, but then i followed yko's example :-)
09:12 alnewkirk if ($self->req->method eq "POST") { ... } # seems reasonable
09:13 alnewkirk zipkid: yeah I'm going to follow that example too, though I dont quite understand all the flashing lol
09:13 kaare joined #mojo
09:14 zipkid the 'flashing' is just messages for the user... nothing to do with the actual login
09:14 * zipkid does not see what is better/different about under compared to bridge...
09:15 zipkid But... to repeat myself.... Anyone here going to FOSDEM ?
09:17 sri $r->under() is pretty much equal to $r->bridge(), just looks a bit better if used for callbacks
09:18 sri no fosdem for me
09:18 zipkid Oh... :-(
09:19 alnewkirk me either on fosdem
09:20 alnewkirk sri: what about $r->bridge('/admin')->to(cb => sub{})
09:20 alnewkirk can't do that with under right?
09:20 sri under(sub {...}) is equal to that
09:21 sri umm under('/admin' => sub {...})
09:23 alnewkirk does this look about right for authentication purposes https://gist.github.com/775919
09:25 sri looks like infinite redirect
09:26 sri the example zipkid showed was good
09:27 fhelmberger joined #mojo
09:27 verrens joined #mojo
09:27 fhelmberger left #mojo
09:28 fhelmberger joined #mojo
09:34 alnewkirk so when exactly does $r->bridge->to('Auth#protected'); execute ... before everything, per request?
09:36 zipkid alnewkirk: before every route used by the object it returns.
09:39 alnewkirk so $r->bridge('/admin')->to('Auth#protected'); would execute before all routes prefixed with /admin e.g. /admin/foo
09:39 zipkid eum...
09:45 zipkid no, you nee to look up the route syntax for that.
09:45 zipkid need
09:55 alnewkirk at this point i think im lost in the language "bridge", catalyst has "begin" and dancer has "before" both of which makes since as they do what the keyword suggests in thier context
09:56 alnewkirk i guess im looking for a way to process a routine for each request matcing a pattern, i suppose i looking for a sorta before function
09:57 alnewkirk i feel stupid because im pretty-sure that what the bridge function does but im unclear
09:57 zipkid alnewkirk: wether it matches has NOTHING to do with the bridge() syntax but with the route you define!
09:57 crab what do you want to accomplish?
09:57 zipkid so look at the routing pod first!
09:58 otaviof joined #mojo
10:01 alnewkirk zipkid: http://search.cpan.org/~kraih/Mojolicious-1.0​1/lib/Mojolicious/Guides/Routing.pod#Bridges < based on reading this section (x5) and reviewing the example
10:02 alnewkirk it is not obvious to me the significance of $r->bridge('/foo')
10:04 alnewkirk oh i see
10:04 zipkid all routes you define on/under that bridge will apply to urls beginning with '/foo'
10:06 alnewkirk i see that now, and thats actually what i said earlier
10:06 alnewkirk 04:39 < alnewkirk> so $r->bridge('/admin')->to('Auth#protected'); would execute before all routes prefixed with /admin e.g. /admin/foo
10:06 alnewkirk ^^ yes
10:07 zipkid alnewkirk: ah, right, sorry... me bad!
10:08 alnewkirk no problem, i glad i went the extra step because now i really understand it
10:21 Akron joined #mojo
10:45 ok22 left #mojo
10:57 su-bzero[A] is now known as su-bzero
11:03 sri http://superuser.com/questions/231273/for​-what-are-the-windows-a-and-b-drives-used # damn, now i'm really old :(
11:04 moritz uhm, floppies?
11:04 purl floppies are dumb when i have bootable cdrws
11:04 yko lol
11:04 * moritz too lazy to follow the link
11:05 yko when i was child i saw 8", somebody used it as frisby
11:05 sri moritz: obviously you're old too
11:06 yko but what i have seen enough it's a punched cards
11:27 chansen what about tape recorder, would that be 0:\\ ?
11:28 moritz didn't they work over parallel ports? :-)
11:33 chansen I guess it would, only computer tape recorder I have owned was a Commodore 1530.
11:35 chansen you didn't even needed a computer to copy your data, a double tape recorder was enough =)
11:36 yko chansen: i played my first games from tape records actually
11:36 yko and first doom deathmatch wath over LPT, ye!
11:36 yko *was
11:37 yko we were covering floor of first level with our bodies for hours!
11:38 chansen =)
11:40 yko damn, i had old soviet broken tape recorder and had to press 'play' button hardly all the time while game loading (5-10min)
11:40 yko and if i release button just a bit error occured and i had to start from beginning :'(
11:47 yko but what was that games! CGA graphics with TV as a dislpay, 320×200 and 4 colors!
11:48 yko even some sound grunts from speaker from time to time http://bit.ly/dOt79F
11:48 yko oh. i think i'm talking too much again
11:50 sri :)
12:25 GitHub152 joined #mojo
12:25 GitHub152 mojo: master Sebastian Riedel * ca59ed9 (2 files in 2 dirs): more documentation - http://bit.ly/hOOZqn
12:25 GitHub152 left #mojo
12:26 sri http://mojolicio.us/perldoc​?Mojolicious/Commands#help
12:26 sri more links :)
12:40 GitHub136 joined #mojo
12:40 GitHub136 mojo: master Sebastian Riedel * 491ce6d (1 files in 1 dirs): added better daemon example - http://bit.ly/fKdfuM
12:40 GitHub136 left #mojo
12:41 su-bzero is now known as su-bzero0
12:42 su-bzero0 is now known as su-bzero-scorpion
12:44 su-bzero-scorpion is now known as Topic
12:55 GitHub183 joined #mojo
12:55 GitHub183 mojo: master Sebastian Riedel * 2953508 (3 files in 1 dirs): added more examples - http://bit.ly/eAZr9I
12:55 GitHub183 left #mojo
12:57 alnewkirk is this the best way to get hashref of parameters? my $params = { @{$self->req->params->{params}} };
12:57 sri $self->req->params->to_hash?
12:58 sri your way would kill params with multiple values
12:58 sri to_hash preserves them in an arrayref
12:59 alnewkirk sri: thanx, gotcha
12:59 * yko hates text_field helper name
12:59 sri yko: how come?
13:00 yko not sure :)
13:00 sri well, you're free to alias it :)
13:01 yko wont untill TagHelpers marked as experimental
13:01 sri app->helper(yko_rockz => app->renderer->helpers->{text_field});
13:04 * sri wonders if he should make Mojo::DOM non experimental
13:06 yko can't say anything on that, you'd better know when
13:06 yko but actually too many things rely on DOM now
13:06 sri ye, and i've had no complaints in like forever
13:06 sri seems rather complete now
13:07 yko ye
13:07 sri i think the main reason it is still unstable are "before" and "after"
13:08 sri since they clash with Moose
13:11 sri i kinda tend towards renaming them to add_before and add_after
13:17 GitHub177 joined #mojo
13:17 GitHub177 mojo: master Sebastian Riedel * 512c1e0 (3 files in 3 dirs): renamed after and before in Mojo::DOM to add_after and add_before - http://bit.ly/e23jA3
13:17 GitHub177 left #mojo
13:18 sri ok, not many reasons to keep it experimental now
13:32 jfuller What's the correct namespace for plugins?
13:32 sri Mojolicious::Plugin for those you want on cpan
13:33 avkhozov left #mojo
13:34 avkhozov joined #mojo
13:34 jfuller Thanks
13:34 GitHub189 joined #mojo
13:34 GitHub189 mojo: master Sebastian Riedel * 2b69451 (13 files in 7 dirs): removed experimental status from many modules, attributes and methods - http://bit.ly/dJ7lLt
13:34 GitHub189 left #mojo
13:35 sri not much left experimental now :)
13:37 perlrocks Twitter: "Removed experimental status from a lot of #mojolicious features today, including Mojo::DOM, enjoy! :) http://t.co/fdZiK2N #perl" --kraih http://twitter.com/kraih/status/25184594030501888
13:38 ashleydev joined #mojo
13:39 Akron sri: So namespaces are not intended to be in Mojo::DOM?
13:39 sri Akron: what do you mean?
13:40 Akron CSS3 namespace things.
13:41 sri have you ever used those?
13:41 sri they are pretty horrible
13:41 alnewkirk Mojo::DOM is great for unit tests
13:42 sri the big problem with CSS3 namespace selectors is that they require setup
13:42 Akron I think, when you want to do rdf stuff and the like, namespace queries and may be a "strict" mode would be nice in Mojo::DOM.
13:43 Akron What do you mean with "setup"?
13:43 sri Akron: what api do you propose?
13:43 sri i'm quite sure you're misunderstanding them
13:43 Akron ?
13:43 sri show me how you would like to have the api look like
13:44 ashleydev left #mojo
13:44 perlrocks Twitter: "http://t.co/fdZiK2N many changes in mojolicious" (ru) --mcsseifer http://twitter.com/mcsseife​r/status/25186449468948481
13:46 Akron Ah - okay. Well - first I would introduce the ns things like $dom->xmlns(rdf => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'); - just like mime-types.
13:46 Akron And then use my ns-handles as the ns-prefixes.
13:47 Akron The thing is - that this have to work with ns islands as well ... so it would make the parsing process a little bit more complex.
13:48 yko Akron: let me ask, what for?
13:48 sri ok, you didn't misunderstand it :)
13:48 sri but yea, that api will be pretty horrible
13:49 Akron sri: What do you mean? yko: As I said: RDF or XRD related stuff.
13:49 sri takes all the simplicity out of css selectors
13:49 sri that said, we do support xml namespaces differently
13:49 Akron sri: And it would make the parsing a lot more tricky ...
13:49 sri not at all
13:50 sri http://mojolicio.us/perldoc?Mojo/DOM#namespace
13:50 sri we can look up element namespaces already
13:50 Akron You support namespace islands at the moment already?
13:50 yko dom stores information about namespaces now
13:50 sri yes
13:51 sri it is rather slow, but nobody does xml namespaces anyway ;p
13:51 sri https://github.com/kraih/mojo/​blob/master/t/mojo/dom.t#L363
13:53 Akron Ah - nice! Sorry - I did not checked that. I thought you only checked prefixes ...
13:57 sri my main problem with the namespace setup requirement is that it makes all the nice apis so much harder
13:57 sri like our test functions
13:58 sri $t->text_is('foo > bar', 'hello!');
13:59 Akron Hm. Okay.
14:01 Akron And I agree: The CSS3 way to it is ugly.
14:03 jfuller What are Mojolicious' primary competitors?
14:04 sri PHP
14:04 jfuller lol, that's a tough nut to crack
14:05 sri arguably Rails and Django too
14:05 sri with the full-stack addon, less arguable
14:06 jfuller Not the answers I was expected, but admirable scope
14:06 jfuller expecting*
14:07 sri perl folks would most likely say Catalyst, but it is really its predecessor
14:08 jfuller And what of others like dancer, jifty, etc...?
14:08 alnewkirk perl competition or any?
14:08 sri i only really watch projects that innovate
14:09 yko lol
14:09 alnewkirk :) cute
14:09 yko just compare their webpages. don't you see that mojolicious is a much more beautiful?
14:09 yko :)
14:09 alnewkirk :)
14:09 alnewkirk yko: good marketing
14:09 purl good marketing is great good technology
14:09 alnewkirk undef purl
14:10 jfuller yko: If I went by web marketing I would probably use rails. But, since I have used rails, I know better
14:10 tempire jfuller: you should know that sri isn't being a goober when he says that, he's just making statements based on other project's directions
14:11 alnewkirk Mojolicious vs Rails is an unfair comparision
14:11 alnewkirk comparison*
14:11 jfuller tempire: I don't doubt it, there is so much reinventing the wheel out there
14:11 jfuller My biggest hang up is the zero dependency philosophy
14:12 alnewkirk i just stumbled across http://www.playframework.org/
14:12 sri jfuller: it's not a philosophy
14:12 tempire jfuller: really?  I can't imagine why that would be a problem for anyone
14:12 jfuller sri: What is it?
14:12 purl it's it!
14:12 alnewkirk i consider myself somewhat of a web framework conconnoisseur
14:12 sri jfuller: we actually use optional prereqs
14:12 jfuller purl: So it is
14:12 purl OK, jfuller.
14:13 alnewkirk if one were to make a Rails out of Mojolicious, what should it be called
14:13 sri making it easy to get going with mojolicious is what you could call the philosophy
14:14 jfuller In a way it is somewhat of a perfect fit because the primary reason I am looking is for work, and I cannot even get all the dependencies for other frameworks to install under win32
14:14 alnewkirk jfuller++
14:14 alnewkirk dancer works well now, its not mojo tho
14:15 * yko switching to rails: their web page too beautiful!
14:16 * sri chains yko to the channel wall again
14:16 alnewkirk my github feed now has something in it called Pickle "yet another web framework"
14:16 yko -_-
14:16 alnewkirk havent looked yet
14:16 * tempire loves ruby websites
14:16 * tempire mourns the hash rocket
14:19 alnewkirk funniest thing, this guy i work with said "Microsoft ASP.NET has this new technology called MVC" lol
14:20 sri but do they have a pretty website?
14:20 ryan joined #mojo
14:20 * sri wonders when oracle finally kills java
14:21 sri whats really funny about microsoft is their attempts at open source
14:21 jfuller 12/21/2012
14:21 purl 0.000284010224368077
14:22 alnewkirk sri: whats funnier is how they repackage open source and thier follows believe thier innovating
14:23 sri when they release a new version of something they delete their public repositories and start fresh
14:23 jfuller So how far behind are browsers in being able to support mojo's full feature set?
14:24 sri we don't expect much from browsers
14:24 sri little html5
14:24 sri websockets are not production ready anyway
14:29 kthakore is now known as Texas
14:29 Texas is now known as kthakore
14:34 mateu what's preventing websockets from being production ready, beside the handshake issue?
14:34 sri the handshake issue
14:34 mateu until that's fixed the only safe way to do websockets is in a LAN?
14:34 sri the ietf working group is still arguing about it
14:35 sri safe?
14:35 purl somebody said safe was Safe.  Storable is Storable.
14:35 sri security risks are minimal at best
14:36 sri the flaw is a strawman argument to prevent early adoption of the unfinished spec
14:36 mateu an environment where one doesnt' have to worry about the proxied data gettign highjacked
14:36 sri it is a general http flaw
14:36 sri not websocket specific
14:37 mateu huh, news make it sound websocket specific
14:37 mateu the handshake in particular, so what's up?
14:37 sri read the mailing list for yourself
14:37 sri http://www.ietf.org/mail-archive​/web/hybi/current/maillist.html
14:38 sri the latest handshake is total bullshit
14:38 sri requiring AES
14:38 sri pure perl websockets might not be possible
14:39 mateu hard to have pure perl around in a C world
14:47 marty Good morning folks!
14:48 marty Any thoughts on Moose+Mojolicous for large apps?   Better to use Moose or better to use plain old perl?  Thoughts, comments, rants?  :)
14:48 sri whatever makes you happy
14:49 marty So I take that as meaning - there are no inherent structural conflicts between Mojo and Moose?
14:50 marty <--- has never used Moose, but concidering it.
14:52 alnewkirk marty why?
14:52 alnewkirk just curious
14:54 marty From what I can grasp.  Using Moose would take a lot of the grunt work out of creating my objects and classes.
14:54 alnewkirk marty: true, ... so would a kick-ass scaffolding script *hint*
14:55 marty You mean something like that vaporware, err... Mojolicous thingy?
14:56 marty You know, cuz, nothing in the perl world is new.   :)  At least that's what I read on the internet.  :)
14:56 alnewkirk i dont think we have access to the Mojo::Command::Generate namespace
14:56 alnewkirk marty: dont believe everything you read on the interwebs
14:58 marty Alnewkirk:  So I take it you favor the "no moose/mouse/etc" route with Mojolicous ?
14:58 alnewkirk i just watched a video where dhh soiled himself talkin about ruby's moneypatching-ability
14:59 alnewkirk marty: i haven't really used Moose, ..., but mainly because I didn't see to benefit beside bragging rights
14:59 kaare left #mojo
14:59 * mateu hugs a Moose
15:00 marty Ya.  I look at Moose and I like the "less typing" part.  But there is always so much baggage that goes along with it.  So, I'm still undecided.
15:03 alnewkirk as i understand it, theres a Moo which has less calories than Moose
15:04 sri moneypatching? :)
15:05 alnewkirk sri: yes, overwrite core functions like join() lol
15:06 sri "money"
15:06 mateu in my pocket please :0
15:06 alnewkirk oh schnapp
15:06 alnewkirk monkey-patching
15:06 * sri liked his freedom-patching talk
15:06 alnewkirk me too
15:07 alnewkirk moneypatching is what i do every first of the month
15:07 * yko patches mateu money
15:07 yko now you have your money 'less calories' :)
15:08 mateu nice, now I can go have a latte w/ skim milk and a artificially sweetened donut
15:09 alnewkirk why doesnt liquor have nutritional facts on them?
15:21 koban left #mojo
15:21 koban joined #mojo
15:23 koban left #mojo
15:23 koban joined #mojo
15:28 forwardever joined #mojo
15:29 Topic is now known as su-bzero
15:35 koban left #mojo
15:35 koban joined #mojo
15:39 koban left #mojo
15:52 jdixon joined #mojo
15:52 jdixon morning
15:52 * sri waves
15:52 jdixon sri: I feel stupid this morning  :)
15:52 jdixon Can't locate object method "log" via package "Mojolicious::Routes" at /usr/local/libdata/perl5/sit​e_perl/Mojo/Server/Daemon.pm line 320.
15:53 sri ->app->log
15:53 jdixon I'm not calling log anywhere in my code.
15:53 jdixon oh shite, 1 sec
15:54 jdixon lulz
15:54 jdixon helps if I call app->start.  :)
15:57 Christian cu all
15:58 Christian left #mojo
16:09 otaviof left #mojo
16:23 barwin joined #mojo
16:24 barwin hi all, i'm having a problem getting Mojo::Client to do what I need it to do .. hope someone can help
16:24 marty Fire away barwin
16:25 barwin I am trying to to override the 'User-Agent' header for a GET request, which works fine unless that request gets redirected.  The User-Agent gets reset to 'Mojolicious (Perl)' for the subsequent requests.  Is there a way to make that particular header persist?
16:25 yko barwin: you can do it only in Transaction
16:26 barwin I tried using transactions, but for some reason redirects weren't followed at all... even though I have max_redirects is > 0
16:26 yko oh. for subrequests  :)
16:26 yko for subrequests you can not do it :)
16:26 barwin yea.... subrequests
16:26 kvorg joined #mojo
16:26 barwin Damn...
16:26 purl barwin, you are fined one credit for violation of the verbal morality statute.
16:27 barwin I was afraid that might be the answer
16:27 sri i'm open for suggestions how to do it properly
16:27 barwin it would be nice if the default user-agent text could be overridden at initialization time
16:27 barwin currently the 'Mojolicious (Perl)' user-agent text is hardcoded into the _tx_start sub
16:27 ashleydev joined #mojo
16:28 barwin sri, perhaps it could be set at the client level, much like max_redirects is?
16:28 yko sri: actually it really would be nice to have $client->user_agent property
16:28 sri would prefer a more general purpose solution
16:29 yko i would like $client->default_headers even more but i think it can cause some problems.
16:29 sri yes it could
16:29 purl if you patch it
16:32 barwin I'm pretty new to Mojo so I'm still figuring out the internal nuts and bolts
16:32 barwin a property in Client seems the easiest path ... and I think User-Agent is a special enough case that perhaps it does deserve its own property there?
16:33 yko from other hand, if place headers merging somewhere here... https://github.com/kraih/mojo/blo​b/master/lib/Mojo/Client.pm#L1038
16:33 yko but i'm not really sure
16:35 su-bzero_ joined #mojo
16:35 barwin that sounds reasonable
16:35 su-bzero_ sri: It's time to unban *we.like.check-host.net ;)
16:36 sri su-bzero_: i've not decided yet if i do it at all
16:38 GitHub66 joined #mojo
16:38 GitHub66 mojo: master Sebastian Riedel * ca2ce1c (2 files in 2 dirs): added experimental user_agent attribute to Mojo::Client - http://bit.ly/emhAF2
16:38 GitHub66 left #mojo
16:38 yko yay! thanks
16:39 sri the rfc needs to be reviewed for general purpose header merging
16:39 sri so much to go wrong :/
16:39 barwin Thanks!!
16:39 sri i guess at some point someone will want to use digest authentication with redirects
16:40 yko sri: i understand, that's why i'm not begging for that 2 days a week :))
16:40 su-bzero_ sri: Why? We will very calm. ;)
16:46 kaare joined #mojo
16:48 sri http://tech.slashdot.org/story/11/01/12/154924​6/Major-Sites-To-Join-lsquoWorld-IPv6-Dayrsquo # haha, that should be fun
16:49 * sri predicts it will be a total failure
16:50 sri the big problem will be routers
16:51 breaker313 left #mojo
16:51 yko hmm. ye, should be fun :)
17:21 otaviof joined #mojo
17:25 yko can i pause and then release somehow in bridge?
17:25 yko i suppose no, but maybe...
17:26 sri nope
17:26 yko ok
17:29 Akron left #mojo
17:31 ysyrota left #mojo
17:42 GitHub58 joined #mojo
17:42 GitHub58 mojo: master Sebastian Riedel * b773861 (47 files in 12 dirs): improved Mojo::Base a bit - http://bit.ly/g9DW03
17:42 GitHub58 left #mojo
17:42 yko Oo
17:42 sri :)
17:43 sri less attr calls
17:45 yko hmm. nice
17:46 sri think thats about as minimalistic as it gets
17:46 yko not much impact for speed though, but... 10 calls from each package... )
17:47 sri don't think it has any impact
17:48 yko if it saves even 0.5% of load time it's good anyway. if it doesn't break design sure
17:48 sri :)
17:48 yko cgi guys must be happy now! :)
17:57 spleenjack left #mojo
18:06 forwardever think code is harder to read now: https://github.com/kraih/mojo/blob/b77386188​17e1d143bf11c9b117a973c91cb073b/lib/Mojo.pm, using has instead of __PACKAGE__->attr would have been nice
18:11 sri has would clash with Moose
18:11 su-bzero_ left #mojo
18:12 forwardever but you don't use moose internally
18:12 mateu forward thinking++
18:13 sri just because we don't use it doesn't mean we can't worry about clashing with it
18:15 forwardever when would such problems occur? when using "has" in controllers in combination with moose?
18:15 su-bzero_ joined #mojo
18:15 sri likely
18:16 sri https://github.com/kraih/mojo/blob/ca2ce1c5eba​bc49f047d75ee229648abb92f2417/lib/Mojo.pm#L15
18:16 sri vs
18:16 sri https://github.com/kraih/mojo/blob/b7738618817​e1d143bf11c9b117a973c91cb073b/lib/Mojo.pm#L15
18:17 sri put them next to each other and say again that the old one was cleaner :)
18:17 yko :)
18:18 * yko tries to lie and his nose is growing
18:19 forwardever when it comes to code refs, the older code was cleaner, attr( foo => sub { sub { is confusing (, when defaults are simple, the newer version might look better, but not sure
18:20 yko another silly question: can i block with existing connection?
18:20 sri not sure what you mean
18:22 yko app uses IOLoop->singleton. i have ready connection inside it. i need to write and block till server response
18:23 sri ah, no you can't
18:23 yko thanks again :)
18:23 sri new requests would come in
18:23 sri they might then block too
18:23 sri and you get deep recursion
18:24 yko hmm. okay, from other hand. cand i pass connections between ioloop? :)
18:24 yko connection between ioloops
18:24 sri sure
18:24 yko thanks
18:24 sri only the cleanup code could get in your way
18:25 yko uh. ye
18:25 sri close the connection or so once your second ioloop dies
18:25 yko what i'm trying to achieve is blocking mode for MojoX::Redis without creating new connection
18:25 sri do it like Mojo::Client?
18:26 yko hmm. not so
18:26 yko it connects only once
18:26 sri thats not very clever
18:26 yko to the server, and then using existing connection
18:26 yko hmm, but why?
18:26 purl it has been said that but why is it undef and later the valu eis set
18:27 sri what about parallel requests?
18:27 sri or do you open a new connection for every request?
18:27 sri (http requests)
18:28 yko i'm thinking about it now. MojoX::Redis works like fifo, that shouldnt be bad
18:28 yko running under hypnotoad youll have N connections from each worker
18:29 yko why to multiple connections inside worker?
18:29 GitHub90 joined #mojo
18:29 GitHub90 mojo: master Sebastian Riedel * 6127fff (1 files in 1 dirs): fixed typo - http://bit.ly/hiGxIw
18:29 GitHub90 left #mojo
18:37 sri actually i might be wrong
18:37 sri "has" could be possible
18:40 avkhozov left #mojo
18:40 avkhozov joined #mojo
18:44 su-bzero_ left #mojo
18:44 su-bzero_ joined #mojo
18:45 arthas left #mojo
18:46 yko if talk about speed, caller 20% faster than shift on 5.10.1, 5.12.2: https://gist.github.com/776637
18:48 yko but not a big income, "savings on matches"
18:50 sri forwardever: the problem with has is that you need to import it in every subclass
18:51 yko and base doesn't call import
19:01 barwin left #mojo
19:02 su-bzero is now known as su-bzero[A]
19:06 forwardever sri: not sure what you mean, as I'm not an expert when it comes to these kind of things, e.g. vtis boose has: my $package = caller; *{$package . '::' . 'has'} = sub { caller->attr(@_) }; (slightly modified, hope i did it right)
19:06 sri you are missing the complicated part
19:07 sri use Mojo::Base;
19:07 sri would have to be in every subclass
19:07 sri and you need to handle "new" very different
19:08 sri because use Mojo::Base imports it again
19:08 sri and thats just the start
19:08 sri you need a mini-moose
19:12 spleenjack joined #mojo
19:12 spleenjack left #mojo
19:21 su-bzero[A] is now known as su-bzero-0
19:28 ashleydev left #mojo
19:28 fhelmberger left #mojo
19:35 sri use Mojo::Base ':base'; something like that could work
19:36 yko do you think we need that?
19:36 sri dunno, do we? :)
19:36 * yko needs some brandy and girfriend
19:36 yko and, damn, websocket!
19:37 yko but that can wait a bit
19:37 su-bzero_ yko: Asyncronyous bridges?
19:39 sri hmm
19:40 yko hmm. sri, talking about async nosql databases...
19:40 sri hmm, it actually works
19:40 sri use Mojo::Base ':base'; is possible
19:40 yko umm?
19:41 sri use Mojo::Base '-base';
19:41 sri has 'cookies';
19:41 su-bzero_ Async nosql database + async bridges also.
19:41 yko how about sub new { my $self = shift->SUPER::new() } ?
19:41 sri no hacks needed
19:42 yko use Mojo::Base will patch caller @ISA ?
19:42 sri ye
19:42 yko than Mojo::Base should behave same as base.pm, ye?
19:43 sri ye
19:43 MojoGuest287 joined #mojo
19:43 MojoGuest287 From: http://www.google.pl/search?sourceid=ch​rome&amp;ie=UTF-8&amp;q=websockets+demo (2 hits)
19:43 yko looks like there's a lot of code to implement that :\
19:43 MojoGuest287 left #mojo
19:43 sri you would use "use Mojo::Base '-base';" and "use Mojo::Base '-has';" or so
19:44 yko actually i like that idea
19:44 sri -has in subclasses where you don't want to mess with ISA
19:44 yko just unsure if it can make mojo slower
19:44 sri unlikely
19:44 sri there is no real overhead
19:45 sri except for a few import calls
19:45 yko it would be interesting
19:49 forwardever use Mojo::Base qw/new has extends/
19:50 sri it doesn't work that way
19:50 forwardever hmm
19:53 sri interesting, implemented in 10 lines :)
19:53 sri 7 without debug warnings ;p
19:54 forwardever sri: will plugins using Mojo::Base have to be adjusted?
19:54 sri not at all
19:55 forwardever okay, that's good
19:55 sri i'm not even sure i'll commit this
19:57 sri it looks quite sleek though
20:00 sri http://pastie.org/1453757 # yes or no?
20:01 sri absolutely nothing should break
20:01 forwardever like it, code much more readable
20:02 yko sri: looks good
20:02 sri oh another idea :)
20:03 sri package Foo; use Mojo::Base '-base'; package Bar; use Mojo::Base 'Foo';
20:04 yko uhmmm
20:04 yko use mojo::base than. it's directive
20:04 yko but that not acceptable. too much changes
20:06 yko donno, i like gist but what to do with inheritance
20:06 sri see above
20:07 sri inheritance is no problem at all
20:07 sri it stays just like it is now
20:09 yko hmm. you're too fast
20:09 yko commit as experimental? :)
20:10 yko finally, you can remove it if something goes wrong
20:10 sri of course it would be experimental :)
20:10 yko you won't create separate branch for such stuff i know :)
20:10 sri it is actually quite harmless
20:11 yko i think so too
20:12 yko :))
20:12 forwardever use Mojo::Base: has 'cookies'; extends 'Mojo::Base'; also not possible? (it's longer, but perl convention)
20:13 sri forwardever: absolutely unrealistic
20:15 barwin joined #mojo
20:16 ispy_ left #mojo
20:19 sri scary, everything works at first try
20:21 yko scary. idd you miss something? :)
20:21 janus yko: caller is faster as it doesnt modify the stack
20:22 yko janus: agree. that benchmark shows nothing actually
20:28 ashleydev joined #mojo
20:28 sri use Mojo::Base '-base'; will also turn on strict and warnings
20:29 barwin Hey guys. I'm having trouble getting requests to work with https_proxy (SSL proxy).  Regular (non-ssl) http_proxy requests work fine though.  And non-proxied SSL requests also work.  Has anyone else had trouble with this?  I'm using tinyproxy as the proxy server, and if I just point Firefox to it, it works great for both SSL and non-ssl requests, so I'm pretty sure it's not the proxy itself with the issue.
20:29 barwin (sorry i said proxy so many times) ;)
20:30 sri do you have IO::Socket::SSL installed?
20:31 sri we depend on openssl for https
20:31 barwin sure do.  Regular SSL requests died until i got that :)
20:31 barwin but i've confirmed that non-proxied SSL requests work great with mojo::client
20:32 yko janus: from other hand https://gist.github.com/4c6b4e6f390a70bc3130 what about that? :)
20:32 barwin sri, do you know of a proxy server it works well with? I can test it out.  Perhaps it's just a bad mix between Mojo and TinyProxy
20:32 sri there is even a test for https with proxy
20:33 sri https://github.com/kraih/mojo/blob/master/t​/mojolicious/websocket_tls_proxy_lite_app.t
20:33 sri there's a connect proxy inlined :)
20:33 sri it's the same we ship in the examples directory
20:34 sri https://github.com/kraih/mojo/blob​/master/examples/connect-proxy.pl
20:35 barwin hrmm, okay thanks sri.  I'm either doing something or TinyProxy is busticated. I'll take a look at those tests/examples. Thanks!
20:48 barwin my code works just fine with the connect-proxy.pl example ... must be TinyProxy's fault. Sorry about that.
20:49 sri maybe it doesn't like verbose connect requests or so
21:00 yko hmm. so about nosql async databases...
21:00 yko should app structure contain model and controller separate or controller should contain model-related code?
21:12 ltriant joined #mojo
21:12 tempire_ joined #mojo
21:12 * tempire_ is going to his first perl conference this weekend
21:12 tempire_ hooray!
21:12 * tempire_ looks around for his mojolicious socks
21:13 * tempire_ NEEDS MOJOLICIOUS APPAREL
21:13 sri \o/
21:13 * sri wouldn't mind new socks either
21:13 yko sri: we should have print-ready vector for prints!
21:14 tempire_ sri, if you send me the mojolicious logo vector art with the cloud thing, I may be able to hack up a t-shirt.
21:15 * tempire_ wonders if it's wise to embroider underwear
21:15 sri hmm, not sure one of the current logos is right for a t-shirt
21:16 tempire_ there's no mojo representation @ perl oasis.  We should at least have something.
21:17 sri a hacked up t-shirt would be counter productive though :S
21:17 tempire_ I'm thinking of a basic black t-shirt with a moderate to midsized mojolicious logo right in the middle
21:17 tempire_ on the front
21:18 sri the glass one?
21:18 purl hmmm... the glass one is still great. you should do more playing like that. =)
21:18 tempire_ this one: http://mojolicio.us/mojolicious-white.png
21:19 sri shouldn't be a problem
21:19 tempire_ look @ my avatar.  clearly I'm somewhat pretentious :)
21:19 tempire_ if it's not pretty, I won't wear it.
21:19 sri :)
21:19 sri svg export might be tricky :S
21:20 sri huge png enough?
21:20 tempire_ you're using sketch, right?
21:20 sri right
21:20 tempire_ I'm still on the trial of that, I'll see what I can do with it.
21:20 sri ok
21:20 sri email?
21:20 purl email is for old people
21:20 sri :D
21:20 tempire_ I have an embroidering machine here.  it might work out.
21:20 tempire_ yes
21:22 sri which address?
21:22 purl hmmm... which is annoying. and I had a command line "1 liner" to sort of do it, but I can't find it or how Palin appeared: basically nobody knew who Palin was, except that the ballot had three things, and the other two were practically fresh from prison, so, dot dot dot. or ugly
21:23 tempire_ tempire@cpan.org
21:23 tempire_ seems wrong to post an email address in a publicly logged channel.
21:23 tempire_ but I suppose it's already listed on the cpan
21:23 yko irc allows to send private messages :p
21:24 tempire_ doh
21:24 tempire_ forgot about that
21:24 sri lol
21:47 ok22 joined #mojo
21:49 alnewkirk left #mojo
21:55 kaare left #mojo
21:59 kvorg left #mojo
22:01 GitHub86 joined #mojo
22:01 GitHub86 mojo: master Sebastian Riedel * 3c2998b (87 files in 18 dirs): added experimental much prettier attribute generator to Mojo::Base - http://bit.ly/gKcyDU
22:01 GitHub86 left #mojo
22:02 sri rather big commit :)
22:02 yko ohhh
22:03 sri http://mojolicio.us/perldoc?Mojo/Base#SYNOPSIS
22:03 sri there's an example
22:03 sri oh typo :S
22:03 yko ye :D
22:04 yko damn, looks good
22:04 yko sri++
22:04 yko forwardever++
22:04 GitHub16 joined #mojo
22:04 GitHub16 mojo: master Sebastian Riedel * 90f461f (1 files in 1 dirs): fixed typo - http://bit.ly/ehbiBh
22:04 GitHub16 left #mojo
22:04 forwardever sri did all the work :) sri++
22:05 sri forwardever++ # for being persistent
22:05 sri yko++ # just because
22:05 yko group hugs :D
22:05 sri http://mojolicio.us/perldoc?Mojo/Base#SYNOPSIS
22:06 moritz .oO( maybe I should bring hugme in )
22:06 sri hugme?
22:08 tempire_ fantastic
22:09 janus congrats and thanks for getting rid of an indentation level :)
22:10 sri :)
22:12 GitHub82 joined #mojo
22:12 GitHub82 mojo: master Sebastian Riedel * a039c3c (1 files in 1 dirs): fixed more typos - http://bit.ly/fFCOyK
22:12 GitHub82 left #mojo
22:13 janus the tiger is nice, too :)
22:19 GitHub152 joined #mojo
22:19 GitHub152 mojo: master Sebastian Riedel * 9d3ab9c (1 files in 1 dirs): pod tweaks - http://bit.ly/ebAJOR
22:19 GitHub152 left #mojo
22:23 perlrocks Twitter: "Added a pretty new accessor generator to #mojolicious today, enjoy. :) http://t.co/l3A6WE8 #perl" --kraih http://twitter.com/kraih/status/25317053619511296
22:28 GitHub183 joined #mojo
22:28 GitHub183 mojo: master Sebastian Riedel * 5020842 (1 files in 1 dirs): has is hidden - http://bit.ly/dVU9YV
22:28 GitHub183 left #mojo
22:31 ispy_ joined #mojo
22:42 alnewkirk joined #mojo
22:48 megatron joined #mojo
22:50 ok22 left #mojo
22:52 barwin left #mojo
22:57 ispy_ left #mojo
23:09 perlrocks Twitter: "Wow! Super! :) RT: @kraih: Added a pretty new accessor generator to #mojolicious today, enjoy. :) http://t.co/l3A6WE8 #perl" --sharifulin http://twitter.com/shariful​in/status/25328663968874496
23:12 perlrocks Twitter: "Mojolicious:: Lite and Data:: Model with AJAX and jQuery I made a chat - it filtered its programmers Isuzu http://htn.to/zXaFyL Sunday" (ja) --kjwtnb http://twitter.com/kjwtnb/status/25329401885364224
23:19 ispy_ joined #mojo
23:27 forwardever left #mojo
23:37 ispy_ left #mojo
23:41 daviddelikat left #mojo
23:43 ispy_ joined #mojo
23:43 tempire_ left #mojo
23:46 daviddelikat joined #mojo
23:58 willem joined #mojo
23:59 ispy_ left #mojo
23:59 baton8 left #mojo

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