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

IRC log for #mojo, 2017-08-11

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

All times shown according to UTC.

Time Nick Message
00:05 nicomen @jberger: just that NPW is going to happen at fall 2018, and that there will be a Mojolicious-track
01:10 veryrusty joined #mojo
01:25 bc547_ joined #mojo
02:10 noganex_ joined #mojo
02:46 ribasushi joined #mojo
03:30 veryrusty joined #mojo
03:57 esh joined #mojo
04:48 veryrusty joined #mojo
05:14 chandwki joined #mojo
06:18 veryrusty joined #mojo
06:32 zach so, when I have a file upload it seems to stop part way through and the connection gets reset
06:32 zach is there something special I need to do
06:32 zach same point with and without the firewall up
06:52 veryrusty joined #mojo
06:58 stryx` joined #mojo
07:05 karjala joined #mojo
07:10 Vandal joined #mojo
07:16 howitdo joined #mojo
07:44 heyao joined #mojo
08:29 good_news_everyon joined #mojo
08:29 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/v7y9v
08:29 good_news_everyon mojo/master 6a745ca Sebastian Riedel: there is no need for a public can_roles method, since Role::Tiny is required by every role anyway
08:29 good_news_everyon left #mojo
08:52 marcus Grinnz: have you tried using https://metacpan.org/pod/Mojolicious::Plugin::Future with Future::AsyncAwait?
08:52 petru joined #mojo
09:06 marcus Hmm, doesn't look like it's possible to override the Future class in use for Future::AsyncAwait
09:07 veryrusty joined #mojo
09:28 stryx` joined #mojo
09:32 CHYC joined #mojo
09:45 sri yea, Future::AsyncAwait is already dead to me
10:18 zach sri: any idea? my upload seems to die at 16MB point every time
10:19 sri zach: see the log
10:19 sri and use an up to date version of mojo
10:20 zach while running morbo there's nothing in the log about it
10:21 zach I'm using 7.32
10:23 sri that's not up to date
10:24 zach you think maybe it's the bug in <7.38?
10:24 zach - Fixed a bug where Mojo::Server::Daemon would close connections too quickly
10:24 zach and interrupt requests.
10:25 veryrusty joined #mojo
10:26 zach aw crap
10:27 zach To protect you from excessively large files there is also a limit of 16MB by default, which you can tweak with the attribute "max_request_size" in Mojolicious.
10:27 pink_mist pretty sure he's saying that only the latest version is officially supported
10:27 zach no it's actually a hardcoded thing I missed, it caps at 16MB just like I hit every time unless you tweak that value
10:27 zach I missed that caveat in the docs
10:28 zach It may be worth mentioning that info in the first paragraph about file uploads
10:28 pink_mist yes, but that doesn't change that only the latest version is officially supported...
10:29 zach Ok
10:37 VVelox joined #mojo
10:40 sri the latest version logs those request errors
10:41 sri so i knew zach could find the doc sections from the error message in the logs
10:41 pink_mist oh, there was a more specific reason too :P
10:42 zach I try to use packages when I can and cpan when I have to, so it takes a little more work to be on the latest version
10:43 zach I helped with the cpan puppet module though, so it should be a little easier to automate now, but I don't remember if we constrained it to linux, it's been a bit since I touched it
10:46 mib_cbsiyv joined #mojo
10:46 zach shit
10:46 zach the guy deprecated it
10:47 zach I either need to take ownership or see if puppet decided to add support for cpan in the package provider type
10:56 dhg joined #mojo
11:30 tchaves joined #mojo
11:39 sri ever since minion i don't actually have a need for too much async code in controllers
11:40 sri maybe it's just me, but if i do use async code in controllers it's streaming, like websockets
11:40 sri so, async/await wouldn't really help
11:41 marcus sri: We do a lot of async solr queries, don't think minion would help us with that.
11:41 sri are those so slow?
11:52 sri genio: what's the state of UV?
11:56 sri and everyone please review https://github.com/kraih/mojo/pull/1118 again
11:56 sri i want it merged later today
12:09 pink_mist sri: genio got burned out with XS during the last week or so, so he didn't do much UV stuff, but he just picked it back up again yesterday =)
12:17 marcus genio: We believe in you!
13:07 sh14 joined #mojo
13:07 gizmomathboy joined #mojo
13:11 genio pretty accurate summary thus far.  Also, a stupid design decision early on has me wanting to redo some things, so that led me down the path of learning some other XS bits that I also hate
13:13 genio data for handles is stored in a struct containing an SV for every possible callback, the stash to bless the handle into, user data, and the loop it's tied to; stuff like that.  Well, having tons of SVs for the callbacks is just, well, meh. I was going to change the entire struct to just be a perl hash (HV *) instead and have a hashref of callbacks in that data hash.  That's no fun either as finding all the ways in which it leaks sucks
13:15 genio and in the end, the amount of code necessary to go through a hashref in a hash is almost as bad as having individual SVs in a stuct. it's just less readable and harder to keep sane
13:16 genio https://github.com/genio/p5-UV/blob/master/UV.xs#L37-L51
13:17 genio which leads to horrible crap like: https://github.com/genio/p5-UV/blob/master/UV.xs#L182
13:17 pink_mist can't you do some of those bits in actual perl though?
13:17 pink_mist I mean, calling a callback from a hash is easy in perl code
13:19 genio I'd love to find an easier way.  However, I have to provide a C callback for each event, regardless of whether Perl users provide a callback for the event. Then, I have to tell the C callback to call the Perl user's callback if they provided it. I don't know of a simpler way to do it than what I'm currently doing. it leads to hideousness
13:19 genio https://github.com/genio/p5-UV/blob/master/UV.xs#L502 for example
13:20 genio these are the reasons I wish I could talk with some people who have more XS experience in person for a few hours. I have tons of stupid design questions that I can't make better without help
13:21 genio which then gets me into a stupid circle of thinking of a way to redo what I've already done to make things easier going forward and all progress comes to a screeching halt and I'm burnt out
13:30 genio maybe if I could make it to a perl conference or some such I could corner some folks and pay for their help in beer or whatever, but $work won't let me go to Perl conferences, so I'd have to do it on my own vacation time with my own money
13:32 genio At least I have some good tests setup even if I have to throw away the current XS attempt
13:40 Armen joined #mojo
13:48 genio maybe instead, I should just cut a test release and more people would realize there's an attempt to get things working and PRs would flood in to fix my stupid?
13:57 sri maybe
13:58 petru joined #mojo
13:59 mcsnolte joined #mojo
14:04 PryMar56 joined #mojo
14:18 gryphon joined #mojo
14:23 dhg joined #mojo
14:23 dantti_laptop|2 joined #mojo
14:33 sri genio: leont seems interested
14:36 genio I'd be happy to have his help or even to get the heck out of his way if he wants to make it happen
15:07 gizmomathboy joined #mojo
15:21 sh14 joined #mojo
16:07 karjala joined #mojo
16:21 jberger ah, found the longer conversation on #yapc
16:53 karjala_ joined #mojo
16:54 karjala joined #mojo
16:56 karjala_ joined #mojo
16:59 Pyritic joined #mojo
17:01 karjala_ joined #mojo
17:27 trippeh joined #mojo
17:34 petru joined #mojo
17:50 jacoby_ joined #mojo
18:29 dustinm joined #mojo
18:35 Alex342 joined #mojo
18:35 Alex342 hei guys
18:35 nicomen hi guy
18:35 Alex342 got a problem with ajax... Could someone help me? https://pastebin.com/VKivqQP2
18:38 preaction Alex342: what error do you get?
18:38 Pyritic joined #mojo
18:39 Alex342 i want to send the message parameter. but i dont know how
18:39 Alex342 i tried a few things... nope
18:39 preaction your code has syntax errors in it, so what error message do you get?
18:40 preaction you're trying to post a form using jQuery's post() method?
18:41 Alex342 yeah
18:41 Alex342 this is what my first shot was https://pastebin.com/tHWUX7pv
18:41 Alex342 but i dont know how to put that message on id
18:42 preaction the template gets rendered once, first. then it's just text
18:42 preaction url_for gets a URL, which doesn't help with posting form data, so that wouldn't work even if it did what you're trying
18:42 preaction jQuery post() takes a second parameter, an object of form data: $.post( "<%= url_for 'on_delete_message' %>", { id: message }, function () { ... } );
18:43 Alex342 i tried that. Didn t work. I guess i will try it now again
18:45 Alex342 yeah. When i press the button nothing happens
18:49 Alex342 $.post( "<%= url_for 'on_delete_message' %>", { id: message }, function ()    the id doesnt get that $message->id
18:52 Alex342 or you guys know a better way?
18:55 preaction look at what's being posted by using your browser's developer tools
18:56 preaction https://api.jquery.com/jquery.post/#jQuery-post-url-data-success-dataType <- this is the function you're using
18:59 Alex342 oh... found it...
19:00 Alex342 <a onClick="delete_message('$message->id');">
19:00 Alex342 $message->id is text there...
19:44 jberger for relatively small xml generation, is there a preference between concatenating strings vs using Mojo::Template?
19:44 jberger I suppose strings is probably less overhead
19:54 Grinnz I use either Mojo::DOM or Mojo::Template or another template system that can do xml escaping for me
19:55 stryx` joined #mojo
20:21 jberger that's part of it
20:21 petru joined #mojo
20:45 gordonfish joined #mojo
20:47 mishanti1 jberger: We've been using Mojo::Template for generating xml used with Twilio. Absolutely prefer doing that, rather than concatinating manually.
20:49 mishanti1 Actually, I'm at the point where my default template for new cpanfiles that emacs generate starts with `requires 'Mojolicious';`. Use it pretty much in all new projects, big or small.
20:49 jberger mishanti1: I'm pretty much the same way
20:49 jberger <3
20:49 mishanti1 I'll pretend that love was meant for me. :p
20:50 jberger always :D
20:51 mishanti1 :)
20:53 mishanti1 Do you plan on coming back to Norway any time soon?
20:55 jberger well I'm just hearing rumor of a Mojo track at NPW :-P
21:01 dhg joined #mojo
21:25 mishanti1 orly? Need to check that out.
21:33 mtj joined #mojo
21:35 trippeh joined #mojo
22:08 good_news_everyon joined #mojo
22:08 good_news_everyon [mojo] kraih pushed 33 new commits to master: https://git.io/v79lB
22:08 good_news_everyon mojo/master 9ccea47 Scott Wiersdorf: Add 'Mojolicious::Guides::Testing' tutorial. Resolves #1111
22:08 good_news_everyon mojo/master 36515ef Scott Wiersdorf: remove FIXME note
22:08 good_news_everyon mojo/master 2a9193b Scott Wiersdorf: fix typo
22:08 good_news_everyon left #mojo
22:10 jberger if I take a dom object, then get a sub-part of that object
22:11 jberger can I find for a direct descendent of that object?
22:11 pink_mist ->find('> ...') ?
22:11 jberger it seems that ->children works for direct children, but if I want to do ->children('child > grandchild') it doesn't seem to
22:12 jberger I didn't think relative selectors worked (yet)
22:12 pink_mist hmm, maybe I'm wrong
22:15 Grinnz ->find(':root > * > *') ?
22:15 jberger I thought that would work, but :root seems to mean the literal document root and not the relative root
22:15 Grinnz yes
22:15 Grinnz i was assuming one of those levels was starting at the actual root
22:16 jberger I have to start with the result of a previous ->at
22:16 Grinnz no chance you can combine the selector with the previous at?
22:17 Grinnz like you said i dont think theres really a "this" in terms of css selectors
22:17 jberger yeah
22:18 jberger I could combine it, but it wouldn't be very DRY :-P
22:18 preaction ->map( sub { $_->find( 'grandchild' ) } ) or something?
22:19 Grinnz an alternative would be something like ->children->map(sub { @{$_->children} })
22:19 Grinnz how wieldy that is depends what you're actually looking for
22:20 jberger preaction: the problem is that I don't want to find a deep descendant
22:21 jberger I'm parsing out an xmlrpc message, I'm trying to get just the toplevel hash/struct elements
22:21 jberger but of course there could be nested ones
22:21 preaction ->grep then?
22:22 jberger I think I have an idea
22:30 jberger ok that works, just successive ->children calls, more or less what Grinnz suggested actually
22:30 jberger I thought there was a sibling method, but it seems there are only precending and following
22:30 jberger preceeding
22:30 purl preceeding is, like, not intended to be a forward looking statement
22:31 Grinnz https://github.com/kraih/mojo/wiki/Upgrading#mojodom-renaming
22:34 jberger ah, right
22:34 jberger ok so I could do what I was thinking, but I'd need to check both preceding/following
22:35 * Grinnz ponders; are you a sibling of yourself?
22:38 jberger I don't know in what order they would occur
22:41 pirateFinn jberger: It was something TBSliver had mentioned to me when we were setting up my dev environment, he is better to ask on the deets than me
22:42 jberger there are only two things I can think of that Mojo might have problems with on native windows
22:43 jberger morbo is known to restart rather slowly, though we have recently added a pluggable system for morbo which should be able to help that
22:43 jberger other than that, the preforking servers don't work on native windows
22:43 jberger but the standard servers do
22:44 good_news_everyon joined #mojo
22:44 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/v79BW
22:44 good_news_everyon mojo/master f61e95c Sebastian Riedel: update Changes and fix some formatting quirks
22:44 good_news_everyon left #mojo
22:44 sri scottw++
22:44 jberger indeed scottw++
22:45 sri guide is live http://mojolicious.org/perldoc/Mojolicious/Guides/Testing
22:48 sri i did find a bug in the guide, so odds are there will be more
22:51 sri also found an easter egg https://github.com/kraih/mojo/commit/b574e2a226bdaf251d37c76339dc233bf0120dda#diff-4225acd1f3c54ec663e87419736a469aR710
22:59 jberger awwww
23:00 jberger me too
23:32 dikim joined #mojo
23:36 Lee joined #mojo

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