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

IRC log for #mojo, 2017-02-10

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

All times shown according to UTC.

Time Nick Message
00:19 gizmomathboy joined #mojo
00:52 aborazmeh joined #mojo
02:17 kaare joined #mojo
03:28 lluad joined #mojo
03:41 noganex joined #mojo
04:06 asarch joined #mojo
04:21 Grinnz https://www.reddit.com/r/perl/comments/5t3uvn/grepping_out_the_missing_parameters/ddk81ho/?context=1 someone who knows Mojolicious::Validator better than me can maybe comment
04:41 aborazmeh joined #mojo
05:04 dboehmer joined #mojo
05:05 dantti_laptop|2 joined #mojo
05:09 kiwiroy joined #mojo
05:36 asarch joined #mojo
06:08 kiwiroy joined #mojo
06:30 aborazmeh joined #mojo
06:31 Vandal joined #mojo
06:56 polettix joined #mojo
07:06 disputin joined #mojo
07:09 kiwiroy joined #mojo
07:34 dod joined #mojo
07:38 stryx` joined #mojo
08:16 AndrewIsh joined #mojo
08:17 marty joined #mojo
08:31 rshadow joined #mojo
08:36 marcus sri: Splitting out the user agent section into a separate pod file? It's about 30% of the cookbook afaict?
08:39 trone joined #mojo
08:43 sri 949-1379, not even close
08:47 kes joined #mojo
08:49 marcus sri: I could take a stab at it just so we'd see how it would look? Or are you just opposed to the idea?
08:51 marcus (my 30% estimate was from vim, the =head1 was at ~50% mark, and the next one at ~80%
08:52 marcus I guess it'd make UserAgent the 3rd smallest guide, after FAQ and Contributing.
08:53 sri marcus: yea, think i'm opposed for now
08:54 marcus ait
08:56 sri a few FAQ answers could move into a concepts section at the top of the cookbook though
08:56 sri like http://mojolicious.org/perldoc/Mojolicious/Guides/FAQ#What-is-the-difference-between-blocking-and-non-blocking-operations
08:56 sri http://mojolicious.org/perldoc/Mojolicious/Guides/FAQ#What-is-an-event-loop
08:57 sri and this could be merged into it too http://mojolicious.org/perldoc/Mojolicious/Guides/FAQ#Will-my-code-magically-become-non-blocking-with-Mojolicious
08:57 sri then we have a starting point for more event loop teaching material that's not just an FAQ
08:59 sri that's an issue i care much more about that splitting up the cookbook
08:59 sri *than
08:59 stryx` joined #mojo
09:00 marcus sri: Wouldn't that make the cookbook even larger? :)
09:01 marcus Stuffing everything into the cookbook seems like a bad structure to me tbh. makes it harder for people to know where to find the relevant guides.
09:15 sri easier to search though
09:16 sri tbh. i think if we go for more smaller guides we need a new index structure
09:16 sri something easier to browse
09:17 sri like how postgres does navigation https://www.postgresql.org/docs/9.6/static/index.html
09:18 sri right now we can kinda get away with what we have because it's so few guides
09:18 marcus I like that structure
09:18 sri but people already have problems finding the guide to answer their question
09:19 sri once that's no problem anymore i have no objections to smaller guides
09:19 sri POD makes it a harder problem to solve
09:20 * pink_mist would prefer the cookbook to become larger rather than split up
09:21 marcus I suppose. Would be nice to have all the headlines from the pods linked in the overview, but that would be a lot of duplication.
09:22 marcus pink_mist: Why?
09:24 pink_mist most "recipes" are so self-contained that it doesn't really matter if there's hundreds of lines to read outside of the recipe you're looking at, so that means there's not actually much of a *problem* with having a lot of lines there, and having it all in one document makes it easier to find imo
09:25 CHYC The big win for splitting up the cookbook is that Google (other search engines are available) searches will return something meaningful in the large clickable link. Also means it's given higher priority in results.
09:25 CHYC https://www.google.co.uk/search?q=mojolicious+difference+between+non-blocking+and+blocking <- For me the FAQ comes third in this search.
09:25 pink_mist CHYC: well sure, *if* each "recipe" was to get its own page, that would be a plus
09:25 pink_mist I don't think that's what anybody is suggesting though
09:25 pink_mist is it?
09:25 purl it's it!
09:26 * marcus bops purl
09:26 * purl teeny's marcus
09:26 marcus hmm, the 'jump to' bit of the google search is pretty neat.
09:28 CHYC pink_mist: It's not what I'm suggesting either. Somewhere between the two of "FAQ" and individual headings would give a search engine more to bite on. A more targetted title would also give the searcher more confidence it's the correct page.
09:29 marcus google query for 'using mojolicious user agent' doesn't return the cookbook at all for me.
09:35 marcus 'mojo useragent rest' returns it as the second hit tho, which seems reasonable.
09:37 nic another datum: "how to use mojolicious useragent" has cookbook as second item
09:39 metasoft joined #mojo
09:41 marcus third for me, after transactor. #bubbling
09:56 gregf_ joined #mojo
10:08 kiwiroy joined #mojo
10:57 sugar joined #mojo
10:58 bpmedley https://gist.github.com/brianmed/45784c1c49c12780722ee8f57f083fd1 <-- What do y'all think of the .txt file in the gist?
11:09 irqq joined #mojo
11:23 tchaves joined #mojo
12:21 sugar joined #mojo
12:47 salv0 joined #mojo
12:59 sri that is a very creative idea! https://github.com/kraih/mojo/pull/1053/files
13:09 kiwiroy joined #mojo
13:09 sri oops, correct link https://github.com/kraih/mojo/pull/1053
13:25 ufobat joined #mojo
13:36 polettix joined #mojo
13:51 sugar joined #mojo
14:06 ufobat what is the reason why the psgi server is not implemented with the body-callback and responder-callback? ( https://metacpan.org/pod/distribution/PSGI/PSGI.pod#Delayed-Response-and-Streaming-Body ), would that have some kind of drawbacks if your response is actually blocking?
14:09 kiwiroy joined #mojo
14:11 ufobat i just experimented a bit and wrote a differnet psgi server implementation that keeps the $tx until the content is at eof and then closes the $tx, which seems to work, and this seems to fix this issue: https://groups.google.com/forum/#!searchin/mojolicious/async$20psgi%7Csort:relevance/mojolicious/L--K5c6Yt6U/TlXx-lFrFagJ
14:14 stryx` joined #mojo
14:23 px80 guys, thanks for the explanation yesterdays, I really appreciated it.
14:25 px80 just one question (again :-))
14:28 px80 in node.js (sorry for this comparison), when I call some asynchronous function, lets say WebAPI of the browser, this is put instantly into the callback queue and the browser does its work
14:28 px80 after processing all things on the stack, the callback queue is checked by the event loop
14:30 px80 In Mojo, I put things into the callback queue but they arent kicked off yet until I start the loop
14:30 sri ufobat: the psgi binding is not used very much, so we've not spent a whole lot of time optimizing it
14:30 px80 even when those asynchronous calls could be implemented by some C code which could thread in the background
14:31 gryphon joined #mojo
14:31 px80 is that right, what I'am saying there?
14:31 nic I'm pretty sure you don't mean "thread"
14:33 nic Is your observation that in node there's always an event queue running, and in perl there is not necessarily any event loop running?
14:34 px80 I'am focusing with my question on the aspect of 'when doing asynchronous call its immediately kicked off like with a WebAPI versus Mojo its not immediately kicked off until you start the callback queue, which does for this time nothing else'
14:34 rshadow joined #mojo
14:36 px80 Mojo: [code] [asychronous call A] [more code] [event loop starts] [asynchronous call A is getting executed, callback queue is checked]
14:36 sri Mojo::IOLoop uses threads in the background, but that is non e of your concern
14:36 px80 JavaScipt with WebAPI call:  [code] [asychronous call A is instantly executed] [more code] [event loop starts] [callback queue is checked]
14:36 sugar joined #mojo
14:44 ufobat sri, so i am assuming you're not interested in changing the psgi server, or seeing my code?
14:45 sri ufobat: personally, i don't think i have much use for it, but it's a big project, others might care
14:46 sri if it improves performance that's usually an easy sell
14:47 ufobat i dont now if it is faster or not, async seems to work better.. i'd create a new issue with my example code, right?
14:48 sri if you just want to discuss it maybe try the mailing-list first, if it's a finished patch go ahead and make it a pull request
14:50 ufobat i am pretty sure my code needs a proper review first, so yeah, mailing-list! thanks!
14:52 px80 joined #mojo
14:55 tchaves joined #mojo
14:56 px80 joined #mojo
15:02 bit_shifter Is there a simple way to make a CA and self-signed server and client certificates for authentication use?  I can't seem to find the right combination.  I'm getting a "hostname verification failed" error and I don't know where the problem lies.
15:03 sri we have that in the tests actually
15:04 sri there's even instructions for how to regenerate all the certs somewhere
15:05 bit_shifter Ah, is this what you're thinking of? https://github.com/kraih/mojo/blob/42a873e7f6889cf3109accb01e5513e45555a371/t/mojo/ioloop_tls.t
15:10 sugar joined #mojo
15:17 bit_shifter It worked perfectly for me.  Thanks.
15:21 lluad joined #mojo
15:22 gizmomathboy joined #mojo
15:24 px80 joined #mojo
15:39 Janos joined #mojo
16:00 sugar joined #mojo
16:03 dod joined #mojo
16:43 dod joined #mojo
16:44 dikim joined #mojo
16:50 dod joined #mojo
17:00 sh14 joined #mojo
17:34 rshadow joined #mojo
17:35 sugar joined #mojo
17:48 itaipu joined #mojo
17:54 sh14 joined #mojo
17:54 tchaves joined #mojo
17:58 tchaves joined #mojo
17:59 sugar joined #mojo
18:08 PryMar56 joined #mojo
18:13 asarch joined #mojo
18:19 dod joined #mojo
18:25 Janos joined #mojo
18:32 bwf joined #mojo
18:46 tchaves1 joined #mojo
18:53 sugar joined #mojo
19:24 itaipu joined #mojo
19:29 * sri yawns
19:30 rshadow joined #mojo
19:33 irqq joined #mojo
19:33 metasoft joined #mojo
19:47 marty_ joined #mojo
19:50 hartenfels joined #mojo
19:52 rshadow joined #mojo
20:15 kiwiroy joined #mojo
22:37 good_news_everyon joined #mojo
22:37 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vDV3m
22:37 good_news_everyon mojo/master 2e62848 Sebastian Riedel: move a few FAQ answers into the cookbook
22:37 good_news_everyon left #mojo
22:38 sri i think it belongs there
22:38 sri http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#CONCEPTS
22:39 sri and if we come up with more helpful information for getting people to know event loops and stuff, that's the place to put it
22:40 bpmedley sri : That's really cool.  What about adding definitions of concurrent and asynchronous?
22:47 sri a comparison of concurrency and parallelism would certainly be useful
22:48 sri sync vs async seems useless though
22:54 stryx` joined #mojo
23:13 sugar joined #mojo
23:24 litwol Hello
23:24 litwol i've put some templating information in an array. something like listing of blog posts.
23:25 litwol in my template i loop through the array, then feed each blog hash into smaller template for output
23:25 litwol i do see text getting output (yey!)
23:25 litwol thing that bothers me is.. text gets output /literally/ as entered.
23:25 litwol for example if my hash key includes text like "<p>foobar</p>" then in browser i will literally see the <p> tag
23:26 litwol i was expecting p tag would be not humanly-visible and instead be rendered as html element
23:26 Grinnz that is xml escaping which is generally a good default to prevent html injection
23:26 pink_mist wrap things in b() to prevent that
23:26 Grinnz if you are generating the html then output it without escaping (the docs go over how)
23:26 pink_mist assuming you have b() in scope
23:27 pink_mist I expect templates have it
23:27 Grinnz i don't think so
23:27 pink_mist oh
23:27 Grinnz templates have helpers in scope, but it's not a helper
23:27 pink_mist right
23:27 pink_mist litwol: https://metacpan.org/pod/Mojo::ByteStream#b
23:28 Grinnz https://metacpan.org/pod/Mojo::Template#SYNTAX
23:28 litwol oh using b() worked.
23:28 litwol thank you.
23:29 litwol instead of assinging my string as "<p>foo</p>". i used b("<p>foo</p>");
23:29 litwol ty
23:29 Grinnz just make sure you are never outputting user-input without escaping it
23:29 Grinnz at some point
23:29 * litwol nods
23:29 litwol this is just a hoby site (for wife :) ).
23:33 cfedde there is no such thing.  As soon as you have customers it is a production service.
23:35 sri legion was a bit of a letdown.... but damn is the expanse good
23:37 pink_mist tried powerless?
23:38 sri yea, not sure about it yet, could go either way
23:38 pink_mist right =)
23:38 sri might be a bit too silly
23:47 jberger litwol: are you possibly using %= vs %== incorrectly?
23:48 jberger I just watched s1e1 of the expanse
23:48 jberger I barely have time to watch tv lately
23:48 jberger I'm trying to get this blog post out
23:48 jberger and in doing so I keep rewriting my code
23:48 good_news_everyon joined #mojo
23:48 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vDV4n
23:48 good_news_everyon mojo/master 6196804 Sebastian Riedel: use a more realistic reactor example
23:48 good_news_everyon left #mojo
23:49 sri jberger: get a treadmill and watch while running :)
23:49 jberger hate treadmills
23:49 jberger what I need is to download them to my phone and watch while actually walking
23:49 jberger I like walking around the neighborhood
23:49 jberger much nicer
23:49 sri 45 minute episodes make for a good run
23:49 jberger podcasts and audiobooks work nicely there
23:50 jberger yeah, that's true
23:50 jberger who knows, maybe it would be ok
23:52 mrEriksson Hey, anyone using Atom for mojo coding?
23:53 sri me
23:53 mrEriksson If I use Atom to edit static files (.js files in this case), morbo won't pick up on the file being changed
23:53 mrEriksson It is driving me crazy. If I quit atom and touch(1) the file, it is reloaded
23:53 mrEriksson I did not see this when using vim
23:54 jberger what happens if you touch it with atom open?
23:55 jberger (anyway, I don't use atom so if it is an atom thing I won't be able to help)
23:55 mrEriksson Was a while since I debuged this last, just thought I would give Atom another go tonight, but iirc, nothing.
23:56 mrEriksson Actually, just quitting Atom seems to do the trick
23:59 mrEriksson So, edit the file, reload in browser, it does not update. Restarting morbo has no impact either. But exiting Atom and doing browser reload gets things back on track again
23:59 pink_mist did you *save* the edits?
23:59 pink_mist because unless you save the edits, the file won't actually be changed
23:59 mrEriksson Well, yeah :)
23:59 mrEriksson No shit :-)

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