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

IRC log for #mojo, 2014-01-20

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

All times shown according to UTC.

Time Nick Message
00:16 russum joined #mojo
00:27 rem_lex|pivo joined #mojo
00:27 sri now that's a really well done self-published book http://www.jstorimer.com/products/working-with-tcp-sockets
00:48 laouji joined #mojo
01:01 rem_lex joined #mojo
01:02 asarch joined #mojo
01:15 jberger sri: I like the sales model too
01:15 jberger give away a chapter
01:15 jberger actually, I could to the model that qtiplot did
01:15 jberger the code was open source, they charged for compiled binaries
01:16 jberger I could charge a couple bucks for a PDF
01:16 jberger the LaTeX source is open
01:16 jberger :-D
01:22 * jberger is really liking the sample chapter!
01:27 jberger oh, darn, the sample chapter ended!
01:30 sri jberger: there's a bit more on the pragprog site, they let them do the dead tree edition http://pragprog.com/book/jstcp/working-with-tcp-sockets
01:31 jberger sri: any comments on the blog post?
01:31 sri nope
01:31 jberger its ok if you don't, its pretty basic
01:31 jberger ha, you beat me to it
01:32 sri nostarch has been publishing some previously self-published books too http://linuxcommand.org/tlcl.php
01:35 ka2u joined #mojo
01:36 D4RK-PH0ENiX joined #mojo
01:40 good_news_everyone joined #mojo
01:40 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/jsOonQ
01:40 good_news_everyone mojo/master deb6dd3 Sebastian Riedel: small optimizations
01:40 good_news_everyone left #mojo
01:42 hlin joined #mojo
02:36 klapperl joined #mojo
03:13 ka2u joined #mojo
03:59 btyler joined #mojo
04:07 preflex_ joined #mojo
04:45 ka2u joined #mojo
04:59 stl joined #mojo
05:05 laouji joined #mojo
05:34 sri haha
05:34 sri jberger: i almost have a mojolicious-ish use case for ->reduce
05:34 * sri was wondering how much bytes certain websites waste for comments
05:35 sri perl -Ilib -Mojo -E 'g("www.reddit.com")->dom->find("*")->contents->flatten->grep(sub { $_->node eq "comment" })->reduce(0 => sub { $_[0] + 7 + length $_[1] })->say'
05:35 sri for reddit it's 1310
05:35 sri btw
05:37 sri pretty weak use case though ;p
05:58 ver joined #mojo
06:03 basiliscos joined #mojo
06:09 irq joined #mojo
06:10 Vandal joined #mojo
06:12 russum joined #mojo
06:12 russum joined #mojo
06:30 russum1 joined #mojo
06:32 stl joined #mojo
06:35 amirite joined #mojo
06:40 russum joined #mojo
06:51 good_news_everyone joined #mojo
06:51 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/y3QWCA
06:51 good_news_everyone mojo/master f1e861a Sebastian Riedel: another small optimization
06:51 good_news_everyone left #mojo
07:12 dpetrov_ joined #mojo
07:24 basiliscos joined #mojo
07:27 basiliscos joined #mojo
07:30 mire_ joined #mojo
07:41 rawler joined #mojo
07:58 hummeleBop joined #mojo
08:06 odc joined #mojo
08:06 maxhq joined #mojo
08:09 zivester_ joined #mojo
08:34 maxhq joined #mojo
08:46 trone joined #mojo
09:14 mire_ joined #mojo
09:27 denisboyun joined #mojo
09:59 Kulag joined #mojo
10:22 Kulag joined #mojo
10:41 amirite_ joined #mojo
10:53 D4RK-PH0ENiX joined #mojo
11:08 D4RK-PH0ENiX joined #mojo
11:19 D4RK-PH0ENiX joined #mojo
11:27 fhelmber_ joined #mojo
11:35 denisboyun joined #mojo
12:06 D4RK-PH0ENiX joined #mojo
12:14 rawler Do Mojolicious/Plugin/Authentication.pm store authentication-details completely in session (and in user-cookie)? Doesn't that mean that you cannot truly expire authentication, I.E. opening up for replay-attacks?
12:16 rawler after all, expiry of the session-cookie is merely an advice to the browser, but cannot be enforced?
12:19 stephan48 you could embed a timeout parameter
12:20 stephan48 which would be refreshed on each page access
12:20 stephan48 since the cookie is encrypted/signed this would prevent the user from tampering with it
12:20 irq_ joined #mojo
12:28 rawler i guess that would suffice.. doesn't enable immediate logout of a session, but at least limits the impact..
12:30 moritz though IME the first response is to block IPs in the web server, not logging out individual users
12:32 rawler depends on the type of attack..
12:32 moritz aye
12:35 dvinciguerra joined #mojo
12:55 kwa rawler: the session is automatically validated, if it doesn't pass the validation (i.e. if it has expired) you won't even see the cookie.
12:57 kwa rawler: Doesn't matter if the browser keeps sending the cookie with the request. If the cookie is tampered with, or if the session time (which is stored in the cookie) expires, it'll be discarded.
13:01 kwa https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Sessions.pm#L20-L22
13:02 rawler *ahh* excellent! thank you for the clarification! :)
13:02 rawler kwa: ^^^
13:05 btyler joined #mojo
13:20 dod joined #mojo
13:25 zivester joined #mojo
13:30 real joined #mojo
13:30 real Hi
13:35 kwa bye
13:57 russum joined #mojo
13:58 Tiger joined #mojo
14:34 bluescreen joined #mojo
14:43 sh4 joined #mojo
14:51 gryphon joined #mojo
14:54 asarch joined #mojo
15:07 jberger sri: hehe
15:26 marty joined #mojo
15:28 ka2u joined #mojo
15:34 nicomen is there a not too intricate way to search/replace contents of attribute with Mojo::DOM ?
15:37 basiliscos joined #mojo
15:43 jberger nicomen, IIRC it works like you would expect
15:53 geck any good init scripts for morbo floating around?
15:53 geck centos init scripts.
15:54 marty joined #mojo
15:58 jberger sri: it's still here: http://pastie.org/8650943
16:10 nicomen jberger: it did \o/
16:12 jberger joined #mojo
16:12 jberger nicomen, sri writes good stuff
16:12 arthas joined #mojo
16:40 jberger does anyone know, has peter martini's signature code hit blead yet?
16:41 nicomen he does ,)
16:42 jberger I have been reading perldeltas and I don't see it
16:42 jberger nicomen, is he on here somewhere? what is his nick?
16:42 nicomen what?
16:42 nicomen sri ?
16:42 purl it has been said that sri is A PONIE!!1! and a  or no more a javascript noob or evil or a spelling guerilla or the temporary channelclown or a snob now or the perl guerilla or a small mouse with a big head aiming for world domination or the evil sith or has no clue about fuzzy logic or no longer a real hacker :/ or a copycat or pimp to many children or a holy man or looks a lot like pitr or puny or making Mojolicious delicious
16:43 jberger oh
16:43 jberger nm
16:43 jberger sri
16:43 jberger nicomen, I thought you were saying peter martini would know if his branch had hit blead
16:43 jberger which is true, but I don't know where he is
16:44 jberger many things have been said about sri it seems :-P
16:44 nicomen aaaaah
16:44 nicomen lol
16:55 jberger this seems powerful: "goto EXPR is now documented to handle an expression that evalutes to a code reference as if it was goto &$coderef. This behavior is at least ten years old."
16:56 mire_ joined #mojo
16:56 jberger I guess I have done `goto $coderef` plenty and that is probably what it means, but `goto returns_coderef()` sounds kinda interesting
16:57 sri jberger: subroutine signatures are in limbo again... which actually resulted in me yelling at #p5p yesterday ;p
16:57 sri http://www.nntp.perl.org/group/perl.perl5.porters/2014/01/msg211479.html
16:58 sri jberger: your reduce implementation is flawed! missing argument for initial value
16:59 jberger ?
16:59 sri you're assuming the first value is in the collection already
17:00 sri but what if you have to transform all the values in the collection first
17:00 sri say reducing a collection to the length of all elements combined
17:01 sri c('foo', 'bar')->reduce(0 => sub { $_->a + length $_->b })
17:01 jberger interesting point
17:02 sri also gives more formatting power to have an arbitrary first value
17:02 jberger yeah, I see
17:02 jberger not too hard to add
17:02 sri usually for this stuff, i first look how underscore.js and Ruby have implemented it :)
17:03 sri http://ruby-doc.org/core-2.1.0/Enumerable.html#method-i-reduce
17:03 ka2u joined #mojo
17:04 sri interesting nobody is dealing with #580... i left that one open for you guys! https://github.com/kraih/mojo/issues/580
17:05 jberger sri, you like the initial value first?
17:06 sri you like it as second argument?
17:06 jberger seemed more obvious as a second argument seeing as its optional
17:07 jberger its not really like a non-blocking api with an optional trailing subref
17:07 sri c('foo', 'bar')->reduce(sub { $_->a + length $_->b }, 0)
17:07 sri kinda ugly
17:08 jberger doesn't really matter
17:08 * jberger modifies
17:08 sri yea, doesn't really matter... since the use cases are still pretty weak
17:09 jberger http://pastie.org/8651137
17:10 jberger only line 10 changes, shift vs pop
17:11 sri does $_->a actually interpolate? "lalala $_->a lalala"?
17:11 jberger doubt it
17:11 sri :/
17:11 jberger yeah, that kinda sucks
17:13 sri btw. should that reduce() ever get acepted, sort() would have to be changed too
17:16 jberger that consistency would be good
17:16 jberger s/good/necessary/
17:17 jberger sort could probably support both interfaces
17:17 jberger at least transitionally
17:18 marcus joined #mojo
17:18 sri have to
17:18 sri and not just transitionally
17:18 sri after all, the core sort does it too
17:18 jberger true
17:18 jberger and actually: https://metacpan.org/pod/release/ABIGAIL/perl-5.19.7/pod/perl5196delta.pod#a-and-b-warnings-exemption
17:19 sri haha
17:19 sri lets depend on 5.20
17:19 jberger just for that!
17:19 sri !
17:20 jberger I do recall you had said that Mojo would immediately depend on any Perl that had core signatures
17:20 sri think i said p5-mop
17:21 sri but signatures is a safe bet as well
17:22 jberger attemping to read this email thread, is the general idea that they want an API but no core reference implementation
17:22 jberger ?
17:22 sri there is no consensus, different people want different things
17:23 denisboyun joined #mojo
17:23 sri i'm a little upset with rjbs because he doesn't dictate
17:24 sri the subroutine signatures topic is the epitome of design by committee
17:25 sri like i said yesterday... 3 years to make "sub ($foo, $bar) {...}" a shortcut for "sub { my ($foo, $bar) = @_; }"
17:28 jberger yeah ...
17:28 * purl doo wop doo wop // shang a langa shanga langaa
17:30 jberger we could definitely use a little BDFL right about now
18:05 ilbot2 joined #mojo
18:05 Topic for #mojo is now 🎩, indubitably | http://mojolicio.us | http://irclog.perlgeek.de/mojo/today
18:06 sri :)
18:10 mil joined #mojo
18:33 dod joined #mojo
18:46 avb1 joined #mojo
18:59 ka2u joined #mojo
19:11 Foxcool joined #mojo
19:26 sri interesting, 308 redirect is actually mentioned in the upcoming new edition of RFC 2616 http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-25#section-6.4.7
19:27 sri so i guess the draft is not dead at all
19:42 mire_ joined #mojo
19:48 beyondcreed joined #mojo
19:58 jberger_ joined #mojo
19:59 jberger_ has anyone seen this: http://www.reddit.com/r/perl/comments/1vnqca/help_on_restful_routes/
20:00 jberger_ if you have to connect to a different database based on part of the route, is it better to do this in a bridge, or better to wait until hitting the action method?
20:00 jberger_ I don't feel qualified to answer, because this is my weakest area of Mojo-land
20:01 * jberger_ returns to his original login
20:05 bpmedley jberger: What does the type of route matter?  Wouldn't the db library need to handle such things?
20:06 trone joined #mojo
20:23 rem_lex|pivo joined #mojo
20:29 mil joined #mojo
20:32 dod joined #mojo
20:35 lukep_ joined #mojo
20:46 batman sri: https://github.com/jhthorsen/app-screenorama v.s. https://github.com/joewalnes/websocketd :)
20:46 batman no tests yet...
20:46 batman but it seems to be working
20:50 batman http://direct.thorsen.pm:5000/
20:50 rem_lex joined #mojo
20:52 meshl joined #mojo
20:56 jberger batman, looks interesting
20:56 jberger does it do STDIN too?
20:56 batman not yet
20:57 batman :)
20:57 batman i was hoping i could start bash, but i'm not letting you in from the outside ;D
20:57 jberger no of course not
20:58 batman would be nice if i could get rid of Applify in the script... but it's so easy to use.
20:59 nicomen was it someone here that were sharing their console thru a web app not long ago?
21:00 batman <--- don't know
21:00 nicomen terminal sharing stuff
21:04 dvinciguerra joined #mojo
21:06 jberger https://github.com/chjj/term.js
21:14 Adurah joined #mojo
21:19 nicomen aaah thnx
21:25 jberger vti wrote this: https://github.com/vti/showmetheshell, its not mojo really
22:07 batman jberger: http://home.thorsen.pm/private/show/notverysecret/app-screenorama.png :)
22:07 batman script/screenorama --single --stdin -- bash # ^^
22:07 jberger cool
22:07 batman \o/
22:08 * batman need to fix backspace
22:17 sri TIL how to compare github master to the last release :) https://github.com/kraih/mojo/compare/v4.67...master
22:17 sri batman: neat
22:18 batman thanks :)
22:19 batman pretty pleased with supporting terminal colors :)
22:22 bpmedley jberger: https://gist.github.com/brianmed/8530448  <-- Did you ever answer your db question?  Would this be something similar?  It uses a helper rather than bridges.
22:34 batman hm... i actually have no idea how to delete characters on a webpage :(
22:34 * batman gets some sleep
22:34 batman this is getting too big a project :)
22:45 avb1 left #mojo
22:53 bpmedley batman: Would you consider jQuery and .html to remove characters?
22:59 batman .html ..?
22:59 batman bpmedley: please fork me and send a pull request :)
23:00 * batman need to get some sleep
23:01 sri hmmmmm
23:01 sri one thing annoys me a little about those node hacking oneliners
23:02 sri perl -Mojo -E 'say g("www.reddit.com")->dom->find("*")->contents->flatten->grep(sub { $_->node eq "comment" })'
23:02 sri that does not actually include comments outside of tags
23:02 jberger bpmedley, that was one of my recommendations: http://www.reddit.com/r/perl/comments/1vnqca/help_on_restful_routes/ceugj4h
23:04 tianon sri: can you do "contents" directly on the dom without a find?
23:04 sri you can of course
23:04 sri but searching everything becomes two operations
23:05 sri i guess it doesn't really matter in the end
23:23 dvinciguerra joined #mojo
23:28 rem_lex|pivo joined #mojo
23:29 usetheforce joined #mojo
23:30 usetheforce Hi all, does anyone know of anything for Mojolicious that will allow me to commit my changes to a git repo (say on Github), have the tests run, all dependencies built, and deployed automatically?
23:33 batman_ joined #mojo
23:34 elvis joined #mojo
23:42 tempire_ usetheforce: That's not a mojolicious thing
23:42 tempire_ look into github hooks and carton
23:43 rem_lex joined #mojo

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