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

IRC log for #mojo, 2017-12-13

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

All times shown according to UTC.

Time Nick Message
00:12 tardisx joined #mojo
00:20 Ya_ALLAH_Ya_Muhmd joined #mojo
00:20 Ya_ALLAH_Ya_Muhmd left #mojo
01:19 mib_ihf14m joined #mojo
01:21 exp-innit joined #mojo
01:40 Ya_ALLAH_Ya_Muhmd joined #mojo
01:40 Ya_ALLAH_Ya_Muhmd left #mojo
02:20 Grinnz jberger: that username guy on reddit is making good use of his jump-to-conclusions mat
02:20 Grinnz I'm pretty sure I've seen some weird comments from him before
02:22 jberger I mean, what that just based on being involved in a project with a .us address? indeed one that is used for a cutesy name?
02:22 jberger that's madness
02:24 Grinnz Madness?!
02:24 purl Our house, in the middle of our street.
02:24 Grinnz purl: coulda been better
02:24 purl Grinnz: huh?
02:26 jberger https://www.youtube.com/watch?v=KU7_G2grxJE
02:35 pirateFinn joined #mojo
02:59 ilbot2 joined #mojo
02:59 Topic for #mojo is now 🍩 nom nom | http://mojolicious.org | http://irclog.mojolicious.org | http://code-of-conduct.mojolicious.org
03:24 Ya_ALLAH_Ya_Muhmd joined #mojo
03:24 Ya_ALLAH_Ya_Muhmd left #mojo
03:41 Ya_ALLAH_Ya_Muhmd joined #mojo
03:41 Ya_ALLAH_Ya_Muhmd left #mojo
03:48 aborazmeh joined #mojo
04:14 Ya_ALLAH_Ya_Muhmd joined #mojo
04:27 jamesaxl joined #mojo
04:29 Leffe joined #mojo
04:50 Ya_ALLAH_Ya_Muhmd joined #mojo
04:50 Ya_ALLAH_Ya_Muhmd left #mojo
05:05 mohawk jberger, noice
05:05 jberger great movie
05:05 jberger one of my favorites
05:05 mohawk and how FORTUNATE that it's just coming to xmas
05:05 mohawk aka movie time
05:13 Seth joined #mojo
05:25 mib_yve3ic joined #mojo
05:33 Leffe joined #mojo
05:36 aborazmeh joined #mojo
05:37 jberger Hooray, the role article! https://twitter.com/joelaberger/status/940817820316782593
05:44 mohawk #winning
05:45 mohawk jberger, inheritence -
05:48 mohawk just a thought - mojo roles could override "does" to support '+' after all?
05:50 Grinnz ->does with a shortened name wouldn't make any sense, because it would require you to know what the original class name was
05:50 Grinnz jberger: "This keyword tells the role that it can only be composed into a class that provides a find keyword." second 'keyword' should be 'method'
05:51 mohawk jberger, superb work as always!
05:56 Grinnz jberger: nicely covered
05:56 Grinnz i would add one other important different of roles from subclassing, in that a role can't be instantiated on its own
05:57 Grinnz hmm, i wonder if Mojo::Base should provide a does method, so that checking ->does on a class that hasn't used any roles works (and just returns false of course)
05:57 Grinnz problem is then Role::Tiny wouldn't install its ->does method
05:58 Grinnz here's Moo's for comparison https://metacpan.org/source/HAARG/Moo-2.003004/lib/Moo/Object.pm#L61-68
05:59 Grinnz kind of weird logically to make it all just work
06:01 Grinnz it could just fall back to Role::Tiny::does_role like Moo::Role does
06:09 disputin joined #mojo
06:56 dod joined #mojo
06:56 exp-innit joined #mojo
07:03 dod joined #mojo
07:05 geospeck joined #mojo
07:05 chandwki joined #mojo
07:18 jkp joined #mojo
07:34 jkp joined #mojo
07:34 jkp_ joined #mojo
07:40 Vandal joined #mojo
07:43 exp-innit joined #mojo
08:02 disputin joined #mojo
08:21 Jonis jberger:  good work on the articles! interesting reads :)
08:24 schelcj joined #mojo
08:30 karjala_ joined #mojo
08:31 jkp joined #mojo
08:33 inokenty-w joined #mojo
08:52 jkp joined #mojo
09:00 Kharec joined #mojo
09:00 trone joined #mojo
09:14 disputin1 joined #mojo
09:14 Leffe joined #mojo
09:15 disputin joined #mojo
09:15 jamesaxl joined #mojo
09:21 trone joined #mojo
09:22 sri comrade jberger: looks like we are burned, better get rid of that .us domain!
09:23 sri oops, that was meant for #mojo-core
09:28 Kharec left #mojo
09:29 Kharec joined #mojo
09:32 rcz How do I get the absolute path to my application to ensure I always pick the right path to a file with Mojo::File?
09:32 sri it's funny how conspiracy nuts still manage to look like nutjobs on reddit in a world this full of actual conspiracies
09:33 sri rcz: app->home->realpath?
09:33 sri ap->home should work fine on its own though, even if it ends up relative
09:33 sri *app
09:35 rcz sri: ah, thanks!
09:36 trone joined #mojo
09:36 sri hmm, now that you mention it, that seems to be a hole in the docs
09:37 sri that should really be mentioned somewhere, maybe even the tutorial
09:38 rcz tbh I've glanced over most of it, but I'm guessing app is passed to controllers?
09:39 rcz I think most of the documentation is fine, some of it is just hard to find
09:41 sri added an issue so we don't forget https://github.com/kraih/mojo/issues/1162
09:42 sri $c->app->...
09:42 sri http://mojolicious.org/perldoc/Mojolicious/Controller#app
09:44 rcz sri: sorry, gotcha :)
09:57 Kharec joined #mojo
10:21 rcz Finally got my app to receive the correct requests from Apache with ProxyPass. Now, however, files in /public/* are no longer being served, they are being resolved by the router, resulting in a 404. How do I let Mojo handle this sanely (instead of serving files with httpd)?
10:29 itaipu joined #mojo
10:51 dod joined #mojo
11:01 tchaves joined #mojo
11:18 Kharec left #mojo
11:24 Kharec joined #mojo
12:25 marty joined #mojo
12:32 kes joined #mojo
12:32 kes Hi. On this page: http://mojolicious.org/perldoc/Mojolicious/Plugin/TagHelpers#stylesheet
12:33 kes you say that: %= stylesheet '/foo.css'
12:33 kes will generate
12:33 kes <link href="/path/to/foo.css" rel="stylesheet">
12:33 kes but there is no description how to setup that "/path/to"
12:34 kes How to setup "/path/to" for the stylesheet?
12:35 kes or it this a typo and I should write
12:35 kes %= stylesheet '/path/to/foo.css'
12:35 kes ?
13:03 Jonis have you tried it?
13:03 purl You know, the workins of pants lend themselves to empirical research.
13:04 ghenry joined #mojo
13:08 jberger sri shhhhhhhhh
13:08 jberger Jonis glad you like them
13:08 Jonis :D
13:08 CandyAngel Morning jberger
13:12 jberger CandyAngel o/
13:23 sri morning comrade
13:23 jberger and to you comrade
13:23 jberger Grinnz: fixed, thanks
13:23 jberger (at least the typo)
13:31 jberger and now added a sentence about not being able to instantiate roles
13:31 jberger I swear I had something like it on a previous draft
13:31 jberger closer to the "what is a role" section
13:31 jberger but it must have gotten lost in revision
13:35 jberger sri: so how are we and all of our fellow .us domain owners going to spy on people today?
13:35 jberger bwahahahahaha!
13:35 * jberger strokes hairless cat
13:38 kes Hi all, again. I see it is morning on your side now. Maybe you did not see my question about stylesheet (asked an hour ago)  about possible typo in DOC. May you suggest me how to setup "/path/to"?
13:40 pink_mist that'd be the base url for your app
13:40 pink_mist pretty sure I've seen you work with the base url before
13:41 jberger that looks like a typo in the documentation to me
13:41 jberger but I could be wrong if there's something else going on
13:43 kes so I open new issue on this. OK?
13:44 jberger I notice the same usage in the javascript helper
13:44 jberger ^^ documentation for the javascript helper
13:46 kes yes. And also has no description about what is '/path/to'... ((
13:46 kes This '/path/to' every where through document
13:46 jberger that's usually just a documentation convention meaning you can pass a path
13:48 kes if so it should be like: %= stylesheet '/path/to/foo.css'
13:48 kes in current state it makes confusion.
13:48 pink_mist I'm pretty sure it's the base url of the app
13:49 pink_mist I could certainly be wrong, but to me it makes sense that way
13:49 pink_mist it should certainly be explained though, if that's the case
13:49 jberger pink_mist: you mean, for application embedding?
13:49 pink_mist yes
13:50 jberger even if that were the case it would be confusing to include that in the TagHelpers documentation
13:51 jberger I'll just fix it that way and if sri disagrees I'll fix it some other way
13:51 kes thank you jberger
13:54 jberger hmmmm, ok it is more complicated than that
13:54 jberger searching for /path/to in that documentation
13:54 jberger clearly it is being used for routes by name too, which makes sense
13:54 jberger say in the form_for documentation
13:55 jberger and then right next to the by name example there is one by path relative to the root
13:56 jberger http://mojolicious.org/perldoc/Mojolicious/Plugin/TagHelpers#form_for
13:56 kes for named routes it is OK. It confuse me only with 'stylesheet' helper. and with 'javascript' too
13:57 jberger right, I agree with that too
13:57 kes because named route is suppose to expand to something long
13:57 jberger however form_for has both types right next to each other and it has me worried that I'm not understanding something that the documentation is trying to convey
13:59 kes hm... yes. it is for '/login'. It seems should be fixed too.
14:02 jberger so pink_mist was right
14:02 jberger it is relative to the base path
14:02 jberger and the documentation is correct
14:04 tchaves joined #mojo
14:04 kes but if the base path is appended, should it be then: '/path/to/path/to/login' for first example of 'form_for login'?
14:05 jberger no, since that's routing by name
14:06 jberger the relative to base path is a little new to me too, I haven't used Mojo that way before
14:07 jberger http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Rewriting
14:09 coolo sri: https://twitter.com/flightradar24/status/940946361675145217 - you missed it :)
14:09 sri coolo: lol!
14:09 jberger so perhaps the documentation could be clarified as part of https://github.com/kraih/mojo/issues/1109
14:10 sri i guess airbus had to one up boeing :D
14:11 sri since they drew a plane recently over the us
14:12 sri jberger: sure
14:13 jberger I added a note
14:14 jberger kes for now, as long as your app is mounted under / and the base path is not set then the two paths should be the same
14:14 jberger good catch
14:15 jberger sri / coolo : isn't that going to be a little lopsided?
14:18 kes I think, it will be clear if you do not mention the base path in rendering results in those examples, because it is not mentioned at all on those two pages that application is embedded
14:26 bwf joined #mojo
14:27 Kharec joined #mojo
14:32 itaipu joined #mojo
14:53 gizmomathboy joined #mojo
14:55 nic interesting watching the veil of darkness creep across Germany
14:57 sri can confirm darkness is creepy here
15:22 McA Hi all. How can I check whether an app was started with the flag being behind a reverse proxy as early as possible? Can't find the call chain to the underlying server object.
15:25 gryphon joined #mojo
15:54 McA joined #mojo
15:55 kes McA: Hi. try the $app in 'startup':
15:55 kes http://mojolicious.org/perldoc/Mojolicious#startup
15:55 kes This is your main hook into the application, it will be called at application startup
15:56 kgoess joined #mojo
16:10 geospeck joined #mojo
16:24 Leffe joined #mojo
16:31 maschine joined #mojo
16:38 kes When I include template I also wanna to append stylesheet into head for this template. I have a layout like this: http://paste.scsys.co.uk/566157 But with current design the content of 'stylesheets' is rendered before the template is included. so there is no stylesheets in head ((. I can put 'content_for' into the end, but in this case when net is not so fast the page is rendered with no design and when stylesheet is loaded design is switched.
16:39 kes is there a way to postpone the <head> rendering until the rest of page is rendered? so I can append my stylesheets into <head>
16:50 ChmEarl joined #mojo
16:53 disputin joined #mojo
16:54 disputin joined #mojo
17:11 ghenry joined #mojo
17:27 sh14 joined #mojo
17:56 geospeck joined #mojo
18:11 karjala_ joined #mojo
18:23 dod joined #mojo
18:44 Pyritic joined #mojo
18:47 Seth joined #mojo
18:51 jberger kes you are kinda naming things backwards
18:51 jberger normally your outer template, the one that does content_for 'stylesheets' would be the layout
18:52 jberger then then inner templates that you call layouts would be includes
18:52 jberger and there would be another layer in there that selects the layout and includes the includes
18:52 jberger when done that way the outer layout is rendered last
18:52 rick_soc1 joined #mojo
18:52 jberger and the content_for will be ready
18:53 kes thank you
18:57 ghenry joined #mojo
19:00 geospeck joined #mojo
19:10 rick_soc1 hello hello
19:10 purl o/` Hello hello? Is there anybody in there? o/`
19:10 rick_soc1 Hi purl
19:23 jabberwok Client has a small, ancient PHP 5 (PHP 3 maybe) program they want moved off a 5+ year old Linux system onto shared hosting (they use ... (ugh) ... Godaddy for 'everything').  Should I even consider a Mojolicious rewrite? I can't find any good reference for how to install onto such a beast.
19:23 ghenry joined #mojo
19:25 Grinnz how to install Mojolicious?
19:26 Grinnz generally, you would have to install it locally and you'd probably be out of luck with something like IO::Socket::SSL for https support; but since you'll probably need to deploy via CGI or FastCGI that doesn't matter much
19:27 Grinnz if you dont even have shell access, then you'll need to install it on another machine into a local::lib and then copy that over
19:27 Grinnz or you can use Carton to manage that
19:28 jabberwok i have always just copied files to run my programs.  i never really understood what "building" a Perl program would do, since it runs as source anyway
19:28 Grinnz if not using carton, you use cpanm -l somedir to install to somedir/lib/perl5
19:28 Grinnz i am talking about mojolicious itself, not your app
19:28 jabberwok Ah right
19:28 Grinnz and any other dependencies you might need
19:30 jabberwok Godaddy's motto: "Abandon All Hope, Ye Who Host Here"
19:30 Grinnz just make sure if you need to use the install-elsewhere-then-copy approach, that you are installing it to the same version of perl as the target machine has, primarily so that it installs the right modules that may have become core later
19:31 jabberwok ok.    ah the joys of dealing with other people's code in a foreign corporate setting.  Thanks
19:31 Grinnz more general channels like #perl-help can help if you have any more questions along those lines
19:48 exp-innit joined #mojo
19:49 Leffe joined #mojo
20:12 geospeck joined #mojo
20:16 jberger yep, still not a fan of promises
20:17 jberger possible it is that I'm using jquery Deferred circa 1.11
20:17 jberger but it doesn't think the same way as delay/steps that's for sure
20:17 rick_soc1 revert
20:18 jberger somehow I'm still getting arrow code?!
20:18 genio you love promises!  LOVE
20:22 jberger seriously, I've been working on this routine for like a full day now
20:23 jberger I'm just going back to nested callbacks
20:23 rick_soc1 well that does sound like love then
20:23 nicomen jberger: come to mojoconf 2018, we will have a Promises course for you :-P
20:24 rick_soc1 do you promise he will then love promises
20:24 jberger not unless I can sanely break out of a promise chain and not end up executing the later steps
20:25 jberger and also I don't want that to automagically happen either, because some reject handlers are really success (thanks jquery, 404 is a reject)
20:31 Pyritic joined #mojo
20:31 Grinnz rejection is how you break out of a promise chain
20:32 Grinnz it will reject all in the chain that don't have a rejection handler
20:33 Grinnz thus not running their ->then
20:34 jberger but I have things later in the chain that need a reject handler
20:34 jberger and I don't want those to run if the earlier one failed
20:34 jberger except when I do, because 404 in the one case means that there is no existing configuration stored that would be overwritten
20:35 Grinnz i think what you're looking for is a future ->cancel
20:36 Grinnz promises model is a bit simplistic for that
20:36 Grinnz you'll have to have the reject handler handle any possible rejection from the chain
20:39 jberger what would a failure handler have to do to cause the chain to move back to resolve status?
20:40 jberger (I so don't grok this, it feels weird)
20:42 Grinnz it returns success or failure like any other handler
20:43 Grinnz so basically unless it dies or returns a promise that rejects, it will pass on success to the rest of the chain
20:45 jberger so if a failure handler does nothing, the chain continues
20:45 jberger is that not "fail unsafe"?
20:46 jberger (as opposed to "fail safe")
20:51 nicomen jberger: you mean like this? https://gist.github.com/nicomen/76239cf63f812f33cd2ac73c70a350d4
20:51 Grinnz with promises you always have to be mindful of handling failures correctly, yes
20:52 Grinnz if you add a failure handler that's usually an indication that handler will do the appropriate handling then allow the chain to continue in "success"though
20:53 Grinnz at least that's the normal pattern
20:53 Grinnz a failure handler failing is generally an indication that you failed to handle the failure (or have some further failure for the rest of the chain)
20:53 Grinnz does that make sense?
20:54 jberger not without a cancel, not really
20:54 jberger that or these all have to be really tiny, like chains are discouraged
20:54 Grinnz well yeah i find cancel too useful to give up futures for that reason :P
20:56 jberger I thought the big plus to promises over delays was the reduction in boilerplate,
20:56 jberger now I'm going to write me some boilerplate to handle all this
20:57 Grinnz there is still a lot less boilerplate for the usual case
20:57 karjala_ joined #mojo
20:57 Grinnz maybe there's a better way to fit what you're doing in promises but would have to see the code, dunno
20:58 jberger the real monkey wrench here is that jquery rejects on the 404, which in my api and case isn't really
20:58 jberger so I have a case where a if I have failures that propagate above it, that will tend to push things back into a success state
20:59 jberger maybe I need to handle that outside (or nested deeper) of the chain
20:59 jberger and let reject really be reject all the way down
21:00 Grinnz that's what i default to doing usually
21:01 Grinnz the intermediate failure handler is more if you have a failure you want to coerce to a success i would say
21:01 Grinnz otherwise leave it to the end to handle
21:02 Grinnz being able to handle all failures at the top level is why i started using futures after all
21:10 rick_soc1 What I would like to know is what is the big advantage of promises that necessitates so much confusion and overhead in working with promises
21:13 geospeck joined #mojo
21:14 jberger lots of methods and states and recovering, its a lot to learn
21:15 jberger I don't know why delay/steps doesn't seem to appeal to people more
21:15 jberger but it doesn't seem to
21:15 jberger man it makes so much more sense to me
21:22 nicomen jberger: do you use only one promise?
21:23 jberger I think I'm still not grokking the idea of returning new promises and what that implies for the surrounding chain(s)
21:24 Grinnz returning a new promise is basically the only way Future works, so i'm used to that more tbh
21:25 Grinnz returning a new promise just means the success or failure will be according to that promise's result
21:25 jberger in delay/steps there is always the passed in callback somewhere
21:25 jberger it is really hard to lose track of where you are or what you are doing
21:26 jberger at whatever level you're at, something eventually has to call that callback, either with an error or not and possibly with other arguments
21:26 Grinnz its just a different paradigm to get used to, i found it much easier to actually get stuff done with future, if not fully understand it for a while
21:26 jberger I'm sure I will
21:27 jberger but when you're used to really grokking something it is so hard to deal with this level of confusion :-P
21:27 Grinnz maybe you need to start with a simpler problem :P
21:29 jberger see, when I have a simpler problem in async javascript I can do it with callbacks
21:29 jberger how do you think I've avoided it so long?!
21:29 jberger :-P
21:29 Grinnz yeah, but it's a good way to get your feet wet
22:01 berov joined #mojo
22:05 Seth joined #mojo
22:06 tyldis Great seeing that jberger is human after all
22:06 Grinnz no no, jberger is the minion, sri is the robot
22:06 jberger purl: jberger?
22:06 purl i think jberger is http://i.imgur.com/UPfFmXF.jpg or Foreman
22:06 tyldis heh
22:09 jberger ok I THINK I have the behavior working finally
22:09 jberger now I get new fresh hell
22:09 tyldis I won't attempt promises until jberger is able to do a training course on them.
22:10 jberger how do I pass a message to the final .fail handler?
22:10 jberger like "display an error popup that says this"
22:10 Grinnz fail with something more flexible than a string
22:10 Grinnz hashref, or object
22:10 jberger SRSLY?
22:10 purl totally srsly.
22:11 Grinnz yes, all message passing is through resolve or reject
22:11 Grinnz or closed over variables
22:11 Grinnz but that doesnt really work across multiple scopes
22:11 jberger but if I do $.Deferred().reject('Server information not available')
22:11 jberger that doesn't DWIM?
22:12 Grinnz i cant mentally translate that to perl
22:12 jberger you said return a rejected promise, right
22:12 jberger and it worked
22:12 purl What do you mean it worked? Did it run to completion? Did it bomb out early? Did it finish the job early? Did it tell your girlfriend "let's just be friends"? Be specific!
22:12 Grinnz lol
22:12 Grinnz purl: thats more important when it doesn't work
22:12 purl Grinnz: what?
22:12 * jberger kicks purl
22:12 * purl bites jberger!
22:13 Grinnz jberger: er, all you're asking is how to pass a string through as a failure? that's the argument to ->reject
22:13 Grinnz so yes
22:13 Grinnz the reject handler later will get that string, or hashref, or object
22:13 jberger ok but then what I got as an argument to the next fail handler was the jquery promise again?
22:13 Grinnz yeah, you should be able to get it out of the promise
22:14 Grinnz in Future it would be $f->failure
22:15 Grinnz in Mojo::Promise it's just passed to the callback directly
22:17 Grinnz (it's also passed to the callback directly in ->else callbacks for Future, the ->failure method is mostly for non-promisey uses of the api)
22:19 sri promises/a+ requires that
22:19 Grinnz I figured
22:19 Grinnz i guess jquery promises aren't quite that then?
22:19 sri nope
22:30 jberger well I'll tell you, the more argument slots you add to the function signature, the more junk you find stuffed in it by the rejected ajax request
22:30 jberger seriously this is unusable
22:30 disputin joined #mojo
22:30 jberger I'll just have to close over some variable to hold the error message
22:32 Grinnz jberger: according to the docs, deferred.reject will pass its args verbatim to the fail handlers
22:32 jberger sure, but who knows how many arguments the jquery ajax reject passed first!
22:32 sri jberger: you do sound a little over dramatic
22:33 Grinnz how can it pass args first? didnt you say you called reject yourself?
22:33 jberger somehow the ajax error keeps being the first thing there
22:33 sri a promise chain is not so much different than nested "sub ($err, @args) {...}"
22:33 Grinnz ah, then its probably not getting to your rejection
22:33 Grinnz you need to handle the ajax rejection first
22:34 jberger it would be nice if they gave even a single example in http://api.jquery.com/category/deferred-object/
22:34 jberger Grinnz: ok, that sounds promising, any idea how I do that?
22:34 Grinnz a .fail handler on the ajax call that returns the rejected promise you want to handle later
22:35 Grinnz (or a resolved promise, if you dont want to consider it a rejection)
22:35 jberger unfortunately that's literally what I already have :-P
22:35 sri "promising"
22:35 jberger sri: hehe
22:36 Grinnz maybe i'm missing somethign with how jquery's promises work but that should work
22:36 Grinnz once you catch a rejected promise, it won't propagate further
22:36 Grinnz unless you do so yourself
22:36 * sri has not really used jquery promises, only knows they are not promises/a+ compatible for historic reasons
22:36 jberger I'd be happy not to use these
22:36 jberger but I'd have to rewrite my entire frontend to use Fetch
22:37 jberger (cue Mean Girls references)
22:37 sri at least Fetch promises are promises/a+ :P
22:38 sri looks like jquery 3.0+ is actually promises/a+ compliant
22:38 jberger 1.11 in my app
22:38 jberger no idea if that is required by anything or not
22:38 Grinnz jberger: ah, make sure you're using .catch not .fail, it looks like .fail doesn't actually return a new promise
22:39 Grinnz so propagation would work differently
22:39 jberger ok, let me try
22:40 Grinnz it looks like .done and .fail aren't designed for chaining
22:40 sri i was about to mention .then... but it looks like that wasn't even present in 1.1 :o http://api.jquery.com/deferred.then/
22:40 Grinnz yeah, you need 1.8
22:40 Grinnz for .then and .catch
22:40 Grinnz .done and .fail are more akin to Future's on_done and on_fail
22:41 sri you need an old jquery expert
22:41 Grinnz i.e. they just happen when the promise resolves or rejects, they can't influence the chain
22:42 sri .catch is even 3.0+
22:42 Grinnz ouch, well at least .then(null, ...) should still work earlier
22:44 sri jquery 1.1 promises must be terrible
22:44 sri judging by the docs
22:45 Grinnz from 1.6 to 1.8 you could use .pipe, it looks like https://api.jquery.com/deferred.pipe/
22:45 Grinnz before that... you might be SOL
22:51 jberger 1.11 doesn't have catch
22:51 jberger and .then(null, function() { ... }) screws everything up
22:51 jberger so I think I'm going to call it a day for $work
22:52 jberger and probably tomorrow try to redo this all with Fetch
22:52 jberger at least in this one method
22:52 Grinnz that or upgrading jquery to 1.8+ is probably your best bet
22:52 jberger is 1.11 not greater than 1.8?
22:52 Grinnz oh
22:52 jberger 1.11.3?
22:52 Grinnz not perl versions, right
22:53 Grinnz .then *should* work then, but you might not be using it right if you were trying to use .done
22:53 jberger http://i0.kym-cdn.com/photos/images/original/000/234/739/fa5.jpg
22:54 jberger I've got my code back to where all the logic seems to work as expected
22:54 jberger and my final reject handler is just
22:54 jberger console.log('shit be borked, yo');
22:54 jberger that'll do for now
22:54 Grinnz it looks like .then callbacks work very similarly to Mojo::Promise's; they receive the resolved or rejected values directly, and can return either a value or a promise
22:55 jberger don't worry about it too much
22:56 jberger I need to commute() and then get my head into advent calendar mindset
22:57 jberger I'm thinking tonight might be a quickie on session but only on secret/PFS
22:57 jberger I mean, simple use of session for demonstration purpses
22:58 jberger but nothing like login examples (probaby)
23:22 rick_soc1 hmm
23:26 rick_soc1 Who wants to talk about I18N stuff?  :]

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