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

IRC log for #mojo, 2017-09-19

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

All times shown according to UTC.

Time Nick Message
01:06 disputin joined #mojo
02:03 noganex_ joined #mojo
03:39 inokenty-w joined #mojo
03:55 aborazmeh joined #mojo
04:01 bianca joined #mojo
04:04 dboehmer_ joined #mojo
06:11 bianca joined #mojo
06:24 Vandal joined #mojo
06:40 robinsmidsrod joined #mojo
06:40 dod joined #mojo
06:43 AndrewIsh joined #mojo
06:50 robinsmidsrod joined #mojo
07:13 n16gel joined #mojo
07:19 bianca joined #mojo
07:43 trone joined #mojo
08:17 rshadow joined #mojo
08:18 geira joined #mojo
08:19 rshadow joined #mojo
08:27 coolo joined #mojo
08:33 dod joined #mojo
08:36 VVelox_ joined #mojo
09:09 bc547_ joined #mojo
09:50 bc547 joined #mojo
10:20 bianca joined #mojo
10:26 S joined #mojo
10:59 findow joined #mojo
11:01 tchaves joined #mojo
11:15 stomper joined #mojo
11:15 stomper sal
11:16 mib_00ko9o joined #mojo
11:44 bianca joined #mojo
12:09 itaipu joined #mojo
12:40 bianca joined #mojo
12:55 tcohen joined #mojo
12:55 iamb joined #mojo
13:17 gizmomathboy joined #mojo
13:27 marty joined #mojo
13:30 maschine joined #mojo
13:34 jnap Grinnz: my concern with DRM i the browser is more about what its going to be used for going forward , more than what it's used for (or wanted for) today
13:35 jnap building it it grants it a type of legitimacy.  And the wouldn't even allow the 'security researcher can try to break it' exception.
13:36 jnap in a few years it will be normal for most websites to use this, even plain old content sites already covered by copyright rules :(
13:38 dabudabu Is it that hard to circumvent?
13:39 haarg Grinnz: it's not the only way the media industry can work, but it is the only way they are willing to work
13:39 haarg the thing standardized in EME can't really be used for anything else
13:40 haarg and the eme stuff has been in browsers for years.  accepting it as a standard changes almost nothing.
13:40 haarg it isn't surprising that the eff resigned from the w3c though.  opposing this was the only reason they joined to begin with.
13:55 bianca joined #mojo
14:02 gryphon joined #mojo
14:07 hkclark joined #mojo
14:18 karjala_ joined #mojo
14:24 gryphon joined #mojo
14:26 bianca joined #mojo
14:30 ChmEarl joined #mojo
14:58 petru joined #mojo
15:04 bianca Hi, I am doing a post request from a page in mojolicious and I want to have some validations in the backend and then if those fail to show an alert on the same page that made the request. I know I can use JS for that, but if I'm using a form in perl, what's the best way to do that? (I have a form_for ... method => POST) So I think I want something like reload
15:04 bianca or redirect_to myself
15:07 maschine could you use AJAX to send the form data to your validation routine, and then have it respond with the normal DOM changes that alert you to the improper values?
15:07 maschine You don't have to reload the entire page to send data to your server - it doesn't really matter if you're using Perl in the backend or not.
15:08 Grinnz you'll have to post to yourself and have the page show the errors. in my experience that gets a lot messier than similar posts in JavaScript
15:08 bianca Grinnz what do you mean by post to yourself?
15:09 disputin joined #mojo
15:10 bianca but you're probably right, not realoading is better than reloading anyway
15:12 maschine I've never tried it but can you apply 'onchange' to form elements other than dropdowns?  You wouldn't have to post the whole form but you would have to use Javascript
15:12 bianca maschine you mean send requests for validating each field?
15:12 maschine yes
15:15 bianca I think it would be too much trouble, you would have a whole lot of requests
15:15 maschine I'd like to try that actually.  I don't like how my current form validation is set up, and I can't reuse much of the code.
15:15 maschine you would have one per form element, yes, but how fast do people fill out forms..
15:16 maschine and you are only responding with some DOM changes anyway, not a whole page refresh.
15:16 bianca right... so when users click outside the form element, you would have a request to validate?
15:17 bianca that doesn't sound too bad actually, it's only the amount of routes you would need that scares me
15:18 bianca I might try that
15:18 bianca thanks :D
15:19 maschine yep
15:20 maschine you could probably do it with one route, using a placeholder to determine which form element you are validating
15:20 maschine something like /validiate/:elementid, where your javascript request fills that out
15:21 bianca oh yeah that makes sense
15:35 Grinnz could work, but i tend to prefer either the responsiveness of having validation on the javascript side, or only when the form is submitted
15:37 maschine sri had some good examples for doing it when the form was submitted, which is currently what mine are based on
15:45 bianca I actually only need one validation in the backend, the rest can be JS, so I'm going to use both approaches
15:45 bianca and then do all validations again when form is submitted just to be on the safe side...
15:50 gregf_ joined #mojo
15:53 itaipu joined #mojo
16:06 sh14 joined #mojo
16:23 maschine yeah, I was thinking that - you'd want to recheck passwords etc. on submission in case somebody tries to spoof the form
16:24 petru joined #mojo
16:28 kes joined #mojo
16:29 kes Hi. why hidden_field do not allow: hidden_field 'id', value => 3
16:29 kes ?
16:30 kes it looks reasonable to allow that, do not?
16:33 Grinnz isn't that just hidden_field id => 3; ?
16:33 disputin joined #mojo
16:33 Grinnz it takes a name, then a value, then pairs of attributes, thats it
17:37 bianca joined #mojo
17:39 dod joined #mojo
18:05 rshadow joined #mojo
18:30 mishanti1 bianca: I know I'm a little late to the party here, but there are some _really_ good javascript validation-libraries out there. validate.js, verify.js, parsley.js, etc.
18:31 bianca cool, thank you :D I'll take a look at those
18:31 mishanti1 No problem. :)
18:34 petru joined #mojo
18:47 jberger there are some very reasonable vanilla js and even html5 validations too
18:48 jberger oh but you said it has to be validated on the backend, so nevermind
18:49 bianca only the username needs to be validated in the backend, since I have to check if it's taken or not
19:10 romel joined #mojo
19:10 litwol joined #mojo
19:10 litwol Hello
19:10 purl privet, litwol.
19:35 wikkit joined #mojo
20:29 maschine can I 'destroy' parameter key/value pairs after I'm done with them?  Like removing a value from a hash?
20:32 maschine nevermind I found it :)
20:32 maschine $params->remove('foo');
20:39 maschine it's too bad you can't use it in list context - $params->remove('foo', 'bar', 'baz');
20:42 pink_mist $params->remove($_) for qw/ foo bar baz /;
20:51 maschine nice!  thanks :)
21:02 disputin joined #mojo
21:51 gryphon_ joined #mojo
22:38 sri i can't believe someone thought this was a good idea :O https://gitlab.com/gnachman/iterm2/issues/6050
22:41 nicomen ;-D
22:45 Grinnz D:
22:49 pink_mist at least the developer was quick to change the default and put out a new release for that
22:49 pink_mist (not as quick as sri often is, but almost nobody is :P)
23:08 jberger I was surprised to hear that Ansible Tower was open sourced last week, mostly because I know there are ansible fans here and I was surprised no one had mentioned it
23:10 mattp_ jberger: huh really
23:10 mattp_ link?
23:11 jberger https://github.com/ansible/awx
23:11 jberger https://www.jeffgeerling.com/blog/2017/ansible-open-sources-ansible-tower-awx
23:12 mattp_ thanks
23:13 mattp_ i wonder why they renamed it
23:14 mattp_ speaking of cm/orch tools.. sri you work at suse dont you?
23:29 mattp_ was just wondering you encounter/are aware of the saltstack datacenter work suse partnered with them to do
23:50 jberger I'm assuming (as most of these things are) that the internal name is never what the product name is
23:50 jberger product names come from marketing/sales and are tested etc
23:50 jberger devs were building the tool long before it got to that state
23:56 vicash most likely because AWX and AWS sound similar and S and X are just next to each other on the keyboard...

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