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

IRC log for #mojo, 2015-01-27

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

All times shown according to UTC.

Time Nick Message
00:04 sri i think #p5p wants to call it a language quirk and move on :)
00:05 sri for completeness sake, these two one-liners show the issue very well
00:05 sri perl -E 'Foo->does->not->exist->{die "trap"}'
00:05 sri perl -E 'Foo->does->not->exist->(die "trap")'
00:06 sri ->(...) is special in that the expression it contains is evaluated first
00:06 sri while everything else is left to right
00:06 Grinnz interesting
00:08 Grinnz so then why does shift->begin->(@_) work and not shift->begin(0)->(@_)
00:09 sri because @_ still contains the invocant
00:09 sri and we want that chopped off
00:10 sri @_ is evaluated first and its values put on the stack, only afterwards it does the shift() and calls the method...
00:12 Grinnz ahh, so shift->begin->(@_) works because it's evaluated in the wrong order
00:13 sri hehe, found a few bugs http://grep.cpan.me/?q=shift%5C-%5C%3E%5Cw%2B%5C-%5C%3E%5C%28%5C%40_%5C%29
00:13 Grinnz lol
00:13 Grinnz ill have to make sure i'm not doing that anywhere in my code at work
00:14 sri well, in my 14 years of perl work i've only encountered this once, last year
00:25 rem_lex joined #mojo
00:32 punter joined #mojo
00:57 ignacio_ joined #mojo
01:13 marty joined #mojo
01:15 good_news_everyon joined #mojo
01:15 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/F3Hh
01:15 good_news_everyon mojo/master 68532eb Sebastian Riedel: handle stopped workers more consistently
01:15 good_news_everyon left #mojo
01:19 sri muhahahaha, so in the windows API functions return ERROR_SUCCESS if they were successful
01:20 pink_mist hah
01:20 jberger WAT
01:20 jberger WAT?
01:20 purl Watt?  Watt?  I can't hear you, there's this buzzing noise where my brain should be. or https://www.destroyallsoftware.com/talks/wat
01:21 Grinnz sri, E_OK
02:01 good_news_everyon joined #mojo
02:01 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Fsv2
02:01 good_news_everyon mojo/master a1d8aea Sebastian Riedel: mention in the log if a worker stopped too early
02:01 good_news_everyon left #mojo
02:17 klapperl joined #mojo
02:20 good_news_everyon joined #mojo
02:20 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/FskR
02:20 good_news_everyon mojo/master f877d2a Sebastian Riedel: use a more consistent attribute name
02:20 good_news_everyon left #mojo
03:44 good_news_everyon joined #mojo
03:44 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/FsEX
03:44 good_news_everyon mojo/master 6ca4ba7 Sebastian Riedel: more consistent descriptions
03:44 good_news_everyon left #mojo
03:48 noganex_ joined #mojo
04:06 good_news_everyon joined #mojo
04:06 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/FsVZ
04:06 good_news_everyon mojo/master 107872c Sebastian Riedel: better log messages
04:06 good_news_everyon left #mojo
04:07 good_news_everyon joined #mojo
04:07 good_news_everyon [mojo] kraih tagged v5.75 at a4c885b: http://git.io/FsVa
04:07 good_news_everyon left #mojo
04:08 good_news_everyon joined #mojo
04:08 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/FswI
04:08 good_news_everyon mojo/master 7c395c4 Sebastian Riedel: bump version
04:08 good_news_everyon left #mojo
04:08 cpan_mojo Mojolicious 5.75 by Sebastian Riedel - http://metacpan.org/release/SRI/Mojolicious-5.75
04:09 Grinnz woot
04:10 cpan_mojo Minion 1.06 by Sebastian Riedel - http://metacpan.org/release/SRI/Minion-1.06 (depends on Mojolicious)
04:11 Grinnz but it's less punctual!
04:13 jberger Grinnz: you doubt cpan_mojo?!
04:13 Grinnz i mean using less punctuation
04:16 * Grinnz searches for better puns
04:17 jberger you probably don't know the pride I take in the speed of cpan_mojo either
04:21 Grinnz well it's faster than metacpan
04:28 inokenty-w joined #mojo
04:33 jberger Grinnz: that is actually a problem
04:33 jberger in two reasons, first the link to metacpan doesn't work right away
04:33 jberger second, it actually uses metacpan to do dependency check, so it usually is checking against the previous version
04:34 jberger if a module became dependent on Mojolicious it would get missed the first time, and if it stops depending on Mojo it would be mentioned the first time
04:34 jberger that's not so much of a problem, but it is for new modules
04:36 absolut_todd joined #mojo
04:36 Grinnz that reminds me, if i get snowed in tomorrow i gotta mess around with Mojo::IRC
04:37 Grinnz assuming i don't also lose power
04:37 jberger Grinnz: where abouts are you?
04:37 Grinnz connecticut
04:37 purl connecticut is nice though or pronounced "collect a cut" (see entry under "taxation") or for fucking (there's nothing else to do)
04:37 Grinnz lol
04:37 jberger hahaha
04:38 jberger well if I may offer some modules to look at, my Mojolicious::Command::nopaste and Mojo::FriendFeed (the examples, including cpan_mojo itself) are fun
04:38 jberger for IRC
04:39 Grinnz well, i have lots of command-type things to set up, but right now i'm working on the basic structure
04:39 jberger oh, I was just saying for ideas
04:39 jberger if you have ideas, have at em
04:39 Grinnz my bot is currently POE based, not modular, and has about 50 different commands, probably 20 of which involve external services
04:40 Grinnz so i'm sure it'll be fun once i start porting those
04:40 jberger I built a minimal pluggable bot, its on my github, I almost finished it a couple times, but I lose steam
04:40 jberger I think I overthink it
04:41 jberger that does sound like a fun project
04:41 Grinnz ditto, but now i have "realworld" ideas to apply it to
04:42 Grinnz i have that bot, and two other bots that i want to base on the same framework
04:42 Grinnz so i'm designing to that purpose
04:43 jberger here is how my nopaste clone can post to irc, I like how concise it is given that it isn't the primary functionality of the module: https://github.com/jberger/Mojolicious-Command-nopaste/blob/master/lib/Mojolicious/Command/nopaste/Service.pm#L99-L141
04:43 cpan_mojo Net-Google-Drive-Simple 0.12 by Michael Schilli - http://metacpan.org/release/MSCHILLI/Net-Google-Drive-Simple-0.12 (depends on Mojolicious)
04:44 Grinnz yeah i can only imagine doing that in one function in POE
04:44 Grinnz whoa, google drive
04:45 Grinnz i didnt know google had a drive api
04:46 Grinnz weird seeing a module depend on Mojo and separately, JSON and Log4perl and LWP
04:46 Grinnz lol
04:46 sri the book i originally used to learn perl from was written by the author of that module :)
04:46 MojoNoPaste joined #mojo
04:46 MojoNoPaste jberger pasted http://pastie.org/9864207
04:47 jberger sri: that's kinda cool
04:48 jberger Grinnz: yeah, I know the feeling
04:49 jberger but then again, to combat the "anti-cpan" wrap, I do like to encourage people to use the parts of the Mojolicious toolkit in their non-Mojo projects
04:49 jberger and of course, the end result of that is people doing just that
04:49 jberger (even if it does make you want to send a huge pull request)
04:50 Grinnz heh
04:50 * tempire had forgotten how enjoyable it is to master a new language
04:51 Grinnz also, he wrote log4perl, so theres that
04:52 * jberger guesses that tempire is learning dutch
04:52 jberger :-P
04:52 tempire schrijf alle perls!
05:00 rem_lex joined #mojo
05:16 Grinnz i'm thinking about log paths with Mojo::Log again, and how i'd like it if setting $log->path would clear the handle, but i cannot think of any way to do that without it being really ugly
05:16 jberger Grinnz: use Moo and use triggers
05:16 Grinnz the least ugly i can think of is to just define the attribute manually
05:17 jberger but for Mojo::Log, not likely
05:17 Grinnz jberger, i mean as a pull request for mojo :P
05:17 jberger path would have to be a method not an attribute
05:18 jberger but then it gets harder to set on instantiation
05:18 Grinnz yeah... and would that require changing what it's called in the documentation, even though it still works the same?
05:18 Grinnz ah true
05:19 jberger do you really change your log path at runtime, or is the concept just nagging at you?
05:19 Grinnz i do
05:19 Grinnz right now i do $log->path('blah'); delete $log->{handle};
05:20 jberger then seriously, subclass with Moo and use attributes
05:20 jberger sorry triggers
05:20 Grinnz i actually have a helper that does that
05:20 Grinnz well the whole point of this is to not overwrite the Mojo::Log that the app starts up with
05:20 jberger why not?
05:21 jberger just set it early on in the startup method
05:21 Grinnz because i have a reference to it somewhere, and it sets debug according to mode on startup, etc
05:21 Grinnz that happens before startup
05:21 rem_lex joined #mojo
05:26 jberger rebless?!
05:26 purl rumour has it rebless is ok but I think it's too limited
05:26 * jberger runs
05:26 Grinnz heh... that could work
05:28 Grinnz i feel like if the handle wasn't an exposed attribute, it could be done in Mojo::Log with minimal trickery
05:28 Grinnz but eh
05:28 jberger true, but what if you wanted to pass in a handle
05:28 hshong joined #mojo
05:28 Grinnz i don't know a use case for that but i assume there is one
05:28 jberger streaming log
05:29 jberger log on a different host
05:30 dotandimet joined #mojo
05:31 Grinnz on a completely different topic, sri what do you think of merging in that gist you had of the json form option for get :D
05:32 ispyhumanfly joined #mojo
05:32 ispyhumanfly Hi everyone.
05:32 purl Howdy, ispyhumanfly, you fantastic person you.
05:32 jberger o/
05:32 ispyhumanfly Why thank you, purl.
05:32 ispyhumanfly :)
05:32 Grinnz i'd have sent a pull request but i would just change my branch to how it was implemented in the gist, and id feel weird sending a pull request with sri's code
05:32 Grinnz lol
05:32 jberger botsnack
05:32 purl thanks jberger :)
05:32 jberger :-P
05:33 Grinnz ... and he's gone
05:33 jberger wow, a little bot humor goes a long way!
05:33 Grinnz he did the same thing on freenode #perl
05:34 Grinnz o_0
05:34 jberger ok then
05:34 jberger I should be getting to bed
05:34 jberger nn
05:35 jberger enjoy the snow
05:35 Grinnz i shall
05:43 ispyhumanfly joined #mojo
05:58 sri Grinnz: the json from options gist didn't get enough votes
05:58 sri s/from/form/
06:01 sri haha, more rejected patches in the branches https://github.com/kraih/mojo/compare/time_in_words
06:02 Grinnz sri, did it get any? :P
06:03 sri i don't even have a link to the gist anymore ;p
06:04 Grinnz i found it a few days ago
06:04 Grinnz just after i implemented my own version, lol
06:06 sri anyway, i doubt it has much of a chance
06:10 Grinnz apparenlty more than a few days ago, https://gist.github.com/anonymous/5877a1fcfff5be7f7048
06:12 good_news_everyon joined #mojo
06:12 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/FsxS
06:12 good_news_everyon mojo/master ec17273 Sebastian Riedel: mention what we are waiting for
06:12 good_news_everyon left #mojo
06:12 sri haha, that json generator was a bit ridiculous
06:13 sri on the plus side, it does set the content type header
06:16 Grinnz yeah, thats why i did the same thing :P
06:17 Grinnz also it dies right away if you pass invalid json
06:19 good_news_everyon joined #mojo
06:19 good_news_everyon [mojo] kraih created get_form (+1 new commit): http://git.io/FshU
06:19 good_news_everyon mojo/get_form 23d9456 Sebastian Riedel: add form support to get command
06:19 good_news_everyon left #mojo
06:19 sri on the pile of rejected branches with it :)
06:23 sri json is also not the greatest format to type on the command line ;p
06:23 purl okay, sri.
06:23 * sri patch purl
06:23 sri lol
06:23 * sri pats purl
06:23 * purl stabs
06:23 Grinnz lol
06:23 * sri wouldn't dare patching purl
06:23 Grinnz i prefer typing json to urlencoded form
06:23 sri mojo get -c 'foo=bar&baz=yada'
06:24 sri soooo much worse than mojo get -f '{"foo":"bar","baz":"yada"}'
06:24 sri !
06:24 Grinnz it is once you have to start urlencoding stuff :P
06:25 sri you could also try something like the header stuff
06:26 sri mojo get -f 'foo:bar' -f 'baz:yada'
06:26 Grinnz maybe, but that involves more code
06:26 Grinnz i guess it wouldnt be too much more
06:27 sri headers is one line
06:27 Grinnz true
06:28 Grinnz just dont use : in your form names :P
06:28 dotandimet joined #mojo
06:29 sri make it -f 'foo=Grinnz is a goober'
06:35 dotandimet1 joined #mojo
06:36 reneeb joined #mojo
06:41 Grinnz hmm that way is not easy to handle multi values though
06:44 Grinnz you would need to somehow convert -f 'foo=bar' -f 'foo=baz' to foo => ['bar','baz']
06:56 Grinnz https://github.com/Grinnz/mojo/compare/get_form_2 without caring about multi values
06:57 dod joined #mojo
06:58 Grinnz the blizzard still hasn't started, but i should get to sleep
07:02 dod joined #mojo
07:09 reneeb joined #mojo
07:24 hshong joined #mojo
07:28 Vandal joined #mojo
07:41 rem_lex joined #mojo
08:00 basiliscos joined #mojo
08:12 eseyman joined #mojo
08:15 trone joined #mojo
08:17 Eke- joined #mojo
08:29 kwa joined #mojo
08:31 kwa joined #mojo
08:35 ashimema joined #mojo
08:41 kwa joined #mojo
08:48 kwa joined #mojo
09:01 dod joined #mojo
09:25 punter joined #mojo
10:04 amon joined #mojo
10:05 kaare joined #mojo
10:06 rem_lex joined #mojo
10:12 fhelmber_ joined #mojo
10:35 Dandre joined #mojo
10:56 inokenty-w joined #mojo
11:26 sri hmm
11:27 sri i guess it would make sense to call srand after forking to improve load balancing, which uses rand in all workers
11:36 good_news_everyon joined #mojo
11:36 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/FZGd
11:36 good_news_everyon mojo/master 2dc2492 Sebastian Riedel: improve Hypnotoad load balancing by calling srand() after starting a new worker in Mojo::Server::Prefork
11:36 good_news_everyon left #mojo
11:55 dotandimet joined #mojo
12:00 jkramer What's the smallest possible rocket + minimum fuel for reaching low earth orbit, assuming there's no payload other than the rocket and fuel?
12:00 dotandimet joined #mojo
12:01 jkramer It's probably the wrong channel, but maybe someone knows
12:02 bc547 if the rocket runs mojolicious, it requires 1.5 unicorns
12:02 sri nice try kim jong-un
12:03 nicomen jkramer: sounds like xkcd material
12:06 jkramer nicomen: Yeah, but I can't find it :(
12:06 jkramer Pretty sure that there were some equations there
12:06 dotan http://boards.straightdope.com/sdmb/showthread.php?t=330288
12:07 dotan jkramer: ^^
12:08 dotan no wait, that's just a question on the boards, not a real straightdope answer :(
12:08 jkramer dotan: Those are with pretty big payloads (400kg for pegasus, 53lbs for japanese one)
12:08 jkramer Good start though
12:09 dotan The next hit in my DDG search looks way more impressive: https://www.quora.com/Given-current-technology-what-is-the-smallest-size-a-rocket-could-be-and-still-reach-low-Earth-orbit
12:09 dotan Math and everything
12:10 dotan Why do people go to so much effort on Quora?
12:11 jkramer dotan: Cool thanks
12:11 jkramer According to wolfram alpha the smallest (existing) rocket is 6m and can take a payload of 50kg. Although of 5 launches, 2 failed.
12:13 jkramer Wow, didn't expect such an answer on quora
12:14 jkramer So total mall of a minimal rocket would be 140.5kg and it would be ~2.6m long
12:22 jkramer So with that rocket I could bring 3.32897308896 Papillon dogs to low earth orbit
12:39 punter joined #mojo
12:47 jkramer I have an around_action hook that calls $next->(), but apparanetly after the call, stuff that was put in the stash by that action is gone. Is the stash localized in actions?
12:49 neilhwatson joined #mojo
13:06 gatitskiy joined #mojo
13:33 ignacio_ joined #mojo
13:35 dod joined #mojo
13:51 marty joined #mojo
14:00 gatitski_ joined #mojo
14:04 dotandimet joined #mojo
14:08 btyler joined #mojo
14:16 Vertig0 joined #mojo
14:23 gryphon joined #mojo
14:33 ZadYree joined #mojo
14:33 ZadYree Hello.
14:33 genio How's it going?
14:34 ZadYree Perfectly, messing with mojolicious again :)
14:34 ZadYree genio, how about you?
14:37 ZadYree However I wonder how to change the "Server" header value from inside the startup() Mojolicious method. $self->req won't be recognized by the daemon.
14:38 * sri thinks it's interesting that more and more infrastructure stuff gets written in Go https://github.com/bitly/nsq
14:44 gatitskiy joined #mojo
14:45 bc547 sri: time for a gomojo? or mojogo :-)
14:46 sri go mojo!
14:48 ZadYree So guys, any idea how to modify the "Server" header parameter?
14:49 bc547 gojolicious!
14:56 dod joined #mojo
14:56 jberger ZadYree: change it in a hook
14:56 purl jberger: that doesn't look right
14:56 jberger I thought there was a recipe somewhere, but I'm not finding it atm
14:57 ZadYree heh
14:57 jkramer left #mojo
14:57 jberger here is where it is set
14:57 jberger https://github.com/kraih/mojo/blob/master/lib/Mojo/Server/Daemon.pm#L66
14:57 gatitskiy joined #mojo
14:57 jberger just do the same thing in a hook
14:57 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Routing#Hooks
14:58 Grinnz hmm theres this but its only for requests https://metacpan.org/pod/Mojo::UserAgent::Transactor#name
14:58 Grinnz maybe that could be used for responses too?
14:58 Grinnz if it's involved in the response
14:58 sri *cough*
14:58 dotan It's the 2nd example in the 2nd code block sri linked - an after_dispatch hook
14:59 jberger ah, see that's why I missed it
14:59 jberger I ack'ed for ->headers->server
14:59 Ptolemarch joined #mojo
14:59 * jberger notes for future reference
14:59 ZadYree Heh, I see?
15:00 ZadYree s/\?/\./
15:01 Grinnz i take it thats a no :P
15:01 jberger Grinnz: nope, sorry
15:02 jberger that's the user agent
15:02 Eke- joined #mojo
15:03 ZadYree well, I'm using it right now, and it gets executed with no single error, but the "Server" header param is still the default one.
15:04 Grinnz you mean the hook?
15:04 ZadYree Yup
15:04 ZadYree I took example on sri's example but only pu this in the sub: shift->req->headers->server('Test');
15:06 Grinnz ->res not ->req
15:06 Grinnz you added a header to the request ;)
15:07 jberger try a simple one-liner
15:07 jberger MOJO_USERAGENT_DEBUG=1 perl -Mojo -E 'app->hook(after_dispatch => sub { shift->res->headers->server("Me") }); a("/" => { text => "Yo" })->start' get /
15:07 Grinnz i was thinking server("Willy Wonka's Chocolate Factory")
15:08 Grinnz but then i have to escape quotes in bash...
15:13 ZadYree ahhh yeah indeed!
15:15 ZadYree Thanks guys, that's perfect.
15:21 jberger Grinnz: \x{27}
15:35 Eke- joined #mojo
15:43 disputin joined #mojo
16:20 dotandimet joined #mojo
16:32 marcus sri: Mostly ever since dogfood got banned.
16:35 marcus this development machine is only internal to the university network, so I can't connect to it from home without a vpn/socks connection.
16:39 marcusr joined #mojo
16:40 * marcusr makes an effort to be here more
16:42 dotandimet joined #mojo
16:47 sri oh shit, big linux security issue incoming it seems :o https://translate.google.com/translate?hl=en&sl=fr&tl=en&u=http%3A%2F%2Fwww.frsag.org%2Fpipermail%2Ffrsag%2F2015-January%2F005722.html
16:47 marcusr omg
16:47 Grinnz oh lawd
16:52 marcusr doesn't seem like there are updates out yet for RHEL...
16:53 sri yea, looks like a PR person posted too early and the whole thing was still embargoed
16:53 Grinnz someone's getting fired
16:59 marcusr omg, all services must be restarted
16:59 marcusr this is going to hurt so much
17:00 nicomen restarted to update glibc?
17:00 nicomen ah yeah
17:00 nicomen I thought you said servers
17:02 marcusr well, at this point you might as well, I count 81 services on one of our web servers linked against libc...
17:02 nicomen hm
17:07 Oleg joined #mojo
17:11 KCL_ joined #mojo
17:15 cpan_mojo Mojo-Reactor-POE 0.003 by DBOOK - http://metacpan.org/release/DBOOK/Mojo-Reactor-POE-0.003
17:15 Oleg BTW, why Mojo::DOM::CSS requires whitespaces between selector combinators? So, "div > a" works and "div>a" not
17:18 michael https://metacpan.org/pod/distribution/Mojolicious/lib/Mojolicious/Guides/FAQ.pod#What-about-backwards-compatibility - does this mean things should only be removed in next major release after deprecation?
17:19 michael I notice that several things are deprecated and then removed only a few minot releases later
17:23 Oleg michael: no, things may be deprecated and removed in same major release
17:23 tomboh relating to the question michael asks, I've been fixing code today that uses deprecated methods removed in 5.73
17:23 Oleg "Features may only be changed in a major release, to fix a serious security issue, or after being deprecated for at least 3 months."
17:23 tomboh and of course it the maintainers' choice how they manage such things
17:23 Oleg From https://metacpan.org/pod/Mojolicious::Guides::Contributing
17:24 tomboh but it might be convenient to use version numbers somehow so I could version pin dependencies to make my life a little easier
17:25 Grinnz tomboh, the changelog explicitly states when each function has been deprecated
17:26 Grinnz unless you meant something else
17:27 michael thanks. So FAQ needs updating then? "So, as long as you are not using anything marked experimental, untested or undocumented, you can always count on backwards compatibility, everything else would be considered a bug."
17:27 tomboh Grinnz: yes, and it's very helpful dealing with changes after the event, but a policy along the lines of "when we remove deprecated features we bump the major version number" might make pre-empting changes easier
17:27 Grinnz michael, it means "within the last 3 months", perhaps that could be clarified there
17:28 Grinnz tomboh, then we would be on version 37
17:29 Grinnz (i'm not a mojo dev, just a colloquial "we")
17:29 michael or just remove deprecated code less often?
17:29 Grinnz the policy has been there
17:30 tomboh Grinnz: what do you think would be the problem with being on version 37?
17:30 Grinnz tomboh, it makes major releases meaningless
17:30 Grinnz see firefox and chrome :/
17:30 michael Grinnz: shown to contributors but not users
17:31 tomboh I wouldn't describe keeping backwards compatibility as meaningless
17:31 Grinnz michael, if you keep up to date, you will get warnings about anything that is deprecated long before it's removed (I know this isn't practical in all situations)
17:31 tomboh although if you mean "less significant" I appreciate that
17:32 Grinnz mojo's not designed purely for backwards compatibility, it's designed for progress
17:32 Grinnz thats how i see it
17:32 michael no, only get warnings if have updated in last 3 months
17:33 Grinnz tomboh, it would be the same amount of effort to keep up with changes whether the major version changed or not, you'd just get a more explicit indicator i guess
17:33 good_news_everyon joined #mojo
17:33 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/FcpN
17:33 good_news_everyon mojo/master 9654d3b Sebastian Riedel: combinators do not need to be surrounded by whitespace
17:33 good_news_everyon left #mojo
17:33 sri Oleg: fixed :)
17:34 michael Grinnz: if only removed in major version we could pin '<6' and still get minor updates
17:34 Oleg sri: Oh, I thought it was a feature :)
17:34 Grinnz what minor updates?
17:34 Grinnz you would get no updates
17:35 michael we'd get all minor updates until version 6 released
17:35 michael then could update the prereqs, test, and fix deprecations
17:35 Grinnz and mojo would be full of thousands of lines of code that shouldn't be used
17:37 QGuLL joined #mojo
17:37 * sri suspects michael wants semver
17:37 Grinnz sri, i do think that FAQ should mention the 3 month deprecation policy though
17:37 sri it would cost us the yearly "yay, majo release" event though, which is unacceptable to me
17:38 QGuLL hi, did anyone here tried to launch mojolicious app in openshift environment with hypnotoad ? (with embeded perl and libs)
17:38 Grinnz yeah that would be the only way to do it without bloating major versions
17:39 Grinnz what's openshift?
17:39 sri honestly, if we used semver and started liberally throwing around major versions, i would skip the deprecation step and just bump versions ;p
17:39 sri it's the semver way!
17:39 Grinnz right which is why i said it would be the same amount of effort, and if you pin versions you'd get no updates
17:40 QGuLL Grinnz : https://www.openshift.com/ it's a PaaS hosting service from RedHat
17:40 Grinnz ah
17:41 QGuLL i'm quite confused : i can start app with morbo, but not with hypnotoad, i got odd error refering to "undefined symbol: PL_unitcheckav" in IO.so
17:43 Grinnz the difference of hypnotoad is forking
17:43 Grinnz try with prefork server
17:44 good_news_everyon joined #mojo
17:44 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/FCU2
17:44 good_news_everyon mojo/master d10b02b Sebastian Riedel: mention 3 months in FAQ
17:44 good_news_everyon left #mojo
17:44 jberger Carton makes incremental updated so easy
17:44 * jberger wishes everyone used it
17:44 jberger updating
17:45 michael How do people manage their Mojolicious versions for deployed apps, that might not get touched for several months at a time? Continually smoke test against latest version?
17:45 jberger michael: carton + cpanfile
17:46 nicomen win 59
17:46 jberger it builds a cpanfile.snapshot which is all the modules you are using and their exact versions
17:46 QGuLL Grinnz: prefork server ?
17:46 Grinnz michael, also when updating you can go to changelog and ctrl+f for deprecate
17:46 Grinnz it's generally quite thorough
17:46 jberger then when you are looking to upgrade, try it, if it fails, tweak the imported versions until you get what you can, port from there
17:46 QGuLL (fyi the full compilation error trace : http://pastebin.com/EXpxGNaj )
17:48 michael jberger: no, carton is a snapshot. i want to be alerted when things are being deprecated (so can start to remove them), and not just hit the broken version months later when doing some new work on an app
17:48 purl okay, michael.
17:49 michael am thinking regular smoke testing on latest versions is going to be the only way
17:49 sri aha, much more details about the linux security issue http://www.openwall.com/lists/oss-security/2015/01/27/9
17:49 Grinnz https://metacpan.org/source/SRI/Mojolicious-5.75/Changes
17:49 Grinnz or, https://github.com/kraih/mojo/blob/master/Changes
17:50 michael Grinnz: !!!
17:53 sri upgrade in 2 month intervals
17:53 sh4 joined #mojo
17:54 Grinnz sri, basically it's already been fixed on anything newer than RHEL6
17:54 sri that's at most 6 releases you have to test every year
17:55 jberger when you go to upgrade, check the changelog for deprecations, move your carton snapshot to that version, test
17:55 jberger did you get warnings? fix them. iterate
17:55 jberger that's my process at least
17:55 jberger (or it would be if I didn't follow the deprecations)
17:56 tomboh just as a data point, I'm looking after an application that I hadn't touched since August 2014 because Mojo has been so reliable
17:56 tomboh and to make a minor change in January 2015 I had several unantipicated changes to make in January 2015
17:56 meredith yeah i guess it just depends on your needs, smoke testing in advance would be nice but more maintenance work of its own compared to how little i generally have to change for updates.
17:56 tomboh which is fine, I made those changes
17:57 tomboh but I suspect the "small application that just works in an enterprise with lots of applications" maybe isn't a use case well suited to Mojolicious
17:58 michael jberger: cheers
17:58 tomboh sorry, my dates make no sense: I last changed it in August 2014, then needed to update it in January 2015
17:58 sri it's a case of "just use carton"
17:58 marcusr jberger: I wish we had something like carton but beter and more maintained. like ruby bundler.
17:58 jberger tomboh: I disagree, with a proper snapshot and dev-release cycles, there isn't much to worry about
17:58 tomboh sri: yeah, I suspect you're right
17:59 jberger I think the "issue" is that most people assume perl modules have infinite backwards compatibility, which most do, and just cpanm their dependencies
17:59 * marcusr remembers he has a ton of ubuntu servers, goes to check if they have a new libc
17:59 sri if you want a $100k per year support contract with years of backwards compatibility guarantees, please mail me ;)
17:59 sh4 joined #mojo
17:59 sri that stuff can totally be arranged
18:01 Oleg Some mystic.. This oneliner works without problems: perl -CS -Mojo -E 'say g("http://whatismyip.ru/")->dom->at("html > body > table > tr > td > table > tr > td > font > h1")->text'
18:01 Oleg But this: perl -CS -Mojo -E '$a = g("http://whatismyip.ru/")->dom->at("html > body > table > tr > td > table > tr > td > font > h1"); say $a->text'
18:01 tomboh sri: I'll ask them for $200k and let them bid me down a little ;)
18:01 Oleg produces "Use of uninitialized value in string eq at /usr/local/share/perl/5.14.2/Mojo/DOM.pm line 210, <DATA> line 2231"
18:01 sri :D
18:06 nicomen Oleg: try ->at('h1') ;D
18:08 Oleg Yes, this is shorter :) But with same warning
18:11 nicomen $ perl -CS -Mojo -E '$a = Mojo::DOM->new("<h1>foo<br>bar</h1>")->at("h1"); say $a->text'
18:11 nicomen Use of uninitialized value in string eq at /usr/share/perl5/Mojo/DOM.pm line 245.
18:12 nicomen then you have a test case to report ;)
18:12 Oleg good. sri: should I report? ;)
18:12 sri Oleg: fix it
18:13 Grinnz lol
18:13 Oleg ha ha, ok, sri
18:13 Grinnz i get it too, but at line 210
18:15 Oleg still don't understand how this may be different with perl -CS -Mojo -E 'say Mojo::DOM->new("<h1>foo<br>bar</h1>")->at("h1")->text'
18:15 sri garbage collection
18:15 purl garbage collection is probably probably not discussed except in perlguts or discussed in perlobj
18:15 Grinnz lol
18:15 Oleg lol
18:16 sri parent link is prolly weakened, making this unfixable
18:16 jberger could turn of uninitialized warnings
18:18 nicomen heroin fix
18:19 sri haha, we can get rid of the error though... and it's less code ;p
18:20 good_news_everyon joined #mojo
18:20 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/FC0v
18:20 good_news_everyon mojo/master 7f13383 Sebastian Riedel: just check if we have a parent
18:20 good_news_everyon left #mojo
18:20 sri note that this does not solve the gc problem
18:20 Grinnz yeah was gonna say, you can just check if its there :P
18:22 Oleg ah, you didn't give me a time to fix it :)
18:23 nicomen it's not just less code than some other fix, it ended up as less code. :cheers:
18:25 sri i committed it because i realized there is no fix ;)
18:25 sri otherwise i would have waited
18:27 sri oh, 8777 lines of code now
18:35 Vertig0 joined #mojo
18:38 basiliscos joined #mojo
18:42 genio https://twitter.com/elonmusk/status/556105370054053889  heh
18:49 Grinnz_ sri: would "shift->SUPER::new(@_)" run into the issue we were discussing yesterday?
18:50 Grinnz_ i'm gonna change it regardless
18:59 Eke- joined #mojo
19:08 asarch joined #mojo
19:10 Ptolemarch joined #mojo
19:14 sri Grinnz_: no
19:14 sri method calls are fine
19:15 sri in fact, anything else than coderefs is fine
19:16 Grinnz_ ah ok
19:18 Vertig0 joined #mojo
19:20 bwf joined #mojo
19:41 dotandimet joined #mojo
19:45 ilbot2 joined #mojo
19:45 Topic for #mojo is now ???? hear me roar | http://mojolicio.us | http://irclog.perlgeek.de/mojo/today
19:51 basiliscos joined #mojo
19:54 sri hahahaha... the PR agency that leaked the linux vulnerability of course made a logo for it too! http://lcamtuf.blogspot.de/2015/01/technical-analysis-of-qualys-ghost.html
19:58 hernan604 what is that vuln
19:58 hernan604 is it related to jpg?
20:01 hernan604 lol
20:01 pink_mist no, it's an error in glibc's gethostbyname functions that enable remote code exploits in poorly written programs
20:01 pink_mist such as exim
20:07 jberger that technical analysis is great!
20:08 Grinnz_ by the way jberger if you're interested, all i had to do to make a subclass of Mojo::Log that can change paths is: use Mojo::Base 'Mojo::Log'; use Class::Method::Modifiers; before 'path' => sub { delete $_[0]->{handle} if @_ > 1 }; 1;
20:09 jberger nice
20:11 Grinnz_ installing that into Mojo::Log would probably not be quite so trivial
20:13 Grinnz_ but hey, it works :)
20:15 gyan joined #mojo
20:16 gyan Hi, I started using Mojo recently and had a question that I'm sure can be answered in some documentation but I can't find it :/
20:16 jberger gyan: did you read the guides in order?
20:16 Ptolemarch joined #mojo
20:17 jberger http://mojolicio.us/perldoc#TUTORIAL
20:17 gyan Yup, pretty much though I may have missed the answer  as I'm not the world's most intelligent person
20:18 gyan As background, I'm asking users to verify their emails. So after they fill in a form, I send them an email with a link to a verifyemail action that gets routed through mojolicious
20:19 gyan But as far as I can tell, mojo uses periods to discover the content type required by the user (ie .json)
20:19 kaare joined #mojo
20:19 Eke- joined #mojo
20:19 gyan so if the users email has a . in it the parameter is getting mangled
20:20 gyan as the rest of it just goes in the "format" field that mojo parses to get content types
20:20 jberger so you are using the email as part of the resource path?
20:21 gyan yes, exactly
20:21 gyan that might not be a super sensible approach and I can modify it but it's probably also showing a lack of understanding of mojolicious so I prefer to ask if anyone has any input
20:22 jberger I don't especially like that design, but if you must, use the relaxed placeholders http://mojolicio.us/perldoc/Mojolicious/Guides/Routing#Relaxed-placeholders
20:22 gyan yeah, I think there are possibly better designs where I store something associated to the email locally
20:23 gyan Thank you, I saw placeholders but for some reason it didn't connect
20:23 jberger no that's fine, but it seems like email address isn't the resource, probably more like a query parameter
20:23 jberger then again, I can't know without knowing the rest of your api
20:24 jberger anyway, TIMTOWTDI of course
20:24 gyan Hmm, yes, the email is a query parameter in reality.
20:24 gyan That's a fair point
20:24 gyan I guess I could link to something link /verifyemail/?email=email and that should parse correctly
20:25 jberger much easier yes
20:25 gyan ok that's what I was missing
20:25 gyan thanks and sorry for the stupid question. appreciate your help.
20:25 jberger that's ok
20:25 jberger then you can generate the url to give them via url_for
20:26 jberger assuming your route name is verifyemail it would look like
20:26 dvinciguerra joined #mojo
20:26 jberger url_for('verifyemail')->query(email => $email)
20:28 gyan right, gotcha. Yeah, I have a lot to learn still about the platform. I got bored and decided to try to build a framework for a game on mojolicious
20:28 gyan Let's me get some experience with REST as well.
20:31 jberger best way to learn is by doing
20:31 gyan yup, thanks again
20:32 gyan also morbo is pretty awesome
20:47 tencendur joined #mojo
20:49 sri http://www.quickmeme.com/img/4f/4f7e3169ceff2be37d28621c3c5372905a2d0df51b4113f5a13a33871e96a039.jpg
20:51 Ptolemarch joined #mojo
21:12 cfedde http://dilbert.com/strip/2013-02-24
21:16 jberger argh! permissions are screwed on homebrew
21:16 jberger WHY ISN'T THIS DEBIAN!?!!
21:16 Grinnz_ cfedde: rofl
21:16 dod joined #mojo
21:24 tempire gyan: if you have a question, ask it.
21:24 tempire erk. scrolling was broken. ignore last statement.
21:32 rem_lex joined #mojo
21:33 Grinnz_ joined #mojo
21:46 Ptolemarch joined #mojo
21:56 disputin joined #mojo
22:07 melo joined #mojo
22:17 gyan joined #mojo
22:38 gyan joined #mojo
22:55 davido__ joined #mojo
22:55 cfedde check the umask!
23:01 gyan joined #mojo
23:09 disputin joined #mojo
23:20 gyan joined #mojo
23:25 alnewkirk joined #mojo
23:52 elik joined #mojo

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