Camelia, the Perl 6 bug

IRC log for #mojo, 2012-07-19

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

All times shown according to UTC.

Time Nick Message
00:27 preflex joined #mojo
00:49 bird joined #mojo
00:49 vervain joined #mojo
01:00 laouji joined #mojo
01:00 scott joined #mojo
01:01 tempire I would post a response to chromatic's blog entry if the login procedure was sensible
01:01 tempire mojo deploy heroku, one step.
01:01 tempire boosh
01:02 sri BOOSH!
01:02 tempire maybe I'll make a blog entry to showcase my pretty new website
01:02 tempire I never did blog about it, just twittered it
01:06 sri tempire: ->file() or ->get_file()?
01:07 tempire ordinarily, I'd say file, but I vote for get_file for consistency
01:09 sri hmm
01:10 sri ->get_data_template has slightly different semantics though
01:10 sri it's limited to DATA and returns the template raw, while app->static->file() returns a Mojo::Asset::* object
01:11 tempire what's the reason for it?
01:12 sri files can be in DATA or real files
01:12 sri you don't want to lead static files into memory if it's not necessary
01:12 sri *load
01:12 sri a Mojo::Asset::File only holds the path and a handle from which content is streamed
01:14 sri maybe ->asset_for_file() ;p
01:15 tempire hmm
01:15 tempire file sounds reasonable for a file handle object
01:15 sri not always
01:15 sri Mojo::Asset::Memory objects are returned for files in the DATA section
01:16 tempire but it's still a handle of some sort
01:16 tempire get_data_template just returns a string?
01:17 sri ye
01:17 tempire then I'd leave file as it is
01:18 sri mkay
01:18 sri get_data_template is a bit lower level i guess
01:18 tempire unless you want to make get_data_template return an object and stringify as text
01:19 sri i don't see a reason to do that
01:19 tempire then it's settled
01:19 sri \o/
01:20 sri naming stuff... 90% of the work
01:21 * sri wonders if there's a windows joke to be made about the mojolicious 3.11 release :)
01:21 tempire moderl perl for workgroups
01:21 tempire workgroups can be fun again
01:22 sri mojolicious for workgroups!
01:22 tempire I thought that might be too obvious
01:22 tempire but reading it, it's perfect
01:25 sri feel like releasing?
01:27 tempire What's the tag-specific url for Changes?
01:27 tempire I always forget
01:27 sri something with blob
01:27 * sri also depends on url completion :)
01:32 tempire it's really amazing how far mojolicious has come since I first came around
01:32 tempire It's a good thing I've been around to make the code work so well :)
01:33 tempire watching the full test suite run is pretty impressive
01:33 tempire sri+++
01:34 tempire ok, I'm about to upload.  are you sure this is ready?  of all releases, it seems like 3.11 should stick around for at least a week.
01:35 sri tempire++
01:36 sri yea, we should slow down with releasing again
01:37 sri i mostly wanted to get past 3.0x since i don't like releases with a 0 :)
01:52 sri tempire: the code has improved a lot since you're around :)
01:52 sri your first changes entry is in 0.999920... those were the days!
01:53 tempire I remember thinking I would keep using catalyst until the mojolicious docs were ready
01:53 tempire but then I got so fed up with cat, I decided to dive in or die trying
01:54 tempire VIVA LA REVOLUCIÓN!
01:54 sri VIVA LA REVOLUCION!
01:54 sri damn, --reload was soooo awful
01:54 tempire twittered
01:56 sri \o/
01:58 sri almost all snowman features are still around in some form or another
02:01 d4rkie joined #mojo
02:06 noganex_ joined #mojo
02:10 marty sri++ tempire++
02:10 marty VIVA LA REVOLUCION!
02:10 marty better late than never.  :)
02:11 tempire I for one welcome the new unicorn valkeries
02:13 marty Yes, so do I!!!   http://www.unicornlady.net/Gallery/images​/9-5/valkyrie_copyright_boris_vallejo.jpg
02:13 tempire oh dear
02:14 tempire go forth marty with your scantily cladness
02:27 asarch joined #mojo
02:41 Psyche^ joined #mojo
03:03 marty joined #mojo
03:23 tempire can I split a tag helper into two lines?
03:24 tempire ah yes, just not with the %= syntax
03:27 CromeDome joined #mojo
04:15 tempire sri: you awake?
04:16 freman joined #mojo
04:16 freman so there's another reason not to use appengine - the included data quota's aren't enough to actually download all your data in 1 day, or 1  week...
04:17 sri tempire: depends :)
04:18 sri google is evil
04:18 tempire so I'm making a blog entry that pimps the deploy command and mojolicious in regards to hurdles
04:19 tempire thinking about a url that would install the deploy command+mojolicious, so installation, generation, and deploy would take 3 commands instead of 4
04:19 tempire not sure if 1 step reduction is worth it, or what url would make sense
04:20 tempire tempi.re/deploymojo, something like get.mojolicio.us with another 3rd-level domain, or git.io/something
04:20 tempire looking for feedback
04:20 sri all work for me
04:21 tempire even something like deploy.mojolicio.us?
04:21 tempire would be interesting to have redirects to ready-made packages
04:21 tempire deployheroku.mojolicio.us
04:22 tempire deploy.mojolicio.us/heroku
04:23 * sri doesn't particularly like that
04:23 sri better show people how to put such a script on github or so
04:25 tempire hmm
04:27 tempire not sure.  I just don't like cpanm Mojolicious::Command::deploy::heroku
04:27 tempire not sexy.
04:29 zhutingting joined #mojo
04:31 sri curl get.mojolicio.us/Mojolicious/Command/deploy/heroku | sh
04:31 sri ? :)
04:32 tempire curl get.mojolicio.us/deploy/heroku | sh
04:33 sri i don't want special domains/paths, something generic would be fine
04:33 tempire well, I was thinking of just commands
04:33 tempire wonder if it could be used to generate interest in commands
04:34 sri hmm
04:34 tempire if someone could get "curl get.mojolicio.us/deploy/mymojotoolset | sh", seems like that could get some mindshare
04:35 tempire well, curl get.mojolicio.us/mymojotoolset | sh, where there was a Mojolicious::Command::mymojotoolset
04:35 tempire I'm not trying to push things on get.mojolicio.us, just brainstorming
04:37 tempire I'm totally fine using tempi.re, since I'm building that brand anyway
04:37 sri yea, i just don't want a case where we have to maintain a table of redirects
04:37 tempire right
04:38 sri would be funny if we did a metacpan search and used the first result :)
05:16 Leandr joined #mojo
05:17 GitHub36 joined #mojo
05:17 GitHub36 [mojo] kraih pushed 1 new commit to master: http://git.io/K_dVdw
05:17 GitHub36 [mojo/master] better examples for many methods - Sebastian Riedel
05:17 GitHub36 left #mojo
05:31 spleenjack joined #mojo
05:38 tempire sri: do you still have the vector art for the unicorn box on the front page?
05:39 tempire nevermind, I had it
05:40 Coff joined #mojo
05:59 laouji joined #mojo
06:00 AmeliePoulain joined #mojo
06:05 ovnimancer joined #mojo
06:44 marcus This seems a bit unsafe somehow - http://nordaaker.no/docs/skit​ch/Reeder-20120719-084416.jpg
06:45 Vandal joined #mojo
06:49 tempire it is a qemu vm
06:49 tempire hax0r it!
06:57 niski joined #mojo
06:57 jamesw a dOs seems more likely
07:06 marcus make it part of your zombie network.
07:28 cosmincx joined #mojo
07:47 nic diegok: Thanks for the info
07:47 nic A Peruvian friend warned me there could be a slang meaning but couldn't remember what it was (at least, that's what she said :) )
07:48 nic So... I just need to keep an eye on whether a disproportionate number of hits are coming from Argentina
07:48 Coff joined #mojo
07:50 fhelmber_ joined #mojo
08:06 Coff joined #mojo
08:07 cosmincx joined #mojo
08:24 marcus sri: I'm thinking Mojo::UserAgent could do with a shortcut to post json bodies of some sort.
08:25 marcus not sure how the API should look tho
08:25 marcus $ua->post_json('foo.com/bar',{body=>rad}) ?
08:28 marcus seems like a lot of apis accept json bodies, anyways.
08:38 taryk joined #mojo
08:46 Foxcool joined #mojo
08:53 Htbaa joined #mojo
08:55 scott__ joined #mojo
08:59 memememomo joined #mojo
09:41 bc547 marcus: great idea... i would use it
10:00 pau4o joined #mojo
10:09 jontaylor joined #mojo
10:10 daxim joined #mojo
10:12 Coff joined #mojo
10:27 * nic would hit that
10:55 mst joined #mojo
10:56 mst (Mojolicious for Workgroups)++ # bahahahahahaha
10:56 mst that is all.
10:56 mst left #mojo
10:58 Coff joined #mojo
11:01 marcus sri: https://github.com/marcusramberg/st2-perltidy  I haz the position.
11:13 mire joined #mojo
11:17 plu \o/
11:38 andrefs joined #mojo
12:06 ryozi joined #mojo
12:15 jontaylor joined #mojo
12:32 tadamo joined #mojo
12:42 Coff joined #mojo
12:45 marty joined #mojo
12:59 niski joined #mojo
13:01 Htbaa joined #mojo
13:02 Htbaa shouldn't the text_field helper render the input tag with type='text'?
13:23 BinGOs joined #mojo
13:36 jnap joined #mojo
13:37 marty Htbaa:  the text_field helper can be used for various input types.  just supply the type when creating it.  i.e.…   %= text_field 'first_name', type => 'text'
13:39 Htbaa marty: I know, but I think input_tag fits that purpose better
13:54 Coff Dear lazyweb; most convenient perl-module to use for creating and sending emails with attachments?
13:54 Coff Anyone?
13:55 marty Htbaa:  I think you are correct.  I see no difference between the helpers in the source.
13:57 daxim Coff, Courriel and Email::Sender
13:57 daxim see also channel #email
13:59 taryk joined #mojo
14:03 inokenty joined #mojo
14:03 CromeDome joined #mojo
14:14 Leandr joined #mojo
14:25 andrefs joined #mojo
14:30 sri Htbaa: why would it have to default to type="text"?
14:31 mire joined #mojo
14:31 sri marty: i'm sorry, but your pull request is not complete
14:33 sri you have to explain why you want to make the change, and not break a lot of tests
14:36 sri sooo, what do we gain by specifying type="text"?
14:40 sri looking at the html5 spec, the default for no type attribute is text, so it doesn't appear to matter at all
14:40 sri http://www.w3.org/TR/2011/WD-html5-2011052​5/the-input-element.html#the-input-element
14:41 sri marty: i've closed your pull request for now, since we can just discuss it here :)
14:41 marty Ahhh ok.   I never thought about that.
14:42 marty Would that change have broken tests?
14:42 sri quite a few
14:42 sri we test the tag helper output byte for byte
14:42 marty I was not aware of that.
14:42 sri always run tests before sending the pull request ;)
14:43 marty Yes, I just ran it and guess what, bit time error. :)  sorry about that.  I'll make sure I run them first next time.
14:43 sri one of the reasons i now hate githubs fork and edit feature, it makes you not check tests
14:44 sri no worries
14:46 Coff daxim: thanks
14:47 mattastrophe joined #mojo
14:59 nic Moo v1.0!
15:02 Htbaa sri: I can understand leaving out the type="text" part is conform the HTML5 spec, but what good is text_field if input_tag does the same?
15:03 tempire marty++ for getting involved
15:21 Coff joined #mojo
15:26 sri Htbaa: still, what do we gain by changing it?
15:27 sri if you want one of the two removed that's a different discussion
15:29 Htbaa sri: No not saying one should be removed. But for example when styling inputs with css it's not uncommon to style type="text" fields, now you gotta specify it every time you use text_field.
15:29 Htbaa I just think it makes more sense that the text_field helper actually creates a input with type="text"
15:30 sri css styling is a gain
15:30 sri that's the argument you should have started with ;)
15:31 Htbaa :)
15:31 sri marty: looks like your patch will make it in after all :)
15:32 marty um, er…  huh?
15:33 * marty is reading above…    ok.    o/
15:35 tempire whoa
15:35 tempire CMD+p in macvim
15:36 tempire pretty standard, really.  just surprised by such an excellent default.
15:57 Coff_ joined #mojo
15:59 GitHub191 joined #mojo
15:59 GitHub191 [mojo] kraih pushed 1 new commit to master: http://git.io/44Vijw
15:59 GitHub191 [mojo/master] improved text_field helper to always set the type attribute - Sebastian Riedel
15:59 GitHub191 left #mojo
16:01 GabrielVieira joined #mojo
16:01 sri now that it's done i'm a little scared
16:01 sri with our luck this wil break apps because someone depends on text_field behaving just like input_tag
16:04 sri marcus: it works?! :O
16:04 marcus sri: yeah, it centers on the line you were on before.
16:04 marcus sri: you can also just tidy a function by selecting it.
16:04 sri marcus++
16:07 sri marcus: don't JSON apis usually use multiple methods?
16:07 marcus sri: what do you mean?
16:08 sri post_json seems rather limited
16:08 marcus some of them do, but most of them only send data with post.
16:08 sri what about put_json, patch_json?
16:08 marcus sri: I guess those exist, but much more rare.
16:08 * sri shrugs
16:08 sri do you have some good examples?
16:09 marcus https://mandrillapp.com/api/docs/ Mandrill is the latest api I'm implementing.
16:09 marcus it just specifies 'All API calls should be made with HTTP POST.' :)
16:10 marcus jht's cloudinary api also just uses post - https://metacpan.org/source/JHTHORSEN​/Cloudinary-0.1102/lib/Cloudinary.pm
16:11 marcus seems cloudinary doesn't actually use json bodies at all tho :_
16:14 sri tempire, crab: Mojo::UserAgent->post_json() yay or nay?
16:15 sri semantics would be something like my $tx = $ua->post_json('mojolicio.us/foo', {some => 'data'}, {DNT => 1});
16:15 GabrielVieira Hey, could anyone help me with Mojo::IOLoop for doing async tasks? (Examples without the UserAgent would be fine) :)
16:15 tempire I like it
16:16 tempire saves explicit typing of Mojo::JSON
16:16 sri it's like 10 lines of new code :,(
16:16 Coff joined #mojo
16:16 * sri was aiming for less than 9000 lines
16:17 sri also, what would be the ojo function name? s()?
16:23 nic Can ojo have two-char functions?  Just thinking pj()
16:26 tempire hmm
16:26 tempire this poses a problem
16:27 tempire either s or n
16:28 tempire today is thursday
16:28 tempire time to release a new website and a blog entry!
16:36 diegok post_json++ :)
16:37 sri nic: nope
16:37 sri every byte counts for oneliners ;p
16:46 pau4o left #mojo
17:01 daniel_ joined #mojo
17:04 sri hmmmm
17:04 sri it's more like 20 lines of code in the end
17:05 sri but it seems like a popular feature :/
17:05 sri ok, one more "post_json++" and i'll implement it ;p
17:05 not-tempire post_json++
17:06 sri -.-
17:06 inokenty post_json++ =)
17:10 marcus sri: I'm sure you'll be able to golf it down, eventually ;-)
17:11 sri marcus: lots of boilerplate, rather unlikely :S
17:13 GabrielVieira Does anyone have EV installed on Mac OSX?
17:13 marcus yes
17:14 sri yes
17:19 jwang joined #mojo
17:24 tempire me three
17:27 GabrielVieira ok
17:27 GabrielVieira I'm gettig make error
17:28 sri whatever you do... don't contact the author ;p
17:28 GabrielVieira hahaha
17:29 diegok GabrielVieira: four
17:29 GabrielVieira http://pastebin.com/BzJhMHpQ here is the error
17:32 sri oh, s() is of course a bad idea -.-
17:32 sri n() it is then
17:33 GabrielVieira sri: I'm checking your sleep 5 example with dbix::custom (https://github.com/kraih/mo​jo/wiki/Non-blocking-mysql), but what I'm trying to is multiple DB requests ... so.. should I do a $self->render_later, do the async requests and then $self->render until ( $self->stash('all_db_requests_done') (or something like that) ?
17:34 sri GabrielVieira: i'm busy
17:36 GabrielVieira sorry
17:39 diegok GabrielVieira: you can use http://search.cpan.org/~tempire/Mojol​icious-3.11/lib/Mojo/IOLoop/Delay.pm
17:39 GabrielVieira I tried, but no success :T
17:39 diegok :(
17:40 diegok GabrielVieira: what happened?
17:40 GabrielVieira And I saw this post from sri that says that mysql stays blocked
17:40 GabrielVieira it executed 1 query after other
17:41 diegok GabrielVieira: oh, sure, I think you need to fork to do async mysql :-/
17:45 diegok I've never used DBix::Custom
17:47 GitHub168 joined #mojo
17:47 GitHub168 [mojo] kraih pushed 1 new commit to master: http://git.io/2VT-Kw
17:47 GitHub168 [mojo/master] added JSON POST support - Sebastian Riedel
17:47 GitHub168 left #mojo
17:47 sri please review
17:48 * sri pokes marcus, tempire, diegok and inokenty
17:50 diegok GabrielVieira: it looks you need the delay multi-guard, then you call all the async DBIx::Custom queries plus begin on the guard and call $guard->end at the end of your dbi-async cb.
17:50 GabrielVieira humm
17:50 sri GabrielVieira: i have nothing to do with that example and never used any of the modules
17:51 GabrielVieira didnt know that
17:51 GabrielVieira sri: ok
17:52 GabrielVieira diegok: checking this multi-guard
17:53 GabrielVieira diegok: where can I found more about that?
17:53 tempire um
17:53 tempire perl -Mojo -e 'n("tempi.re" => {YUNO => "JSON"})'
17:53 tempire that should work, right?
17:53 diegok GabrielVieira: hm... letme paste some example...
17:54 GabrielVieira thanks
17:54 tempire oh derp.
17:54 sri tempire: works for me
17:55 tempire yeah, works.  I git pulled but didn't -Ilib
17:55 sri herp derp
17:55 tempire dernit
17:55 tempire how long does this ironman feed take to recognize and post something.
17:56 sri i think humans check new feeds first
17:56 tempire Y U NO POST MY BLOG
17:56 diegok GabrielVieira: https://gist.github.com/3145656 (I think I've got that from a wiki or doc example but not sure)
17:56 GabrielVieira opening
17:59 sri marcus: know a public api i could use as an example for post_json?
17:59 sri something generic, like the twitter search api would be nice
18:01 tempire sri: gist
18:01 tempire http://developer.github.com/v3/gists/
18:01 andrefs joined #mojo
18:01 tempire oh, maybe you need an account for that
18:02 sri yea, too complex
18:03 GabrielVieira diegok: I tried that.. but I think mysql blocks and executes one after other
18:04 sri i'll just use a made up example
18:07 diegok GabrielVieira: never did that, you can probably give a try to http://search.cpan.org/~mleh​mann/AnyEvent-DBI-2.2/DBI.pm
18:07 diegok what I've never did neither :-/
18:07 GitHub161 joined #mojo
18:07 GitHub161 [mojo] kraih pushed 1 new commit to master: http://git.io/M0fPYw
18:07 GitHub161 [mojo/master] better JSON POST examples - Sebastian Riedel
18:07 GitHub161 left #mojo
18:08 rem_lex joined #mojo
18:11 GabrielVieira checking :)
18:11 GabrielVieira thanks
18:12 diegok GabrielVieira: does it works?, nice to know!
18:12 GabrielVieira didnt test yet
18:12 GabrielVieira i`m checking the page :D
18:12 GabrielVieira hehe
18:12 diegok GabrielVieira: ok, keep me posted please ;)
18:12 GabrielVieira ok :)
18:16 diegok sri: looks fine to me. I can't come with an api that doesn't require user for this example :-/
18:22 sri tempire: nice blog post
18:22 tempire :)
18:22 sri http://tempi.re/deploy-a-web-app-in-one-step
18:24 tempire so the blog uses github issues as a backend
18:24 tempire it works quite well
18:25 marty_ joined #mojo
18:29 sri tempire: now i don't want to wait a week with 3.12 :O
18:29 tempire I knew that was coming
18:29 tempire but 3.11!!
18:30 tempire oh, I have an idea that might make you want to wait
18:30 tempire create a parody graphic for mojolicious that resembles the windows for workgroups 3.11 logo
18:30 tempire that would be so awesome
18:31 Foxcool joined #mojo
18:31 tempire whoa - the codename for wow 3.11 was snowball
18:31 tempire it's fate, I tell you
18:31 sri :o
18:32 tempire that parody image would be worth a blog entry just by itself
18:39 mire joined #mojo
18:41 GabrielVieira joined #mojo
18:42 tempire http://www.guidebookgaller​y.org/screenshots/win311fw
19:04 andrefs joined #mojo
19:07 andrefs joined #mojo
19:10 d4rkie joined #mojo
19:17 lammel2 joined #mojo
19:19 asarch joined #mojo
19:23 d4rkie joined #mojo
19:42 jontaylor joined #mojo
19:51 GitHub81 joined #mojo
19:51 GitHub81 [mojo] kraih pushed 1 new commit to master: http://git.io/u6c_UQ
19:51 GitHub81 [mojo/master] better header tests - Sebastian Riedel
19:51 GitHub81 left #mojo
20:05 Coff Feel like someone is hitting me with the stupid-stick today..
20:06 Coff Isn't file uploads supposed to be accessible with $self->param('myfile') in a lite-app?
20:06 Coff All the other params are there, just not my file-upload.
20:10 Coff ok. putting down the laptop for today.. also, need to write $self->req->upload('foo') somewhere :p
20:23 jontaylor joined #mojo
20:23 GabrielVieira diegok: I got it working with DBIx::Custom and AnyEvent \o/
20:24 GabrielVieira Just using DBIx::Custom examples
20:40 andrefs joined #mojo
20:40 marty not sure if this is important/relevant or not.  Mojolicous 3.12
20:40 marty After the last upgrade I get an error if a route endpoint matches a directory in public.
20:40 marty Example.  $r->route('/admin')->to('admin#dashboard');
20:40 marty that route failes if a have a directory in public named 'admin'
20:41 marty error is..  Use of uninitialized value $ext in hash element at /Users/../Types.pm line 54.
20:42 sri try making a minimal test case
20:42 sri i rewrote Mojolicious::Static, so there are prolly a few new bugs
20:43 marty ok
20:45 tomi-ru joined #mojo
20:47 sri ooh, but i think i know the bug
20:48 marty You're too fast.  :)
20:49 sri i forgot to readd a file check
20:49 sri do you have a test case yet?
20:51 marty Not yet.  I was trying to reproduce it with a  lite app, but no luck yet
20:51 marty I'll keep working on it
20:55 marty got it.    https://gist.github.com/3146752
20:55 sri marty: i think we have two bugs
20:56 marty This is my lucky day!  I got a commit accepted (kinda) and found a bug.  wooo hoooo
20:58 sri and made a test
20:58 sri you did find two bugs btw
20:58 marty I win.  :)
20:59 marty glad I could help.
20:59 sri hmm, this is a pretty bad bug, not sure 3.12 can wait very long now :o
21:01 vervain joined #mojo
21:05 GitHub74 joined #mojo
21:05 GitHub74 [mojo] kraih pushed 1 new commit to master: http://git.io/RTpiUA
21:05 GitHub74 [mojo/master] fixed file and content type detection bugs in Mojolicious::Static - Sebastian Riedel
21:05 GitHub74 left #mojo
21:05 sri marty: that should fix it
21:06 marty \o/
21:06 marty sri++
21:07 sri marty++
21:07 sri ops, i accidentally a test
21:08 marty I tested here.  works
21:08 GitHub10 joined #mojo
21:08 GitHub10 [mojo] kraih pushed 1 new commit to master: http://git.io/-v_BFQ
21:08 GitHub10 [mojo/master] fixed directory test - Sebastian Riedel
21:08 GitHub10 left #mojo
21:11 baton8 joined #mojo
21:23 perlite_ joined #mojo
21:38 marcus sri: agree, I think this bug fix warrants not waiting a week.
21:39 marcus sri++ # post_json looks good btw :)
21:46 lukep joined #mojo
21:57 andrefs joined #mojo
22:06 mattastrophe joined #mojo
22:50 athenot joined #mojo
23:32 sri \o/
23:43 GitHub59 joined #mojo
23:43 GitHub59 [mojo] kraih pushed 1 new commit to master: http://git.io/6o11jQ
23:43 GitHub59 [mojo/master] better JSON POST examples - Sebastian Riedel
23:43 GitHub59 left #mojo
23:43 sri down to 18 lines
23:44 sri think that's the limit
23:44 sri guess post_json is worth 18 lines

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