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

IRC log for #mojo, 2014-09-13

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

All times shown according to UTC.

Time Nick Message
00:08 jberger I just tried perltidy on forkcall
00:09 jberger http://cdn.alltheragefaces.com/img/faces/large/rage-super-rage-l.png
00:10 jberger seriously, I'm never going to be able to use regular IRC again, inline stuff is too awesome
00:12 compadre joined #mojo
00:12 compadre joined #mojo
00:13 compadre joined #mojo
00:17 * jberger reminds batman about: https://github.com/jhthorsen/mojolicious-plugin-linkembedder/pulls
00:46 preaction joined #mojo
01:01 rmah joined #mojo
01:01 rmah hello
01:02 rmah I'm trying to move my mojolicious controllers into the namespace App::Controller::Foo
01:02 rmah but when routing ->to(controller => 'Foo', action => 'bar'), when the template renders, the stash variables no longer exist (I can see by setting MOJO_TEMPLATE_DEBUT=1)
01:03 rmah I figure I gotta add the new App::Controller namespace somehow, anyone know what method to use?  or is there a better technique?
01:04 klapperl_ joined #mojo
01:05 good_news_everyon joined #mojo
01:05 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/3zdzow
01:05 good_news_everyon mojo/master 3364d2d Sebastian Riedel: the reply->static helper was added too
01:05 good_news_everyon left #mojo
01:05 rmah hello?
01:05 purl well, hello is a function, not a factoid
01:06 preaction it takes more than 5 minutes
01:07 preaction rmah: http://mojolicio.us/perldoc/Mojolicious/Guides/Routing#Namespaces this might be relevant
01:08 preaction oh, hum. it also says MyApp::Controller is supposed to be correct..
01:09 rmah yeah, it ain't
01:09 rmah $r->namespaces(['MyApp::Controller']); makes everything work
01:09 rmah thanks very much
01:09 sri just update you mojolicious
01:10 rmah hey sri
01:18 sri o/
01:45 woz joined #mojo
01:48 Akron joined #mojo
02:27 good_news_everyon joined #mojo
02:27 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/e-2AzQ
02:27 good_news_everyon mojo/master d8707ba Sebastian Riedel: moved some sections in the rendering guide
02:27 good_news_everyon left #mojo
02:46 woz joined #mojo
02:51 noganex_ joined #mojo
03:12 basic6_ joined #mojo
03:25 hesperaux joined #mojo
03:29 d4rkie joined #mojo
03:38 * sri has another idea :o
03:38 sri i think i might bring back an old feature
03:41 rmah what old feature?
03:44 irq joined #mojo
03:47 woz joined #mojo
03:57 jberger rmah: you had to ask didn't you?! :-P
03:58 jberger nn all o/
03:58 good_news_everyon joined #mojo
03:58 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/SKtZNQ
03:58 good_news_everyon mojo/master 22d60dd Sebastian Riedel: added reply->asset helper
03:58 good_news_everyon left #mojo
03:59 sri this updated section describes it http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Custom-responses
04:00 sri i was a little unsure if maybe it went a little too far... but everything fits rather nicely together
04:05 good_news_everyon joined #mojo
04:05 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/hLd_Wg
04:05 good_news_everyon mojo/master 7a989bc Sebastian Riedel: sligthly better description for reply->asset
04:05 good_news_everyon left #mojo
04:06 TyroneShoes joined #mojo
04:09 good_news_everyon joined #mojo
04:09 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/1eNa7Q
04:09 good_news_everyon mojo/master 5182c27 Sebastian Riedel: mention temporary files
04:09 good_news_everyon left #mojo
04:09 sri the old feature is letting assets handle their own mtime
04:10 sri it matters because etag and last-modified valuea are based on it
04:26 d4rkie_ joined #mojo
04:29 d4rkie joined #mojo
04:32 d4rkie joined #mojo
04:35 sri i think it's useful enough, i would want to use it for serving private user specific files
04:37 d4rkie joined #mojo
04:37 d4rkie_ joined #mojo
04:37 sri only real question is if it's useful enough to expose with a helper
04:48 woz joined #mojo
04:50 good_news_everyon joined #mojo
04:50 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Eygk4A
04:50 good_news_everyon mojo/master dd3aadb Sebastian Riedel: added example for custom modification time
04:50 good_news_everyon left #mojo
04:52 preaction i might be misinterpreting this feature, but it seems like this might be something i'd want to route to. route to a Mojo::Asset::Memory object, and then be able to update that object with new content using an IOLoop timer or something. mtime gets set and range/if-modified-since/etags Just Work(tm)
04:55 sri that's pretty much how it works
04:57 sri of course you want to route to an action, not the object
05:19 sri not 100% sure about it yet though... the helper might go away again
05:34 d4rkie joined #mojo
05:35 d4rkie_ joined #mojo
05:49 woz joined #mojo
05:55 mr-foobar joined #mojo
06:07 d4rkie joined #mojo
06:08 d4rkie_ joined #mojo
06:09 d4rkie joined #mojo
06:18 marcus Good morning.
06:18 purl For you maybe.
06:18 * marcus hugs purl
06:18 * purl hugs marcus back
06:18 marcus <3 is in the air.
06:38 ryozi joined #mojo
06:41 KCL joined #mojo
06:50 woz joined #mojo
07:02 _eugen joined #mojo
07:15 d4rkie joined #mojo
07:15 d4rkie joined #mojo
07:17 ceej_ joined #mojo
07:17 phillipadsmith joined #mojo
07:18 chansen joined #mojo
07:20 jalie joined #mojo
07:51 woz joined #mojo
07:55 basiliscos joined #mojo
08:08 Vandal joined #mojo
08:40 jamesaxl joined #mojo
08:50 jamesaxl joined #mojo
08:52 woz joined #mojo
08:59 D4RK-PH0ENiX joined #mojo
09:30 bodgix joined #mojo
09:53 woz joined #mojo
10:31 sh4 joined #mojo
10:32 bodgix left #mojo
10:47 bodgix joined #mojo
10:54 woz joined #mojo
10:57 chansen joined #mojo
11:30 basiliscos joined #mojo
11:55 woz joined #mojo
11:57 preaction joined #mojo
12:03 bodgix left #mojo
12:09 d4rkie joined #mojo
12:56 woz joined #mojo
13:08 basiliscos joined #mojo
13:25 woz joined #mojo
14:00 rmah left #mojo
14:00 cpan_mojo Mojolicious-Plugin-BootstrapHelpers 0.016.000 by CSSON - http://metacpan.org/release/CSSON/Mojolicious-Plugin-BootstrapHelpers-0.016.000
14:19 good_news_everyon joined #mojo
14:19 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/5Ew6Aw
14:19 good_news_everyon mojo/master 7cfd895 Sebastian Riedel: perform more operations on the handle instead of the path
14:19 good_news_everyon left #mojo
14:19 ura joined #mojo
14:19 sri do we have any more opinions on this? http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Custom-responses
14:20 ura Good evening, how can I set raw contents for a node with Mojo::DOM (e.g. for the style node)?
14:21 ura $node->contents($css_code) does not work, it creates a plain text node (which is subject to html escaping)
14:22 sri that method doesn't even have arguments
14:22 sugar joined #mojo
14:24 ura I'm sorry for the typo, I meant 'content' method
14:25 sri the comment example shows how it is done http://mojolicio.us/perldoc/Mojo/DOM#content
14:27 d4rkie joined #mojo
14:27 TyroneShoes joined #mojo
14:30 ura I believe I'm doing the same as in example: http://pastebin.com/yJSHmmd8
14:30 ura but content is not considered as raw
14:31 mikegrb joined #mojo
14:31 mr-foobar joined #mojo
14:37 sri no, you are not
14:37 purl okay, sri.
14:38 Nei content  doesn't seem to work
14:38 Nei try replace("<style>...</style>" instead maybe
14:39 sri hint: the tag is not the same as the raw node
14:39 sri there is more than one way to do it
14:41 ura Nei, thanks, replace is working, but I want to preserve the style attributes
14:41 ura it's possible to hack into tree: http://pastebin.com/XNNSW935
14:42 ura but I  think tree is intentionally not documented as it may change
14:42 sri nooooo!
14:42 sri never touch the tree
14:42 ura I won't, thanks for caution :-)
14:42 sri you really can't figure it out from the examples i linked to?
14:43 sri specifically the 5th
14:43 sri $dom->parse('<!-- Test --><br>')->contents->first->content(' 123 ')->root;
14:44 ura I got it
14:44 sri \o/
14:44 ura I figured out it just before you cited, I'm sorry for my inattention, and thank you very much for the help!
14:51 mikegrb joined #mojo
14:51 sri (quick reminder, i'm only giving indirect answers to find out if the docs need to be improved, not to annoy people)
14:52 sri tempire, jberger, crab, marcus, batman: where do you stand on reply->asset? http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Custom-responses
14:52 Nei I think the explanation "Return this node's content or replace it with HTML/XML fragment or raw content (depending on node type)." is a bit too magical
14:52 Nei maybe it could be refined;)
14:54 sri Nei: and your proposal is?
14:54 Nei as you can see it wasn't immediately obvious to me nor ura and that's because I haven't yet interned the workings of Mojo::DOM
14:58 Nei where is it written when it's raw and what node types etc? I am guessing somewhere, but (probably because I'm too stupid) I have trouble finding my ways around
15:03 jberger sri: with a namespace for reply helpers I'm all for using them
15:03 jberger I think i said as much at the first mention of it
15:05 jberger So that includes asset (static) and any other useful thing we can think up
15:06 sri jberger: so, you think it is useful :)
15:08 jberger I do
15:09 jberger Now that we don't have to worry about helper namespace pollution i hope we can think of other uses for reply helpers
15:10 sri Nei: i though it was obvious which node types are meant :S
15:10 jberger High level usability improvements, as we have done lately
15:11 Nei it doesn't seem obvious why at('style')->content is different from contents->first->content
15:11 Nei even if I can guess that a style node should be raw
15:12 sri ok, how about "(depending on if this node type can contain more nodes)"
15:13 Nei why can a style node contain more nodes?
15:17 good_news_everyon joined #mojo
15:17 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/y8RfGQ
15:17 good_news_everyon mojo/master 5588263 Sebastian Riedel: be more precise about node types in Mojo::DOM
15:17 good_news_everyon left #mojo
15:18 Nei mhmmhm
15:19 Nei print $dom->at('style')->node; # tag
15:20 ura I'm sorry for my impudence, maybe it's better to make $node->content more DWIM? e.g. if node contains a single child and it's raw
15:20 Nei print $dom->at('style')->content('"'); # &quot;
15:20 Nei print $dom->at('style')->contents->first->node; # raw
15:20 ura then content adds 'raw' node instead of the 'text' node
15:21 Nei at least the docs are more clear
15:21 ura (i'm sorry for possible confusion, it's not my reply  but continuation of my previous message)
15:21 TyroneShoes joined #mojo
15:21 sri ura: you're welcome to make a proposal
15:22 ura should I make a pull request?
15:22 sri that would certainly help discussing it
15:22 Nei how is the parser constructed so that the style content is properly treated as raw on parsing
15:23 ura Mojo::DOM::HTML has %RAW hash
15:23 jberger ura: if i understaffed the discussion, i think it's one we have had before
15:23 jberger Understand
15:23 Nei the good thing about the status quo is that it can be explained in less words
15:24 Nei but it's not dwim quite
15:24 jberger The reason not to have return tours that depend on the number of nodes is not having to type check every time
15:24 Nei making it more "intelligent" could lead to other issues
15:24 jberger Dammmit, s/tours/types/
15:25 Nei intelligent word completion;)?
15:25 * jberger is falling at swipe type this morning
15:25 jberger AAAAAAAA
15:25 Nei swipe type is always failing me
15:25 Nei swype?
15:26 * jberger is also falling apparently
15:26 Nei please continue to fall
15:26 jberger Well if i am, someone else is coming with me
15:26 * jberger pushes purl down the stairs
15:26 * purl attaches herself to jberger using suction and a ham straw
15:27 * jberger pats purl
15:27 * purl bites!
15:28 sri botsnack
15:28 purl :)
15:31 ura jberger, Nei, so you think my idea (smart content method) is flawing
15:31 sri ura: if your proposal includes breaking changes, please make sure there's a deprecation path
15:32 jberger I think it is useful in the context you have currently, but it makes large automated scraping or content filtering harder
15:33 * jberger would dislike having to check return types
15:34 ura I see, yeah backward compatibility is important. Other way which would keep compatible behavior is introducing new method 'raw_content'  or adding optional $raw parameter to 'content' method
15:36 ura or maybe use parameter which tells how to interpret content e.g. raw | text | tree
15:38 ura then content can be used as:
15:38 ura $pre_node->content($verbatim_text, 'text');
15:38 ura $style_node->content($css, 'raw')
15:38 woz joined #mojo
15:39 ura and $p_node->content($html, 'tree') would have existing behavior
15:39 tempire +1 for ->asse
15:39 tempire t
15:42 good_news_everyon joined #mojo
15:42 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/czOVxg
15:42 good_news_everyon mojo/master bcdba83 Sebastian Riedel: more diverse Mojo::DOM examples
15:42 good_news_everyon left #mojo
15:44 TyroneShoes joined #mojo
16:18 denis_boyun joined #mojo
16:20 sujithm joined #mojo
16:25 woz joined #mojo
16:36 batman i'm also +1
16:36 batman i just think that you should avoid haveing /etc/passwd as the example... :)
16:37 sri it made you smile ;)
16:37 sri that's the point! ;p
16:37 batman i know this isn't php, but still... people do copy/paste code...
16:38 batman ;)
16:40 lb does leaking /etc/passwd really count as much of a problem anymore?
16:41 lb feels like security through obscurity
16:42 sri yea, i better leak /etc/ssl/server.crt
16:42 lb that's the spirit
16:42 batman sri++ # :D
16:45 d4rkie_ joined #mojo
16:49 woz joined #mojo
16:50 berov joined #mojo
16:56 good_news_everyon joined #mojo
16:56 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/m3xEbw
16:56 good_news_everyon mojo/master 63c991b Sebastian Riedel: use more complete examples in rendering guide
16:56 good_news_everyon left #mojo
17:03 bodgix joined #mojo
17:18 woz joined #mojo
18:06 TyroneShoes joined #mojo
18:06 edestler joined #mojo
18:09 D4RK-PH0ENiX joined #mojo
18:11 TyroneShoes_ joined #mojo
18:28 woz joined #mojo
18:39 batman jberger: i just finished https://github.com/jhthorsen/app-sslmaker, so i might be able to work on linkembedder tomorrow...
18:42 KCL_ joined #mojo
18:49 jamesaxl joined #mojo
18:51 dod joined #mojo
19:03 dotandimet joined #mojo
19:25 dotandimet1 joined #mojo
19:28 * sri was considering $c->reply->redirect with variants like $c->reply->temporary_redirect and $c->reply->permanent_redirect... but who really uses anything else than 302 redirects regularly anyway
19:29 sri $c->reply->moved_permanently (301)
19:30 sri (that's not an argument -.-)
19:30 sri $c->reply->moved_permanently('some_route')
19:44 jberger batman: cool
19:44 jberger Keep up the good work!
20:12 preaction joined #mojo
20:16 irq joined #mojo
20:17 good_news_everyon joined #mojo
20:17 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/5G4c2g
20:17 good_news_everyon mojo/master 00cc64e Sebastian Riedel: fixed a few typos in the tutorial
20:17 good_news_everyon left #mojo
20:19 denis_boyun joined #mojo
20:25 batman jberger: I try my best :) thanks
20:31 hesperaux_ joined #mojo
20:34 batman I wonder who could be qualified to run through my sslmaker code...
20:35 batman I really wonder if it does does things with safe defaults
20:38 sri tempire used to do ssl stuff, but by now he may have forgotten most of it again
20:38 tempire likely
20:40 sri the command list you made is still there :) https://github.com/kraih/mojo/blob/master/t/mojo/ioloop_tls.t#L16
20:41 sri although, i think you made the original list a little earlier (2010/2011?)
21:05 sri apparently freenode has been hacked, everybody change your passwords
21:05 sri this is gonna suck with convos
21:06 sri no indication at all if my messages have actually reached nickserv...
21:09 sri batman/marcus: having those passwords forever in the history is also not good security
21:12 neyasov joined #mojo
21:12 dexteruk joined #mojo
21:20 bobkare joined #mojo
21:21 dexteruk_ joined #mojo
21:22 good_news_everyon joined #mojo
21:22 good_news_everyon [mojo] kraih tagged v5.41 at ad56817: http://git.io/N3GVFg
21:22 good_news_everyon left #mojo
21:24 good_news_everyon joined #mojo
21:24 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/8EzCNg
21:24 good_news_everyon mojo/master 7133ff8 Sebastian Riedel: bump version
21:24 good_news_everyon left #mojo
21:24 cpan_mojo Mojolicious 5.41 by Sebastian Riedel - http://metacpan.org/release/SRI/Mojolicious-5.41
21:26 woz joined #mojo
21:38 jberger I don't have any password on freenode
21:38 jberger why would you?
21:38 purl No, really.
21:38 jberger not you purl!
21:38 purl piss off then, hippie.
21:40 batman sri: which history?
21:41 sri jberger: #perl on freenode has been +r for a long time
21:41 sri batman: convos history, the stuff i typed
21:41 batman oh
21:41 batman make an issue :)
21:41 * jberger doesn't even know what +r means :-)
21:41 sri tons of /msg nickserv in there now
21:41 * jberger is a really bad hacker/geek
21:42 sri jberger: a channel that requires people to be registered with nickserv
21:42 jberger ah
21:42 jberger I never used freenode before the fwbm thing
21:42 jberger and their channel is just open
21:43 sri btw. it happened again, no messages in #perl when they shut down a few servers
21:43 sri looked just like everything was fine in convos, but i had to leave and rejoin to make it work again
21:48 neyasov joined #mojo
21:57 woz joined #mojo
22:20 davido__ joined #mojo
22:28 denny joined #mojo
22:29 woz joined #mojo
22:30 neyasov joined #mojo
22:35 batman sri: the last 30
22:35 batman Commands are stored in history
22:37 woz joined #mojo
22:39 cpan_mojo Task-Kensho-WebDev 0.38 by Karen Etheridge - http://metacpan.org/release/ETHER/Task-Kensho-WebDev-0.38 (depends on Mojolicious)
22:42 neyasov joined #mojo
22:49 Zx3 joined #mojo
23:08 woz joined #mojo
23:10 TyroneShoes joined #mojo
23:35 neyasov joined #mojo
23:39 woz joined #mojo

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