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

IRC log for #mojo, 2017-12-15

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

All times shown according to UTC.

Time Nick Message
00:14 jberger preaction: you still on for Yancy blog post tonight?
00:14 preaction yep
00:14 preaction almost got auth done
00:16 preaction well. technically i do have an auth plugin wrote, but i need another blog post to go with it, so...
00:24 jberger hehe
00:29 good_news_everyon joined #mojo
00:29 good_news_everyon [mojo] jberger force-pushed content_length_rfc7230 from 8489511 to ab5fbb4: https://git.io/vbVcp
00:29 good_news_everyon mojo/content_length_rfc7230 ab5fbb4 Joel Berger: Be more compliant with RFC7280 regarding Content-Length in requests...
00:29 good_news_everyon left #mojo
00:30 Ya_ALLAH_Ya_Muhmd joined #mojo
00:30 Ya_ALLAH_Ya_Muhmd left #mojo
00:31 jberger ok so that's good to know, triggering a force push with a change will update a PR whose base has fast-forwarded to take from the front of the PR's branch
00:32 Grinnz git's smart sometimes
00:44 aborazmeh joined #mojo
00:46 good_news_everyon joined #mojo
00:46 good_news_everyon [mojo] jberger force-pushed content_length_rfc7230 from ab5fbb4 to cf39b43: https://git.io/vbVcp
00:46 good_news_everyon mojo/content_length_rfc7230 cf39b43 Joel Berger: Be more compliant with RFC7280 regarding Content-Length in requests...
00:46 good_news_everyon left #mojo
00:55 mohawk_pts joined #mojo
01:00 Seth joined #mojo
01:01 Ya_ALLAH_Ya_Muhmd joined #mojo
01:01 Ya_ALLAH_Ya_Muhmd left #mojo
01:06 Leffe joined #mojo
01:07 Seth1 joined #mojo
01:22 Ya_ALLAH_Ya_Muhmd joined #mojo
01:22 Ya_ALLAH_Ya_Muhmd left #mojo
02:13 Ya_ALLAH_Ya_Muhmd joined #mojo
02:13 Ya_ALLAH_Ya_Muhmd left #mojo
02:17 ghenry joined #mojo
03:00 ilbot2 joined #mojo
03:00 Topic for #mojo is now 🍩 nom nom | http://mojolicious.org | http://irclog.mojolicious.org | http://code-of-conduct.mojolicious.org
03:03 Leffe joined #mojo
03:13 bif joined #mojo
03:15 bif left #mojo
04:01 Ya_ALLAH_Ya_Muhmd joined #mojo
04:01 Ya_ALLAH_Ya_Muhmd left #mojo
04:10 Leffe joined #mojo
04:38 disputin joined #mojo
04:47 jberger preaction: k I'm going to start migrating your post
04:47 preaction woo!
04:47 jberger is what's on your github the latest version?
04:47 jberger looks like 2 days old ish?
04:48 preaction yes bd8b1354bb8c21c7ce25a77b3f4d3075bb97839d
05:03 jamesaxl joined #mojo
05:20 jberger and it's live! https://twitter.com/joelaberger/status/941538342730194944
05:20 jberger thank you preaction!
05:20 jberger 🍻
05:21 preaction woo!
05:21 mohawk preaction++
05:21 mohawk (and jberger++ dangit ;-)
05:21 jberger and, I'm done with holiday concerts for the year!
05:21 jberger nice things to be sure
05:21 jberger but ... you know :-P
05:22 mohawk ha ha
05:23 mohawk i've done my annual carol service now
05:23 mohawk (which isn't quite the same thing, but... you know ;-)
05:24 inokenty-w joined #mojo
05:25 mohawk preaction, is there a yancy channel? i have some radical-ish ideas (which may, or may not, have anything to do with graphql) for yancy
05:25 mohawk (spoiler: actually not that radical)
05:28 preaction i mean, most likely i'll make it #statocles, but, like, the api serves the app. having a plugin that could add graphql to the api might be nice for someone who wants it, but i'm still not really sure where this is going to go from here
05:28 preaction i've got a couple things i'm planning on trying to accomplish with it (working with cpantesters data and blogs.perl.org), but then likely it'll be whatever other people find it useful for
05:31 mohawk preaction, my first idea would be to open up the "openapi" aspect of it
05:31 mohawk basically what your blog post made me think is that really what you've got is like my "convert plugin"'s putative "from_graphql" functionality, only you've done more than just refer to it in some POD
05:32 preaction i mean, it's behind the auth as well for a reason. it should probably be documented a bit better where the spec is and everything
05:32 mohawk i see yancy as "here is an openapi spec"... "now here is an app with a backend and CRUD and whatnot"
05:32 mohawk notice no gql nonsense there yet
05:34 preaction right. the cms webapp is generated from the spec. right now the spec has to be constructed a certain way, but i'd like to start getting rid of that limitation as much as possible
05:36 mohawk i see you expose the openapi spec on both /api and /yancy/api
05:36 preaction it shouldn't be, no
05:37 mohawk sorry, i guess i misunderstood https://metacpan.org/pod/Yancy#REST-API
05:37 preaction oh, bug. outdated docs. i'll leave a note to fix that
05:38 mohawk great
05:38 mohawk i saw the snippet at the end of the blog post, and the args looked like they wanted to be in a YAML file
05:39 mohawk which would be a bit like what i'm aiming for with my "code-free" concept in gql
05:39 mohawk to be slightly clear, i mean the args to the plugin just after "Here's our configured Yancy blog collection"
05:46 mohawk another thing that leaps out is that if there is an openapi spec, then adding a gql interface is just: plugin GraphQL => { convert => [ 'OpenAPI', '/api' ] };
05:46 mohawk after that, i'll be taking the code (especially the awesome UI stuff you've made) and basing my gql/mojolicious sample app on it
05:47 mohawk using maybe vue and relay
06:18 preaction yeah. you can use a Mojolicious::Plugin::YAMLConfig if you want that. but then you have to pass that config into the plugin
06:54 dod joined #mojo
07:00 dod joined #mojo
07:21 Vandal joined #mojo
07:22 jkp joined #mojo
07:23 Ya_ALLAH_Ya_Muhmd joined #mojo
07:23 Ya_ALLAH_Ya_Muhmd left #mojo
07:29 karjala_ joined #mojo
07:40 McA joined #mojo
07:51 AndrewIsh joined #mojo
08:40 Leffe joined #mojo
09:21 Leffe joined #mojo
09:56 Kharec joined #mojo
10:22 sri preaction: the buttons on your yancy forms are kinda ugly, is that bootstrap 4?
10:23 * sri likes the combined buttons from bootstrap 3
10:25 nic DON'T CALL MY BABY UGLY!!
10:27 dexteruk jberger: Can anyone contribute to your blog, i know you say its semi-official
10:28 pink_mist dexteruk: of course
10:28 dexteruk i would love to do some articals on using mojolicious to intergrate with various blockchain technologies
10:28 nic you have to hold a rank of at least semi-officer
10:29 dexteruk I would happy to submit and if you like it you can publish it
10:30 dexteruk im doing a lot with writing decentralised apps peer to peer using mojolicous
10:31 dexteruk Im just started teaching a course with a local university so they are all learning perl and mojolicous
10:32 nic dexteruk++
10:32 mohawk_pts dexteruk, noice! where?
10:33 dexteruk I still think im learning myself, but i cannot tell you how thankful i am for Mojolicious an the community that supports it.  So friendly and helpful
10:33 dexteruk In Sofia
10:33 dexteruk Bulgaria
10:33 purl Bulgaria is .BG
10:35 dexteruk Its such a shame people dont realise the power of perl, they are being tought python and go
10:39 mohawk_pts i think you're right
10:40 tchaves joined #mojo
11:20 itaipu joined #mojo
11:49 CHYC Is there a way to get to the Mojo::Server::reverse_proxy attribute from a Mojolicious::Controller object?
12:07 CHYC Use case: When mojolicious is deployed under mod_perl, the username comes in via an environment variable. When under hypnotoad et al, it's a request header. Ideally I'd like to pull the username from the correct source depending on how the app has been deployed. the Mojo::Server::reverse_proxy looks ideal for what I'm trying to do, but I cannot seem to find a route to it from the controller.
12:12 sri CHYC: that gets asked every week it seems :S
12:12 sri no, there is no way
12:12 sri yes, i want to add a way
12:12 sri no, i do not know how
12:13 CHYC sri: Oh, OK. Thanks for confirming.
12:13 sri i welcome proposals
12:13 sri they just have to work for all our servers
12:15 sri might be something as simple as app->server
12:17 CHYC I can see how hairy the code could look if you had mounted apps and similar.
12:17 sri of course for hypnotoad app->server wouldn't be available during startup(), which is problematic
12:18 sri mounted apps are not much of a problem actually
12:18 sri we handle the secret in a similar way already
12:19 CHYC Oh yes, forgot the precedent.
12:25 sri dexteruk: nice :)
12:27 augensalat joined #mojo
13:11 sri jberger: the perl6 calendar is challenging us! https://perl6advent.wordpress.com/2017/12/15/a-simple-web-spider-with-promises/
13:12 jberger oh boy!
13:22 CandyAngel preaction: Thanks for writing an article about Yancy, I know someone who might be able to use it to do something quickly :)
13:22 jberger neat
13:29 marcus sri: Native async/await is pretty neat!
13:32 sri marcus: there is no async
13:32 * TBSliver resists urge to say 'only zuul' and fails
13:32 sri requiring an async step kinda makes async/await meh to me
13:33 * sri rolls eyes at TBSliver
13:33 TBSliver i was literally just going past this channel in weechat and saw that, couldnt resist :P
13:34 * TBSliver goes back to making test frameworks cry
13:44 * sri appreciates your commitment to the dark side
13:52 Leffe joined #mojo
14:01 CandyAngel Hm.. just looking over the Yancy docs and it might not be suitable. I'll pass on the suggestion anyway though
14:17 ChmEarl joined #mojo
14:29 gizmomathboy joined #mojo
14:54 TBSliver sri: im unsure if im making them cry or im crying now though :P https://github.com/TBSliver/Test-Instance-DNS
15:03 gryphon joined #mojo
15:05 bif joined #mojo
15:06 Leffe joined #mojo
15:09 geospeck joined #mojo
15:10 sri ok, seriously, why am i getting thumbs down here? https://github.com/kraih/mojo/pull/1166#issuecomment-351981815
15:10 sri those dotnet folks are being unreasonable...
15:20 nicomen win 29
15:26 sh14 joined #mojo
15:39 genio sri: I didn't read anything in there that was really rude or excessively harsh. From 1163 and 1166, it looks to me like you guys put forth quite a bit of effort to understand the problem set
15:46 jberger genio: exactly, and his response is that the whole discussion is "weird" and we should clearly do what he wants
15:47 jberger further, Kestral looks like they are going to fix it anyway
15:47 jberger and indeed we both fix things, he's likely to use their fix anyway! https://github.com/aspnet/KestrelHttpServer/pull/2217
15:48 jberger specifically: https://github.com/aspnet/KestrelHttpServer/pull/2217#issuecomment-351375412
15:48 CandyAngel I'm just amused at the "couple of days thing"
15:49 jberger he doesn't want to put any effort in beyond what he can do in a browser
15:50 jberger just like he doesn't want to run our tests he wants to write the code in the PR edit text box and have travis run the tests
15:50 jberger same as he doesn't want to attempt to use any other websocket server to confirm Kestral's questions
15:50 CandyAngel I didn't even know you could do that..
15:51 jberger sure, but it is annoying for anyone subscribed to the repo
15:51 jberger and if we had lots of work going on it would use our CI resources
15:51 jberger (say if something like it happened during a hackathon, which admittedly we aren't currently doing)
15:52 CandyAngel Sounds like one of those things that is super useful when you really need it, but very easy to use in a bad way
15:52 jberger but during metahack we ask travis to give us more power because we quickly max out the free level
15:53 jberger we asked them if we could pay for a week of extra power but their system don't support that, so since we are a "worthy project" they've been kind enough to donate that extra power to us for the hackathons
15:53 CandyAngel That's cool
15:53 jberger and I think because it is easier for them than figure out how to accept such a short-term agreement
15:58 genio That is very nice of them.
15:59 jberger it is
15:59 jberger they could have as easily just said no, we don't support that
16:01 jberger now, I haven't had coffee nor breakfast and I should have started working an hour ago
16:01 jberger so ... with that ... adieu
16:01 genio have fun
16:01 purl Don't do anything I wouldn't do!!!
16:03 CandyAngel purl: Is there anything you wouldn't do?
16:04 CandyAngel Hmpf.. "Answer you", apparently :|
16:06 jberger I was trying to teach her
16:07 jberger but it is really confusing trying to get her to ignore "you"
16:11 jberger would would purl do?
16:11 jberger what would purl do?
16:11 purl well ... I have two bags of grass, seventy-five pellets of mescaline, five sheets of high powered blotter acid, a salt shaker half full of cocaine, and a whole galaxy of multi-colored uppers, downers, screamers, laughers... and also a quart of tequila, a quart of rum, a case of Budweiser, a pint of raw ether and two dozen amyls
16:11 jberger yay
16:12 jberger now to really see if it worked
16:12 jberger purl, what would you do?
16:12 purl well ... I have two bags of grass, seventy-five pellets of mescaline, five sheets of high powered blotter acid, a salt shaker half full of cocaine, and a whole galaxy of multi-colored uppers, downers, screamers, laughers... and also a quart of tequila, a quart of rum, a case of Budweiser, a pint of raw ether and two dozen amyls
16:12 jberger hahaha, win
16:12 jberger ok time for breakfast
16:17 CandyAngel jberger++
16:20 sri almost weekend here
16:20 sri time to enqueue a few hundred minion jobs to run over the weekend :D
16:23 jberger are you DDoS-ing Minecraft servers? (Dear FBI/CIA/NSA/foreign equivalents: I'm joking, go about your business, nothing to see here)
16:35 sri nope, just analyzing enterprise linux builds... Zzzz
16:37 genio https://www.tbray.org/ongoing/When/201x/2017/12/14/RFC-8259-STD-90
16:45 sri oh, does that mean we can remove stuff from Mojo::JSON? :)
16:50 good_news_everyon joined #mojo
16:50 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vbrDI
16:50 good_news_everyon mojo/master a34920d Sebastian Riedel: 7159 is now 8259
16:50 good_news_everyon left #mojo
16:50 sluggo joined #mojo
16:50 sluggo mo
16:50 sluggo \ww
16:50 sluggo w\
16:50 pink_mist what
16:55 jabberwok Preaction demo'd Yancy last night.  I was well impressed.  Hoping to use it as front-end to the perl smoker, pending the SQLite backend (of which I was able to get a prelim version passing tests this morning).
16:55 preaction and looks good, barring two very tiny typoes in documentation
16:57 jabberwok ah right.  (( queues:  use Comb::Toothed::Fine; ))
16:59 preaction eh, consider it indication that i've actually read your code and that's all i could find out of place ;)
17:02 jabberwok =healthy handshake=
17:05 dod joined #mojo
17:08 preaction and shipped as Yancy 0.006
17:08 CandyAngel \o/
17:10 preaction CandyAngel: if you have any feature requests that might make it into something more useful for your case, let me know (and have my preemptive gratitude for taking the time to help). my next thing, now that the proof of concept is out, is to start applying it to real-world cases
17:11 CandyAngel Yeah, I had a look and it might be suitable for something.. depends how much work it takes to have err.. multiple authors?
17:11 CandyAngel Looks like it is geared more towards single-author stuff (like the blog example)
17:12 preaction heh, that's my next thing in fact: making a "multi-tenant" or "community" plugin that only shows the data that the current user is allowed to edit
17:12 CandyAngel Ooo
17:12 preaction (one of my use-cases i want to try is blogs.perl.org)
17:12 preaction it'll be a different Mojolicious::Plugin even, just shipped together with the current one. but then you have the site admins work with the single-author version, and the contributors work with the "community" or multi-tenant version
17:14 CandyAngel That might work
17:15 CandyAngel The use case I'm thinking of is people being able to submit short stories
17:15 preaction yeah, i'm hoping it'll work for my cases
17:15 preaction yeah, exactly
17:15 sri btw. mr robot got really really good again this season
17:17 genio ah, I completely forgot about mr robot
17:19 zach joined #mojo
17:19 preaction CandyAngel: the other thing would be that the site admins use yancy to edit users and story content (some content approval workflow maybe even), and you then just have to write the user areas (in the case where yancy's cms doesn't work quite the way you want it to). i think my next blog post (about adding comments to the original blog post's blog app) will demonstrate something like that
17:21 mohawk joined #mojo
17:21 CandyAngel That sounds cool :)
17:23 disputin joined #mojo
17:24 preaction so, yeah, it's not meant to be a 100% solution for all possible content management problems, that'd be massively complex (and that's an entirely different product space dominated by Drupal and WordPress and such)
17:24 preaction it's a guerrilla cms ;)
17:41 jberger I think I'm almost to my limit on that guy
17:42 jberger I humbly ask that someone else respond to his next attempt to shift his crap onto us
17:48 preaction i mean, at this point you can just stop responding. if y'all have said all that needs saying and y'all are just going in circles now
17:50 jberger heh, nope, I just won \o/
17:51 jberger obligatory https://xkcd.com/386/
17:52 genio haha
17:53 disputin joined #mojo
17:54 jabberwok "Persistence usually wins" -- Grace Hopper
17:55 genio jberger++ # staying nice a lot longer than I could have
17:56 jberger no online argument is won by being nasty, it can only win by appeal to policy
17:56 jberger sometimes several policies as it turns out
17:57 jberger jabberwok++
17:58 sri purl: jberger is also https://i.imgur.com/urihKCD.jpg
17:58 purl okay, sri.
17:59 jberger that's even better than winning the argument ;-P
18:19 jabberwok preaction: oops, Yancy.pm:265 ucfirst breaks with "SQLite" --  my $class = 'Yancy::Backend::' . ucfirst $type;
18:20 preaction ah, right, the backend has to be Sqlite
18:20 preaction or maybe another solution, dunno...
18:20 jabberwok &dwim(...);
18:20 preaction if only
18:21 jberger I always try to steer clear of case munging stuff, I usually use the literal forms even in mojo
18:21 jberger there are just too many edge cases
18:22 preaction i mean, its akward no matter what, really
18:24 jabberwok shall i do another pull request or would you like to, preaction ... i'm testing this in context of pointing yancy at minion_jobs table.
18:25 preaction i can get it. it's just git mv lib/Yancy/Backend/S{QL,ql}ite.pm right?
18:27 jabberwok should be ((testing))... 1 sec
18:32 jabberwok a few other places need changing.  I'm on it
18:36 preaction right, so do links and package names and etc...
18:37 preaction i think i'll add a test that also tests basic operation of backends from the plugin layer
18:39 geospeck joined #mojo
18:39 karjala_ joined #mojo
18:42 sri jberger: same for me, i stopped using the case changing stuff too
18:43 sri ->to("Foo#bar")
18:43 sri ->plugin('FooBar')
18:50 bif joined #mojo
18:58 Seth joined #mojo
18:58 jabberwok preaction:  should the connect string for file in cwd be sqlite:filename.db or sqlite://filename.db ?  i.e., also sqlite:///tmp/filename.db if elsewhere
18:59 preaction it should be as close to what Mojo::SQLite wants, that's what i've been doing
18:59 jabberwok ok, the regex was correct, i will correct the doc
18:59 preaction if mojo::sqlite accepts just sqlite:<path> then that's fine. i had to fix the docs to say that the backend is identified via ([^:]+):
18:59 preaction do a pull, i fixed the doc ;)
19:05 jabberwok roger
19:09 jabberwok Whaddya know, now it works to view/edit the minion_jobs table with sqlite backend.
19:10 Leffe joined #mojo
19:10 mohawk sri, i thumbs-upped your post
19:10 mohawk now the force is back in balance
19:12 preaction jabberwok: github is saying "This branch cannot be rebased due to conflicts". you should probably start new PRs by making sure your branch looks exactly like mine by doing something like "git fetch upstream && git reset --hard upstream/master" (provided you've got an "upstream" that would be "git remote add upstream https://github.com/preaction/Yancy.git"
19:12 preaction i can handle this PR from here though, thanks
19:15 jabberwok ok.  ---    https://gist.github.com/lindleyw/a82e9136b12dd6718a3926df878d9eb2
19:20 jberger I have a promises design question, again in the frame of the browser but relevant more generally
19:21 jberger I have a modal popup that is a confirmation widget, a confirm button and a cancel button or you can click outside to dismiss which is the same as cancel
19:21 jberger so far that widget only had a "onConfirm" callback, since I used the callback to drive whatever was next
19:22 mohawk jberger, the perl6 blog post reads like mine did before your excellent assistance :-)
19:22 jberger if I was to tweak that design up to additionally include returning a promise (I can't remove the callback yet, too much code depends on it)
19:22 jberger mohawk: (hehe)
19:22 jberger (I haven't actually read it yet)
19:23 mohawk (it's short - mostly just go vs perl6, and some code)
19:23 karjala_ joined #mojo
19:23 mohawk go on re promises, i'm all agog :-)
19:23 jberger yeah, I was just thinking about phrasing
19:23 jberger so the question is basically is the cancel behavior a reject?
19:24 mohawk i'm predicting my answer will include the word "promisify"
19:24 mohawk well, that's up to you
19:24 jberger or else are they all resolve with an argument of true/false?
19:24 mohawk but "cancel" sounds quite reject-y, so let's go with that
19:24 jberger ok, so that's fine in concept
19:24 jberger however
19:24 jberger since I'm adding this to an existing api
19:24 mohawk given it's modal, i don't think there's any other outcome where the browser is still running
19:24 jberger that means that I have a reject that in most cases isn't handled by anything else
19:25 mohawk well
19:25 jberger this shows up as an uncaught exception in the console
19:25 jberger is that a problem?
19:25 mohawk let me know when you've given all your premises and i will offer thoughts
19:25 jberger I think that's the whole story
19:25 mohawk ok
19:25 mohawk well, let's have a go
19:25 tyldis That was a journey
19:26 mohawk the way i'm thinking about this, to make it promise-y, is you take the existing code, and promise-ify it
19:26 tyldis Brilliant
19:26 purl coincidentally, I had beans for breakfast
19:26 mohawk and that's done by your code, so you're choosing what a reject means
19:26 mohawk tyldis, ?
19:26 jberger mohawk: go on , tyldis is just being funny
19:27 mohawk (i don't mind funny, i admire it greatly. just wasn't sure what he was being funny about ;-)
19:28 mohawk jberger, it's fine to have a promise that always resolves, with true/false, too
19:28 mohawk graphql-js does it
19:29 mohawk jberger, whatever you come up with would want to fit in with what's there already
19:29 mohawk but i'm a bit confused - if it doesn't already handle promises, why is there existing code that knows anything about such a promise?
19:29 mohawk (first "handle" - actually "use")
19:29 jberger it doesn't, that's the problem
19:30 jberger most of the code does showConfirm({onConfirm: function() { ... }})
19:31 jberger but new code would do showConfirm({...}).then(function(){ ... }).catch(function(){ ... })
19:31 jberger existing code doesn't attach a .catch
19:31 jberger and because of that I get unhandled exceptions in the console every time someone clicks cancel on anything but this one popup
19:34 mohawk jberger, re #1166 - you said after "A client MUST NOT send a message body in a TRACE request.", "This is the kind of language I would expect to see when stating that a body is not anticipated. I can see why a useragent SHOULD NOT send a Content-Length in such an event, because it certainly would not be anticipated. The contrast of that definition with the definition of GET is clear."
19:34 mohawk my observation was that there is a difference between "is not anticipated" and "is not permitted"
19:34 jberger but I could find no other definition for anticipated
19:34 jberger that was the point
19:34 mohawk i read "anticipate" as somewhere around "should" or "may", not "must"
19:35 tyldis mohawk: "to make it promise-y, is you take the existing code, and promise-ify it" <- I just really liked that part :D
19:35 jberger if there were anything else that even remotely looked like anticipated I would have gone with that
19:35 mohawk tyldis, aha ;-)
19:35 mohawk bear in mind "promisify" is a recognised term
19:36 mohawk google gives 37,400 hits
19:36 tyldis I'll be darned.
19:36 mohawk jberger, if the existing code doesn't expect "cancel" to be something like an exception, then you're stuck with "resolve with true/false"
19:37 mohawk and that's a legitimate, idiomatic thing as i said above
19:37 jberger ok, then I'll do that
19:37 disputin joined #mojo
19:37 jberger thanks
19:37 mohawk bear in mind i'm not an authority on this, just someone who's used them a bit
19:37 mohawk but i'm sure of the above :-)
19:37 mohawk very welcome
19:37 mohawk glad you're slowly coming over to the dark side ;-)
19:38 mohawk tyldis, i remember when i didn't know much about promises yet. i am very glad i now have that conceptual tool available to me
19:39 tyldis Getting there. It just sounded very 'duh' :)
19:40 jberger the browser forces me (pun not intended, but appreciated)
19:40 mohawk tyldis, yeah, i'm with you on that :-)
19:41 mohawk if we're talking about how to "get there", my eureka was "make lots of little functions that take a promise, and return it with exactly one .then"
19:42 mohawk (.catch also allowed, or two-arg then, obvs)
19:42 mohawk jberger, my take on that (and you're right, there's often not another good way these days) is that promises are an idea whose time has come
19:43 mohawk i actually even prefer my little-functions-with-thens over async/await
19:43 mohawk more "functional"
19:44 tyldis Agreed
19:52 jberger just reading that p6 post
19:52 jberger "I will warn you that SSL support seems a little ropey at present so it is best to stick to http sites. " sigh
19:52 mohawk that's the language system that makes people think perl5 is obsolete and/or dying
19:52 jberger in the age of ssl everywhere a new language and it doesn't have rock solid ssl support
19:53 mohawk "in design and/or development for 17 years - and counting!"
19:53 mohawk 17 years means "new language" is a stretch ;-)
19:53 jberger it is new to anyone reading that blog post
19:53 mohawk yeah
19:53 jberger sorry but they don't get to claim old language problems at this point
19:54 bif left #mojo
19:54 mohawk yeah
19:54 mohawk they get the worst of both worlds
19:54 mohawk luckily, they're willing to share
19:54 mohawk #satire
19:54 jberger heh
19:56 jberger maybe what I mean to say is, for all the jumping around on the peripheries saying "hey come try p6" to then turn around and not be able to consistently do https requests is a real black eye
19:58 jberger and continuing on ... that's the whole post?!
19:58 jberger one lump example with absolutely no explanation or explication?
19:58 jberger "Concurrent programming will always have many pitfalls, from race conditions to resource starvation and deadlocks, but I think it’s clear that Perl 6 has gone quite some way towards making this form of programming much more accessible to everyone."
19:58 jberger you have made none of those points thus far!
19:59 jberger sign
19:59 jberger that might be the most ivory tower blog post I've ever seen
20:00 jberger "here is a case example that no one will understand unless they already understand the language and all the concepts involved"
20:00 tyldis mohawk: re "getting it", you are talking about subs that wraps itself in a promise and return that?
20:00 jberger "and btw it won't work in this extremely common case (https)"
20:01 tyldis mohawk: like the firt example in http://mojolicious.org/perldoc/Mojo/Promise?
20:02 mohawk jberger, it's more like "dear god, we need another post for tomorrow!"
20:02 jberger yeah, hey who has some code laying around
20:02 jberger and believe me, I might get there :-P
20:03 jberger but probably not at this point
20:03 mohawk tyldis, that's promisify-ing. i'm referring to how to work with promises. the example i'd point at is "sw-turnkey" by some idiot: https://github.com/mohawk2/sw-turnkey
20:03 mohawk jberger, i don't think you're at much risk. i have so much more graphql stuff to shamelessly plug!
20:03 mohawk (i nearly typed "grapeql" for some reason)
20:03 jberger I want grapeql!
20:04 mohawk select * from booze where flavour = 'beaujolais';
20:05 jberger mmmmmm
20:05 mohawk tyldis, although now i re-read your point and my code, what you said is spot-on
20:05 tyldis mohawk: Phew, because that confused me a bit.
20:06 mohawk tyldis, although the first example there is what i would call promisify-ing, so it's a bit of both maybe? :-)
20:07 tyldis Good starting point. I'll have to write more code with it to get a feel for it
20:08 mohawk there's no alternative to that
20:12 mohawk re-reading, i reckon i don't need to call networkResponse.clone() if it's not "ok" as it's not used. i think at that point i was so relieved it worked that i didn't re-comb the code :-)
20:14 geospeck joined #mojo
20:17 Lee_ joined #mojo
20:26 mohawk fixed
20:31 geospeck joined #mojo
20:41 Leffe joined #mojo
21:21 Seth joined #mojo
21:23 mib_5zjgyn joined #mojo
21:53 Leffe joined #mojo
22:19 Leffe joined #mojo
22:35 bif joined #mojo
22:51 Grinnz jabberwok: Mojo::SQLite takes either sqlite: or file: urls, and they each play by different rules. see the from_string docs for a comprehensive set of examples
23:04 good_news_everyon joined #mojo
23:04 good_news_everyon [minion] kraih pushed 1 new commit to master: https://git.io/vbolj
23:04 good_news_everyon minion/master c988ccf Sebastian Riedel: add dequeue_timeout option to run method in Minion::Worker
23:04 good_news_everyon left #mojo
23:05 sri and while i'm at it, i guess it would make sense to have an event that gets emitted in regular intervals in the manager process
23:09 sri guess it would make sense to emit it before dequeue
23:09 sri similar to http://mojolicious.org/perldoc/Mojo/Server/Prefork#wait
23:31 good_news_everyon joined #mojo
23:31 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vboBz
23:31 good_news_everyon mojo/master 7eb70d8 Sebastian Riedel: more consistent examples
23:31 good_news_everyon left #mojo
23:35 good_news_everyon joined #mojo
23:35 good_news_everyon [minion] kraih pushed 1 new commit to master: https://git.io/vboB7
23:35 good_news_everyon minion/master 49c322a Sebastian Riedel: add busy and wait events to Minion::Worker
23:35 good_news_everyon left #mojo
23:35 sri ok, that should make the worker very very hackable
23:35 Grinnz new metacpan feature https://metacpan.org/pod2html
23:40 * bif thanks sri for the Minion changes
23:41 jabberwok thanks Grinnz
23:41 sri i still don't like it very much, but it's more consistent this way, and we'll prolly learn new things from how people use it to hack minion
23:42 sri CandyAngel will prolly come up with something we never dared thinking about
23:43 Seth joined #mojo
23:46 bif I'm happy to have a stretchy use-case :)
23:48 CandyAngel So taking that as approval to some degree..
23:49 sri i used to say that about jberger
23:50 * jberger passes the baton
23:51 CandyAngel Hm, don't see how that will affect Humaninion, but we'll see >.>
23:52 Grinnz human onion?
23:52 CandyAngel Sounds like a logo suggestion :P
23:53 sri the perl raptor finds onions delicious
23:53 CandyAngel Appropriate for when Minion changes and breaks it!
23:54 CandyAngel Err.. not as a slight, but I will probably need to do some backend futzing to make it
23:58 CandyAngel Like, changing the parents is something I'm really likely to want to do

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