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

IRC log for #mojo, 2017-06-05

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

All times shown according to UTC.

Time Nick Message
00:00 stryx` joined #mojo
00:36 mattp_ sri: it ... probably wont matter much
00:37 pink_mist mattp_: hm? which "it"?
00:37 mattp_ pink_mist: not bothering to clarify p5/p6 in a p6 book
00:38 pink_mist if there's no mention at all that it's about perl 6, it's not a good move
00:39 mattp_ i get it
00:39 mattp_ im saying the ship has sailed
00:41 pink_mist being annoyed at it is still a reasonable response
00:44 Grinnz how far the ship sails doesn't change that the name is aggravating and misleading
00:44 Grinnz mistakes like that just make it worse
00:52 kiwiroy joined #mojo
00:56 tchaves joined #mojo
01:07 PryMar56 joined #mojo
01:26 aborazmeh joined #mojo
02:45 noganex_ joined #mojo
03:38 kiwiroy joined #mojo
04:04 dboehmer_ joined #mojo
04:07 inokenty-w joined #mojo
05:08 _Janos joined #mojo
06:26 ashimema joined #mojo
06:45 AndrewIsh joined #mojo
06:54 dod joined #mojo
06:59 dod joined #mojo
07:05 Vandal joined #mojo
07:17 trone joined #mojo
07:20 kiwiroy joined #mojo
07:25 ladnaV joined #mojo
07:52 dod joined #mojo
08:28 CHYC batman: I'm back. Thank you again for the feedback. If both you and sri say that a structural redesign is in order, then responding to each of your points is moot with respect to getting the PR passed.
08:30 CHYC In terms of the actual PR, I like it less and less. The current behaviour reminds me of the old days when I did catalyst and having to code defensively around the possibility of multiple input values. I didn't particularly enjoy doing that and since Mojolicious handles it so well without validation, it seems like changing the default behaviour of the validation output rather than bandaiding it would be the
08:30 CHYC nicer long term solution.
08:32 rshadow joined #mojo
08:33 CHYC But that's just my opinion. I'd be the first to admit there are better coders here on this channel, and I have no hidden agenda to see my name on the contributors' list. All I'm after is a nice way of forcing a list in validation output, even for one value. If someone can see a nice way of doing that, I'd be very happy :)
09:23 CandyAngel joined #mojo
09:24 CandyAngel Is Mojo::IRC a decent example of how to make a TCP client using Mojolicious?
10:22 Petru joined #mojo
10:23 nic He's the only person I've seen discussing TCP here, so that would be the example I'd reach for
10:36 dod joined #mojo
11:01 sri CHYC: batman said recently that he will need the feature too and would be working on it too
11:03 sri and i think i might have a reasonably good implementation for Mojo::DOM <form> value extraction
11:03 sri https://gist.github.com/anonymous/0f019916164e9abab4241b96c342d203
11:05 aborazmeh joined #mojo
11:06 sri actually found a bug in the current Mojo::DOM::val code with it
11:06 sri which was <select> value extraction not respecting <option selected disabled>
11:09 tchaves joined #mojo
11:18 CHYC sri: That's good to hear.
11:39 stryx` joined #mojo
11:59 Petru joined #mojo
12:03 CandyAngel Thankies nic :)
12:06 CandyAngel left #mojo
12:06 sri CandyAngel: it kinda depends, i think Mojo::IRC only has a non-blocking API
12:07 sri while modules like Mojo::UserAgent actually allow emulating a blocking API
12:08 Petru joined #mojo
12:15 gryphon joined #mojo
12:32 CandyAngel joined #mojo
12:36 CandyAngel sri: I don't think a blocking API would be useful for this usecase. It is a long-lived connection where (I believe) I can receive any packets at any time
12:38 CandyAngel As usual, I'm using Mojolicious to do non-webby things.. because it makes it easier to do so :P
12:40 batman Mojo::IRC is only non-blocking because of the nature of IRC. I don't see how a blocking API would make sense...
12:41 CandyAngel Maybe if it was receive only?
12:43 pink_mist CandyAngel: still no idea how a blocking api makes sense
12:43 pink_mist CandyAngel: but you said you didn't think a blocking api would be useful anyway, so what's the issue?
12:44 CandyAngel Oh, I was commenting on Mojo::IRC being blocking. It might work in some circumstances (like it only responding to input, like a HTTP server does)
12:44 pink_mist CandyAngel: IT'S NOT BLOCKING
12:45 CandyAngel I know
12:45 pink_mist <CandyAngel> Oh, I was commenting on Mojo::IRC being blocking. <-- then don't say that
12:45 CandyAngel Sorry, I wasn't clear on what I meant (the possibility of it having a blocking API)
12:46 batman You could have a while loop that reads from a socket and acts on it, but then you have a bunch of other CPAN modules you can use instead I guess...
12:47 CandyAngel Kind of like saying "Oh, I was commenting on Mojo having signatures"
12:48 perlpilot joined #mojo
12:49 CandyAngel It doesn't, but if the discussion was about adding them, it would be reasonable sentence, right?
12:54 pink_mist I would say "getting" so it's not ambiguous
12:54 batman Just stop :/
12:58 Petru joined #mojo
13:02 rshadow joined #mojo
13:04 CandyAngel Sorry batman. Thanks for Mojo::IRC though, it is a very useful "template" for what I am working on :)
13:05 batman cool! let us know if you have any further questions
13:05 batman i mostly only make non-blocking apis, and then change it to blocking later on when i see that it makes sense
13:06 batman sri: what do you think about using "filters" to implement first/last/array?
13:06 CandyAngel That makes sense
13:07 batman i tried to do that at work, but the only thing that didn't work was forcing into an array...
13:07 sri batman: my original proposal was magical built-in filters
13:07 batman can i see?
13:07 sri no code
13:07 batman ok. but then i will have a look at using filters for that now.
13:07 CandyAngel I'm planning on uploading this module I'm working on (client for a chat service). I can link it when I do so you can have a looksee
13:08 batman can i create a branch for it?
13:08 CandyAngel See what you indirectly helped create :P
13:08 CandyAngel I apologise in advance.
13:08 batman hehe
13:09 sri batman: i don't think actual filters can do it, i just meant a flag set like a filter
13:09 sri but the code would be outside the filter system
13:10 batman oh. i would like to try to use the filter system
13:11 CandyAngel Oh, do I need to do anything to upload a Mojo::ServiceName module?
13:11 CandyAngel As in, get permission or something like that?
13:12 batman CandyAngel: yeah, just ask here.
13:13 batman most of the time, it's ok. but it's nice to ask in case it would collide with future core modules
13:13 batman it probably won't in your case though.
13:14 * CandyAngel nods
13:14 CandyAngel Will do, thankies
13:24 maschine2 joined #mojo
13:31 Pyritic joined #mojo
13:36 _Janos joined #mojo
13:46 sri how do we feel about :matches() support in Mojo::DOM?
13:47 sri i just added it as an experiment and am wondering if i should commit it as experimental
14:03 batman i don't get how to add the first/last/list stuff with the existing api... the only thing i would like is to force array refs in output(), but i can't have empty array refs there, like i want
14:10 batman http://dogfood.convos.by/paste/c91ab90964479c498d53/149667183211392
14:10 batman ^ not sure if that's any better :/
14:12 sri pretty ugly
14:13 batman yeah. doesn't feel right :(
14:14 jberger +1 for :matches()
14:15 jberger sorry I haven't had a chance to look more at the :scope stuff, I've still got work outstanding from PTS and I have TPC::NA rapidly approaching :s
14:15 kiwiroy joined #mojo
14:15 jnap I'd find both handy for Template::Lace FWIW
14:17 sri that would also mean making :not() half experimental, for compound selector support
14:17 sri which it unofficially already had
14:17 CHYC batman: I also think your solution, when supplying "list" will have a true [] output when nothing is supplied in required (which is why https://github.com/kraih/mojo/pull/1096/files#diff-ea8a39c17a3297cc4c5cc85000fae422R113)
14:17 zen .win 15
14:18 jberger sri: I see no reason to not to make a special statement on that
14:18 batman CHYC: but i want that.
14:18 batman i think my usecase does not fit the validator scope
14:19 jberger "while unofficially the :not() selector supported compound selectors, its official support is now experimental"
14:19 batman i think i'll stop thinking about the output formatters. i managed to make a quite readable version @work without it
14:22 itaipu joined #mojo
14:23 sri found another nasty edge case in form extraction
14:23 sri <select><optgroup disabled><option>A</option></optgroup></select>
14:24 sri umm
14:24 sri <select><optgroup disabled><option selected>A</option></optgroup></select>
14:24 sri that
14:25 gregf_ joined #mojo
14:32 gizmomathboy joined #mojo
14:32 CandyAngel left #mojo
14:32 jnap sri: yeah and I've been spending a lot of quality time with all the form stuff added to html5 :)
14:33 jnap its a bigger job here than I originally thought
14:35 good_news_everyon joined #mojo
14:35 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vHVZh
14:35 good_news_everyon mojo/master 542af30 Sebastian Riedel: add support for <form> elements to Mojo::DOM::val and support for :matches pseudo-class to Mojo::DOM::CSS
14:35 good_news_everyon left #mojo
14:35 sri i think this might work now
14:37 good_news_everyon joined #mojo
14:37 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vHVnU
14:37 good_news_everyon mojo/master c45e783 Sebastian Riedel: fix typo in example
14:37 good_news_everyon left #mojo
14:38 sri it does require a lot of code
14:38 sri so, the big question now is if that's in scope for Mojo::DOM
14:39 jberger once we get :has though, it will totally be worth it
14:39 sri (talking about form extraction)
14:39 jberger I think its in scope
14:39 jberger oh
14:39 jberger no opinion on that
14:39 sri :matches and :not cost like one line
14:41 Pyritic joined #mojo
14:42 jberger you know, the form stuff would be a really nice to have in combination with something phantom-like
14:42 jberger gods I wish I had time to play with headless chrome
14:42 jberger what I really need is for work to need that I guess
14:52 sri argh, now i'm unsure again if we want it in core :S
14:55 sri was thinking of adding a Test::Mojo::submit_ok next
14:55 sri but maybe this is all going too far again
15:00 jberger since I don't do a lot of forms lately, what is a use-case? how might someone use this?
15:01 jberger (this isn't an accusation, just facilitating discussion)
15:02 sri automation
15:02 purl automation is great
15:02 sri with Mojo::UserAgent
15:03 sri request site, grab current form values, merge with your own, submit
15:03 sri to easily grab XSS tokens and the like
15:04 kaare joined #mojo
15:06 sri well, i'm not going to fight for it
15:06 good_news_everyon joined #mojo
15:06 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vHVlA
15:06 good_news_everyon mojo/master 861193d Sebastian Riedel: remove support for <form> elements from Mojo::DOM::val again
15:06 good_news_everyon left #mojo
15:11 jberger maybe post it as a gist and someone will make a CPAN module out of it?
15:11 jberger we don't have a role-like composition for DOM yet ...
15:11 jberger someone could make that too
15:11 jberger follow my pattern from Test::Mojo::WithRoles
15:17 zivester joined #mojo
15:19 jberger oh, right, in combination with $ua->post
15:19 jberger err, $ua->post($url, form => $form)
15:19 jberger hmmm, I do actually rather like that
15:19 jberger I dunno, its up to you
15:19 jberger I had been thinking about it mostly from a testing standpoint
15:20 PryMar56 joined #mojo
15:27 PryMar56 joined #mojo
15:28 CandyAngel joined #mojo
15:33 CandyAngel Can I use IOLoop->delay to send a series of packets one-at-a-time?
15:35 jberger CandyAngel: how are you sending these packets? is there a drain callback?
15:36 CandyAngel I am using "$stream->write($bytes); $stream->write($bytes); ...", which causes them to all be concatenated and I think this is confusing the recipient. I could use the $stream->write($bytes, $cb), but it would be pretty nested..
15:37 jberger yes, that's a drain callback
15:37 jberger so yeah, use that to trigger the Delay to progress
15:38 CandyAngel Oh I see. Sorry, now you've said that I can see where what I want is in the documentation >.<
15:39 CandyAngel Thank you
15:41 jberger np
15:43 sri for every drain callback there's also a drain event
15:43 sri which might be easier to use than recursion
15:43 sri the drain callbacks are actually just ->once(drain => sub {...}) internally
15:45 CandyAngel So it might be cleaner to $stream->on(drain => sub {$delay->begin}) and then remove it when the delay finishes?
16:15 itaipu joined #mojo
16:22 rshadow joined #mojo
16:30 bwf joined #mojo
17:01 cheako joined #mojo
17:17 oalders joined #mojo
17:21 trone joined #mojo
17:22 sri jberger: re form extraction... stop flip flopping! ;p
17:28 dod joined #mojo
17:28 itaipu joined #mojo
17:44 zivester joined #mojo
18:13 karjala_ joined #mojo
18:41 cheako joined #mojo
18:45 itaipu joined #mojo
18:57 itaipu joined #mojo
18:58 maschine2 minion <3 :)
18:59 maschine2 Anyone have an example of running a minion job after a set time?  Such as, deleting a file after 24 hours or something?
19:02 sri we've been arguing about adding a scheduler feature, but most are fine with just using cron to enqueue the job
19:05 maschine2 I could do that, but I want it to be set to a time frame after the user creates the file.
19:08 preaction run a job every X time period that cleans up files older than 24 hours
19:10 maschine2 yeah..  I'll have to learn a bit more about cron jobs
19:14 jberger zomg github is DOWN, everybody panic!
19:14 preaction when in danger or in doubt, run in circles, scream, and shout
19:14 pink_mist https://status.github.com/ yep, seems pretty major
19:16 jberger do you think everyone that could fix it is watching whatever Apple infomercial is currently being shown?
19:16 preaction the WWDC?
19:16 purl the wwdc is the Apple WorldWide Developer's Conference or Why Would Dogbert Care or close personal friends of Steve or World Wide Dick Comparison or What Would Jesus Code?  Answer: A spell checker! or Where's Waldo District Convention or "What Would Darwin Code?  Answer: A faith-based religion!" or
19:17 preaction ... is there a way i can get purl to ignore _me_?
19:18 pink_mist purl: pay no attention to the preaction behind the curtain
19:18 purl pink_mist: sorry...
19:18 pink_mist guess that didn't work, sorry preaction
19:18 sri wwdc keynote seems pretty underwhelming
19:19 preaction i heard something about stopping autoplay video. that's all the whelming i need
19:19 pink_mist (on a side not, wouldn't "what would jesus code" be "wwjc" rather than "wwdc"?)
19:19 pink_mist *side note
19:20 preaction What Would Doug Code? Well, I don't like the invite the comparison, but...
19:26 Grinnz well, +q purl!*@* :P
19:26 preaction i'm apparently in a minority of 1 of absolutely despising that bot...
19:26 Grinnz it's amusing, but also quite annoying
19:27 Grinnz it doesn't help that #p5p has two other bots that also like to respond to the same queries
19:30 hobopancake joined #mojo
19:35 jhawley031 joined #mojo
19:38 pink_mist jberger: https://status.github.com/messages should be fixed now
19:39 jberger yeah, I'm seeing that too
19:39 jberger I swear someone was watching the apple thingy and bumped something
19:39 pink_mist hehe
19:39 jberger sri: for being underwhelming it seems to have monopolized my timeline
19:40 arcanez jberger: it's Apple
19:40 preaction you can mute keywords and tags
19:40 preaction also, people are allowed to like things
19:40 arcanez I want a 15" MBP without the touchbar, looked like only 13" has that
19:40 jberger certainly people are allowed to like things
19:41 sri arcanez: me too ;p
19:41 jberger I find it amuzing that they are all staring at a screen waiting to see what they will like tho
19:42 Intern42 joined #mojo
19:43 hobopancake joined #mojo
19:45 Intern42 left #mojo
19:46 Intern42 joined #mojo
19:47 jabberwok joined #mojo
19:50 jhawley031 joined #mojo
20:00 itaipu joined #mojo
20:36 cheako joined #mojo
20:36 Pyritic joined #mojo
20:53 karjala_ joined #mojo
20:53 psazdar142 joined #mojo
20:57 ryanc joined #mojo
20:59 ryanc left #mojo
21:33 eseyman joined #mojo
21:47 tchaves joined #mojo
22:02 cheako joined #mojo
22:12 good_news_everyon joined #mojo
22:12 good_news_everyon [mojo] kraih tagged v7.33 at f67f24f: https://git.io/vHw4W
22:12 good_news_everyon left #mojo
22:14 pink_mist ohh, new version? =)
22:14 * pink_mist waits for it to hit cpan
22:14 good_news_everyon joined #mojo
22:14 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vHw4r
22:14 good_news_everyon mojo/master c8e44a9 Sebastian Riedel: bump version
22:14 good_news_everyon left #mojo
22:20 arcanez ain't nobody got time for dat (waiting for it to hit cpan)
22:21 pink_mist it already did :P
22:21 pink_mist and I already updated
22:53 bwf joined #mojo
22:56 cheako joined #mojo
23:20 Pyritic joined #mojo
23:30 tchaves joined #mojo

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