The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2014-01-21

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

All times shown according to UTC.

Time Nick Message
00:13 usetheforce well, there is dokku
00:13 usetheforce but I don't see it working with mojolicious... maybe I will have to change that
00:13 usetheforce seems to work with PSGI/Plack
00:14 bpmedley usetheforce: What about a simple bash script?
00:15 usetheforce yeah, that's not a bad idea. I'm trying to justify the cost of Heroku and I just can't.
00:15 usetheforce The cost of a decent database on there is mind numbing.
00:15 bpmedley Yes, I agree.  The DB cost is why I'm not on it.
00:15 usetheforce Though it is nice to do a git push and have my app tested and deployed, but I could easily accomplish it with a git hook / script.
00:16 bpmedley I'd rather use bash because hooks tend to be magical.. :)
00:17 usetheforce bpmedley, does your bash script build/deploy your app when you do a git push?
00:18 usetheforce I guess I could create a Mojo buildstep for use with Dokku... I don't really see the advantage though.
00:18 bpmedley Sorry, I don't have one currently.  My apologies for insenuating I did.
00:19 usetheforce It seems like a lot of what is coming out lately is to ease things for developers, such that they don't have to know/do any system administration. However, I am a sys admin first and developer second, so maybe all these docker, dokku, heroku things are really not that worthwhile for someone like myself. Not sure.
00:20 usetheforce And everything is freaking Ruby.
00:20 usetheforce Ruby, ruby, ruby. Bleh.
00:20 bpmedley I'd help make one.
00:21 usetheforce Actually, I am looking at it now and it seems relatively simple.
00:22 usetheforce Looks like tempire actually created something similar now that I notice it.
00:25 sri docker is actually go
00:37 good_news_everyone joined #mojo
00:37 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/QJkYeg
00:37 good_news_everyone mojo/master 8fe17b5 Sebastian Riedel: better cookbook links
00:37 good_news_everyone left #mojo
00:41 usetheforce sri, what do you mean?
00:41 usetheforce docker is go?
00:41 usetheforce written in go?
00:42 bpmedley http://www.slideshare.net/jpetazzo/docker-and-go-why-did-we-decide-to-write-docker-in-go
00:43 usetheforce Would you use Hypnotoad in a production environment with a webapp that gets thousands of visitors every hour, or would you deploy it with Apache?
00:44 bpmedley I'd love to have hypnotoad in that environment.. :)
00:45 usetheforce ok, well I will give it a go then... I am using it on a webapp now that gets about 500 hits an hour and I've yet to have any issues (issues caused by hypnotoad anyway).
00:46 sri 10000 request per hour is merely 3 rps
00:46 laouji joined #mojo
00:47 usetheforce On average it is getting about 12,000 requests per hour, so not much more than what you've said.
00:49 marty joined #mojo
00:54 hellyna joined #mojo
01:04 good_news_everyone joined #mojo
01:04 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/xTlHJw
01:04 good_news_everyone mojo/master 2738a39 Sebastian Riedel: links to more specs
01:04 good_news_everyone left #mojo
01:10 good_news_everyone joined #mojo
01:10 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/p0azcg
01:10 good_news_everyone mojo/master 5c9d428 Sebastian Riedel: link to PSGI spec
01:10 good_news_everyone left #mojo
01:14 D4RK-PH0ENiX joined #mojo
01:15 bpmedley http://bmedley.org/book_of_mojo.pdf  <-- Thoughts on first steps?
01:15 bpmedley left #mojo
01:16 bpmedley joined #mojo
01:19 KindOne joined #mojo
01:20 sri bpmedley: might be worth being a bit more specific about what you'd like feedback about
01:20 sri i do like the format, but the content is very sparse
01:20 bpmedley I'm curious if the direction of a tutorial approach is worthwhile.  Is it legible? Do you *want* to read it?
01:21 bpmedley I'm working on making content more fluid and verbose.
01:21 bpmedley Does it "look" like a Mojolicious book?
01:21 sri first thing i looked for was an explanation of route placeholders, because that's where i started with the mojo docs :)
01:21 usetheforce first impression: The cover is beautiful.
01:22 bpmedley Spanx
01:22 usetheforce I'd like it if the code had syntax highlighting... To begin the book with "It is a MVC framework that includes: " and then list a bunch of features that may be difficult to understand (e.g., non-blocking i/o) may be a bit daunting for a first page.
01:23 bpmedley That's a good point.  We don't want to be daunting and also don't want to be be boring.
01:23 bpmedley The code snippets need work.
01:24 usetheforce I very, very much like the idea.
01:24 * sri agrees, you're not selling mojolicious, people picking up the book already made their choice :)
01:24 usetheforce And I really like the look of the book. It is sexy.
01:24 sri somehow i parsed the feature list as a chapter index
01:25 bpmedley I might be selling mojolicioius.  I didn't know what distro to install when I bought my first linux book, so I went with redhat because of the CD.
01:25 bpmedley I => The book
01:25 usetheforce Getting started with a tutorial like this is quite difficult, because learning Mojolicious somewhat presupposes a certain level of knowledge of other things (e.g., cursory understanding of Perl, some web development knowledge, etc.)
01:26 bpmedley The goal is to be a balance between new to perl / web and a cgi expert
01:26 usetheforce bpmedley, I went with Slack 4 because downloading Linux took 2 weeks and the slackware CD was in the first book I picked up :D
01:26 bpmedley cool stuff
01:26 ka2u joined #mojo
01:26 bpmedley What's the license of the Mojolicious documentation?
01:27 usetheforce Speaking of licensing, was there any reason mojolicious didn't go for a completely copyleft license?
01:27 sri artistic 2.0
01:27 purl artistic 2.0 is a bit new also
01:28 sri copyleft is a legal nightmare internationally and artistic 2.0 is perl tradition
01:28 bpmedley Any objections of me putting the book "source" on github under artistic 2.0?
01:31 usetheforce Is there anything that identifies a mojolicious app? For example, this script looks for app.psgi in root directory...
01:32 usetheforce I am trying to think of how to identify/know that we are dealing with a mojolicious app (especially considering there are lite apps and full apps).
01:33 bpmedley https://github.com/brianmed/book_of_mojo
01:34 usetheforce bpmedley: My personal opinion on where to start is to set up a vagrant VM that you can "ship" with the book. The VM has a perlbrew environment with mojolicious already there. So, all the user has to do is boot it up and start working with Mojo. That way you're not focusing on the many different environments a user can be in (Windows, Linux, FreeBSD, Solaris, OS X).
01:35 usetheforce That's first... Second, the tutorial should first discuss generating a lite app, and how lite apps work with the templating system... build something simple in a lite app, then port it to a full app and build more on it (to emulate how an app scales).
01:35 usetheforce The template system is really fundamental in understanding Mojo, and how to best do things. My first app I didn't use the templating system at all, and when I was done I realized I could have done the entire thing in CGI and had the same result.
01:36 damaya I'd be willing to host the vagrant VM and to help out with the book. I'd consider it my way of contributing to something I am using quite a bit and really believe in.
01:38 damaya Do things somewhat wrong at first (don't use helpers, etc), then take the wrong code you've been building and change it to do things right, if that makes sense. I think a big part of learning is seeing how to do something simply, then how to make it better, perfect it.
01:38 damaya How to incorporate different features.
01:40 good_news_everyone joined #mojo
01:40 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/wOfrww
01:40 good_news_everyone mojo/master e8fd08c Sebastian Riedel: better link for HTML Living Standard
01:40 good_news_everyone left #mojo
01:40 bpmedley All awesome ideas.  I'll accept or discuss pull requests and hope to contribute to the book over time.
01:42 marty joined #mojo
01:42 bpmedley I do like the consistent VM approach.
01:43 damaya Awesome. Thanks bpmedley, and thumbs up for doing this, because it is something I've personally thought Mojolicious could really benefit from (not knocking the existing documentation--it's good too).
02:15 KindOne joined #mojo
02:35 klapperl_ joined #mojo
02:52 jberger bpmedley, interesting that you have started a mojolicious bool
02:52 jberger book
02:52 jberger bpmedley, https://github.com/jberger/MojoBook
02:52 geck indeed, that sounds.. really handy
02:53 geck well crap
02:53 geck so does that..
02:53 sri you've been slacking!
02:53 jberger I've been making more examples, and promoting in the community!! What have you been doing :-P
02:55 jberger my blog is going to be a source of examples of course
02:55 sri oh, here's another nice self published book 10gen has been giving away in dead tree form as presents https://github.com/karlseguin/the-little-mongodb-book
02:56 sri i made new features for you to write about ;p
02:56 jberger interesting that that one uses markdown for content and latex for final layout via pandoc
02:56 sri thought you'd find that interesting
02:58 sri the dead tree version is actually pretty cute http://www.mongodbbrandedpromotions.com/_assets/product_images/large/genlitbook_lg_96.jpg
02:58 jberger I've got mojolicious lite specific code highlighting working already
02:59 jberger https://github.com/jberger/MojoBook/blob/master/main.tex#L34-L41
03:00 * sri couldn't write in tex
03:01 jberger yeah, the topmatter gets pretty crazy
03:03 jberger but the actual text isn't too hard to understand: https://github.com/jberger/MojoBook/blob/master/getting_started/lite/lite.tex#L25-L32
03:10 jberger https://docs.google.com/file/d/0B-gBN2ue1FmVaDFjbWhvbWxONWs
03:12 ka2u joined #mojo
03:33 bpmedley jberger: Sweet!
03:34 bpmedley jperger: Do you have a pdf laying around?
03:35 bpmedley Sorry
03:40 jberger I'll take that sorry to mean that you see the link?
03:41 bpmedley I mis-typed your name.  And I missed the link.
03:42 bpmedley It seems you're almost creating a reference?
03:43 bpmedley Looks swank, as all LaTeX does
03:51 jberger I don't mean to stifle you either of course
03:51 jberger the more mojo, the better
03:51 bpmedley We need thousands of mojo books.
03:53 bpmedley What approach are you taking?  A reference?  A tutorial?  A Mojo brain dump?
04:06 preflex_ joined #mojo
04:09 jberger basically a brain dump I guess
04:10 jberger I was going to make it conversational style, but I want to have lots of examples
04:10 jberger sounds like tutorial I guess
04:11 jberger of course, as my favorite bits are the non-blocking stuff and a lot of the non-web features
04:11 jberger I think I will leave lots of room for people doing more MVC stuff and complex routing
04:11 bpmedley Cool.  An advanced book?
04:12 jberger well it will certainly have lots of introduction, but I do want to get to the features that set Mojo apart
04:12 jberger as I have done in many of my talks
04:12 jberger routing is important of course, but all frameworks have routing of some kind
04:15 laouji joined #mojo
04:24 russum is there :contains selector in Mojo::DOM?  $tx->res->dom->at("h3:contains('text')") doesn't seem to work.
04:25 sri that's not actually a css3 selector
04:33 damaya joined #mojo
04:34 russum so this would be the best way to implement :contains?
04:34 russum $tx->res->dom->find("h3")->each(sub{
04:34 russum return if $_->text !~ /text/;
04:34 russum
04:34 russum #found it
04:34 russum
04:34 russum });
04:34 sri STOP!
04:35 sri don't ever paste code into an irc channel
04:35 russum ok
05:01 amirite joined #mojo
05:03 laouji joined #mojo
05:13 damaya https://github.com/danielamaya/heroku-buildpack-mojo
05:13 damaya So, the beginning of the buildpack
05:13 damaya trying to modify it for lite apps, and to allow an env variable to specify the path to script
05:13 damaya So far it does seem to work
05:14 damaya though I am getting 'Can't locate Mojolicious/Commands.pm' after deploying
05:14 damaya need to figure that out, since Mojolicious is there
05:16 sri https://github.com/judofyr/perloku
05:18 damaya wtf
05:18 damaya awesome
05:19 damaya well, there it is eh?
05:19 damaya They need to get that listed under Heroku's 3rd-part buildpacks
05:19 damaya I'm using this with dokku, but same diff
05:23 damaya Thanks for the tidbit of info sri
05:25 laouji joined #mojo
05:53 ka2u joined #mojo
06:02 laouji_ joined #mojo
06:05 dvinciguerra joined #mojo
06:19 laouji joined #mojo
06:25 irq joined #mojo
06:33 damaya joined #mojo
06:33 damaya Correct me if I am wrong here, but shouldn't Mojolicious::Commands be installed when you do a cpanm Mojolicious?
06:39 good_news_everyone joined #mojo
06:39 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/LOanEg
06:39 good_news_everyone mojo/master f87ceab Sebastian Riedel: improved router to allow placeholders anywhere in a pattern to become optional
06:39 good_news_everyone left #mojo
06:39 sri this has the potential to be awesome or terrible, please review!
06:39 * sri pokes jberger, marcus, tempire and crab
06:41 laouji joined #mojo
06:42 laouji_ joined #mojo
06:45 good_news_everyone joined #mojo
06:45 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/LlAKFw
06:45 good_news_everyone mojo/master 9cbbf13 Sebastian Riedel: added example for optional placeholder in the middle of a pattern
06:45 good_news_everyone left #mojo
06:53 bpmedley That's cool.  It could allow for easily deprecating a REST API or somesuch.  Lots of use cases.
07:02 laouji joined #mojo
07:03 sri oh i remeber what the problem was :o
07:04 sri but it's fixable!!!
07:05 sri for a pattern "/test/:optional/123" the optional version would end up as "/test//123"
07:10 laouji joined #mojo
07:12 trone joined #mojo
07:12 good_news_everyone joined #mojo
07:12 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/sVfEiw
07:12 good_news_everyone mojo/master 279aea0 Sebastian Riedel: fixed optional slash problem
07:12 good_news_everyone left #mojo
07:13 sri now that's pretty nice
07:14 sri odds are there's more stuff i overlooked, SO REVIEW!
07:15 sri i also have no idea if those optional values can ever be left out when generated by url_for
07:15 laouji joined #mojo
07:19 laouji_ joined #mojo
07:23 cleverfox joined #mojo
07:23 good_news_everyone joined #mojo
07:23 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/2LPEqQ
07:23 good_news_everyone mojo/master f2174b2 Sebastian Riedel: another optional placeholder test
07:23 good_news_everyone left #mojo
07:24 marcus joined #mojo
07:24 sri ok, now seriously :)
07:24 sri jberger, marcus, tempire, crab: https://github.com/kraih/mojo/compare/e8fd08cbd3137add3ce3c7966862ad1cd914b803...f2174b2ef6efd0e16d2bc44f29b5049d82fae408
07:25 marcus o/
07:25 sri Zzz
07:25 sri \o
07:33 dpetrov_ joined #mojo
07:43 dod joined #mojo
07:50 Vandal joined #mojo
07:52 basiliscos joined #mojo
08:09 beyondcreed joined #mojo
08:10 dod joined #mojo
08:22 laouji joined #mojo
08:23 batman_ sri: that's pretty crazy :)
08:24 batman_ my head toggle between: "how can that possible _not_ conflict with other routes" and "nice feature" :)
08:26 fhelmber_ joined #mojo
08:31 odc joined #mojo
08:38 trone joined #mojo
08:39 hummeleBop joined #mojo
08:42 rawler joined #mojo
08:49 ver joined #mojo
09:05 redr0bin joined #mojo
09:06 redr0bin q on mango driver: how can I update the document if I have a hash with new values ?
09:14 laouji joined #mojo
09:19 fhelmbe__ joined #mojo
09:22 fhelmbe__ joined #mojo
09:25 Sharp joined #mojo
09:42 odc redr0bin, https://metacpan.org/pod/release/SRI/Mango-0.22/lib/Mango/Collection.pm#update
09:47 mire_ joined #mojo
09:56 redr0bin joined #mojo
09:57 redr0bin odc, thanks, already solved my problem with turning MONGO_DEBUG=1. the problem was that i had _id field in updated data hash,
09:58 redr0bin what's the good way of distributing mojolicious apps. i need to make rpm (for my env). is there a best practices like to implement my own start script or use something like python-supervisord to launch the app at startup
10:01 moritz https://gist.github.com/dynax60/893903 has an example
10:02 moritz for a hypnotoad-based init script
10:04 redr0bin thanks moritz
10:53 fhelmber_ joined #mojo
10:59 denisboyun joined #mojo
11:03 cleverfox joined #mojo
11:14 dvinciguerra joined #mojo
11:42 fhelmber_ joined #mojo
12:20 irq_ joined #mojo
12:24 ka2u joined #mojo
12:42 D4RK-PH0ENiX joined #mojo
13:02 D4RK-PH0ENiX joined #mojo
13:03 bd redr0bin: i am using supervisor
13:31 mire_ joined #mojo
13:46 dvinciguerra joined #mojo
14:19 rem_lex|pivo joined #mojo
14:24 sh4 joined #mojo
14:24 redr0bin bd is it worth it, or I can stay with custom init.d script ?
14:28 sh4 joined #mojo
14:54 hellyna joined #mojo
15:00 btyler joined #mojo
15:12 asarch joined #mojo
15:18 bd redr0bin: that is kinda hard to answer
15:30 marty joined #mojo
15:32 tempire_ hmm
15:32 tempire_ that's pretty neat
15:32 tempire_ I see no problem with it.
15:33 tempire_ regarding https://github.com/kraih/mojo/compare/e8fd08cbd3137add3ce3c7966862ad1cd914b803...f2174b2ef6efd0e16d2bc44f29b5049d82fae408
15:35 bluescreen joined #mojo
16:00 Dandre hello,
16:00 nicomen well, hello
16:00 Dandre to update mojolicious I just need to run:
16:00 Dandre curl get.mojolicio.us | sh
16:01 Dandre ?
16:01 marty joined #mojo
16:04 rem_lex|pivo joined #mojo
16:20 bpmedley Dandre: Are you running Mojolicious via system perl or one that you have installed?
16:22 tempire_ Dandre: that will work
16:26 ka2u joined #mojo
16:28 mire_ joined #mojo
16:29 Dandre bpmedley: I don't remember exactly but Mojolicious is in /usr/local/share/perl
16:29 Dandre ok I'll try
16:32 jberger joined #mojo
16:35 jberger sri: doesn't this suffer from the usual ambiguity problem which happens any time there are multiple optional positional arguments
16:36 sri jberger: how is that different from now? "/foo/:controller/:action"
16:37 jberger If I have /:opt1/:opt2 and each have defaults, what does /value set?
16:37 sri opt1
16:39 jberger Is that documented?
16:39 sri perl -Mojo -E 'a("/:foo/:bar" => {foo => "foo", bar => "bar", inline => q{<%= $foo %>-<%= $bar =%>}})->start' get /test
16:40 sri perl -Mojo -E 'a("/:foo/:bar" => {foo => "foo", bar => "bar", inline => q{<%= $foo %>-<%= $bar =%>}})->start' routes -v
16:40 jberger I can't test right now, I'm at work, but I trust you
16:40 sri it certainly has dozens of examples and tests
16:40 jberger As long as it's consistent and documented then I'm ok with it
16:40 jberger Excellent
16:41 sri for "/:controller/:action"
16:41 jberger Previously controller couldn't be optional thought right
16:41 jberger Though
16:42 sri only if action was optional too
16:43 sri first non-optional placeholder disabled it previously
16:43 jberger Oh ok
16:43 jberger In that case I'm a lot less concerned
16:43 jberger sri++
16:44 * sri is a lot less concerned since the optional slash fix he added
16:44 sri hat was the main objection previously i believe
16:45 sri "/foo/:bar/baz" matching "/foo/baz"... i'm really happy about that one
16:45 jberger yeah that's nice
16:46 sri i do wonder if url_for could somehow render "/foo/baz" too instead of "/foo/default/baz"... but things are a bit complicated there
16:49 gryphon joined #mojo
16:49 jberger Eh I don't mind that so much
16:50 sri me neither, there are other conditions that force long paths... but it would be neat :)
16:51 btyler jberger++/bpmedley++ # mojo books in progress! I'm happy to help edit, if/when that time comes
17:26 nornagest joined #mojo
17:27 ka2u joined #mojo
17:29 good_news_everyone joined #mojo
17:29 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/IbjpJg
17:29 good_news_everyone mojo/master 7371c5c Sebastian Riedel: added example to Changes
17:29 good_news_everyone left #mojo
17:36 ka2u joined #mojo
17:41 tempire_ huh.
17:41 tempire_ Carton doesn't seem to care about mirrors.
17:57 jberger_ joined #mojo
18:51 dod joined #mojo
18:51 jberger joined #mojo
19:11 dvinciguerra joined #mojo
19:24 mire_ joined #mojo
19:52 marcus joined #mojo
20:00 ka2u joined #mojo
20:12 marty joined #mojo
20:22 marty joined #mojo
20:38 lukep joined #mojo
20:43 nicomen joined #mojo
20:45 trone joined #mojo
21:11 mire_ joined #mojo
21:12 btyler joined #mojo
21:14 dvinciguerra joined #mojo
21:31 marty joined #mojo
21:32 good_news_everyone joined #mojo
21:32 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/7cWpMg
21:32 good_news_everyone mojo/master 76cb552 Sebastian Riedel: a few more placeholder tests
21:32 good_news_everyone left #mojo
21:52 mire_ joined #mojo
22:01 maxhq joined #mojo
22:21 good_news_everyone joined #mojo
22:21 good_news_everyone [mojo] kraih tagged v4.68 at 635f678: http://git.io/F6s1jg
22:21 good_news_everyone left #mojo
22:22 sri so release, such features, wow.
22:23 tianon much rejoicing!
22:27 * sri wonders if he should link to Changes in the github diff for a change in the announcement
22:27 sri https://github.com/kraih/mojo/compare/v4.67...v4.68#diff-c112bb3542e98308d12d5ecb10a67abcR2
22:27 bpmedley Wowzers
22:36 sri what the heck, lets try that
22:37 jberger_ joined #mojo
22:52 amirite joined #mojo
23:20 good_news_everyone joined #mojo
23:20 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/2veagQ
23:20 good_news_everyone mojo/master 99a49fc Sebastian Riedel: mention default cipher specification string
23:20 good_news_everyone left #mojo
23:21 asarch joined #mojo
23:26 maxhq joined #mojo
23:29 * sri kinda likes the :has pseudo class jquery made up
23:30 sri if we ever decide to do custom pseudo classes :has and :contains are candidates
23:56 nicomen like they say in the docs, seems to be faster using $(...).has(), wonder why they don't parse the :has and convert it then? anyway, maybe .grep/.reduce/.has can be added for Mojo::DOM(::Collection)?

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