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

IRC log for #mojo, 2014-04-10

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

All times shown according to UTC.

Time Nick Message
00:03 sri WTF?! http://techcrunch.com/2014/04/09/condoleezza-rice-joins-dropboxs-board/
00:10 disputin joined #mojo
00:12 mattp joined #mojo
00:12 shmuel joined #mojo
00:12 nemux joined #mojo
00:47 disputin joined #mojo
00:56 laouji joined #mojo
01:15 shmuel I'm printing some Japanese in the templates, and it comes out grabbled.
01:16 shmuel how does I set the encoding of the rendered page?
01:28 buu joined #mojo
01:41 btyler joined #mojo
01:46 davido__ joined #mojo
01:49 buu joined #mojo
01:55 klapperl_ joined #mojo
02:08 hotsnow joined #mojo
02:25 dvinciguerra joined #mojo
02:29 russum joined #mojo
02:47 dj_goku__ joined #mojo
02:58 dj_goku_ joined #mojo
03:52 russum joined #mojo
05:40 klapperl joined #mojo
05:41 Eke- joined #mojo
05:49 laouji joined #mojo
05:51 laouji_ joined #mojo
06:00 sujithm joined #mojo
06:38 ldthien0 joined #mojo
06:51 dod joined #mojo
06:52 rem_lex| joined #mojo
07:02 Vandal joined #mojo
07:17 punter joined #mojo
07:17 edestler joined #mojo
07:19 klapperl_ joined #mojo
07:21 rawler joined #mojo
07:21 maxhq joined #mojo
07:26 sugar_ joined #mojo
07:27 laouji joined #mojo
07:32 laouji joined #mojo
07:40 trone joined #mojo
07:42 laouji joined #mojo
07:51 laouji joined #mojo
07:54 Adurah joined #mojo
08:06 eugen joined #mojo
08:09 mire joined #mojo
08:10 denis_boyun joined #mojo
08:16 batman sri: wow! i'm glad i went with google drive. i think they are lesser evil now at least ;)
08:17 punter is that what you replaced Ubuntu One with?
08:17 batman punter: yeah
08:17 punter does it block copyrighted files?
08:17 punter (not that you would have a way of knowing)
08:17 batman no idea.
08:18 batman punter: https://bitbucket.org/nikratio/s3ql/ <-- i'm considering this, but i'm not sure if it's convenient enough for me
08:18 punter open source client?
08:18 batman yup. using insync
08:18 batman works better than i hoped for :) (pretty good actually)
08:27 basiliscos joined #mojo
08:31 crab what is google drive a lesser evil than?
08:33 shmuel I'm having problems with renderer encoding.
08:34 jojo i'd worry to upload my files to google
08:34 shmuel I'm putting Japanese values inside a template,
08:34 shmuel and on browser it looks as latin1. help?
08:43 punter batman, this site says insync is 15 days trial, therefore not open source: https://www.insynchq.com/
08:44 punter unless I'm looking at the wrong site
08:47 batman i think it's funny that people make a fuzz about that mojolicious include both web server and web client, when CPAN::Uploader require HTTP::Daemon
08:47 batman punter: ah! sorry. *need more coffee*
08:48 batman i read "can i use google drive in linux?" but i guess that's not quite what you said ;)
08:48 batman crab: dropbox
08:50 cpan_mojo Mojo-Redis 0.9922 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojo-Redis-0.9922
09:20 kwa crab: skydrive
09:22 dpetrov_ joined #mojo
09:29 dotan joined #mojo
09:29 tianon joined #mojo
10:00 eseyman joined #mojo
10:01 da5id joined #mojo
10:09 meshl joined #mojo
10:19 punter joined #mojo
10:28 denis_boyun joined #mojo
10:41 Adura joined #mojo
10:43 sujithm joined #mojo
10:56 d4rkie joined #mojo
10:57 dpetrov_ joined #mojo
11:00 cmihai joined #mojo
11:05 cmihai_ joined #mojo
11:13 sujithm joined #mojo
11:17 neilhwatson joined #mojo
11:21 sjn joined #mojo
11:33 dvinciguerra joined #mojo
11:36 dpetrov_ joined #mojo
11:47 mire joined #mojo
11:49 marty joined #mojo
12:31 disputin joined #mojo
12:38 batman marcus: ^ i improved Mojo::Redis->connected() method imo
13:00 asarch joined #mojo
13:05 Akron joined #mojo
13:47 bluescreen joined #mojo
13:53 laouji_ joined #mojo
13:57 gryphon joined #mojo
13:58 gryphon joined #mojo
13:58 btyler joined #mojo
14:11 cpan_mojo Mojo-Log-JSON 0.01 by Michael Jemmeson - http://metacpan.org/release/MJEMMESON/Mojo-Log-JSON-0.01
14:14 zackiv31 joined #mojo
14:18 gryphon joined #mojo
14:25 sycobuny joined #mojo
14:27 cstamas hi
14:27 cstamas when using Mojo::Useragent it a server sets a cookie
14:27 cstamas is that automatically stored and used on the next request
14:27 cstamas ?
14:33 batman cstamas: yes
14:35 cstamas thx, exploring the thing..
14:38 sh4 joined #mojo
14:51 jim joined #mojo
14:53 klapperl joined #mojo
14:59 asarch How do you set, in the CSS file, "all the text style with Arial style"?
15:05 rawler joined #mojo
15:06 bluescreen_ joined #mojo
15:10 nicomen * { font-family: "Arial, Helvetica, sans-serif" !important };
15:11 genio or, you can set it on html since they all inherit down
15:12 genio html { font-size: 1em; font-family: Arial,Helvetica,sans-serif; }  //basically a default for your entire document
15:15 nicomen genio: not if some specific elements set it themselves
15:15 nicomen but if he has full control, yes
15:16 genio I should have worded things better.  I think you answered exactly what he asked and was looking for...
15:17 genio My comments were more for his general knowledge
15:18 ua_ joined #mojo
15:19 ua joined #mojo
15:22 klapperl_ joined #mojo
15:22 cstamas batman: no, it looks like the cookie is lost, not preserved during communication
15:24 jim joined #mojo
15:26 cstamas if the server sends a Set-Cookie the cookie is not stored by Mojo::UserAgent
15:26 nicomen genio: yeah, I should've explained that I was showing case when you need to enforce something
15:27 klapperl joined #mojo
15:39 marty_ joined #mojo
15:44 cstamas can someone help me understand how cookies work in mojolicious?
15:45 cstamas if i set it with $ua->cookie_jar->add( $mycookie ) is does nothing
15:45 cstamas i am a bit loss
15:50 mire joined #mojo
15:51 cstamas i see the cookie set with $ua->cookie_jar->all
15:52 cstamas still it is not sent on the next query
15:59 beyondcreed joined #mojo
15:59 denis_boyun joined #mojo
16:05 sujithm joined #mojo
16:12 russum cstamas: do you expect the cookie to be saved as a file and to be sent to the server the next time you run the script?
16:12 russum show some code…
16:12 meshl joined #mojo
16:12 cstamas just a sec...
16:15 cstamas paste.debian.net/hidden/44d214d1
16:15 cstamas russum: ^
16:15 cstamas i want to reboot a ibm mm via their web interface
16:16 dotan cstamas: when Mojo::UserAgent starts a new request, it adds any cookies it has that match the request URL in Mojo::UserAgent::CookieJar::inject https://github.com/kraih/mojo/blob/master/lib/Mojo/UserAgent/CookieJar.pm#L99
16:17 cstamas hmm am i missing the url then?
16:17 dotan Doesn't look like you set the domain or path of your cookie.
16:18 cstamas that is right
16:18 russum yep no domain, but if you are logging in anyway then why add cookie manually?
16:19 cstamas russum: somehow it does not sets up the cookie
16:19 cstamas russum: the servers send a cookie in a redirect
16:19 cstamas mojo useragent still does not use it on the next request
16:20 dod joined #mojo
16:21 dotan cstamas: I tried it with google.com. google.com redirects me to google.co.il, which sets the cookie. My next request to google.com doesn't send the cookie.
16:21 cstamas yes, exactly
16:23 russum they are two different domains, a cookie set on one domain wouldn't work on another domain… are you trying to work with two different domains?
16:25 Adurah joined #mojo
16:26 cstamas i am not
16:26 cstamas it is the same host all along
16:27 cfedde can I redefine a ->startup in a Mojolicious::Lite app?
16:29 russum cstamas: I don't see why this shouldn't work - http://paste.debian.net/hidden/b4ad0d48/
16:31 marty joined #mojo
16:32 rwstauner left #mojo
16:33 marty joined #mojo
16:35 cstamas russum: i am checking...
16:35 dod joined #mojo
16:37 cstamas russum: does this work for you?
16:38 cstamas russum: cant call method "req" without a package or object reference at...
16:41 russum cstamas: get red of that line
16:43 marty joined #mojo
16:48 dvinciguerra joined #mojo
16:51 russum >> "cstamas: does this work for you?"  I don't have the IBM thingy so can't really check… but there shouldn't be any issues with cookies and you are probably simply sending wrong requests/urls/parameters…
16:56 cstamas that may be true
16:59 cmihai joined #mojo
17:05 batman cstamas: btw: you where asking the wrong question.
17:05 batman you should have asked "can someone tell me why MY MANUAL COOKIE modifications doesn't work?"
17:06 batman cfedde: all the logic directly in the script is pretty much you startup() method
17:21 sujithm joined #mojo
17:26 sujithm joined #mojo
17:44 dvinciguerra joined #mojo
18:18 asarch joined #mojo
18:20 cpan_mojo Mojolicious-Plugin-RESTRoutes 0.010010 by MAXHQ - http://metacpan.org/release/MAXHQ/Mojolicious-Plugin-RESTRoutes-0.010010
18:54 buu joined #mojo
18:54 sri http://www.decksetapp.com/ # that looks like a pretty nice alternative to keynote
19:06 buu joined #mojo
19:12 denis_boyun joined #mojo
19:14 bluescreen__ joined #mojo
19:20 mire joined #mojo
19:21 punter joined #mojo
19:24 buu joined #mojo
19:24 punter Is hypnotoad with 1 process, faster than Morbo?
19:27 batman punter: no. it's exactly the same
19:27 punter thanks
19:30 hesperaux joined #mojo
19:49 russum batman: doesn't morbo have a debug overhead which should theoretically make it slightly slower?
19:59 meshl joined #mojo
20:01 cfedde batman: thanks!
20:03 alnewkirk joined #mojo
20:12 cfedde can I teach mojo to include Access-Control headers?  Is it best to use an 'under' route to do this on a per app basis?
20:15 dvinciguerra joined #mojo
20:31 russum cfedde: http://mojolicio.us/perldoc/Mojo/Headers#add so $self / $c->res->headers->add(Foo => "Bar"); ?
20:36 berov joined #mojo
20:36 berov Hi all,
20:38 berov looks like I can use https://gist.github.com/kraih/6082061(Mojolicious::Plugin::Coro) to wrap any blocking Mojo application using regular DBI ?
20:41 berov I could even with a little "redefine" hide the with::coro package and the it will be transparent for the occasional programmer
20:42 berov ?
20:45 cstamas batman: we are talking about two different issues
20:46 cstamas batman: the received cookie was not preserved on the next request (the set-cookie was not stored and used)
20:46 cstamas batman: and even when i tried to do that by hand it failed
20:46 cstamas (or i failed)
20:51 sri berov: no
20:51 berov :(
20:53 dexteruk Hi, everyone.  Anyone here in Bulgaria, I want to start a interest group in Sofia for Mojolicious
20:53 sri https://www.kickstarter.com/projects/1686304142/the-mini-mobile-robotic-printer # haha, i hope all printers will be robots in the future!
20:55 russum cstamas: I might be wrong but that seems like something simple to fix, can you show again what you have so far?
20:57 malikai @sri, you won't when they learn how to print themsselves and declare you and I are their slaves (or food)
20:58 sri what's it gonna do, print a mustache on my face while i sleep?
20:59 malikai worse, bananna-nose glasses
21:06 cstamas russum: i did not have time to pursue this further
21:06 cstamas what i put on pastebin is the latest
21:07 marcus joined #mojo
21:08 cstamas russum: i am working with curl to get the job done
21:09 cstamas russum: which handles the cookies fine, i will miss the dom parse though :-/
21:10 sri cstamas: if there's a bug you could report it
21:10 btyler joined #mojo
21:11 cstamas sri: i suspect a bug
21:12 sri then please report it
21:12 cstamas sri: however i am not that proficient with mojo, so it maybe my deficiency
21:13 cstamas sri: it is here in the irc history (or shall i do a github issue?)
21:13 sri first rule of reporting a bug, make sure we can replicate it, i don't understand anything i see in the log
21:13 sri if we can't replicate the problem, there is no point reporting it
21:14 cstamas sri: you are right, i will try to do that
21:17 cstamas i will first need to write a server side app
21:19 russum he's trying to authenticate so obviously he shouldn't share the credentials which makes it difficult to help…
21:20 rem_lex joined #mojo
21:24 cstamas sri: i try to describe the problem with my own words (will try to make it reproducable later)
21:25 cstamas sri: there is a main page, where Mojo::UserAgent is redirected to a login page and setting a cookie at the same time
21:25 sri cstamas: please don't
21:26 cstamas sri: the cookie is not used on the next connection
21:26 cstamas okay
21:26 sri russum: you can always make a test case
21:26 sri it's just HTTP
21:26 sri and we have a whole HTTP stack
21:27 sri if you can't make a test case, odds are it's not a bug
21:28 cstamas i need to mock the server side, which i will try to do later
21:28 russum it's not a bug, his code is wrong
21:30 russum cstamas: your code, http://paste.debian.net/hidden/44d214d1 line 11 find()->attr, find() returns Mojo::Collection and doesn't have a attr() method, are you using old Mojolicious?
21:31 cstamas 4.58
21:32 russum anyway, give me a minute
21:32 cstamas sure, thanks for your help
21:34 cpan_mojo MojoX-Plugin-AnyCache 0.02 by CHGOVUK - http://metacpan.org/release/CHGOVUK/MojoX-Plugin-AnyCache-0.02
21:51 espent joined #mojo
21:53 sri oh, looks like we have a first schedule for mojoconf http://www.mojoconf.org/mojo2014/talks
21:53 sri (no clue if that url is actually public)
21:59 russum cstamas: http://paste.debian.net/hidden/71fc23a1/ replace line 5 with your host and let me know what the result is…
22:00 cstamas russum: just a few secs...
22:10 cstamas russum: http://paste.debian.net/hidden/ff2dbd79/
22:13 sri cstamas: can you do MOJO_USERAGENT_DEBUG=1, censor out your passwords and HTML, then nopaste it?
22:13 cstamas trying...
22:13 purl hmmm... trying is just as important as succeeding sometimes.  :)
22:26 MrAnderson joined #mojo
22:30 russum cstamas: not sure… could it be that the parameter timeout=>1 on line 27 maybe logging you out and deleting the cookie?
22:31 d4rkie joined #mojo
22:33 cstamas http://cstamas.hu/priv/mojo.txt
22:36 cstamas this works (shell script with curl) http://cstamas.hu/priv/ibm-mm-restart.txt
22:39 cstamas russum: timeout=>1 is 5 minutes
22:43 sri cstamas: i can only conclude that you're not telling us the truth http://pastie.org/9071494
22:44 sri somewhere there is a tiny bit of information you've scrubbed away that makes all the difference
22:44 elmo joined #mojo
22:46 sri specifically the "GET /private/main.php?SESSID=9623372b65897bc6adcca879df7767f8" is not possible like that with Mojo::UserAgent
22:47 cstamas sorry i do not get that
22:48 sri http://pastie.org/9071501 # that part, Mojo::UserAgent doesn't do that
22:49 sri there is not even a "User-Agent: Mojolicious (Perl)" header
22:51 sri so a) your mojolicious installation is borked/hacked up, b) you've pasted bad information, or c) your application does not look like what you've shown us
22:52 sri http://pastie.org/9071494 # hack this up to make it fail
22:54 sri oh damn... i completely missed that you're not using the latest mojolicious...
22:54 sri sorry, i only help with the latest version
22:55 elmo left #mojo
22:55 elmo joined #mojo
22:55 cstamas sri: i will come back later when i have the latest version
22:58 Dandre joined #mojo
22:59 cstamas thank you all for the debugging
23:09 dwierenga joined #mojo
23:15 bluescreen joined #mojo
23:47 kmx joined #mojo

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