Camelia, the Perl 6 bug

IRC log for #mojo, 2012-02-01

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

All times shown according to UTC.

Time Nick Message
00:27 jnap joined #mojo
00:44 hshong joined #mojo
01:24 jnap joined #mojo
01:25 mire joined #mojo
01:43 inokenty joined #mojo
01:49 jnap joined #mojo
02:57 alnewkirk joined #mojo
03:25 vel joined #mojo
04:41 larsx2 joined #mojo
05:14 xaka joined #mojo
05:38 xxtjaxx joined #mojo
05:42 xxtjaxx Hi! I wrote a webservice with Mojolicious that will scrape data out of a website. The idea is that it should a) be periodically or refactored into one part that will periodically request data from the scrapable service and store it and one part that could service clients with life data and the data requested by the client. Is this possible? Any ideas how to do that with pure mojolicious? I had the idea to do the backend into its own mojolicious service an
05:42 xxtjaxx https://github.com/andreas-marschke/nagplot  << this is the WIP code for it. Nagios works so far and can quickly return data very well.
05:52 hshong` joined #mojo
06:03 crab your question makes no sense to me.
06:04 crab be periodically or refactored into one part that will periodically... what?
06:20 alnewkirk ... become a periodical refactoring! whats not to get?
07:25 Vandal joined #mojo
07:33 tempire xxtjaxx: try breaking it down into singular tasks.  it will likely help you design it, and you'll be more likely to get help.
08:07 jwang joined #mojo
08:13 spleenjack joined #mojo
08:26 stephan48 i got 2 identical apps one rund directly via daemon server, the second behind apache2(on path /test), now i am making a request from the second app to the first but i always get the basepath i set in a before_dispatch hook, is there a way to remove this basepath?
08:27 stephan48 i got the baseurl of the first app, the action i want to call, so i want to use the baseurl+actionurl but without the specific basepath
08:41 cosmincx joined #mojo
08:52 mmcleric joined #mojo
08:54 cosmincx joined #mojo
08:58 Andrei666 joined #mojo
08:59 Andrei666 morning everybody
08:59 Andrei666 does anyone know where hypnotoad writes it's log files?
08:59 mattastrophe joined #mojo
09:30 crab logs/myapp.log i guess
09:36 melmothX joined #mojo
09:37 Andrei666 i've already checked...there..and found nothing
09:37 Andrei666 is there a way to make hypnotoad behave like morbo? like displaying every requested and everything on the screen?
09:38 jwang joined #mojo
09:38 crab andrei: sub production_mode { shift->log->path("/home/andr​ei666/.s3kr1t/logs/app.log") }
09:40 Andrei666 ok, and where should that sub go?
09:41 crab in lib/App.pm
09:41 Andrei666 ok thanks :)
09:44 ki0 joined #mojo
09:45 Andrei666 crab: thank you...it works
09:45 Andrei666 :)
09:46 Andrei666 now...how can I configure it to log more than "[Wed Feb  1 08:32:04 2012] [info] Logging implementation: Mojo::Log [Wed Feb  1 08:32:04 2012] [info] Server listening (http://*:8000) "
09:46 Andrei666 something like IPs, ports...services
09:46 Andrei666 ?
09:46 crab does morbo log what you want?
09:48 Andrei666 yes it does..
09:48 * purl stays quiet
09:49 Andrei666 but...my project manager wants to use hypnotoad ...
09:50 crab i'm not saying you should use morbo, just trying to understand what you want
09:50 crab if morbo logs what you want, then it's a matter of changing the log level to debug
09:50 Andrei666 in the hypntodoad conf fiel?
09:50 Andrei666 *file
09:50 crab and i'm not going to tell you how to do that ;-)
09:50 Andrei666 :D
09:50 Andrei666 ))
09:50 Andrei666 :D
09:51 Andrei666 damn it :p
09:56 marcus cracksticks!
09:57 noganex joined #mojo
10:03 crab iaw has decided to send me documentation suggestions offlist
10:03 daxim joined #mojo
10:16 marcus crab: Is he afraid of the kraih? ;)
10:17 crab dunno. i don't think kraih has said anything much to him.
10:19 * marty is up all night playing call of duty on xbox 360, and getting his ass kicked :(
10:34 GabrielVieira joined #mojo
10:50 kitt_vl joined #mojo
11:06 black joined #mojo
11:30 black left #mojo
11:49 d4rkie joined #mojo
11:56 briang joined #mojo
12:37 sven^ I am doing this: http://mojolicio.us/perldoc​/Mojolicious/Guides/Growing my problem is: $ ./myapp.pl get /  => Problem loading URL "/". (Connection refused)
12:37 sven^ if I do it in a web browser it works
12:43 marcus phear
12:44 sri crab: heh, happens to me all the time too that people send me stuff off-list… i tend to ignore it
12:58 sven^ uhm... does Mojolicious use some strange ports when I run stuff like ./myapp get / ?
13:03 Andrei666 hey guys...i was looking at the mojo example that uses websockets
13:07 Andrei666 and there's a line there  new WebSocket('<%= url_for('')->to_abs %>'); that returns a http request...
13:07 Andrei666 is there one that return a ws request?
13:08 Andrei666 instead of var ws = new WebSocket('http://127.0.0.1/echo') ...something like var ws = new WebSocket('ws://10.1.9.217/echo')
13:08 Andrei666 ?
13:08 daxim joined #mojo
13:09 noganex_ joined #mojo
13:19 stephan48 in a Mojolicious app, how could i make a route matching only some placeholder values?
13:22 stephan48 ah found out :) reading routing guide helped
13:25 marcus sri: is it possible to do async requests with mojolicious and plack?
13:25 marcus sri: I have an app now that works fine in morbo and hypnotoad, but just serves a 404 with plackup
13:26 marcus and my sysadmins are  like 'We are fine with everything as long as you deploy with fcgi-engine'...
13:30 marcus tried with twiggy as well, same results :-/
13:44 jnap joined #mojo
13:44 * marcus considers a Mojolicious driver with AnyEvent::FCGI
13:59 marcus I'm actually not even sure why it's not working.
14:02 sri marcus: Mojo::IOLoop is not running under PSGI
14:02 marcus sri: that would do it. ;)
14:02 sri so you can't use any features depending on it
14:02 sri rules out pretty much everything we call real-time
14:03 marcus :'(
14:03 sri that's exactly why we have our own servers
14:04 sri everything non-blocking is really a server feature
14:04 marcus sri: I seem to remember psgi having optional async support tho?
14:04 sri server feature
14:05 sri if your server is anyevent based you might be able to use anyevent features and the like
14:05 sri if it's POE based you might be able to use POE
14:05 marcus 'psgi.nonblocking' ?
14:05 sri is a joke
14:06 migo joined #mojo
14:07 sri if you want something truly async you have to standardize on a single event loop
14:08 marcus I don't really need truly async at the moment tho, just parallel http.
14:08 sri guess why the ruby folks are constantly swearing at rack these days
14:08 marcus but I've rewritten everything to use callbacks since my unsupported hack from before works.
14:09 sri very soon you'll see people get all excited about connect.js clones for other languages
14:09 marcus now it turns out I probably won't be able to deploy this solution tho. :S
14:09 marcus pocket.io?
14:09 marcus oh, http://www.senchalabs.org/connect/ ?
14:10 sri everybody and their mother will emulate node.js
14:10 sri give it one or two more years
14:10 mdom joined #mojo
14:11 crab and their pet dogs too!
14:11 sri !
14:11 marcus stratified looks pretty cool.
14:11 marcus (http://onilabs.com/stratifiedjs)
14:11 sri marcus: btw. i gave you the solution to your problem a few days ago
14:11 d4rkie joined #mojo
14:12 mdom Moin ... is there any way to run Mojo::Template under no strict?
14:12 amoore joined #mojo
14:12 sri marcus: http://mojolicio.us/perldoc/Mojolicious/G​uides/Cookbook#Parallel_blocking_requests # this was written for you
14:12 sri but i think you really need to dig deeper into the code yourself, you should understand those design decisions
14:13 sri it's a very important part of mojolicious
14:13 mdom I want to use the same template to catch exceptions as for a working request and naturally i'm missing some variables on the stash in the former case
14:13 sri your first thought when you hear PSGI should be "limited"
14:13 memowe mdom: use the stash helper.
14:14 memowe mdom: instead of $foo, you use stash 'foo' or stash('foo').
14:14 sri the time of the CGI-jail is simply over, real-time web features require *a lot* more
14:15 marcus sri: my current callbacks based implementation works great under hypnotoad. Wouldn't really want to rewrite using the blocking features.
14:15 sri marcus: NO!
14:15 marcus Will see if I can convince stubborn sysadmins.
14:15 sri marcus: $delay->wait unless Mojo::IOLoop->is_running;
14:15 sri you can make it work with both
14:16 marcus sri: I have nested levels of requests tho
14:16 marcus using parallol
14:16 sri marcus: that shouldn't be a problem if you ->begin/->end more
14:18 sri perhaps you should to all that manually first, maybe that makes understanding delays easier
14:18 sri s/t/d/
14:18 sri with a $i counter
14:19 mdom memowe: Thanks! That's working
14:19 memowe :)
14:20 sri marcus: coversations like this one make me want to remove everything blocking from mojolicious and go 100% non-blocking :S
14:20 marcus sri: I didn't think I could do anything blocking at all until I realized the ioloop wasn't running under psgi
14:20 marcus now I just don't want to.
14:20 marcus :)
14:21 * sri faints
14:22 sri btw
14:22 crab faints? oh good, that means i have an extra five minutes before you push a change to remove all blocking features ;-)
14:23 sri http://mojolicio.us/perldoc/Mojol​icious/Guides/Cookbook#Embedding
14:23 sri you can make Mojo::IOLoop parasitic
14:23 sri *if* your host environment has an event loop
14:23 sri just call ->one_tick from a recurring timer or tick event
14:25 sri actually, i'm gonna change that recipe to make it more obvious
14:26 sri or actually not
14:29 sri anyway, the lesson here is that there's always a crowbar method to make it work ;p
14:29 sri Mojo::IOLoop->one_tick being the crowbar
14:30 sri the biggest we have
14:30 sri $delay->wait unless Mojo::IOLoop->is_running; is a smaller one
14:30 * marcus needs a sledgehammer.
14:31 * sri bonks marcus on the noggin with a crowbar
14:31 d4rkie joined #mojo
14:32 sri https://github.com/kraih/mojo/bl​ob/master/lib/Test/Mojo.pm#L353
14:32 sri we actually use these tricks in core to emulate blocking
14:32 sri that's how the blocking websocket test api works
14:33 sri one_tick until it has everything it needs
14:34 sri that's what makes Mojo::IOLoop so much unlike AnyEvent and EV
14:34 sri both of which are singletons and pure
14:56 Andrei666 is there a way to change the scheme in url_for, from http to ws?
14:57 Andrei666 i'm looking at the WebSocket example and an need a ws scheme instead of a http... in var ws = new WebSocket('<%= url_for('')->to_abs %>');
15:18 mdom Do i need an extra route for embedded static files?
15:30 kaare joined #mojo
15:33 cosmincx joined #mojo
15:35 GitHub45 joined #mojo
15:35 GitHub45 [mojo] kraih pushed 1 new commit to master: http://git.io/iB0_eg
15:35 GitHub45 [mojo/master] mention real-time web feature requirements in deployment section of cookbook - Sebastian Riedel
15:35 GitHub45 left #mojo
15:46 inokenty joined #mojo
15:58 cosmincx joined #mojo
16:05 xaka joined #mojo
16:06 mire joined #mojo
16:11 GitHub77 joined #mojo
16:11 GitHub77 [mojo] kraih pushed 1 new commit to master: http://git.io/HIHmBQ
16:11 GitHub77 [mojo/master] added recipe for streaming multipart uploads to cookbook - Sebastian Riedel
16:11 GitHub77 left #mojo
16:13 sri crazy recipe
16:13 mercutioviz joined #mojo
16:14 sri but it makes a point
16:18 sromanov joined #mojo
16:19 gabriel joined #mojo
16:21 Mad_Dud hey guys i found this quote in mojo wiki: There is a difference between <%== $variable %> and <% $variable %>. Make sure to read the documentation about different templating tags, this will save you plenty of debugging efforts.
16:22 Mad_Dud from here: https://github.com/kraih/mojo/wiki/​Working-with-the-templating-system
16:22 Mad_Dud where is it referring to?
16:23 sri http://mojolicio.us/perldoc/​Mojolicious/Guides/Rendering
16:24 Mad_Dud can i edit this wiki and add this url there?
16:25 amoore joined #mojo
16:26 melmothX hello all. this is going to be the dumbest question ever... but how many days usually takes to a real devel to set up a full site using a framework? Or better, how many hour is *supposed* to spend working on that?
16:26 sri of course you can
16:27 GitHub67 joined #mojo
16:27 GitHub67 [mojo] kraih pushed 1 new commit to master: http://git.io/OJ3dHQ
16:27 GitHub67 [mojo/master] added important note to streaming upload recipe - Sebastian Riedel
16:27 GitHub67 left #mojo
16:29 jnap_ joined #mojo
16:29 jnap joined #mojo
16:32 crab melmothx: 13.37 hours
16:32 sri http://cache.ohinternet.com/images/2/​24/I_see_what_you_did_there_super.jpg
16:34 melmothX well, I asked just to have an idea (it was a real question)
16:35 melmothX that's what a framework is supposed to do, right? save devel time (more or less)
16:42 crab melmothx: what is "a full site"?
16:43 crab there is no way to answer a question like that. sorry.
16:43 melmothX yeah, probably, but it was worth trying. But say, a simple site which collects text and has a search engine. Nothing too fancy
16:44 melmothX an upload form, a search form, an admin "console"
16:44 melmothX a week? a month? two days?
16:45 sri too many variables to answer
16:45 sri programmer skill alone can make the difference between a day and weeks
16:46 melmothX anyone can speak from experience? how much time does take to you to build something usable
16:47 melmothX just to have a rough idea of the average, nothing more
16:51 sri http://www.quora.com/Engineering-Manageme​nt/Why-are-software-development-task-esti​mations-regularly-off-by-a-factor-of-2-3
16:52 sri first answer is brilliant
16:55 melmothX well, as the intro stated, this was the dumbest question ever
16:57 crab well, don't be upset that we don't have any answers.
16:58 melmothX sure I am not, I was just curious
16:58 crab what i can say is that yes, if you get along with your framework, it can save you lots of time.
16:58 crab but only you can quantify that, and then only the hard way.
17:06 melmothX thanks anyway :-)
17:26 sri tempire: how are your plans for explaining event loops coming along?
17:29 xaka joined #mojo
17:38 Netfeed melmothX: my first(and so far only) site in mojo took around a weekend to build, but then i learned how to do stuff during that time too
17:39 melmothX Netfeed: thanks
17:39 Netfeed doesn't really say much about the site, but it was fairly easy to get going
17:44 mercutioviz joined #mojo
17:55 gabriel Hello there, I'm usgin 'do' function within mojolicious::lite to get a hash structure from a file encoded in utf8, but when I render the page, the encode is wrong. http://pastebin.com/y8Zb11AA
18:01 jnap joined #mojo
18:05 gabriel anyone?
18:05 purl Somewhere, someplace, in some universe, somebody uses whatever you just asked about.
18:10 jr joined #mojo
18:16 mdom left #mojo
18:18 gabriel using open + eval instead...
18:18 marty gabriel:  Are you just trying to read a config file at startup?
18:18 gabriel not exactly.. there are many config files
18:19 gabriel depending on the request I get one file content
18:22 gabriel I solved using open + eval instead of 'do'
18:24 Vandal +1
18:24 purl 1
18:33 vel joined #mojo
18:37 GitHub105 joined #mojo
18:37 GitHub105 [mojo] kraih pushed 1 new commit to master: http://git.io/F2eHeQ
18:37 GitHub105 [mojo/master] fixed typo in streaming multipart upload recipe - Sebastian Riedel
18:37 GitHub105 left #mojo
18:44 sri oh cute, mojolicious is mentioned in the komodo 7 announcement :) http://www.activestate.com/blog/2012/02/ko​modo-ide-7-worlds-fiercest-ide-has-evolved
19:11 tempire \o/
19:11 tempire sri: It's not so much a matter of efforts, but schedule.
19:11 tempire have to finish some other mojocasts before events come along
19:12 jnap joined #mojo
19:21 buu joined #mojo
19:28 melmothX joined #mojo
19:32 vel joined #mojo
20:09 larsx2 joined #mojo
20:34 GitHub72 joined #mojo
20:34 GitHub72 [mojo] kraih pushed 1 new commit to master: http://git.io/KiNIQg
20:34 GitHub72 [mojo/master] added lock_timeout parameter to Hypnotoad - Sebastian Riedel
20:34 GitHub72 left #mojo
20:35 sri tempire: i see
20:39 lukep joined #mojo
20:45 kaare joined #mojo
20:55 marcus Sei
20:55 marcus Sri: blocking works for me.
20:56 jnap joined #mojo
20:59 mire joined #mojo
21:10 jzawodn joined #mojo
21:11 jzawodn joined #mojo
21:15 tempire +(local time)[0..3] works on lists
21:15 tempire so you can do +(1,2,3,4)[0..2]
21:15 tempire so cool!
21:18 perlite_ joined #mojo
21:19 tempire qw/ 1 2 3 4 /[0..2] !!
21:19 grim_fandango joined #mojo
21:21 grim_fandango left #mojo
21:24 baton8 joined #mojo
21:26 sri marcus: stop ircing from your iphone ;p
21:26 sri "Sri" kinda gives it away
21:31 tempire he just respects you more today
21:32 tempire I looked at limechat on ios
21:32 tempire but is it really work $4.99 ?
21:32 tempire *worth
21:32 sri well, it's the best irc app for ios i know
21:33 tempire I had no problem with colloquy, except that it notifies the channel whenever you go away
21:34 sri i wonder what happened to the textual update :/
21:37 tempire the button customizer for bootstrap is wonderful
21:41 larsx2 left #mojo
21:45 Mad_Dud guys, how to add some variable to all the stashes?
21:45 Mad_Dud can i put something into stactup{}?
21:51 sri Mad_Dud: have you looked at the documentation yet?
21:52 sri i'm asking because this used to be a so commonly asked question that i've added it to the main stash description http://mojolicio.us/perldoc/​Mojolicious/Controller#stash
21:55 Mad_Dud got here: http://mojolicio.us/perldoc/Mojo​licious/Lite#Stash_and_templates
21:55 Mad_Dud and ddg'd "Mojolicious global stash"
21:56 Mad_Dud oh damn.
21:56 Mad_Dud "controller" ... i'm stupid
21:58 Mad_Dud i still can't find myself in this documentation
21:59 tempire Mad_Dud: don't be discouraged.  It's a lot of material.
21:59 tempire you will absorb it over time.
21:59 tempire have you seen the mojocasts?
21:59 Mad_Dud i hate to bother people with obvious questions.
22:00 Mad_Dud mojocasts - 1st only
22:00 tempire you'll save a lot of time by watching them through.
22:00 Mad_Dud the answer is also there, i presume.
22:00 purl okay, Mad_Dud.
22:00 tempire not specifically, but it will give you an overall impression of what's available.
22:00 tempire so it's easier to have a mental model when you're looking at the documentation.
22:01 sri yea, give it time, it's a lot of very dense material
22:01 tempire and obvious is subjective.  sri wrote them, so he's extra sensitive.  he's really a nice guy, though.
22:01 * tempire hugs sri
22:01 Mad_Dud aww
22:02 sri it's actually not uncommon that readers overlook the Mojolicious::Controller connection, i wonder if we could improve that with a better example
22:03 sri it is such an important starting point for diving into the reference docs
22:03 tempire I wish I would have included defaults in the cast about stash.
22:03 tempire didn't think about it.
22:04 sri defaults only have one example in the whole documentation
22:04 sri for an app wide default layout
22:05 sri kinda would like it in the lite tutorial, but the first few examples shouldn't look overloaded :S
22:05 Mad_Dud beautiful. self->defaults->{submenu} = '0'; works!
22:06 Mad_Dud if mojo wins performance test against catalyst, I will port all my stuff on mojo framework.
22:10 marcus sri: just wanted you to know that I tried delay and it works great. Have been drinking beer tonight, so no Mac.
22:10 sri marcus++
22:10 * sri goes to get a beer too
22:59 jr_ joined #mojo
23:34 DaTa http://cssrefresh.frebsite.nl/ love it :)
23:44 mire joined #mojo
23:45 mire joined #mojo
23:55 mire joined #mojo

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