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

IRC log for #mojo, 2017-12-07

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

All times shown according to UTC.

Time Nick Message
00:09 kiwiroy joined #mojo
00:18 preaction jberger: here's that Mason-like thing i mentioned last night: https://github.com/preaction/Yancy/commit/6d656fad9ede443648ef146a327353c1c7b5b1d0#diff-176677ae12ea2ba1441ea3f980fce222R372 TL;DR: if the `path/to/template.html.ep` is not found, i look for `path/to/_index.html.ep`, and then `path/_index.html.ep` and finally `_index.html.ep`. then the template can look at its own url to render something
00:19 kiwiroy joined #mojo
00:24 Leffe joined #mojo
00:48 Seth joined #mojo
01:28 mohawk preaction, that's like a mason dhandler?
01:29 mohawk is there possibly a better name for it than "_index"?
01:36 mohawk (btw, just looked at Yancy properly - very interesting!)
01:38 Leffe joined #mojo
01:42 go|dfish joined #mojo
01:47 dod joined #mojo
01:50 dod1 joined #mojo
01:55 dod joined #mojo
02:40 kaare joined #mojo
03:30 preaction mohawk: afaik yes, it's like mason's dirhandlers. and i couldn't think of a better name. was thinking __index__.html.ep like python's special __init__.py file, but _index.html.ep makes it more like jekyll
03:32 preaction otherwise i could require people to build their own routes. using Mojolicious::Lite, it's trivial
03:37 preaction don't really know where to go from here, except for some esoteric things like a multi-tenant version of the plugin or a few auth modules or something
03:53 dod joined #mojo
03:56 dod1 joined #mojo
03:58 mohawk well, (cough), you might think about what a GraphQL interface would look like for it :-)
03:58 * mohawk looks to see if there's an openapi spec for it
03:58 preaction it generates an openapi spec from the config you give it
03:59 mohawk noice
04:00 preaction that openapi spec is parsed to build the cms
04:00 mohawk i need to make a graphql Mojolicious::Command
04:00 mohawk that command thing is amazing
04:46 jamesaxl joined #mojo
04:48 Leffe joined #mojo
05:09 mohawk_pts joined #mojo
05:12 mohawk_pts_ joined #mojo
05:12 mohawk_pts joined #mojo
05:43 jberger thanks to preaction for the first guest post of the advent calendar! https://twitter.com/joelaberger/status/938644858788564992
05:54 jberger preaction: I'll take a look at that link you posted (Yancy) tomorrow
05:54 jberger long day
05:54 jberger I'm so happy you had a blog post ready because there's almost no way I could have written one today
05:54 preaction alright, thanks
05:58 inokenty-w joined #mojo
05:58 Leffe joined #mojo
06:00 mib_cq48ry joined #mojo
06:33 omega grome
06:33 omega oops
06:55 Vandal joined #mojo
07:00 Leffe joined #mojo
07:05 Leffe joined #mojo
07:08 mohawk_pts preaction++ jberger++
07:10 geospeck joined #mojo
07:37 Leffe joined #mojo
07:38 lodin joined #mojo
07:46 mishanti1 Since several people here are prolific module authors I ask this question here: is #toolchain the place that is best to be when it comes to getting help/advice on "proper" module authoring and publishing to CPAN?
07:51 Grinnz yes
07:52 Grinnz unless you're using Dist::Zilla, then #distzilla is a more specific channel for that
07:57 mishanti1 Thanks. :)
08:21 trone joined #mojo
08:23 Leffe joined #mojo
08:35 alilles joined #mojo
08:35 stein joined #mojo
08:43 CandyAngel Aw, I would like to do a calendar post.. but my Mojo usage is pretty unusual :P
08:43 CandyAngel Use in game engine, reverse engineering HMDs etc.
08:48 geospeck joined #mojo
09:02 dod joined #mojo
09:04 preaction sounds perfect to me
09:15 mishanti1 Speaking of game engine: does anyone know what happened with Tau Station? Signed up for their news-letter ages ago but have not heard a thing. Dead project? :-/
09:15 Lee mishanti1: https://twitter.com/taustation
09:15 tyldis I most of us has strange use cases. Mine is talking to various devices, then relay some of it to InfluxDB, export some for Prometheus scraping and generate events for an ELK stack. And a simple GUI on top for talking to the device if necessary.
09:16 tyldis I think*
09:17 mishanti1 Lee: Ah. Cool, so there is progress. Looking forward to seeing what comes of that game.
09:18 Lee mishanti1: Ovid gave a talk at TPCiA about the internals also, video is on youtube
09:21 mishanti1 Lee: Thank you for the tip. Assuming it is this video https://www.youtube.com/watch?v=AWy9bC8lBns
09:22 Lee yep, also https://www.youtube.com/watch?v=UmLwYLSmTSs
09:28 kaare_ joined #mojo
09:31 alilles joined #mojo
09:31 stein joined #mojo
09:57 Leffe joined #mojo
10:35 tchaves joined #mojo
10:51 dod joined #mojo
11:04 trone joined #mojo
11:18 wouter joined #mojo
11:48 karjala_ joined #mojo
12:09 Leffe joined #mojo
12:40 anparker joined #mojo
12:58 PsimanX1 joined #mojo
13:02 geospeck joined #mojo
13:03 geospeck joined #mojo
13:04 Leffe joined #mojo
13:09 geospeck joined #mojo
13:13 itaipu joined #mojo
13:15 dod joined #mojo
13:31 CandyAngel Okay, just found out that I can actually formally request a server and the site director can sign it off..
13:31 CandyAngel I may be able to make my workflow system after all!
13:33 CandyAngel s/make/deploy/
13:34 marcus what, you can't just terraform apply?
13:34 marcus ;-)
13:53 maschine CandyAngel: does that mean no more windows for you? :p
13:58 CandyAngel I'll still have Windows on my work computer
13:58 CandyAngel But with a Linux server at hand..
14:02 maschine Also, what's really a 'normal' use for Mojolicious?  I wrote an app that I use at work which builds material lists for structural steel fabrication from a 3D model.  :p
14:03 maschine I'm also hoping for a server to run it on, but I'm expecting them to be skeptical
14:04 maschine My plan is to get everyone used to using it, and then when it's indispensable they will have to give in to my demands. bwahaha!
14:07 Leffe joined #mojo
14:09 jberger CandyAngel that's excellent! I'd love to include that
14:09 Leffe joined #mojo
14:11 jberger And congrats
14:12 sri sometimes i hate nfs
14:19 tyldis All filesystems suck
14:19 gizmomathboy joined #mojo
14:20 * sri wonders if there are some nfs fstab options that improve concurrent acess
14:22 sri right now as soon as two processes start copying something the nfs share is unresponsive for anything else
14:22 dabudabu I was installing a chroot over nfs the other day. It was super-slow :
14:22 sri like, an ls taking minutes
14:23 CandyAngel Almost as much fun as transferring a 0byte file over an AFS mount. Result? Hardlocks the transport endpoint \o/
14:29 geospeck joined #mojo
14:31 Pyritic joined #mojo
14:36 geospeck joined #mojo
14:41 CHYC sri: Cannot say I've had any problem with my NFS. If it helps, my options are 'nfs4 noauto,x-systemd.automount,vers=4.1,sec=krb5p,fsc,_netdev'
14:41 CHYC Many of those are not relevant to you, like the automount. I like the fsc option a lot.
14:47 CHYC On the server I export async because of course my server will never, ever crash..
15:07 geospeck joined #mojo
15:07 geospeck joined #mojo
15:08 geospeck joined #mojo
15:12 geospeck joined #mojo
15:13 geospeck joined #mojo
15:19 Leffe joined #mojo
15:30 Leffe joined #mojo
15:43 hkclark joined #mojo
15:47 gryphon joined #mojo
15:47 mib_090n6j joined #mojo
15:57 jberger Phil21: do you know anything about sri's nfs quandary there?
15:58 sri i doubt there is much tuning i can actually do
15:58 sri just the network connection is too bad
16:00 Pyritic joined #mojo
16:02 * Phil21 reads
16:02 Phil21 is the backing disk pegged? or are local filesystem operations also slow during two nfs xfers
16:02 Phil21 it really shouldn't behave like that though, depending on setup
16:02 Phil21 I mean maybe over wifi or something :)
16:03 Phil21 and are these small file operations or large files?
16:03 geospeck joined #mojo
16:03 Phil21 you likely want to set async and wsize/rsize via fstab
16:04 ChmEarl joined #mojo
16:13 trone joined #mojo
16:40 CHYC I don't know if others would find this useful, but here's a script to get psql shell access using your Mojolicious app's connection settings: https://gist.github.com/chy-causer/b7b66cbe1db623db181ec417d924d83a
16:40 CHYC I'm finding it very useful when flipping between different environments.
16:42 CHYC It may well need tweaking for other environments obviously.
16:42 pink_mist that is pretty cool
16:43 mcsnolte joined #mojo
16:50 lodin joined #mojo
16:51 Afristar joined #mojo
16:56 jberger preaction: if I'm reading that code correctly, then this is how I might have implemented it: https://gist.github.com/jberger/de56b339ebfbae7e8983ec2b573271a1
16:57 pink_mist CHYC: first thing I'd suggest is using the psql from the PATH instead of hardcoding a specific location
16:57 jberger from a RESTy mindset I can totally see why you might try to render an index page at the level of the document or else at the level above, but I don't know that I'd be behind traversing all the way up (unless I'm not following your vision, which is totally possible).
16:57 jberger pink_mist: agreed
17:00 CHYC pink_mist: Thanks for the suggestion; amended. My sysadmin background is showing :(
17:10 sh14 joined #mojo
17:18 Grinnz CHYC: "works for me" is not always "works for other people" :P
17:25 CHYC Grinnz: Which is why I'm just throwing it out there as a "maybe useful" rather than anything more formal :)
17:51 CandyAngel Patreon just got a lot less popular
17:58 pink_mist oh? what happened?
17:59 Grinnz i heard that they moved some of the fees from donatee to donater
18:01 Leffe joined #mojo
18:01 jberger doesn't seem like much of a change to me, tbh
18:01 jberger I mean time will tell but this might just be a case of "something changed, everybody yell"
18:02 Grinnz but the internet loves change!
18:03 dod joined #mojo
18:06 CandyAngel It sounds like they are going to do it per-post (for per post creators), though I'm sure they only actually process fees once a month..
18:07 dod1 joined #mojo
18:11 jberger CandyAngel: so its about the $0.35?
18:11 mohawk what's the equivalent of "benjamins" for $0.35?
18:12 jberger I guess it could be for high volume low cost per post patreons
18:12 jberger mohawk: ?
18:12 mohawk as in, "all about the benjamins"?
18:12 CandyAngel Well.. if your pledge if $1, you actually pay.. $1.40?
18:13 jberger right, so instead you reduce your pledge down so that you continue to pay about the same, the creator ends up getting about the same (except for the low pledge per posts as you say)
18:14 jberger yes is probably kills low pledge per post patreons
18:14 CandyAngel Some are just like.. $1/month
18:15 CandyAngel Which isn't a big deal.. unless you support 100 people that way
18:15 CandyAngel Then your monthly is going from $100 to $140
18:15 jberger interesting point
18:16 jberger is that a common practice?
18:16 CandyAngel Well, I don't support 100 people, but I do have mine spread out
18:23 CandyAngel Maybe Graphtreon could get some stats on pledge amounts
18:24 CandyAngel Doesn't seem to be broken down by pledge amount ($1/$5/$10 etc.)
18:24 CandyAngel U
18:25 CandyAngel Err.. this 2015 post says $1 pledges are 33% of all pledges
18:25 CandyAngel But then says $10 is 90%.. so pretty sure that is junk :P
18:25 CandyAngel Oh, $10 or below.. duh
18:26 CandyAngel Okay, so it is $1 was 33%, $5 was 22% and $10 is 10%
18:26 CandyAngel http://www.charliemccarron.com/2015/01/patreon-statistics/
18:30 CandyAngel Eh, personally I would have just adjusted the estimator to always estimate low :P
18:31 CandyAngel But this way probably gets Patreon more money
18:36 jberger if I supported a few creators at $1/mo I probably eat the 40 cents and the creator ends up with more money
18:36 jberger that only matters in my mind once your cross into the realm where N*0.40 is real money
18:37 jberger IMO
18:37 jberger not sure how to quantify that
18:37 Addy joined #mojo
18:38 trone joined #mojo
18:40 D joined #mojo
18:44 dod joined #mojo
18:46 Seth joined #mojo
18:48 dod joined #mojo
18:48 D Are there any modules that support encoding/decoding JSON containing pointers?
18:48 D e.g. Mojo::JSON::Pointer->new(Mojo::JSON::decode_json('{"bar":true,"foo":{"$ref":"#\\/bar"}}'))->get('/foo')
18:49 D to get bar's true
18:51 jberger so expanding json refs?
18:52 D yes
18:52 D and keeping them refs
18:52 jberger I don't know of any off hand, but I know that JSON::Validator (related to Mojolicious::Plugin::OpenAPI) has code for it internally
18:52 jberger I don't know if it is exposed at all
18:53 jberger the "keeping them refs" is actually a thing that is being dealt with at the moment in that codebase too
18:54 D good to know thanks!
19:07 jacoby joined #mojo
19:12 dod1 joined #mojo
19:14 dod joined #mojo
19:23 preaction jberger: i think you're right. that's the part i feel worst about, but what i wanted to solve was: /blog/8712873/this-is-the-title-of-the-blog-post. i don't think it's that valuable of a thing really though... so i think just the one level will be what i release/document
19:23 preaction that and i really have to remember that custom routes are 3 lines of code away in a Mojolicious::Lite app
19:28 sri oh, new fontawesome is out
19:34 Pyritic joined #mojo
19:43 itaipu joined #mojo
19:45 geheimnis` joined #mojo
20:02 marty joined #mojo
20:03 irqq_ joined #mojo
20:22 dod1 joined #mojo
20:22 sri that wasn't too bad https://github.com/kraih/minion/commit/217927b48c3322eb5a223253faeb2adf2643489f
20:28 Pyritic joined #mojo
20:47 jamesaxl joined #mojo
20:48 coolo sri: awesome!
20:54 kaare joined #mojo
21:07 preaction ... does render_maybe clear out the stash?
21:12 preaction no, but the `template` stash value does seem to disappear after render_maybe
21:24 jberger I noticed that too, that's why I moved that line up in the code
21:24 jberger I meant to ask but I forgot
21:26 jberger https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Renderer.pm#L92
21:26 jberger looks like a few others too
21:26 jberger or maybe not
21:27 jberger I mean, render_maybe with a 'text' key is always going to succeed so deleting that key probably doesn't matter
21:37 preaction this is what i ended up with. this passes my tests https://github.com/preaction/Yancy/blob/master/lib/Yancy.pm#L372-L378
21:37 preaction it's nice and neat and short
21:47 kaare joined #mojo
22:13 gryphon joined #mojo
22:42 kendle joined #mojo
23:10 Leffe joined #mojo
23:30 Leffe joined #mojo

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