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

IRC log for #mojo, 2015-11-14

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

All times shown according to UTC.

Time Nick Message
00:01 mattastrophe joined #mojo
00:12 mattastrophe joined #mojo
00:18 mattastrophe joined #mojo
00:22 val joined #mojo
00:59 jontaylor joined #mojo
01:21 cpan_mojo Minion-Backend-SQLite-0.003 by DBOOK https://metacpan.org/release/DBOOK/Minion-Backend-SQLite-0.003
02:42 val joined #mojo
02:48 McA joined #mojo
03:03 jontaylor joined #mojo
03:23 tempire Ok seriously.
03:23 tempire I'm going to have to start PMing people about this nickserv thing.
03:24 tempire Hopefully not everyone gets offended by unexpected PMs
03:26 preaction what nickserv thing?
03:27 buu We have a nickserv?
03:31 preaction yeah. services were added a few months back
03:32 tempire I need to change my nickserv password.
03:32 tempire preaction: can you halp?
03:34 preaction nope. afaik it's perigrin, mst, and sungo
03:53 aborazmeh joined #mojo
03:56 buu why
03:56 buu Also can we move to a sane irc network
03:57 buu Although speaking of sanity http://gitter.im is a thing
03:57 buu Definitely a thing.
03:59 sri i've actually proposed a move recently, but the majority wants to stay
03:59 buu =[
04:01 genio I haven't noticed any issues.  What's wrong with irc.perl.org and what's better?  (actually curious, not trying to be contradictory)
04:11 buu genio: I feel that freenode's greater popularity has two benefits A) Easier access, both from users already on the network as well as web-irc clients B) More robust infrastructure, less reliant on a single company or a tiny group of administrators
04:11 buu And correspondingly there's zero benefit to being on irc.perl
04:12 genio I can see that.  #perl on FreeNode is much more active  The main reason I stay on irc.perl is for the module-specific channels
04:12 buu Certainly the only reason I'm connected to this server is this channel
04:13 buu It'd be nice if we could redirect people from #perl to more specific channels without involving server switches
04:14 genio All perfectly valid points from my point of view.
04:14 buu freenode also has the minor benefit that if newcomers connect to it and immediately join #perl they aren't greeted by a cesspit
04:16 genio Although, I guess that's kind of moot with me as I'm still on EFNet :)
04:21 voldemortensen joined #mojo
04:27 preaction #perl here isn't that bad anymore
04:28 preaction besides, in all cases one gets to deal with the most volatile people in the irc perl community
04:30 voldemortensen I'm trying to get a basic task system running with minion and I'm obviously missing something. Someone willing to enlighten me?
04:31 preaction what's the problem?
04:33 voldemortensen I can't get any jobs to be successful. I have a daemon that checks for jobs to run and all that is working, but even if my task is defined as "$minion->add_task(something_slow => sub { my ($job, @args) = @_; return 1; });"
04:34 voldemortensen doing "$minion->enqueue(something_slow => ['foo', 'bar']);" the task still fails.
04:35 sri voldemortensen: that example app should work just fine http://mojolicio.us/perldoc/Minion#DESCRIPTION
04:38 voldemortensen I got the one in the synopsis section to work (using mysql backend). I'm pretty new to mojo and have been using CGI::Ex::App and was hoping to integrate minion with that.
04:39 sri i don't think the mysql backend is compatible with minion 4.0 yet
04:39 voldemortensen that would definitely be a problem
04:42 voldemortensen welp, I think that's enough for me to go off of for now. Thanks for the help.
04:57 kaare joined #mojo
05:03 mattp joined #mojo
05:14 voldemortensen So I was using Proc::Daemon::Init(); which seemed to be causing the problem.
05:14 voldemortensen Changing it to this instead: http://pastebin.com/gZd5D90H
05:14 Repaster Repasted text from voldemortensen: http://fpaste.org/290401/47478083/
06:01 ichi joined #mojo
06:01 ichi join #perl
06:28 buu no
06:48 irqq joined #mojo
07:25 ichi joined #mojo
07:35 Vandal joined #mojo
07:45 marcusr never!
08:45 Zoffix joined #mojo
09:14 cpan_mojo Test-Mojo-Role-Debug-1.003003 by ZOFFIX https://metacpan.org/release/ZOFFIX/Test-Mojo-Role-Debug-1.003003
09:56 Zoffix joined #mojo
10:09 irqq_ joined #mojo
10:14 buu sri: Have you seen http://sidekiq.org/ ?
10:15 buu also http://www.mikeperham.com/2013/10/01/how-to-make-100k-in-oss-by-working-hard/
10:25 Mattjes joined #mojo
10:35 polettix joined #mojo
10:38 aborazmeh joined #mojo
10:41 punter joined #mojo
10:45 kes joined #mojo
11:00 cpan_mojo Mojolicious-Plugin-CHI-0.12 by AKRON https://metacpan.org/release/AKRON/Mojolicious-Plugin-CHI-0.12
11:10 bobkare joined #mojo
11:31 Mattjes Hello!
11:32 Mattjes Is in Perl an equivalent to "is_numeric" (PHP) available?
11:32 Mattjes Or do you do it exclusively with regex?
11:33 Mattjes =~ /^d+$/
11:36 go|dfish Mattjes: Scalar::Util::looks_like_number()
11:37 Mattjes go|dfish: Thank you!
11:39 sh4 joined #mojo
11:39 Ionit joined #mojo
11:44 Zoffix Mattjes, but keep in mind, Inf and even NaN "look like a number" to that function
11:50 kes why the template rendering is in context of 'MyApp::Controller' and not 'MyApp::Controller::Customer'?
11:50 kes maybe I miss something...
11:51 Zoffix kes, what does that even mean? What "context"?
11:52 shadowpaste "kes" at 217.168.150.38 pasted "context while rendering:" (15 lines) at http://paste.scsys.co.uk/501461
11:52 kes $self->app->log is the first line in template: listeners/dhandler.html.ep:1
11:57 nathanael joined #mojo
11:59 kes Zoffix: Have I did pour description?
12:00 Zoffix Your paste looks half-cut off, so I just closed it and proceeded to make and consume waffles.
12:04 Zoffix kes, I get "Mojolicious::Controller=HASH(0x9e2b6e8) Mojolicious::Controller=HASH(0x9e2b6e8)" in my app
12:05 Zoffix So I've no idea how you got SafeVPN::Site in there
12:06 kes I agree with you, I must mane full minified example
12:06 kes *make
12:07 Zoffix kes, I suspect the answer is because by the time the IO loop gets to rendering the template, we're no longer in your controller class, so it uses a standard ::Controller to pass in as a controller object
12:08 Zoffix If the question was why I get Mojolicious::Controller and not MyApp::Controller::Root
12:12 kes I figure out the problem. When 'Action not found in controller' the mojo use Mojolicious::Controller instead of the controller mojo is rendering for
12:13 kes Zoffix:
12:16 kes Zoffix: So if you comment out 'sub wellcome' in default. You will get Mojolicious::Controller in the template instead of Mojolicious::Controller::Example. What do you think about that?
12:16 kes s/in default/in default app/
12:17 Zoffix I think that's false, because I was rendering from within an action and I got plain ::Controller
12:18 kes That behaviour is wrong. does I understand right?
12:19 Zoffix I never said wrong.
12:19 kes this word maybe too strong, but I do not understand yours ((
12:21 Zoffix Never mind anything I said. Ignore me.
12:22 kes I even do not get MyApp::Controller::Example if I have an action, but not have $self->render in it.
12:22 Zoffix http://www.homerbackingintothings.com/
12:22 kes ))
12:25 kes Zoffix: do not left me alone with my_app http://giphy.com/gifs/bug-UAUtB4Oi9U4EM :D
12:26 kes ok. thank you.
12:27 Zoffix left #mojo
12:27 kes oh... I have found what is comming on: http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Automatic-rendering
12:34 Mattjes Zoffix: Thank you (12:36)
12:44 voldemortensen joined #mojo
13:28 trone joined #mojo
13:34 jontaylor joined #mojo
14:04 sue joined #mojo
14:55 stephen joined #mojo
15:00 sri buu: haha, i keep referring to sidekiq all the time when discussing new minion features
15:41 Zoffix joined #mojo
16:06 gryphon joined #mojo
16:21 thowe joined #mojo
16:28 irqq_ joined #mojo
16:31 Mattjes joined #mojo
16:32 Ionit joined #mojo
16:32 Ionit left #mojo
17:02 ichi joined #mojo
17:11 sri where did the "perl6 is faster than perl5 with moose" meme come from?
17:12 sri whenever there's a perl6 thread somewhere, i see reini repeat it without any references
17:13 sri and people seem to accept that as "perl6 is faster than perl5"
17:13 sri so silly
17:13 sri everything i've seen so far suggests perl6 is at least an order of magnitude slower for anything realistic
17:14 btyler I think that's just the case for startup time
17:14 sri lol
17:14 btyler so I guess Reini is just confused
17:14 btyler or misread something
17:26 btyler speaking of perf, anyone have a sense if the boyer moore improvement will be noticable for mojo? http://news.perlfoundation.org/2015/11/maintaining-the-perl-5-core-re-21.html
17:29 btyler tl;dr: regex matches with fixed substrings / index() with a constant str up to 7 times faster on x86_64
17:29 sri don't think we use that much
17:32 btyler the other two grant reports are also pretty exciting -- much reduced sub call overhead
17:33 sri that we always benefit a lot from, 5.22 was huge already
17:37 ribasushi joined #mojo
18:10 dod joined #mojo
18:29 Mattjes joined #mojo
18:31 sue joined #mojo
18:47 PryMar56 joined #mojo
19:05 lluad joined #mojo
19:36 good_news_everyon joined #mojo
19:36 good_news_everyon [mojo] kraih tagged v6.31 at 45de581: http://git.io/v4myb
19:36 good_news_everyon left #mojo
19:36 sri batman: didn't you want to work on unix domain socket support?
19:38 good_news_everyon joined #mojo
19:38 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/v4mSW
19:38 good_news_everyon mojo/master 9408f99 Sebastian Riedel: bump version
19:38 good_news_everyon left #mojo
19:38 jberger can someone look at this (someone who didn't add the letsencrypt root cert) and see if this gets a green ssl?
19:38 jberger https://jberger.pl/
19:39 sri jberger: green in vanilla chrome
19:39 jberger \o/
19:39 * jberger encrypts!
19:40 carneirao joined #mojo
19:41 stephan48 jberger: we're are sorry, something went very wrong! - firefox on windows & wget on an ancient debian
19:41 jberger oh, I just mean the ssl state
19:41 jberger my "app" just die, I like the failraptor
19:42 sri jberger: ok in firefox too
19:42 stephan48 and i was attempting some fun :)
19:42 stephan48 i think if letencrypt really laucnhes next week i will spend quite some time replacing ssl certs
19:42 jberger if wget gave you that (without --ignore-*) then it worked
19:42 stephan48 yup
19:43 jberger I applied for the beta, got approved more than a week ago, but then had to spend some time doing more important things
19:44 stephan48 yea
19:44 stephan48 found the form
19:44 jberger http://host.madison.com/wsj/news/local/health-med-fit/restore-health-a-madison-compounding-pharmacy-closes/article_a8ff4f4e-d52a-5775-8281-e8f4c90bbb60.html
19:45 jberger oh look my former company formally announced
19:45 jberger so I guess I can talk now
19:47 stephan48 to bad you have to list all subdomains seperately
19:47 stephan48 for the beta thingy
19:49 jberger yeah, that's what I should have done is list all the domains I could think of :-P
19:50 jberger actually, I was trying to be a good employee of that company, most of the domains I registered for were for the company
19:54 stephan48 heh okey
19:54 stephan48 i just listed my main domain and for fun a wildcard for another project of mine
19:55 stephan48 lets see how that turns out
19:55 good_news_everyon joined #mojo
19:55 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/v4m71
19:55 good_news_everyon mojo/master ce91043 Sebastian Riedel: mention that Mojolicious is open source
19:55 good_news_everyon left #mojo
19:56 jberger Mojolicious is open source?! man, where have all those license fees I've been paying every month going?
19:56 stephan48 oops
19:57 stephan48 i think i need to find myself another source of money..
19:57 sri hehe, we take it for granted, but i guess it should be mentioned in marketing material ;p
19:57 stephan48 yea
19:57 sri actually wondering if the catalyst reference has outlived its usefulness
19:58 jberger yeah, its good to say, it just looked funny
19:58 jberger sri: I think that's useful
19:58 jberger I still mention it when I give introductory talks
19:58 jberger and people seem to like the idea that its a web framework written by someone who had already written one
19:59 * sri nods
20:01 sri you also keep mentioning the web toolkit aspect, i like that, might be worth working that in somehwere too
20:03 sri perhaps rephrasing the "JSON and HTML/XML parser with CSS selector support." point
21:06 punter joined #mojo
21:07 punter If I $ua->get, will $tx->res->body be in bytes?
21:07 punter or chars?
21:08 punter my experiments say bytes
21:10 jberger punter: http://mojolicio.us/perldoc/Mojo/Message#text
21:10 punter aha thanks
21:17 sri jberger/punter: umm... http://mojolicio.us/perldoc/Mojo/Message#body
21:22 batman sri: Yes. I want to, but I don't have more extra time to work on socket support :/
21:23 batman Will probably not start before 2016...
21:27 ZoffixMobile joined #mojo
21:36 carneirao joined #mojo
21:39 punter What does the "div ~ p" selector do? I can't find it here: http://www.w3schools.com/cssref/css_selectors.asp
21:39 punter it's in the Mojo::DOM doc
21:39 punter Ah, I found it! sorry
21:43 buu sri: Well honestly I was more talking about the blog the guy wrote about selling it
21:56 sri buu: ah
21:57 sri think i mentioned sidekiq recently when ribasushi's campaign came up again
21:57 buu sri: The initial context was ribasushi's attempt to.. yes, that
21:58 * sri starts working on mojolicious pro :)
21:59 preaction so, rapidapp? ;)
21:59 mishanti1 Not strictly mojo-related, but it is driving me nuts: should not -j X given to `prove` play well with -v ?
22:00 sri i was thinking perf tools, pretty runtime diagnostics
22:00 preaction mishanti1: not really. the output's going to be jumbled, i suspect
22:01 sri draw a pretty graph with how the route flows, show timing data, live repl in browser on exceptions... that kinda stuff ;p
22:02 mishanti1 preaction: That's what I am seeing yes. :( I had expected for the tap runner to aggregate and purge pr testfile, but it seems you only get (partial)output from the last testfile.
22:02 mishanti1 eg : [ run in parallell ] -> [aggregate ] -> [ print ]
22:03 preaction mishanti1: i do full runs with -j8 and when it reveals problems, individual runs with -v. that's why i can't just add -j8 to my .proverc
22:03 mishanti1 preaction: Seems to be what I need to do as well. Thanks for the input.
22:03 sri i'd also still like to make a really pretty minion ui... but i doubt anyone would pay for it yet
22:04 preaction sri: yeah. that's the problem. you have to make it, and then maybe in 6-12 months of development someone might end up paying for it :p
22:05 buu That's not the attitude!
22:10 voldemortensen joined #mojo
22:17 jontaylor joined #mojo
22:17 Mattjes Hello
22:17 Mattjes Is it possible to extract URLs with Mojo:Dom form inline Javascript?
22:18 Mattjes Example: function NeuFenster1() { MeinFenster =  window.open("1.htm", "Zweitfenster", "width=460,height=490,");  MeinFenster.focus(); }
22:19 Mattjes every undersite has different number with online javascript
22:20 preaction no. that's not DOM, that's javascript. you'd have to interpret the javascript
22:20 Mattjes with $dom->find('script')->last i find it
22:20 Mattjes hmmm
22:21 voldemortensen joined #mojo
22:21 Mattjes is a perl modul available to interpret Javascript so I can handle with Mojo further?
22:30 Mattjes Is it perhaps possible that Javascript to make it a string and then find with the regex contained therein .htm files?
22:35 buu Mattjes: Yes and yes
22:35 buu It sounds simpler to use a regex though
22:36 Mattjes buu: ty but i am a beginner ...
22:36 Mattjes i dont know how must i make it
22:37 Mattjes 1.htm - 2.htm - 3.htm (this filenames are inside)
22:38 Mattjes open end (i dont now how much htm inside the javascript before)
22:38 buu ?
22:38 buu You can use mojo to find the script tags
22:38 buu This will be plain text
22:38 Mattjes yeah
22:38 buu Then write a regex against it
22:38 Mattjes i have
22:38 buu ?
22:39 Mattjes regex i dont have at the moment
22:39 Mattjes but i dont know how must i write the regex (find ALL .htm)
22:39 buu /\d+\.htm/
22:39 Mattjes i am a perl beginner
22:39 buu I need a more specific question
22:39 Mattjes with g at the end?
22:40 Mattjes <!-- function NeuFenster1() {  MeinFenster =  window.open("1.htm", "Zweitfenster", "width=460,height=490,");  MeinFenster.focus(); } function NeuFenster2() {  MeinFenster =  window.open("2.htm", "Zweitfenster", "width=460,height=490,");  MeinFenster.focus(); } function NeuFenster3() {  MeinFenster =  window.open("3.htm", "Zweit
22:40 buu Sure
22:40 shadowpaste "punter" at 217.168.150.38 pasted "Shouldn't this return a full URL?" (11 lines) at http://paste.scsys.co.uk/501478
22:40 sri Mattjes: please stop pasting into the channel
22:40 punter I wrote a question in shadowpaste
22:40 buu Mattjes: Try this: my @pages = $text =~ /"(\d+\.htm)"/g;
22:40 Mattjes ok - its not alowed?
22:40 buu No it's not allowed.
22:40 Mattjes buu: thanyk you - i will test it
22:41 Mattjes ok - sorry
22:41 sri punter: base is not a Mojo::URL object
22:41 buu punter: No you need to explicitly call ->to_abs
22:41 sri and what buu said
22:42 buu sri: You mean the method base needs an actual object?
22:42 sri yes
22:42 punter thanks
22:42 sri http://mojolicio.us/perldoc/Mojo/URL#base
22:42 punter why doesn't base transform strings into Mojo::URL objects?
22:42 punter ok
22:43 Mattjes buu: it works with regex! Cool ;-) Thank you for help!
22:44 buu Hurray.
23:00 Mattjes May I ask which editor you use when you write Perl code?
23:01 preaction vim
23:02 Mattjes ty
23:12 noganex joined #mojo
23:13 jberger sri: I linked to the text method because it actually references the body method
23:49 Mattjes I have a Perl-question
23:50 Mattjes $_ =~ m/(\d+)\.jpg/
23:50 Mattjes retunr only "1"
23:50 buu Mattjes: it's a boolean
23:50 Mattjes when i use s/foo//r; - i can use "r"
23:51 Mattjes hmm
23:51 Mattjes buu: how can i return the real value
23:51 buu what is the real value?
23:52 Mattjes http://url.com/bla/foo/9.jpg
23:52 Mattjes url.com/bla/foo/9.jpg
23:52 Mattjes this is the url
23:52 Mattjes =~ m/(\d+)\.jpg/
23:52 Mattjes here i will get "9"
23:52 Mattjes but i get only "1"
23:53 Mattjes you understand what i mean?
23:53 Mattjes "real value" here is "9"
23:54 Mattjes i will not have the boolean but the digit
23:55 Mattjes =~ m/(\d+)\.jpg/r; dont work
23:59 Mattjes buu: can you help me plz?

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