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

IRC log for #mojo, 2016-09-25

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

All times shown according to UTC.

Time Nick Message
00:36 inokenty joined #mojo
00:37 plicease joined #mojo
00:37 ranguard_ joined #mojo
00:37 ashimema joined #mojo
00:40 y1mmm joined #mojo
00:40 trobotham joined #mojo
00:41 jberger left #mojo
00:42 jberger joined #mojo
00:42 jberger Hmm bad click there
00:43 sri heh, no convos minus minus? ;p
00:44 sri in irccloud it's actually pretty hard to leave a channel
00:45 jberger It was a pretty dumb click tbh
00:45 jberger I was clearing up a bunch of privates
00:45 jberger Clicked on the wrong tab and clicked close too fast
00:46 jberger On a different topic
00:46 sri "don't hold it that way"
00:46 sri ;p
00:46 jberger Do we know if/ what is being brought by mdk from/ for us http://blogs.perl.org/users/shadowcat_mdk/2016/09/tpf-at-oscon-london.html
00:46 jberger Hehe
00:46 irqq_ joined #mojo
00:47 sri no idea
00:47 sri it's not stickers, there has been no order bigger than 5 stickers
01:02 CandyAngel joined #mojo
01:03 Jonis joined #mojo
02:10 noganex joined #mojo
03:33 xdg joined #mojo
05:39 kaare joined #mojo
06:27 jamesaxl joined #mojo
06:39 ribasushi <genio> [Fri 17:29:10] I don't think this should have been made so public ... when nothing's yet been even done...
06:40 ribasushi genio: just a food for thought - consider whether you would have said that if you get woken up at 3am and find the quoted SMS from a pause admin on your phone
06:40 ribasushi s/a food/food/
06:44 dod joined #mojo
06:48 dod joined #mojo
06:53 jamesaxl joined #mojo
07:15 Vandal50506 joined #mojo
07:28 dod joined #mojo
07:47 polettix joined #mojo
07:52 abra_ joined #mojo
09:29 kaare joined #mojo
09:55 nic booo
09:55 nic github changed the way it counts contributions
10:08 nic https://github.com/niczero?tab=overview&amp;from=2014-12-01&amp;to=2014-12-31
10:26 sri lol
11:06 polettix nic: kudos for patience and dedication!
11:07 polettix is it “safe” to use DESTROY in a Mojo::Base -derived object, or is it something that might break in the future?
11:08 polettix or is there any “guard” mechanism that is suggested maybe?
11:24 polettix joined #mojo
11:50 Atog joined #mojo
11:57 sri nope, the new macgyver series is awful... the technobabble is unbearable
11:57 zamanf joined #mojo
11:58 Atog hi all!
11:58 Atog is there any way to match the text of a html/xml node using Mojo::DOm?
11:58 pink_mist it was quite painful to see them ripping out a hdd (which was of course the right thing to do, duh), but then exposing the innards of it ... the spinning disks were exposed to the air >_< that was insane
11:59 Atog let's say i have something like <value>HOST_IS_SLAVE</value> into a xml and want to match the text
11:59 Atog i'm trying something in the vein of find('value[text="HOST_IS_SLAVE"]')
12:01 pink_mist something like ->find('value')->grep(qr/^HOST_IS_SLAVE$/)
12:02 Atog yeah it should work but i was looking for a kind of selector or something
12:03 Atog i'm playing with Mojo::Dom and looks really great avoiding grep/regexp as possible
12:04 pink_mist selectors don't work on text content afaik. you need to grep that
12:04 Atog oh, so that's it
12:04 Atog thanks pink_mist!
12:05 pink_mist if you had <value text="HOST_IS_SLAVE" /> it would probably work
12:05 pink_mist but not like what you did have
12:06 Atog yeah, it's xmlrpc
12:06 Atog i'm converting some crappy cgis i got and having a blast, Mojo is trully awesome!
12:07 Atog also trying to digest all the nice stuff like Mojo:Dom (In this case) and trying to leave aside all the regexp forgery for html as possible
12:09 polettix joined #mojo
12:10 pink_mist that wasn't regexp for html though, that was just matching a string that was already extracted from the xml
12:10 pink_mist which is totally fine
12:24 sri grep on a lot of elements is very very slow though
12:25 sri especially if you make it render the html tags first like that
12:27 polettix hi! Is there a suggested way to cleanly stop a Mojolicious(::Lite) app e.g. when a signal comes? I see Mojo::IOLoop has stop/stop_gracefully but nothing equivalent for Mojolicious
12:28 polettix (still trying to find a clean way to set guards)
12:29 pink_mist oh right, that renders it first :/ should have grepped on the text specifically
12:30 sri what's the definition of guard in this context?
12:31 polettix sorry, I asked a question some time ago and still had that in my “mind context”. I’m trying to set up a call for remotely unregistering a webhook upon shutdown of the application
12:31 polettix so I tried to use a guard object but it’s probably broken
12:32 polettix (which does not surprise me, it’s the first time I try to play with these things)
12:32 sri you mean a scope guard?
12:35 sri anyway, if you do it right, it should just work
12:40 polettix yes, I’m just not sure about using it with closures
12:41 polettix but it’s something I’ll study later at this point. Back to the original question, is there a suggested way to gracefully shutdown a Mojolicious app or it’s just “exit and you will be fine”?
12:47 sri i don't know what "graceful" is
12:47 sri you really need to be more specific
12:56 polettix sorry, I’ll try to figure out :)
13:23 jamesaxl joined #mojo
13:27 polettix shouldn’t have used weaken, I was just tossing the thing away myself
14:08 ribasushi joined #mojo
14:34 sri come on, someone make something like this for perl https://github.com/magicstack/uvloop
14:34 sri we'll use it immediately in mojolicious
14:34 kaare joined #mojo
15:12 dod joined #mojo
15:38 polettix joined #mojo
15:48 tyldis I don't have time today, sorry.
15:50 PryMar56 joined #mojo
16:39 jnbek joined #mojo
17:40 asarch joined #mojo
17:43 PryMar56 joined #mojo
17:49 haarg joined #mojo
18:25 bombuzal joined #mojo
19:11 jlavoy joined #mojo
19:13 jlavoy my google foo is failing me, what is the proper way to stop processing a request without killing the webserver? something like a last() or a break(). last() appears to work but spits out a bunch of complaints when doing so.
19:27 mpapec main advantage of libuv being windows friendly unlike libev?
19:31 pink_mist jlavoy: why not just return?
19:31 jlavoy pink_mist: i have a _return() sub that handles all my rendering, if i return() inside of that it just hops back up a level and keeps running
19:32 jlavoy i want _return() to render things and exit basically. Translating a CGI application that worked that way
19:33 mpapec can you show the code?
19:33 jlavoy sorta yeah, just a sec
19:34 cpan_mojo Mojo-Sendgrid-0.03 by SADAMS https://metacpan.org/release/SADAMS/Mojo-Sendgrid-0.03
19:35 jlavoy mpapec: http://pastebin.com/M761nWXL
19:35 jlavoy that's a snip
19:39 mpapec jlavoy why not return after  $api->_return ?
19:40 jlavoy can do that, would just prefer it was done inside _return() so I don't have to think about it
19:40 jlavoy which is working if I do last, but then it spits out a bunch of: Exiting subroutine via last at api.pl line 28. these
19:42 jlavoy i figured there's a better way, if not that's fine
19:42 jlavoy but though i'd ask before I give up
19:42 jlavoy thought rather
19:42 mpapec last would make sense inside a loop
19:43 jlavoy well i'd assume the meat and potatos of Mojo is a while(), so i figured next/last would probably get the functionality I'm looking for.
19:43 jlavoy which is does, it just doesn't look like Mojo is very happy about it :)
19:45 mpapec (un)fortunately this is not a cgi so 'exit' is off the table :)
19:45 jlavoy yeah
19:46 jlavoy i think _return() and return() will work
19:46 jlavoy was just hoping for something cleaner
19:46 jlavoy thanks much for taking a look
19:47 mpapec btw, I would not recommend it
19:47 mpapec but you can try next instead of last
19:47 jlavoy i tried that originally, same functionality but same complaining on output
19:48 jlavoy the double return should do nicely
20:03 kes joined #mojo
20:06 sonicepk joined #mojo
20:08 polettix joined #mojo
20:11 sri jlavoy: i have a gist for that https://gist.github.com/kraih/6602913
20:12 sri but if you use that you can't use any of the async features in mojolicious
20:12 sri that's the tradeoff you'll have to make
20:22 sri wonder if flatpak will be a success http://flatpak.org
20:22 sri having just installed chrome and atom on opensuse, flatpak would make the process a lot easier
20:23 genio sri: congrats on the new job
20:23 sri thanks
20:54 jberger If jlavoy comes back, Mojolicious::Plugin::CGI might be a useful tool for porting a CGI  script
20:54 jberger Lee gave a good talk
22:00 polettix joined #mojo
22:36 eseyman joined #mojo
22:38 genio Wow.  I couldn't make it through the first episode of the new MacGyver
22:40 cpan_mojo Mojo-Sendgrid-0.05 by SADAMS https://metacpan.org/release/SADAMS/Mojo-Sendgrid-0.05
23:09 sri genio: that new lethal weapon series is much better
23:33 genio sri: Hmm.  I didn't even know that one existed.  I'll have to check it out
23:54 stryx` joined #mojo

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