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

IRC log for #mojo, 2015-02-20

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

All times shown according to UTC.

Time Nick Message
00:00 jberger oh
00:00 jberger hmmm, interesting
00:00 jberger I guess my response would be "don't do that"
00:00 jberger :-)
00:01 Grinnz_ do what?
00:01 purl do is probably just a loop where something controls/constrains it to execute once or de do do do de the da da
00:01 jberger leave child processes laying around forever :-)
00:01 Grinnz_ they shouldn't
00:01 jberger Grinnz_: I was just being silly, guess it didn't come across
00:02 Grinnz_ heh
00:04 sri oh noes, ka yi has been tweeting at @mojolicious -.-
00:04 Grinnz_ lol
00:05 jberger hahahahah
00:05 purl LOLCON 4.5 reached.
00:05 Grinnz_ .5!
00:05 sri if only we could get that fricking account somehow
00:05 jberger I wonder if I could make it handle hahahahal as 4.25
00:06 sri that nascar tweet from 2174 days ago is pretty classy
00:06 Grinnz_ lol
00:06 jberger maybe twitter will do that?
00:06 jberger sri: send a request, what's the worst that could happen?
00:06 Grinnz_ probably not unless you're a corporate entity
00:07 sri doubt it... at least not without inside connections
00:07 Grinnz_ worth a try
00:07 Grinnz_ hmm here
00:07 Grinnz_ you'll need a registered trademark
00:07 Grinnz_ lol
00:08 Grinnz_ https://support.twitter.com/groups/56-policies-violations/topics/236-twitter-rules-policies/articles/18367-trademark-policy
00:08 Grinnz_ otherwise: https://support.twitter.com/groups/56-policies-violations/topics/236-twitter-rules-policies/articles/15362-inactive-account-policy
00:08 sri it would have to be misleading too
00:08 sri @mojolicious is just abandoned
00:09 Grinnz_ no it doesn't have to be
00:09 Grinnz_ "When we determine that an account appears to be confusing users, but is not purposefully passing itself off as the trademarked good or service, we give the account holder an opportunity to clear up any potential confusion. We may also release a username for the trademark holder's active use."
00:12 jberger TPF might help you register it
00:15 sri to keep it you have to proactively defend it
00:16 jberger hmmmmm, corporations and their ... budgets
01:00 vytas joined #mojo
01:42 tempire dernit
01:43 tempire illustrator won't import the raptor svg
02:03 Grinnz_ jberger: i guess it wasn't workers being killed off before anyway, the prefork workers just get gracefully stopped not killed when they dont have a heartbeat
02:21 tempire Here's a potential direction: https://www.evernote.com/shard/s15/sh/e508586d-e630-4416-aaeb-e208f315fb3d/1ba910ab4e5739a7
02:22 jberger tempire += 3
02:22 jberger dude that is AWESOME!
02:22 tempire Another potential direction: https://www.evernote.com/l/AA_zUlzHMcZMT4_dxWRtAiHumWOeeCHHiaU
02:23 * jberger votes (1)
02:24 pink_mist the first one is amazing
02:24 pink_mist the second one is merely great :P
02:27 * Grinnz likes both equally
02:29 tempire lulz
02:29 tempire https://www.evernote.com/l/AA8cymDBuulDcZPIWQqhhy350QwSwTjg6FY
02:30 pink_mist haha
02:33 tempire anyone want to make a javascript countdown script?
02:33 tempire I have the design, but don't want to write the logic.
02:34 sri lol
02:34 Grinnz lol
02:34 sri +1 for the first
02:35 Grinnz if i had written any javascript in the past like, 2 years, maybe
02:40 jberger tempire: batman has one
02:41 Grinnz a bat-timer?
02:41 tempire quick, robin!
02:41 jberger hahaha
02:41 tempire https://www.evernote.com/l/AA-oAH7e0zxMqpUFIu3O5cWTl9UGbjDN8zE
02:41 jberger its a little overkill actually: https://github.com/jhthorsen/timer
02:42 jberger I think I still like the first best, but I do like having the cloud in there
02:46 tempire The gradients would probably be an issue for t-shirt printing
02:46 sri yes, better make a version without gradients for that
02:46 sri it's just digital print i believe, but gradients can still be problematic
02:46 pink_mist tempire: how about on the first one, have the cloud be the black-ish background instead; as in have transparency on the outer edges in the shape of the mojo cloud
02:46 sri googling for "skyline t-shirt brings up a lot of ideas"
02:46 klapperl_ joined #mojo
02:46 tempire have at it
02:47 tempire I wish we could print one with the skyline that went all around the shirt, in the chest area
02:47 Oleg joined #mojo
02:48 tempire The cloud was dark at first
02:48 tempire But that seems like a bad omen
02:48 tempire And it's a little too dark
02:48 tempire Given that the shirt would be charcoal
02:48 pink_mist ah, that would be problematic then
02:48 tempire https://s-media-cache-ak0.pinimg.com/736x/79/9b/6d/799b6d5413f918ff676ed47b4a692319.jpg
02:49 sri hahaha
02:49 sri tempire: http://3.bp.blogspot.com/_XpEnWyTtSxc/SzO5yUMknPI/AAAAAAAAAHI/EoB0Ym8KWf4/s400/skylineT-shirtpurp.jpg
02:49 sri same idea!
02:50 sri this one is cool too http://ep.yimg.com/ay/stylinonline/futurama-bender-head-skyline-t-shirt-5.jpg
02:50 tempire ooh
02:51 tempire That's an interesting direction
02:51 tempire Can we do that, though?
02:51 tempire I feel like printing shirts at a public conference could be problematic
02:52 sri they are not sold i believe
02:52 sri (mojoconf shirts that is)
02:53 bpmedley http://bmedley.org/soon.html
02:54 sri of course i have no clue about 'murica law
02:55 tempire https://www.evernote.com/l/AA94UcXTbuZH45uMercMYt5VhNoK4eM1LaM
02:55 tempire https://www.evernote.com/l/AA_v4WVB4U5DEKJxkgJczguf97XA6jUTpDw
02:55 tempire Ok, those are my last two tweaks for today.
02:55 tempire vote, reject, criticize, destroy, whatever.
02:56 tempire If anyone wants to toy with the vector art, let me know
02:57 tempire I don't like the first one anymore
02:57 tempire it's too busy
02:57 tempire https://www.evernote.com/pub/tempire/mojoconf2015
02:57 sri i like the direction of the last one
02:58 zivester joined #mojo
02:58 tempire Yeah me too. It's got what made the first one interesting without the complication
02:58 bpmedley tempire: Thoughts on the coming soon page?
02:58 sri if you give me the skyline i'll give it a try too
02:58 tempire I just need to put in a counter
02:58 tempire I made it months ago
02:58 tempire I need to look into embedding eventbrite as well
02:59 tempire https://www.evernote.com/l/AA_BP77dkKZHp51r5gaQHa3uP6ZyE3A9eQo
03:01 tempire sri: I looked into using the cross bones first
03:01 tempire But it detracted from the other stuff. The cloud was enough.
03:01 sri yea
03:01 sri you've got the skyline and the raptor already
03:02 Grinnz plus, it's all about the /cloud/
03:02 sri i would maybe try a hacked up hugecloud in the background, like the bender shirt
03:02 sri bottom of the cloud cut off
03:06 sri interesting style too :) http://ak2.polyvoreimg.com/cgi/img-thing/size/l/tid/27621110.jpg
03:06 jnbek joined #mojo
03:07 tempire Can we make some overarching designs?
03:07 tempire I thought we were limited to certain spaces
03:07 sri we are
03:07 sri that print would cost a fortune
03:08 sri yea... i guess... that's a skyline shirt too... http://image.spreadshirt.net/image-server/v1/products/11323468/views/1,width=190,height=190,rotateX=0,rotateY=-20,rotateZ=0.png/skyline-t-shirt.png
03:12 tempire https://www.evernote.com/l/AA-Bl0Z_shxD352N6zopvMftypsev6Q8MeQ
03:13 tempire Even if it's perfectly tweaked, I don't think it would be as good as the other one
03:13 tempire well, maybe if the cloud was modified a bit
03:15 sri maybe something like this http://static.bootic.com/_pictures/164099/a-tribe-called-quest-skyline-retro-blue-graphic_1.jpg
03:15 sri not exactly, but an outline around the cloud, and the skyline not in a different color than the background
03:17 sri ok, think i'm out of ideas now :)
03:38 sri hmm, i kinda want to turn all methods in Mojo::Loader into functions
03:39 sri but then there is this whole is_binary() situation
03:41 good_news_everyon joined #mojo
03:41 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AGtP
03:41 good_news_everyon mojo/master 1cf9ae1 Sebastian Riedel: Mojo::Loader was missing
03:41 good_news_everyon left #mojo
03:42 zivester joined #mojo
03:50 Anon021 joined #mojo
03:54 Oleg joined #mojo
03:59 noganex_ joined #mojo
04:01 csson joined #mojo
04:08 marmez joined #mojo
04:44 sri yea, i like Mojo::Loader with functions only
04:54 good_news_everyon joined #mojo
04:54 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AGl3
04:54 good_news_everyon mojo/master 06843f7 Sebastian Riedel: deprecate object-oriented Mojo::Loader API
04:54 good_news_everyon left #mojo
04:55 sri that's how it should have been from the start
04:57 good_news_everyon joined #mojo
04:57 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AGlw
04:57 good_news_everyon mojo/master 8dcb287 Sebastian Riedel: that should have been semicolons
04:57 good_news_everyon left #mojo
04:59 s1037989 Right on!  Way cleaner usage!  +1
05:07 inokenty-w joined #mojo
05:09 irq joined #mojo
05:14 melo joined #mojo
05:16 franzkafka joined #mojo
05:17 good_news_everyon joined #mojo
05:17 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AGRR
05:17 good_news_everyon mojo/master e7041d9 Sebastian Riedel: find_modules should return a list
05:17 good_news_everyon left #mojo
05:28 good_news_everyon joined #mojo
05:28 good_news_everyon [mojo] kraih pushed 2 new commits to master: http://git.io/AGEU
05:28 good_news_everyon mojo/master 6afa233 Oleg: Test::Harness enables global warnings by default. Disable this behavior
05:28 good_news_everyon mojo/master 6fc370e Sebastian Riedel: Merge pull request #743 from olegwtf/master...
05:28 good_news_everyon left #mojo
05:28 Grinnz +1 on loader
05:32 good_news_everyon joined #mojo
05:32 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AGEX
05:32 good_news_everyon mojo/master 8013836 Sebastian Riedel: update Changes
05:32 good_news_everyon left #mojo
05:42 hesperaux joined #mojo
06:11 dotandimet joined #mojo
06:29 sujithm joined #mojo
06:34 basiliscos joined #mojo
06:39 sujithm joined #mojo
06:44 franzkafka joined #mojo
06:50 reneeb joined #mojo
06:52 user_5476 joined #mojo
07:08 good_news_everyon joined #mojo
07:08 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AG1m
07:08 good_news_everyon mojo/master ecbd8ea Sebastian Riedel: try a different pinstripe pattern
07:08 good_news_everyon left #mojo
07:10 batman jberger: http://timer.thorsen.pm ?
07:19 dotandimet1 joined #mojo
07:23 batman i wonder if this is on purpose... https://metacpan.org/release/DGRAEVEJ/my_app-0.01
07:24 sri considering there's a my_app-0.01.tar.gz inside the dist, i very much doubt it ;p
07:25 batman :)
07:29 franzkafka joined #mojo
07:39 dod joined #mojo
07:40 good_news_everyon joined #mojo
07:40 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AGSl
07:40 good_news_everyon mojo/master 3c9b842 Sebastian Riedel: more contrast and less shadows
07:40 good_news_everyon left #mojo
07:45 dod joined #mojo
07:46 dotandimet joined #mojo
07:48 Vandal joined #mojo
07:56 melo joined #mojo
08:10 Grinnz joined #mojo
08:13 eseyman joined #mojo
08:14 n2plato joined #mojo
08:23 trone joined #mojo
08:32 Grinnz joined #mojo
08:32 fhelmber_ joined #mojo
09:02 irq joined #mojo
09:04 dotandimet joined #mojo
09:05 irq_ joined #mojo
09:07 teejay yow! mojo ep template debugging is painful : "l "$_M" requires explicit package name" umm...
09:08 teejay apparently there's a missing curly brace too, which also isn't there
09:08 teejay bah
09:13 marcus wow mom wow
09:13 marcus hi teejay
09:13 TheGrinnz joined #mojo
09:14 teejay hi marcus - I'm finding the transition from TT pretty painful :(
09:14 teejay getting ASP 3.0 flashbacks
09:18 marcus teejay: I mostly find mojo template gives me less wtf/min than tt
09:18 marcus but I guess it can be painful if the syntax is bork
09:19 teejay none of the syntax errors described match the template code
09:19 marcus teejay: I guess they happen in the compiled code.
09:19 teejay marcus, yeay.. not helpful to end user
09:20 marcus teejay: can you make a small sample template with broken syntax?
09:20 teejay probably not
09:20 marcus I completely agree it shouldn't throw that kind of errors
09:20 marcus :-/
09:20 teejay I'll try removing the layout
09:21 teejay see if I can isolate and reproduce.. but mostly wishing they'd used TT on this project
09:21 marcus teejay: I actually mostly want to stab myself when I have to work with TT code now
09:21 teejay marcus, then you're odd ;p
09:21 marcus because of all the ways it munges data weirdly
09:22 marcus teejay: Maybe. I've written thousands of lines of TT templates tho.
09:22 teejay marcus, you should have used HTML::Template first, then you'd never complain about TT ;)
09:22 teejay and ASP
09:22 marcus teejay: I have used ASP and HTML::Template.
09:22 teejay and javascript pages
09:22 marcus and JSP
09:23 marcus and servlets
09:23 purl servlets are fun
09:23 marcus ASP is the worst horror
09:23 teejay yup, Mason is the bastard offspring of ASP it somehow manages to be even worse
09:24 marcus teejay: it's not worse, because you're not writing vbscript
09:24 teejay no it's more powerful and has the potential for even greater evil ;)
09:24 marcus you know vbscript has no concept of scope?
09:25 teejay yup
09:25 teejay so you end up with VB objects
09:25 teejay I even saw controller code in SQL Server stored procedures
09:25 marcus I remember some guy who used vbscript eval to generate javascript code which was then evaled again on the client in javascript
09:25 marcus that's the worst code I've ever had to maintain
09:26 teejay omfg, kill it with fire
09:27 marcus so mojo::template is basically mason without all the crap you don't need when you have a MVC framework, like autohandlers and dhandlers and init blocks.
09:29 teejay yes, that is a blessing
09:33 marcus teejay: I tried adding a stray {, and even tho the error says near ";$_M "  it manages to highlight the correct line in the browser when saying "Missing right curly or square bracket"
09:34 teejay yes, but I don't have a missing curly or square bracket :(
09:36 marcus missing ; ?
09:36 teejay that's not clear - when do you need to end line with ;
09:36 teejay ?
09:37 marcus teejay: if you nopaste the offending template, I'm sure I can help you better.
09:37 teejay doesn't % perl here
09:37 teejay just work
09:37 purl just work is the opposite of "doesn't work".
09:39 marcus teejay: % my $foo will fail % my $foo; will work
09:39 teejay ok
09:40 marcus you don't need them in <% %> blocks tho.
09:40 teejay right.. still no joy
09:40 marcus I mean <%= %> block
09:41 teejay purl, nopaste?
09:41 purl i heard nopaste was http://paste.scsys.co.uk/ or http://gist.github.com/ or DO NOT USE pastebin.com IT FUCKING SUCKS
09:47 teejay marcus, http://paste.scsys.co.uk/464599
09:48 marcus teejay: $address is automatically populated from stash->{address}
09:48 marcus so you don't need that line
09:49 teejay false assumption - it's used in 2 places, it may or may not have the address object
09:49 teejay if it's not provided then it crashes
09:49 teejay without using stash
09:49 teejay unlike TT I can't have undeclared variables
09:50 marcus I'd just populate it with undef in the other place then
09:50 teejay ick
09:50 marcus rather than muck up the template
09:51 n2plato joined #mojo
09:51 marcus btw remove ; from the %= lines ?
09:52 teejay I thought they were needed, or is it only sometimes?
09:52 marcus anything with %= means it's printing out that value
09:53 marcus into the template
09:55 teejay right
10:09 al joined #mojo
10:12 teejay found my problem...
10:12 teejay % my $foo = begin; \n\n % end doesn't work
10:13 teejay has to be <% my $foo = begin %> ... <% end %>
10:13 teejay wierd
10:13 teejay why would switching from % to <% %> make a difference?
10:20 teejay marcus, found my problem begin/end blocks didn't work with % lines had to use <% .. %> tags and that fixed it
10:20 teejay ..which was totally obvious from the error message, right ;)
10:21 teejay tell me again how TT has more WTF? ;p
10:27 arthas joined #mojo
10:34 amon joined #mojo
10:55 * ssm remember that % was fun in sudoers templates  :)
10:55 csson teejay: There should not be a ; on this line: "% my $form_field = begin;" and on "% end;"
10:55 teejay csson, that breaks it?
10:55 teejay csson, tried it with & without
10:56 teejay only swapping to <% .. %> worked
10:56 csson Does for me
10:56 teejay just plain wierd
11:03 jontaylor joined #mojo
11:22 marcus teejay: begin/end is rewritten as { } afaik
11:23 marcus I never use it tho
11:34 dotandimet joined #mojo
11:59 AndrewIsh joined #mojo
11:59 andrew_ joined #mojo
12:01 andrew_ joined #mojo
12:17 stryx` joined #mojo
12:21 cpan_mojo Mojolicious-Plugin-FormValidatorLazy 0.01 by Sugama Keita - http://metacpan.org/release/JAMADAM/Mojolicious-Plugin-FormValidatorLazy-0.01
12:23 teejay running mojo via hypnotoad file changes to templates seem to require restarts
12:23 teejay ..doing my head right in
12:35 tencendur joined #mojo
12:38 dotandimet joined #mojo
12:46 neilhwatson joined #mojo
12:53 cpan_mojo WWW-Flatten 0.03 by Sugama Keita - http://metacpan.org/release/JAMADAM/WWW-Flatten-0.03 (depends on Mojolicious)
13:08 marcus teejay: hypnotoad is meant for production. use morbo for development
13:09 teejay do templates get recompiled on change if I use morbo instead then?
13:09 marcus teejay: morbo will restart when it detects a changed file automatically
13:10 teejay cool
13:15 melo joined #mojo
13:19 melo joined #mojo
13:41 jberger teejay: begin is literally "sub {"
13:41 jberger end is literally "}"
13:43 dotandimet joined #mojo
13:44 jberger hmm and it seems that this example needs updating
13:44 jberger http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Reusable-template-blocks
13:45 jberger the translation to perl code looks like an example changed at some point
13:45 pink_mist oh indeed
13:59 jberger (and actually, as I tinker with it, I recall that there is more to begin and end than sub { and })
13:59 punter joined #mojo
14:03 jberger teejay: I agree, I think the problem is the ; following begin
14:04 jberger perhaps it should be more resilliant to that (if possible)
14:12 zivester joined #mojo
14:15 jberger sri: I don't understand why there is a $cpst on this line: https://github.com/kraih/mojo/blob/master/lib/Mojo/Template.pm#L146
14:16 jberger (slightly unrelated)
14:19 jberger it looks like in the tokenizer, $cpst can only preceed an end tag, clearly that isn't the case, but how is it working otherwise?
14:20 gryphon joined #mojo
14:20 jberger oh right, it turns perl lines in to capture tags, I forgot about that
14:21 Kharec joined #mojo
14:22 genio I didn't realize you could define sections of an expression as variables to be used like this: https://regex101.com/r/gJ7pU0/1
14:25 Grinnz thats an indication you may be doing too much shit in your regex
14:26 genio no doubt, but it's still a neat feature and cleans up that rfc822 expression a bit
14:27 jberger perl -Mojo -E 'a("/" => { inline => q[<% my $m = begin; %>hello <%= shift %><% end %><%= $m->("Joel") %>] })->start' get /
14:27 jberger minimal example
14:27 purl i think minimal example is just there to show you how auth works without other stuff getting in the way
14:27 jberger with the ; after begin it dies
14:28 jberger it seems silly when written in <% %> blocks, but that is how % lines are rewritten
14:32 jberger it would then be easy enough to special case an allowed (but ignored) ; after begin
14:33 jberger but the question then is, would people try to put more code after it?
14:33 jberger I think they would
14:33 jberger unless that could be added (and I'm not sure that it should) the whole thing is probably pointless
14:44 marmez left #mojo
14:44 melo joined #mojo
14:45 asarch joined #mojo
14:47 sh4 joined #mojo
14:49 sh4 joined #mojo
15:11 good_news_everyon joined #mojo
15:11 good_news_everyon [mojo] kraih pushed 2 new commits to master: http://git.io/AcIN
15:11 good_news_everyon mojo/master 2eb8258 Renee: Fix minor typo in Change...
15:11 good_news_everyon mojo/master 7ec5c67 Sebastian Riedel: Merge pull request #744 from reneeb/patch-1...
15:11 good_news_everyon left #mojo
15:20 melo joined #mojo
15:23 sri jberger: how is the example wrong?
15:24 jberger in the top example the block is called twice with two different names, in the translation it is called 10 times in a loop with the same name
15:24 jberger I can make one look like the other, which do we prefer?
15:24 sri oh
15:25 dotandimet joined #mojo
15:26 sri i don't think the loop adds much value there
15:26 jberger k
15:26 sri already got that earlier in an example
15:28 sri teejay: if you know how to make Mojo::Template errors better, please send patches immediately!
15:29 jberger sri: do you think that the token_re and end_re might be modified to accept an (ignored) trailing ";" after begin
15:29 tempire Elberger is right; without ACT, there's no way to register talks.
15:29 tempire There's got to be another solution.
15:29 tempire No one likes ACT.
15:29 jberger tempire: that was what I was working on MCT for
15:29 sri jberger: why?
15:30 jberger '%= begin' cannot accept a trailing ; while if i read it correctly, all other constructs can
15:30 jberger which is why teejay had a problem
15:30 sri would you want a ; after an % if (...) { too?
15:31 jberger look at his paste (the shadowcat one)
15:31 sri that makes no sense to me
15:31 jberger it can exist there, its just a dummy statement
15:31 jberger I'm not saying I necessarily want it
15:31 sri seems stupid to me
15:31 jberger but I can see why (looking at his paste) the behavior is unexpected
15:32 jberger % end; # works
15:32 jberger % my $block = begin; # dies badly
15:32 jberger in fact that comment would kill it too
15:33 good_news_everyon joined #mojo
15:33 good_news_everyon [mojo] jberger pushed 1 new commit to master: http://git.io/AccB
15:33 good_news_everyon mojo/master 077e8b7 Joel Berger: make example translation consistent
15:33 good_news_everyon left #mojo
15:33 sri % }; works too
15:33 sri this is perfectly consistent
15:34 jberger of course % }; works, but the tokenizer that matches "begin" cannot accept anything after it other than whitespace
15:34 sri honestly, teejay did seem rather hyperbolic to me, and this is the first time i've seen that complaint in the history of mojolicious
15:35 jberger sri: let me change the topic slightly
15:35 jberger might it be possible to allow something like this
15:35 jberger % my $block = begin; my $name = shift;
15:36 jberger it seems to make sense in my mind that after the begin, you could start writing block code
15:36 sri that's insane
15:36 jberger maybe :-)
15:36 sri now you have to tokenize perl
15:36 mst sri: people get used to TT
15:36 sri how you gonna differentiate between a quoted begin and a real begin?
15:37 jberger that was my worry too: http://irclog.perlgeek.de/mojo/2015-02-20#i_10148091
15:38 sri folks keep forgetting that TT also has serious downsides
15:38 sri like, actually being a bottleneck
15:38 n2plato joined #mojo
15:39 jberger the few times I have tried to dive into a datastructure I get completely lost
15:40 sri does Mason have a way to generate better error messages?
15:40 jberger I don't mind Mojo::Template's error messages, they seem quite comparable to Mason's
15:40 bayashi joined #mojo
15:41 jberger the problem here is that when you generate a syntax error, much as with regular perl, sometimes the error message seems unrelated and might appear quite far away
15:41 sri jberger: you actually forgot the xml_escape in your translation
15:41 jberger I'm not sure that there is anything that can be done
15:42 jberger did I?
15:42 jberger I just changed the loop, and xml_escape is in the block
15:44 jberger oh, you mean on the two usages
15:44 jberger I suppose that's true
15:44 jberger they won't do anything because of the b object
15:47 mst sri: oh, sure, any time I profile a catalyst app I basically assume the bottleneck is going to be either the database or TT
15:47 mst I do wish Xslate had eaten TT'
15:48 mst I do wish Xslate had eaten TT's lunch more than it did
15:54 Grinnz_ if TT is your bottleneck, you're not doing enough in javascript <_<
15:55 * jberger slaps Grinnz_ with a fish
15:55 mst Put ME DOWN
15:57 Grinnz_ at least it's not a Superfish
15:57 genio one fish, two fish, red fish, super...   I need coffee
15:58 disputin joined #mojo
15:58 irq_ joined #mojo
15:58 dotandimet I'm with Grinnz_ in line for fish slapping: If you're messing with templates in the Perl side, you're probably over 30.
15:59 Grinnz_ oh man, the age card
15:59 dotandimet kids these days, you tell them: put these results in a table, and they jQuery on you.
15:59 jberger https://www.youtube.com/watch?v=IhJQp-q1Y1s
15:59 Grinnz_ but yeah our app uses perl templates to make a bucket of javascript links to send to the client
16:00 jberger oh how I would love to make a version of this with mst just slapping someone with his hand
16:00 jberger mst: lightning talk fun?
16:00 mst jberger: hrm?
16:01 jberger maybe not enough yapc attendees know their (monty) python anymore tho
16:03 riche joined #mojo
16:03 jberger hahahah, https://www.youtube.com/watch?v=YLdK9zaLaG8#t=42
16:04 dotandimet1 joined #mojo
16:08 good_news_everyon joined #mojo
16:08 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AcKf
16:08 good_news_everyon mojo/master d23686b Sebastian Riedel: xml_escape was missing
16:08 good_news_everyon left #mojo
16:09 * sri wonders if using a better name than $_M for the buffer would help
16:09 sri like $_outout or $_O or $_OUTPUT
16:09 sri s/outout/output/
16:10 sri $_out and $_OUT work too though
16:10 jberger $_OUTPUT looks right to me ($_OUT would be fine too)
16:10 jberger then again
16:10 jberger all caps is global by perlstyle
16:10 sri i've picked $_M because it uses a little less memory
16:10 jberger then again it does convey the warning
16:11 jberger in the symbol register :-)
16:11 sri (we have to store the raw compiled template for context information)
16:11 Ptolemarch joined #mojo
16:11 jberger oh
16:12 jberger and it gets used a LOT
16:12 sri set MOJO_TEMPLATE_DEBUG=1
16:12 sri then you see
16:12 jberger I know
16:13 jberger $_M -> $_OUT would be two extra bytes per line in the template, at least
16:14 sri not necessarily
16:14 sri optimizations happen
16:14 sri $_M .= "foo\nbar\nbaz"; and the like
16:14 jberger oh, true
16:16 sri i suppose $_O is better than $_M for starters
16:18 Dandre joined #mojo
16:20 sri it's funny when people say they can't use uninitialized variables
16:23 good_news_everyon joined #mojo
16:23 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AcMQ
16:23 good_news_everyon mojo/master f5a3c59 Sebastian Riedel: use $_O instead of $_M
16:23 good_news_everyon left #mojo
16:23 Grinnz_ any reason i would have 11 extra worker processes hanging around that have init as their parent pid, and appear to have been started when hypnotoad "restarted" workers due to heartbeat?
16:24 Dandre Hello,
16:25 Dandre I am trying to use Command line interface do run one of my controllers handler. I don't know how to do that
16:27 Dandre I can use my_app get '/my/path' but I have some questions:
16:27 Dandre how can I put authentification information?
16:27 Dandre if I write a command handler, can I directly call my controller handler?
16:30 Grinnz_ jberger: think these could be fork_call processes hanging around?
16:30 Grinnz_ they responded to sigterm at least...
16:31 jberger Grinnz_: you aren't starting fork_call processes in startup are you?
16:31 Grinnz_ no
16:32 Grinnz_ the pids don't match the workers that were restarted though, so i don't know what they could be
16:32 jberger Dandre: I use basic auth for that
16:33 Grinnz_ i dont have anything that would daemonize from hypnotoad
16:33 jberger Dandre: if you think you want to call a controller directly, you have too much logic in your controller
16:33 jberger Grinnz_: how long are they waiting around?
16:34 Grinnz_ jberger: half of those processes were 6 hours old when i noticed just now
16:34 Dandre jberger: Dandre: I use basic auth for that
16:34 Dandre how?
16:34 jberger Dandre: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basic_access_authentication
16:35 sri very unlikely those could be hypnotoad processes, even if the manager goes away the workers kill themselves
16:35 Grinnz_ i'm very confused, what else could even daemonize
16:35 pink_mist might be tied up with a connection?
16:35 jberger it is possible that they are fork_call processes, I don't have any timeout logic on them
16:36 jberger that's up to you to roll
16:36 sri hypnotoad has like 3 or 4 safety features to make sure processes don't stick around
16:36 jberger in fact I explicitly turn off closing the stream here: https://github.com/jberger/Mojo-IOLoop-ForkCall/blob/master/lib/Mojo/IOLoop/ForkCall.pm#L75
16:36 Grinnz_ the fork_call processes arent running an ioloop though are they?
16:37 Grinnz_ oh for the stream
16:37 jberger Grinnz_: the parent has to be
16:37 Grinnz_ oh
16:37 Grinnz_ well yeah
16:37 jberger otherwise how does it listen
16:37 Grinnz_ but i mean the child processes
16:37 sri timeouts, escalation from SIGTERM TO SIGKILL, SIGCHLD, watching a pipe on both ends....
16:38 Dandre ok if I do http://user:pass@my.server.com/foo I get a correct answer but if I do
16:38 Dandre myapp get 'user:pass@my.server.com/foo' I get this:
16:38 Dandre The requested URL was not found on this server.
16:38 jberger Grinnz_: we could use the stream timeout to kill the child, submit a PR
16:38 Grinnz_ jberger: it would not help
16:38 Grinnz_ these processes have no parent
16:38 sri Dandre: http://mojolicio.us/perldoc/Mojolicious/Command/get#SYNOPSIS
16:39 Dandre oups ok I hadn't seen, thanks
16:41 Grinnz_ would that happen if the hypnotoad workers get killed while they have fork_call processes running? they get assigned to init?
16:42 sri well, try it
16:44 * sri wonders if it should be Mojo::Loader::file_is_binary or Mojo::Loader::data_is_binary
16:45 Grinnz_ i guess this falls under "hard to test" stuff :P
16:45 sri you should be able to test it with a one-liner just fine
16:46 Grinnz_ a oneliner that times out a hypnotoad worker?
16:46 sri just use prefork, make a fork_call with while (1) and kill the worker
16:46 Grinnz_ hmm
16:46 punter joined #mojo
16:46 sri or if you want to go further, SIGTTOU until you hit the right worker
16:47 sri this is not rocket surgery
16:48 sri http://mojolicio.us/perldoc/Mojo/Server/Prefork#TTOU
16:48 jberger hahaha, rocket surgery
16:49 jberger Grinnz_: perhaps I should have a parent-side close handler that kills the child though, http://mojolicio.us/perldoc/Mojo/IOLoop/Stream#close
16:49 melo joined #mojo
16:49 jberger that would be a little controversial, I probably couldn't set it by default, because I imagine some people use this for fork-and-forget
16:49 jberger though they probably shouldn't
16:50 sri jberger: perhaps the new finish signal in Mojo::IOLoop could be helpful
16:50 jberger hmmmmmm
16:50 sri umm, event, not signal
16:50 Dandre I have lots of line like
16:50 Dandre utf8 "\xE9" does not map to Unicode at /usr/share/perl5/Mojo/Exception.pm line 92, <$handle> line 8.
16:50 Dandre How can I find the file where those characters are not properly encoded?
16:50 jberger I knew what you meant
16:51 jberger Dandre: -MCarp::Always
16:51 jberger gives you a stack trace (but be prepared)
16:51 Grinnz_ jberger: i don't see any reason to use fork_call for fork and forget
16:52 Grinnz_ the entire point of the module is to get the return value :P
16:52 jberger or to unblock with a delay
16:52 Grinnz_ right
16:52 jberger I use it in testing sometimes that way
16:53 Grinnz_ to get some sort of indication when the child completes, at least
16:53 jberger right
16:56 Grinnz_ hrm
16:56 Grinnz_ i dont see a new process spawning fromt he forkcall
16:56 Grinnz_ wtf
16:57 Grinnz_ oh right, the localhost thing on this box
16:57 Kundun joined #mojo
16:58 Grinnz_ there it goes
16:59 Grinnz_ grinnz   30045 30033  0 11:58 -> $ kill 30033 -> grinnz   30045     1  0
16:59 Grinnz_ bingo
17:02 franzkafka joined #mojo
17:02 Grinnz_ so i guess the question is, is there a way to have the process reap the child if it exits due to SIGTERM
17:03 Grinnz_ and the other question is why are my forkcalls not exiting :P
17:04 jberger Grinnz_: that is probably a good use-case for Mojo::IOLoop->singleton->on(finish => sub { ... });
17:04 Grinnz_ is that emitted on SIGTERM?
17:04 jberger except, what request are you serving that takes that long and doesn't respond and you don't kill it
17:05 Grinnz_ jberger: thats the question, nothing should
17:05 Grinnz_ but it doesnt matter if i kill it or not if the worker process gets killed first
17:06 jberger when you fork, if the parent goes away before the child, does it zombie forever or does the os reap it?
17:07 Grinnz_ no idea
17:07 Grinnz_ let me try
17:07 jberger because if it is the latter (what I would expect, but who knows) then your child process should eventually finish and exit either way, right?
17:08 Grinnz_ yeah
17:08 jberger have a child that does sleep 20 or something
17:08 Grinnz_ i just tested, if the child finishes after its parent is gone it dies
17:08 Grinnz_ or exits rather
17:08 jberger cool
17:09 jberger so that means your child process is hung rather than making it to the end
17:09 Grinnz_ i dont know what could possibly hang up a fork call for 6 hours though
17:09 jberger what is it doing?
17:09 Grinnz_ thye do nothing but db calls and http requests
17:09 Grinnz_ although some of them are running code written by ... another team member
17:09 Grinnz_ so i'll blame him
17:09 jberger (that guy)--
17:10 franzkafka Hi fellas
17:11 franzkafka Just wondering, how can I render a template rather than go to a controller action? E.g., $r->get('/')->render('index')->name('index'); doesn't work
17:12 franzkafka Nothing, I got it with a callback
17:12 franzkafka Hopefully the name part works
17:12 franzkafka haha
17:13 Grinnz_ yeah, callback is what you'd do if you dont want to use a controller
17:13 meredith i think just naming it index should find index.html.ep through automatic rendering, if that's all you need
17:13 Grinnz_ but it can also do automatic rendering
17:13 Grinnz_ yeah, does that use the route name?
17:15 punter joined #mojo
17:17 jberger franzkafka: set the template stash parameter
17:18 jberger ->to(template => 'path/to/template')
17:18 franzkafka Ohh nice! No need for the callback then. Thanks jberger, that looks better too.
17:19 jberger http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Rendering-templates
17:19 jberger literally the first sentence :-)
17:19 franzkafka Ah thank you. I was looking at the routing guide.
17:20 jberger I can see why that would happen
17:20 jberger but remember, ->to is basically just setting the stash
17:21 Ptolemarch joined #mojo
17:25 * Grinnz_ turned on debug logging, will see what request it gets stuck in next time
17:27 jberger for as much as I try to make it usable, fc is always going to be a rather low level module
17:28 jberger kinda why I was hesitant to add the helper
17:28 Oleg joined #mojo
17:28 jberger I can't know what should be done on ioloop finishing
17:28 Grinnz_ sure
17:29 jberger If I kill the child then, then it's not a graceful restart to that client anymore
17:30 Grinnz_ yeah, i think it would have to be on the prefork server finish event instead, which is too high level for forkcall
17:30 batman jberger: I'm on my way to Germany. Don't think I can reply until tomorrow. Sorry about that :(
17:31 melo joined #mojo
17:31 Grinnz_ hmm nevermind thats only for the manager process
17:31 batman Pretty hectic days :/
17:32 Grinnz_ when a worker gets SIGTERM it's unhandled
17:32 Grinnz_ so theres no event anyway
17:32 Grinnz_ https://metacpan.org/source/SRI/Mojolicious-5.80/lib/Mojo/Server/Prefork.pm#L182
17:34 dotandimet joined #mojo
17:35 Grinnz_ i'm starting to think i'm going to need to store the PIDs and add an END or DESTROY
17:42 jberger batman: reply to what?
17:42 jberger enjoy Germany!
17:42 jberger go get a beer with sri
17:43 n2plato joined #mojo
17:43 cbendana joined #mojo
17:44 cbendana hey there, is there any way to ask mojo for a route just as it was defined, template parameters and all ?
17:47 jberger Grinnz_: Look at Mojo::IOLoop's finish event
17:47 jberger fairly new
17:47 Grinnz_ jberger: i thought that was only for a graceful stop?
17:47 jberger oh, right
17:47 jberger nm
17:48 jberger killing the prefork workers is graceful though isn't it
17:48 Grinnz_ i'm trying to handle the case where the worker gets  SIGTERMed
17:48 Grinnz_ and it has no handler for that
17:48 Grinnz_ it's just going to exit
17:48 jberger hmmmm
17:49 franzkafka Is there anything like $c->params->to_hash? I know $c->param is a method of controller, but not params.
17:49 Grinnz_ $c->req->params
17:49 purl i guess $c->req->params is the right method for accessing params.
17:49 Grinnz_ thanks purl.
17:49 jberger purl++
17:49 franzkafka purl, you're good
17:49 purl franzkafka: huh?
17:50 jberger cbendana: what do you mean "ask for"
17:51 jberger there is the match stack, but that is getting into the depths of the router
17:51 jberger what are you trying to do
17:52 cbendana jberger, obtain some how ?
17:52 jberger your question is too vague
17:53 * jberger scurries about for the vague meme
17:53 jberger http://trout.me.uk/vague.jpg
17:53 Grinnz_ i think i know which action is hanging up indefinitely but i have no idea how its possible still
17:54 jberger Grinnz_: :-P
17:59 Grinnz_ well... guess its time to blindly try things and see if it works :P
17:59 tempire !@#$
17:59 tempire That's the best image response ever.
18:00 jberger tempire: credit goes to mst
18:00 tempire I don't believe it.
18:00 jberger (as the url implies)
18:00 tempire There's no curses in it.
18:00 tempire :)
18:01 jberger he pointed out that he has another copy, with a url that doesn't give away the punchline: http://trout.me.uk/caption.jpg
18:03 mst it's reached the point now where 'vaguecat' is an adjective in office discussion
18:03 cbendana jberger, sorry, let rephrase that
18:07 cbendana let's say i have $r->get('/users/:param1/:param2/?sort')->to('myctrl#myaction'), is there any way to get that url template without expanding it, i know there is url_for and to_abs, but from what I see, it tries to expand the template, I would like to get the template itself without parameter interpolation
18:08 cbendana is it possible ?
18:08 purl anything is possible in the next half hour
18:09 jberger in that case what result would you like to see?
18:09 cbendana something like http://hostname:port/users/:param1/:param2/?sort
18:11 cbendana where http could vary depending on how the request was made and :port could be left out if the default port for the protocol was used
18:11 jberger is this for your own (human) inspection or do need this programmatically
18:11 irq joined #mojo
18:11 jberger if for human inspection, just use the routes command
18:11 jberger ./myapp routes
18:12 jberger if you want something more that that, ie programmatic, see how the routes command works here: https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Command/routes.pm
18:13 jberger its quite a thing
18:13 jberger that route gets converted into regexen etc for matching
18:13 jberger it is introspectable, but you would really have to want it
18:14 jberger remember, nested routes are a thing :-)
18:14 meredith app->routes->find('route_name')->pattern->pattern ?  but it won't show the complete pattern for anything that begins with a + on ./myapp routes
18:14 meredith that takes More Work(tm)
18:14 jberger the router really is a route tree
18:19 cbendana what i'm trying to do here is generate a HAL document, and I need links like self that has the url template of the endpoint that was just requested for example, not sure if there would be a better way to do it
18:19 cbendana in the routing guide there is an entry about reversibility, so i was wondering if it was possible
18:20 cbendana http://mojolicio.us/perldoc/Mojolicious/Guides/Routing#Reversibility
18:20 Grinnz_ can you think of any reason $c->req->url->base->authority would be undef?
18:20 Grinnz_ i had a line like $c->req->url->to_abs->to_string based on these examples https://metacpan.org/pod/Mojo::Message::Request#url
18:21 Grinnz_ turns out i didnt really want the to_abs in that case, but i was getting warnings consistent with the base url's authority being undef
18:21 Grinnz_ i can't reproduce it with my tests so i dunno what was going on
18:23 Grinnz_ it looks like its only undef if the host attribute is undef
18:23 cbendana ./myapp routes does generate what i'm looking for, so i'm going to start there, thanks a lot
18:23 jberger Grinnz_: user_info isn't included unless you "to_abs"
18:24 Grinnz_ jberger: right, i was doing to_abs and that generated the warnings
18:24 jberger cbendana: np, sorry, I really just had no idea what you were asking for earlier ;-)
18:25 cbendana jberger, no worries, you were right it was a vague question :P
18:25 Grinnz_ http://fpaste.org/188314/56737142/
18:25 Grinnz_ all indicating that $url->authority(undef) was called, which is called from to_abs
18:25 jberger Grinnz_: no idea, can you make a minimal example
18:26 Grinnz_ with the base url's authority
18:26 Grinnz_ jberger: like i said, i cant reproduce it from the controller
18:26 Grinnz_ i dont know if its a weird request or what
18:26 jberger well where does "base" come from otherwise?
18:26 jberger do you set it?
18:26 Grinnz_ no
18:27 jberger then there's your problem
18:27 Grinnz_ i dont touch that url other than accessing it for that
18:27 jberger in a controller, base comes from the request
18:27 jberger outside, its up to you
18:27 Grinnz_ this is in a controller
18:27 sri cbendana: http://hostname:port is unknown to the application before a request actually comes in
18:27 jberger Grinnz_: "jberger: like i said, i cant reproduce it from the controller"
18:28 jberger Grinnz_: see sri's message to cbendana, related
18:28 Grinnz_ $ perl -Mojo -E'a("/" => sub { $_->render(text => $_->req->url->base->authority) })->start' get / # returns the local host:port
18:28 sri cbendana: for all we know your server has a million domains and you're listening for http and https
18:28 Grinnz_ i dont really know what else to try
18:29 cbendana sri, yes, i'm trying to get the route in the action itself, so all the information should be there, right ?
18:29 Grinnz_ could this maybe have to do with hypnotoad tryng to set the base url from the reverse proxy?
18:29 jberger Grinnz_ without you showing some code, I don't think we can help
18:30 sri cbendana: yes, you just have to combine it yourself
18:30 cbendana sri, cool, will do that, thanks
18:30 Grinnz_ jberger: the code is literally just accessing the request url
18:30 Grinnz_ there's nothing to it
18:30 franzkafka ok
18:31 franzkafka For some reason my app is croaking with the error "can't call method "to_string" on unblessed reference at /home/fkafka/perl5/perlbrew/perls/perl-5.20.2/lib/site_perl/5.20.2/Mojo/URL.pm"
18:31 franzkafka Is there any way to get a more helpful message?
18:31 Grinnz_ well, you could start with the line number at the end of that error message
18:32 franzkafka I am not using to_string method anywhere in my app
18:32 franzkafka yeah, I looked at line 104 different files in my app, and nothing even related to what's happening
18:32 punter joined #mojo
18:32 Grinnz_ franzkafka: it's happening in Mojo::URL not your app
18:32 franzkafka unless you mean you want me to look at line 104 in Mojo::URL
18:32 Grinnz_ like the error message says..
18:33 franzkafka right, in the path_query subroutine, here: return $self->path->to_string . (length $query ? "?$query" : '');
18:33 franzkafka what I want to know though is what in my app is causing this? I'm modifying path all over the place.
18:34 Grinnz_ how are you modifying path?
18:34 Grinnz_ it should always be a Mojo::Path object, not an unblessed reference
18:34 franzkafka my $url         = $self->url->clone; $url->path('blah');
18:35 franzkafka as an example
18:35 franzkafka Hm, everything worked fine until I updated Mojolicious
18:35 Grinnz_ shouldnt be anything wrong with that
18:35 franzkafka Maybe I will just go back a version
18:36 Grinnz_ hrm
18:36 sri if you find a bug report it
18:36 Grinnz_ https://metacpan.org/source/SRI/Mojolicious-5.80/lib/Mojo/URL.pm#L96
18:36 franzkafka I'd love a stack backtrace here so I could at least see what in the app is causing this
18:36 franzkafka Oh well, going back a version. Thanks Grinnz_!
18:36 Grinnz_ if you pass an array or hash ref to path() then it will set the path attribute to that unblessed reference
18:37 Grinnz_ which is bad
18:37 franzkafka I think I may also submit a bug report on this
18:37 franzkafka Does sri take bug reports at github?
18:37 sri make sure to include more information, right now you're a case for vaguecat
18:37 franzkafka sir, you here?
18:37 franzkafka Ah, there you are.
18:37 dod joined #mojo
18:37 franzkafka Right, will try to gather info for this.
18:38 Grinnz_ franzkafka: are you passing anything other than a string to $url->path() ever?
18:38 franzkafka Nah, just a string
18:39 sri Grinnz_: yea, that's it
18:39 franzkafka I can't be sure that this isn't being caused by a module I am using though.
18:39 franzkafka I need a backtrace.
18:40 Grinnz_ franzkafka: https://metacpan.org/pod/Carp::Always
18:43 sri that unblessed reference warning could at least mention the reference type
18:44 sri s/warning/error/
18:44 Grinnz_ you mean the perl message?
18:44 sri ye
18:44 Grinnz_ would be nice
18:56 rsperl joined #mojo
19:07 good_news_everyon joined #mojo
19:07 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AWUw
19:07 good_news_everyon mojo/master 54a8209 Sebastian Riedel: use a slightly cleaner pinstripe pattern
19:07 good_news_everyon left #mojo
19:14 franzkafka joined #mojo
19:23 Ptolemarch joined #mojo
19:25 cbendana ok i got maybe a simpler question now, is there any from the controller to get the currently active route ?
19:25 cbendana i mean the route object
19:26 sri http://mojolicio.us/perldoc/Mojolicious/Controller#match
19:26 cbendana sri, awesome, thanks
19:38 rsperl joined #mojo
19:45 till joined #mojo
19:47 till Hi, is it possible to call prefixed helpers with a template block like in this example? http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Adding-helpers
19:48 till %= $c->helpers->html->panel 'Test-Title', begin
19:48 till foo
19:48 till % end
19:48 purl bar
19:48 till does not work
19:51 jberger till: please don't paste into the channel
19:53 jberger can you please make a minimal example, post it to some paste site and send us a link
19:55 franzkafka Ahhh, not a bug
19:56 till sorry.. when you follow the link you will see a helper "trim_newline"; how does this work with prefixed helpers?
19:56 franzkafka I assume though that it's not possible to have '/' route go to two different places if authenticated / not authenticated?
19:56 pink_mist why wouldn't it be?
19:56 franzkafka because what I did isn't working obviously
19:59 franzkafka http://pastebin.com/raw.php?i=ACYiUQJD
19:59 Grinnz_ franzkafka: it will match the first time you define the '/' route unless theres some other condition
19:59 franzkafka that doesn't work... if I am authenticated, it still renders index
20:02 till jberger: here is an example: http://pastebin.com/DQG64cTu
20:03 jberger till: that is being used as a method
20:04 jberger you need parens
20:04 jberger simple helpers are installed as functions and thus do not need parenthesis
20:05 jberger but this is still perl
20:05 oetiker https://tobi.oetiker.ch/navi/index.html
20:05 franzkafka Hm, OK
20:05 oetiker generating rrd charts with mojo on the fly
20:05 franzkafka So, I take it the under condition is not sufficient then?
20:05 franzkafka oetiker, how?
20:05 oetiker is so fast that
20:05 oetiker you can navigate interactively
20:06 franzkafka oetiker, please put on github.
20:06 oetiker the demo page can be navigated with a mouse and on mobile devices with touch
20:07 oetiker franzkafka this is part of a customer system ... but parts of it will end up in smokeping 3
20:08 good_news_everyon joined #mojo
20:08 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AWrB
20:08 good_news_everyon mojo/master fe9c39b Sebastian Riedel: more consistent spacing
20:08 good_news_everyon left #mojo
20:08 till thanks :) i am so stupid..
20:10 franzkafka oetiker, sounds awesome
20:11 hernan604 hi, im testing Redis2 and cant make it blpop. What could be wrong? http://paste.scsys.co.uk/464822
20:13 hernan604 Note: This method will only work in a non-blocking environment.
20:13 hernan604 i think that says it
20:14 oetiker franzkafka the system currently consists of a bunch of harvester machines, fetching values Mojo::SNMP and sending them to a central silo server which stores the data using rrdtool and can also create rrdfiles using templates.
20:15 oetiker rrdfiles -> rrdcharts
20:16 jberger till: hard to see until you see it
20:21 marmez joined #mojo
20:22 good_news_everyon joined #mojo
20:22 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AW1P
20:22 good_news_everyon mojo/master 29bfccd Sebastian Riedel: go for a more polished look
20:22 good_news_everyon left #mojo
20:25 jberger oetiker++ looks cool, I wish I had any idea what any of that meant, but still looks very cool :-)
20:46 franzkafka jberger, it's really awesome, because monitoring tools out there (e.g., nagios, zabbix) all really suck.
20:55 jberger franzkafka: hmmmm, I'm probably going to have to learn about monitoring at some point
20:57 oetiker just found out that my javascript fails to work on properly on firefox ...
20:57 jberger oetiker: as long as it doesnt only work on ie :-
20:57 jberger :-P
20:57 oetiker works fine on chrome
20:58 oetiker and after some tweaking on IE too
20:58 oetiker and I am sure I'll get ff in line
20:58 oetiker it seems that eventhandling is still quite a snakepit
20:59 oetiker I have been spoiled by using qooxdoo.org all the time
21:04 franzkafka joined #mojo
21:10 genio well, I did my good deed for today and edited some documentation.  I need a drink
21:10 pink_mist oetiker: this is why using a framework that abstracts the event stuff away is always a better idea =)
21:12 Ptolemarch joined #mojo
21:13 franzkafka As soon as I see 1&1, I run.
21:13 franzkafka qooxdoo could be the greatest thing ever, I'm still running.
21:13 franzkafka Worst company ever
21:14 relberger joined #mojo
21:15 sri says the one connected through comcast
21:15 pink_mist hah
21:21 sri still one of my favorites https://www.youtube.com/watch?v=KMcny_pixDw
21:21 sri purl: comcast?
21:21 purl comcast is like really fucking up. or a decent isp, but their customer service and technicians are uniformly COCK SMOKERS or what the Spaniards call El Terrible.
21:25 Grinnz_ jberger: i don't think my sigterm problem can be solved without a signal handler in the worker or something lol
21:25 Grinnz_ i tried END, i tried DESTROY
21:25 Grinnz_ well hopefully i fixed whatever was causing it to hang in the first place
21:28 Grinnz_ ... nope
21:31 dod joined #mojo
21:31 sri interesting, i did not know that $SIG{CHLD} = 'IGNORE' can prevent zombies
21:33 jberger sri: but unfortunately it does me no good
21:33 punter batman, in Mojo::Redis2, in the POD, in section "pub/sub" you say $self->subscribe. Did you mean $redis->subscribe?
21:34 Ptolemarch joined #mojo
21:34 kaare joined #mojo
21:34 jberger Grinnz_: is there some notification to a child process that its parent went away
21:35 Grinnz_ wish i knew...
21:37 jberger Grinnz_: http://stackoverflow.com/q/284325/468327
21:37 Grinnz_ interesting
21:38 Grinnz_ linux-only, but i might just see if i can set that in my fork_call helper
21:38 jberger Grinnz_: there are a couple possibilities there
21:38 punter batman, what is $self in those examples? how do I create $self ?
21:38 jberger are you on linux?
21:38 good_news_everyon joined #mojo
21:38 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AlnJ
21:38 good_news_everyon mojo/master c59eabc Sebastian Riedel: worker processes do not actually use INT and TERM signals
21:38 good_news_everyon left #mojo
21:38 Grinnz_ yes
21:40 jberger Grinnz_: https://metacpan.org/pod/release/SEVEAS/Linux-Prctl-1.3.1/lib/Linux/Prctl.pm#set_pdeathsig-signal
21:41 Grinnz_ unfortunately, a new module is not something i can quickly deploiy
21:41 franzkafka joined #mojo
21:42 Grinnz_ for now i raised heartbeat_timeout, it seems to have helped
21:43 Grinnz_ i think the issue is that workers are getting blocked by these other endpoints which are taking really long (another discussion) while they have fork calls out
21:43 Grinnz_ so if they get killed off... poof
21:43 sri classy review http://cpanratings.perl.org/dist/Linux-Prctl
21:43 Grinnz_ yeah i saw that lol
21:44 sri can't believe cpanratings still exists
21:45 sri never has a review there actually helped me
21:45 Grinnz_ heh
21:46 Grinnz_ it's occasionally helpful, if you see 5 reviews saying a module sucks (and why)
21:46 Grinnz_ the star rating is mostly pointless without moderation though
21:46 sri "DOCUMENTATION SAYS PYTHONIC...1 STAR!!!1"
21:48 sri Grinnz_: what if the module has been adopted and is now maintained again?
21:49 Grinnz_ well, it's not conclusive :P
21:49 sri those ratings never change, the namespace burned
21:49 Grinnz_ indeed
21:50 sri it makes no sense at all and needs to die
21:52 jberger look at the ratings for Module::Build
21:52 jberger no matter what your opinions of that module are, the reviews are certainly incorrect, but live forever
21:52 jberger "baaaah it can't even do X?!"
21:52 Grinnz_ lol
21:54 sri oh, i suppose this is another candidate for our syntax highlighting http://prismjs.com/
21:54 * sri pokes dotan1
21:54 sri i hear very very good things about that one
21:58 sri (main goal is still to somehow get DATA templates highlighted nicely in the docs)
21:58 jegade joined #mojo
21:58 Grinnz_ hmm... i can't easily clean up processes once workers start getting killed, but i could at least add a finish handler on ioloop for when they get the QUIT signal
22:00 good_news_everyon joined #mojo
22:00 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AlEV
22:00 good_news_everyon mojo/master 0f5c631 Sebastian Riedel: the function is called data_section
22:00 good_news_everyon left #mojo
22:02 sri any thoughts on the doc browser changes? or not noticeable anyway? :) http://mojolicio.us/perldoc/Mojo/DOM
22:03 jegade hi, how could i write a simple message into an channel with Mojo::IRC?
22:11 jberger sri: it looks good, I can't say I notice, I would have to see comparisons
22:12 jberger jegade: https://github.com/jberger/Mojolicious-Command-nopaste/blob/master/lib/Mojolicious/Command/nopaste/Service.pm#L126
22:13 jegade jberger: ty
22:15 sri old http://i.imgur.com/fZpnwpd.png
22:15 sri new http://i.imgur.com/8sGoG8B.png
22:16 punter batman: http://stackoverflow.com/questions/28639178/cant-get-mojoredis2-to-subscribe
22:17 jberger sri: the side striping has changed, softer and different direction
22:17 jberger looks good to me
22:17 sri it's funny how little non-designers notice :)
22:17 sri there's like a dozen of little refinements
22:18 jberger font and size of the banner (maybe size of more than that)
22:19 jberger yeah, I'm probably the wrong person to ask
22:19 jberger tempire: you're up@
22:20 jberger !
22:20 sri i wanted to refine the drop shadow of the menubar too... but can't find good inspiration :/
22:21 sri shadows are out
22:27 sri jberger: hmm, i suppose documentation browser project would work got gsoc too
22:28 sri like a better TOC
22:32 Ptolemarch joined #mojo
22:34 Ptolemar_ joined #mojo
22:52 Grinnz_ jberger: i think i'm going to stick to nuking these slow endpoints from orbit
23:04 franzkafka joined #mojo
23:08 jberger or increase the response timout
23:08 jberger timeout
23:08 jberger but if you can nuke slow things, then do it
23:20 Grinnz_ jberger: they started not timing out
23:20 Grinnz_ so yeah, it's nuked for now
23:32 sri seems silly, the whole point of forkcall was to put slow things there
23:34 Grinnz_ actually the problem is that said endpoints are not forked yet
23:34 Grinnz_ lol
23:34 Grinnz_ thats why they're blocking the heartbeat
23:35 Grinnz_ that will change, but right now it's 6:30pm on a friday
23:35 Grinnz_ so... yeah
23:43 Grinnz_ i'm goign to think about a whole different project all weekend, one with postgres and websockets and no blocking crap!

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