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

IRC log for #mojo, 2017-02-28

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

All times shown according to UTC.

Time Nick Message
00:05 howitdo joined #mojo
00:14 disputin joined #mojo
00:16 disputin left #mojo
00:49 aborazmeh joined #mojo
01:30 marty joined #mojo
01:33 miller joined #mojo
03:22 noganex_ joined #mojo
04:22 augensalat joined #mojo
04:24 dantti_laptop|2 joined #mojo
04:25 isomorph1smes joined #mojo
04:25 mikegrb_ joined #mojo
04:38 Dandre joined #mojo
04:41 marcus joined #mojo
04:41 bobkare joined #mojo
04:41 dantti_laptop|2 joined #mojo
04:41 augensalat joined #mojo
04:41 howitdo joined #mojo
04:41 PopeF joined #mojo
04:41 orev joined #mojo
04:41 tudorconstantin joined #mojo
04:41 irqq joined #mojo
04:41 bwf joined #mojo
04:41 PryMar56 joined #mojo
04:41 stryx` joined #mojo
04:41 castaway joined #mojo
04:41 gregf_ joined #mojo
04:41 mcsnolte joined #mojo
04:41 Pyritic joined #mojo
04:41 vicash joined #mojo
04:41 jabberwok joined #mojo
04:41 khfeng joined #mojo
04:41 kivilahtio joined #mojo
04:41 ashimema joined #mojo
04:41 eseyman joined #mojo
04:41 dboehmer_ joined #mojo
04:41 khamsin joined #mojo
04:41 stephan48 joined #mojo
04:41 batman joined #mojo
04:41 dotan_convos joined #mojo
04:41 dexteruk joined #mojo
04:41 jnbek joined #mojo
04:41 suede joined #mojo
04:41 geheimnis` joined #mojo
04:41 haarg joined #mojo
04:41 matt__ joined #mojo
04:41 Phil21 joined #mojo
04:41 da5id joined #mojo
04:41 meredith joined #mojo
04:41 cromedome joined #mojo
04:41 hahainternet joined #mojo
04:41 jnap joined #mojo
04:41 yuni joined #mojo
04:41 purl joined #mojo
04:41 jacobydave joined #mojo
04:41 litwol joined #mojo
04:41 sawtooth joined #mojo
04:41 xdg joined #mojo
04:41 plicease joined #mojo
04:41 jesk joined #mojo
04:41 Eke joined #mojo
04:41 mpapec joined #mojo
04:41 mbudde joined #mojo
04:41 Obbi joined #mojo
04:41 mat joined #mojo
04:41 msestak joined #mojo
04:41 schelcj joined #mojo
04:41 mishanti1 joined #mojo
04:41 jlaffaye joined #mojo
04:41 mattp_ joined #mojo
04:41 genio joined #mojo
04:41 elik joined #mojo
04:41 crab joined #mojo
04:41 kgoess joined #mojo
04:41 jberger joined #mojo
04:41 Zx3 joined #mojo
04:41 gabriel joined #mojo
04:41 VVelox joined #mojo
04:41 ribasushi joined #mojo
04:41 iamb joined #mojo
04:41 wardenm joined #mojo
04:41 a6502 joined #mojo
04:41 bpmedley joined #mojo
04:41 simcop2387 joined #mojo
04:41 zach joined #mojo
04:41 mtths joined #mojo
04:41 px80 joined #mojo
04:41 cstamas joined #mojo
04:41 mrallen1 joined #mojo
04:41 SmokeMachine joined #mojo
04:41 Gedge joined #mojo
04:41 Ralesk joined #mojo
04:41 nic joined #mojo
04:41 ksmadsen joined #mojo
04:41 janus joined #mojo
04:41 firnsy joined #mojo
04:41 hernan604 joined #mojo
04:41 oalders joined #mojo
04:41 Jonis joined #mojo
04:41 nicomen joined #mojo
04:41 Sebbe joined #mojo
04:41 HtbaaPi joined #mojo
04:41 abracadaniel joined #mojo
04:41 karjala joined #mojo
04:41 skaji joined #mojo
04:41 omega joined #mojo
04:41 cosimo joined #mojo
04:41 Andreas3 joined #mojo
04:41 kamyl_ joined #mojo
04:41 tianon joined #mojo
04:41 kwa joined #mojo
04:41 ranguard joined #mojo
04:41 gabiruh joined #mojo
04:41 Caldrin joined #mojo
04:41 garu joined #mojo
04:41 BinGOs joined #mojo
04:41 caeles joined #mojo
04:41 robinsmidsrod joined #mojo
04:41 tinita joined #mojo
04:50 diegok joined #mojo
04:50 kaare joined #mojo
04:50 noganex_ joined #mojo
04:50 bc547 joined #mojo
04:50 lari joined #mojo
04:50 CHYC joined #mojo
04:50 go|dfish joined #mojo
04:50 perlpilot joined #mojo
04:50 Lee joined #mojo
04:50 dave joined #mojo
04:50 spicyjack joined #mojo
04:50 charsbar joined #mojo
04:50 [vlad] joined #mojo
04:50 vytas joined #mojo
04:50 vinnix joined #mojo
04:50 Kundun joined #mojo
04:50 Bender joined #mojo
04:50 mtj joined #mojo
04:50 alilles joined #mojo
04:50 pink_mist joined #mojo
04:50 tempire joined #mojo
05:01 inokenty-w joined #mojo
05:04 dboehmer joined #mojo
05:05 user_ok joined #mojo
06:21 Vandal joined #mojo
07:26 salva joined #mojo
07:46 CHYC joined #mojo
07:47 AndrewIsh joined #mojo
07:50 dod joined #mojo
07:54 dod joined #mojo
08:07 trone joined #mojo
08:11 tudorconstantin I've resubmitted the PR, but instead of using the secrets as sample info to be stored in the config file, I put a dummy structure that could store a DB connection
08:20 dod joined #mojo
08:40 rshadow joined #mojo
08:42 sri tudorconstantin: reviewed and rejected i'm afraid
08:44 tudorconstantin Yes, I saw, I read your comments, thanks for taking the time to add them. I'll try to incorporate your observations and try again
10:18 sugar joined #mojo
10:36 irqq joined #mojo
10:52 sugar joined #mojo
11:05 kes joined #mojo
12:08 sugar joined #mojo
12:09 Lee joined #mojo
12:09 Vandal joined #mojo
12:40 foursixnine joined #mojo
13:11 osfabibisi joined #mojo
13:55 castaway joined #mojo
14:19 gizmomathboy joined #mojo
14:19 tyldis "reject" is such a harsh word. "Declined" or something would be much better
14:19 tyldis Oh well.
14:23 genio jberger: My wife's been having a hard time finding research positions, but she might have found a lecturer position at the university. :/   Funding is getting even harder to come by
14:28 gryphon joined #mojo
14:33 kaare joined #mojo
14:34 sugar joined #mojo
14:39 sri tyldis: english is not my native language, the difference between rejected and declined is completely unknown to me
14:39 PryMar56 joined #mojo
14:40 genio sri: in the end, the meaning is the same. "rejected" has, for some reason, a stronger negative connotation.
14:41 genio we're in touchy-feely land now though. "declined" is meaner than saying, "I'm sorry, but I don't think this is a good fit for our project."  etc.
14:41 pink_mist rejected in a sense says "this is shit and something we would never want", while declined says something like "this isn't bad at all, but not what we're looking for at the moment"
14:42 osfabibisi but both of them mean "no"
14:42 pink_mist indeed
14:44 genio "rejected" is still what RT uses, IIRC.  So, meh. If you explain the rejection, I don't exactly think it's a bad word to use.
14:45 genio But I also tend to be less annoyed by bluntness than others, so maybe don't listen to me. :)
14:52 asarch joined #mojo
14:52 * osfabibisi wonders if it's more polite to close a bug as LOLWONTFIX or LOLSHANTFIX
15:00 sugar joined #mojo
15:03 elrey joined #mojo
15:05 elrey Hey. I'm using mojo's get command - http://mojolicious.org/perldoc/Mojolicious/Command/get. there is example for get and post, is there any example for put and delete methods?
15:09 sri you just say PUT instead of PUT
15:09 sri umm
15:09 sri POST
15:09 sri ;p
15:10 genio heh
15:15 devnull joined #mojo
15:18 devnull joined #mojo
15:18 devnull Hello
15:36 rshadow joined #mojo
15:38 sugar joined #mojo
15:42 jberger genio :/
15:43 jberger it isn't going to get any better under a science denying, fact denying, flippantly cost-cutting administration
15:55 sh14 joined #mojo
16:01 sri now that coolo is on vacation i'll introduce minion at suse ????
16:07 mcsnolte joined #mojo
16:08 jabberwok rejected/declined makes me think of UK railway horns.  US trains go RRRRAAAAAAA or WOOOO ... UK trains go "be-boo" as if they were oh-so-politely excusing themselves
16:10 sri lol
16:26 sugar joined #mojo
16:45 coolo jabberwok: Chuggington is produced in the UK, they are very polite there
17:03 Grinnz re earlier discussion, "rejected" is what most ticket systems use, and pivotal uses it, but it does still sound harsh in those contexts
17:03 Grinnz so it's a bit of "coder speak" i guess that doesn't translate well to the masses
17:05 Grinnz especially for what mojolicious tends to do, which is not always to reject PRs but to close them pending a better solution
17:05 Grinnz github itself just says closed so that's alright
17:10 dod joined #mojo
17:17 dod joined #mojo
17:20 lluad joined #mojo
17:57 rshadow joined #mojo
18:07 rshadow joined #mojo
18:09 miller joined #mojo
18:11 asarch joined #mojo
18:24 tyldis "rejected" is even worse when you use it towards paying customers.
18:25 tyldis It was just a curiosity, as I've never understood why that term became the norm.
18:36 rshadow joined #mojo
19:01 sugar joined #mojo
19:01 tudorconstantin so, I've modified my previous rejected PRs to incorporate Grinnz and sri's observations. Can you guys please have a look at the diff and see if I should modify it more? https://github.com/tudorconstantin/mojo/commit/77c78324865685d6223bfc68cae0f7359e1065ea
19:02 sri tudorconstantin: what exactly are you trying to teach with "my $config = $self->app->config;"?
19:04 sri it's not clear to me from the description at all
19:04 sri like, is the expensive use of a helper intentional?
19:08 irqq joined #mojo
19:18 genio S3 is down, yet it still gets a green check mark in the AWS status page
19:19 tudorconstantin sri: is ther another way to access that config hashref?
19:20 tudorconstantin I usually put it in a shorter named variable when I need to access more than one config variable
19:20 sri tudorconstantin: $self->config?
19:20 purl it has been said that $self->config is write-only
19:20 sri most people just do "my $config = $self->plugin('Config');"
19:22 sri those examples are supposed to be educational, think some more about what you want to teach there
19:22 tudorconstantin ha, I just noticed in the docs that my $config = $app->plugin('Config');
19:23 tudorconstantin ok, I'm modifying it
19:25 tudorconstantin I think I was the subject of the golden hammer rule: I knew how to access the config from a controller, so I accessed it the same way from the app's startup sub
19:25 sugar joined #mojo
19:27 Grinnz sri: 14:11:53 — GumbyPAN CPAN Upload: SQL-Abstract-1.81_01 by ILMARI https://metacpan.org/release/ILMARI/SQL-Abstract-1.81_01
19:48 tudorconstantin this one? https://github.com/tudorconstantin/mojo/commit/dcc3074a8fe5a04da579a7a7512e94f9f3501130
19:51 pink_mist genio: https://twitter.com/awscloud/status/836656664635846656
19:51 genio pink_mist: hahaha.  alt-uptime
19:51 pink_mist :P
20:07 marty joined #mojo
20:37 rshadow joined #mojo
20:37 marty joined #mojo
20:38 stryx` joined #mojo
20:45 jnbek joined #mojo
20:46 marty joined #mojo
20:46 trax joined #mojo
20:49 trax I'm running into an issue with getting a set of dates from date picker via ajax. The ajax portion works and I'm able to retrieve them using $dates = $self->req->json. However, I'm not able to have any of the subroutines connected to the model run, stash variables and render.
20:50 trax I've tried with a combination of $self->render and $self->respond_to without any success
20:50 trax If I hard code the dates then everything works as expected
20:51 trax I'm doing something wrong but don't know where to start. Any pointers would be appreciated.
21:14 jberger trax can you make a minimal example?
21:15 jberger if you can get the data out of the json request I don't know what problem you're having
21:16 trax I think I got it working...
21:16 trax I'll get back to you if it doesn't
21:17 necrophcodr joined #mojo
21:17 necrophcodr Is the Mojo::JSON module considered mature?
21:17 Grinnz sure?
21:17 purl sure is purl
21:18 Grinnz no software is ever complete, but it's not experimental or anything
21:19 pink_mist no software is ever complete until it handles mail ;)
21:23 necrophcodr It just seems to handle data a bit .. Strangely. I guess it could be that it just _strictly_ conforms to the standard, as opposed to many web services
21:23 Grinnz such as?
21:23 necrophcodr `my $value = decode_json( "{ 'id': 'test' }" );`
21:23 Grinnz that's not valid JSON
21:24 necrophcodr that's what several parsers would believe it to be, but Mojo::JSON agrees with you
21:24 Grinnz as do all standard JSON parsers in perl
21:24 pink_mist (err, believe or agree?)
21:24 Grinnz they all consider that invalid JSON
21:25 lluad More to the point, the json spec considers it invalid.
21:25 Grinnz unless you use JSON::MaybeXS with relaxed mode
21:25 Grinnz but that's not default
21:26 Grinnz actually JSON::XS's relaxed mode doesn't even support it
21:26 Grinnz so you'd have to make sure to be using JSON::PP or Cpanel::JSON::XS
21:26 Grinnz looks like JSON::PP doesn't either
21:26 necrophcodr It's the correct behavior as well, it just means I have to somehow mangle data from web services to conform.
21:27 necrophcodr I really just wanted a confirmation that I wasn't being crazy ;)
21:27 jberger necrophcodr: can you contact the source of that data
21:27 jberger ?
21:27 Grinnz ah, allow_singlequote for JSON:PP or Cpanel::JSON::XS
21:27 Grinnz JSON::XS doesn't support that at all
21:27 necrophcodr jberger: i'm afraid not. The data is what it is. If it's incorrect, then I'll have to handle incorrect data.
21:28 jberger hmmmm, I wonder if a YAML parser would handle it :-P
21:28 necrophcodr I hope not, it's not valid YAML either
21:28 jberger or just listen to Grinnz and use a parser with the option
21:29 jberger necrophcodr: to most reasonable approximations JSON is valid YAML
21:29 necrophcodr Nah, I like my parsers to be reliable and correct. I'll rather slap the data into submission than let the code be unmaintainable and incorrect.
21:29 jberger but since YAML allows single quotes
21:30 Grinnz necrophcodr: use JSON::MaybeXS; my $decoder = JSON::MaybeXS->new(utf8 => 1, allow_singlequote => 1); # this will die if JSON::XS gets used; my $decoded = $decoder->decode($res->body);
21:31 Grinnz it's not really unreliable to do that, IMO
21:31 Grinnz it's at least clear what you're doing
21:32 Grinnz (I'd consider it more reliable than manually munging the data, anyway)
21:32 necrophcodr That's actually a lot cleaner than most fixes I've seen. Neat. Thanks for the help, man!
21:32 necrophcodr I'll see if I can make good use of it
21:33 Grinnz if any other part of your code is using JSON::XS, you may need an explicit 'use Cpanel::JSON::XS ();' before loading JSON::MaybeXS
21:33 Grinnz otherwise it's the default
21:33 Grinnz (yeah, JSON modules are a bit of a mess)
21:36 rshadow joined #mojo
21:37 jberger interestingly YAML::XS handles that document while YAML.pm throws an error
21:37 Grinnz oh yeah, if you think the JSON parsers are a mess
21:37 Grinnz YAML is a pit of discarded carcasses
21:38 jberger but I consider myself vindicated, that IS a valid YAML document
21:39 Grinnz next try YAML::Tiny and YAML::Syck
21:39 Grinnz bet you'll get different results
21:40 jberger YAML::Tiny croaks
21:40 jberger and YAML::Syck parses without error
21:40 jberger what a world
21:40 purl i guess a world is a pretty small IRC
21:41 * jberger hugs purl
21:41 purl jberger: get off me, you botvert!
21:41 pink_mist lol
21:41 Grinnz leont has some sort of vim extension that parses YAML with all four at once iirc
21:41 jberger reading the YAML spec it seems pretty clear that that SHOULD be valid YAML
21:42 preaction YAML.pm chokes on a lot, because it's not maintained until recently. YAML::Tiny is not a full YAML parser
21:42 pink_mist not surprised that ::Tiny fails ... have heard nothing but bad things about it
21:43 kgoess YAML::XS is the one to use, for sure. it's also has the benefit of understanding yaml 1.1
21:43 trax jberger: Apparently I can't have $self->respond_to and $self->render following each other. The page just won't render.
21:43 preaction YAML::XS uses libyaml from the python implementation, and is ingy's recommended version. i forget why he doesn't like libsyck
21:44 jberger trax: rendering more than once is at best undefined behavior
21:44 jberger and certainly is not recommended
21:44 jberger (respond_to is equivalent to render for this purpose)
21:44 Grinnz maybe it should be made an error to render more than once in a response chain?
21:45 trax jberger: Understood. How would you got about letting the ajax function that it was successful and render the template with lots of EP code in it?
21:45 Grinnz can't think of any reason that would be something you actually want to do
21:45 Grinnz but it can happen by accident
21:45 trax Grinnz: The documentation wasn't very clear about that, hence why I'm running into the problem
21:46 jberger trax you mean you want a quick response and then another response after some processing is done?
21:47 jberger in general you would just render the template
21:47 jberger HTTP is usually just request response
21:48 trax jberger: Well, I'm doing a bit of db processing when I get a set of dates. I would like to reload the page contents when this is completed. I was hoping that a success back to the the ajax function (location.reload) would do that.
21:48 trax This may happen multiple times with different dates
21:48 jberger sounds like you want to just cache results someplace honestly
21:49 trax or possibly not have a cache in place?
21:49 Grinnz thats not really what reloading the page is for
21:49 jberger and if you are doing it in ajax, why not just put a placeholder in and then replace the content with the result when it is done processing
21:49 jberger like Grinnz says, that isn't really a job for a page reload
21:51 trax now I'm off to learn how to leave a placeholder in javascript
21:51 jberger presumably the placeholder will just be in the original HTML
21:51 jberger but yeah, either way
21:52 Grinnz i'd suggest using a framework that makes this easy like knockout or whatever the new things are
21:52 Grinnz (in javascript)
21:52 * jberger likes Vue
21:52 trax Let me go take a look
22:03 jberger argh
22:03 jberger if trax comes back
22:03 jberger https://gist.github.com/jberger/1a53a665d36e6c94864761fd205f2ad3
22:03 jberger I hate when people ask a question and then quit
22:19 Jonis joined #mojo
22:22 necrophcodr left #mojo
22:34 marty joined #mojo
22:37 rshadow joined #mojo
22:39 stryx` joined #mojo
22:55 marty joined #mojo
22:57 sugar joined #mojo
22:57 PopeF What would you call an Amazon S3 client that uses Mojo::UserAgent as the backend? Mojo::S3?
22:58 lluad Right now I'd call it futile. :)
22:58 PopeF lluad, why do you say that?
22:58 lluad Because S3 is spectacularly down today.
22:58 PopeF oh, rightt
22:58 PopeF er, right!
22:59 PopeF except I can get into S3 just fine.
22:59 lluad I'm not sure that it just using Mojo::UserAgent is a good reason to put an S3 client under the Mojo:: namespace.
22:59 PopeF yeah, i can list my buckets, and i can upload.
22:59 lluad Not my call, obviously, but it's something I'd think about.
23:00 lluad Yeah, it's only US East that's dead as a dead thing.
23:00 PopeF Sure. Well, I just want a working name for right now, so I'll think of something
23:02 Grinnz PopeF: fyi, Paws has an experimental Mojo backend and experimental S3 support. i'm sure the maintainer would appreciate comments on both
23:02 PopeF Grinnz, excellent. I'll look at that.
23:02 Grinnz it's quite the distro though. be ready :)
23:03 PopeF I was just going to adapt Furl::S3 (which is what we use at work) to use Mojo.
23:03 Grinnz https://metacpan.org/source/JLMARTIN/Paws-0.31/lib/Paws/Net/MojoAsyncCaller.pm is sadly undocumented at the moment
23:03 Grinnz but it should return a Future, rather than the usual response object
23:04 PopeF ok
23:04 Grinnz https://metacpan.org/pod/release/JLMARTIN/Paws-0.31/lib/Paws.pm#CONFIGURATION how to set the caller to that
23:06 * Grinnz wishes the author would set up a #paws somewhere to chat
23:07 Grinnz he's pretty responsive by github or email though
23:08 marty joined #mojo
23:09 PopeF yeah.
23:29 marty joined #mojo
23:52 stryx` joined #mojo

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