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

IRC log for #mojo, 2016-02-18

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

All times shown according to UTC.

Time Nick Message
00:14 sri mdom: use a newer perl
00:27 disputin joined #mojo
00:49 sri haha, i wonder how long it will take until all projects use the same template https://github.com/blog/2111-issue-and-pull-request-templates
01:00 jontaylor joined #mojo
01:10 asarch Is there any module to create calendars?
01:11 jberger asarch: html calendars?
01:12 jberger If so I'd doubt it, good reusable html calendar widgets are still a unicorn
01:13 asarch Well, at least for the days (a la Unix cal command)?
01:27 sri perl -Mojo -E 'a({inline => q{%= date_field "test"}})->start' daemon
01:28 sri heh, that seems to only work in chrome so far ;p
01:29 jberger sri: is it stylable?
01:29 sri sure
01:29 sri :/ http://caniuse.com/#search=date
01:32 jberger what about the datepicker
01:32 jberger I can't even inspect on it
01:34 jberger the google is not being helpful either
01:36 jberger this really doesn't surprise me
01:36 preaction it works on iOS as well
01:37 preaction chrome's date picker is _turrible_ though. i had to get modernizr involved to disable it for chrome alone
01:37 jberger I had to end up implementing my own calendar datepicker for WPF/XAML even though we had an expensive third-party widgets library
01:39 jberger that might have been the code I was most proud of in that horrible pile of crap that was that application
01:39 jberger </memories>
01:40 mspo I used to maintain a php script that parsed the output of system(cal) to figure out which days were weekends, etc
01:40 mspo well I inherited it, anyway
01:41 mspo I got to pass it off to a jr guy who didn't know unix at all and he was very confused
01:43 jberger mspo: my application had to query two databases to determine weekends/holidays because "international finance"
01:45 jberger Also that meant that somehow it got delegated to me to "correct for differences between them" (read: do the impossible)
01:45 mspo ouch
01:46 mspo datetime is hard
01:46 jberger And monitor for changes in international holidays (some countries govts can just move them according to, literally, astronomy and the like)
01:47 jberger Of course it got put on me because no one above me (in business nor development) would step up
01:47 mspo monitor how? :)
01:47 mspo google news alerts
01:47 mspo some kind of crazy mailing list I guess
01:47 jberger Watch for trades to start failing and update the prod db live
01:47 jberger Mostly
01:48 jberger Often I had to use the us embassy webpage for that country to confirm
01:48 mspo return "christmas or something" if $tradestatus == 0
01:48 stryx` joined #mojo
01:48 jberger Not the state dept page, literally the "the embassy will be closed for local holiday" page for the embassy in that country
01:49 mspo jberger: I guess you could start scraping those
01:49 jberger Perhaps eventually I would have
01:49 jberger Except I left for the first good offer I got
01:50 jberger The company I went to went out of business and it was still the right choice to go there overall
01:50 bpmedley sri++ # Minion-5.0!!
01:51 jberger I wonder when Minion will pass Mojolicious?
02:02 sri oh, one of our tag helpers is actually borked :o
02:02 jontaylor joined #mojo
02:16 good_news_everyon joined #mojo
02:16 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vgxoN
02:16 good_news_everyon mojo/master 0b4da08 Sebastian Riedel: fix datetime_field helper to use the correct type attribute value
02:16 good_news_everyon left #mojo
02:16 sri so, nobody in the history of mojolicious has ever used that helper ;p
02:17 jberger hahahahah
02:18 sri to be fair, the spec did contain a datetime and datetime-local for a time, but datetime got removed again when nobody ever implemented it
02:39 sri re minion versions, i think there won't be too many new ones this year https://groups.google.com/d/msg/mojolicious/KcQnp1e5tMI/cQfdTbp4CwAJ
02:40 sri it's ina good place now, time to collect more experience before deciding where to take it next
02:47 ilbot2 joined #mojo
02:47 Topic for #mojo is now ūüćĽ cheers | http://mojolicious.org | http://irclog.mojolicious.org | http://code-of-conduct.mojolicious.org
03:02 noganex_ joined #mojo
03:19 good_news_everyon joined #mojo
03:19 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vgx1i
03:19 good_news_everyon mojo/master 5d9a6dd Sebastian Riedel: no need to mention an example
03:19 good_news_everyon left #mojo
03:19 orev joined #mojo
03:31 cpan_mojo Minion-Backend-Pg91-5.00 by VIKAS https://metacpan.org/release/VIKAS/Minion-Backend-Pg91-5.00
03:35 vicash Natanel Rubin is back this time at BlackHat Asia 2016: https://www.blackhat.com/asia-16/briefings.html#the-perl-jam-2-the-camel-strikes-back
03:44 sri and he calls mojolicious a "CGI module" again
03:54 orev always good to learn something I guess
03:56 vicash someone should invite him to YAPC and have him give his talk there
03:59 noganex joined #mojo
04:05 mcsnolte joined #mojo
04:48 melo joined #mojo
05:28 mattp_ joined #mojo
05:32 mattp_ joined #mojo
05:41 inokenty-w joined #mojo
05:42 davido joined #mojo
05:46 mattp_ joined #mojo
06:20 mattp_ joined #mojo
06:56 kivilahtio joined #mojo
07:04 kivilahtio joined #mojo
07:37 Vandal joined #mojo
07:44 kes joined #mojo
07:44 davido joined #mojo
07:45 kivilahtio joined #mojo
08:00 kivilahtio joined #mojo
08:12 sri jberger: are the web framework benchmarks updated yet? :)
08:12 sri i'm really curious how much things have improved
08:15 mdom sri: Heh, i can just install a new version of Socket, i'm just asking for some clients that still run on 5.14
08:15 mdom Debian oldstable ... but maybe that's just a good reason to upgrade the clients... :)
08:36 pink_mist mdom: you could take a look at staticperl, which will compile a binary which includes perl as well as the specific modules you need
08:37 mdom pink_mist: Mhh, lemme see
08:38 sri how odd, Mojo::Pg is more popular on metacpan, and Minion on github
08:40 Adurah https://www.ruby-lang.org/en/conduct/ Sane, and no SJW-ism, not bad.
08:40 sri but perl people are really not very active on github at all
08:51 osfabibisi joined #mojo
08:58 mishanti1 vicash: I think if that guy gave a talk at YAPC he'd end up in tears.
08:59 good_news_everyon joined #mojo
08:59 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vgpZV
08:59 good_news_everyon mojo/master d5cf353 Sebastian Riedel: cheat a little more
08:59 good_news_everyon left #mojo
09:00 mishanti1 I think the perl crowd is the wrong forum to try to troll for a person who's got absolutely zero tech-savvy..
09:12 ashimema joined #mojo
09:18 sri hmm, i guess restrictive placeholder patterns could be reusable
09:18 sri $r->add_pattern(number => qr/\d+/); $r->get('/whatever/:foo{number}' => ...);
09:19 sri or ->add_type(...)
09:22 sri seen this pop up in more and more frameworks
09:25 sri would overlap with relaxed and wildcard placeholders though
09:25 sri so i guess those would get deprecated
09:26 sri in favor of $r->get('/:foo{wildcard}') or so
09:27 sri maybe we have our first 7.0 feature :)
09:31 sugar joined #mojo
10:21 good_news_everyon joined #mojo
10:21 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vgp2S
10:21 good_news_everyon mojo/master fa61c14 Sebastian Riedel: a few more pattern tests
10:21 good_news_everyon left #mojo
10:21 * sri pokes jberger, marcus, batman, crab and tempire
10:32 sri it's really easy to implement, just the docs need some reworking
10:33 sri like, maybe 5 lines of code or so :o
10:44 berov left #mojo
10:46 CandyAngel Adurah: It is sane.. to a "reasonable" person, but there are a few problems with it I can see. For example, who defines what is a "personal attack"? Some people act like they are being attacked if someone uses the wrong pronouns
10:47 CandyAngel And does intentionally using the "wrong" pronouns constitute harassment if it causes distress?
10:53 CandyAngel Also, if you applied that CoC here, sri would be kicked out :|
10:53 CandyAngel And so would I :P
10:54 CandyAngel (I invited him to call me an idiot and he did.. because I was being an idiot :P)
10:55 CandyAngel Actually, that's a good point. According to this CoC, you can't even make disparaging remarks about yourself.. but you may be able to make disparaging remarks about a group..
10:56 CandyAngel And finally (maybe), one mans (omgpatriarchy) SJW (compliment) is another mans SJW (insult)
10:58 batman sri: not sure if i want relaxed and wildcard placeholders to be deprecated.
10:58 batman seems like add_pattern() is more code compared to those, though i see that it's probably more powerful
10:59 Adurah "Some people act like they are being attacked if someone uses the wrong pronouns", those people are oversensitive and drag down projects.
10:59 batman i also don't see a case where i would use it myself...
11:03 CandyAngel Adurah: But they can point to the CoC and the other person would be regarded at fault for violating #2. Maybe I just find it weird because I get misgendered (even with this name!) but it doesn't bother me at all. Most of the time, I don't even correct it..
11:04 CandyAngel People thinking "He is helpful" is the same as "She is helpful" to me, because the important bit is the bit at the end :P
11:05 CandyAngel You can think I'm AI or a figment of your imagination, for all I care :P
11:05 trone joined #mojo
11:06 Adurah Seems like they're trying harder to define themselves to an audience than contribute, then.
11:07 CandyAngel Maybe
11:07 CandyAngel I don't know anyone who feels that way, so I can't ask why they find it so important >.<
11:07 Adurah The Ruby one avoids the special classes and just sticks to people being human.
11:08 CandyAngel Speci-ist!
11:08 CandyAngel Why do you hate otherkin? :(
11:08 CandyAngel I think I could be a really convincing Poe if I wanted to be :P
11:09 dotan joined #mojo
11:09 Adurah Otherkin... ror...
11:09 CandyAngel If I did, I'd have like, an encrypted message that I posted first and then after a while, I'd provide the decryption key
11:10 CandyAngel And it would explain that it was all a Poe :D
11:11 Adurah Mojo's CoC is a bit silly, especially with the mental ability part. I doubt code submitted by someone who's actually retarded would be accepted.
11:11 Adurah A "Poe"?
11:11 Adurah I can assume with Poe you mean.., but, which?
11:13 CandyAngel https://en.wikipedia.org/wiki/Poe's_law
11:14 kaare joined #mojo
11:14 CandyAngel I didn't actually used to read any Code of Conducts until I heard about the Ruby thing. I don't think I would transgress any reasonable ones and if I did, I probably don't want to be in that community anyway
11:15 dvinciguerra joined #mojo
11:22 Adurah Yeah, CoCs as a thing didn't show up on my radar until github screwed the pooch.
11:22 mishanti1 Poor pooch.
11:26 marcusr joined #mojo
11:37 sri CandyAngel: we were just joking though, and both aware of it, i wouldn't actually call you an idiot
11:40 sri CandyAngel: if you ever have the impression that i'm not following the CoC, please contact jberger
11:41 CandyAngel I know, but it doesn't matter with the Ruby CoC, you must ensure your language is free from disparaging personal remarks.. no exceptions!
11:41 CandyAngel Even if both parties are consenting..
11:42 CandyAngel And know it isn't serious
11:43 * sri actually has to look for the exact definition of "disparaging" in a dictionary
11:43 CandyAngel Plus, you can call me an idiot to my face all you like, even if you're being serious
11:44 sri the scope of that sentence wasn't actually clear to me
11:45 sri i like our CoC a lot more now
11:45 CandyAngel Though.. maybe there is a difference between "You're *being* an idiot" and "You *are* an idiot"
11:46 * sri wouldn't say either
11:46 sri think my go to line is "that's silly"
11:46 CandyAngel Sure, that works
11:48 melo joined #mojo
11:48 sri but i guess "oh noes, i'm an idiot!" would conflict with the ruby CoC
11:48 CandyAngel It would
11:48 sri hmm
11:48 CandyAngel I'd get banned so fast :(
11:50 sri for a time i tried to enforce a no swearing rule here, it didn't go too well
11:53 sri but we are still in the beginning stages of this movement towards code of conducts, who knows what will work out in the end
11:54 sri at least this is not twitch chat :)
11:55 sri batman: there would be built-in patterns for wildcard/relaxed..
11:55 sri $r->get('/:foo{relaxed}') or so would just work
11:56 sri and we prolly would have a few more, like $r->get('/:foo{int}')
11:56 sri for \d+
11:57 sri $r->add_type(...) would be for additional ones, perhaps from plugins
12:00 batman is "foo" the name of the placeholder and {xxx} the name of the type to match?
12:00 sri yes
12:00 batman sorry... i first read the test as the url would actually match /foo_{variable}
12:01 sri oh, not the test
12:01 sri ignore the test
12:01 sri that was totally unrelated ;p
12:01 batman i get that now, hehe
12:01 sri oops
12:01 batman thanks for clearing that up :)
12:01 batman i guess it's just me - juggling quite a lot of code @work now.
12:02 sri jberger, marcusr, tempire, crab: i meant this http://irclog.perlgeek.de/mojo/2016-02-18#i_12062326
12:02 batman i guess i'm leaning towards +1 then.
12:02 sri the idea is basically to replace our current limited prefix system of /#foo and /*foo with types
12:02 sri such as /:foo{relaxed} and /:foo{wildcard}
12:03 sri or better names if you find them
12:03 batman yeah: rlxed and wcrd
12:03 * batman hides
12:03 sri -.-
12:04 sri maybe /:foo{slurpy} or so
12:04 batman yeah.... not looking forward to rewriting all my apps though :/
12:05 batman could we do $route->new_and_fancy_parser(1)->get("/:foo{wildcard}") for a while, instead of doing a hard break on seven-point-oh?
12:06 sri you already said +1, no take backs!
12:06 batman i said i'm /leaning towards +1/, hehe
12:06 sri both can co-exist pretty easily i think
12:06 sri even without a flag
12:07 batman i would very much appreciate that. makes it easier to convert, instead of doing all the apps at once.
12:07 CandyAngel Perhaps it is a matter of experience. When I was younger and in a community, I got upset because people would ignore my warnings, even after I was shown to be right most of the time (I'd point out "fatal" unintended consequences). I'd rather get actual consideration and called an idiot, than just be ignored
12:07 CandyAngel I totally should have pulled the "you're just dismissing me because I'm female!" card :P
12:12 Adurah All you need for a CoC is a long regex of what you can't say.
12:12 CandyAngel :P
12:12 CandyAngel Brilliant!
12:13 CandyAngel Your idea intrigues me and I wish to sign up to your mailing list.
12:13 Adurah Perl code of Conduct, all regex.
12:13 Adurah All you have to do is run what you intend to type/post through the regex.
12:13 CandyAngel Then people can submit failing tests to it to show where it doesn't work as intended
12:13 CandyAngel :D
12:23 kivilahtio_ joined #mojo
12:26 CandyAngel My friend told me a story about when he got told off for saying to someone "Thank you, you're a gentleman and a scholar".. because that persons definition of "gentleman" included "oppresses women"..
12:27 Adurah The future of open source, heh.
12:27 CandyAngel And this is why "no disparaging personal remarks" only works if you define what is disparaging. Some people regard being called a gentleman an insult :|
12:28 CandyAngel Somehow, "You are generous and smart" became "You oppress woman and are elitist" \o/
12:29 CandyAngel You oppress woman. Me regress evolution. Hit rock.
12:31 sugar joined #mojo
12:33 cpan_mojo Test-Mock-Time-v0.1.5 by POWERMAN https://metacpan.org/release/POWERMAN/Test-Mock-Time-v0.1.5
12:55 * CandyAngel apparently hit the conversation with said rock
12:55 CandyAngel Whoops!
12:56 Lee taciturnity++ # less likely to offend :)
12:58 CandyAngel :P
13:24 sri already got a patch for basic placeholder types support https://gist.github.com/anonymous/9d9cb3a77130fc91879f
13:24 sri relaxed and wildcard placeholders also still work
13:25 sri it's easy to add a deprecation warning
13:26 sri most complicated aspect was actually how to pass the types to the pattern object from the router object
13:27 sri cost is 9 lines right now, but i think i can golf some of it down
13:28 asarch joined #mojo
13:37 sri and down to 6 lines, not too bad for such a big feature
13:38 CandyAngel This is a good example of why I want to ask you all the questions, sri :P
13:39 CandyAngel Adding big features in <10 lines of code is cool ^_^
13:40 marcusr sri: I like the patterns
13:40 sri btw. some examples for typed placeholders http://bottlepy.org/docs/0.12/tutorial.html#dynamic-routes
13:40 sri http://flask.pocoo.org/docs/0.10/quickstart/#variable-rules
13:40 batman sri: that patch breaks back compat..?
13:40 marcusr batman: which is why he wants it for 7.0
13:40 sri it's also on the todo list for expressjs https://github.com/expressjs/express/issues/2756
13:40 sri batman: all tests still pass
13:40 sri marcusr: not even necessary, all tests pass
13:41 batman marcusr: i asked earlier for a "deprecation window"
13:41 marcusr sri: so you won't deprecate relaxed and wildcar?
13:41 sri deprecation is super easy
13:41 marcusr wildcard*
13:42 sri the code for the old wildcard/relaxed prefix is localized to a block of 5 lines
13:42 batman marcusr: why so eager on deprecation?
13:42 sri don't think the old prefixes make much sense with typed placeholders
13:43 sri in the docs the sections on them can be directly replaced with a section on types placeholders i think
13:43 sri already have an idea
13:43 sri s/s/d/
13:43 sri we can deprecate, we don't have to, but i think we should
13:44 batman sri: i think we should deprecate as well - just not over night.
13:44 sri let me illustrate it
13:44 * Lee would suggest a long(er than normal) deprecation cycle
13:44 sri this is the entire code required to make /#foo and /*foo work https://gist.github.com/anonymous/c824e99cd8bd9446dfe1
13:45 marcusr batman: am I?
13:45 marcusr batman: I was just quoting sri from above. if we can do it without deprecation I'm fine with it.
13:45 batman marcusr: sorry. that was my impression.
13:45 batman cool
13:45 sri not deprecating would be very bad for the docs
13:46 batman i'm all in for deprecation, i would just appreciate if this change could be introduced in 6.x series before deprecation in 7.0
13:46 sri we've never done something like that
13:46 marcusr Can't we just keep the deprecation window a bit longer?
13:46 marcusr deprecate now, but not actually remove in 7.0?
13:47 batman yeah, what marcusr said ^
13:47 sri we are not even at 6.50
13:47 marcusr I guess this will affect a lot of apps
13:47 Lee and potentially plugins
13:48 batman it changes everything. even mor than param() and friends imo.
13:48 batman *more
13:48 sri so, you do want typed placehilders, right?
13:48 sri s/i/o/
13:49 batman i can't decide. i think i want both, but eventually for * and # to go away.
13:51 marcusr si?
13:51 batman i just know that *some* of my ~20 apps will suffer and i would like time to convert them, while still being able to upgrade.
13:51 batman marcusr: what does "si" mean?
13:52 kivilahtio joined #mojo
13:53 kivilahtio joined #mojo
13:53 sri it's ok to say that you don't want them ;p
13:58 sri the format is also undecided
13:58 * sri tends towards /(:foo:wildcard)
13:58 sri which is equal to /(foo:wildcard)
13:59 marcusr batman: means yes
13:59 batman thanks
13:59 ramortegui joined #mojo
13:59 mspo perl does typing?
14:00 sri oh, the cost is down to 1 line :o
14:10 * jberger has been sick, reads the backlog
14:11 sri latest patch https://gist.github.com/anonymous/fd41e12424baa7e9a7b7
14:12 sri with beginnings of docs
14:14 sri with the prefix becoming unimportant, i think i like the (foo) form more
14:14 sri for placeholders
14:15 mspo so I'm really with you guys on the cookie session right now; I'm having tons of php session collisions for some reason
14:15 sri jberger: everyone has the flu around here :S
14:17 jberger I think I've just got a head cold, but I slept almost 10 hours last night which I almost never do
14:18 jberger as to the ruby coc, I've seen lots of people bashing that one
14:18 jberger I actually like the flexibility baked into ours
14:19 jberger first of all, in US law there are protected classes purely because there are people who are more likely to be subjected to harassment of different kinds and thus they are given extra protection under the law
14:19 neilhwatson joined #mojo
14:19 jberger second, while everyone is entitled to an opinion, not all opinions are equally welcome here
14:20 jberger if someone wants to rant on why their race is a superior race, they are welcome to do so, but I don't have to hand them my microphone to do it
14:20 sri germany actually has stronger laws for that i believe
14:21 CandyAngel The best anti-discrimination laws are the laws that discriminate, right?
14:21 jberger and as far as "participants should always assume good intentions." I would say you should start with that assumption
14:22 jberger but you should not always come with that assumption otherwise everyone is always only on their first strike
14:22 sri anyway, we are past that topic!
14:22 sri move on to typed placeholders ;p
14:22 jberger haha, ok
14:23 jberger can you give me the executive summary of where you are at on that?
14:23 CandyAngel Silly sri, we're meant to discuss it over and over until we are so sick of hearing about it, we do whatever whoever is nagging most about is asking for
14:23 jberger is that last patch still the one under consideration
14:23 jberger ?
14:23 sri jberger: yes
14:23 CandyAngel Also, I like () for placeholders, because it looks regexy
14:23 CandyAngel So it makes sense
14:24 jberger also I'm going to be very leery of deprecating existing placeholders, just fyi
14:24 jberger not saying I'll 100% oppose it
14:25 CandyAngel I'm reading the Mojolicious CoC.. it looks like the text is floating off the screen.
14:25 * CandyAngel needs to sleep
14:25 sri jberger: everybody seems to like typed placeholders, but doesn't want to change their existing apps ;p
14:25 sri jberger: implementation is /(foo:type) currently
14:27 Lee looks like there's only a handful of plugins using relaxed or wildcard placeholders
14:27 sri relaxed is very uncommon
14:28 preaction right, but literally every app i've ever written does, including in places i don't work for anymore
14:28 sri wildcard is more often used, for catch-all routes and the like
14:28 preaction i've got a lot of IP addresses in my routes :(
14:29 sri i mean, we could keep the old prefixes, but how would you document that?
14:29 jberger also, are we keeping :foo ?
14:29 sri yes
14:30 jberger because if we are then :foo vs (foo:type) is going to get strange
14:30 sri the form /(foo) has always been an alternative to /:foo
14:30 sri i don't think it is
14:30 jberger the position of the semicolon changes sides
14:31 sri also valid is (:foo:type)
14:33 Lee naive search shows Mojolicious::Plugin::{PODBook,Prove,ReverseProxy,Toto,Ubic,ImageNinja,HostMeta,CGI} are the plugins that would be affected
14:33 jberger so maybe this could be the path forward, make explicit default types that cover the existing :, * and # routes
14:33 jberger then just document the placeholders as shortcuts to those types
14:33 jberger no breakage, new functionality
14:33 CandyAngel Okay, I've read the Mojolicious CoC now :P
14:34 sri jberger: someone else than me will have to do that part
14:34 jberger CandyAngel: I'm interested in discussing this with you and others and yet I don't want to derail the placeholder conversation
14:35 jberger can we make a temporary mojo-discuss or something?
14:35 jberger and nuke the channel afterwards
14:35 CandyAngel Sure, I don't mind, just let me know where and I can join
14:37 jberger ok people who are interested in further discussion of the CoC please join #mojo-discuss, I've registered it with the explicit intention of booting everyone when we are done
14:38 CandyAngel join #mojo-discuss
14:38 CandyAngel Oops
14:38 CandyAngel Wow
14:38 CandyAngel I'm an idio.. I mean, how silly of me
14:38 jberger back to placeholders
14:38 jberger sri: do you think that that is an easy way to document existing placeholders in a new scheme?
14:39 stryx` joined #mojo
14:40 sri jberger: i don't know
14:41 jberger I mean if : is already a shortcut for ()
14:43 Foxcool joined #mojo
14:56 sri actually, we also have /(*foo)
14:56 sri and /(#foo)
15:00 vicash is this planned change in routes "change needed" or "change for the sake of change" ?
15:01 sri i find that question offensive
15:01 vicash sorry.
15:03 mcsnolte joined #mojo
15:04 jberger vicash I think the issue is, as we make the router more powerful, how do we keep/document existing behavior in a way that does not clash with new behavior
15:05 vicash plugins ? i would think that considering how easy Mojo's plugin system is to use, behaviours can be divided into plugins
15:05 vicash or roles for that matter
15:06 jberger well, see that's kinda where I was going with causing the existing router symbols to be shortcuts for new behavior
15:10 vicash is the old behaviour that is being referenced by the current symbols going to be deprecated then ? in that scenario a Role::UseOldBehaviour might work
15:10 vicash and the new behaviour can be the default
15:10 jberger in order to do that we'd need to have a shortcut system in place
15:11 jberger at which point I'd argue that the old shortcuts be in the core router anyway
15:11 vicash is there a speed issue that is being tackled ?
15:23 jberger batman: this kind of feature might be really nice in swagger
15:23 jberger rather than x-mojo-placeholder or whatever it is
15:50 batman jberger: you still need x-mojo-placeholder to be compatible with other libraries (unless i missed out on something)
15:51 jberger you could have x-mojo-type which would be a lot more explicit and custom to the usage of that particular item
15:52 batman jberger: not sure if you can. i imagine that would break the 400 error reporting
15:53 batman jberger: i've discussed this several times in #swagger: making more restrictive placeholders will result in 404, when i would rather want a 400
15:53 good_news_everyon joined #mojo
15:53 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vghKt
15:53 good_news_everyon mojo/master f4c55e5 Sebastian Riedel: add support for typed placeholders
15:53 good_news_everyon left #mojo
15:53 jberger hmmm true
15:53 sri jberger: your turn, find a way to work it into the docs
15:55 sri http://mojolicious.org/perldoc/Mojolicious/Guides/Tutorial#Typed-placeholders
15:56 sri http://mojolicious.org/perldoc/Mojolicious/Guides/Routing#Typed-placeholders
15:57 good_news_everyon joined #mojo
15:57 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vgh6X
15:57 good_news_everyon mojo/master ecd7f7e Sebastian Riedel: use typed placeholders in all examples
15:57 good_news_everyon left #mojo
15:58 disputin joined #mojo
16:00 jberger so I would probably make section under Typed Placeholders that said something like:
16:01 jberger "A few placeholder types are so commonly used in url routings that we have an even shorted syntax for them"
16:01 jberger *shorter
16:01 sri actually, that is all garbage
16:01 sri i hate everything
16:04 jberger :s
16:05 sri it doesn't read well at all anymore
16:05 sri there's a conflict between typed placeholder and restrictive placeholders too
16:28 good_news_everyon joined #mojo
16:28 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vghdX
16:28 good_news_everyon mojo/master 027208a Sebastian Riedel: mention shortcuts too
16:28 good_news_everyon left #mojo
16:29 sri jberger: this feels a little better, still not sure though
16:30 gryphon joined #mojo
16:30 sri but the docs are not for me, we need user feedback http://mojolicious.org/perldoc/Mojolicious/Guides/Routing#Typed-placeholders
16:31 jberger yeah I like that better
16:33 CandyAngel Ms CantReadTheDocsProperly is here for you sri!
16:33 * CandyAngel has a read
16:34 bwf joined #mojo
16:35 CandyAngel Well
16:35 CandyAngel it's a good korma chicken recipe but I don't know what that has to do with Mojo..
16:36 CandyAngel More seriously, it reads fine, though some wording seems off
16:36 CandyAngel like "Because the relaxesd and wildcard", I would expect to be "The relaxed and wildcard"
16:36 CandyAngel Also, "pleaceholders" typo
16:36 jberger sri: so how does this interact with the regex form of restrictive placeholders?
16:37 sri jberger: not at all, regex from has precedence
16:37 CandyAngel Or "Shortcut forms are provided for the relaxed and wildcard types."
16:37 jberger I mean, when would I add a type vs using a restrictive placeholder
16:38 CandyAngel You don't need to mention because they are common
16:38 jberger CandyAngel: if you've noticed they have been replaced in a lot of the documentation by the new form
16:39 jberger the question is should # and * forms be removed in favor of the new form (stash_key:type) or documented as shortcuts (which I suggest)
16:40 jberger not just for the back-compat issue btw
16:40 jberger I don't want to have to type out (some_value:relaxed) everytime
16:40 CandyAngel I prefer shortcuts for those being available
16:40 CandyAngel yeah, neither would I
16:40 jberger #some_value is nice
16:41 jberger but I do like the idea of being able to add new types
16:41 CandyAngel Especially because I still use 78 character line limit :P
16:41 jberger me and my retina screen don't care too much about that limit
16:41 jberger :-P
16:42 jberger though I do follow the style guide here
16:42 bradjm joined #mojo
16:43 CandyAngel I only care because I read my code in an 80 character wide putty terminal :P
16:44 * jberger clicks the corner of CandyAngel's window and drags
16:45 CandyAngel Trying to get me fired?
16:45 CandyAngel :P
16:45 jberger man if you get fired for that ... :D
16:45 CandyAngel I'm not supposed to have putty..
16:48 jberger people should be allowed to use the tools that facilitate the most effective productivity
16:48 jberger GAH LET ME USE MY STUFF
16:50 CandyAngel Totally agreed, that's why a blind eye is turned. I'm not just slacking off, I'm doing things to help me do my work better and faster
16:50 CandyAngel And other people's work :P
16:54 preaction right, but then they use it as an excuse to fire you when you do something they can't legally fire you for :p
16:57 good_news_everyon joined #mojo
16:57 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vghhW
16:57 good_news_everyon mojo/master 2881eb1 Sebastian Riedel: mention how to create new placeholder types
16:57 good_news_everyon left #mojo
16:57 * CandyAngel shrugs
16:57 CandyAngel I'm being helpful, if they want to use that to fire me, that's their perogative
16:57 sri a very simple example http://mojolicious.org/perldoc/Mojolicious/Guides/Routing#Adding-placeholders-types
16:58 CandyAngel They will have to do all work that I'm currently doing. I would wish them all the best! :)
16:58 PryMar56 joined #mojo
16:59 CandyAngel I got disciplined for writing a script, they said they would implement their version.. a couple of years ago. Still nothing.
17:00 Adurah Employment at-will'd?
17:00 CandyAngel I just try to be as helpful as I can
17:01 CandyAngel Adurah: No
17:04 chienjo joined #mojo
17:10 good_news_everyon joined #mojo
17:10 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vgjvP
17:10 good_news_everyon mojo/master 569ae3e Sebastian Riedel: more details
17:10 good_news_everyon left #mojo
17:10 dboehmer joined #mojo
17:11 dboehmer today I started using Plack::Builder to mount several mojo lite and other apps to a single development server
17:11 dboehmer unfortunately $c->req->url->host and ->port are undef
17:11 dboehmer i don't know if that is intended
17:12 good_news_everyon joined #mojo
17:12 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vgjft
17:12 good_news_everyon mojo/master b5734e2 Sebastian Riedel: fix typo in link
17:12 good_news_everyon left #mojo
17:12 dboehmer i see that Plack is forwarding request to /my_app to MyApp but I'd still like to get host and port to build links to other parts of my development server
17:13 dboehmer has somebody experiences with Plack::Builder and $c->req->url->host?
17:13 good_news_everyon joined #mojo
17:13 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vgjfS
17:13 good_news_everyon mojo/master 386a44b Sebastian Riedel: fix typo in example
17:13 good_news_everyon left #mojo
17:14 batman dboehmer: do you have other plack apps? if not, i would suggest using https://metacpan.org/pod/Mojolicious::Plugin::Mount or https://metacpan.org/pod/Toadfarm
17:16 dboehmer batman, one of my apps is a Dancer2 app. I can mount PSGI but from 1st sight Plugin::Mount looks like it does only mount Mojo apps
17:26 good_news_everyon joined #mojo
17:26 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vgjkD
17:26 good_news_everyon mojo/master 6984366 Sebastian Riedel: allow relaxed placeholders to be customized
17:26 good_news_everyon left #mojo
17:27 orev joined #mojo
17:28 sri jberger, batman, marcusr, tempire, crab: since i'm not sure if typed placeholders should stay, i need a formal vote
17:29 jberger I still don't know if I've heard how its different from restrictive placeholders
17:29 sri https://github.com/kraih/mojo/compare/fa61c142180046b1c28855a184337eedfb156393...69843664038434d83aa1b60f17d2493320e14d78
17:29 sri jberger: i don't even understand the question
17:30 jberger with typed placeholders I can make it only match an isbn (as you show in your example) but couldn't you do the same thing with restrictive placeholders?
17:30 jberger is it just that they are reusable?
17:30 sri yes
17:35 sugar joined #mojo
17:39 lluad joined #mojo
17:43 marty joined #mojo
17:52 good_news_everyon joined #mojo
17:52 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vgjOO
17:52 good_news_everyon mojo/master 9a825fd Sebastian Riedel: remove typed placeholders again
17:52 good_news_everyon left #mojo
17:52 sri oh well, now i'm burned out and need a break
17:53 * CandyAngel gives sri  a KitKat
17:55 jberger sri: could you put it on a branch?
17:55 preaction that situation clearly calls for a Snickers!
17:56 CandyAngel Nu-uh, KitKat!
17:56 CandyAngel Breaking KitKats is much more satisfying than breaking a Snickers anyway
17:56 jberger you're both wrong, Butterfinger.
17:57 * jberger bans all the candy heathens
17:57 jberger mmmm I do like a good snickers though
17:57 jberger ok you can stay
17:58 preaction butterfinger hasn't been good since the simpsons stopped being funny... :p
18:00 Vitrifur joined #mojo
18:17 FloydATC joined #mojo
18:22 chienjo_ joined #mojo
18:47 trone joined #mojo
18:59 sugar joined #mojo
19:09 cpan_mojo Mojolicious-Plugin-StaticLog-0.01 by FRANKC https://metacpan.org/release/FRANKC/Mojolicious-Plugin-StaticLog-0.01
19:19 sugar joined #mojo
19:30 mtths joined #mojo
19:32 perlpilot joined #mojo
19:51 patrickz joined #mojo
20:14 user_5132 joined #mojo
20:16 user_5132 http://nopaste.linux-dev.org/?945038
20:16 user_5132 "Template "checkaddress.html.ep" not found"
20:16 user_5132 "Nothing has been rendered"
20:17 user_5132 But it renders with inline $c->render(text => ...)
20:17 user_5132 So?
20:18 mdom Mojolicious is great, almost every time i need a feature, i check the documentation and there it is!
20:19 pink_mist that's an issue when you're doing async stuff and render it in a callback sometime later; you need to keep another copy of $c->tx from before the callback and use that one to render
20:19 pink_mist iirc
20:19 mdom Today i needed to check if the first response in a chain of redirects is a 301 and i found tx::redirects! Thanks!
20:23 jberger user_5132: use $c->render_later to prevent default rendering
20:23 pink_mist user_5132: http://mojolicious.org/perldoc/Mojolicious/Controller#tx <-- see the example labelled "# Perform non-blocking operation without knowing the connection status", how it saves $c->tx for use inside the callback
20:24 jberger yeah, that's even better
20:25 pink_mist (I wish it was possible to link specifically to the example I wanted to show)
20:26 jberger actually, even better is to use the delay helper: http://mojolicious.org/perldoc/Mojolicious/Plugin/DefaultHelpers#delay
20:28 pink_mist nice
20:28 pink_mist hadn't seen that one before
20:28 pink_mist the example to that one still seems to save a copy of $c->tx even though the documentation for it seems to imply that shouldn't be needed?
20:29 pink_mist or am I misunderstanding the documentation?
20:29 jberger that's the "longer version"
20:29 jberger the example is below that
20:29 pink_mist oh, gotcha
20:29 * pink_mist dumb
20:30 jberger nah, pink_mist levels up
20:30 jberger now you don't have to manually close over the $tx anymore
20:30 pink_mist =)
20:31 user_5132 I added $c->render_later and it seems to work, but I need to figure out what it does to see if this is a good solution since you mentioned other ways, such as delay
20:32 jberger render_later just tells it not to auto render
20:33 jberger what server are you using?
20:33 user_5132 Morbo / Windows for development
20:33 jberger for any of the mojo servers you don't need the start loop incantation
20:34 jberger and even if you did, the delay helper would be a better choice probably
20:35 jberger user_5132: the way your code works is technically fine, but the delay helper does nice things like keep a strong reference to the transaction for you
20:35 jberger which prevents strange errors from occurring when the connection is closed early for example
20:36 user_5132 I see then, I'll check it out
20:36 user_5132 you mentioned I do not need to start a loop, so this line: Mojo::IOLoop->start unless Mojo::IOLoop->is_running;  is not necessary?
20:37 user_5132 all the tutorials I read added this kind of line to non blocking i/o requests
20:38 user_5132 Oh, that is only necessary if I use  Mojo::IOLoop->server, right?
20:38 user_5132 For morbo, it's not needed
20:39 jberger so the examples mostly include that so that if you use it in other scenarios that everything will work
20:39 jberger while you are in a proper mojo webserver Mojo::IOLoop->is_running is always true
20:40 jberger user_5132: when in doubt, use a delay with the ->wait method
20:41 jberger that is the absolute safest option
20:44 user_5132 thank you jberger
20:44 sugar joined #mojo
20:44 user_5132 Although the code is now fine working, I'll rewrite it later to use delays
20:50 dragos joined #mojo
20:50 jberger user_5132: glad to help
21:18 cpan_mojo Mojolicious-Plugin-StaticLog-0.02 by FRANKC https://metacpan.org/release/FRANKC/Mojolicious-Plugin-StaticLog-0.02
21:31 bwf Is the command "./script/app minion worker" supposed to "hang" or should it return to the shell?
21:34 preaction bwf: it runs in the terminal. if you want to make it a daemon, "nohup" and "&", or the Daemon::Control module might help
21:34 preaction also the bsd daemontools
21:35 bwf cool, thanks
21:43 lluad joined #mojo
21:48 mgrimes joined #mojo
22:21 dvinciguerra joined #mojo
22:35 sugar joined #mojo
22:41 HtbaaPi joined #mojo

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