Camelia, the Perl 6 bug

IRC log for #mojo, 2010-11-07

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

All times shown according to UTC.

Time Nick Message
01:13 jawnsy left #mojo
01:15 spleenjack left #mojo
01:21 jawnsy joined #mojo
01:27 esskar__ joined #mojo
01:27 esskar_ left #mojo
01:27 esskar__ is now known as esskar_
04:04 tholen42 joined #mojo
04:06 tl left #mojo
04:12 trcjr left #mojo
07:05 JonChisciotte joined #mojo
07:31 und3f[A] is now known as und3f
07:55 und3f is now known as und3f[A]
07:55 und3f[A] is now known as und3f
08:37 esskar__ joined #mojo
08:40 esskar_ left #mojo
08:40 esskar__ is now known as esskar_
08:59 sri moin
09:00 esskar__ joined #mojo
09:04 esskar_ left #mojo
09:04 esskar__ is now known as esskar_
09:15 und3f is now known as und3f[A]
09:16 daviddelikat1 joined #mojo
09:19 spleenjack joined #mojo
09:19 daviddelikat left #mojo
09:20 und3f[A] is now known as und3f
09:21 und3f is now known as und3f[A]
09:37 achromic left #mojo
09:37 achromic joined #mojo
10:27 dotan joined #mojo
10:28 Kulag left #mojo
10:31 fhelmberger joined #mojo
10:32 kvorg joined #mojo
10:45 Kulag joined #mojo
10:55 Kulag left #mojo
10:55 Kulag joined #mojo
11:02 Kulag left #mojo
11:07 Kulag joined #mojo
11:20 Kulag left #mojo
11:23 Kulag joined #mojo
11:28 Rhaen I love you all!
11:29 Kulag left #mojo
11:30 Rhaen oh, the twitter bot doesn't work anymore?
11:30 Rhaen sri - right now I am on a train but I bring plenty of ideas for documentation with me the next time
11:30 Rhaen I had alot of time to play with the mojo stuff.
11:32 Rhaen git is just awesome if you dont have any working and stable internet connectuon
11:40 dotan Rhaen: Internet on a train. Color me jealous.
11:46 yko joined #mojo
11:48 sri Rhaen: quite sure the bot works
11:48 sri Rhaen: but twitter has hiccups
11:48 sri I LOVE YOU ALL TOO!
11:50 sri !tweet viva la revolucion! #mojolicious #perl
11:50 perlrocks sri: http://twitter.com/perlroc​ks/status/1239952843083776
11:50 sri stream seems broken
11:50 perlrocks left #mojo
11:50 perlrocks joined #mojo
11:51 sri !tweet i accidentally a tweet! #mojolicious
11:51 perlrocks sri: http://twitter.com/perlroc​ks/status/1240223577018368
11:51 perlrocks Twitter: "i accidentally a tweet! #mojolicious --sri" --perlrocks http://twitter.com/perlroc​ks/status/1240223577018368
11:51 sri hmm
12:06 JonChisciotte left #mojo
14:08 perlrocks Twitter: "@ Home I see, Mojolicious that there is a hand.割Kashi It looks like a small, but I might be able to read through the entire source." (ja) --Cside_ http://twitter.com/Cside_/status/1274830670270464
14:33 esskar_ is "include" borked? it dies if the template is not there, but if it is there, it will not get included
15:19 s0va joined #mojo
15:19 s0va hello there...
15:20 s0va question: is there a possibility to run external command and read it's stdout async?
15:20 s0va ... i'd like to use something like poe::wheel::run in mojo controller...
15:23 vel joined #mojo
15:28 dotan s0va - don't know, but it may be worth looking at vti's showmetheshell - https://github.com/vti/showmethe​shell/blob/master/showmetheshell
15:29 s0va dotan: thanks for link, will check it out
15:33 s0va dotan: this is brilliant!
15:34 dotan s0va: vti = awesome
15:43 s0va hm... quite complex code without comments...
15:43 s0va auch...
15:45 s0va is there any step-by-step guide/book for mojolicious? i'm programming in perl for 5+ years but i'm confused with just perldoc
15:54 marcus <3 boxee
15:56 dotan s0va: the code I linked uses a bunch of other modules, it's worth reading their docs in detail. Also, the Mojo::IOLoop code has changed since then - I think it's on_tick now instead of tick_cb or something.
15:57 dotan s0va: Have you seen the Mojolicious guides (perldoc Mojolicious::Guides)?
16:00 s0va yep.
16:01 s0va tick_cb => on_tick  change... hmmm, is mojo api not stable yet?
16:02 s0va don't get me wrong, i'm not trying to mock, but as i said before, i'm confused. yesterday i've been struggling with some code. it started working after upgrade of mojo to latest version ...
16:02 s0va it's a bit frustrating...
16:05 marcus I'd say it is more frusterating the other way around
16:05 marcus when you upgrade and your code stops working.
16:07 s0va left #mojo
16:19 GabrielVieira2 left #mojo
16:24 daviddelikat joined #mojo
16:28 daviddelikat1 left #mojo
16:55 perlrocks left #mojo
17:15 fhelmberger left #mojo
17:18 esskar__ joined #mojo
17:18 esskar_ left #mojo
17:18 esskar__ is now known as esskar_
17:19 dotan left #mojo
17:26 esskar__ joined #mojo
17:26 esskar_ left #mojo
17:26 esskar__ is now known as esskar_
18:19 sri actually tick_cb still works
18:19 sri it is just deprecated
18:20 sri esskar_: that would be a big surprise considering all tests pass
18:20 meraxes left #mojo
18:21 sri but mojolicious is in fact a bleeding edge web framework, we implement specs that are not even finished themself
18:21 sri while we try to avoid breakage it is bound to happen
18:23 sri the risky parts of the api are usually marked as experimental though with the exception of websockets
18:23 sri which unstable beyond experimental due to the spec xD
18:23 sri *+are
18:27 sri hmm, caprica got canceled, not a big surprise
18:27 sri but i'll need a new scifi show to follow :S
18:31 vel left #mojo
18:31 meraxes joined #mojo
18:44 baton8 left #mojo
18:44 baton8 joined #mojo
18:53 jamesw left #mojo
18:57 esskar_ left #mojo
18:57 esskar_ joined #mojo
18:59 kthakore sri: ping?
19:03 kthakore sri: We are using your perl5 logo for a puzzle game example in SDL_Manual.pdf https://github.com/PerlGameDev/SDL_Manual/commit​/3493299a120a099367e02fe1436471aa7aaf4876#diff-1
19:04 kthakore sri: hope that is ok. Do you want me to add credits to your image?
19:07 Akron joined #mojo
19:14 spleenjack left #mojo
19:35 Kulag joined #mojo
19:43 sri kthakore: credits would be nice yes
19:43 sri kthakore: you should use the nicer orange one :)
19:48 sri actually i'm tempted to forbid usage of the purple ones -.-
19:48 sri they are unfinished and i don't like being associated with them :/
19:49 sri don't want people to think thats the quality i deliver
19:50 GitHub167 joined #mojo
19:50 GitHub167 mojo: master Sebastian Riedel * fe7928d (2 files in 2 dirs): fixed a small inflate command bug - http://bit.ly/bK1ZqK
19:50 GitHub167 left #mojo
19:53 kthakore sri: ok where is the orange one?
19:53 kthakore I like the purple one though
19:53 sri on the cover of the open perl6 book :)
19:54 sri just a second, there is a high quality version in my blog
19:54 kthakore sri: cool! Here is where I will be using it http://sdlperl.ath.cx/releases/SDL_Manual.pdf
19:54 kthakore are you aware of the grant?
19:54 sri http://s3.amazonaws.com/files.posterous.com/kra​ih/73ihBUJGTgMXsSnVmcS3nTq1STAVt9eJybBOkUWHUhJ3​HJgUcw8IdeGAfrOQ/usingperl6-sri.jpg?AWSAccessKe​yId=1C9REJR1EMRZ83Q7QRG2&amp;Expires=1289159965​&amp;Signature=Ag9sxCHDKJgH6Bn50%2BaT14oUKhY%3D
19:54 kthakore oh wow
19:55 kthakore I still like the purple one but I will use this
19:55 kthakore :D
19:55 sri -.-
19:55 sri purple one was too unbalanced
19:55 kthakore ok
19:57 sri kthakore: cool
20:01 kthakore sri: what should I give as the credits?
20:02 sri sebastian riedel (kraih.com)
20:02 sri same as the perl6 book
20:02 kthakore okie
20:02 kthakore I will put in caption
20:02 sri the orange one is CC-SA btw
20:03 sri (intentionally liberal)
20:04 kthakore its ok I like giving credit where it is due
20:04 sri :)
20:04 kthakore http://sdlperl.ath.cx/releases/SDL_Manual.pdf
20:04 kthakore have a look at chapter 7 Puzz
20:04 kthakore is the caption ok?
20:05 kthakore err chapter 8
20:05 kthakore page 76
20:05 sri don't think it has to be in the chapter itself
20:05 kthakore oh ok
20:06 kthakore I dunno where to put it then
20:06 sri actually i don't know either :)
20:06 kthakore hehe
20:06 kthakore ok I will find out and let your know
20:06 kthakore but is that ok so far?
20:06 sri don't they put it in a very small font next to the image?
20:07 kthakore dunno I will ask around
20:07 kthakore on perl6 book people
20:07 kthakore I put it in the caption
20:07 sri it's the cover there, so they put it in the impressum somewhere i think
20:07 kthakore Well I use your image for a puzzle game app
20:07 kthakore and I am showing a screen shot of that
20:08 kthakore .. so I donno but I just put it in the caption
20:08 sri anyway, thanks for asking :)
20:08 kthakore np
20:08 kthakore nice picture :D
20:08 kthakore Although I still like purple better. Maybe I am unbalanced
20:09 kthakore :p
20:09 sri ;p
20:09 kthakore ok thanks again I have to go work on my mojo app! :D
20:09 sri have fun
20:09 kthakore will do
20:09 kthakore Have to make a DB first and junk
20:09 kthakore then learn how to do role based access in Mojo
20:21 flamey joined #mojo
20:22 flamey hi everyone!
20:23 flamey i'm trying to get my first simple mojolicious lite app running on share hosting account
20:23 * sri waves
20:24 flamey my file structure is like this
20:24 flamey hm, can't do slashes in irc?
20:24 flamey :)
20:26 flamey /wert
20:26 flamey o!
20:27 flamey /cgi-bin//app.pl
20:27 flamey /cgi-bin/public/*
20:27 flamey /cgi-bin/templates/*
20:28 flamey and i added a coplies os public and templates folders to root
20:29 flamey problem 1 -- when I run my app www.domain.com/cgi-bin/app.pl it runs, but doesn't renders templates
20:29 flamey what do I need to do to fix that? :)
20:31 sri which mojolicious version?
20:32 flamey 0.999929
20:33 sri hmm, thats rather old
20:34 sri my first guess would be that home detection doesn't work for some reason in your shared hosting environment
20:35 sri (in case it's not a bug thats already been fixed)
20:36 flamey updated to 0.999936
20:37 flamey my guess im not doing something right, but naturally I don't know what :)
20:38 sri sometimes it's also just the shared hosting providers doing very weird stuff
20:38 sri setting MOJO_HOME=/path/to/app might do the trick
20:38 sri in case it is home detection not working
20:39 sri $ENV{MOJO_HOME} ||= File::Spec->catdir(split '/', $FindBin::Bin);
20:39 sri thats the default for lite apps
20:40 sri wonder why it wouldn't work in your case
20:41 sri it has proven to be quite reliable for cgi :/
20:41 sri to my knowledge only psgi with plackup is undetectable atm
20:44 flamey i added that, but that made no difference
20:45 sri hmm, then i don't know, don't think we've had any complaints regarding cgi for quite some time
20:45 flamey im sorry!
20:45 flamey hold on
20:45 flamey :)
20:45 flamey my bad, i had a long vacation :) sorry, templates ARE rendered
20:46 sri before or after adding MOJO_HOME?
20:46 flamey something else not working
20:46 flamey before and after :)
20:46 sri -.-
20:47 sri at least no new bug :)
20:47 flamey yeah, i'm really sorry
20:49 flamey the stuff in public doesn't show, images and stuff. i guess that's because the path is with 'cgi-bin', not at root
20:50 sri that shouldn't be a problem
20:50 sri normally we can detect the "base" part of the path
20:52 flamey hmm, i think it tries to use css from within cgi-bin folder, but doesn't have access to it (permissions denied)
20:52 sri sounds more like a web server thing
20:52 flamey i guess i need to redo templates
20:53 flamey i wonder if it will work with daemon then
20:53 flamey ok, sri, i'll try a few things. i really appreciate you trying to help!
20:54 sri you might just have to use url_for or so to generate the image and css paths
20:54 sri or a simple <base> tag
20:54 sri thats usually the easiest and most portable solution
20:55 sri <base href="<%= url_for->base %>" />
20:57 ltriant joined #mojo
20:57 flamey ok, i'll try it right now. thanks a lot
21:00 sri wonder if we should provide a base_tag helper for all those cgi/fastcgi apps
21:00 sri like <%= base_tag %>
21:02 sri then again, maybe not that much added value over <base href="<%= url_for->base %>" />
21:12 flamey does mojolicious has some built it cache? i just deleted my template and it still renders it :-/
21:12 und3f[A] is now known as und3f
21:12 sri yes, templates are kept in memory after compilation
21:14 flamey mm, localy i can stop daemon and restart it as a last resort. how do I deal with it in cgi mode on shared hosting?
21:14 sri cgi is not persistsent ;p
21:14 sri locally --reload is what you want
21:15 flamey thats what I thought (about cgi), but it still renders t. what is it then :/ cleared browser's cache too
21:15 flamey yep, i do use --relaod locally
21:16 sri browser cache then
21:16 sri or maybe the shared hosting provider has a reverse proxy
21:16 flamey probably :(
21:19 stephan49 ask them
21:41 flamey ok, i don't know what happened, i started to delete things, reupload e'm, it works now. support's offline, i'll write a ticket. thanks for the BASE tag idea! i didn't even know about it before
21:42 flamey now i have another question
21:43 flamey how can I make my app runwhen I access http://www.domain.com/  while it's in cgi-bin directory?
21:44 Akron flamey: mod_rewrite in .htaccess
21:45 flamey i tried to add "RewriteRule ^index.html$ /cgi-bin/words.pl [L]" for test, but when I access http://www.domain.com/index.html i get internal server error
21:45 Akron Is "RewriteEngine on"?
21:46 Akron Does http://www.domain.com/cgi-bin/words.pl work?
21:46 flamey yest, thats the first line
21:46 flamey yes, now it does
21:47 Akron Is "cgi-bin" a local subdirectory?
21:47 Akron (And if yes - the line should be "RewriteRule ^index\.html$ /cgi-bin/words.pl [L,QSA]".)
21:50 flamey i guess it is. i didn't know it can be something else :-/
21:50 flamey i updated .htaccess but i still get internal server err
21:50 Akron But you can see the directory structure via FTP, don't you?
21:52 flamey yes
21:53 flamey /www/domain.com/cgi-bin
21:53 sri normally i would go with a ScriptAlias
21:54 sri sadly i have pretty much no clue about advanced apache configuration :/
21:54 sri more recipes would be very welcome additions to the wiki
21:56 flamey quick look in the internetz shows ScriptAlias is in httpd.conf ... ?
21:56 flamey i wouldn't have access to it on shared hosting, i think
21:57 Akron Right. On a shared webhost .htaccess and mod_rewrite is the right way. However -- maybe mod_rewrite is not available via .htaccess?
21:58 Akron But - sri's right: ScriptAlias is the prefered way, when conf-access is there.
21:58 flamey it's available, I use it on my WP blog installed on the same account
21:59 Akron Is there something in the logs? Where does the error come from?
22:00 flamey besides, if I remove rewrite rules from htaccess, i just get my index.html, otherwise I get internal server err
22:00 flamey i'll download logs in a moment
22:00 flamey the "error logs" in cpanel only show 404s and permissions denied from when I tried to get it working from cgi-bin
22:01 Akron Anything in the Mojo-Log?
22:01 Akron What error-code do you get?
22:02 flamey where is that?
22:02 Akron The Mojo-Log?
22:02 sri he prolly has no log dir
22:02 Akron Yep - I think so.
22:03 sri if a "log" directory exists mojolicious will log stuff to log/$runmode.log
22:03 yko left #mojo
22:03 MojoGuest687 joined #mojo
22:03 MojoGuest687 From: http://www.google.com.br/search?sourceid=chr​ome&amp;ie=UTF-8&amp;q=websocket+irc+client (1 hits)
22:04 sri with the daemon you get everything to STDOUT
22:04 flamey actually, think thing thinks I don't have the app.pl
22:04 flamey i'm looking into this right now
22:04 flamey and I'll create the logs dir
22:05 Akron I thought words.pl is the app ... ?
22:08 flamey it is :)
22:09 Akron :)
22:10 flamey 2010-11-07 14:00:58.394 [STDERR] Sun Nov  7 14:00:58 2010 error Mojolicious::Controller:206 [25415]: Cannot open file: No such file or directory at /home/MYACCOUNT/public_html/​DOMAIN.COM/cgi-bin/words.pl line 88.
22:10 flamey but that's exactly where it is
22:11 Akron What's in line 88?
22:11 flamey ah!
22:11 flamey in my a[[
22:11 Akron There you go.
22:11 Akron :)
22:13 flamey a regex to skip blank lines is there :-/
22:14 flamey anyways, in my app i'm reading a text file, which it currenly in the same place where the .pl is
22:14 flamey i guess, maybe it can't find that file when done with mod rewtire
22:15 flamey maybe not
22:15 Akron Hm ... no - mod_rewrite is just a pretender module - it does not change local behaviour.
22:15 flamey hmm, ok.
22:16 Akron What is exactly in line 88?
22:16 flamey whnext if /^\s*$/;  # skip blank lines
22:16 flamey next if /^\s*$/;  # skip blank lines
22:16 Akron Do you check, whether the file can be loaded?
22:17 flamey it shouldn't even get to that line without cgi params
22:17 flamey it can, when I just run it from cgi-bin dir
22:18 flamey instead of index.html, how do I redirect the root?
22:18 flamey ^\/$  ?
22:20 Akron Redirect root?
22:21 Akron Did you change the Line with [L,QSA]?
22:21 Akron This is necessary, if you use params.
22:23 flamey yes, before i was just redirecting the index.html , but I really want redirect http://domain.com/
22:23 flamey i just tried RewriteRule (.*) /cgi-bin/words.pl [L,QSA]
22:23 flamey and it worked
22:23 flamey sorta
22:23 flamey it broke the css and images
22:24 Akron Better with ^ and $ - and exclude all folders with static data.
22:24 Akron E.g. "RewriteCond %{REQUEST_URI} !^/(cgi-bin|images|styles)/" before the rule.
22:25 Akron Sorry - have to go now ... idling for an hour or so. ;) Good luck!
22:25 flamey Akron, thank you very much for you help!
22:25 flamey i'll get it working one way or another
22:26 Akron You're welcome!
22:27 sri make sure to put it up on the wiki as an example once you got it working ;)
22:32 flamey yeah, I was thinkin about that too :) i'll blog about it too
22:35 sri \o/
22:50 forwardever joined #mojo
22:55 und3f is now known as und3f[A]
22:59 flamey here's my .htaccess that made things work... sorta :)
22:59 flamey RewriteEngine On
22:59 flamey RewriteBase /
22:59 flamey RewriteCond %{REQUEST_FILENAME} !-f
22:59 flamey # RewriteCond %{REQUEST_FILENAME} !-d  # <- breaks CSS/images if enabled
22:59 flamey RewriteRule ^(.*)$ /cgi-bin/words.pl [L,QSA]
23:01 flamey i have more Mojo questions now, but no time to ask 'em :( so, i'll probably be back tomorrow :)
23:02 flamey thanks everyone who helped for your help!
23:02 flamey left #mojo
23:15 forwardever left #mojo
23:29 janus joined #mojo
23:39 kvorg left #mojo

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