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

IRC log for #mojo, 2015-07-11

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

All times shown according to UTC.

Time Nick Message
00:04 Grinnz lol
00:59 frederico joined #mojo
01:06 buu sri: How do you write raw sql these days?
01:07 Grinnz usually with a SELECT, or an UPDATE, or an INSERT
01:07 Grinnz sometimes a DELETE
01:10 mst Grinnz: you forgot WITH
01:10 sri https://github.com/kraih/minion/blob/master/lib/Minion/Backend/Pg.pm
01:11 sri https://github.com/kraih/mojo-pg/blob/master/examples/blog/lib/Blog/Model/Posts.pm
01:18 buu That doesn't look like that much fun
01:19 sri for me it is
01:20 sri i guess it depends on if you actually like sql as a language
01:21 buu ORMs have definite issues but writing hundreds of lines of sub inserter { 'insert into ...? , ?', @_ }; got pretty old
01:21 buu I like sql but it's a pretty major impedance missmatch between perl style structures and sql
01:21 sri that's not what most sql does in my apps
01:22 * sri disagrees
01:22 sri these days i see inline sql more like css selectors in Mojo::DOM
01:22 sri works for me with that mindset
01:22 buu I'm not sure I understand the similarities
01:23 sri that's ok
01:23 buu sri: Have you played much with linq?
01:23 sri not really
01:25 sri but seriously, how would a query like this look like in something like DBIx::Lite? https://github.com/kraih/minion/blob/master/lib/Minion/Backend/Pg.pm#L185
01:25 sri using raw sql actually made me use much more postgresql features, which is quite fun
01:26 sri for super basic crud i can understand the desire for some abstraction
01:27 sri but now i actually push as much work as possible into postgresql
01:27 sri https://github.com/kraih/minion/blob/master/lib/Minion/Backend/Pg.pm#L523
01:27 sri (that's the minion migrations)
01:28 sri an insert trigger that sends real-time notifications
01:28 sri there's also json all over the place
01:28 buu Well, in sql-abstract style ORMS you'd write create  sub query object then embed it in the parent query
01:29 buu And I mean, I often end up writing complicated sql without using the ORM
01:29 buu But I find myself writing a *lot* of crud code also
01:29 buu I'm not really happy with either solution.
01:31 sri i guess what makes me happy here is a mix of the simplicity of the approach (no fighting sql generators to get that optimized query you wanted), and just using more postgres features from the start
01:31 buu Sure, I definitely appreciate both of those things
01:31 buu Having to page through manuals of sql generators to try to figure out what bizarre syntax they use for the sql command you want sucks
01:32 buu But I basically never want to write select * from table where id = ?; ever again
01:32 sri i doubt that wish will ever come true
01:32 buu Well, using dbix-class gets me most of the way there
01:33 buu I think DBIC's biggest flaw, from my usage, is trying to combine multiple tables
01:34 buu It feels super awkward to refer to more than one table, even in something relatively simple like your minion job update
01:39 mst there's various ways of handling it, but unless what you're doing fits in with the way you defined the object graph it gets weird fast
01:39 mst and I've never been happy with any of my attempts at figuring out alternative approaches
01:39 mst I suspect I may have to spend a while writing all the SQL myself again or something
01:39 mst buu: or: "I feel your pain but I'm not sure how to fix it"
01:40 sri databases are hard, lets go shopping
01:40 mst I just spent an hour and a half getting my head around flux-like things
01:40 mst my head hurts.
01:41 Grinnz as someone who has to use mysql primarily, i prefer writing the SQL myself, then i only have to worry about all the weird shit mysql does
01:42 Grinnz depending on the situation, making a query or set of queries performant is often trial and error
01:45 Grinnz and my queries usually have like 10-20 joins in them
01:45 buu huh
01:45 buu I've never worked on a project where that was a primary use case
01:45 buu Every place I've been, at least 80% of the queries were one or two tables.
01:45 Grinnz the project is essentially web monitoring and configuration interface for the routers we sell to customers
01:45 Grinnz so there is a _lot_ of related shit that needs to be pulled together
01:45 mst right. given a project of that sort I usually jam the queries into views and then bolt DBIC on the front
01:45 buu hrm
01:45 Grinnz some of which are of my or my team's creation, some of which are from the ordering system or whatnot
01:45 Grinnz yeah, i gave up on views a long time ago
01:45 buu Maybe I tend to move that sort of logic into the 'controller' area of the app
01:45 mst I've always been doing postgres for stuff with complex queries
01:46 Grinnz abstracting things away just makes it harder to fix performance in the future
01:46 mst what?
01:46 buu A given 'page' or what not might get data from 10-15 tables but I'd end up with 10-15 objects
01:46 mst I'm not using views to extract things
01:46 mst I'm using them to keep my custom queries together
01:46 mst uh, abstract things
01:46 Grinnz i guess, but in my case that would basically be a view for every query
01:46 buu I honestly don't find that dbix-class in specific does that much abstraction
01:47 mst it's not exactly trying to, because abstracting without losing access to half the features of the database is pretty near impossible
01:47 mst I often joke that it's more ROM than ORM
01:47 Grinnz right and thats why i did like dbix-class more than most ORMs
01:47 mst but it's only half a joke
01:47 buu fair enough
01:47 mst attempting "that much abstraction" seems to reliably get you either ActiveRecord or Hibernate
01:47 buu One of my issues is writing custom sql to return instances of dbix-class objects
01:48 mst virtual views work nicely for that
01:48 mst define a virtual view resultsource with the query, give it the same result class, done
01:48 Grinnz the other issue i had with views is the same issue i had with stored procedures
01:49 mst it's mysql and they're half-arsed as fuck?
01:49 Grinnz it's harder (at least in our current setup, and given mysql sucks at migrations) to version control it
01:49 * sri doesn't really care if you use an orm or raw sql, as long as the code is clean
01:49 buu YES
01:49 mst CREATE OR REPLACE # postgres, I love you
01:50 buu I'd love to write more views and stored procedures but the idea of storing that in the db terrifies me
01:50 sri migrations
01:50 purl migrations are ok, but again we have something in the works
01:50 Grinnz yeah, we used to use a lot of stored procedures, and the other team likes to write them still
01:50 Grinnz and i'm like, nope
01:50 mst I really need to attempt an app with only Moo and Data::Query at some point
01:50 Grinnz i'm putting my queries in my code where i can fix it later
01:54 Grinnz mst, yeah in mysql it's usually something like DROP PROCEDURE IF EXISTS... CREATE PROCEDURE
01:56 sri release postgres 9.5 already!
01:56 mst RELEASE THE HOUNDS
01:56 purl BjörkBjörkBjörkBjörkBjörk!
01:56 mst ...
01:56 sri :)
01:56 Grinnz he said hounds, not icelanders
02:04 nicomen how can I check if a given path is available in my asset filepath?
02:05 nicomen do the same resolution order that the normal static serving does?
02:06 Grinnz https://metacpan.org/pod/Mojolicious::Static#file ?
02:06 Grinnz not sure if i am interpreting your question correctly
02:06 nicomen yes you are I think
02:07 nicomen thanks ;)
02:07 pink_mist joined #mojo
02:07 mattastrophe joined #mojo
02:12 bc547 joined #mojo
02:14 noganex_ joined #mojo
02:22 abracadaniel joined #mojo
02:24 mtths joined #mojo
03:52 jberger mst: if your irc op status were a cat it would be http://i.kinja-img.com/gawker-media/image/upload/hkydkjlovoognup9asyh.jpg
03:57 mst jberger: https://pbs.twimg.com/media/CFDNg1QW8AAOCQr.jpg:large
04:10 Craftsmanship joined #mojo
04:12 Craftsmanship is epl a thing people really use, or is it more common to switch out the templates for something else, like mason or Template::Toolkit?
04:18 PryMar56 joined #mojo
04:18 sh4 joined #mojo
04:19 neyasov joined #mojo
04:23 mst Craftsmanship: lots of people seem happy enough with epl esp. given all the helpers
04:24 mst Craftsmanship: I can't quite get over the embedded perl thing, but I've seen epl templates that were actually really quite pretty
04:25 Craftsmanship i can imagine, as templates go, i'm quite a fan of mason becuase you can get away with just the right amount of perl to make your  meaning clear and spew out the right html at the same time
04:25 mst right. bad experiences with the amount of mess people can make in mason is part of my problem
04:25 Craftsmanship I've seen upsetting things happen in ERB, which makes me a little adverse to the epl syntax
04:25 mst I have, equally, seen utterly beautiful Mason
04:25 Craftsmanship right.
04:26 Craftsmanship so as with all developer based problems, it comes down to people coding like assholes.
04:26 mst if you foresee that as a problem, might I commend unto you Text::Xslate
04:26 mst it's like a sane TT that tries to stop people blowing both feet off
04:26 Craftsmanship dude, thats' why everyone has 2 feet ...
04:27 mst ARE THOSE MY FEET
04:27 Craftsmanship that depends how much rope you have.
04:28 Craftsmanship I do very much appreciate the up-front "this is how the syntax looks" in the epl pod
04:28 mst my short metaphor for this is you need either bondage (Xslate) or discipline (epl)
04:29 Craftsmanship does that make HTML::Template sadism?
04:29 mst I think maybe that makes HTML::Template 50 shades of grey
04:30 mst in the sense of http://www.trout.me.uk/youtriedstar.jpg
04:30 Craftsmanship mibbit ... inlined the star
04:30 Craftsmanship i'm not sure i'm comfortable with that.
04:31 mst http://www.trout.me.uk/whut.gif
04:32 Craftsmanship metacpan links to "chat with us" in a ribbon on the left (for mojolocious dist)
04:32 Craftsmanship and theres
04:32 Craftsmanship a web irc client there
04:32 mst yes, it's a mibbit link thing
04:32 mst I know what it is
04:33 Craftsmanship also it doesn't inline figs
04:33 mst I'm the irc.perl.org oper who, years ago, kicked mibbit to add an 'Other' box to their IRC network list so we could do the early version of that
04:33 Craftsmanship um, gifs.
04:33 mst so, yeah, I'm aware people have been using mibbit widgets to good effect
04:34 mst and 'no gifs' is good, but, still, seriously? http://www.trout.me.uk/seriously.jpg
04:34 mst that's probably kind of annoying so I'll stop doing it gratuitously
04:35 avenj I commend you on your restraint
04:36 mst I normally use the various images for emphasis
04:36 mst overuse would spoil -my- fun
04:36 sri sup https://cdn.urbantimes.co/wp-content/uploads/2014/12/welcome_to_the_internet__please_follow_me_by_sharpwriter-d5buwfu-3502c4-400x300.jpg
04:37 mst PONYCORN
04:41 Craftsmanship I feel like I would have been better off not mentioning it
04:42 Craftsmanship I think i'll just stick with the epl thing until i realise i hate it, that seems like the fair thing to do
04:43 Craftsmanship when auto_escpe says it flips the <%= and <%== does it mean that literally?
04:43 mst ah, but now you've introduced additional torment to every single user of the metacpan links
04:44 sri read http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering
04:44 mst you might not be better off, but irc.perl.org is going to be much funnier for a while
04:45 Craftsmanship The lols - the reason we toil.
04:45 Craftsmanship sri: that doesn't address my actual question
04:45 sri don't read what you're reading
04:46 Craftsmanship i'm reading https://metacpan.org/pod/Mojo::Template
04:46 sri it will make more sense later on
04:46 sri yes, that is wrong
04:46 mst I believe the suggested reading order is "do not try and understand anything else until you've read -all- the guides"
04:46 Craftsmanship guess that one's been reported already then?
04:47 * sri actually put thought into the order of things here http://mojolicio.us/perldoc
04:47 sri no, you're using the docs wrong
04:47 Craftsmanship o_O
04:48 Craftsmanship so, when you say, that's the reading order... i'm not allowed to follow links in the sub-guides ...
04:48 Craftsmanship i have to breadth first it?
04:49 Grinnz the links to methods in modules go to the documentation for the methods in modules
04:49 Grinnz not how to use them
04:50 Grinnz Mojo::Template is a bit of an exception since it does go over the .ep syntax in a section at the top
04:50 sri the Mojo::Template docs explain how to use Mojo::Tenplate, not EPL, which is a higher level concept with different rules
04:51 sri also, EPL is actually EP
04:52 Craftsmanship i see.
04:52 Craftsmanship so Mojo::Template isn't the thing that interprets that template language?
04:53 sri you can look at the little building blocks in Mojo::*, but out of context they won't make as much sense
04:53 Craftsmanship and the context is in other things in the mojo:: namespace, right?
04:53 sri no, the context is Mojolicious::Guides
04:53 purl okay, sri.
04:53 * sri kicks purl
04:53 purl What? What?  Did i miss a cue?
04:54 sri EP is actually defined here https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Plugin/EPRenderer.pm
04:54 Craftsmanship so, until i announce "i hae read all the guides" i'm not allowed to ask questions about the software?
04:55 Craftsmanship so, EPRenderer is the glue between mojo, and the thing that turns ep into html
04:55 Craftsmanship yes?
04:55 purl somebody said yes was the answer to the latest question
04:55 zivester joined #mojo
04:56 sri i've written the guides so i don't have to answer as many questions anymore ;)
04:56 mst Craftsmanship: consider the guides to be years' accumulation of Frequently Delivered Answers
04:56 Grinnz the general answer to "how do i...?" is in the guides
04:57 sri maybe someone else will answer, but from me you'll only get references to the docs
04:57 * Grinnz is still thinking about writing an IOLoop guide
04:57 mst http://trout.me.uk/mstcat.jpg
04:57 purl i heard http://trout.me.uk/mstcat.jpg was the companion
04:58 Grinnz holy shit that cat
04:58 sri for example, i could just answer your question, but i already know that it will not help you at all
04:58 sri quite the opposite actually
04:58 sri it's merely an implementation detail that will 100% confuse you
04:58 Grinnz purl, the companion to...?
04:58 purl i don't know, grinnz
04:58 mst Grinnz: http://trout.me.uk/mstcat2.jpg
04:58 Grinnz lol
04:58 Craftsmanship I will be confused about the meaning of an attribute on a template engine ...
05:00 mst Craftsmanship: ok, here's the deal. if sri refers you to the guide, you get two choices - one, read the guide. two, RTFS and/or write test scripts and figure it out yourself. the latter is totally a fun way to do it if you want though
05:00 mst (one could argue that my membership of the perl community stems from doing exactly that a bit over ten years ago)
05:01 * Craftsmanship wonders if there's a membership card
05:01 sri you only get it after you know the secret handshake
05:02 mst we slip it into your back pocket without you noticing along with your first commit bit
05:02 sri it's useless without the decoder ring though
05:02 Craftsmanship I guess i'll have to put on pants for that to work, thanks for the heads up
05:02 mst eh, I've got pretty inventive over the years
05:03 Craftsmanship i think back pocket is already enough risk, thank you
05:19 kaare joined #mojo
06:28 Craftsmanship Having read the rendering and FAQ documents, is there a way to query if a variable exists in the stash?
06:29 Craftsmanship I get, Global symbol "$thing" requires explicit package name ...
06:29 mst I believe if it's optional you stash('thing') instead?
06:29 Craftsmanship i guess the sensible thing is to default them to the empty string and // them in the template?
06:30 mst well, once defaulted to '', // isn't required
06:30 mst since '' is already defined
06:31 Craftsmanship durr, I mean undef and // or '' and ||
06:41 Craftsmanship If I want stuff in my stash for all requests is before_render the right place for it?
06:42 Craftsmanship global bs like site name and that kind of thing
06:42 mst doesn't seem like a terrible approach
06:43 dotandimet joined #mojo
07:05 Craftsmanship it seems like mojo will happily dispatch to anthing in templates
07:06 Craftsmanship so is it recommended i have templates/lib and tell my application to not dispatch there
07:22 batman Craftsmanship: app->defaults() sets the defaults for the c->stash(). i would rather use that.
07:23 batman remember that if defaults(foo => {this => "is a ref"}); then the ref will be shared between every $c
07:23 batman Craftsmanship: i often have app->defaults(error => "");
07:33 berov joined #mojo
07:36 Vandal joined #mojo
07:42 dotandimet joined #mojo
07:44 trone joined #mojo
07:54 stephen joined #mojo
08:21 Craftmanship joined #mojo
08:41 frederico joined #mojo
08:43 Craftmanship am i reading the wrong thing, or is there just no include in ep?
08:48 mst http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Include-templates
08:48 mst Craftmanship: read ALL the guide :P
08:58 Craftmanship Some bits of ::Lite apply, some don't...
08:59 Craftmanship so it's a helper that does the including here?
09:00 mst that's a standard helper
09:01 Craftmanship so, the thing i pass to it is a template name?
09:01 Craftmanship does it do the variants and things too?
09:02 Craftmanship I guess so, since it's really render_to_string
09:08 amon joined #mojo
09:16 PotatoGim^Home joined #mojo
09:37 lluad joined #mojo
09:37 mattastrophe joined #mojo
10:04 trone joined #mojo
10:11 tgt joined #mojo
10:27 cpan_mojo Swagger2-0.41 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Swagger2-0.41
10:32 cpan_mojo Mojolicious-Plugin-Ical-0.05 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-Ical-0.05
10:36 mst batman: having a releasathon?
10:36 batman mst: yeah. fixing failing tests.
10:36 mst woo
10:36 cpan_mojo Mojo-Redis2-0.20 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojo-Redis2-0.20
10:38 batman hope i'm done now...
10:38 batman :)
10:42 mst argh
10:42 mst fluxish things continue to give me a headache
10:42 mst they all have features I want, but none of them have all of them ;)
10:43 Craftmanship set them all as remotes, pull and resolve the conflicts.
10:47 batman mst: i'm using riotjs, and my way of fixing "flux" is simply to add "observable" to all my models. https://muut.com/riotjs/api/#observable
10:50 batman haven't really found any flux library that does anything else than adding overhead, hehe
10:50 mst I've seen react done without flux
10:50 mst it ... I ... WHEEE
10:52 batman hehe
11:02 mst so far I have met: flux, reflux, marty, alt, fluctuations and redux
11:03 mst it's like cpan naming bingo except with no namespacing
11:05 batman :D
11:08 mst argh, and the one I liked the best is apparently just about to redo its entire API naming for 1.0
11:10 mst this is where I start to think that just going back to angular might be better for my sanity
11:13 batman have you looked at riot?
11:24 mst so, my first thought is: where's the form library? :)
11:26 mst (angular has built-in basic validations, react has formsy, I really don't wanna write that stuff ;)
11:27 cpan_mojo Mojo-IRC-0.26 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojo-IRC-0.26
11:40 cpan_mojo Toadfarm-0.65 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Toadfarm-0.65
11:41 mst batman: that was a genuine question btw
11:46 batman mst: not sure what a form library is supposed to do.
11:47 mst usually some sort of form container, elements and pre-pack validations
11:47 batman i'm writing the form by hand, and then attach variables to the markup manually.
11:48 mst right. I *so* don't want to have to do that
11:48 mst I would be upset if I *couldn't*
11:48 mst but for boring forms I don't see why I should need to
11:48 batman https://github.com/christianalfoni/formsy-react <-- i don't see the benefit from the example code :/
11:49 batman it seems like you still need to write the form
11:50 batman s/form/markup/
11:54 mst pre-pack validations
11:59 batman not sure what "pre-pack" means. is it the same as bundled?
11:59 mst as in, a chunk of validations I can just call and get sensible errors in sensible places
12:00 sh4 joined #mojo
12:01 batman like http://parsleyjs.org/doc/examples/simple.html ?
12:01 batman the thing is that riotjs works with most other tools. so... you don't need to have a "riot ready" library
12:03 mst I know how to bind stuff in to angular
12:03 mst and I'm pretty sure I can do it for react
12:03 mst it's not about having an 'X ready' library
12:03 mst it's about hitting the ground running with a cohesive ecosystem
12:04 batman i don't really care too much, since i either want to use html5 validation or server side validation.
12:05 batman i haven't found a good way to keep the client/server side validation rules in sync
12:06 mst html5 validation?
12:06 batman as in saying "this is an email field"
12:06 mattastrophe joined #mojo
12:06 mst which requires a polyfill I guess?
12:07 batman or <input type="text" name="name" required pattern="https?://.+">
12:07 batman only for old browsers, but then it "just works" :)
12:07 mst and where does the error appear in that case?
12:09 batman if the form is invalid, you can't submit it, and the input gets a the :invalid pseudo selector
12:09 batman example: http://codepen.io/zakkain/pen/AFhkt
12:10 mst oh, that's quite cute
12:12 batman i haven't used a polyfill yet, but maybe https://dl.dropboxusercontent.com/u/598365/html5forms/html5forms.html works?
12:13 batman also found https://github.com/ryanseddon/H5F
12:13 batman there's probably a bunch of them :)
12:48 mattastrophe joined #mojo
12:58 mattastrophe joined #mojo
13:05 zivester joined #mojo
13:14 Craftmanship I'd love for ->to('package#misspelt_method_name') to include the method names in the package in the error message ...
13:14 Craftmanship (like, in that routing table at the top of the 404, for example)
13:20 jontaylor joined #mojo
13:36 frederico joined #mojo
13:37 pink_mist makes sense .. maybe create an issue for it, see what people think
13:39 mst Craftmanship: that would really suck as soon as you start factoring logic out though
13:40 pink_mist could be in one of those 'tap for more' bits
13:41 mst $obj->$_tap('moar')
13:42 berov joined #mojo
13:46 Craftmanship It would surely be more sensible for smaller applications
13:47 mst if it restricted itself to non-Mojo::Base methods that aren't _prefixed you might do ok
13:47 mst plus I guess trying to exclude attr stuff
13:47 mst have you considering trying to write this as a plugin?
13:55 Craftmanship I am slightly aware that there are plugins.
13:56 Craftmanship arguments to included things are in @_, aren't they?
13:56 pink_mist included things?
13:56 pink_mist arguments to subroutines are in @_
13:56 Craftmanship C< include >'ed templates
13:57 mst he's calling "include 'something';" in a .ep file, I'd bet
13:57 Craftmanship mst, you win.
13:57 pink_mist include is a subroutine itself
13:57 Craftmanship it's a helper!
13:57 pink_mist helpers are subroutines
13:57 mst http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Include-templates
13:57 Craftmanship I don't think we disagree yet.
13:57 pink_mist are you reimplementing sub include {}?
13:57 mst this suggests that it puts things into the stash-ish thing for the sub-template
13:58 pink_mist then yes, its arguments are in @_
13:58 mst this is also the same bloody link to the same bloody part of the same bloody documentation I gave you for your last question
13:58 pink_mist but yes, the stash is how you communicate
13:58 mst and it would behoove you to consider the possibility of actually thinking
13:58 Craftmanship it sure is.
13:58 mst rather than inventing crap about @_
13:58 mst when clearly, no, that's not what it's doing
13:58 Craftmanship blocks have things in @_, this is likely where i'm confused
13:58 pink_mist no, blocks don't
13:59 pink_mist subroutines do
13:59 mst yes, yes they do. amazingly enough, the next bullet point in that document mentions this
13:59 Craftmanship lol, ep blocks
13:59 mst pink_mist: reusable template blocks
13:59 pink_mist oh
13:59 mst pink_mist: please consider the context of the conversation
13:59 mst pink_mist: also, would you like some ketchup to go with your foot?
13:59 pink_mist well those are implemented as subroutine callbacks aren't they?
13:59 Craftmanship I believe so.
13:59 pink_mist I just used up my last bit of ketchup 10 minutes ago
13:59 mst the reusable blocks are, yes, that is, amazingly enough, why @_ exists in them
13:59 pink_mist so yes please
14:00 mst anyway
14:01 Craftmanship mst: do you have an rtfm on getting script/$moniker,pl daemon to give me more details?
14:01 mst please be less vague on 'give me more details'
14:01 Craftmanship like, print out requests as they come in, dispatch info, that kind of thing
14:02 Craftmanship maybe something about templates including each other
14:02 Craftmanship the kind of thing that would help me figure out which part of this thing i'm holding wrong
14:02 mst have you considered the possibility that this is perl, so you could just add warn statements?
14:02 Craftmanship in the guts of the dispatcher?
14:02 mattastrophe joined #mojo
14:02 pink_mist wherever you need them
14:03 mst eh?
14:03 Craftmanship that sounds like a recipe for getting my junk trapped in turning cogs
14:03 mst wtf does include() have to do with the dispatcher guts?
14:03 pink_mist I think he moved on
14:03 Craftmanship no, not yet
14:03 pink_mist eh? then I second mst's question
14:03 Craftmanship i was hoping for some comforting debug mode that will tell me everything is ok, up to a point
14:04 Craftmanship like "the request got as far as rendering templtes, which is great" ... so i can be sure which bit i'm fucking up
14:04 mst set the log level on app->log higher?
14:05 Craftmanship and that will end up on STDOUT/ERR when run as daemon?
14:05 mst that would depend on how you configure your logger, one would think
14:05 Craftmanship and with the default settings will end up on STDOUT/ERR when run as daemon?
14:06 mst I would presume stderr
14:06 mst I am not a substitute for reading the docs or for trying things
14:06 pink_mist https://metacpan.org/source/SRI/Mojolicious-6.13/lib/Mojo/Log.pm#L12
14:07 Craftmanship the docs say MOJO_LOG_LEVEL can change that, but i only see "Server available at http://127.0.0.1:3000"
14:07 Craftmanship maybe this is what htat log/ directory is about
14:08 pink_mist yes...
14:08 mst at this point I'm voting for "I can't see your app so I've no idea"
14:08 Craftmanship it's all from templates from a mojo installed 3 days ago
14:10 mst I wish people had to put up a bond to be allowed to say that
14:10 Craftmanship to say they generated their app this morning?
14:10 mst then the 95% of the time they've changed one tiny thing and either forgotten and not realised, they could forfeit the bond to my beer fund
14:10 mst as it is, I'm stuck with "I can't see your app so I've no idea"
14:11 Craftmanship heh, I can imagine.
14:11 mst you can make whatever random statements you like, but I prefer to believe code on a paste site :)
14:11 Craftmanship you might be surprised to learn that my almost 48 hours with mojo has not put me in a good place to decide on an optimal layout for my application
14:12 Craftmanship so the problem is that    include 'view', short => 1 does a my $short, while the application dispatching directly to the template doesn't.
14:13 Craftmanship there is no <%args> because this still isn't mason
14:13 Craftmanship I guess i just have to add a default in the stash and move on with my life
14:15 mst what was wrong if if (stash('short')) { ?
14:15 mst *with
14:16 Craftmanship I can't imagine anything being wrong with that
14:16 pink_mist so what are you whingeing about?
14:16 mst which means you don't need the default
14:16 mst just like I told you last time you asked this question
14:17 Craftmanship I was operating on the assumption that things in the stash were only in lexicals in the ep
14:18 Craftmanship so, now i know that.
14:18 Craftmanship which is good.
14:18 mst eh?
14:19 Craftmanship I was looking for a way to ensure $short was defined, rather than looking for a way to get the value from the stash
14:19 mst why?
14:19 Craftmanship because i'm not very good at this.
14:19 Craftmanship i don't have to tell you that.
14:35 PryMar56 joined #mojo
14:42 * Craftmanship facedesks ... %= include, not % include ...
14:43 punter joined #mojo
14:44 Craftmanship i did manage to write a helper without asking profoundly stupid questions though... so i've got that going for me, which is nice.
14:52 mst it's impossible to write any code without asking at least one profoundly stupid question ... on the other hand, if you managed to answer all of the ones during this particular effort yourself, that's still a win :D
15:02 thowe joined #mojo
15:14 * sri sometimes wonders if maybe the app generator shouldn't generate a log directory
15:34 thowe I need to name PieNg something else when I migrate it to Mojolicious...
15:34 kyshtynbai joined #mojo
16:11 dod joined #mojo
16:16 dod joined #mojo
16:29 melo joined #mojo
16:34 ajr_ joined #mojo
16:40 Adura joined #mojo
17:14 gryphon joined #mojo
17:17 sri the actioncable stuff does not seem very elegant at all https://github.com/rails/actioncable
17:18 sri seems odd the rails people are hyping it up so much
17:20 mst DHH likes it?
17:20 sri dhh made it
17:20 sri it even requires redis
17:20 mst wat
17:21 sri also requires a dedicated server, can't run inside your normal http app server
17:21 mst this looks ... this looks like something nothingmuch designed and none of our doc people re-explained yet
17:23 sri can't even auto-reload during development
17:23 sri we are sooooo far ahead there
17:38 frederico joined #mojo
17:41 Kogurr joined #mojo
17:43 batman sri: +1 on not making "./log"
17:44 batman i think there's too many asking "where is my log".
18:04 good_news_everyon joined #mojo
18:04 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vqASe
18:04 good_news_everyon mojo/master d787ca4 Sebastian Riedel: improve app generator command not to create a log directory
18:04 good_news_everyon left #mojo
18:23 melo joined #mojo
18:25 thowe So, should I delete my log dir to be compatible with the next ver?
18:26 thowe I generally put it in .gitignore anyway....
18:26 batman thowe: hehe. no. not at all :)
18:27 batman it's just to make it less confusing for new users who start the application with "morbo" or something similar and expect log output to screen.
18:30 melo joined #mojo
18:41 dod joined #mojo
18:44 melo joined #mojo
19:04 ajr_ joined #mojo
19:04 ajr_ joined #mojo
19:08 davido__ joined #mojo
19:16 bin_005 joined #mojo
19:35 mattastrophe joined #mojo
19:52 bin_005 joined #mojo
20:04 cpan_mojo Swagger2-0.42 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Swagger2-0.42
20:23 PryMar56 joined #mojo
21:12 thowe I want to have a command line script that can read my DB config and set the initial super user password for my app.  It seems like I recall there being a good way to do this included, but I don't want to have a route or function or whatever that is also available through the normal app interface...
21:13 thowe Can I just use the config plugin on a command line app?
21:13 thowe er script
21:16 bin_005 joined #mojo
21:22 thowe It seems not...
21:25 sri literally a cookbook recipe
21:32 thowe adding commands?
21:36 mattastrophe joined #mojo
21:46 thowe Yeah!  That's awesome.  I added a command \o/  It even shows up in help.
21:46 thowe sri++
21:49 sri actually there's even two recipes that work :)
21:49 sri this too http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Application-embedding
21:50 thowe Huh...
21:50 thowe Well, I think the command will work for me, I'll play with it when I get back home.  Thanks for pointing that out to me!
21:52 sri command is nicer though if it fits into your app
22:39 * jberger is home!
22:39 jberger Yeah commands for setup is super awesome
22:39 jberger That's probably my favorite party of Galileo
22:39 jberger Part
22:40 jberger Ok so immediately after I come back on irc I'm typoing again
22:40 * jberger self-bans
22:50 bpmedley How was the vacation?
23:01 jberger Excellent
23:02 jberger Rustic resort about 15 ft from Lake Michigan
23:02 jberger My family has been going literally since the 1930s
23:11 bpmedley Cool stuff
23:16 _dave_ joined #mojo
23:17 KindOne_ joined #mojo
23:18 thowe What part of Lake Michigan?
23:18 thowe IL, IN, Michigan?
23:18 thowe I grew up in Hammond, which is West of South Bend.
23:18 bin_005 joined #mojo
23:18 Kogurr joined #mojo
23:18 Adura joined #mojo
23:18 kyshtynbai joined #mojo
23:18 stephen joined #mojo
23:18 abracadaniel joined #mojo
23:18 bc547 joined #mojo
23:18 Kundun joined #mojo
23:18 avenj joined #mojo
23:18 vytas joined #mojo
23:18 wingfold joined #mojo
23:18 al joined #mojo
23:18 dotan joined #mojo
23:18 rwp joined #mojo
23:18 btyler joined #mojo
23:18 salva joined #mojo
23:18 d4rkie joined #mojo
23:18 romel joined #mojo
23:18 mattp joined #mojo
23:18 oalders joined #mojo
23:18 icjs joined #mojo
23:18 ashimema joined #mojo
23:18 janus joined #mojo
23:18 bjoernfan joined #mojo
23:18 esh joined #mojo
23:18 Nemix joined #mojo
23:18 mgrimes joined #mojo
23:18 stryx` joined #mojo
23:18 mtj joined #mojo
23:18 oetiker joined #mojo
23:18 cpan_mojo joined #mojo
23:18 garu joined #mojo
23:18 BinGOs joined #mojo
23:18 tempire joined #mojo
23:18 bayashi joined #mojo
23:18 da5id joined #mojo
23:18 phillipadsmith joined #mojo
23:18 spicyjack joined #mojo
23:18 stephan48 joined #mojo
23:18 Foxcool joined #mojo
23:18 Andreas joined #mojo
23:18 ashleydev joined #mojo
23:18 sri joined #mojo
23:18 yko joined #mojo
23:18 augensalat joined #mojo
23:18 tomboh joined #mojo
23:18 bjakubski joined #mojo
23:18 batman joined #mojo
23:18 xdg joined #mojo
23:18 Zx3 joined #mojo
23:18 diegok joined #mojo
23:18 chansen joined #mojo
23:18 salparadise joined #mojo
23:18 ssm joined #mojo
23:18 stephan joined #mojo
23:18 cosimo_ joined #mojo
23:18 hahainternet joined #mojo
23:18 mrEriksson joined #mojo
23:18 Phil21 joined #mojo
23:18 lestrrat joined #mojo
23:18 omega joined #mojo
23:18 kmx joined #mojo
23:18 robinsmidsrod joined #mojo
23:18 jantore joined #mojo
23:18 throughnothing joined #mojo
23:18 upasana_ joined #mojo
23:18 mishanti1 joined #mojo
23:18 ribasushi joined #mojo
23:18 Rallias joined #mojo
23:18 stokachu joined #mojo
23:18 eduardow joined #mojo
23:18 mikegrb joined #mojo
23:18 bowtie joined #mojo
23:18 allison joined #mojo
23:18 s1037989 joined #mojo
23:18 lb joined #mojo
23:18 preaction joined #mojo
23:18 bzero joined #mojo
23:18 tinita joined #mojo
23:18 charsbar joined #mojo
23:18 michael joined #mojo
23:18 Trelane joined #mojo
23:18 lupi joined #mojo
23:18 skaji joined #mojo
23:18 caeles joined #mojo
23:18 meredith joined #mojo
23:18 purl joined #mojo
23:18 pink_mist joined #mojo
23:19 davido__ joined #mojo
23:19 berov joined #mojo
23:19 zivester joined #mojo
23:19 bpmedley joined #mojo
23:19 dustinm joined #mojo
23:19 cstamas joined #mojo
23:19 howitdo joined #mojo
23:19 marcusr joined #mojo
23:19 jnbek joined #mojo
23:19 elik joined #mojo
23:19 yt7fms joined #mojo
23:19 sivoais joined #mojo
23:19 mudler joined #mojo
23:19 jwang joined #mojo
23:19 CandyAngel joined #mojo
23:19 bd joined #mojo
23:19 tianon joined #mojo
23:19 Bender joined #mojo
23:19 DaTa joined #mojo
23:19 mst joined #mojo
23:19 DaTa joined #mojo
23:19 mtths joined #mojo
23:19 gabiruh joined #mojo
23:19 jberger thowe: north of manistee, south of traverse city
23:19 Repaster joined #mojo
23:19 Grinnz_ joined #mojo
23:20 jberger Hmm netsplit
23:20 purl somebody said netsplit was at http://en.wikipedia.org/wiki/Netsplit
23:24 jberger thowe: did you get that?
23:29 jberger Oh and yeah that's Michigan not Indiana
23:37 marty joined #mojo
23:37 absolut_todd joined #mojo
23:38 _dave_ joined #mojo
23:38 howitdo joined #mojo
23:48 gryphon joined #mojo
23:56 Quai joined #mojo

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