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

IRC log for #mojo, 2015-02-24

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

All times shown according to UTC.

Time Nick Message
00:03 jberger sri: did you see my suggestions mixed in there
00:03 jberger content_nodes or ->nodes->content
00:04 sri franzkafka: i can be, but right now i am not, i've merely thrown your own words back at you
00:05 sri even put them in quotes
00:05 jberger franzkafka: I missed that interjection there
00:05 jberger please keep it professional in here
00:07 jberger rereading the conversation, I don't see any cause for that comment whatsoever
00:08 sri jberger: what is ->nodes?
00:09 jberger some new method that either sets "next action is about nodes" or else holder for some proxy object or something
00:10 sri seems to ignore ->all_contents
00:11 sri what would happen if i did ->nodes->content('foo')?
00:11 tempire ooo
00:11 tempire http://codepen.io/davepvm/full/dPeGqa/
00:12 tempire Much nicer than the existing one.
00:12 bpmedley tempire: Very elegant
00:12 sri much
00:12 ua_ left #mojo
00:12 firnsy _much_
00:12 tempire I wish the camel would die.
00:15 tempire That makes me wonder if mojolicio.us would be better with a code sample higher on the page.
00:16 sri jberger: of course this comes to mind https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes
00:16 tempire Or did we have that before.
00:16 tempire Oh, the T-Shirt thing on the right side looks great with the dotted separator
00:16 Adura Wonder if the Toronto Raptors use Perl...
00:16 bpmedley http://www.nngroup.com/articles/f-shaped-pattern-reading-web-content/
00:19 sri tempire: think it would kill the flow, never tried it though
00:20 sri jberger: ->child_nodes, ->descendant_nodes ;p
00:20 tempire The more I think about it, the more I'm thinking that my dev side would be attracted to a pretty code sample because I can identify with it.
00:20 tempire Though whether to use experimental in the sample would be a huge discussion by itself.
00:21 franzkafka jberger: ok, sorry about that.
00:21 tempire Oh, it's already there.
00:21 tempire nm.
00:21 sri i stand 100% behind the experimental
00:21 sri gotta show signatures
00:21 tempire Actually, experimental doesn't bug me. But use x.x.x is kind of sad.
00:21 tempire Necessary, though.
00:21 jberger tempire: there's my rant
00:22 * tempire wonders if he should put a pretty code sample on his personal site
00:22 jberger sri: ok well if there is no better suggestion, then lets leave it alone
00:22 jberger (I don't hate _nodes, for the record)
00:22 sri jberger: wat? you're saying ->descendant_nodes is not awesome? :O
00:23 sri although
00:24 sri there is the ->next and ->next_sibling thing
00:24 sri ->next and ->next_node would work better there
00:24 sri ->next_node, ->previous_node, ->child_nodes, ->descentant_nodes
00:26 sri we also have ->ancestors
00:26 sri (for which of course there can't be a node variant)
00:27 sri oh, also ->following_siblings and ->preceding_siblings
00:27 sri so ->following_nodes and ->preceding_nodes would fit in very well
00:28 * jberger just used Mojo::DOM to move JIRA issues to ... JIRA, cause it only exports xml and only imports CSV :s
00:28 jberger yeah, sri, I like that direction
00:30 sri so... ->next_node, ->previous_node, ->following_nodes, ->preceding_nodes, ->child_nodes, ->descendant_nodes
00:33 sri fun fact... in the DOM api it is https://developer.mozilla.org/en-US/docs/Web/API/Node/nextSibling
00:34 sri of course the DOM api is famous for it's.... consistency...
00:40 sri look at that linq has a decendantnodes class ;p https://msdn.microsoft.com/en-us/library/system.xml.linq.xcontainer.descendantnodes(v=vs.110).aspx
00:42 sri or just ->children and ->descendants
00:42 * jberger starts writing some FAQ
00:46 sri of course those two kinda suggest that they might only return elements
00:46 sri not that ->contents is much better
00:49 riche Xerces has the same thing
00:50 riche people who live in these type of libraries expect that kind of terminology just fyi
00:51 sri i would be ok with all _node methods, but it doesn't seem to get much support
00:51 riche because it's dry and boring
00:52 sri ->next_sibling is not exactly exciting :)
00:53 riche especially if it's the 4th child
00:53 riche sorry bad "dad" joke
00:53 pink_mist is there a ->first_sibling?
00:53 pink_mist would that make sense?
00:53 sri http://beingadaddy.com.au/wp-content/uploads/2010/09/homer_facepalm.jpg
00:53 riche no
00:54 riche because a sibling requires another in order to be called a sibling
00:54 sri actually, there is ->preceding_siblings->first :)
00:54 pink_mist aha! close enough :P
00:56 riche sri: makes sense because its an operation on a collection
00:59 good_news_everyon joined #mojo
00:59 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AXmM
00:59 good_news_everyon mojo/master a5a6ee4 Sebastian Riedel: better description for all_contents
00:59 good_news_everyon left #mojo
01:00 sri the name ->all_contents kinda bugs me now
01:00 zivester joined #mojo
01:00 sri if there's no consensus i may just use ->descendants
01:01 Grinnz tempire, whjose page is that
01:01 riche hm well why not just use https://dom.spec.whatwg.org and be done with it?  is it worth getting tied up in semantics?
01:01 sri riche: which would be?
01:03 sri https://dom.spec.whatwg.org/#trees
01:03 sri that one is not bad though
01:03 riche nods
01:03 riche they spent a bleepload of time thinking through those conventions
01:03 sri terminology matches most of what we have already
01:04 riche nods
01:06 riche isn't all_contents just the child tree structure serialized?
01:06 sri ohoh
01:06 sri except one problem
01:06 good_news_everyon joined #mojo
01:06 good_news_everyon [mojo] jberger created format_faq (+1 new commit): http://git.io/AXOi
01:06 good_news_everyon mojo/format_faq 7635abc Joel Berger: Additional documentation about file extentions and format detection
01:06 good_news_everyon left #mojo
01:07 sri we already have a ->children method that returns the child elements
01:08 jberger opened a PR for the new documentation: https://github.com/kraih/mojo/pull/745
01:08 sri so it would have to be ->children, ->child_nodes and ->descendants
01:08 riche i guess what I'm saying is allow anything to be serialized ... see "ordered set serializer" in the spec
01:08 jberger PR for comment purposes
01:09 riche hm that may not exactly be what I meant ... basically, it's the stringifier that's needed
01:10 sri jberger: can't say i'm a big fan of all the linking, the answer itself says very little and only links
01:11 jberger yeah, maybe too many links, but I think it does contain the answer, "The file extension is then available via the stash key format."
01:12 sri the addition to the routing guide is the part i like
01:12 sri we say "stash value", not "stash key"
01:13 cpan_mojo Ado 0.81 by Krasimir Berov - http://metacpan.org/release/BEROV/Ado-0.81 (depends on Mojolicious::Plugin::SemanticUI)
01:14 sri riche: afraid i don't know what you're saying
01:17 good_news_everyon joined #mojo
01:17 good_news_everyon [mojo] jberger pushed 1 new commit to format_faq: http://git.io/AXGI
01:17 good_news_everyon mojo/format_faq 2f579a6 Joel Berger: tighten up the format detection faq
01:17 good_news_everyon left #mojo
01:18 sri jberger: the routing guide addition gets a +1 from me
01:19 jberger still don't like the faq?
01:19 Grinnz i would also mention how to turn off the format detection directly in the faq
01:19 Grinnz although that could be tricky to put in text
01:19 sri jberger: no, that one needs work imo
01:19 jberger if you use #placeholder, doesn't that win over format detection anyway?
01:19 sri it does
01:19 Grinnz you might not want either
01:20 Grinnz like in most of my app :P
01:20 jberger Grinnz: if you don't match an extension and don't use it either, who cares if its there?
01:20 sri or you might have ->get("/foo/bar") without a placeholder
01:20 Grinnz because then you get urls which have random stuff at the end
01:20 jberger ah true
01:21 sri the renderer actually uses the format value
01:21 sri so, you might end up with a 404
01:21 jberger yep, thats true too
01:21 jberger me--
01:21 sri because template not found
01:21 jberger Grinnz: why don't you take a whack at the FAQ portion?
01:22 Grinnz i have no idea how to refer to that option as it is now
01:22 Grinnz is that arrayref used for anything else?
01:22 jberger it restricts matches
01:22 sri jberger: commit the routing guide stuff for now
01:22 jberger format is just a stash value
01:22 jberger sri will do
01:23 Grinnz arent stash values specified as a hashref?
01:24 good_news_everyon joined #mojo
01:24 good_news_everyon [mojo] jberger pushed 1 new commit to master: http://git.io/AXnf
01:24 good_news_everyon mojo/master 3879c2f Joel Berger: relaxed placeholders are good for file extensions
01:24 good_news_everyon left #mojo
01:25 jberger Grinnz: arrayref restricts stash values
01:25 Grinnz is that documented somewhere?
01:25 Grinnz i couldnt really find anything specific
01:27 jberger I should say, restricts stash values during matching
01:39 good_news_everyon joined #mojo
01:39 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AXl2
01:39 good_news_everyon mojo/master 366e645 Sebastian Riedel: more consistent links
01:39 good_news_everyon left #mojo
01:43 sri if i was building a router again today, i'm not sure i would make formats a special case again
01:44 sri the cost is quite substantial
01:51 riche sri: I am not aware of the cost you're talking about.  but I can say is that it makes the learning curve steeper than even microsoft mvc, and I personally haven't seen the benefits
01:55 sri complexity of the implementation
01:57 good_news_everyon joined #mojo
01:57 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AX0t
01:57 good_news_everyon mojo/master 618c7b4 Sebastian Riedel: unparsed is a better attribute name
01:57 good_news_everyon left #mojo
01:59 sri ->pattern->pattern was bugging me there too :)
02:00 sri riche: format detection seems to be polarizing, either you love it or you hate it
02:03 jberger once you need it, you love it
02:03 riche personally I just take it as face value, I'm too old to get worked up over stuff like that.
02:03 riche but I see your point
02:03 Grinnz i dont hate it i just wish there was a more direct way to turn it off globally
02:04 Grinnz cause ill never use it :P
02:04 riche I don't have too many left to give:  http://markmanson.net/not-giving-a-fuck
02:05 Grinnz haha
02:07 jberger obligatory http://youtu.be/4r7wHMg5Yjg
02:08 sri :D
02:08 riche that badger doesn't have *any* to give
02:08 riche gheesus
02:11 sri i'm not opposed to a more direct way to turn format detection off
02:11 sri but there are no proposals
02:13 sri btw. re app->default(format => 0), you're mixing up stash values and route constraints
02:15 sri due to the design it is also a lot easier to turn it off than on... making off by default tricky
02:15 purl okay, sri.
02:16 sri as in, you could only enable it per route, with a specific constraint
02:16 riche I'll be blunt to say I don't know what it takes to "build a pragma" but it might work to make it "mojoexperimental"
02:17 sri how does a lexical pragma relate to this?
02:18 sri what would that even do?
02:19 fhelmber_ joined #mojo
02:19 Grinnz sri, fair enough
02:19 riche just thinking out loud.  would its behavior help switch the format detection on/off?
02:19 sri riche: i don't see how
02:20 sri for all i care there could be a $app->routes->without_formats;
02:22 riche hm or lazy load a subclass with the formats stuff implemented .. I don't know how the code is organized so I should just shutup :)
02:23 sri with these kinds of suggestions we should really think about just ripping out format detection
02:23 riche but I wouldn't want a bunch of logic branching that's all
02:23 Grinnz riche, it already has the logic to skip format detection when [format => 0] is provided
02:24 riche ahh gotcha
02:24 riche sri i know this might sound weird but it might be good to setup a poll
02:25 Grinnz what
02:25 sri for a time i've been posting design questions to the mailing list
02:25 riche how many people use it, rely on it, etc.  there might be a whole subculture of format lovers out there not known about
02:25 Grinnz oh, that kind of poll
02:25 Grinnz i thought you were suggesting an IO::Poll for format detection
02:25 Grinnz lol
02:26 riche yah not the long poll kind lol
02:26 sri it was not successful, people only speak up later to complain ;p
02:26 Grinnz yeah thats how it goes
02:26 riche hm it might be the format ... actually I don't like google groups at all, and avoid it as much as possible
02:26 Grinnz i never actually go to the website so its no different from any other mailing list
02:26 riche I get the daily digest, but it has to look super interesting
02:26 riche for me to go there
02:27 riche kayi will (should) be using polldaddy for the conference
02:27 riche create a poll, tweet
02:28 ua_ joined #mojo
02:28 riche https://polldaddy.com/pricing/
02:29 ua_ joined #mojo
02:29 ua_ left #mojo
02:41 klapperl_ joined #mojo
02:41 inokenty-w joined #mojo
02:43 sri but honestly, if nobody cares enough to even propose a better way to turn it off, maybe there really is no need
02:46 jberger sri: could app->routes->format_detection(0) work?
02:46 sri i don't know
02:46 bpmedley Maybe ask the people that complain about format detection to come up with the method name to turn it off.. :)
02:46 jberger bpmedley: I think the method name is the least of the worries
02:46 sri although, i would have preferred app->routes->without_formats;
02:46 bpmedley I agree.  However, it might get a conversation going.
02:46 jberger sri: whatever, I dont especially care about the name
02:46 sri and if it works, i want to see ways to document it
02:46 jberger THAT is where people who care can make there contribution :-)
02:50 sri yea, i can make it work
02:50 jberger Grinnz: you're up!
02:55 sri https://gist.github.com/anonymous/ba23cb028c3eac379a95
02:55 sri now we'll see how much people really care, or if it's all just talk
02:59 absolut_todd joined #mojo
03:03 jberger where did ->route go?
03:05 jberger sri: sub without_formats { $_[0]->pattern->constraints->{format} = 0 or $_[0] }
03:07 noganex joined #mojo
03:13 sri inherited now
03:13 jberger ah
03:28 hshong joined #mojo
03:33 sri worst case would be if the docs get more complicated
03:34 asarch joined #mojo
03:34 sri it can't be just another feature tacked on
03:34 sri you have to sell it as a consistent workflow
03:35 jberger its rare that the "what you have to do to get that included" isn't at least somewhat pointed at me
03:36 sri :)
03:45 jberger disabling format detection in this way isn't a breaking change
03:45 jberger meaning it doesn't block 6.0
03:55 good_news_everyon joined #mojo
03:55 good_news_everyon [mojo] kraih created without_formats (+1 new commit): http://git.io/AX7s
03:55 good_news_everyon mojo/without_formats fd93399 Sebastian Riedel: add without_formats method to Mojolicious::Routes::Route
03:55 good_news_everyon left #mojo
03:55 sri i don't like it
03:55 sri feels inconsistent
03:58 good_news_everyon joined #mojo
03:58 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AX71
03:58 good_news_everyon mojo/master b3308b1 Sebastian Riedel: the route method is no longer necessary
03:58 good_news_everyon left #mojo
04:06 good_news_everyon joined #mojo
04:06 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AX5b
04:06 good_news_everyon mojo/master d3cbf13 Sebastian Riedel: remove auto_render method from Mojolicious::Routes
04:06 good_news_everyon left #mojo
04:08 davido__ joined #mojo
04:11 davido___ joined #mojo
04:21 sri a new placeholder would be a sensible replacement
04:23 sri perhaps even make the #foo placeholder remove a leading dot
04:23 sri ->get("/:foo#format")
04:24 sri and instead of relaxed, it becomes the extension placeholder
04:24 jberger how does that address template rendering?
04:25 sri ?
04:25 jberger I thought part of this was 404 when rendering a format that doesn't have a template
04:26 jberger with a new placeholder I could still pass an accept header
04:26 sri accept header does not end up in the format stash value
04:27 jberger really? how does respond_to work then?
04:27 sri parses the accept header
04:28 jberger but at the time of calling respond_to
04:28 sri yes
04:29 bpmedley http://callsabound.com:3000/ <— Should I open source the backend to this project and keep the frontend (mobile) commercial?
04:29 jberger ok ok ok, so explain the problem to me again then
04:30 sri $c->render(template => 'foo')
04:30 jberger if the route uses :placeholder and someone passes a format as an extension and it 404s because the extension causes a render failure, isn't that what is supposed to happen?!
04:30 sri that call will default to html
04:30 sri *but* if the route has format detection enabled, and gets called with .txt, then the format becomes txt
04:31 jberger and since txt isn't supported, it gets a 404
04:31 sri yes, that is what's supposed to happen now, but is that the right thing?
04:31 sri should it have matched at all in the first place?
04:31 jberger seems like that is what I would want to happen
04:31 jberger will something else match it?
04:32 sri ?
04:33 jberger someone is defining a route like /:placeholder which shouldn't support format detection, but then defines /:placeholder.txt so that it can match when the first one fails?
04:33 jberger I'm not sure I care to bend over backwards to make that possible
04:33 sri the problem is many people don't know about format detection and get it wrong
04:33 sri it's implicit magic
04:34 sri you don't see a format placeholder, yet there is one matching
04:34 bpmedley Perhaps add a ‘lil cookbook recipe for format detection?
04:35 jberger bpmedley: in the docs
04:35 sri it's already there, very bold
04:35 preaction i keep forgetting about it, and wondering why "." doesn't work in my placeholders, because i largely don't care about supporting different formats for a route, but that's just my use-cases
04:35 jberger there are only 3 placeholders, its not like there are 30
04:35 jberger preaction: you were at the talk, didn't people seem impressed by the format detection?
04:36 jberger when I have given that talk, it seems like that is when people start saying "wow this is powerful"
04:37 jberger wow, I'm the contrarian all the time lately it seems :o
04:37 preaction i don't remember, i'm sorry.
04:37 jberger am I being a pain in the ass?
04:38 jberger sri: extension based format detection is the easiest form for command line use
04:39 jberger its the most obvious form that any common user will understand
04:39 jberger (end user I mean)
04:39 jberger (client)
04:45 sri for respond_to you can just do ?format=html
04:45 sri or whatever
04:45 purl it has been said that whatever is left over I just deal with myself, or something
04:49 jberger see to me that is more magic
04:49 sri not really
04:50 jberger accept header and file extension make perfect sense for determining format
04:50 sri respond_to documentation mentions that it uses the format GET/POST parameter
04:50 sri you could just as well call the accept header use magic
04:51 jberger accept header I'd part of http
04:51 jberger is
04:51 jberger file extension is file extension
04:52 jberger can I make the query arg fmt
04:52 jberger ?
04:52 jberger can I use the query arg when posting json?
04:53 sri no
04:53 sri and i don't know what that means
04:54 jberger cases I'm making that the query arg is less consistent than extension
04:54 sri actually that's not true
04:54 sri extensions is the most inconsistent ;p
04:55 sri since respond_to for example only uses the format stash value
04:55 sri there isn't even a direct connection to the extension
04:55 sri the value just happens to end up in the stash
04:56 sri "Automatically select best possible representation for resource from C<Accept> request header, C<format> stash value or C<format> C<GET>/C<POST> parameter"
04:56 jberger I get that
04:56 jberger but in my mind it is the least expected
04:56 jberger perhaps I'm wrong
04:57 jberger ask a random programmer on the street for mechanisms to  request a resource of a specific type
04:58 jberger you will get accept headers and format extension before magic query arg (but that's my guess)
04:59 irq joined #mojo
05:00 sri you're being a bit overly dramatic, we are actually the only framework with that kind of format detection
05:01 jberger I'm not saying others support them, I'm saying ask people a good way to denote a format they want and this would come up
05:01 jberger and we provide that out of the box, and that's cool
05:02 sri we really really need more voices to decide this
05:02 jberger anyway I have been the town shrew too much lately
05:02 sri actually, i appreciate that :)
05:03 sri in case i'm not giving that impression, i do like heated discussions about design questions
05:03 jberger I'm not trying to be :p and me too
05:03 sri allright then ;p
05:04 jberger otter voices?
05:04 jberger other even :p
05:04 * jberger prefers to hear from the underrepresented otter community
05:06 bpmedley I’ve seen some APIs use a .json or .xml to specify a format, so /api/endpoint.json or /api/endpoint.xml.
05:07 jberger sure it's out there in real world apis but do other frameworks provide that our do they have to roll it in each route definition?
05:07 sri http://m.memegen.com/bgphtr.jpg
05:07 bpmedley Dunno.
05:07 jberger sri++
05:08 sri rails has it in ech route definition
05:08 sri "/:foo.:format"
05:11 bpmedley https://github.com/brianmed/CallsAbound <— Here’s the code.  Hopefully doesn’t have my password or worse.  The code is rather awful in places.. :-0
05:14 sri sinatra too, but the patterns are a little more interesting
05:14 sri '/posts.?:format?'
05:18 jberger yeah that's just icky
05:18 jberger anyway gots to sleep
05:18 jberger nn
05:21 davido___ joined #mojo
05:33 sri nn
05:33 brainbuz joined #mojo
05:40 good_news_everyon joined #mojo
05:40 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/A1kx
05:40 good_news_everyon mojo/master 2ff8f16 Sebastian Riedel: the invocant is not actually used
05:40 good_news_everyon left #mojo
05:56 alnewkirk joined #mojo
06:00 bpmedley_ joined #mojo
06:41 marmez joined #mojo
07:03 dod joined #mojo
07:07 dod joined #mojo
07:19 ribasushi joined #mojo
07:36 ribasushi joined #mojo
07:40 reneeb joined #mojo
08:10 eseyman joined #mojo
08:14 Vandal joined #mojo
08:29 trone joined #mojo
09:01 irq joined #mojo
09:13 reneeb_ joined #mojo
09:34 arpadszasz joined #mojo
09:44 reneeb joined #mojo
09:46 zivester joined #mojo
10:11 waghso joined #mojo
10:18 cpan_mojo Mojolicious-Plugin-Model 0.01 by Andrey Khozov - http://metacpan.org/release/AVKHOZOV/Mojolicious-Plugin-Model-0.01
10:22 dotan joined #mojo
10:35 irq_ joined #mojo
10:36 jontaylor joined #mojo
10:50 Lee [debug] 200 OK (-20.166646s, -0.050/s). # WUT? :)
10:52 Lee clock skew?
10:52 purl clock skew is such an edge case... why cause this much grief
10:52 Lee hehe
11:20 Shaeto joined #mojo
11:22 marmez left #mojo
12:12 romel you sould be happy :)
12:27 Shaeto joined #mojo
12:32 amon joined #mojo
12:35 Shaeto joined #mojo
12:40 kaare joined #mojo
12:54 Shaeto left #mojo
13:22 dvinciguerra_ joined #mojo
13:31 Eitz joined #mojo
13:43 mgrimes joined #mojo
14:03 tencendur joined #mojo
14:13 maze joined #mojo
14:14 Adura joined #mojo
14:21 vaewyn joined #mojo
14:25 gryphon joined #mojo
14:30 zivester joined #mojo
14:31 vaewyn Hey all... got a question on optional params being submitted... I have found no pattern but sometimes I get undef from them... and sometimes I get really odd behavior...  details: http://pastebin.com/eQZCkMGL
14:32 vaewyn (these are in form submitted parameters... not URL based ones)
14:32 Grinnz vaewyn, list context issue.
14:34 vaewyn Grinnz: does it assume parameters that are totally not submitted are lists?
14:34 vaewyn I would think it would assume   undef
14:34 Grinnz vaewyn, although Mojo's ->param() should only return a scalar. is your Mojo up to date?
14:34 Grinnz vaewyn, no, a function used in list context can return multiple items into a hash constructor
14:34 Grinnz vaewyn, this was a big issue in CGI based apps a little while ago
14:35 jberger Grinnz: you beat me to it, vaewyn what version of Mojo are you using?
14:35 maze joined #mojo
14:35 vaewyn jberger: 4.63+dfsg-1  (ubuntu package)
14:35 jberger ancient
14:36 jberger and you are right that is a dangerous behavior
14:36 Lee prehistoric
14:36 jberger that's why we removed it
14:36 Grinnz vaewyn, Mojo is heavily developed, i would advise installing a version you control
14:36 jberger Carton is wonderful for this stuff
14:36 Grinnz vaewyn, but to make sure those functions are used in sclar context you can put the keyword "scalar" in front of each call as a workaround
14:36 vaewyn Grinnz: That would be great... but I have several machines I can only control the packages installed... no source etc allowed
14:37 jberger no source? how do you develop?
14:37 Grinnz vaewyn, then you are gonna have a bad time, there are security updates quite often
14:37 vaewyn jberger: our only "source" input is svn/git pulls from our current production HEAD after Q&A
14:37 jberger it still boggles my mind why sysadmins trust a set of third-party packagers so much
14:37 Grinnz vaewyn, developing perl requires being able to install CPAN modules, you can use a local::lib to install them in your home directory or in an alternate directory from the system perl lib
14:38 Lee build perl and stick it in a git repo you control
14:38 jberger Grinnz / Lee: corporate policy isn't something that is likely to be changed by badgering a dev on irc
14:38 vaewyn Grinnz: we don't have home directories or such on the production machines...
14:38 Grinnz jberger, sure, i'm just saying how it is
14:39 Lee jberger: true
14:39 jberger not saying I wish it weren't so
14:39 Grinnz vaewyn, but you have some way to get code there, you could use the same way to get a local::lib there
14:39 vaewyn you can all thank PCI compliance :P
14:40 Lee vaewyn: i worked in a level 1 PCI shop and we didn't have this problem
14:40 jberger and PCI vets all the packages you install?
14:40 Grinnz vaewyn, i'm just saying scripting languages aren't the best choice if you can't make use of up to date modules
14:41 Grinnz i wont bug you more about it :)
14:41 Lee PCI is largely a box ticking exercise
14:41 jberger you know that at least one package of mojo (ubuntu's?) removes the bundled jquery and replaces it with a dependency on their jquery package?
14:41 Grinnz they have a package for jquery?
14:42 Grinnz i wonder if fedora does.. that seems silly :)
14:42 vaewyn so... I guess this brings me to another question...  if we can have automated build tests and such on CPAN...  why can't we have all of CPAN passes automatically made into updated debian/ubuntu packages?
14:42 vaewyn :)
14:42 jberger vaewyn: exactly for that reason, the packagers tinker with things
14:42 Grinnz vaewyn, you'll have to talk to the .deb maintainers about that :P redhat RPMs have the same issue, in the end someone has to do the work
14:42 Grinnz jberger, that, and they dont always convert cleanly
14:43 jberger which is why I have no idea why sysadmins trust them more than the cpan authors themselves
14:43 Lee vaewyn: what jberger said. if you're using a package then your version of a module might not be the same as that on CPAN, even if the version numbers are the same
14:43 fhelmber_ joined #mojo
14:44 Grinnz vaewyn, i used to use RPM packaged modules where i could, but since i discovered cpanm and local::lib i don't bother anymore, it is easier just to install the up to date cpan modules in my home dir
14:44 Grinnz vaewyn, and i leave the RPM packaged ones to be used as dependencies for other RPMs
14:45 jberger Grinnz: cpanm + perlbrew for my tastes, since it handles all the local::lib for me
14:46 jberger vaewyn: policy is what it is, but indeed, you might want to ask your superiors to upgrade
14:46 bobkare jberger: debian has a policy that libraries should only exist once, so when you need to patch a security hole in jquery you do it once, not once per project that bundles it
14:46 crab what should i read about the "my @names = $c->param thing"?
14:48 jberger bobkare: its not that I disagree per-se, but I don't know that everyone is aware that what packages deliver is not the same as what is on cpan
14:48 Lee crab: ?
14:48 jberger it is putting a lot of faith in the packagers
14:49 * Lee has even ranted at fedora-perl in his commit messages :D
14:49 jberger crab: recent commits in github at this point
14:49 jberger let me see if I can find the relevant ones
14:49 vaewyn jberger: that's what always confused me...  cpan -> package should just be "install it here for this flavor of OS" and ignore the other crud
14:49 Grinnz https://groups.google.com/forum/#!msg/mojolicious/aJTYjRCPjOE/QJZB6ORfYJAJ
14:50 Grinnz ^ regarding params as list context
14:50 Grinnz vaewyn, it sounds simple, but it is not always so
14:51 Grinnz vaewyn, for example a cpan package may do some things on installation that are against the packaging policy of a distribution
14:51 jberger crab: https://github.com/kraih/mojo/commit/61f1e703979a9ff2b31b794aeb9a8b18335acbd6
14:52 Lee oh, v6 :)
14:52 vaewyn Grinnz: maybe CPAN should set up a PPA ;)  I think I could easily talk the admins into adding another PPA :P
14:52 vaewyn Grinnz: that also means it wouldn't have to follow policy fully
14:52 Grinnz is than an ubuntu thing?
14:53 jberger vaewyn: hahahaha, you can you use a ppa but not cpan?!
14:53 Grinnz heh
14:53 vaewyn jberger: oddly...  yes...  thank java for that
14:53 vaewyn Grinnz: debian/ubuntu thing
14:53 Grinnz vaewyn, regarding your earlier code, the reason adding || undef fixes it is because that forces it to scalar context
14:53 jberger build a ppa system that bundles from cpan at the last minute :-)
14:54 Grinnz hehe
14:54 jberger build a wrapper around dh-make-deb :)
14:54 vaewyn jberger: something tells me an "in-house" PPA wouldn't get the green light from the auditors...  but it would be hilarious to try
14:54 Grinnz vaewyn, well i hope you figure something out
14:55 vaewyn since PPA are web calls I could make a mojo app to generate them from CPAN on the call :P
14:55 Grinnz now you're thinking with portals
14:55 vaewyn Grinnz: for now I think it is paranoia in coding until I can beat them up
14:56 vaewyn Thank you all for the help and the humor :)
14:56 jberger vaewyn: that was what I was suggesting :-)
14:56 Grinnz i don't think Lee's suggestion of installing a perl (or at least a local::lib) in your git repo is too farfetched, btw
14:56 vaewyn jberger: :)
14:56 Grinnz though if you use that git repo across different OS's or arches then it wont work out :P
14:56 jberger Grinnz: maybe not, but it would still probably get vaewyn on the shit list if not worse
14:57 Grinnz jberger, depends on what they are checking for
14:57 jberger better to convince silly corporate policy wonks of the error of their ways
14:57 vaewyn jberger: I'm good with the TP... ;)
14:57 jberger vaewyn++
14:57 Grinnz jberger, easier said than done :P
14:57 jberger definitely
14:57 Grinnz (while keeping your job)
14:58 vaewyn I'm in higher-ed... much easier to keep your job here :)
14:58 jberger vaewyn: you have this kind of restriction in higher-ed?
14:59 jberger I could do whatever the F I wanted at the university!
15:00 vaewyn jberger: for PCI compliance areas yeah... we are screwed... elsewhere it is the wild west
15:01 vaewyn jberger: and FERPA stuff...  but FERPA is dead simple
15:01 jberger I was in physics research
15:02 jberger one a completely different topic, my sql-fu is failing me
15:02 jberger so I have put MCT online to see if anyone has help for me (tempire?)
15:02 jberger https://github.com/jberger/MCT/blob/master/lib/MCT/Model/Presentation.pm#L32-L36
15:03 Grinnz whats the question?
15:03 purl the question is still how I'd parse that
15:03 jberger it doesn't work right
15:03 jberger :-P
15:04 Grinnz vaewyn, also if you're stuck with that ancient version, i'd give a good look through https://github.com/kraih/mojo/blob/master/Changes
15:04 Grinnz you may find other security issues that you will have to work around
15:04 vaewyn Grinnz: thanks
15:04 jberger this morning, after a good night's rest, I wonder if I should have the REFERENCES not point to the foreign id but the foreign unique value instread
15:05 jberger that would save a lot of the hassle
15:05 Grinnz jberger, that depends if you want it to be easier to refer to or easier to change
15:05 jberger https://github.com/jberger/MCT/blob/master/mct.sql#L18-L19
15:06 jberger those could point to identifier and username instead
15:06 Grinnz jberger, is this postgres?
15:06 jberger yes
15:06 Grinnz ok
15:06 asarch joined #mojo
15:06 jberger identifier is the first part of a conference path /mojoconf2015
15:06 jberger so it must be unique anywya
15:07 jberger and username is unique obviously
15:07 Grinnz jberger, what error are you getting anyway?
15:07 jberger the author isn't being set
15:07 Grinnz jberger, why not make those fields not null?
15:07 jberger if you run the presentations.t test
15:08 jberger doesn't referncing a primary key do that?
15:08 jberger hmmmmmm
15:08 Grinnz if something isnt being set it must be nullable :P
15:08 * jberger is VERY new at postgres and very new to sql in general
15:08 Grinnz you can have a foreign key on a null field, i dont remember if postgres handles that the same way as mysql
15:08 Grinnz in mysql it just means theres no foreign key check for that row
15:10 Grinnz primary key directly is the only one that implies not null afaik
15:11 paulg_ left #mojo
15:12 Grinnz jberger, generally i'd just run one query to get the ids beforehand, it simplifies everything, but i guess in the non blocking case you'd need a little delay magic for that or something :P
15:12 jberger anyway, its better to reference the ids because the other values might change
15:12 Grinnz yeah thats usually the case
15:13 Grinnz jberger, the other benefit of getting the ids beforehand is you can check if they actually exist, rather than waiting for a db error on insert
15:14 Grinnz gotta head to work
15:14 jberger sure, but call it a learning exercise if nothing else
15:14 jberger this should be possible
15:14 jberger yeah, I need to $work too
15:15 Grinnz could just be the name you're passing isn't matching an existing entry for whatever reason, i think postgres does case sensitive matching by default
15:16 tencendur joined #mojo
15:18 vaewyn left #mojo
15:19 dod joined #mojo
15:35 maze joined #mojo
15:43 sri vaewyn: there are known vulnerabilities in that version, i don't think you're pci compliant if you use that
15:44 pink_mist he/she already left :/
15:45 sh4 joined #mojo
15:45 sri :/
15:45 Grinnz_ sri: one can only hope...
15:46 reneeb_ joined #mojo
15:47 sri btw. the removal of format detection is still up for discussion
15:48 Grinnz_ i see you guys discussed that last night...
15:48 Dandre joined #mojo
15:51 sri replacement proposal was turning the #foo placeholder into a special format placeholder
15:51 sri i think i called it an "Extension Placeholder"
15:51 Grinnz_ i like that idea too, it makes it more visible... but can't say i have a lot of ideas on how it should work
15:51 sri "/:foo#format"
15:51 Grinnz_ i've never worked with routing that much before mojolicious to be honest
15:53 sri and then there was this https://github.com/kraih/mojo/commit/fd933990883b
15:53 sri which adds a ->without_formats method to disable format detection
15:53 sri but the docs sucked
15:54 Grinnz_ i dunno, the explanation looks reasonable to me
15:54 sri it has no consistent flow
15:55 Grinnz_ where?
15:55 sri just a random method tacked on
15:55 Grinnz_ befor eit was just a random constraint
15:56 Grinnz_ hmm
15:57 Grinnz_ i think its either that or a "format_detection" attribute if it's going to be changed
15:58 Grinnz_ depends whether the other idea is something thats wanted too
15:58 Ptolemarch joined #mojo
15:59 genio ewww.  SGML is ugly  https://bulk.resource.org/courts.gov/juris/j0102_01.sgml
16:00 Grinnz_ oh god, they're putting web markup in government documents now?
16:01 Grinnz_ doing nothing more than inserting a whole bunch of <p>s where there's already paragraph breaks, looks like
16:01 sri hahahaha, so Dancer2 is now dabbling in event loops... and it's just as terrible as you'd expect
16:02 sri total lack of understanding of the subject matter
16:03 Grinnz_ event loops are hard! :)
16:03 sri https://metacpan.org/pod/distribution/Dancer2/lib/Dancer2/Manual.pod#Delayed-responses-Async-Streaming
16:03 sri gotta link it because it's so bad ;p
16:03 sri blocking functions!
16:03 Grinnz_ oh god
16:03 sri that "done;" really ties it together
16:04 Grinnz_ that looks like its been tacked on with a lot of duct tape
16:12 crab jberger: ok, i read that and i like it.
16:23 sri i hope that doesn't give people new to perl the impression we are all bad at event loops if they encounter that first :S
16:27 sri the worst thing is, it looks quite reasonable to those that don't know how non-blocking sockets behave
16:28 marcus sri: omg
16:28 genio Is there any collaboration of ideas at all between the Dancer dev group and you?
16:28 marcus sri: wouldn't it be nice if it just worked like that tho? =)
16:29 sri marcus: haha
16:29 sri genio: no
16:31 genio hmmm. :/  that's no bueno
16:32 sri a few years ago the original author publically accused me of stealing ideas from him, since then it only went downhill ;p
16:34 sri actually made peace with him in private like two years ago, but now sawyer keeps the feud going
16:34 sri (could also be 3 years... time flies)
16:36 sri normally i don't really care... but in this case, i hope there's no fallout that could reach us
16:37 genio Would it be something you could go around sawyer and talk to the original dev and have him propose fixes to sawyer? (meh, I'll shut up now as I don't know enough to help fix the problem)
16:49 sri Grinnz_: what do you mean with format_detection attribute?
16:50 Grinnz_ sri: $routes->format_detection(0) instead of $routes->without_formats, i'm sure it would be more difficult to implement as a real attribute though
16:51 sri how does the pattern class access that?
16:51 Grinnz_ yeah...
16:51 sri it also seems like bikeshedding
16:52 sri you're ignoring the real problem
16:52 Grinnz_ sri: wasnt saying i preferred that, just that was the only other option i could think of as an interface
16:52 Grinnz_ since you said ->without_formats is inconsistent
16:52 sri how could app->routes->format_detection(0) ever be consistent?
16:53 Grinnz_ either seems fine to me, it is setting an option for the routes
17:03 sri marcus, batman, tempire, crab: we need more opinions on the format thing
17:04 Grinnz_ ^^^
17:04 Grinnz_ all i have is my opinion :P
17:04 sri Grinnz_: i'm kinda getting an apathetic vibe from you though, so i take it you don't really care all that much
17:05 Grinnz_ sri: as ive said i just dont use it, so it doesnt really matter
17:05 sri perhaps i was wrong when i said format detection is a polarizing issue
17:06 sri right now it seems more like some folks love it while the rest just doesn't care
17:06 Grinnz_ i think its surprising that its default is all
17:06 sri that makes it really a non-issue
17:06 sri a global setting won't help much with the surprise
17:06 Grinnz_ i like the idea of making it explicit in the route but that would have to be agreed on
17:06 d4rkie joined #mojo
17:07 pink_mist wait, d4rkie is in here? huh
17:07 pink_mist hi :P
17:07 Grinnz_ sri: right, the global setting thing was just because i think that looks better than setting a [format => 0] in a route
17:07 Grinnz_ that doesn't solve much
17:09 Grinnz_ the FAQ entry would be a good step for that problem
17:09 Grinnz_ jberger had a proposal for that somewhere didnt he?
17:10 sri app->routes->pattern->constraints({format => 0}) actually works in master
17:10 Grinnz_ ooh, thats not bad
17:11 Grinnz_ it makes it clear what it's doing as well
17:11 Grinnz_ well, more clear :P
17:12 sri an attribute like app->routes->pattern->format_detection(0) can work too
17:12 sri *but* there's a new inconsistency
17:13 sri because you need to be able to re-enable format detection on demand with ->get("/foo" => [format => ['html', 'json']])
17:13 sri pink_mist: http://s.mlkshk-cdn.com/r/FNFN
17:13 Grinnz_ yeah, i think the ->pattern->constraints version is simple enough
17:13 Grinnz_ requiring no code changes is a good thing too :P
17:14 pink_mist haha
17:16 jberger Grinnz_: this was my PR
17:16 jberger https://github.com/kraih/mojo/pull/745
17:16 jberger we did include the change to the Routing guide, but as yet have not come up with a FAQ answer we like
17:16 jberger since is was partially merged I closed the PR
17:16 jberger open a new one if you come up with a FAQ
17:17 jberger (you can link to this one tho)
17:17 sri jberger: chicago is a scary place :O http://www.theguardian.com/us-news/2015/feb/24/chicago-police-detain-americans-black-site
17:18 jberger chicago police do not have a great reputation sadly
17:20 jberger though usually if you are white you are fine :(
17:20 sri :S
17:21 Grinnz_ sri: the routes->pattern->constraints version doesn't seem to be working
17:21 Grinnz_ is that not inherited?
17:21 sri Grinnz_: in master
17:21 berov joined #mojo
17:21 Grinnz_ ah
17:22 jberger sri: directions to the site from where I went to university: https://www.google.com/maps/dir/41.8696502,-87.6478924/Chicago+Police+Department-Evidence,+3340+W+Fillmore+St,+Chicago,+IL+60624/@41.8714221,-87.6978053,14z/data=!3m1!4b1!4m8!4m7!1m0!1m5!1m1!1s0x880e3290384dcab7:0x8816ecb487b5d80c!2m2!1d-87.709036!2d41.86826
17:22 sri there is no way though i would mention app->routes->pattern->constraints({format => 0}) in the docs
17:23 sri jberger: eeeeeep
17:24 riche jberger: the ethics committee is probably too busy protecting the rights of drive by shooters, muggers, gangsters, and drug dealers ... after all, chicago is perhaps the most violent city in the US
17:24 Grinnz_ sri: you don't think it is worth showing that instead of "my $inactive = $r->under([format => 0]);" in the routing guide?
17:25 riche maybe oakland beats chicago by a smidge
17:25 jberger riche: don't forget that Gary, IN is usually high up that list too, and it is only just a few miles away
17:26 sri Grinnz_: "$inactive = $r->under([format => 0]);" is a perfectly normal route
17:26 jberger the violence is pretty much only on the south and west sides
17:26 Grinnz_ sri: an extra route to do something which can be set directly, it seems to me
17:27 sri Grinnz_: but not in a standard way that fits the context
17:27 Grinnz_ i'm not sure what that means
17:27 sri the docs never touch the pattern object
17:27 jberger http://blog.lucidrealty.com/wp-content/uploads/2013/07/Chicago-violent-crime-by-neighborhood.jpg
17:27 Grinnz_ ah, that is true
17:27 sri it's never introduced
17:28 Grinnz_ are route constraints introduced somewhere?
17:28 Grinnz_ i feel like they are but i must have missed it
17:28 jberger that is what those arrayrefs in the routing is
17:28 Grinnz_ or, i guess that's the regex stuff
17:28 Grinnz_ yes, but ive never used it because i've never used regexes
17:28 Grinnz_ on the routes, that is :)
17:28 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Routing#More-restrictive-placeholders
17:29 sri and that's exactly what i mean
17:30 Grinnz_ ah i knew i remembered that from somewhere
17:32 Grinnz_ well, i dont really have any further opinion on that... whats the concern with the proposed faq entry?
17:32 reneeb joined #mojo
17:33 sri Grinnz_: you literally participated in the discussion yesterday yourself http://irclog.perlgeek.de/mojo/2015-02-24#i_10165804
17:34 Grinnz_ right, so is that it?
17:35 sri nobody wanted to clarify the answer further afterwards, so the proposal died
17:37 sri in case someone still wants to try, this was the final version https://github.com/kraih/mojo/pull/745/files#diff-6a59fdd2c679b5a7795c8f6bdc5681cfR228
17:38 sri to me it doesn't really illustrate the problem properly
17:41 sri i would want to see something like "Mojolicious routes automatically take file extensions like C<.html>, remove the leading dot, and store the result in the C<format> stash value..."
17:41 sri and then point at stuff to avoid that
17:43 sri perhaps include the motivation too, which is better content negotiation
17:44 * tempire supports it
17:48 Grinnz_ sri: should it go at the end because it's newly added, or above so that all the error messages are grouped at the end?
17:54 Anon021 joined #mojo
17:55 sri tempire: "it"?
17:55 purl hmmm... "it" is dbix-class.org?
17:55 sri purl: i don't think so
17:55 purl sri: huh?
17:57 sri Grinnz_: above all the error messages
17:57 sri almost forgot about the other 6.0 topic
17:57 sri new names for $dom->contents and $dom->all_contents
17:58 sri the one proposal i liked would involve a lot more renaming though
17:58 sri ->next_node, ->previous_node, ->following_nodes, ->preceding_nodes, ->child_nodes, ->descendant_nodes
17:59 sri to make the node navigation methods obvious
18:00 sri as opposed to ->next, ->previous, ->children, ->ascendants... which give you elements
18:00 sri oh and ->preceding, ->following
18:01 irq joined #mojo
18:02 jberger purl: forget "it"
18:02 purl jberger: I forgot "it"
18:03 sri currently it is ->next_sibling, ->previous_sibling, ->preceding_siblings, ->following_siblings, ->contents, ->all_contents
18:04 sri i also liked a plain ->descendants for ->all_contents
18:05 sri that leaves a bit of inconsistency with ->contents though
18:05 sri (->children is already taken, for the element returning variant of ->contents)
18:06 csson joined #mojo
18:07 Grinnz_ sent pr, the commits might be a little wonky cause i rebased to resolve the merge conflict but i think it worked lol
18:07 jberger I support _nodes
18:07 riche purl is getting a bit bitchy today
18:07 sri botsnack
18:07 purl :)
18:08 jberger I think too often since adding the node methods, new users that just want to do some quick hack use the wrong ones
18:08 sri yea
18:08 Grinnz_ +1
18:08 purl 1
18:08 * jberger throws purl down a well
18:08 purl seven days
18:08 Grinnz_ wat
18:09 sri funny thing is the DOM API actually mixes it all... .childNodes and .nextSibling
18:09 riche that's just plain creepy
18:14 punter joined #mojo
18:14 sri Grinnz_: i like that version more
18:15 sri for discussion https://github.com/kraih/mojo/pull/746/files
18:17 jberger "Standard placeholders" probably should be "Generic placeholders" since that is what it is called in the Routing guide
18:17 sri indeed
18:17 jberger commented there
18:18 sri oh noes! i hope this doesn't mean fast perl signatures get shot down :/ http://code.activestate.com/lists/perl5-porters/218218/
18:18 jberger then again, if we wanted to call them "standard" I might agree (and change the guide)
18:18 jberger generic could mean "everything"
18:19 sri guess i would be ok with calling them standard too
18:20 sri the tutorial just calls them placeholders, without prefix
18:21 preaction if only rurban could present arguments like zefram...
18:21 sri the word "generic" is not used very often at all in the docs, i guess they all can be replaced with standard
18:22 jberger if only ruban cared about functionality that exists or is on the horizon
18:23 jberger he is always interested in protecting the type bound variables that he assume someone will write eventually
18:23 sri jberger: +1 for replacing generic from me
18:23 jberger Grinnz_ should be able to fold that into the same PR
18:28 disputin joined #mojo
18:29 disputin joined #mojo
18:31 Grinnz_ done
18:32 ignacio_ joined #mojo
18:34 jberger Grinnz_++ for everything except the commit message :-P
18:34 Grinnz_ rofl.
18:34 Grinnz_ oops
18:53 ignacio_ joined #mojo
18:56 bobkare joined #mojo
19:05 disputin joined #mojo
19:07 bpmedley_ joined #mojo
19:08 sri jberger: don't want to commit the s/generic/standard/ change?
19:08 jberger ?
19:08 jberger merge you mean?
19:09 Grinnz_ sri: i wrote it backwards in the commit msg
19:09 sri jberger: no, you wanted to replace the word generic everywhere in the docs, no?
19:09 jberger its now in the PR
19:10 sri oh
19:10 punter joined #mojo
19:11 jberger I'm +1 on the PR if you are
19:11 sri the commit message is wrong
19:11 sri gotta re-check the faq answer, i'm only +1 on the standard change so far
19:12 sri "a C<.> character" implies singular, no?
19:12 jberger Grinnz_: you can fix the commit message and force-push
19:12 jberger sri: form a linguistic standpoint? yes
19:12 sri s/Mojolicious/L<Mojolicious>/
19:13 sri at the end it says "the C<.> character"
19:13 sri that seems more appropriate
19:13 marcus oOo (.) (.) oOO
19:14 Grinnz_ yeah, i i agree
19:14 Grinnz_ -i
19:15 sri maybe s/configuring/customizing/
19:15 sri it's not configuration really
19:15 sri "to match the C<.>"
19:15 Grinnz_ yeah, i was just using it as a verb... customizing works as well
19:15 sri oops
19:16 sri "to match the C<.> character as well." at the end maybe
19:17 sri and s!<Mojolicious::Guides::Routing/Formats>!L<Mojolicious::Guides::Routing/"Formats">!
19:18 Grinnz_ "to include the C<.> character in matching"?
19:19 sri for the relaxed placeholders link, i don't think the verbatim title fits the context, in the routing guide i've used "L<relaxed placeholders|Mojolicious::Guides::Routing/"Relaxed placeholders">"
19:19 Grinnz_ yeah that works
19:19 sri Grinnz_: sounds awkward imo
19:20 sri "to allow matching of the C<.> character as well."
19:21 Grinnz_ i don't like "as well", it implies a connection with the first part of the sentence because of the "or"
19:21 sri i guess "to allow matching of the C<.> character." works too
19:22 sri "to match the C<.> character." sounds cut off
19:22 Grinnz_ yeah, allow matching is better
19:28 sri i like that
19:29 sri jberger: +1
19:29 purl 1
19:29 sri although... the question
19:29 dod joined #mojo
19:29 * sri still likes "Where did my file extension go?" :)
19:29 jberger do I deserve that +1?
19:29 jberger sri++
19:29 sri jberger: you were waiting for my vote
19:29 jberger ah
19:30 jberger Grinnz_: I like that question better too
19:30 Grinnz_ the shorter one?
19:30 jberger you'll note that in my original PR I mentioned that the question was ... well, in question
19:31 jberger Where did my file extension go?
19:31 sri DUDE, WHERE'S MY FILE EXTENSION?
19:32 Grinnz_ it does fit better with the other questions i think
19:32 sri marcus: dude, what does mine say?
19:34 jberger http://www.moviepilot.de/files/images/0390/3219/ey_mann_poster.jpg
19:34 sri jberger: ok, +1 now on the current version
19:35 Grinnz_ haha, is "ey mann" an actual phrase?
19:35 sri it sure is
19:35 Grinnz_ because thats almost english
19:36 jberger https://translate.google.com/#auto/en/ey%20mann%20wo%20is'%20mein%20auto
19:36 jberger google translate doesn't know that
19:36 Grinnz_ lol
19:37 sri works for me
19:38 sri "ey man where is"
19:38 jberger ey is not english
19:38 Grinnz_ well, that's the "almost english" part :P
19:38 jberger hey is probably what it means
19:38 jberger anyway, I'm still +1 on the PR
19:38 jberger so I guess I'll merge
19:39 sri well, google translate was trained by the internet, not the oxford english dictionary
19:39 sri jberger: do it
19:39 jberger well THERE's your problem
19:39 good_news_everyon joined #mojo
19:39 good_news_everyon [mojo] jberger pushed 7 new commits to master: http://git.io/A9sU
19:39 good_news_everyon mojo/master 9b9aa6a Joel Berger: Additional documentation about file extentions and format detection
19:39 good_news_everyon mojo/master 89b0df9 Joel Berger: tighten up the format detection faq
19:39 good_news_everyon mojo/master f0cd53a Dan Book: update FAQ entry
19:39 good_news_everyon left #mojo
19:40 cfedde Uff Da
19:40 sri whole reason they turned off free google translations for webmasters was that it was teaching google translate its own shitty translations :)
19:40 Grinnz_ hahah
19:40 Grinnz_ i use bing's translate api for my bort
19:40 Grinnz_ my bot, too
19:41 Grinnz_ (cause google's isnt free)
19:41 bpmedley_ joined #mojo
19:41 good_news_everyon joined #mojo
19:41 good_news_everyon [mojo] jberger deleted format_faq at 2f579a6: http://git.io/A9GU
19:41 good_news_everyon left #mojo
19:43 sri jberger++, Grinnz++
19:44 sri http://mojolicio.us/perldoc/Mojolicious/Guides/FAQ#Where-did-my-file-extension-go
19:45 Grinnz_ oops, that link is broken
19:45 sri omg!
19:45 sri jberger: !
19:46 Grinnz_ whats the syntax error? it looks right in the source
19:46 Grinnz_ wait
19:46 sri missing L
19:46 Grinnz_ oh the formats link, not the other one
19:46 Grinnz_ lol
19:47 jberger fix coming
19:47 good_news_everyon joined #mojo
19:47 good_news_everyon [mojo] jberger pushed 1 new commit to master: http://git.io/A9cd
19:47 good_news_everyon mojo/master 24df60a Joel Berger: fixed pod formatted link
19:47 good_news_everyon left #mojo
19:48 sri jberger: botched again, the line is 80 chars long now ;p
19:48 jberger !
19:49 Grinnz_ i thought 80 was ok :P
19:49 sri nope 79
19:49 sri don't ask why
19:49 genio does line length actually still matter?
19:49 sri ohoh
19:50 sri holy war about to start :o
19:50 Grinnz_ lol
19:50 cfedde 80 char was good enough for IBM punch cards it's good enough for us.
19:50 jberger sri: it is 79 now
19:50 sri jberger++
19:50 Grinnz_ jberger: youll have to fix the routing guide too then
19:51 Grinnz_ line 123
19:51 Grinnz_ lol
19:51 jberger I didn't change anything
19:51 * genio will continue to internally facepalm at line length limits in POD
19:51 Grinnz_ standard is one character longer than generic :P
19:51 sri jberger: was about to say
19:51 sri Grinnz_: OMG
19:52 sri you savages
19:52 genio It makes editing long POD with lots of grammatical errors more painful than need be.  I was banging my head against the wall when updating IO::Socket::SSL
19:53 Grinnz_ eh, once i got used to gratuitous use of home/end it wasnt so bad
19:53 jberger genio: there are actual line-length limits in pod?
19:54 cfedde There were some rules that were invented back when nroff text was edited on hard copy terminals.
19:54 genio jberger: no, just conforming to standards of the project
19:54 jberger genio: in my own code, I do like I did in LaTeX, one line per sentence
19:55 good_news_everyon joined #mojo
19:55 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/A944
19:55 good_news_everyon mojo/master 40da44f Sebastian Riedel: no more than 79 characters per line
19:55 good_news_everyon left #mojo
19:55 Grinnz_ i keep it to 80 just because i dont use wordwrapped text editors so it looks nicer
19:55 Grinnz_ for pod, anyway
19:55 genio atom all the things
19:55 Grinnz_ jberger++
19:55 jberger sri: both of those looks like 79 chars to me
19:56 sri they were not
19:56 jberger is vim lying to me?
19:56 genio I have a little visual indicator in my editor at 80 chars, yet meh.
19:57 Grinnz_ hmm actually... now that i look at it, nano starts the column index at 1
19:57 sri btw. here's the official rule https://github.com/kraih/mojo/blob/master/.perltidyrc#L4
19:57 Grinnz_ lol
19:57 Grinnz_ i think those were 79
19:57 jberger Grinnz_: I do have wordwrapping in my editor, but I have a widescreen monitor.
19:57 jberger If I actually make it to wrapping the line, the sentence is probably too long anyway
19:57 Grinnz_ true
19:58 Grinnz_ sometimes it cant be avoided with some links and such though
19:58 * genio wants to be evil and start a spaces vs tabs indentation war
19:58 jberger for me having the clean commits (not having to rebalance lines in a paragraph) trumps column limits
19:58 Grinnz_ genio: ehehe
19:58 jberger but these aren't my rules here
19:58 sri oops, you're right
19:58 jberger genio: you aren't a tabs guy are you?!
19:58 Grinnz_ jberger: yeah i can see that, but github highlighting makes it clear enough IMO
19:58 * Grinnz_ is a tabs guy
19:59 jberger AAAAAAAAAA
19:59 sri lol, i've got it wrong apparently ever since i've been using atom
19:59 Grinnz_ sri: ditto with nano
20:00 genio I'm a tabs guy.  I can set my tab width to as many spaces as I want and have all code look like my preferred indentation no matter where or what I'm working on.
20:00 Grinnz_ so in a roundabout way, the 80 char limit i thought i was using was actually the 79 char limit it should have been
20:00 genio if spaces are used, I'm at the mercy of the project
20:00 jberger unless you are reading it on github, then it makes it all HUGE
20:00 Grinnz_ github needs a tablength setting
20:00 Grinnz_ 8 char tabs are just barbarism
20:00 jberger or you could just use spaces like the civilized world
20:01 Grinnz_ too many characters!
20:01 genio 8 spaces are death and 2 are equally as bad.  I can't use either.  I need 4
20:01 jberger vim maps my tab key for me
20:01 Grinnz_ i dont mind 2-space tabs if it's consistent in the project
20:01 jberger <2
20:01 jberger :P
20:02 genio I will ultimately conform to whatever project I'm on.  Just don't mix them and be consistent.
20:02 Grinnz_ if you really want to be a rebel, do 3 or 5 space tabs
20:02 jberger genio: that is most important
20:02 sri btw. the limit is still used these days so you can have multiple windows next to each other
20:02 * jberger sets Grinnz_ on fire
20:02 jberger sri: get more monitors
20:02 jberger :-)
20:03 Grinnz_ also, i still use spaces for lining up indentation stuff, because otherwise it looks screwed up under a different tabsize :P
20:03 Grinnz_ i.e. fat commas in a hash constructor or whatever
20:04 * genio tries to imagine working in Java or C# with an 80 character limit.  someLengthyObjectInstanceNameWithHorribleCamelCaps.doTheseThingsInAReallyWordyFunctionName(yay);
20:04 Grinnz_ oh god
20:05 Grinnz_ except replace "yay" with "new AbstractFunctionFactoryGenerator()"
20:05 cfedde Programmers are pretty good at solving the problems their tools cause.
20:08 marmez joined #mojo
20:11 sri yay... versions... "File::Spec version 0.8 required--this is only version 3.48_01"
20:15 jberger z. o. m. g.
20:15 genio developer releases F with version comparison?
20:16 jberger version.pm has been having troubles lately
20:16 cfedde perl -E 'say v3.48_01 > 0.8?"yay":"boo"'  # how odd.
20:16 Grinnz_ @_@
20:17 cfedde perl -E 'say v3.48_01 gt v0.8?"yay":"boo"' # yay!
20:17 Grinnz_ i think version.pm needs to have some developer releases
20:17 Grinnz_ cfedde: version->declare('v3.48_01') > version->parse(0.8)
20:18 Grinnz_ although, the initail one didnt have a v so you could probably parse both
20:23 * sri wonders if he can fix his line length screwup with a script
20:24 jberger sri: you mean find 78 char lines that could be 79?
20:24 jberger or less than 79 that could be 79?
20:24 sri yea :)
20:25 jberger hahaha, enjoy
20:25 sri i don't think it's hard
20:25 jberger its only pod right? perltidy handles the rest
20:25 sri just check position of last char, then compare to length of first word on next line
20:26 sri something that just points the mistakes out to me would be enough
20:26 sri just pod
20:26 sri and i guess Changes
20:27 sri although POD is the important part
20:27 sri "important" ;p
20:29 sri actually gonna look through Changes manually to see how much i screwed up
20:29 sri can't be that much
20:35 Grinnz_ https://github.com/kraih/mojo/commit/9b9aa6a52bd68997c69ea2cdd5bc1698d36c85da#commitcomment-9901920 lol oops, forgot to update the link
20:35 Grinnz_ i wonder why my grep didnt pick that up
20:35 Grinnz_ wait...
20:35 purl there's more!
20:35 sri oh my, lots of fail today
20:35 Grinnz_ thats not the final version
20:35 Grinnz_ lol
20:35 Grinnz_ nevermind
20:35 purl Well piss off then, Grinnz_
20:35 Grinnz_ indeed, purl
20:35 purl indubitably
20:36 sri botsnack
20:36 purl :)
20:36 Grinnz_ i didnt even put the link to that one in my version because i figured the user already knows about placeholders if they have this problem :P
20:40 jberger Oh, for pete's sake
20:40 purl you mean ffs
20:41 Grinnz_ lol
20:41 Grinnz_ for frank's sake!
20:41 mst for flying fornication's sake
20:42 Grinnz_ that phrase just reminds me of that video of the guy teaching the usage of "fuck" to japanese people
20:42 jberger mst: thats fffs
20:42 Grinnz_ and they all pronounced it as "sa-key"
20:42 Grinnz_ "fuck sakey?"
20:43 mst I find "WHAT THE FLYING FORNICATION" is a useful thing to yell if you think 'WHAT THE FUCK' would get you into trouble
20:43 sri omg, i was so wrong, there is line length fail everywhere!
20:43 Grinnz_ lol
20:44 sri seriously, if you want your github avatar tacked on every file in mojolicious, fixing line length is totally the way to go
20:56 jberger since sloc doesn't count doc lines anyway, and the lines are "less than 79" is it really worth doing? not that I care :-)
20:56 good_news_everyon joined #mojo
20:56 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/A9AS
20:56 good_news_everyon mojo/master 0dea7b0 Sebastian Riedel: fix line length in Changes
20:56 good_news_everyon left #mojo
20:57 sri IT'S EVERYWHERE!
20:59 sri i might try making a script later
21:00 sri certainly wouldn't reject patches if someone else is faster
21:00 sri (but mention if you're trying)
21:01 riche hm I need to decompress for a while ... is it just perldoc?
21:04 d4rkie joined #mojo
21:08 sri yes
21:12 riche wow amazing like every pod
21:12 riche okay fun ;)
21:15 riche hm perhaps not like I thought ... I need to check len on pod render not raw file lol
21:16 SCMaster joined #mojo
21:17 jberger riche: i think the raw file is what we are talking about
21:17 SCMaster joined #mojo
21:19 riche really? okay that's easier
21:19 riche cuz I was looking at formatted pod and the result is worse
21:20 cpan_mojo Ado 0.82 by Krasimir Berov - http://metacpan.org/release/BEROV/Ado-0.82 (depends on Mojolicious::Plugin::OAuth2)
21:21 mst could you not just run the text blocks of the POD through your 'fmt' binary?
21:27 jberger riche: pod renderers, like latex and html, don't care about line length or simple whitespace (repeated spaces, single newlines etc)
21:27 sri ok, i'm trying too now :)
21:27 riche mst: I just checked that and for whatever reason it's messing up some code blocks
21:27 riche for example I just tried on Tutorial.pod
21:27 mst riche: well, yes, that's why I said 'the text blocks'
21:27 mst riche: if you ran it on the code blocks as well, you did something random and unrelated to my suggestion and I'm unsurprised it didn't work :P
21:28 mst riche: http://trout.me.uk/almost.gif
21:30 riche mst not sure what you're getting at this is just pod with some code samples in it
21:31 mst riche: right. and POD has special stuff like '=head' and then it has plain text paragraphs and then it has code blocks and then it has lists
21:31 mst riche: I suggested running fmt on the plain text paragraphs only.
21:31 mst one could achieve this by, for example, using a POD parser of some sort
21:31 riche shrugs I have emacs I don't need that
21:32 mst I was thinking that scripting it might be useful for the future
21:32 mst if you'd rather do it by hand, fair enough
21:41 sri think i have a rather reliable script now
21:41 Grinnz_ oy
21:41 Grinnz_ Uncaught SecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.
21:42 Grinnz_ guess im gonna have to set hypnotoad to tls lol
21:44 jberger Grinnz_: you are using a reverse proxy?
21:45 sri riche: do you have something that works?
21:45 sri otherwise i'll start letting mine run over the code
21:46 jberger I have that working for client <-- ssl --> nginx <-- no-ssl, localhost only --> hypnotoad
21:47 riche sri: just go ahead, I was using emacs
21:48 Grinnz_ jberger: unfortunatley, the server is apache 2.2
21:48 Grinnz_ and there is no way that will be changing
21:49 * mst rather likes the look of opsmate's titus
21:49 jberger Grinnz_: you were giving vaewyn a hard time about cpan, and yet you are stuck on apache?
21:49 jberger :p
21:50 Grinnz_ at least we can update cpan modules!
21:50 mst there's nothing wrong with apache for a lot of use cases.
21:50 Grinnz_ as long as none of those use cases are "websockets" or "configuration that is easily understood"
21:50 mst nginx is great for single-purpose things
21:50 sri apache is in trouble with http/2
21:51 mst if I already know I'm going to need my web server to do complicated things, I'll use apache
21:51 jberger mst/Grinnz_ I was really just poking about the conversation from earlier
21:52 mst jberger: fair. it's just I've done some things with apache that simply would not have worked under anything else, so I get a bit defensive of it :)
21:52 Grinnz_ personally i would be quite happy if i never had to use apache again
21:53 Grinnz_ theres nothing ive done with apache that i dont already know how to do with nginx
21:53 jberger on the serious conversation
21:53 chansen joined #mojo
21:53 jberger I have been using nginx a lot lately and it seems to have everything I could need so far
21:54 jberger I'm curious what advantage apache has (and I'm not knocking it, just curious)
21:54 punter joined #mojo
21:54 Grinnz_ it has everything built for it already
21:54 cfedde It's older.
21:54 jberger other than some of the deep hooks, which apache provides, which I guess could be something
21:54 Grinnz_ php, mod_perl, cgi, fastcgi, you name it
21:54 Grinnz_ of course, all of those are pretty bad
21:55 cfedde most of those are things that we don't tend to need much anymore.
21:55 cfedde though cgi is handy.
21:55 Grinnz_ right which is why it doesnt matter if nginx supports them fully
21:55 Grinnz_ unless you need it for legacy reasons
21:56 cfedde for new deployments I'm not sure I'd choose apache.
21:56 cfedde depends how you are doing your AAA I suppose though.
21:56 mst I think my policy of "nginx if I expect nginx to be sufficient, apache if I expect crazy shit to be involved" works quite well
21:57 romel hi everyone. i am seing the following message in morbo output: Mojolicious::Controller::render_exception is DEPRECATED in favor of the reply->exception helper at /home/romel/perl5/perlbrew/perls/perl-5.20.2/lib/site_perl/5.20.2/Mojolicious/Controller.pm line 36. what should i do? Mojolicious version is 5.82
21:57 cfedde mod_authnz_ldap is pretty convenient.
21:57 jberger mst: that's what I'm asking, which crazy shit is useful?
21:57 mst riche: switch to calling the thing it tells you to call instead.
21:57 mst bah
21:57 mst romel: ^^
21:57 mst romel: the error message tells you. did you read the docs for the helper?
21:58 mst jberger: this is like asking 'why is CPAN useful?'
21:59 mst in general, it's a different thing every time.
21:59 jberger oh, because people have written apache extensions
21:59 romel mst: the problem is that i don't call render_exception by myself. it appears on every exception generated by my application
21:59 mst romel: so find out waht *is* calling it.
21:59 romel alright, i'll try. thanks
21:59 mst romel: Devel::Confess may help you there
22:00 mst jberger: and because the core has a *lot* of features if you know how to stitch them together
22:00 reneeb joined #mojo
22:01 gryphon joined #mojo
22:06 cfedde As with any software system. Deciding how to distribute behaviors across modules is a mix of experience and opportunity.
22:07 jberger is it batman's birthday?
22:07 jberger lets assume so
22:07 jberger happy birthday batman!
22:07 cfedde March 30
22:11 jberger my contact info says today
22:12 sri didn't we do that already a few weeks back? congratulate batman even though it wasn't his birthday?
22:12 mst cfedde: no, that's -my- birthday
22:12 cfedde mst: you are batman?
22:12 sri busted
22:12 batman jberger: thanks! :)
22:12 jberger sri: yes, it was his gf's
22:13 jberger haha!
22:13 mst cfedde: multiple people in here have seen me and him in the same room.
22:13 mst so clearly not
22:13 sri happy birthday batman's gf!
22:13 jberger have a great day batman (and gf :o )
22:13 batman sri: haha. hers is 10 months away :P
22:14 cfedde who is batman's girlfriend?
22:14 batman jberger: yeah. it's over in 45 minutes... it's been exhausting :P
22:14 batman cfedde: http://splashpage.mtv.com//wp-content/uploads/splash/2013/09/Vicki_Vale.jpg
22:14 mst batman: you're getting old.
22:14 cfedde http://www.mtv.com/news/1725027/batman-75th-anniversary-birthday-date/
22:15 Grinnz_ jberger: i cant reproduce it but i'm seeing zombie processes show up forked from morbo... it looks like it happens when two fork calls happen simultaneously, one exits and the other zombies while the worker hangs... but a lot of fork calls happen simultaneously and dont seem to be a problem
22:15 Grinnz_ so i dunno...
22:15 batman mst: yeah 2**5
22:15 batman and it's getting late.
22:15 mst batman: so you're older than me til March 30 :)
22:16 batman mst: hehe. i'm always older than you. unless i die first :/
22:16 mst 1983 geek vintage best geek vintage.
22:16 jberger 0x20
22:16 batman mst: yeah. me, you and the cd player was born.
22:16 batman what a year
22:16 purl a year is short
22:16 jberger me too! # 83
22:17 jberger good year for perl geeks
22:17 batman jberger: yeah! that's right :)
22:21 Grinnz_ jberger: im wondering if morbo killing its worker off all the time might cause something like that, but in that case the forked process should just get assigned to init and reaped
22:22 good_news_everyon joined #mojo
22:22 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AHV8
22:22 good_news_everyon mojo/master 80fbf18 Sebastian Riedel: fix line length in guides
22:22 good_news_everyon left #mojo
22:22 Grinnz_ why is this stuff so hard :P
22:22 jberger Grinnz_: what forking from forked processes, gosh I don't know :-P
22:22 Grinnz_ hehe
22:23 riche what is getting the most mileage ... Mojo::Reactor->detect->new or being explicit thru the environment?  I see it's explicit in the unit test
22:23 Grinnz_ riche: you can't do the former if you're using Mojolicious or the event loop has already been started
22:23 sri get off my lawn! # 81
22:24 Grinnz_ dat commit, and thats just the guides?
22:25 riche yah I'm going to try and use Mojo::IOLoop as a simple tcp server replacement ... no Mojolicious (so far at least)
22:25 cfedde kids. The lot of ya.
22:26 Grinnz_ riche: then you can assign to Mojo::IOLoop->singleton->reactor before starting the loop
22:26 cfedde I have t-shirts that are older than you.
22:26 riche yah all day been wondering what happened with the mojoconf splash
22:27 Grinnz_ riche: are you trying to use a certain reactor or did i interpret wrong?
22:28 batman so..i'm back in norway, but i'm not back in business. (hopefully i'll be back stronger tomorrow - irc-wize)
22:29 riche i am just looking for path of least resistance ... need to focus on writing new tests to work with this
22:29 dvinciguerra joined #mojo
22:30 riche batman: act went nowhere
22:30 batman riche: which means noone responded?
22:30 riche BOOK responded but couldn't do anything
22:30 jberger riche: I still have hopes for MCT, but I need help with a bit of sql
22:30 riche the "only admin" didn't respond
22:31 riche jberger: just tell me where it is I will look at it
22:31 batman riche: yeah. act is awesome.
22:31 jberger I was chatting about it earlier, let me see if I can find the log
22:31 batman riche: did you try in #act ?
22:31 jberger riche: http://irclog.perlgeek.de/mojo/2015-02-24#i_10168821
22:31 Grinnz_ jberger: did setting not null constraints get you anything more useful?
22:31 riche batman: well, I didn't think something that's like the perl conference poster child would have such ... well ... sophomoric support
22:31 jberger Grinnz_: nope
22:32 riche anyways
22:32 batman riche: do not underestimate the awfulness of act.
22:33 Grinnz_ jberger: but it made the query fail, right?
22:33 Grinnz_ instead of inserting nothing?
22:33 Grinnz_ or null, rather
22:33 batman riche: sorry. i need to get my beauty sleep. maybe sjn can help with getting in touch with act..?
22:33 batman be-back-in-twelve-hours
22:33 batman *afk*
22:34 jberger Grinnz_: nope
22:34 Grinnz_ ???
22:34 jberger zero rows affected
22:34 jberger something else must be wrong
22:34 Grinnz_ something is wrong here
22:34 Grinnz_ insert always inserts a row or has an error by default
22:35 Grinnz_ where is your _query method?
22:35 jberger in the base class
22:35 jberger MCT::Model
22:36 jberger just abstracts blocking vs non-blocking
22:36 jberger since essentially all my calls can use that pattern
22:36 Grinnz_ Mojo::Pg enables RaiseError by default so it should die
22:38 Grinnz_ ok, i guess it is possible to insert 0 rows if the select returned 0 rows
22:38 Grinnz_ but i'm not sure how that would be possible in this case
22:38 Grinnz_ the row is explicitly defined
22:41 Grinnz_ jberger: just to make sure, can you run that query manually (in psql) and does it work? with dummy values for the ?s
22:41 riche hm i don't work with postgres but that select looks fishy ... isn't it INSERT INTO (...) VALUES (...)
22:42 Grinnz_ INSERT INTO table (...) SELECT ... works also
22:42 jberger you know, I haven't tried it manually :s
22:42 jberger yes SELECT can work
22:42 jberger in fact VALUES is just a SELECT that doesn't need a FROM
22:43 riche that would be helpful ... first do the 2 sub selects
22:43 riche make sure they're cool
22:43 Grinnz_ well, SELECT doesn't need a FROM either, as in your query :P
22:43 jberger riche: except its not working :-)
22:44 Grinnz_ jberger: what version of pg btw?
22:44 jberger $ psql --version #  psql (PostgreSQL) 9.4.1
22:45 jberger is the psql version the same as the server?
22:45 Grinnz_ if they were installed together, sure
22:45 jberger or else how do I tell
22:45 jberger they were
22:47 hernan604 renatoCron from #sao-paulo.pm said ->as_string from Mojo::DOM does not work
22:47 hernan604 and he must do .""
22:47 hernan604 and documentation says it should work
22:47 Grinnz_ input/expected output/actual output?
22:47 hernan604 fyi*
22:51 Grinnz_ jberger: have you tried with VALUES((SELECT ...), (SELECT ...), ?, ...) ?
22:54 jberger hernan604: http://mojolicio.us/perldoc/Mojo/DOM#to_string
22:55 Grinnz_ right, thats the other problem, it's not called as_string :P
22:58 bobkare jberger: haven't gotten around to trying mojo::pg yet, so not sure how well this works there, but a useful debug tool for DBI is to run with DBI_TRACE=3 and see exactly what query is sent with what values, and what that returns. and have you tried running that query manually?
23:00 jberger :o
23:00 jberger I had made a real stupid
23:00 jberger username vs author
23:00 * jberger hangs head
23:00 Grinnz_ hahaha
23:00 Grinnz_ there is an username field though?
23:00 xdg is the mojoconf 2015 organizer online here?  nick?
23:01 jberger Grinnz_: for the record, your VALUES( (SELECT), (SELECT) ...) is what I'm using now
23:01 jberger xdg: that's riche
23:01 Grinnz_ jberger: from what i understand they compile to the same thing, but VALUES makes it clearer you're not actually selecting from anything :P
23:01 xdg riche, I got a message via NY.pm on Meetup.com. Was that you?
23:02 xdg (claimed to be from "Ka Yi Ho")
23:02 d4rkie joined #mojo
23:02 jberger if it wasn't, riche might still want to chat with you
23:02 jberger oh
23:02 jberger Ka Yi works for riche
23:02 jberger she is doing the heavy lifting
23:02 jberger but isn't on irc (much)
23:03 jberger xdg ^^
23:03 xdg np.  I told her to email me.  But riche should know my nick just in case.
23:03 xdg and yes, NY.pm will help cross-promote.  :-)
23:03 Grinnz_ jberger: i'm still confused why that wouldnt throw a db error though. if it didn't find a match, that select should return null and it should throw a not-null constraint error
23:03 * xdg must go play some poker at $company casino night &
23:04 jberger Grinnz_: it did finally
23:04 jberger which is what helped me catch it
23:04 Grinnz_ ah ok
23:04 jberger I'm not sure why it didn't before
23:05 bobkare jberger: overlapping id ranges so it just inserted random garbage? I don't see how that query could ever return 0 rows
23:05 Grinnz_ jberger: i'd still recommend finding a way to do those id queries beforehand. you dont want to rely on a db error to find invalid values
23:06 jberger Grinnz_: hmmmmmm
23:07 jberger this is happy path right now, because we want to get this out soon
23:07 jberger but you may be right eventually
23:07 Grinnz_ i just come from a long history of not wanting stuff in my error log when people typo :P
23:12 Grinnz_ btw bobkare Mojo::Pg is just a wrapper around DBI, the DBI handle is available as $pg->db->dbh
23:13 jberger Grinnz_: true I hadn't considered db logs spam
23:14 Grinnz_ jberger: well in my case the more pressing issue is throwing "server error" at the user instead of something helpful :P
23:14 bobkare yeah, but it uses the pg_async stuff, right? Is the DBI_TRACE output from that as readable (or unreadable depending on your perspective) as for normal prepare/execute?
23:14 jberger Grinnz_: that I'm willing to accept for no
23:14 jberger ww
23:14 Grinnz_ jberger: yeah i figured
23:14 jberger mostly this is going to be rest api
23:14 Grinnz_ bobkare: never tried
23:15 Grinnz_ bobkare: i don't imagine it's much different
23:18 good_news_everyon joined #mojo
23:18 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AHxW
23:18 good_news_everyon mojo/master 1e8865f Sebastian Riedel: fix line length everywhere else
23:18 good_news_everyon left #mojo
23:18 Grinnz_ #thelinelengthening
23:20 riche k back
23:21 jberger riche: you missed xdg asking for you
23:21 jberger he's from NY.pm
23:21 riche yah saw it
23:21 jberger oh ok
23:21 riche kayi says irc is worse than the AS/400 she had to work on in a "previous life"
23:21 Grinnz_ hahaha
23:22 Grinnz_ what client did you have her using?
23:23 riche no she was on the buy side at jones NY
23:23 Adura Is that the same kayi that tweeted at Scott Morrow?
23:23 riche ohhhh irc client
23:23 Grinnz_ huh?
23:23 purl well, irc client is irssi or nothing
23:23 riche lol
23:23 Grinnz_ lol
23:24 Grinnz_ purl: irc client is also weechat for cool people
23:24 purl okay, Grinnz_.
23:24 riche she uses mac so i got her setup on the same I use on mac ... jirc
23:24 Grinnz_ ah, i've never heard good things about mac irc clients :/
23:24 Grinnz_ there is a hexchat build for mac now but i havent gotten anyone with a mac to try it
23:25 riche lol yah exactly ... and i usually use emacs irc but it sucks on mac too ... even with the same .emacs file
23:25 riche anyways
23:25 riche jberger: mystery solved?
23:26 jberger riche: yes
23:26 jberger also, I wish we could get her on convos
23:26 jberger so easy
23:28 Adura Mac users don't use irssi? odd.
23:28 Grinnz_ Adura: doesn't go over so well with the non-commandline-savvy folk
23:29 Grinnz_ i dont even like using CLI irc clients... i just use one at work so i dont have to use one locally
23:31 riche the last time I used command line irc client, except when using emacs in terminal, was like 1996
23:31 jberger riche: I did use textual for a while before I got my port forwarding worked out
23:31 jberger seemed nice enouhg
23:31 Grinnz_ i think its a combination of too many layers of abstraction (irc -> client -> terminal program, with tmux thrown in for good measure) and that i just like GUIs when dealing with selecting text
23:31 jberger http://www.codeux.com/textual/
23:32 jberger but seriously, convos
23:32 jberger <3
23:32 jberger ok, now I have CRU (no D yet, but thats ok) for conferences users and presentations tables
23:33 jberger I still want to add an "attendees" table
23:33 jberger but after that we should be good to start prototyping pages
23:35 jberger attendees will join conferences and users and have columns like registered and paid
23:36 Grinnz_ 1 to 1 relationship with users right?
23:36 jberger yes
23:36 jberger a user might have more that one entry in attendees, for different conferences tho
23:36 Grinnz_ oh, i see
23:37 Grinnz_ so its a representation of that user's attendance of a conference
23:37 jberger ACT does multiple conferences simultaneously
23:37 jberger I wasn't originally going to, but it turns out not to be too much harder
23:37 d4rkie joined #mojo
23:37 Grinnz_ i just did that twice on two separate projects
23:38 Grinnz_ a slight refactor to do multiple stuff at once :P
23:38 jberger I already needed a table entry for conference data
23:38 jberger so why would there be only one row?
23:38 jberger I guess it could have been config data
23:39 Grinnz_ right, if it was a single conference app
23:39 Grinnz_ but this way you can update details easier anyway
23:41 good_news_everyon joined #mojo
23:41 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AQUW
23:41 good_news_everyon mojo/master cc2ba7c Sebastian Riedel: use more consistent terminology in Mojo::DOM for method names
23:41 good_news_everyon left #mojo
23:41 sri ok, it's all _node and _nodes methods now
23:42 jberger \o/
23:46 sri i guess descendant_nodes could also be called find_nodes ;p
23:46 sri since find is the element version of descendant_nodes
23:47 sri that relationship is not visible from the names right now
23:48 sri children and child_nodes is a little better, but also not as good as next and next_node for example
23:48 jberger makes sense (re find_node)
23:49 sri of course, a find method that doesn't take arguments is also odd :)
23:52 sri ->descendants might make the most sense after all ;p
23:52 sri of course the _nodes is missing then
23:52 sri hmm
23:54 sri no, i guess it makes sense the way it is
23:54 sri http://mojolicio.us/perldoc/Mojo/DOM#toc

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