Camelia, the Perl 6 bug

IRC log for #mojo, 2013-02-21

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

All times shown according to UTC.

Time Nick Message
00:07 gryphon joined #mojo
00:16 bpmedley moltar: Is there an e.g. of that type of setup online?
00:17 moltar bpmedley: not sure what u mean
00:17 moltar like a code example?
00:17 moltar or a product example?
00:17 bpmedley moltar: Yes, in the docs.
00:17 moltar np
00:17 moltar no *
00:17 moltar i invented it
00:17 moltar :))
00:17 moltar at least i didnt find anything
00:17 moltar i am just trying to make RESTful routes
00:18 moltar .. /object -> POST/GET & /object/:id -> POST/GET
00:18 Molaf__ joined #mojo
00:24 bpmedley moltar: Try: $r->$method('/:id')->to(controller => action => "single_$method"); instead of $job->$method
00:24 moltar but it wont chain to the /job then?
00:25 bpmedley Just a sec.
00:25 Averna joined #mojo
00:27 Adura joined #mojo
00:29 shmuel joined #mojo
00:32 moltar dammit, it's validation::class class somehow messing things up!
00:32 moltar if i comment it out, everything works fine
00:36 moltar left #mojo
00:37 moltar joined #mojo
01:12 phillipadsmith silly question: how do I call render_exception in a lite app outside of a route (possible?)
01:13 phillipadsmith nevermind… logic problem!
01:20 hlin joined #mojo
01:25 alnewkirk moltar: paste, maybe I can help
01:42 bpmedley moltar: Where do you have validation::class?
02:00 d4rkie joined #mojo
02:04 alnewkirk fyi, here's an example of how I often use Validation::Class with Mojolicious -- https://github.com/anaio/LayerCake
02:04 alnewkirk chances are, you're using directly in some namespace where it's exporting keywords that clash with keywords Mojolicious exports
02:12 asarch joined #mojo
02:32 egopro joined #mojo
02:34 komodo joined #mojo
03:15 zivester joined #mojo
03:36 zivester joined #mojo
03:43 mattastrophe joined #mojo
03:49 hesco Only a few hours new still to mojo, and I now have a script using Mojolicious::Lite and HTML::FormHandler plus a test script to exercise it.  My first question is why running my test script would print out the mojo help message before it starts producing TAP.  And my second question will await a forthcoming paste to provide some context.
03:55 hesco https://gist.github.com/hesco/5001900
03:56 hesco So why is this thing giving me 500 rather than 200 response codes?
04:25 jberger hesco, what does it do when you just run the app rather than run the test?
04:25 jberger also you have a stray =pod line
04:32 komodo1 joined #mojo
04:35 hesco sorry, distracted by a support call for a moment
04:36 hesco perl scripts/www/admin/password_reset returns the help message to me.
04:38 jberger and when you run it with daemon on the end?
04:38 hesco Can't create listen socket: Address already in use at
04:39 jberger are you running some other app somewhere?
04:40 hesco ps aux shows me this:  perl /usr/local/bin/morbo scripts/www/admin/password_reset
04:40 hesco started that two night ago I think.
04:42 jberger ok, thats possibly going to be problematic
04:43 jberger at least when running the daemon
04:43 jberger the tests should work
04:43 hesco when I kill that process and run the deamon command again, it restarts the server at port 3000
04:44 preflex_ joined #mojo
04:44 jberger and it works fine?
04:45 jberger how about the tests?
04:45 hesco killing the server at port 3000 and rerunning the test provides same results as before
04:46 jberger but running, the appp works fine?
04:46 jberger you can visit the page and server gives a response?
04:46 hesco it compiles and answers with a 500 response, so yes, it works, I guess
04:47 jberger no, a 500 response is a server error
04:48 hesco right, but its working enough to give me the error response, which I would think is different than not working at all.
04:49 jberger ok, so we have a different idea of working
04:49 hesco looking at this in a browser I see:  Could not load field class 'submit' for field 'get_pw_reset_hash' at
04:49 hesco that looks like a real clue
04:50 zivester joined #mojo
04:51 jberger in the future, server error 500 means you have a problem on the server side (ie your perl code)
04:51 zivester joined #mojo
04:51 jberger when you run your app in development mode, for example under morbo, you should get a pretty message with extra debug info
04:51 hesco right, got that.
04:52 hesco you mean in the browser?
04:52 jberger yeah
04:52 jberger or else in the log output in your console if there error is such that the app cannot run at all
04:54 hesco trying to sort out why its failing at line 214 of HTML/FormHandler/BuildFields.pm
04:58 zivester joined #mojo
04:59 hesco My issue is certainly with HTML::FormHandler, I suppose, not with Mojolicious
05:00 hesco so is there some more appropriate channel to take an HTML::FormHandler question?
05:04 jberger sorry, no idea
05:04 zivester joined #mojo
05:05 zivester joined #mojo
05:06 hesco oh well.  Have to be back at office too soon.  Guess its bedtime then.  Will try again tomorrow.  Thanks.
05:06 hesco have a good evening.
05:06 jberger you too
05:24 hesco Apparently the type wanted to be uc(S)ubmit, rather than lc(submit)
05:25 mattastrophe joined #mojo
05:25 jberger glad you found it
05:35 egopro joined #mojo
05:37 mattastrophe joined #mojo
05:47 Revlin joined #mojo
05:55 hlin joined #mojo
06:40 yakudza joined #mojo
06:42 spleenjack joined #mojo
06:56 Vandal joined #mojo
07:07 Mike-PerlRecruiter_ joined #mojo
07:09 jzawodn joined #mojo
07:22 dpetrov_ joined #mojo
07:35 hlin joined #mojo
07:47 mattastrophe joined #mojo
08:03 mattastrophe joined #mojo
08:04 suy joined #mojo
08:11 cosimo joined #mojo
08:14 dod joined #mojo
08:25 rihegher joined #mojo
08:26 Vandal joined #mojo
08:38 dod joined #mojo
08:40 shmuel_ joined #mojo
08:47 fhelmber_ joined #mojo
08:53 maxhq joined #mojo
08:57 dhg joined #mojo
09:09 egopro joined #mojo
09:20 rhaen joined #mojo
09:26 shmuel joined #mojo
09:40 ObseLeTe joined #mojo
09:50 alexko joined #mojo
10:03 dhg joined #mojo
10:05 daxim joined #mojo
10:15 jpn joined #mojo
10:16 Adura joined #mojo
10:31 mike_ joined #mojo
10:54 mugenken joined #mojo
11:55 ver joined #mojo
12:00 SmokeMachine joined #mojo
12:08 moltar joined #mojo
12:44 rihegher left #mojo
13:01 dhg joined #mojo
13:08 moltar joined #mojo
13:09 dod joined #mojo
13:11 ObseLeTe joined #mojo
13:16 hrupp_ joined #mojo
13:18 d4rkie joined #mojo
13:18 dabudabu joined #mojo
13:27 ObseLeTe joined #mojo
13:34 rem_lex joined #mojo
13:40 asarch joined #mojo
13:42 dod joined #mojo
13:45 rem_lex joined #mojo
13:46 toebu joined #mojo
13:48 toebu_ joined #mojo
13:50 Britzel joined #mojo
13:55 egopro joined #mojo
13:55 asarch Where can I learn more about the Embedded Perl format?
14:00 gryphon joined #mojo
14:01 HtbaaPi with url_for, is it possible to get full url's?
14:03 HtbaaPi should be possible with to_abs right? But for some reason I'm not getting that part included
14:03 HtbaaPi ugh, my bad
14:03 HtbaaPi I used $self->app->url_for in my controller, should've been $self->url_for :)
14:04 jberger asarch, http://mojolicio.us/perldoc/​Mojolicious/Guides/Rendering
14:04 asarch Thank you jberger
14:04 asarch Thank you very much :-)
14:05 jberger np
14:05 jberger when in doubt start here: http://mojolicio.us/perldoc
14:05 jberger read ::Lite and the guides in that order
14:06 jberger I'm not just saying it, I do it often
14:21 inokenty joined #mojo
14:30 moltar Hi! Where do placeholder values go? I thought it was merged with param(), but doesn't seem so....
14:31 moltar I see it is in stash
14:42 dod joined #mojo
14:52 rihegher joined #mojo
15:07 vervain \q
15:13 Molaf_ joined #mojo
15:36 HtbaaPi I'm running into a little problem with hypnotoad and a request that takes up about a minute
15:36 HtbaaPi with Morbo I can do this: Mojo::IOLoop->stream($self->t​x->connection)->timeout(300);
15:36 HtbaaPi but Hypnotoad says: Worker 8685 has no heartbeat, restarting.
15:36 HtbaaPi ah never mind, heartbeat_timeout :-)
15:46 alexko joined #mojo
15:50 HtbaaPi In my config I have an entry for hypnotoad with proxy => 1
15:51 HtbaaPi but when using url_for->to_abs it uses localhost and not the actual domain
16:02 HtbaaPi ah I think that has to do with Apache not forwarding the right headers
16:05 HtbaaPi yup, my bad. Again :)
16:06 bluescreen joined #mojo
16:33 Pizentios left #mojo
16:36 Pizentios joined #mojo
17:00 mattastrophe joined #mojo
17:08 xaka joined #mojo
17:11 marty Shazbot
17:31 alester joined #mojo
17:31 ObseLeTe joined #mojo
17:36 maxhq1 joined #mojo
17:57 maxhq joined #mojo
17:58 good_news_everyone joined #mojo
17:58 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/jnrmGg
17:58 good_news_everyone mojo/master e4874cb Sebastian Riedel: test Mojo::JSON decoding with duplicate keys
17:58 good_news_everyone left #mojo
17:58 sri TIL that's valid JSON
18:14 sri hahahahaha... "If you receive a bribe, include it in your income." http://www.irs.gov/publicat​ions/p17/ch12.html#d0e44782
18:14 maxhq joined #mojo
18:15 jberger thats essentially how they got capone
18:15 jberger income is still taxable even if it's gained illegally
18:16 sri "You can treat your child as meeting the residency test even if the child has been kidnapped..." http://www.irs.gov/publications/p501/a​r02.html#en_US_2012_publink1000220903
18:16 sri they are really thorough
18:16 rihegher joined #mojo
18:17 jberger hahahhahah
18:21 yakudza joined #mojo
18:24 jberger sri: that json, when evaled (parsed) into javascript, does it collapse the same way that Perl hashes do?
18:24 jberger (I guess I could check and see)
18:24 sri undefined
18:24 jberger oh good
18:25 sri odds are it will though
18:25 jberger undefined behavior is a great thing to have in a popular format
18:25 jberger I would think so too
18:25 sri or throw an exception
18:25 jberger so why is it valid json?
18:26 jberger maybe so you can build it as a string?
18:26 jberger without ever reading backwards
18:26 sri https://www.tbray.org/ongoing/W​hen/201x/2013/02/21/JSON-Lesson
18:26 * jberger looks
18:26 sri just spec editors being sloppy i suppose
18:27 sri utf-16 and utf-32 are also valid encodings for JSON
18:27 sri the specs contain a few of those quirks
18:28 jberger I like this quote:
18:28 jberger > Anyhow, I think most reasonable people will agree: Encountering duplicate keys in incoming JSON is evidence of insanity on the other end of the line
18:29 dotan joined #mojo
18:29 jberger sri: quick question
18:30 jberger when I do `url_for '/', format => 'html'` I get /.html
18:30 labrown joined #mojo
18:31 jberger but I have `get '/:name' => { name => 'name' } => ...`
18:31 jberger is there some way to get it to give me name.html?
18:31 sri pretty sure you're misunderstanding something
18:32 ObseLeTe joined #mojo
18:32 jberger the reason is for making a static render via wallflower
18:33 jberger for a normal running app all is good
18:33 sri i don't get how url_for '/', format => 'html' can result in /.html
18:33 sri it makes no sense
18:41 jberger http://pastie.org/6309002
18:41 jberger perhaps I wasn't tremendously clear before
18:41 jberger but there is the example
18:42 vervain joined #mojo
18:43 alexko joined #mojo
18:43 jberger sri: is there some way to get /index.html out of the second case
18:45 * sri still doesn't get it
18:45 jberger the first case prints /joe.html
18:45 jberger the second prints /.html
18:46 sri ah, because it's optional
18:46 jberger right
18:46 sri dunno
18:46 maxhq1 joined #mojo
18:46 jberger I can special case it in my code, but I was wondering if there was something more cute?
18:47 * jberger looks at how the optional key is removed
18:57 dhg joined #mojo
19:01 dod joined #mojo
19:02 jberger I guessing the "bug" (if indeed it is one) is in here: https://github.com/kraih/mojo/blob/maste​r/lib/Mojolicious/Routes/Pattern.pm#L32
19:02 jberger but for now I'm ok special-casing on this end
19:03 sri hack it and see if changing breaks tests
19:04 sri i think it's a feature
19:08 sri not like /.html is invalid
19:08 Mike-PerlRecruiter_ joined #mojo
19:09 jberger I think it probably is a feature too
19:11 jberger where an optional value is needed it seems to get it right
19:11 jberger '/:name/path' will give '/index/path'
19:12 jberger because '//path' would be incorrect
19:12 jberger it seems like when appending a format string the same should be true
19:12 jberger (yes, I'm going back and forth on this)
19:20 mire joined #mojo
19:24 jberger I think it is a bug
19:24 jberger perl -Mojo -E 'a("/test/:name" => { name => "index" } => sub{ my $c = shift; $c->render( text => $c->url_for("testname", { format => "html" } ) ) } )->start' get /test
19:24 jberger give /test.html
19:24 jberger which is wrong
19:24 jberger but I think I have a fix
19:26 maxhq joined #mojo
19:26 jberger sri: where would tests for this go?
19:26 sri routes.t pattern.t
19:28 rhaen hej. evening
19:28 sri o/
19:29 xaka joined #mojo
19:29 rhaen sometimes I don't like all that devops stuff
19:30 rhaen especially when it's not working as expected.
19:30 rhaen or builder of tools declare "it's out of scope"...
19:30 rhaen grr.
19:38 sri jberger: yes, that looks like a bug
19:38 jberger its a one line of code fix, I'm just trying to grok the test suite
19:39 jberger if I submit the patch without a test (while I work on it) can you take a peek?
19:39 sri sure
19:42 jberger https://github.com/kraih/mojo/pull/456
19:46 sri jberger++ # makes sense and doesn't break tests
19:46 sri +1 from me
19:46 frazer joined #mojo
19:48 sri jberger: unless you have something already i can write a test too
19:48 jberger I'm getting close to one, but please do
19:53 jberger blast, I can't make it work
19:54 jberger the test I mean
19:54 jberger my one-liners make sense
19:54 sri you'll laugh when you see mine :)
19:55 jberger oh I got it
19:55 * marcus just looked at the mojo commit counts.
19:56 jberger I needed the $render flag
19:56 marcus spoiler alert: sri is in the lead.
19:56 marcus :D
19:56 * jberger is shocked
19:56 good_news_everyone joined #mojo
19:56 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/2d7MyQ
19:56 good_news_everyone mojo/master 1d4a435 Sebastian Riedel: fixed path generation bug in Mojolicious::Routes::Pattern (closes #456)
19:56 good_news_everyone left #mojo
19:56 marcus by abount 6000 commits
19:56 marcus about
19:56 jberger ok I have pushed my test
19:57 jberger oh you already committed it
19:57 jberger I'll link to mine then and you can see
19:58 jberger https://github.com/jberger/mojo/commit/c​3a5e375d1ae8e3fa017bb996d1ff13c5b494ec2
19:59 sri yea, i just reused an existing test :)
19:59 jberger cheater
19:59 sri at the pattern layer it's not so nice to test
19:59 * sri started there too ;p
20:00 jberger it was the one I grokked first
20:00 jberger closer to the problem
20:02 ObseLeTe joined #mojo
20:03 rhaen joined #mojo
20:07 jberger sri: any idea when you will release 3.86?
20:08 sri hehehe
20:08 jberger I know your head is in mango?
20:08 marcus mangohead
20:08 sri you'd prefer a quick release i suppose?
20:09 * jberger has kinda been waiting for the ::Asset stuff too, but was being polite
20:09 jberger this recent patch helps my intro talk for chicago.pm
20:09 sri guess it can be released later
20:10 jberger I want to make a static version that I can host on github pages
20:10 sri (today)
20:10 jberger thanks
20:10 jberger :D
20:10 * sri wonders where tempire is hiding
20:11 jberger found tempire, he was behind the middle one! http://www.youtube.com/watch?v=ltmMJntSfQI
20:12 marcus tempire is hiding in his mustache.
20:12 jberger marcus, that could also be a monty python sketch
20:12 jberger though probably an animation
20:13 marcus <3 Flying Circus
20:14 * jberger loves the giggling near the end
20:18 connor_goodwolf joined #mojo
20:20 connor_goodwolf left #mojo
20:21 heytrav joined #mojo
20:27 dpetrov_ joined #mojo
20:31 sri how odd, the new chromebook pixel is actually pretty sleek http://www.google.com/intl/en/c​hrome/devices/chromebook-pixel/
20:39 Mad_Dud joined #mojo
20:40 augensalat joined #mojo
20:46 Gedge_ joined #mojo
20:49 lukep joined #mojo
20:54 rem_lex|pivo joined #mojo
21:09 Gedge joined #mojo
21:19 BeDa joined #mojo
21:20 xaka joined #mojo
21:30 marcus it'll be interesting to see how it goes when google starts retail stores.
21:31 sri there is just no way it could be a success :)
21:33 sri just look at the chromebook, it seems well designed, great display, good cpu and memory, but then they put a 32gb ssd into it and sell it for $1299
21:34 marcus if I could run android on it, it might be more interesting
21:34 marcus not sure what I could do with a chromebook
21:34 jberger marcus, thats my concern too
21:34 marcus but the hardware does look great.
21:34 jberger though I would put some real linux on it
21:35 marcus jberger: chromeos is just linux with a browser tho?
21:35 sri yea, 32gb and chrome os are a total waste for otherwise pretty nice hardware
21:35 Pizentios jberger: why not get a ubuntu tablet then?
21:35 marcus pizentios: It's a bit early days for ubuntu touch yet.
21:35 jberger 1) keyboard 2) are there any real ones yet? or still all hacks
21:35 Pizentios marcus: true
21:35 jberger otherwise, I'm totally in for one
21:36 jberger (ubuntu tablet)
21:36 marcus jberger: you can take a nexus 7/10 and run ubuntu touch on it. But it's a developer preview, and a lot of it doesn't work yet.
21:36 Pizentios yeah i will likely look at one when they become real
21:36 jberger I thought that was the whole reason for unity
21:36 Pizentios i will likely load the ubuntu phone stuff onto my phone at some point as well
21:36 jberger that and the 'indicators' war
21:36 marcus hmm
21:37 marcus the chromebook actually looks damn nice.
21:37 marcus and built in lte as well. Wonder if that'd work over here.
21:37 sri yea, with a 128gb+ ssd it would be a damn fine linux box
21:38 marcus Sorry! Devices on Google Play is not available in your country yet.
21:39 marcus I guess https://twitter.com/tapbot_pa​ul/status/304701519817748480 sums it up pretty well.
21:41 sri haha
21:41 ObseLeTe joined #mojo
21:41 marcus sri: the lte version comes with a 64GB ssd :)
21:42 marcus Guess we won't see this thing outside the us for years anyways.
21:42 sri how they are selling google glass is also hilarious
21:42 marcus Google is soo frickin' us-centric.
21:42 Pizentios are they not a us company?>
21:43 marcus Pizentios: So's Apple, what is your point?
21:43 Pizentios heh
21:43 sri http://www.google.com/glass/start/how-to-get-one/ # apply and we may let you buy one for $1500! :D
21:45 marcus \o/
21:46 marcus I liked this application - https://twitter.com/britt/​status/304696779931271168
21:46 sri oh and you also need to pick it up in person... in san francisco! \o/
21:46 sri haha
21:48 sri the ultimate goal is obviously a brain implant with google adsense
21:49 marcus sri: does it come with a complementary parachute jump?
21:49 sri for that price i'd hope so!
21:53 ObseLeTe joined #mojo
21:58 bluescreen joined #mojo
22:00 Caelum sinatra is pretty nifty
22:00 Caelum reminds me of mojolicious :D
22:22 mattastrophe joined #mojo
22:27 marcus how suprising
22:56 good_news_everyone joined #mojo
22:56 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/CMwOJw
22:56 good_news_everyone mojo/master df80703 Sebastian Riedel: more path generation tests
22:56 good_news_everyone left #mojo
22:56 jberger anyone want a quick preview?
22:56 jberger http://joel.phy.uic.edu:3000
22:57 sri oh, we've reached 10000 unit tests \o/
22:57 jberger score! I'll take a little credit for that
22:57 jberger sri: o/
22:59 jberger (I think I have about 3) :-)
23:00 sri jberger: looks good, i would have expected a websocket example from you though ;)
23:00 jberger its not done yet
23:00 jberger thats the last one
23:00 jberger going to be plotting a live datastream
23:00 jberger using some js library
23:00 sri neat
23:01 jberger all those code samples are server-side highlighted from real files
23:01 jberger so I can run them in my terminal for them
23:01 jberger and the slides are all written in ep
23:02 jberger https://github.com/jberger/WCpm-Mojoli​cious/blob/master/presentation.pl#L79
23:03 sri jberger++
23:07 jberger the focus is on the "batteries included" features
23:07 jberger we recently had a talk on Dancer (by someone who was admittedly rather new to it)
23:07 jberger and it was almost completely about routing and templating
23:08 jberger important sure, but not very fun

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