Perl 6 - the future is here, just unevenly distributed

IRC log for #pdl, 2012-12-19

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

All times shown according to UTC.

Time Nick Message
00:14 Molaf__ joined #pdl
01:37 Mithaldu t run4flat https://github.com/CPAN-AP​I/metacpan-web/issues/679
03:17 jberger joined #pdl
09:13 Molaf joined #pdl
09:30 horea joined #pdl
09:48 horea left #pdl
13:23 jberger joined #pdl
13:48 natasha joined #pdl
15:04 natasha left #pdl
15:19 run4flat Mithaldu, thanks
15:19 Mithaldu cheers :)
15:45 jberger run4flat: does this make sense?
15:46 jberger https://github.com/jberger/Mo​jolicious-Plugin-ModuleBuild
15:46 * run4flat checks
15:46 jberger I love automagic configuration
15:47 run4flat Um, I don't see why it's a bad idea
15:47 run4flat Indeed, if you can minimize configuration, it's a win for everyone
15:47 run4flat minimize/automate
15:47 run4flat wait, did you just write this?
15:47 run4flat aren't you supposed to be working on a dissertaton?
15:48 run4flat :-)
15:48 jberger you can follow the documentation?
15:48 jberger hush!
15:48 run4flat I got as far as the synopsis and the description and thought, "OK, seems sensible to me"
15:48 jberger I wrote it last night in my free time
15:48 jberger good enough
15:48 run4flat do you want a more careful review?
15:48 jberger nah, the tests pass (on my box)
15:49 run4flat so the idea is that somebody could write a Mojolicious web app and put it on CPAN for others to deploy?
15:49 jberger yes
15:49 jberger its a generalization of the logic I worked out for Galileo
15:49 jberger in that regard
15:49 run4flat ok
15:50 jberger I'm helping a friend make a webapp (website) for his daily comic
15:50 run4flat how would such a web app be configured? Or is that left to the maker of the web app to specify?
15:50 jberger and I found myself reimplementing it
15:50 run4flat like a config file somewhere
15:50 jberger all it does is find certain folders correctly
15:50 jberger both before and after installation
15:51 run4flat ok
15:51 jberger I explicitly mention that I don't allow configuration
15:51 jberger :-)
15:51 jberger left #pdl
15:51 jberger joined #pdl
15:51 jberger oops
15:51 jberger back
15:52 run4flat So, suppose somebody creates a Mojolicious app and distributes it on CPAN
15:52 run4flat 1000 happy Perl hackers install it and run it on their own domain
15:52 run4flat how will their web sites show any degree of differentiation?
15:53 run4flat will we have 1000 identical sites on different domains?
15:53 run4flat If it's a blogging app, then ostensibly the content of the blogs will differ as the 1000 happy hackers write stuff
15:53 jberger all the content inside the folders is different of course
15:54 run4flat but...
15:54 run4flat ?
15:54 jberger the problem is locating "where are the templates", "where are the the static files"
15:54 run4flat ok
15:54 jberger http://mojolicio.us/perldoc/Mojolicious/Guides​/Cookbook#Making_your_application_installable
15:54 jberger which is only good for EUMM
15:55 jberger MB does a few things differently, and I perfer to use File::ShareDir than some other magic I don't understand
15:56 run4flat I think I get it
15:56 run4flat so these 1000 hackers would execute `myapp` in some directory
15:57 run4flat that directory would have a subdirectory structure specified by the `myapp` documentation
15:57 run4flat (and very likely conforming to some standard layout)
15:57 jberger yes, but likely the dev of this myapp already wrote that content and placed it in the proper directory
15:57 run4flat so I would differentiate my app from yours because the directory from which I launch `myapp` has different stuff than the directory from which you launch `myapp`
15:58 run4flat right, it depends how much of `myapp` is specified ahead of time
15:58 run4flat and how much can be configured by the "end user"
15:58 run4flat ok, I get it
15:58 jberger and that stuff Mojolicious CAN handle
15:58 run4flat right
15:58 run4flat probably built right in
15:58 jberger its the stuff that comes from the developer of the app that needs to be found correctly
15:58 run4flat right, got it
15:59 run4flat that also means that I can change from dev to production just by changing a directory
15:59 run4flat and then calling `myapp` again
15:59 jberger close enough
15:59 run4flat well, assuming they both use the same ports and everything
15:59 run4flat but I digress
15:59 run4flat ok, got it
15:59 run4flat yes, that makes sense
16:00 run4flat you might want to explain that bit about how different end-users would differentiate their use of `myapp`, though
16:00 run4flat :-)
16:00 jberger again, I'm not sure you do get it actually
16:00 run4flat it'll probably be well understood by anybody using your module
16:00 run4flat but somebody such as myself will stumble upon it, so giving them a hand would be nice
16:00 run4flat Shall I try again?
16:01 jberger in an attempt to provide such documentation, I think I need to understand where I lose you
16:01 run4flat :-)
16:01 run4flat sure
16:02 jberger most apps come with some amount of "content"
16:02 jberger this isn't the end user content, but more things like page structure
16:03 run4flat right
16:03 run4flat got that
16:03 run4flat Step 1. You write a cool Mojo app on your machine. It is general enough and cool enough that others might want to run their own instance, like with Galileo.
16:03 jberger right, Galileo comes with stuff like this template https://github.com/jberger/Galileo/blob/master/lib​/Galileo/files/templates/layouts/standard.html.ep
16:04 run4flat You want to distribute it on CPAN so others can run it, and Mojolicious::Plugin::ModuleBuild helps
16:04 jberger which is used to render almost all HTML content generated by a Galileo site
16:04 jberger yep
16:04 run4flat and configuring your app so that it uses your local files on your machine, and my files in local::lib on my CPAN-installed copy, is the tricky part
16:04 jberger any user generated content (the stuff different from instance to instance) is kept in the database and integrated later
16:04 jberger there we are
16:05 jberger no need for fears over ports etc, that isn't relevant
16:05 run4flat right
16:05 jberger when you download Galileo, it runs from the untarred tarball or after installation
16:05 run4flat lots of built-in ways to specify ports, anyway
16:06 run4flat here was my point of confusion then:
16:06 run4flat if you have a stand-alone app, with all of those baked-in files, where does it look on my machine for my content
16:06 run4flat ?
16:06 run4flat answer: the app uses the currently running directory
16:07 run4flat that is, the directory where the app was launched
16:07 run4flat is my answer correct?
16:08 run4flat Galileo is special because all content is generated through the browser by the app itself, which stores the data in a database somewhere
16:12 jberger no, stock mojolicous apps work this way
16:12 jberger but those directories don't get picked up by MB and aren't installed
16:12 jberger so you have to tell MB to install them
16:12 run4flat that's not my point of confusion
16:12 run4flat I understand that the templates, etc, will be picked up by `myapp` out of the File::ShareDir
16:13 jberger the rest of content handling will be app specific
16:13 jberger Contenticous uses local directories, Galileo uses databases, Farabi has no user-made content
16:13 run4flat right, based on the routes that `myapp` set up, right?
16:13 jberger yeah
16:14 run4flat so any user-end configuration will be documented by the app
16:14 run4flat ok
16:14 jberger and how the internal logic uses those routes to create content
16:14 jberger have you seen farabi
16:14 run4flat the in-browser editor, right?
16:14 jberger it maybe isn't quite ready yet, but its cool
16:14 jberger yeah
16:15 jberger ok, time to start working on real stuff
16:15 jberger :-)
16:16 run4flat it seems very likely to me that users of your module will understand all of this
16:16 run4flat but, that's where you lost me
16:16 run4flat otherwise it looks cool!
16:16 run4flat alright, time to work
16:16 jberger yeah, end-users need never know that my module is in play

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