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

IRC log for #mojo, 2014-01-07

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

All times shown according to UTC.

Time Nick Message
00:33 d4rkie joined #mojo
00:37 jberger joined #mojo
00:38 * jberger has always been amazed at how much mojo can do with so few lines
00:38 jberger Also if someone has a space heater they can hold over the midwest we would all be grateful
00:50 laouji joined #mojo
00:51 laouji_ joined #mojo
00:59 sri the fact that css4 selectors can have multiple subjects freaks me out :o
01:01 sri $dom->find('!div > !a') will get you the div *and* a elements
01:15 ka2u joined #mojo
01:22 marty joined #mojo
02:36 firnsy joined #mojo
02:57 klapperl joined #mojo
03:08 firnsy_ joined #mojo
03:13 rem_lex|pivo joined #mojo
03:28 cfedde joined #mojo
04:23 tempire joined #mojo
04:36 preflex_ joined #mojo
04:45 irq joined #mojo
05:18 ka2u joined #mojo
06:39 bowtie_ joined #mojo
06:49 Foxcool_ joined #mojo
07:28 Vandal joined #mojo
07:30 ka2u joined #mojo
07:40 rem_lex| joined #mojo
07:44 damaya joined #mojo
07:47 damaya tempire: Mojolicious::Command::deploy::heroku bails on install with cpanm. I had to add version information to deploy.pm.
07:47 damaya Found Mojolicious::Command::deploy  which doesn't satisfy 0.01. ! Installing the dependencies failed: Missing version info for module 'Mojolicious::Command::deploy'
07:49 dod joined #mojo
07:55 rj11 joined #mojo
08:03 rj11 Hello! I have Schema.pm and Result/*.pm files setup using the schema dumper, they seem to be correct. Searching/select works fine. But, when I try to create a row I get an error about "Attribute (schema) is required at ..../Moost/Meta/Attribute.pm". The schema is a single 4-column table (PSQL). Can someone point in the right direction where to begin debugging?
08:06 HtbaaPi joined #mojo
08:07 rj11 Oh, sorry, completely wrong window. :)
08:13 dpetrov_ joined #mojo
08:16 maxhq joined #mojo
08:22 highflying joined #mojo
08:24 dod joined #mojo
08:28 laouji joined #mojo
08:28 trone joined #mojo
08:33 laouji_ joined #mojo
08:34 odc joined #mojo
09:04 testsadasd joined #mojo
09:05 fhelmber_ joined #mojo
09:07 fhelmbe__ joined #mojo
09:10 damaya joined #mojo
09:10 damaya It kinda pisses me off that Perl is such an ignored language in favor of Python, Ruby, Node.js, etc
09:11 damaya It's not even listed on Heroku for any guides. Code Academy and sites like it have no Perl tutorials...
09:11 damaya wtf
09:14 hrupp joined #mojo
09:23 nicomen damaya: you know the only way to fix that right?
09:23 cosimo nicomen: write and tell them? :)
09:24 nicomen yeah ;)
09:25 nicomen or contribute
09:25 purl hmmm... contribute is a bad way.
09:25 nicomen if they just get a finished guide, the likelyhood it is included is quite big
09:27 damaya I don't know enough about Heroku to contribute.
09:27 damaya The infrastructure, etc.
09:27 moritz purl: forget contribute
09:27 purl moritz: I forgot contribute
09:27 damaya I'm just trying to figure out what it's all about at this point.
09:28 damaya I usually host stuff on VPS, or AWS; so this Heroku thing is pretty new to me. However, I did send them a note letting them know that a guide on Perl (Catalyst, Mojo, Dancer, something) would be nice.
09:28 nicomen http://tempire.github.io/mojolicious-command-deploy-heroku/
09:28 nicomen http://blog.kraih.com/post/43199102900/mojolicious-in-the-cloud-hello-heroku
09:28 testsadasd test
09:32 damaya nicomen: a few things about tempire's script that I had issues with for some reason: first, I don't seem to be able to name my heroku node (?) (and not sure if that's a big deal or not); second, it results in this error: error: src refspec master does not match any. when I run it... I did a git commit and then pushed and everything worked though.
09:32 damaya Haha, my problem is not knowing how to start it :D
09:32 damaya I mean start my app/
09:33 damaya Ah, that's a good post by sri.
09:34 damaya All I got after deploying with tempire's mojolicious-command-deploy-heroku is: "Heroku | Welcome to your new app! Refer to the documentation if you need help deploying."
09:34 damaya that is when I visit it
09:37 rem_lex|pivo joined #mojo
09:39 sh4 joined #mojo
09:45 irq joined #mojo
10:06 sh4 joined #mojo
10:09 maxhq joined #mojo
10:28 sivoais_ joined #mojo
10:30 priodev joined #mojo
10:39 KindOne joined #mojo
10:52 ladnaV joined #mojo
10:54 klapperl_ joined #mojo
11:01 mire_ joined #mojo
11:19 dsteinbrunner joined #mojo
11:33 meshl joined #mojo
11:45 denis_boyun joined #mojo
11:48 sh4 joined #mojo
12:06 meshl Hi, my knowledge of the async ua internals is such that I need to ask some help: what could typically be causing a "Blocking request in progress" exception?
12:15 irq_ joined #mojo
12:56 root joined #mojo
13:01 d4rkie joined #mojo
13:11 dod joined #mojo
13:20 d4rkie joined #mojo
13:29 ka2u joined #mojo
13:55 dod joined #mojo
13:55 inokenty joined #mojo
14:14 russum joined #mojo
14:18 laouji joined #mojo
14:18 mire__ joined #mojo
14:22 ka2u joined #mojo
14:28 fhelmber_ joined #mojo
14:29 fhelmber_ joined #mojo
14:34 dvinciguerra joined #mojo
14:50 dsteinbrunner joined #mojo
14:52 russum left #mojo
15:02 bluescreen joined #mojo
15:04 paraplexed joined #mojo
15:04 marty joined #mojo
15:05 marty_ joined #mojo
15:13 btyler joined #mojo
15:16 dotan meshl: mixing blocking and non-blocking requests, I think - $ua->get($url1, sub { ... } ); $ua->get($url2);
15:17 gryphon joined #mojo
15:17 asarch joined #mojo
15:28 ka2u joined #mojo
15:28 good_news_everyone joined #mojo
15:28 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/a4u-Cg
15:28 good_news_everyone mojo/master 1de8fb4 Sebastian Riedel: improved exception page with more information
15:28 good_news_everyone left #mojo
15:33 dod joined #mojo
15:34 denis_boyun joined #mojo
15:35 marty joined #mojo
15:36 marty_ joined #mojo
15:41 bd so all I need for a non blocking request is to specify a sub {} as second parameter?
15:48 bd seems so: [Tue Jan  7 16:47:59 2014] [debug] Nothing has been rendered, expecting delayed response.
16:00 chansen sri: still using asctime, thats sooo out of date, modern software uses ISO 8601 ;)
16:11 sri chansen: i beg to differ
16:12 sri as long as perl core can't even parse iso 8601 it's not a thing
16:14 sri being more familiar with rfc 3339... i actually find it rather annoying in how it allows multiple formats
16:14 dvinciguerra joined #mojo
16:15 sri "OH YEA, LETS HAVE LIKE 10 LEVELS OF GRANULARITY AND OPTIONAL PARTS LIKE TIMEZONES...LULZ"
16:16 chansen pick the most commonly used profile, 2014-01-07T17:17:42+01:00
16:16 sri you still have to be able to parse all the shitty bits
16:17 chansen true, but's that not hard, is it?
16:17 sri Time::Piece generates some form of iso 8601... but doesn't actually parse it
16:17 arthas joined #mojo
16:18 sri dunno... Akron made a parser a few months ago and proposed it for mojo core... i was terrified
16:18 sri https://github.com/Akron/Sojolicious/blob/master/lib/Mojolicious/Plugin/Date/RFC3339.pm
16:19 sri no clue if all that is really necessary... but that spoiled rfc 3339 for me
16:19 chansen Thats ugly and doesn't make sense
16:20 chansen 3339 is about timestamps
16:20 chansen not partial dates
16:21 beyondcreed joined #mojo
16:22 chansen it's titled "Date and Time on the Internet: Timestamps"
16:22 chansen Examples: http://tools.ietf.org/html/rfc3339#section-5.8
16:24 ka2u joined #mojo
16:26 meshl joined #mojo
16:27 gryphon joined #mojo
16:31 gryphon joined #mojo
16:32 sri i like my date formats simple ;p https://github.com/kraih/mojo/blob/master/lib/Mojo/Date.pm#L25
16:33 sri i'm actually not opposed to supporting iso 8601 "the good parts"... but even trying to decide what that might be gives me a headache
16:34 tianon joined #mojo
16:40 chansen your usage of asctime is ambiguous, how do you know if it's in GMT/UTC or local time to system/originator?
16:42 chansen that function can't correctly roundtrip timestamps from Mojo::Log unless the systems time zone is UTC
16:48 zackiv31 joined #mojo
16:56 meshl Could anyone give me a hint on this please: what could typically be causing a "Blocking request in progress" exception?
16:57 sri a blocking request in progress
16:58 sri which is a pretty hard exception to get, you must have really screwed up
16:58 zackiv31 joined #mojo
16:58 meshl yep, I must have...
16:59 meshl why could a blocking request be made when using async code?
17:00 nic meshl: Which server are you using?  morbo?
17:00 tianon if you can pastebin the code, that'll definitely help people here figure out what's wrong and point you in the right direction
17:01 meshl nope, the simple daemon, but which should be fine as when I replace my code using the cloudinary plugin with jberger's tutorial code fetching url, everything is fine...
17:02 jberger ;-)
17:04 meshl creating the paste now...
17:11 abra_ joined #mojo
17:12 meshl There you go: http://pastebin.com/9BA8vnzB
17:12 meshl Enjoy the paste, and don't find a silly bug :D
17:13 meshl batman: you may be interested since it's using your Cloudinary plugin...
17:16 jberger Cloudinary.pm has some funny delay attribute use
17:18 meshl had the feeling it could be a call to $delay->end in on_finish(), but that did not help
17:18 zackiv31 joined #mojo
17:21 meshl jberger: by funny what do you exactly mean?
17:22 meshl perhaps batman would allow me to monkey patch his code for *testing* purposes ;)
17:23 jberger_ joined #mojo
17:24 sri batman: i guess one could built this with that one ioloop module you made too :) https://github.com/joewalnes/websocketd
17:24 sri it's a fun example
17:24 jberger_ meshl/batman, notice that the delay end callback does not get called if there is an on_success or on_error handler :o
17:24 jberger_ https://github.com/jhthorsen/cloudinary/blob/master/lib/Cloudinary.pm#L319
17:24 jberger_ that seems VERY suspiciou
17:24 jberger_ s
17:25 dod joined #mojo
17:26 jberger_ also IMO calling the hash key {delay} when it is really the end callback strikes me as confusing too
17:26 jberger_ I can't say I'm a big fan of this api
17:26 jberger_ sorry batman
17:27 meshl ok, so where do you suggest I call end() to account for this issue? (since I already tried unsuccessfully...)
17:28 jberger_ ENOTIMETOFIGUREOUTBATMANSCODE
17:28 meshl maybe batman wrote it at a time when he was still tiptoeing on async grounds...
17:28 jberger_ but the problem is in _call_api I suspect
17:28 jberger_ I think so too
17:28 jberger_ if delay->begin is called, the end callback MUST be called
17:29 jberger_ I don't think an api should try to do that for you
17:29 meshl ok, well, will try to pull a bit more of my hair out then :)
17:29 jberger_ I would remove all the else { {delay} } clauses
17:30 meshl sri: please, could you elaborate a bit on your comment? I did not get it: where did you see 2 ioloops?
17:30 jberger_ and make you the end callback invocation into the {cb} callback
17:30 jberger_ o/
17:30 sri meshl: listen to jberger
17:31 meshl ok sri, ok jb
17:43 chansen sri: $class->parse($string) or $class->new->parse($string)?
17:44 chansen seems Mojo follows the latter
18:21 irq joined #mojo
18:36 stokachu so trying to get mojolicoius::lite to listen on an ssl port with the following code http://sprunge.us/OJDP
18:36 stokachu i generated my server.pem but im still having some trouble getting it to load the page
18:37 stokachu the error the browser reports is Error code: ERR_SSL_PROTOCOL_ERROR
18:37 stokachu i have IO::Socket::SSL installed as well
18:49 trone joined #mojo
18:59 stokachu sri: if youre around and have a second to look at my paste to see if ive missed anything
19:19 sri yay, traffic stats on github \o/ https://github.com/blog/1672-introducing-github-traffic-analytics
19:22 dvinciguerra_ joined #mojo
19:27 chansen nice feature
19:27 purl nice feature is probably that you can get a SunPCI card to run Windows natively within the workstation itself.  So it's virtually a Sun WS and a nice gaming PC
19:29 moritz purl: forget nice feature
19:29 purl moritz: I forgot nice feature
19:43 cooper joined #mojo
19:45 Adura Upgradin' perls.
19:56 mire__ joined #mojo
20:10 Foxcool__ joined #mojo
20:32 elvis joined #mojo
20:32 lukep joined #mojo
20:35 chansen nopaste?
20:35 purl somebody said nopaste was http://paste.scsys.co.uk/ or http://nopaste.snit.ch/ or http://gist.github.com/ or DO NOT USE pastebin.com IT FUCKING SUCKS
20:36 chansen sri: perhaps something like this http://paste.scsys.co.uk/290034
20:42 sri chansen: that does look nice
20:45 sri reminds me of something though... why did we wrap timegm in an eval again? was that a perl 5.8 thing?
20:45 chansen it croaks if given out of range values
20:46 batman joined #mojo
20:49 sri ah, thanks
20:49 good_news_everyone joined #mojo
20:49 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/N5kOxQ
20:49 good_news_everyone mojo/master db60671 Sebastian Riedel: added out of range test for Mojo::Date
20:49 good_news_everyone left #mojo
20:50 meshl joined #mojo
20:58 chansen http://paste.scsys.co.uk/290042 fixed two bugs (regex and zulu zone)
20:59 chansen Will you integrate it or do you want a pull request?
21:02 elvis joined #mojo
21:06 sri chansen: i'm neutral on it, since there's currently no real use case in core, you can send a pull request to put it up for a vote
21:08 sri not sure we currently have any modules in core that aren't use by another module in some way
21:14 sri hmm, bluebird promises get a lot of buzz... wonder what makes them so fast https://github.com/petkaantonov/bluebird
21:25 elvis joined #mojo
21:25 batman joined #mojo
21:26 elvis joined #mojo
21:26 batman joined #mojo
21:31 irq joined #mojo
21:43 cullum joined #mojo
21:47 meshl jberger: in which case could Mojo::IOLoop->delay be calling the on_finish sub twice? I think Cloudinary wasn't my problem...
21:50 jberger No it may not be calling the end callback at all
21:50 sri if anyone has any ideas for features we could support with Mojo::Timestamp i'd like to hear those too
21:52 da5id joined #mojo
21:52 meshl jberger: I understand what you were saying about the plugin, but forget about that. I think it was meant to be used either with the on_success/on_error callbacks, or with the delay sub. Since I was only using the delay sub, on_finish() was always called. And I am actually seeing now that it is called twice!
21:53 meshl The reason why I am asking is: if a request times out, could it be that Mojo::UA tries to create the request again?
21:53 jberger meshl I really don't have time to poke around his code right now, sorry
21:54 meshl Jberger: I don't want you to look at any code: it's just a general question: would you see any reason for on_finish
21:54 meshl to be called twice?
21:55 jberger Which on finish?
21:55 meshl the single sub passed to Mojo::IOLoop->delay
21:56 meshl forget about Cloudinary to answer please
21:56 purl meshl, I didn't have anything matching about cloudinary to answer
22:04 lucs In  http://toroid.org/ams/etc/mojolicious-db-handles , crab says "The first time it is accessed, the function I provided is called, and its return value is cached and returned as the value of the attribute thereafter."
22:04 lucs How does the caching happen?
22:16 denis_boyun joined #mojo
22:21 jberger That will be called any time the number of internal counters reaches zero
22:21 jberger Outside of steps that is
22:22 jberger meshl ^^
22:37 denisboyun joined #mojo
22:39 tempire joined #mojo
23:08 meshl jberger: thanks, looks like for some reason my form is submitted twice, still did not figure out how but getting there, so no bug with Cloudinary.pm indeed, even though you don't like its code much...
23:14 * sri would like to show the last 10 or so log messages on the not found and exception pages... but thinks it might be too costly
23:15 sri Mojo::Log would have to keep those messages around
23:15 sri @{app->log->history} or so
23:15 moritz only do it dev mode?
23:15 sri still an extra check
23:17 moritz you mean in Mojo::Log?
23:17 sri yes
23:17 moritz there could be Mojo::Log::Dev or ::Debug or so subclass that keeps them
23:18 sri it wouldn't be that expensive if the check was after the mode check... since in production pretty much nothing gets past it
23:18 sri eww...
23:18 moritz aye. But it would get rid of the extra check :-)
23:19 meshl could a req timeout induce a browser to submit a form twice or am I dreaming?
23:20 moritz anything is possible in the browser, with the sufficient amount of javascript
23:21 meshl moritz: but this could not be a standard practice, right!?
23:22 moritz meshl: no, I've never seen that before
23:48 jberger joined #mojo

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