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

IRC log for #mojo, 2016-10-17

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

All times shown according to UTC.

Time Nick Message
00:08 asarch joined #mojo
00:47 aborazmeh joined #mojo
02:03 noganex_ joined #mojo
02:32 aborazmeh joined #mojo
05:09 polettix joined #mojo
05:15 lluad joined #mojo
05:25 inokenty-w joined #mojo
05:48 mpapec http://blog.polettix.it/dokku-your-tiny-paas/
05:48 mpapec http://code-maven.com/cmos-16-jan-henning-thorsen-and-marcus-ramberg
05:49 mpapec Convos crew FTW :)
05:54 ashimema joined #mojo
06:07 dod joined #mojo
06:12 dod joined #mojo
07:06 AndrewIsh joined #mojo
07:07 Vandal joined #mojo
07:12 janl joined #mojo
07:34 dod joined #mojo
07:44 trone joined #mojo
07:48 CW2 joined #mojo
07:54 Atog joined #mojo
08:08 mbudde joined #mojo
08:11 rshadow joined #mojo
08:11 osfabibisi joined #mojo
09:12 gregf_ joined #mojo
09:29 janl joined #mojo
09:32 jkramer joined #mojo
09:32 jkramer Ahoy!
09:33 jkramer I have found some kind of misbehavior in a webserver/-site that makes Mojo::UserAgent do wonky stuff. Don't know if Mojo::UA is actually doing anything wrong, but the result seems wrong to me :)
09:33 jkramer MOJO_USERAGENT_DEBUG=1 perl -MMojo::UserAgent -e 'print Mojo::UserAgent->new->max_redirects(2)->get("http://www.lvz.de/Leipzig/Polizeiticker/Polizeiticker-Leipzig/Amokdrohungen-gegen-vier-Leipziger-Schulen-Polizei-sichert-Gebaeude")->res->body'
09:34 jkramer The server returns 2 "Location:" headers (both with the same URL), whick makes Mojo::UA try to request the URL "<URL>, <same URL again>"
09:34 jkramer Which then results in a 404 obivously
09:34 janl that seems wrong yes
09:35 janl just on general principle
09:35 jkramer Don't know what HTTP says should be done here, it seems to make sense a bit since headers can be define multiple times and are joined with commas then.
09:36 jkramer But in this particular case "normal" browsers seem to deal with it and get me the correct site
09:36 janl concatenating URLs is nonsensical imho
09:36 jkramer Yeah.
09:36 janl I am not a mojo hacker though
09:54 ashimema joined #mojo
09:58 jkramer https://github.com/kraih/mojo/pull/1009
10:03 Lee jkramer: that will probably be rejected (no test changes)
10:09 jkramer Oh
10:09 jkramer Well at least the existing tests didn't fail ;)
10:11 sri the ->to_hash call also seems rather inefficient, not sure if we need a new method for faster access to multiple header lines
10:12 jkramer Yeah, I was actually wondering the ->header thing didn't have an option for that
10:13 sri there used to be a wantarray version that returned individual lines in list context
10:14 janl but then wantarray went out of fashion?
10:18 jkramer I guess accessing the internals directly is not an option? :) $headers->{headers}->{location}->[0]
10:19 parv joined #mojo
10:23 salva joined #mojo
10:50 tchaves joined #mojo
10:50 Janos joined #mojo
11:02 jkramer Since I'm already here, is there a better way to get some kind of unique identifier string for a Mojo::DOM than \%$node?
11:13 sri i wanted to do that some time ago, but nobody was interested
11:14 sri idea was to add a $dom->selector method that returns a unique selector that only works for that node
11:21 tchaves joined #mojo
11:24 jkramer sri: That'd be quite nice actually
11:25 jkramer The \%$node thing works fine for me now since I only need some identifier, not necessarily a selector, but I like the idea of having one for debugging :)
11:27 Janos joined #mojo
11:42 ashimema joined #mojo
11:54 sri the DBIx::Class situation is so weird now http://lists.scsys.co.uk/pipermail/dbix-class/2016-October/012329.html
11:55 sri it would be much easier to support ribasushi if he hadn't given up
11:57 aborazmeh joined #mojo
11:57 sri xdg definitely overstepped, but now it's really hard to criticize him for it
12:06 PsyDebug joined #mojo
12:09 tholen joined #mojo
12:17 jkramer Is the order of Mojo::DOM->ancestors and ->descendents guaranteed in any way or can they change sometime for no reason?
12:39 gizmomathboy joined #mojo
12:42 Lee ggj
12:42 Lee gah this terminal
12:44 zivester joined #mojo
13:05 jantore joined #mojo
13:07 mrEriksson joined #mojo
13:17 ramortegui joined #mojo
13:52 tholen joined #mojo
14:05 Janos joined #mojo
14:06 mcsnolte joined #mojo
14:29 vicash left #mojo
14:31 tholen joined #mojo
14:41 vicash joined #mojo
14:49 marty_ joined #mojo
14:50 zivester joined #mojo
14:50 vmvm joined #mojo
14:54 vmvm hello! I want to add check to validator with my own error, but error is rewrite with default ( is it possible to add own error answer in validator->add_check ?
14:59 polettix joined #mojo
15:26 sri wonder if the ideas i've mentioned in the last few days were just bad or people were afk
15:30 abra joined #mojo
15:32 sri i'm going to assume you were all afk ;p
15:33 sri quick reminder, it started with the MAX_MESSAGE_SIZE value specifically for form-data requests
15:33 sri MAX_FORMDATA_SIZE
15:34 Grinnz sri: i think i remember you talking about that, it sounds like a good idea to me
15:34 abra_ joined #mojo
15:34 jberger I've been a bit hard to find lately
15:35 * jberger reads the log
15:35 jberger https://irclog.perlgeek.de/mojo/2016-10-13#i_13396726
15:36 sri next up was Mojo::Headers::every_header(...) i think
15:36 sri to bring back a way to access individual values for headers that appear more than once
15:37 sri jberger/vicash: you can only set it app wide
15:37 sri or change it dynamically in an after_build_tx hook, with perhaps some events
15:37 purl sri: that doesn't look right
15:37 sri similar to how it has to be now
15:38 jberger so what is the alternative? a per-route size cap?
15:38 sri and another idea, have a way to generate a unique css selector for every node in a Mojo::DOM
15:38 sri just saw that nokogiri has that
15:38 sri http://www.rubydoc.info/github/sparklemotion/nokogiri/Nokogiri/XML/Node#css_path-instance_method
15:39 jberger that's cute
15:39 jberger many browsers have that feature too
15:39 jberger chrome does I know
15:39 sri i imagine it wouldn't be too much code
15:41 vicash sri: thanks. for now i am using the default for the max size.
15:57 itaipu joined #mojo
16:18 diegok "generate a unique css selector for every node in a Mojo::DOM" ++ :-)
16:21 disputin joined #mojo
16:52 sri perhaps we should make it a golfing contest :)
16:52 sri who can come up with the shortest implementation for Mojo::DOM::selector
16:57 jberger is there a known algorithm for it?
16:57 jberger or else a few test cases?
16:58 jberger that sounds like fun if I knew what I was trying to get out
16:58 stephan48 just return 4 all the time and you win
16:58 Grinnz https://xkcd.com/221/
16:58 jberger ie, what guarantees the uniqueness
16:58 sri i imagine you'd just reuse a few test blocks that are already in dom.t
16:58 jberger stephan48++ Grinnz++
16:59 sri jberger: :nth-child() and the like i imagine
16:59 stephan48 Grinnz++ # thank you
17:00 * sri imagines a lot today
17:02 sri is $dom->at('foo > bar > baz')->tree, $dom->at($dom->at('foo > bar > baz')->selector)->tree, 'same node';
17:03 sri btw. if you have not watched goliath yet, do it!
17:04 stephan48 ah tree outputs the tree from the "beginning" down to the respective object?
17:05 stephan48 path*
17:05 stephan48 so wouldn't that already work as a selector?
17:05 sri it's a tree
17:05 sri a data structure
17:05 purl a data structure is not exactly being an hash of hash 's http://pastebin.com/m3d2dcc3d
17:05 stephan48 ah, so no stringified representation
17:31 sri hmm, i guess you'd have to anchor the selector on a unique element like <html>
17:31 sri it's actually harder than i thought ;p
17:31 Grinnz is there a way to anchor selectors on the root?
17:32 Grinnz ive tried to do that before and it didnt work out so well..
17:32 sri :root
17:33 sri which can be any element at the root level
17:33 Grinnz hmm
17:33 sri yea, suppose you can built the tree with :root > :nth-child(4) > nth-child(5)...
17:33 sri s/t/d/
17:34 sri no wait ;p
17:34 sri just need two identical trees at the root level to break it
17:35 Grinnz you'd need an nth-identifier for the root level node too
17:35 sri yea
17:36 sri :root:nth-child(4) is a funny edge case
17:37 sri our selector engine can handle it though
17:37 sri perl -Mojo -E 'say x("<a href=b></a><a href=c></a>")->at(":root:nth-child(2)")'
17:50 dod joined #mojo
17:50 crab joined #mojo
17:51 disputin joined #mojo
18:10 PryMar56 joined #mojo
18:30 bobkare joined #mojo
18:43 juikuen joined #mojo
18:55 disputin joined #mojo
19:21 jberger you know, you'd think 1000 stickers would look a little more impressive :-P
19:21 jberger https://twitter.com/joelaberger/status/788097485218521089
19:21 preaction that's because you don't have them in a kiddie pool so you can swim in them
19:22 jberger how many stickers do I need in order to Scrooge McDuck swim in them?
19:23 preaction i imagine you could make it work with what you have, but 10k would probably work better
19:32 sri hahaha
19:34 rshadow joined #mojo
19:35 polettix joined #mojo
19:52 Janos joined #mojo
20:15 vicash jberger: you could do a reverse-direct marketing scheme.. have folks who want a sticker mail you a self-addressed envelope with the required postage on it. and you send them the sticker back while noting down the address for doing direct marketing to them in the future
20:15 genio gah. '80s and '90s all over again
20:15 jberger oh man, SASE
20:16 jberger but no, these are for event promos
20:16 vicash genio: in 2008 i got Ubuntu stickers this way ! they used to do it
20:19 jberger https://twitter.com/joelaberger/status/788112198845472768
20:21 tyldis stickermule was expencive, but I'll chip in
20:27 jberger they are high quality stickers
20:27 jberger sri has high standards
20:27 * sri nods
20:29 sri btw. i've removed all royalties from the stickers
20:29 genio I don't have anywhere to put stickers, but I can click a donate button and do that somewhere if there is one
20:29 sri past royalties have been used to buy those 1000 stickers
20:30 sri (mentioning it so you don't feel bad for paying full before, you helped us get a marketing budget!)
20:35 tyldis Ouch! $49 shipping!
20:36 jberger ?
20:36 jberger for what/
20:36 jberger ?
20:36 sri you living on the moon or something?
20:36 tyldis Stickermule.com
20:36 genio heh.  $49 shipping to the moon would be awesome!
20:37 tyldis sri: Pretty close.
20:37 tyldis https://www.google.no/maps/place/Tromsø/
20:37 tyldis :D
20:37 tyldis Better view: https://www.google.no/maps/place/Troms%C3%B8/@44.2949867,-33.3057649,3z/data=!4m5!3m4!1s0x45c4c4526c3b71fd:0x23dca858e6ebed3!8m2!3d69.6492047!4d18.9553238
20:37 sri :o
20:38 sri looks nice though
20:38 jberger woah
20:38 sri norway is beautiful
20:38 suede estonia is very pretty as well
20:38 genio wow. you're waaaaay up there!
20:38 suede we're just very flat
20:39 suede we have similar shipping prices as well
20:39 suede i shop on amazon.de and still end up paying $30 shipping sometimes
20:41 tyldis We have branch office here, which I often travel to: https://www.google.no/maps/place/Longyearbyen,+Svalbard+og+Jan+Mayen/@48.5650155,-23.8325755,3z/data=!4m5!3m4!1s0x459c52d84f4557df:0xda86b2caa16495ec!8m2!3d78.2231722!4d15.626723
20:42 tyldis (and in the Antarctica, but I have yet to go there: https://www.google.no/maps/place/Trollstasjonen/@-15.5630244,41.8556376,3z/data=!4m8!1m2!2m1!1sdronning+mauds+land!3m4!1s0x0:0x53a2ef030bcb54da!8m2!3d-72.0125207!4d2.5323486)
20:42 tyldis Mojolicious is deployed down there, though
20:42 tyldis And up at Longyearbyen next week ;)
20:43 genio Man, the pictures of that place look really nice!
20:45 tyldis genio: Remember that next time we're hiring Perl devs ;)
20:47 suede tyldis do you have perl internships? :0
20:47 suede :)*
20:47 genio I want to go play on snowmobiles now
20:48 jberger tyldis++
20:51 sri hmm, snowmobiles would make the daily commute much more enjoyable
20:55 tyldis suede: No, but we aim to outsource Perl work soon. We just need to restructure our dev department (which just went from 2 to 5 people)
20:55 suede ah well i'm not nearly experienced enough with Perl to write anything useful *just* yet
20:56 suede i've been using python almost exclusively for the past 2 years because my work required it
20:57 suede maybe a couple months and it'll be better
20:58 tyldis Cool, keep at it
21:05 jberger tianon: you are in vegas?
21:06 jberger I think my default assumption for where people in this channel live is Norway :-P
21:06 stephan48 norway? no? you better move there quick
21:07 suede norwegians-only channel
21:08 stephan48 I hope not
23:01 tianon jberger: heh, yeah, for a bit over a year now
23:11 jberger are you best friends with Penn Jillette yet?
23:11 jberger that's what I'd do if I was there :-P

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