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

IRC log for #mojo, 2015-11-05

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

All times shown according to UTC.

Time Nick Message
00:04 dhg left #mojo
00:15 Nemix Is it a poor direction to try and incorporate Mojo::Pg::PubSub into a POE based application?  I don't know enough currently to say if there is some fundemental reason why this is a bad idea/infeasible.
00:17 zivester joined #mojo
00:22 Grinnz_ Mojo::Pg::PubSub depends on the Mojo::IOLoop reactor, so you'd either need to use Mojo::Reactor::POE or POE::Loop::Mojo_IOLoop
00:22 Grinnz_ either will result in some slowdown
00:23 Grinnz_ i.e. you can only run one main loop, and it needs the Mojo one to be running to receive notifications
00:24 Nemix ok...thanks.   I done a quick test and that explains what I was seeing when subscribed to an event published by an external program
00:30 aborazmeh joined #mojo
01:13 Ptolemarch joined #mojo
01:50 janus joined #mojo
01:52 PryMar56 joined #mojo
02:04 cheesekun joined #mojo
02:07 Ptolemarch joined #mojo
02:48 mattastrophe joined #mojo
02:50 mattastrophe1 joined #mojo
02:58 inokenty-w joined #mojo
03:00 kaare_ joined #mojo
03:56 bpmedley joined #mojo
03:57 bpmedley joined #mojo
04:13 Ptolemarch joined #mojo
05:07 Ptolemarch joined #mojo
05:41 mgrimes joined #mojo
05:54 salparadise joined #mojo
06:39 dod joined #mojo
06:44 dod joined #mojo
07:00 geheimnis` joined #mojo
07:04 dod joined #mojo
07:05 mattastrophe joined #mojo
07:14 Ptolemarch joined #mojo
07:19 dod joined #mojo
07:28 kes joined #mojo
07:29 Vandal joined #mojo
07:31 kes joined #mojo
07:33 kes joined #mojo
07:34 kes joined #mojo
08:01 osfabibisi joined #mojo
08:08 Ptolemarch joined #mojo
08:10 eseyman joined #mojo
08:24 AndrewIsh joined #mojo
08:38 trone joined #mojo
08:50 sri Grinnz_: or POE::Loop::EV
08:51 sri which you maintain
09:02 Ptolemarch joined #mojo
09:15 kes if I have three routes: $r->get( '/1' )->get( '/2' )->get( '/3' ); $r->get( '/1/2' ); $r->get('/1/2/3'). Where I can read how it works and what is precendence?
09:17 kes and why /1/2 works from second route but /1/2/3 works from first...
09:21 pink_mist at a guess: because the first one is ... well ... first
09:21 pink_mist and it doesn't match /1/2
09:21 pink_mist but I'm not really sure
09:22 pink_mist I tend to use ::Lite, so I've never seen ->get('/1')->get('/2')->get('/3') before
09:22 sri oh noes, BinGOs perl 5.14.x boxes are at it again... segfaulting in pod renderer tests :S http://www.cpantesters.org/cpan/report/c02e3ab8-836d-11e5-aab2-8e65cfe82091
09:23 sri 4 reports now that look exactly like that for different combinations of 5.14.x and openbsd
09:27 nic kes: Do "myapp routes"
09:27 nic the first route that matches, wins
09:40 jontaylor joined #mojo
09:41 shadowpaste "kes" at 217.168.150.38 pasted "my_app routes" (9 lines) at http://paste.scsys.co.uk/500991
09:41 kes nic: Why /1/2 does not match first route?
09:42 kes ( /login/af ) in the pasted code
09:43 punter joined #mojo
09:58 Lee kes: i would assume the chained gets are equivalent to '/1/2/3'
09:58 Lee routes are FIFO
09:59 Lee the first route will not match unless the /3 is optional
10:03 kes ok.
10:04 kes What is the benifit of $r->ger('/1')->get('/2')->get('/3' ) over $r->get( '/1/2/3' )?
10:04 nic kes: It looks like you've done something v strange
10:04 Lee if you are doing ->get ->get ->get i would just simplify that to a single get where possible
10:04 nic See how POST to /login is listed twice
10:06 kes where form ->get ->get ->get is usefull?
10:08 Lee if you have routes that share a common base: my $root = get( '/foo/bar/baz' ); my $boz = $root->get( '/boz/ )'; # /foo/bar/baz/boz my $baz = $foo->get('/baz/') # /foo/bar/baz/baz
10:08 Lee s/foo/root/ in that last one
10:10 kes but in this case I can not query to /foo/bar/baz and all conditions/defaults is useless if I have setup them
10:11 kes does I understand  right?
10:12 mgrimes joined #mojo
10:19 nic When our examples switch between /login/af /1/2/3 /foo/bar/baz, it makes it unnecessarily difficult to discuss
10:20 kes nic: =)
10:22 kes Lee says I can easyly add /1/2/3/ 1/2/4: my $root=> $get(/1/2); $root->get(3); $root->get(4)
10:24 kes I say: $root->to/via/etc( ... ) is useless, if because each link (get(3), get(4)) will have its own
10:24 kes and my question: where $root->to/via/etc can  be usefull?
10:25 Lee kes: https://gist.github.com/leejo/0b4b728b0319bfa01665
10:25 Lee note i'm sending to the same controller/method - you would probably point at different methods
10:26 kes maybe you mean $baz/boz ->to ?
10:26 Lee oh yeah, sorry
10:26 kes the question: where $root->to will be usefull?
10:27 Lee you can add an ->under
10:27 Lee think checking auth headers for /api and such
10:28 kes yeah, under is usefull
10:28 kes but I can add it to $r
10:29 Lee updated that snippet
10:31 kes $r->get( '/foo/bar/baz', msh => 'default' )
10:31 kes *msg
10:32 sri kes: i don't know if that was intended, but the smiley there looks rather rude
10:32 sri nic was trying to help you, and explained how your example made it difficult, and you answer with a smiley
10:33 kes oh, sorry. I not trying to be rude
10:34 kes sorry if I were
10:35 kes Lee: will 'msg' passed to /foo/bar/baz/baz ?
10:35 pink_mist I took the smiley as just an acknowledgment that nic was of course correct, didn't seem rude to me
10:36 * sri shrugs
10:36 sri if it was me i would have stopped helping at that point
10:36 nic I did; but 'sorry' fixes it either way IMO
10:37 kes I smile about how much examples were at that point
10:38 kes and nic is right. It difficult to switch
10:38 nic kes: http://mojolicio.us/perldoc/Mojolicious/Guides/Routing#Nested-routes
10:45 kes nic: I saw that before... I reread three times it now and with help of Lee I understand it. Cheers. Thank you Lee, Thank you nic
10:46 nic np
10:47 Lee np also :)
10:51 kes https://github.com/kraih/mojo/compare/master...KES777:nested_routes?expand=1
10:52 kes I think that is missed, because controller/action perceived as something built-in
10:53 kes Can I make pullrequest?
10:55 Lee http://mojolicio.us/perldoc/Mojolicious/Guides/Routing#Minimal-route # i don't see controller/action as being implied - it's explicitly stated that a minimal route requires ->to to get somewhere
10:57 sri kes: no, you are still blocked on github
10:58 nic It's the first time I'm seeing someone try to learn the basics by firing off pull requests
11:08 Ptolemarch joined #mojo
11:10 asarch joined #mojo
11:26 kes http://mojolicio.us/perldoc/Mojolicious/Guides/Routing#Route-to-callback -->execute a callback instead. But here: http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Form-validation in example I see "} => 'index';" What does that mean? after cd run action?
11:27 kes *after callback run action
11:56 nic index is the name of that route
11:56 nic so elsewhere in the code you can do url_for('index')
12:02 Ptolemarch joined #mojo
12:08 neilhwatson joined #mojo
12:21 kes nic: thank you. It is clear now.
12:21 nic cool
12:21 kes When I have error in my template I see: 404 http://site/one/mojo/prettify/prettify-mojo-dark.css
12:22 kes How can I fix that?
12:22 nic note that in a full app, the syntax is slightly different...   ->name('index)
12:22 kes ok
12:22 nic Does only that one file ever get mentioned?
12:23 kes no, many
12:23 kes http://site/one/mojo/prettify/run_prettify.js
12:23 kes logo-white.png, logo-black.png etc
12:23 nic ah, this is PSGI I'm guessing.  In which case I probably won't guess correctly
12:24 nic You say "When I have error"
12:24 nic So if you don't have error, everything works and those static files are found?
12:25 kes no, when there is no error they are not queried at all
12:25 kes I think those links from : mojo/debug.html.ep
12:26 nic yes
12:26 nic For some reason your server isn't serving static files
12:27 kes no, I redirect all to myapp
12:28 nic sorry, I confused things by mentioning 'static files'; these are built-in files
12:29 nic If you put a file into your public dir, is it reachable from the browser?
12:30 nic If you put file foo.png in public then I'd expect it to be reachable via http://site/foo.png or http://site/one/foo.png
12:30 kes Where can I get that file if it is built-in?
12:31 kaare_ joined #mojo
12:31 nic I'm on a small detour; just copy a viewable file into public
12:31 jabberwok joined #mojo
12:32 kes yes
12:32 nic which url worked?
12:32 kes http://site/one/hi.txt
12:33 ajr_ joined #mojo
12:36 nic oh, what is your ->static->paths set to?
12:36 kes nothing changed. standart
12:37 kes public directory same as example application
12:37 nic myapp eval 'say join q{, }, @{app->static->paths}'
12:38 kes [
12:38 kes "/home/feelsafe/public_html/public"
12:38 kes ]
12:38 kes copied from debug.html page
12:38 kes [
12:38 kes "/home/feelsafe/public_html/templates"
12:38 kes ]
12:40 batman kes: don't ever paste multiline
12:40 kes ok
12:40 nic I'm afraid I need to go
12:40 nic I'm sorry I wasn't any help with that
12:40 kes no problem ;-)
12:41 jabberwok use something like http://pastebin.com/ or http://pastie.org/  et al
12:41 jberger jabberwok: pastebin.com is generally frowned upon
12:42 nic If you copy the contents of Mojolicious/resources/public/mojo into public/mojo then I guess it'll work, but that's the wrong solution
12:42 kes <%= flash 'login' %> shows empty line, but session has new_flash => { login => 'value' }
12:42 kes nic: thank you, I will try it as work around
12:42 jberger kes: flash is only used in the next request
12:43 jberger Like for a message after a redirect
12:43 kes I have $self->flash( login => 'value' ); $self->redirect_to( )
12:43 kes that I get empty message. as I were describe
12:44 kes *that = than
12:44 kes *I have described
12:44 jberger That isn't nearly a complete enough example
12:45 kes one moment, I have to past...
12:45 jberger kes: you have asked several interesting questions, especially about psgi deployment
12:46 jberger But you are starting to fall into the "ask lots of questions from the documentation" trap that intermediate users often fall in
12:46 jberger Can I please ask you to go back and read the guides again carefully
12:47 shadowpaste "kes" at 217.168.150.38 pasted "flash is not displayed" (36 lines) at http://paste.scsys.co.uk/501013
12:47 jberger The contain lots of information and I usually recommend reading them a few times before it soaks in
12:47 jberger They*
12:48 nic kes: My top tip: generate all your sample apps....    mojo generate app MyApp
12:48 nic if the generated app does weird things, you know it's your environment that's wonky
12:49 nic if it instead works, build it up slowly from there till you either reach the finish line or else you'll find the step that breaks it
12:49 jberger kes: you set a redirect and then render
12:49 jberger That's not right
12:50 kes jberger: http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Adding-form-validation-checks
12:50 kes I am trying to do from that
12:51 kes I have fixed your notice. return after redirect_to does not help
12:51 nicomen kes: remember what I told you yesterday. redirect_to stes redirection headers for the browser. It wouldn't make sense to render something after it, so just return after the redirect_to like you do on the sub index
12:52 nicomen in the mojolicious example the redirect_to is the last thing in the function, so basically a return
12:55 jberger kes: I recommend you make a simple demo app to test out redirection and flash use
12:56 jberger If only for the reason that then you could show a complete example if it fails
12:56 jberger That said there are plenty of examples both in the docs and in blog posts
12:57 Ptolemarch joined #mojo
12:57 jberger Flash/redirect works fine
12:57 kes I know, too many question from me here ((
12:58 nic Once you work out a productive way to learn, you'll be flying
12:58 jberger Questions are not a problem on their own, however questions that are answered in the documentation/guides do get tiring though
12:59 kes nic: your suggestion does not work. I can not go into sub folder. The nginx says:
12:59 kes trying to use file: "/one/mojo/stripes.png" "/home/feelsafe/public_html/www/one/mojo/stripes.png"
12:59 jberger nic: kes is battling a mounted psgi deployment while trying to learn
13:00 nic yeah, forget psgi while you're learning
13:00 jberger Something I have repeatedly suggested (s)he put off until (s)he knows the framework better
13:00 nic adapting it to psgi (if you have to) should be one of the final steps, once your functionality is working
13:00 kes *He
13:00 nic jberger: It's common usage to put 'they' if gender doesn't matter
13:01 jberger kes: noted, thanks. I don't like to assume
13:01 aborazmeh joined #mojo
13:01 nic putting he/she might seem polite, but some people don't identify as either, and most of the time it's irrelevant
13:01 jberger nic: I suppose that's true too
13:01 nic It's like the Twentieth Century letters saying "Dear Sir/Madam"
13:02 kes the 'one' is the mount point and not the actual directory.
13:03 nic or "Dear Fascist Bully Boy" when addressing a male bank manager [(c) The Young Ones]
13:04 nic kes: Seriously, forget about PSGI while you're learning; run it locally using morbo
13:04 kes ok
13:07 kes can we finish last question with psgi? question about mojo static files
13:07 kes maybe tommorow
13:07 kes *tomorrow
13:16 kes jberger: when I run under morbo, can I simulate mountpoint for my application?
13:19 nic yes, using 'under'
13:19 nic but you're better off not doing so
13:22 kes can you show 'under' in detail?
13:22 hernan605 joined #mojo
13:22 nic it's documented
13:23 nic the only tricky aspect is there are several different ways of using it
13:23 nic so in the docs, if it looks like an example is doing something different, it probably is
13:25 nic I commonly use my $r = app->routes->namespaces(['C'])->under('one');
13:25 nic and then routes are defined from $r as usual
13:26 kes ok. Thank you
13:27 nic (in a full app, s/app/$self/)
13:30 nic jberger: I have an algorithm that needs bytes, not chars.  I'm thinking to encode('utf8'...) beforehand.  Does that seem bonkers or valid?  (I just need a char->byte function with an inverse)
13:31 jberger nic: sure that seems fine
13:31 jberger Assuming your algo wants utf8 encoded bytes
13:31 kes nic: I have fixed 404 for built-in files B-). That was my error in nginx configuration (
13:31 nic thanks
13:32 nic kes: yeah, the same error is easily done via apache too :)
13:33 punter joined #mojo
13:34 nic kes: I _think_ you don't want to use 'under'.  If you simply put your static files in 'public/one/' and serve your dynamic pages from / then things should work when you later mount onto '/one'
13:34 nic but use 'url_for()' rather than putting absolute urls to dynamic pages
13:35 kes the nginx was congigured to process .js, .png by its own
13:35 nic for static pages you can use absolute paths of course
13:35 kes I just say that everything under /one pass to uwsgi
13:36 nic then you're stuck fighting with psgi while learning
13:36 cpan_mojo Mojolicious-Plugin-JQuery-2.14000 by FERRO https://metacpan.org/release/FERRO/Mojolicious-Plugin-JQuery-2.14000
13:36 kes Now I look for how to configure app in my_app script
13:36 nic kes: That's a common and useful nginx config, but with an important modification....
13:37 nic you specify each top-level dir that you want nginx to serve directly, rather than matching on file suffix
13:37 shadowpaste "kes" at 217.168.150.38 pasted "how I configure my app from PSGI" (11 lines) at http://paste.scsys.co.uk/501018
13:37 sri anyone else getting a lot of spam mails from rt.cpan recently?
13:37 nic eg /js /img /css
13:38 sri like https://rt.cpan.org/Public/Bug/Display.html?id=108483
13:39 kes that is very old nginx config, I forget alredy when I have last change it...
13:40 hernan605 joined #mojo
13:40 cpan_mojo Mojolicious-Plugin-JQuery-2.14001 by FERRO https://metacpan.org/release/FERRO/Mojolicious-Plugin-JQuery-2.14001
13:51 Ptolemarch joined #mojo
13:54 cpan_mojo Mojolicious-Plugin-JQuery-2.14002 by FERRO https://metacpan.org/release/FERRO/Mojolicious-Plugin-JQuery-2.14002
14:16 Grinnz sri, a few...
14:17 sri guess i'll flag all mail from rt.cpan as spam
14:17 sri considering all my dists opt-out with github links
14:18 jberger You could setup an auto responder
14:18 jberger :p
14:18 sri ;p
14:18 Grinnz hahah
14:19 sri to be fair, this spam problem is quite new
14:19 sri at least to me, started like a few weeks ago
14:19 jberger People have reported it before
14:19 zivester joined #mojo
14:19 jberger It somehow seems to be limited to certain dists
14:19 jberger Guess mojo made the list
14:20 sri an auto responder does seem reasonable here actually
14:20 sri since you can't opt-out
14:20 jberger schmorp isn't wrong about that, imo, and yet that well is poisoned
14:20 Grinnz it can be limited to "please file issues on the linked github tracker" though :P
14:20 sri my problem with what mlehmann does is only that he won't update his dist metadata
14:22 genio That ^^
14:22 genio refuses to update his metadata and has no real other place to file an issue
14:22 jberger He seems to see those as the same issue, though at this point they are clearly separate
14:22 jberger Rt vs meta data
14:24 jberger His claim is "I shouldn't have to add meta data, rt should be op in instead, and meta doesn't opt out of rt anyway"
14:25 jberger Which was probably valid originally, but now is conflating two different things
14:25 genio Which is a crappy claim as nobody goes, "hey, I think I should go to rt.cpan.org and file a bug!"
14:25 sri you know what, i'm actually with mlehmann on that now
14:25 sri the spam convinced me
14:26 sri rt.cpan is not well maintained and should be opt-in
14:26 jberger I've never disagreed that you should be able to turn off an rt queue
14:26 genio So, the entry point to bug filing is never rt.cpan.org.  It's always at the module.  I do not argue against being able to turn off the module queue in RT though.
14:26 genio That, I think most everyone would agree with.
14:27 sri genio: it's not that simple
14:27 sri i have co-maint on like 500 modules
14:27 sri and get spam from all of them
14:28 sri it's not just stuff i actually control
14:28 genio Who maintains rt.cpan these days?  Is there no way to have a conversation with them to get the ball rolling on changing the behavior?
14:31 sri the one i linked to above (Text::Markdown) i merely packaged for gruber in like 2003 and never touched since
14:32 genio Can't you remove your comaint from modules you don't have anything to do with anymore?
14:32 nic Those cheeky Spanish pythongmongers
14:35 jberger genio: riba disagrees strongly
14:35 jberger Zefram too I think
14:35 jberger For very different reasons
14:35 vervain joined #mojo
14:35 hernan605 joined #mojo
14:36 jberger sri: oh I didn't even look at which queue it was
14:36 sri genio: so i can only receive spam for dists i still kinda care about? ;p
14:37 genio sri: exactly :)
14:37 kes jberger: I found the problem. under psgi the session manager leaves new_flash/flash as is... ((
14:37 kes so flash does not show saved value
14:41 nic have you got it working outside of psgi?
14:43 kes yes
14:44 kes Some where must be note about specific flash at session. So people who implement its own session manager for mojo know about that
14:45 Ptolemarch joined #mojo
14:45 kes http://mojolicio.us/perldoc/Mojolicious/Sessions nothing about flash ((
14:46 nic do you mean you're not using cookies?  (I don't follow the bit about session manager)
14:47 jberger kes: flash is implemented as part of the mojo session
14:47 sri kes: just to be absolutely clear here, what you're doing is not recommended or officially supported
14:47 jberger I have no idea how that would work when implementing your own
14:47 upasana joined #mojo
14:48 jberger Again, much easier to learn the framework, then tweak it layer
14:48 jberger Later
14:48 crab joined #mojo
14:48 genio It seems that you're fighting with the framework at every turn.  Is Mojo really what you need?
14:49 upasana_ joined #mojo
14:52 stephen joined #mojo
14:54 sri heh, i've asked the same earlier
14:55 bd genio: you can in pause, though cpan testers does not seem to get the hint ...
15:00 FatalNIX Lol wat. Monkey patching?
15:00 FatalNIX sounds evil
15:01 nic we don't patch actual live monkeys.  no animals were hurt in the making
15:01 FatalNIX lol
15:02 * genio slowly pulls the sheets over the cages and whistles innocently
15:02 FatalNIX https://www.youtube.com/watch?v=_73NU6OlNuw
15:05 punter joined #mojo
15:08 FatalNIX Huh. This is interesting. I'm seeting functions like render() in Route.pm.
15:11 jberger given a route with placeholders and values for those placeholders, render a path
15:11 FatalNIX :)
15:11 Ptolemarch joined #mojo
15:12 jberger templating is just templating
15:18 FatalNIX I've been interested in looking at how monologues handles routes
15:19 FatalNIX Mojolicious*
15:20 jberger FatalNIX: I havet to admit that while I'm better at it than I used to be, the router is still probably my weakest area of knowledge
15:22 sri Mojolicious::Routes::Pattern and Mojolicious::Routes::Match are the interesting modules
15:23 sri ::Pattern is very self-contained and should be an easy read
15:23 FatalNIX It just strikes my curiosity because my mud codebase I'm writing uses message passing channels that are analogous to vlans.. And I was looking for some ideas that could change my strategy
15:24 FatalNIX Out better it at least
15:27 sh4 joined #mojo
15:29 FatalNIX Wow this pattern matching stuff is more powerful than I thought
15:31 Grinnz_ https://cdn.scratch.mit.edu/static/site/users/avatars/99/8664.png
15:32 FatalNIX Dat monkey
15:33 sri more like http://pablotron.org/files/monkey_patch.jpg
15:33 Grinnz_ hah
15:34 FatalNIX Lol
15:34 kes My appication under PSGI: http://giphy.com/gifs/bug-UAUtB4Oi9U4EM
15:36 FatalNIX Maybe I should just use routes::pattern for letting people match socket input to fun things
15:36 FatalNIX No that wouldn't be very good..
15:38 FatalNIX It might. The slashes in the patterns are absolutely unnecessary aren't they?
15:41 vervain joined #mojo
15:44 * sri stays away from #870 to see if someone else can figure it out https://github.com/kraih/mojo/issues/870
15:59 kaare joined #mojo
16:05 bpmedley joined #mojo
16:06 sh4|2 joined #mojo
16:10 PryMar56 joined #mojo
16:11 zivester joined #mojo
16:14 cpan_mojo Crypt-MagicSignatures-Envelope-0.10 by AKRON https://metacpan.org/release/AKRON/Crypt-MagicSignatures-Envelope-0.10
16:23 dvinciguerra joined #mojo
16:41 jberger I'm assuming that in html mode a <p> closes an open <p>
16:42 Grinnz_ it isn't a block element, so nesting them is a bit nonsensical, but i don't know whether it's supposed to work
16:42 Grinnz_ i take that back, it is a block element, but it can't contain other block elements
16:46 jabberwok Regrettably, the early web was written by folks who saw <p> as being equivalent to "bang the carriage return lever twice."
16:47 FatalNIX we don't talk about <p>
16:47 Grinnz_ yeah there were lots of weird HTMLisms from that
16:47 FatalNIX or is it we don't talk about /p ?
16:47 FatalNIX :)
16:47 Grinnz_ luckily, people dont support IE6 anymore
16:47 * FatalNIX supports mosaic
16:47 FatalNIX all my websites have mosaic support
16:48 FatalNIX As well as basic Netscape Communicator support for those winsock beta users.
16:49 Grinnz_ lol
16:49 * sri can't take html4 serious
16:49 Grinnz_ ahh Netscape Navigator, lives on in spirit in Mozilla Seamonkey
16:49 Grinnz_ http://www.seamonkey-project.org/
16:49 sri *cough* shorttags *cough*
16:50 FatalNIX Netscape Navigator? That's a lot newer than Netscape Communicator :P
16:50 sri <title/The quick brown fox/
16:50 Grinnz_ true i guess it was actually based on Communicator :P
16:50 sri valid html4 \o/
16:50 Grinnz_ sri: lol
16:50 FatalNIX heh
16:50 FatalNIX sri: does Mojolicious support SGML rendering yet?
16:51 FatalNIX :>
16:51 * sri sets FatalNIX on fire
16:51 FatalNIX LOL
16:51 FatalNIX nobody wants to remember SGML..
17:15 vervain joined #mojo
17:39 lluad joined #mojo
17:53 dod joined #mojo
18:06 zeke joined #mojo
18:18 sri zoffix++ # https://github.com/kraih/mojo/issues/870#issuecomment-154128515
18:19 Grinnz_ ^
18:20 sri and for anyone interested, there's actually a hardcoded list for this https://github.com/kraih/mojo/blob/master/lib/Mojo/DOM/HTML.pm#L52
18:24 genio zoffix++ indeed
18:29 sri there is something curious about </p> though that i can't figure out
18:30 sri browsers turn "test</p>" into "test<p></p>"
18:30 sri why is that?
18:31 sri funny thing, bare "</p>" becomes ""
18:32 sri same for "</p>test", becomes ""
18:32 Grinnz_ maybe for the side effect of a newline?
18:33 sri i can't find anything in the spec
18:36 sri https://html.spec.whatwg.org
18:37 sri in case someone wants to join the hunt
18:40 sri yea, can't find anything :S https://html.spec.whatwg.org/multipage/semantics.html#the-p-element
18:40 sri results are the same in chrome and firefox though
18:41 sri makes a quirk unlikely
18:41 kes When I dump validation error I get: ["password", "unknown_user", undef]  What is third value @args is empty and where I can fill it??
18:41 kes *What = Why
18:41 kes I read here: http://mojolicio.us/perldoc/Mojolicious/Validator/Validation#error
18:42 kes In the checker I just do: return 'unknown_user'
18:44 sri another funny thing, "   </p>" also results in ""
18:44 sri so it has to be test that is not just whitespace
18:44 sri s/test/text/
18:56 gryphon joined #mojo
18:58 lluad joined #mojo
18:59 ZoffixW joined #mojo
19:00 ZoffixW sri, maybe it's just a case of vendors comparing their output to each other? Close to the bottom of https://html.spec.whatwg.org/#tokenization I see "An appropriate end tag token is an end tag token whose tag name matches the tag name of the last start tag to have been emitted from this tokenizer, if any. If no start tag has been emitted from this tokenizer, ****then no end tag token is appropriate.***"
19:00 ZoffixW My interpretation would be that such an end tag needs to be discarded
19:01 kyshtynbai joined #mojo
19:04 ZoffixW Oh, never mind. I think I found something.
19:09 sri i've found it too :)
19:09 ZoffixW sri, oh :)
19:09 sri "An end tag whose tag name is "p" If the stack of open elements does not have a p element in button scope, then this is a parse error; insert an HTML element for a "p" start tag token with no attributes."
19:09 ZoffixW Yup :)
19:11 sri wait what
19:11 sri "An end tag whose tag name is "sarcasm" Take a deep breath, then act as described in the "any other end tag" entry below."
19:13 sri not sure if Mojo::DOM::HTML has to handle </p> like that, it's a bit meh
19:13 ZoffixW hah
19:13 trone joined #mojo
19:16 sri btw. same for "test</br>"
19:16 sri becomes "test<br>"
19:17 ZoffixW 0.o
19:17 ZoffixW I don't think Mojo::DOM::HTML needs to bloat itself with these specifics.
19:17 sri so yea, i'd assume some people in the dark ages used it to insert newlines
19:19 sri i guess if someone finds a very simple solution to get </p> and </br> handled in Mojo::DOM::HTML i'd accept a patch
19:20 sri like one extra line max
19:22 ZoffixW Heh http://blog.reigndesign.com/blog/html5s-missing-tag-sarcasm/
19:22 ZoffixW I guess that's why that comment is in the spec. W3C was bugged endlessly to add the <sarcasm> tag :P
19:24 Grinnz_ hahaha
19:53 gtodd joined #mojo
19:54 gtodd once upon a time I had a mojo command that did what  http_this  does ... with one important difference
19:54 gtodd it rendered markdown
19:56 gtodd I think it was a one liner ... now I can't remember how I did it :-|
19:57 roob joined #mojo
19:58 gtodd perl -Mojo -E 'a->tap(sub { $_->static->paths->[0] = "." })->start' daemon    ...
19:58 gtodd ah maybe I prerendered them somehow
19:59 roob Hey guys anyone knows how to use Mojo::Redis2’s subscribe() function sychronously
20:07 vervain joined #mojo
20:31 punter joined #mojo
20:41 roob joined #mojo
20:41 vervain joined #mojo
20:45 cpan_mojo Statocles-0.056 by PREACTION https://metacpan.org/release/PREACTION/Statocles-0.056
20:55 jberger_ joined #mojo
21:21 espent_ joined #mojo
21:24 roob joined #mojo
21:35 sri hmm, firefox developer edition is not bad
21:38 preaction sigh... and this is what i get for ignoring travis because Devel::Cover is throwing spurious errors again...
21:44 vervain joined #mojo
21:46 cpan_mojo Statocles-0.057 by PREACTION https://metacpan.org/release/PREACTION/Statocles-0.057
21:46 lluad joined #mojo
22:34 vervain joined #mojo
22:59 cpan_mojo Mojolicious-Plugin-ErrorsAndWarnings-0.01 by KWAKWA https://metacpan.org/release/KWAKWA/Mojolicious-Plugin-ErrorsAndWarnings-0.01
22:59 borkur joined #mojo
23:14 kyshtynbai joined #mojo
23:34 mattastrophe joined #mojo
23:39 roob left #mojo
23:42 Ptolemarch joined #mojo
23:53 mattastrophe joined #mojo

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