Camelia, the Perl 6 bug

IRC log for #mojo, 2013-10-13

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

All times shown according to UTC.

Time Nick Message
00:00 dhg joined #mojo
00:04 dh7320 joined #mojo
00:08 dhg joined #mojo
00:29 ryozi joined #mojo
00:34 jberger__ joined #mojo
00:47 jberger_ joined #mojo
01:31 duncanthrax joined #mojo
01:33 russum joined #mojo
01:36 russum joined #mojo
01:41 SmokeMachine joined #mojo
02:02 basic6_ joined #mojo
02:03 btyler joined #mojo
02:29 tba joined #mojo
02:50 crab jberger: i'd suggest highlighting the changes going from blocking->non-blocking somehow
02:52 jberger crab: I was originally thinking of posting the diff between the two, but then I got worried that it was too much
02:52 jberger would it make sense to split the topmatter out like I do for the templates
02:52 jberger all the helpers for a start
02:52 jberger and imports
02:55 jberger hmmm, I think just showing the diff as well is best
03:01 crab i'm also not very happy with saying that non-blocking is the *most* important feature, but that's a minor quibble, even possibly irrelevant.
03:07 jberger I do say **perhaps** the most
03:07 jberger it is certainly its most distinctive feature
03:12 russum left #mojo
03:45 dqw10 joined #mojo
03:48 preflex_ joined #mojo
04:46 bpmedley_ joined #mojo
04:46 russum1 joined #mojo
04:47 mattp_ joined #mojo
04:50 marcus joined #mojo
04:50 dqw10 joined #mojo
04:50 tba joined #mojo
04:50 btyler joined #mojo
04:50 SmokeMachine joined #mojo
04:50 duncanthrax joined #mojo
04:50 rem_lex|pivo joined #mojo
04:50 mire_ joined #mojo
04:50 stephan48 joined #mojo
04:50 buu joined #mojo
04:50 dvinciguerra_ joined #mojo
04:50 Daga4 joined #mojo
04:50 Zmodem joined #mojo
04:50 jnbek joined #mojo
04:50 dabudabu joined #mojo
04:50 tianon joined #mojo
04:50 garu joined #mojo
04:50 mst joined #mojo
04:50 Bender joined #mojo
04:50 cosimo joined #mojo
04:50 bzero joined #mojo
05:26 dotandimet joined #mojo
05:37 davido joined #mojo
05:47 Vandal joined #mojo
05:55 dotandimet1 joined #mojo
06:14 d4rkie joined #mojo
06:36 sherr joined #mojo
07:27 dod joined #mojo
07:32 davido left #mojo
07:40 trone joined #mojo
07:41 dotan joined #mojo
07:43 dod joined #mojo
07:49 dqw10 joined #mojo
08:12 kanishka joined #mojo
08:13 kanishka hey all
08:13 kanishka i have small problem
08:13 kanishka i build an app over mojolicious, where nginx acts as reverse proxy
08:14 kanishka when benchmarked the app, server load is very high, when that app acting behing nginx
08:16 kanishka but when i tested in on it directly , with out nignx , server load dropped to half
08:23 crab so you have an nginx problem?
08:47 Vandal joined #mojo
08:48 * sri wonders why we've not made the dumper helper a function in Mojo::Util
08:49 sri use Mojo::Util 'dumper' seems rather useful for debugging in general
08:52 odc joined #mojo
08:53 crab but Mojo::Util functions are meant to be used only by Mojo code, right?
08:53 sri what do you mean?
08:54 crab L<Mojo::Util> provides portable utility functions for L<Mojo>.
08:54 crab i actually asked about this some time ago, but maybe the timing was bad, i never got an answer.
08:55 sri i still don't understand
08:55 crab i had code that depended on hmac_md5_sum, which was removed, and then i realised that the description didn't suggest that these functions are meant for users.
08:55 sri you mean the Mojo namespace?
08:55 crab though obviously people do use them.
08:56 sri the question seems completely irrelevant considering that dumper() has multiple internal uses
08:57 crab maybe it's irrelevant to dumper, but i still think the description should say if these functions are "use at your own risk" or "experimental, subject to change" or what.
08:58 sri the scope of functions in Mojo::Util is based on what Mojolicious needs internally
08:58 sri crab: why?
08:58 crab because otherwise people will use them and their code will break if we change stuff when the internals' needs change?
08:58 sri it's a public api, deprecation policies apply
08:59 crab so was hmac_md5_sum removal a mistake?
09:00 sri hmac_md5_sum was removed in a major release
09:00 sri you should know the deprecation policies
09:00 sri everything goes in a major release
09:01 crab ok.
09:06 kanishka joined #mojo
09:08 sri adding Mojo::Util::dumper is actually less code :o
09:15 good_news_everyone joined #mojo
09:15 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/ukn7Dg
09:15 good_news_everyone mojo/master beff7b5 Sebastian Riedel: added dumper function to Mojo::Util
09:15 good_news_everyone left #mojo
09:16 basiliscos joined #mojo
09:16 batman sri: wohooo! same Data::Dumper options as in Mandel :)
09:16 batman sri: what about just naming it d() or dump() ?
09:17 sri wouldn't fit in
09:17 batman not even dump() ?
09:17 sri dump() is a core function
09:18 batman ah. thanks for reminding me :)
09:24 good_news_everyone joined #mojo
09:24 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/69j4cA
09:24 good_news_everyone mojo/master 4b0afec Sebastian Riedel: more consistent dumper documentation
09:24 good_news_everyone left #mojo
09:28 wsri joined #mojo
09:28 marcus__ joined #mojo
09:37 kanishka joined #mojo
09:41 crab wtf marcus
09:48 bc547 I have a small lite app that I documented in pod style. Is it possible to simply parse the lite app src file and make it's own documentation browsable via e.g. /mypod ? PODRenderer doesn't seem to be capable of doing that?
10:02 sri my $html = app->pod_to_html(Mojo::Util::slurp __FILE__);
10:06 bc547 sri: tnx!
10:35 denis_boyun joined #mojo
10:46 mire_ joined #mojo
10:47 espent joined #mojo
10:59 alnewkirk joined #mojo
11:04 * batman guess marcus is testing wirc with a bad channel list...
11:04 dotandimet joined #mojo
11:16 sri it got really silent around validation
11:16 * sri wonders if anyone is using it now
11:16 batman i am
11:16 batman right now actually :)
11:16 sri better give feedback!
11:16 batman i like it
11:16 sri even if it's just "i like the way validation is now."
11:16 sri heh :)
11:17 batman i like it after you merged my patch ;)
11:17 * sri counts the +1s for making validation stable
11:17 batman i wonder if validation should log to debug when things are not valid...
11:18 batman maybe use constant DEBUG => $ENV{MOJO_VALIDATION_DEBUG};
11:18 sri -1
11:18 batman :D
11:18 batman haha
11:19 batman should i require passwords to be at least eight chars?
11:19 batman i think six is not long enough...
11:24 sri hehehe... gotta love the headline "yahoo acquires bread"
11:24 batman :)
11:36 batman oops! while testing i've accidentally sent a lot of emails to bruce.wayne@wayne-enterprises.com ... hope he doesn't get mad :/
11:40 crab this is what example.org is for.
11:40 batman hehe
11:40 crab (so as not to annoy supervillains)
11:40 sri example.com
11:40 crab example.com/net/org
11:40 crab (that is not a URL)
11:41 batman got that
11:43 batman i'm getting "Bad signed cookie "mojolicious", possible hacking attempt." in my unittest :S
11:43 * batman starts digging
11:43 sri don't hack your apps
11:43 batman :)
11:45 punter joined #mojo
11:55 batman wtf: https://metacpan.org/source/SHARIFULN/Mojolicious-​Plugin-Mail-1.0/lib/Mojolicious/Plugin/Mail.pm#L66 ?
11:55 batman that delete() can't be right..?
11:56 batman i don't get why it's there...
12:06 dotandimet joined #mojo
12:07 odc o_O
12:08 odc i use this module too
12:14 batman odc: it's fixed on github, but not released to cpan (!)
12:15 odc interesting...
12:16 hrupp joined #mojo
12:17 batman i would call it "messed up". it's been fixed for several months.
12:17 odc indeed, 3 months ago
12:17 odc weird
12:17 batman yeah
12:20 odc oh but the author is russian
12:20 odc classic
12:53 good_news_everyone joined #mojo
12:53 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/Bsw_pg
12:53 good_news_everyone mojo/master b5341d4 Sebastian Riedel: not that many stash values are reserved anymore
12:53 good_news_everyone left #mojo
12:55 crab hum. time for a release? not yet, i guess.
12:59 kanishka joined #mojo
13:09 Mike-PerlRecruiter_ joined #mojo
13:15 kanishka left #mojo
13:42 rem_lex| joined #mojo
13:52 bpmedley What's a suggested way to share a validation config between routes?
13:53 denisboyun joined #mojo
14:20 good_news_everyone joined #mojo
14:20 good_news_everyone [mojo] jberger pushed 1 new commit to master: http://git.io/m7falg
14:20 good_news_everyone mojo/master 636494b Joel Berger: Fixed typo in Rendering Guide
14:20 good_news_everyone left #mojo
14:21 sri jberger: why did you change the formatting?
14:22 jberger ?
14:22 jberger argh
14:22 HtbaaPi joined #mojo
14:22 jberger this is why I swore off the github online editor!
14:22 * jberger hangs head
14:24 rem_lex|pivo joined #mojo
14:28 good_news_everyone joined #mojo
14:28 good_news_everyone [mojo] jberger pushed 1 new commit to master: http://git.io/OJvcbg
14:28 good_news_everyone mojo/master f46fb07 Joel Berger: undo unwanted formatting change
14:28 good_news_everyone left #mojo
14:28 jberger I wasn't on a real computer and I noticed the typo, so I thought I would do just the one change using github's editor
14:29 jberger I wonder if I should report a bug to github?
14:41 gryphon joined #mojo
14:43 sri don't use the github editor please, you should at least run pod tests before a commit
14:44 * sri still wonders if he should get a nexus 5
14:55 jberger crab, I added the diff sections, does that help or hurt readability?
14:56 jberger crab, sri: any other comments? https://gist.github.com/jberger/6956112
14:57 sri i wouldn't call non-blocking the most important feature
14:58 jberger sri: its interesting that you read it that way too, perhaps I should rephrase
14:58 sri *the* original mojolicious feature is actually growing from lite to full apps
14:58 jberger I actually said that "perhaps nonblocking is the most important difference"
14:58 sri non-blocking is quite important too though
14:59 sri while other frameworks can use certain non-blocking features they will never be as good at it as mojo, you're correct there
14:59 batman jberger: do you usually use <%= tag ... %> that much...?
15:00 jberger batman, I almost never use tag with <%=  ... %> form, but I do use it with %= form often
15:00 batman nevermind <%= VS %=... i'm just a bit surprised
15:00 * sri would use %=t h1 => $title
15:01 batman i write as much markup as possible....
15:01 batman i only use helpers if they provide extra functionality, such as <%= text_field ... %>
15:01 sri because %=t looks like a special form of %= ;)
15:01 jberger sri: do you mean you would unpack the document in the controller?
15:01 jberger oh
15:02 jberger sri: if that's your point, then I respectfully disagree :-)
15:03 jberger batman, its less about the %= tag side as the % end side
15:03 * sri doesn't use it to generate tags either though
15:03 batman i would do <h1><%= $doc->{title} %></h1>
15:04 batman looks less alien...
15:04 sri which reminds me that i still would like to build a Mojo::Template preprocessor for simplified markup
15:04 jberger it might be the latex-er in me, begin .. end looks more sane than <tag> </tag>
15:04 batman :)
15:05 jberger I don't know that as many people learn LaTeX markup before HTML as I did though
15:05 jberger perhaps I ought to change that for this example
15:05 batman https://github.com/jhthorsen/app-boutique/bl​ob/www/test/lib/App/Boutique/Builder.pm#L77 # \o/ validation :)
15:06 batman sri: i really like validation. not sure how to do it right, without putting it into the web controller...
15:07 batman i'm also super happy about the regex() => like() change, since i can never remember if regex is with or without a "p" :)
15:07 jberger batman: https://github.com/jberger/Galileo/blob/master/​lib/Galileo/files/templates/admin/users.html.ep
15:08 sri your odd param names remind me that i wanted to think about nested values :o
15:08 batman jberger: holy crap. my head spins :)
15:08 batman sri: i ended up building my own plugin (even though there's three of them already)
15:08 sri jberger: yea, i definitely would not do that
15:09 jberger it looks very TeX though :-P
15:09 batman sri: https://github.com/jhthorsen/app-boutique/blo​b/www/test/lib/App/Boutique/NamespaceForm.pm
15:09 jberger I probably shouldn't, but its so easy
15:09 batman sri: NamespaceForm even work with validation automatically :)
15:10 jberger (btw, that is an extreme case, most of my templates aren't THAT bad)
15:10 sri so you're building an online store?
15:10 batman sri: no. i'm building a system which can create online stores :)
15:10 batman http://boutique.thorsen.pm <-- what i got so far
15:11 * sri likes
15:12 batman that's why i wrote mandel
15:12 batman +it was fun ;)
15:13 sri is it just for fun or are you planning something?
15:13 jberger batman++
15:13 batman i'm planning something
15:13 sri neat :)
15:14 batman going to take over the world.
15:14 batman as usual.
15:14 bpmedley batman: Who are you using to process payments?
15:14 d4rkie joined #mojo
15:14 batman getbetsy.com didn't make it. no idea what's happening with grumpify.com, so i better start making new products :)
15:15 batman bpmedley: that's not settled.
15:15 batman bpmedley: it's actually quite hard as long as you don't have a super rich uncle :P
15:15 sri payments are about to get much easier in europe with stripe and paymill competing
15:15 batman i was hoping to use paymill, but they told us that what we where doing was illegal, so.... :P
15:16 sri lol
15:16 bpmedley batman: Wonder if you could use stripe?  I like their interface and api.
15:16 sri so you're building the next silk road ;p
15:16 batman sri: that's somehow the goal.
15:16 batman bpmedley: no. that's even worse (doesn't even make it more legal)
15:17 bpmedley batman: legality is a pun
15:17 batman haha
15:17 batman you don't know what i'm doing, so......
15:17 batman at least not exactly :)
15:18 batman code is nothing. execution of ideas is everything.
15:18 batman (that's why it's open source)
15:19 sri jberger: i think the diffs work, since they are so small
15:19 batman jberger: how's the blocking code for mandel working out? i thought it was already there, so i got a bit confused while writing unittests earlier :)
15:20 jberger batman, it's on a branch
15:20 batman i know
15:20 batman should i just merge it?
15:20 sri jberger: you could also mention latency, which is usually the deciding factor when choosing a non-blocking version
15:20 batman ..not going to do any rebasing?
15:20 sri for example, i have found blocking mango to be quite a bit faster on localhost for most operations
15:20 jberger I've been meaning to get this blog post out for a while now, so I prioritized it this weekend
15:21 batman jberger++ # nice blog post
15:21 jberger sri: I found that too
15:21 jberger that's why my example goes right to mongohq :-)
15:21 sri for non-blocking operations to shine you want latency
15:21 sri yea, mongohq makes for a good example there
15:22 * batman goes for a run
15:22 jberger that reminds me, I was meaning to mention the combo of heroku (ephemoral file systems) and mongohq as a free deployment solution
15:22 sri you also have to consider the still present write lock in mongodb, makes parallel operations mostly pointless for now
15:23 sri so you want slow queries
15:23 jberger sri: you'll notice that the testing is on read, not write :-)
15:23 jberger yes I contrived a useful example
15:23 sri i've not tested with tokumx yet, but i think it would benefit a lot more from non-blocking mango
15:24 jberger s/useful example/example which shows my point :-P/
15:24 jberger hmmm, I should try that
15:24 sri :)
15:24 sri if you do publish the results!
15:25 * sri is quite interested in that
15:25 jberger it probably wont be for this post
15:25 jberger but I see this becoming a series
15:25 sri \o/
15:25 jberger for example, an introduction to mandel
15:25 jberger tokumx could be another
15:26 * jberger wants to mention Mojolicious and Node.js in the same post more often
15:26 sri i like your examples btw. (aside from the tag mess ;p)
15:26 jberger I can fix the tag mess
15:27 d4rkie joined #mojo
15:27 jberger I really want to reframe the argument from why Mojo vs Dancer, to why Mojo vs Node
15:27 sri the next helper worries me a little
15:27 sri it limits the app to a single worker
15:27 sri oh wait, my bad
15:28 sri missed $self->count
15:28 sri no wait
15:28 sri it doesn't!
15:28 jberger it does
15:28 sri :S
15:28 jberger because that is state
15:28 jberger so you are right
15:28 jberger I could just return count
15:28 jberger means two db calls per insert though
15:29 sri auto increment fields server side are on the todo list for mongodb btw
15:29 jberger thank goodness
15:29 sri you're in trouble though
15:29 jberger ?
15:30 sri ->count is a blocking operation, if that overlaps a non-blocking one everything explodes
15:30 jberger which is why I only wanted to call it once, but you are right, it limits the number of servers
15:31 sri i would just avoid an incrementing counter ;p
15:32 jberger I could just have the pastes have an oid as an identifier, but that seemed uglier
15:32 sri does it add anything to the example?
15:32 jberger true, as an example it might be better
15:33 * sri would use the oid or a truly pretty id based on the title and time
15:34 sri pretty url doesn't add value here though imo
15:34 jberger I was just about to say the same
15:37 jberger I'm not opposed to using the stringified oid in this example
15:37 jberger it will slim down both the example and the text
15:38 mire_ joined #mojo
15:39 jberger sri: do you think -t 10 -c 10 is a reasonable test for wrt?
15:44 jberger sri: btw, I'm not using the validation yet, but I can certainly see myself doing so in the future
15:44 sri jberger: i use at least -c 100 personally
15:45 jberger and -t?
15:45 sri but with a high latency backend like mongohq -c 10 might be fine
15:45 sri whatever gets your point across is fine :)
15:46 jberger I was just about to say, I probably should just try a few different combinations :-()
15:46 jberger 10 and 10 was the first thing I tried
15:47 good_news_everyone joined #mojo
15:47 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/SQeFNg
15:47 good_news_everyone mojo/master f7a103d Sebastian Riedel: small optimizations
15:47 good_news_everyone left #mojo
15:47 sri little odd, i never really used hash slices
15:48 jberger <3 hash slices
15:55 sri oh neat, you can make custom contributor graphs on github :) https://github.com/kraih/mojo/graphs/contr​ibutors?from=2013-10-12&amp;to=2013-10-14
16:00 hummeleBop joined #mojo
16:02 dqw10 joined #mojo
16:07 batman odc: new version of m::p::mail on cpan soon
16:07 batman 1.1
16:09 batman jberger: we seriously need to make mandel more stable before you write a blog post :P
16:09 jberger batman, I fully agree
16:09 sri better hurry up ;p
16:09 batman make sure we mark the right things as experimental, instead of everything :)
16:09 batman sri: i need feedback!
16:09 sri :D
16:09 batman i'm most concerned about the relationships
16:10 jberger batman, such a post may be a ways off still, but having this one as a base, I can refer back to it when I would do a mandel post
16:10 batman it works for me, but it might not be what others thinks is natural...
16:10 batman jberger: would be a-w-e-s-o-m-e
16:10 jberger batman, go ahead and merge/rebase as you see fit
16:11 batman i would love to make mojo-redis as a storage engine for mandel...
16:11 * batman merge and makes a new release
16:13 jberger still needs more tests, but I'm not sure when I will have a chance
16:14 jberger starting soon I need to brush the dust off of Mojolicious::Plugin::SimpleSlides and start working on my YAPC::Brazil talk
16:14 batman ok, it's already a lot better
16:15 batman i think i need to get rid of save()
16:15 jberger I have a lot of genericization (?) to do on SimpleSlides, and I want to add a command interface rather than making the presentations the app themself
16:15 batman i hate it that it doesn't do '$set'
16:16 batman jberger: have you tried http://strut.io/ ?
16:16 jberger batman, the implementation of save probably doesn't matter, but I like the idea that you can call one method on an object no matter if it is in storage or not, in order to save it there
16:16 batman yeah. that's neat
16:17 jberger batman, I haven't see that one. I know that such things exist
16:17 jberger SimpleSlides has one feature, it shows code examples from external files directly
16:18 jberger that way I can show the example in the slide, then run that exact code as a demo
16:18 jberger (it also styles Perl code using PPI, so better highlighting for Perl)
16:26 batman :)
16:28 btyler joined #mojo
16:29 batman 0.09 on cpan soon
16:29 batman thanks jberger
16:30 batman btw: i squeezed the commits into one.
16:30 batman squashed even ;)
16:30 sh4 joined #mojo
16:45 batman wonder what the '$set' => {} method would be called...
16:45 batman save_partial(), rewrite save(), patch() ?
16:46 batman i guess it should be called patch(), since i already have that for $collection
16:48 sh4|2 joined #mojo
16:52 denis_boyun joined #mojo
17:06 russum joined #mojo
17:55 bpmedley https://gist.github.com/brianmed/6965179 <-- How is this as a validation example?  Improvements or considerations?
18:11 bpmedley sri: I like the validation api so far, especially the ability to use the same api in templates and in routes.
18:11 sri \o/
18:28 denis_boyun joined #mojo
18:30 btyler joined #mojo
18:30 russum left #mojo
18:30 russum joined #mojo
18:45 asarch joined #mojo
19:07 batman bpmedley: i think your code is super complicated :(
19:07 btyler joined #mojo
19:08 batman i have no idea why you have the params helper. why not just use $v->output or even foreach $name ($self->param) { ... } directly?
19:08 batman also, i would just do the validation directly to prevent jumping back and forth in the code.
19:09 batman and the sizes on the username/passwords are not any good. i would say a username could be size(2, 64) and the password should -at-least- be six chars.
19:10 batman preferably longer.
19:10 batman and just allowing [[:alpha::] is not any good :(
19:10 batman make sure the input is always the same encoding and allow anything.
19:10 bpmedley batman: I wanted the ability to re-use the validation configuration in different routes.
19:11 batman bpmedley: then you should add rules to the actual validator instead.
19:11 bpmedley batman: How?
19:11 batman https://metacpan.org/module/SRI/Mojolic​ious-4.46/lib/Mojolicious/Guides/Render​ing.pod#Adding-form-validation-checks
19:12 batman much of what i'm saying are things you can ignore, but allowing short passwords is really bad :(
19:12 rhaen joined #mojo
19:13 bpmedley batman: Yes, I agree on the short password.  It's a contrived example.
19:13 batman right. but it should have sane defaults...
19:13 batman anyway... i need to get something to eat. good luck.
19:13 bpmedley What if I had another route called "/add"?  How would I add the same login and password validation as "/login"?
19:14 rhaen hep #mojo!
19:15 Mike-PerlRecruiter_ joined #mojo
19:15 bpmedley batman: Thanks for $v->output!  I didn't know about that one.
19:15 mst bpmedley: even contrived examples get cargo culted
19:16 bpmedley mst: :)
19:16 sri $v->param is better than $v->output
19:16 sri also, i think sharing validations through helpers is a good pattern
19:17 sri i've not looked at your specific example though, just in general
19:17 sri also what mst said, if it's out there it will get cargo culted
19:27 bpmedley https://gist.github.com/brianmed/6965179 <-- Updated gist; no longer users params helper and sanity checks are less insane.
19:27 bpmedley *uses
19:30 dotandimet joined #mojo
20:13 go|dfish joined #mojo
20:13 basiliscos joined #mojo
20:20 batman I don't like the requirements for the password. One of my passwords is shit because *someone* added the same rules
20:20 batman My server password is stealth compared, even thoug it has no uppercase chars
20:21 batman It's still a lot better than what you had :)
20:35 perlite_ joined #mojo
20:50 lukep joined #mojo
21:08 bpmedley Thanks
21:23 sri marcus: did you try airmail for os x yet?
21:31 marcus sri: No. Should I?
21:31 sri marcus: dunno! :)
21:32 rem_lex joined #mojo
21:33 bowtie_ joined #mojo
21:33 marcus sparrow got a bit too crap
21:34 sri airmail looks pretty much like sparrow
21:34 russum joined #mojo
21:35 sri just noticed it on top of the top paid apps, never heard of it before
21:47 sri marcus: trying it now... looks very nice, i guess you should too :)
22:40 bpmedley_ joined #mojo
23:16 dvinciguerra__ joined #mojo

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