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

IRC log for #mojo, 2017-11-16

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

All times shown according to UTC.

Time Nick Message
00:01 preaction ... of course, i was just taking nicomen's word that nothing like this exists for mojolicious yet... maybe i should've done some research...
00:20 nicomen wait what?
00:20 purl Sure, I can wait. I've got plenty of time. It's you mortal meat bags that need to hurry
00:22 preaction https://irclog.perlgeek.de/mojo/2017-11-12#i_15436292
00:22 preaction now that i've got a proof-of-concept, i should probably start doing some research for features
00:23 nicomen aha the CRUD thing yeah
00:24 nicomen but that doesn't need to be something big really
00:24 nicomen as generic as possible so the backend can be anything
00:24 preaction but yes. basically right now it's a CRUD app for JSON documents. i'm going to make a way for the OpenAPI spec to define rich html inputs later
00:24 nicomen that be a db with tables and columns, or a key-value storage with documents
00:25 preaction right, i'm saying it's started. i'm working on a DBIx::Class backend right now, for my own purposes, but the backend api is super-simple
00:25 nicomen perhaps you could make a plugin that uses the simple plugin for the cms?
00:25 nicomen anyhow if my rants generate cool new things, I'm happy ;)
00:26 preaction i don't know what the simple plugin is?
00:29 nicomen what you said you had already?
00:30 preaction i mean, right now i just have an in-memory data store: https://github.com/preaction/Yancy (Yancy::Backend::Test)
00:31 nicomen ah ok, taking a look now
00:32 nicomen (had to add some findbin stuff to run it without installing it: catdir( eval { dist_dir( 'Yancy' ) } || "$Bin/../share", 'node_modules' ),)
00:32 preaction you can demo it with `MOJO_HOME=eg perl bin/yancy daemon`
00:32 nicomen I tried that
00:32 preaction oh, i might not have registered all the prereqs correctly
00:33 nicomen it just crashes on dist_dir (as expected)
00:33 preaction right, it shouldn't do that if you install File::Share
00:34 nicomen I have FIle::Share ;)
00:34 preaction oh, but also yeah, that's not even necessary right now since i'm getting everything from a cdn
00:34 nicomen (I've used it extensively over the years)
00:34 preaction okay, then it just hates that i don't have a share/ directory at all
00:34 nicomen right
00:34 preaction (because later the share/ directory will have the js/html/css i need, but not right now during PoC phase)
00:34 nicomen (you have a share dir)
00:35 nicomen it just doesn't use an uninstalled share dir AFAIK
00:35 nicomen works nicely
00:35 preaction File::Share does, File::ShareDir does not
00:36 nicomen oh weird
00:36 nicomen ah
00:36 nicomen just me being stupid then
00:36 nicomen the second dist_dir didn't crash either
00:36 preaction it's got some funky heuristics in there to detect a development directory, so that's sometimes a problem
00:38 Grinnz you could preload Test::File::ShareDir in your testing if you were using File::ShareDir, unfortunately the import interface for that requires a hashref so it doesnt fit neatly in a -M
01:14 marty joined #mojo
01:40 preaction i should ask: does making this perl 5.24+ ruin its usefulness for people?
01:41 Grinnz a CMS normally is not used in conjunction with anything else, but as a plugin people might want to?
01:42 Grinnz in other words, it seems reasonable for people to install a perl specifically to run this
01:42 preaction right. i was figuring i've got the standalone thing for dinosaurs, and if they need some customizations they can build a tiny app using the plugin...
01:42 preaction but, meh, i suppose i'll find out (or not, since only rarely would someone provide feedback/help to that effect)
01:46 mohawk preaction, Grinnz - re an OpenAPI CMS, i'm about to start making a GraphQL::Plugin::Convert::OpenAPI that will take an openapi spec, and make a graphql schema/interface from it
01:46 mohawk (soon as i finish the ::DBIC one - nearly there)
01:47 preaction innnnteresting
01:47 mohawk here's what i have so far:
01:47 mohawk https://github.com/graphql-perl/GraphQL-Plugin-Convert-DBIC
01:48 mohawk you may or may not recognise the DBIC schema as being from tempire's MojoExample
01:48 preaction heh, so i auto-generate an openapi spec from some json schemas, then i can generate a graphql api from that autogenerated openapi spec ;)
01:48 mohawk yup
01:48 mohawk then we're in react/relay magic land
01:49 preaction also, graphql sounds useful for cpantesters, so if you wanted to put it through some paces, i could give you access to make some deep querying into those massive databases ;)
01:49 mohawk here's the spec for convert plugins if you want to beat me and make a G::P::C::OpenAPI :-) https://metacpan.org/pod/GraphQL::Plugin::Convert
01:50 preaction heh. i'm at meta::hack for the rest of the week, and then i still have _way_ too much other stuff ;)
01:50 mohawk ha ha
01:50 mohawk well, fair enough
01:50 mohawk just wanted to plant a seed
01:51 preaction meta::hack i suspect, like last year, will simply increase my to-do list :p
01:51 mohawk any thoughts that grow therefrom, let me know :-)
01:51 mohawk to-do lists are really a menu - the more interesting things there are to choose from, the better, say i
01:52 preaction yeah, and if i wrote more of them down on the github issues, i might attract more doers...
01:52 mohawk in due course i'll make a SQL::Translator::Parser::GraphQL, that will be able to make a db schema from a graphql schema (i may have mentioned this before)
01:52 mohawk then we're in graphcool country
01:52 mohawk preaction, doubtless that would help ;-)
01:54 mohawk i'm also going to make at some point a resolve function that does mocking like i saw a JS version of back in the day: any scalar (string, int, etc) will get randomised data suitable for that scalar type
01:56 preaction openapi has an "example" field, i've been trying to use that more and require it
01:56 mohawk oo, nice
03:03 mohawk preaction, one thing i need for the GQL plugin is a decent openapi example that's already been hooked up to a mojolicious controller. can you suggest one?
03:04 preaction sounds like CPAN::Testers::API maybe?
03:04 * mohawk looks...
03:04 purl looks are free today :)
03:04 mohawk nice avatar
03:05 preaction do you believe in magic?
03:05 purl it has been said that do you believe in magic is in a young girls heart, and the music starts and you all begin to fart
03:06 mohawk uh...
03:06 mohawk i believe in a thing called love, does that help?
03:06 preaction not really. i can't listen to the rhythm of your heart from across the pond ;)
03:07 mohawk ha ha, indeed
03:07 preaction https://www.youtube.com/watch?v=WUhOnX8qt3I <- backstory for the avatar
03:07 mohawk i watched those videos a few years ago, so well made
03:07 preaction yeah
03:10 genio I need a good netflix show to watch since my wife is out of town.
03:10 preaction is The Good Place on Netflix?
03:11 genio already seen that one
03:11 preaction GLOW?
03:12 noganex_ joined #mojo
03:13 genio that's the female wrestling thing? was it any good?
03:17 preaction i mean, i liked it
03:18 * genio will give it a go
03:19 mohawk preaction, this module looks just perfect!
03:47 mohawk preaction, sorry for dumb q - how would i run a local C::T::API to try things against it? is there a mysql db i'd need to have access to?
03:47 preaction heh. that's never come up before...
03:47 mohawk i had a look through the config and CPAN::Testers::Schema didn't help with that
03:48 preaction there's a vagrant thing, but it doesn't have any _data_ in it, so might not be so wonderful a solution
03:48 preaction http://github.com/cpan-testers/cpantesters-deploy has the Vagrantfile
03:48 mohawk well, no rush
03:48 mohawk ok
03:48 preaction it can create an api server, but it can't put data in it
03:48 mohawk can i leave the thought with you and ask again when i've got the OpenAPI -> graphql schema thing figured?
03:49 preaction sure. i should probably assemble some kind of test data set somehow anyway
03:50 mohawk that would really help :-)
03:51 mohawk probably some excellent inspiration would be MojoExample's t/fixtures
03:51 preaction i was more thinking of slicing some data from the real actual database somehow
03:51 mohawk you could then stash that in such a file
03:51 mohawk up to you :-)
03:52 preaction right
03:52 preaction ... i wonder if DBIC can read a thing from one db and write it to another...
03:52 mohawk seems like a no-brainer
03:52 preaction yeah
03:52 mohawk (as do so many things :-)
03:53 preaction it'd then be super-easy to just be like $sqlite_schema->write( $mysql_schema->read() )
03:53 mohawk the schema bit is easy
03:53 preaction and then use that to populate the mysql on the VM
03:53 mohawk SQL::Translator
03:53 purl it has been said that SQL::Translator is a group of Perl modules that manipulate structured data definitions (mostly database schemas) in interesting ways, such as converting among different dialects of CREATE syntax, visualizations of schemas (pseudo-ER diagrams: GraphViz or GD), automatic code generation (using Class::DBI), converting non-RDBMS files to SQL schemas, serializing parsed schemas, creating documentation and more
03:53 mohawk is literally for that
03:54 preaction right, DBIx::Class already uses that basically
03:54 mohawk nice factoid, whoever made that
03:55 mohawk and the sqlt -f mysqlinfo -t sqliteinfo would achieve it
04:04 Grinnz 22:52:46 <mohawk> seems like a no-brainer
04:04 Grinnz oh how adorable
04:05 mohawk ha ha
04:06 mohawk well, is sqlt not expressly for such a purpose?
04:19 aborazmeh joined #mojo
04:44 espe joined #mojo
05:04 dboehmer joined #mojo
05:46 mohawk i wonder whether anyone's ever noticed that create, update and delete all vary by only their first 4 letters. that makes it super easy to cargo-cult one mutation into another, by using "R" (replace) mode in vi, to change those 4 letters
05:47 mohawk pity "read" doesn't conform, but then it's not a mutation
05:48 disputin joined #mojo
06:18 aborazmeh joined #mojo
06:27 bjakubski joined #mojo
06:28 dod joined #mojo
06:29 mohawk preaction, if you want to have a quick go with the now-working DBIC stuff you can clone https://github.com/mohawk2/MojoExample and take a look. the tests on the plugin give an idea of what queries/mutations you can try
06:31 inokenty-w joined #mojo
06:35 dod joined #mojo
06:39 Vandal joined #mojo
07:55 geospeck joined #mojo
08:14 karjala_ joined #mojo
08:21 dod joined #mojo
08:24 trone joined #mojo
08:39 disputin joined #mojo
08:57 hkclark joined #mojo
09:00 hkclark joined #mojo
09:08 hkclark joined #mojo
10:23 kaare joined #mojo
10:37 sri Grinnz: eww, Future even does wantarray
10:40 Dandre Hello,
10:40 Dandre How can I set $ENV{LC_*} in mojolicious accordingly to the Accept header sent by the browser?
10:54 marcus sri: Sad!
10:54 sri Sad!
10:54 sri preaction: i'd really like to see a plugin like that
10:55 sri preaction: re feature ideas, just copy the django admin, everyone considers it best in class :)
11:04 dod joined #mojo
11:13 klapperl_ joined #mojo
11:49 djluko joined #mojo
12:36 espe let me few seconds, I have confused here https://ssl.thorsen.pm/paste/3139da375215
12:45 good_news_everyon joined #mojo
12:45 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vFMXq
12:45 good_news_everyon mojo/master 67b2a40 Sebastian Riedel: fix list of validation checks (closes #1156)
12:45 good_news_everyon left #mojo
13:00 tim98 joined #mojo
13:03 tim98 Hi, would it not be better to link to the connect method (#connect1) instead of the connect event (#connect) in http://mojolicious.org/perldoc/Mojo/IOLoop#client?
13:03 pink_mist heh, good point
13:07 tim98 joined #mojo
13:11 sri that doesn't work with perldoc text output
13:12 sri "...takes the same arguments as "connect1" in Mojo::IOLoop::Client."
13:13 sri hmm, already gone...
13:16 tim98 No, I am there :)
13:22 sri ah
13:22 bjakubski joined #mojo
13:22 sri o/
13:36 Lee_ joined #mojo
13:56 tim98 L<"connect" in Mojo::IOLoop::Client|Mojo::IOLoop::Client/"connect1"> would work, but it looks dirty...
14:09 marty joined #mojo
14:10 marty joined #mojo
14:12 gizmomathboy joined #mojo
14:36 gryphon joined #mojo
14:38 ChmEarl joined #mojo
15:34 disputin joined #mojo
16:00 Grinnz it would be incorrect. it's entirely up to the pod renderer how to generate anchors for two different identical headings
16:07 geospeck joined #mojo
16:54 Grinnz sadly there is no way to solve this with pod markup
16:55 pink_mist can't one just include a zerowidth space or something on one of the headers? :P
16:55 Grinnz heh
16:56 mohawk is there an emoji for a crying baby jesus?
17:00 preaction sri: alright. i'll add "evaluate django admin" to my list of things to do. i'm at meta::hack, so i can only get back to work on this if i finish out my metahack queue (which is infinite, cpantesters always has something on fire...)
17:03 mohawk preaction, it's your own fault for making "valuable software"
17:04 preaction hey, hey, hey, hey, hey! I _inherited_ this "valuable software"! you can't blame me for its existence!
17:09 mohawk only got yourself to blame ;-)
17:09 mohawk preaction, my DBIC plugin has been completed and now i'm looking at making the OpenAPI plugin
17:09 mohawk any progress with test data etc on the cpantesters doodah?
17:10 preaction no, i likely won't be able to get to that until meta::hack is over. i'll put it on my meta::hack list though, since you're now the second person to ask me today
17:11 preaction ooh, i get to learn more about how Vagrant works to make this work... or maybe just Rex...
17:12 mohawk ha ha, great
17:12 mohawk here's the blog entry for the DBIC plugin what i just writted: http://blogs.perl.org/users/ed_j/2017/11/graphql-perl---plugin-to-make-graphql-just-work-with-dbixclass.html
17:17 tchaves joined #mojo
18:04 dod joined #mojo
18:16 disputin joined #mojo
18:45 Seth joined #mojo
19:00 zivester joined #mojo
19:20 sri and committed https://github.com/kraih/minion#minion-
19:21 sri https://github.com/kraih/minion/commit/32c397b69683349f5f6334560fb5d19b585fc3f6
19:26 sri this part is a little clunky, but i'm not sure how to do it better https://github.com/kraih/minion/blob/master/lib/Mojolicious/Plugin/Minion/Admin.pm#L122
19:27 preaction the openapi plugin lets you pass a route object, which it then adds all its own routes to, and that's what i was planning to do
19:28 preaction which would default to $app->routes or whatevz
19:29 sri yea, that seems the most sane solution
19:31 disputin joined #mojo
19:34 zivester joined #mojo
19:39 sri and done https://github.com/kraih/minion/commit/2d34241140837fe6ce5fb0129c8e58a140731603
19:45 karjala_ joined #mojo
19:54 rickbol joined #mojo
20:13 disputin joined #mojo
20:16 geospeck joined #mojo
20:19 zivester joined #mojo
22:18 geospeck joined #mojo
22:18 geospeck joined #mojo
22:40 jacoby joined #mojo
22:44 geospeck joined #mojo
22:59 kiwiroy joined #mojo
23:34 kiwiroy joined #mojo
23:44 kiwiroy joined #mojo

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