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

IRC log for #mojo, 2016-09-09

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

All times shown according to UTC.

Time Nick Message
00:01 Haudini720 joined #mojo
00:01 Haudini720 left #mojo
00:06 sri oh cool, Time::HiRes now has monotonic clock support on macos sierra
00:06 sri apparently darwin implemented the same api everyone else uses finally
00:14 sri wonder if we actually need the special case anymore
00:14 sri well, obviously for older os x versions...
00:15 sri i did not think that through
00:20 jberger nice
00:32 * sri blames f.lux for shutting down his brain
00:45 Haudini553 joined #mojo
00:45 Haudini553 left #mojo
00:45 ararrr joined #mojo
00:47 ararrr joined #mojo
00:50 cpan_mojo Mojolicious-Plugin-Log-Elasticsearch-1.162530 by JUSTIN https://metacpan.org/release/JUSTIN/Mojolicious-Plugin-Log-Elasticsearch-1.162530
00:56 Haudini511 joined #mojo
00:56 Haudini511 left #mojo
01:13 kaare joined #mojo
01:31 itaipu joined #mojo
01:37 stefan_ When 7.0 was released, a blog post was made reporting a test coverage score of 95%.  How is that determined?
01:38 Grinnz https://metacpan.org/pod/Devel::Cover
01:38 Grinnz (don't know if that's what sri uses specifically)
01:38 Grinnz Essentially how much of the codebase is run by tests
01:39 stefan_ Got it, Grinnz!  That makes a lot of sense!!  How neat!  Thank you!
01:41 sri it is
01:41 Grinnz http://cpancover.com/latest/index.html is also neat
01:42 Grinnz (by the same guy)
01:46 pink_mist ohh, cpancover is very cool =)
01:46 pink_mist err, cpancover.com that is =)
01:48 ilbot2 joined #mojo
01:48 Topic for #mojo is now 🍩 nom nom | http://mojolicious.org | http://irclog.mojolicious.org | http://code-of-conduct.mojolicious.org
01:50 mcsnolte joined #mojo
02:25 jberger I hope he sends cpantesters reports as he does that
02:30 noganex joined #mojo
03:45 absolut_todd joined #mojo
04:00 ivi joined #mojo
04:19 polettix joined #mojo
04:35 disputin joined #mojo
04:37 preaction could also send the coverage reports to the metabase even
05:58 dod joined #mojo
06:03 dod joined #mojo
06:06 polettix joined #mojo
06:08 juikuen joined #mojo
06:41 stefan joined #mojo
07:07 che-quest joined #mojo
07:09 AndrewIsh joined #mojo
07:17 mbudde joined #mojo
07:27 osfabibisi joined #mojo
07:27 trone joined #mojo
07:27 arpadszasz joined #mojo
07:57 polettix joined #mojo
07:59 bd joined #mojo
07:59 bd hi
08:02 bd when using Mojo::Base, is there a way make sure an object get's certain paramteters passed in on constrution? basically like Mouse's has => (is => required);
08:10 cpan_mojo Mojolicious-Plugin-CHI-0.15 by AKRON https://metacpan.org/release/AKRON/Mojolicious-Plugin-CHI-0.15
08:30 batman bd: no.
08:31 batman you could do @missing = grep { exists $self->{$_} } qw(attr1 attr2); die "Missing: @missing" if @missing; inside sub new{}
08:31 batman just call my $self = shift->SUPER::new(@_); first
08:33 batman i never do that though. instead i do things like: has foo => sub { die "foo cannot be built" };
08:38 che-quest joined #mojo
08:39 bd batman: thank,s using a sub that dies as default should work
08:39 batman you might want to use Carp::confess() instead
08:40 bd stacktraces are overrated ;)
08:41 kivilahtio joined #mojo
08:41 lari joined #mojo
08:50 batman yeah... i think in this specific case, i always use Carp::confess() (unless i forget it)
08:50 batman since the issue is always another place.
08:55 bd right.
08:56 bd however the has foo => sub { confess() } solution will trigger on attribute access, not on object constrution
08:56 sri use a more powerful module when you need it
08:59 bd yeah, i am still in the middle of figuring out what i really need and what the available modules provide
09:01 irqq joined #mojo
09:14 dod joined #mojo
09:31 Vandal joined #mojo
09:46 arpadszasz joined #mojo
09:50 arpadszasz_ joined #mojo
09:50 arpadszasz joined #mojo
10:03 meshl joined #mojo
10:13 new2mojo joined #mojo
10:14 new2mojo hey everybody. I've created a route called '/Search', How do I call this via a url with appended parameters/values?
10:27 new2mojo ah, /? got it
10:27 Lee new2mojo: /Search?foo=bar # for a GET or pass some JSON using a POST or used name parameters in the route
10:27 Jonis that's nice
10:27 jamesaxl joined #mojo
10:44 jamesaxl joined #mojo
11:01 batman bd: often the simplest solution is the best. i strive to never add complicated libraries, until i absolutely need it.
11:02 batman so... i haven't used Mo(u)o(se) for many years.
11:02 batman mojo-base++
11:05 polettix joined #mojo
11:10 tchaves joined #mojo
11:16 tchaves joined #mojo
11:16 Jonis yeah, mojo-base++
11:33 disputin joined #mojo
12:10 anton joined #mojo
12:11 itaipu joined #mojo
12:15 juikuen joined #mojo
12:35 zivester joined #mojo
12:42 polettix joined #mojo
13:09 gizmomathboy joined #mojo
13:12 mpapec1 left #mojo
13:35 lluad joined #mojo
13:55 jamesaxl joined #mojo
13:56 mcsnolte joined #mojo
14:14 jamesaxl joined #mojo
14:19 disputin joined #mojo
14:27 jamesaxl joined #mojo
14:57 itaipu hi, I just made a simple Mojolicous::Lite app and I want to add a test to it: t/simple.t Since I didn't create a MyApp class to refer to it I can't simple call Mojo::Test->new('MyApp') how do I do it ? I already tried ->new() (#no args) but it simple doesn't work. Also tried ./simple_rest test t/simple.t with the same results
14:58 Grinnz bd: using Moo with Mojo::Base is quite common
14:58 Grinnz the only thing to consider is which constructor you'll be using
14:59 Grinnz you need Moo's constructor for requires to work, for instance
14:59 Grinnz required*
15:00 itaipu s/Mojo::Test/Test::Mojo/
15:03 sri itaipu: http://mojolicious.org/perldoc/Mojolicious/Guides/Tutorial#Testing
15:05 itaipu sri: thks worked fine now ;)
15:07 disputin joined #mojo
15:10 zivester joined #mojo
15:29 perlpilot joined #mojo
15:40 blonewolfs joined #mojo
15:52 sh14 joined #mojo
15:56 mpapec left #mojo
16:08 jamesaxl joined #mojo
16:25 jamesaxl joined #mojo
16:32 Janos joined #mojo
16:38 dod joined #mojo
16:50 disputin joined #mojo
16:54 dod joined #mojo
17:13 itaipu joined #mojo
17:23 asarch joined #mojo
17:26 polettix joined #mojo
17:27 jehdin This morning I was reading through the Mojo docu and guides, and I have a small suggestion that's primarily aimed at noobs (like myself).
17:28 jehdin I know that having an already solid understanding of web tech is extremely helpful in developing a Mojo based app - it even says so on the perldoc page under "Basics"
17:29 jehdin For instance, I'm sure that if I had more experience with web technologies, I might know what it is I'm looking for when I make a statement such as "my $host = $c->req->url->to_abs->host"
17:29 jehdin However as I don't, I'm not entirely sure what all is accessible or even available in $req
17:30 Grinnz https://metacpan.org/pod/Mojo::Message and https://metacpan.org/pod/Mojo::Message::Request is the reference documentation for that object class
17:30 jehdin My suggestion is a quick primer of web technologies that could help someone like myself understand what those are doing/how they relate to my particular app
17:31 jehdin Something like the MIME primer here: https://metacpan.org/pod/MIME::Tools#A-MIME-PRIMER
17:31 lluad jehdin++
17:31 lluad I've been using Mojo in production for years and I still have that problem.
17:32 lluad Mostly stemming from "... so what type *is* req in that context?".
17:32 sri unless a volunteer steps up, i'm afraid that won't happen
17:33 jehdin Grinnz - that's good stuff; thanks!
17:39 jehdin Sri - no worries, and completely understandable. I'm not entirely sure that it would be an easy thing to lay out for someone with little understanding of what all might make up an HTTP request
17:46 jehdin However, sometimes the more adept folks tend to inherently understand that tab A goes into slot B, when it's not so apparent to beginners.
17:54 irqq joined #mojo
17:57 tailriver joined #mojo
18:00 cuechan joined #mojo
18:00 tailriver joined #mojo
18:00 tailriver left #mojo
18:01 cuechan joined #mojo
18:17 jamesaxl joined #mojo
18:19 zivester joined #mojo
18:23 disputin joined #mojo
18:24 cuechan joined #mojo
18:35 itaipu joined #mojo
18:42 mcsnolte joined #mojo
19:13 Grinnz jehdin: the linked mozilla guide to HTTP is probably a good resource for that particular problem https://developer.mozilla.org/en-US/docs/Web/HTTP
19:30 PryMar56 joined #mojo
20:03 jehdin Grinnz - for sure; and I've spent some time perusing that link between phonecalls
20:08 jehdin also picked up a book on websocket for cheap that I'm storing for the ride home.
20:27 sri sadly most websocket books are terrible
20:27 sri like 2 pages of information hidden in 100 pages of nothing
20:28 sri if you want to learn protocols from a book, there is just one i can recommend http://shop.oreilly.com/product/0636920028048.do
20:28 sri that one is just amazing
20:30 jehdin added to cart~
20:30 sri you can actually read it for free online too http://chimera.labs.oreilly.com/books/1230000000545
20:30 jehdin http://shop.oreilly.com/product/0636920030485.do was the one I picked up
20:31 jehdin 50% off~
20:31 sri ah, sorry to say, that one is not good
20:31 jehdin eh, it was 10$
20:31 sri o'reilly ebooks are always 50% off with the code WCYAZ
20:31 jehdin about the same as I'd spend at half-price books
20:32 jehdin (no pun intended)
20:33 sri well, at least that's the current code, they change it every few months i think
20:37 sri my list of really good web books to recommend is actually pretty small
20:38 sri RESTful Web APIs and RESTful Web Services Cookbook are also pretty good
20:39 sri if you want to know the higher levels semantics of HTTP
20:39 sri (how it's actually used correctly in the wild)
20:40 sri websockets are pretty boring in that regard, once you know how to use them you know how to use them
20:40 sri with HTTP you'll stumble about something new even years later
20:40 jehdin hah, nice
20:45 sri i suppose apple airpods deserve to become a meme https://i.redd.it/idk8q3764jkx.png
20:46 sri wonder if they only looked at them from the side during the design phase
20:46 disputin joined #mojo
20:46 Grinnz haha, yeah they could have done so much better with the design, they basically just cut off the cord and said "sure, thats fine"
21:00 cuechan_ joined #mojo
21:09 jberger hahaha
21:10 jberger yeah, I get the impression that they made them with an eye towards the marketing campaign wherein you show a pair of headphone and then move the away from a dummy cord underneath
21:10 jberger I can see that working nicely
21:10 jberger but that front-facing picture does look terrible!
21:29 sri i'm amazed that f.lux actually seems to work, my sleep schedule is pretty consistent for 4 days now :o
21:35 daemonic once you start using f.lux it's impossible to go back
22:16 Janos joined #mojo
22:24 polettix joined #mojo
22:37 zivester joined #mojo
23:02 polettix joined #mojo
23:30 Janos joined #mojo
23:51 meshl joined #mojo

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