Camelia, the Perl 6 bug

IRC log for #mojo, 2012-10-16

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

All times shown according to UTC.

Time Nick Message
00:01 VK joined #mojo
00:09 mandreacchio joined #mojo
01:11 laouji joined #mojo
01:19 d4rkie joined #mojo
01:28 omega joined #mojo
01:59 memowe_ joined #mojo
02:20 mandreacchio joined #mojo
02:37 mandreacchio_ joined #mojo
02:37 thaljef Ok, I think I've got an isolated test case here:  https://github.com/thaljef/Mojo-Bug-Demonstration
02:38 thaljef Setup instructions are in the README, and then details are spelled out in the application home page (will be at http://localhost:3000).
02:39 thaljef Can anyone else recreate the behavior I've described?
02:47 noganex joined #mojo
03:11 duncanthrax2 joined #mojo
03:15 thaljef joined #mojo
03:41 Foxcool joined #mojo
03:55 mandreacchio joined #mojo
03:56 mandreacchio joined #mojo
04:02 mandreacchio_ joined #mojo
04:04 mandreacchio_ joined #mojo
04:39 vishwanathms joined #mojo
04:40 vishwanathms_ joined #mojo
04:43 * tempire peepcodes
04:54 asarch joined #mojo
05:05 kevouze joined #mojo
05:08 mandreacchio joined #mojo
05:24 xaka joined #mojo
05:45 Foxcool joined #mojo
05:45 memowe joined #mojo
05:48 human39 joined #mojo
06:02 dpetrov_ joined #mojo
06:17 ovnimancer joined #mojo
06:25 marcus Moen
06:28 Vandal joined #mojo
06:37 kthakore marcus: hi
06:40 mandreacchio joined #mojo
06:41 ladnaV joined #mojo
06:43 thaljef joined #mojo
06:45 Vandal joined #mojo
06:46 spleenjack joined #mojo
07:04 human39 joined #mojo
07:10 ovnimancer joined #mojo
07:14 batman joined #mojo
07:20 Mike-PerlRecruiter_ joined #mojo
07:28 tempire HI MARCUS
07:28 tempire http://www.youtube.com/watch?v=7mZZd4gQrrg
07:31 yakudza joined #mojo
07:35 VK joined #mojo
07:45 pau4o joined #mojo
07:52 cosmincx joined #mojo
07:58 cosmincx joined #mojo
08:00 basic6 joined #mojo
08:06 spleenjack joined #mojo
08:09 fhelmber_ joined #mojo
08:11 ver joined #mojo
08:11 cosmincx joined #mojo
08:13 yakudza_ joined #mojo
08:13 arthas joined #mojo
08:45 memowe \o/
08:47 buu |
08:47 buu / \
08:47 buu =[
08:48 Vandal joined #mojo
08:54 memowe buu: <8__)---'
08:54 memowe Oh, wait.
08:54 memowe buu: <83_)---´
08:54 memowe No, wait.
08:55 memowe <:3_)---´
08:55 memowe yep
08:55 buu =O
08:57 Rhaen_ joined #mojo
08:58 Rhaen_ good morning, it's me again.
09:04 nic thaljef: I've just run your example and get the same results as you
09:22 memowe Good morning, Rhaen_!
09:33 vishwanathms joined #mojo
09:33 vishwanathms_ joined #mojo
09:44 Britzel_ joined #mojo
09:47 usong joined #mojo
10:02 daxim joined #mojo
10:29 abra joined #mojo
11:02 rem_lex| joined #mojo
11:31 ObseLeTe joined #mojo
11:54 ovnimancer joined #mojo
11:58 dvinciguerra joined #mojo
12:04 spleenjack1 joined #mojo
12:19 trone is it possibile define a route (in full Mojo) that point to static file? a sort of $r->get('/')->to('static_index.html');
12:19 trone ?
12:19 trone (the point is avoid controller if possibile)
12:23 crab ->to(cb => sub { shift->render_static(...) })
12:26 crab if you want, you can define a routing shortcut called ->to_static('filename') or something.
12:26 trone crab: oh, interesting. exactly what I was looking for... and more. :) thanks.
12:28 crab you're welcome.
12:41 sri hmmm
12:41 Rhaen_ mhmmm.
12:42 sri the whole prompt thing feels wrong somehow
12:45 sri am i the only one who hates terminal apps that prompt you for stuff?
12:49 * sri kind of wants to remove prompt again, and let cpanify be a minimal command example again
12:49 tadamo_ joined #mojo
12:50 sri tempire, crab: does the current implementation feel right to you?
12:51 sri (of both, prompt itself and the cpanify prompt)
12:52 sri oh, marcus was sneaking around here earlier too :o
13:04 sri https://github.com/kraih/mojo/i​ssues/394#issuecomment-9483752
13:04 sri asking the question in the issue too
13:06 vel joined #mojo
13:16 jnap joined #mojo
13:18 ZadYree Hello! I wonder if there is nice Mojolicious/PSGI blog manager/CMS out?
13:20 nic sri: imo having prompt makes the example even more useful :)
13:21 ObseLeTe joined #mojo
13:26 inokenty joined #mojo
13:28 Rhaen_ sri: I looked into the console stuff - this will certainly break the windows stuff if not implemented properly.
13:29 Rhaen_ sri: right now I am looking for a way to do it the right way...
13:29 Rhaen_ There is nothing such as Win32::Console or ANSI::Term which works in a consistent and independent way.
13:35 Rhaen_ ok,
13:35 Rhaen_ forget what I said.
13:35 purl Rhaen_, I didn't have anything matching what i said
13:35 Rhaen_ it works on #win32
13:47 Rhaen_ Ah, ok. ActiveState Perl 5.16 ships with Term::ReadKey
13:47 Rhaen_ Therefore the code is working. I'll check strawberry tonight.
13:48 Rhaen_ k, also installed on Strawberry by default
14:05 pau4o joined #mojo
14:06 bjoernfan Ok, I'm pretty happy with my mojolicious app, but my CSS:ing sucks. Are there any recommended CSS-generators or something to make my site pretty?
14:08 sri nic: but prompt only exists for that one example :)
14:09 sri none of my favorite terminal tools use prompts i believe
14:15 nic The motivation (helping keep passwords invisible without the user having to do anything extra) can be useful elsewhere
14:16 sri it doesn't hide the password currently
14:16 nic oh
14:16 nic BURN IT
14:16 sri we would need a new optional dependency on an xs module for that
14:16 nic oh bugger
14:17 nic We have a policy here to avoid xs where possible, so my evil plan fails again
14:17 sri which also feels weird... since it's about security... what do we do when it is not installed? show the password?
14:17 knshaum joined #mojo
14:18 sri or even die?
14:18 Adura Hash, encrypt?
14:18 nic Tell the user to type it in backwards
14:20 nic How about leave the distributed version as it was, but have a wiki page tell how to patch it if they want all the invisiblenessity
14:22 sri you mean as it was pre prompt?
14:23 sh4 joined #mojo
14:27 nyamned joined #mojo
14:33 nic sri: yeah.  Just my vote, obviously
14:33 sri i tend towards that solution too actually
14:33 sri while prompt is kinda neat, we just don't need it in core
14:34 nic It's not looking like it's worth the cost (in core)
14:34 sri marcus, tempire, crab: CAN HAZ OPINIONZ?
14:35 tadamo_ joined #mojo
14:36 nic sri: thanks for pushing me in the direction of redis a while back -- I'm having lots of fun with it
14:36 sri \o/
14:39 Rhaen_ nic: redis is awesome
14:56 d4rkie joined #mojo
15:04 memowe ZadYree: just simple file based solutions
15:17 good_news_everyone joined #mojo
15:17 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/UXXEwg
15:17 good_news_everyone [mojo/master] mention that all built-in commands are good examples - Sebastian Riedel
15:17 good_news_everyone left #mojo
15:27 labrown joined #mojo
15:28 andrefs joined #mojo
15:36 good_news_everyone joined #mojo
15:36 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/KK0faQ
15:36 good_news_everyone [mojo/master] removed prompt again - Sebastian Riedel
15:36 good_news_everyone left #mojo
15:40 sri wonder why we didn't flag all commands as examples before
15:43 sri oh, i guess because commands were still changing before 3.0
15:44 sri they only became "good" examples after the Mojo::Command -> Mojolicious::Command renaming
15:45 thaljef joined #mojo
15:46 pau4o left #mojo
15:50 xaka joined #mojo
15:57 alester joined #mojo
16:08 yakudza_ joined #mojo
16:11 jnap joined #mojo
16:39 VK joined #mojo
17:04 thaljef joined #mojo
17:07 ZadYree ok memowe. I nonetheless tried galileo, I guess I'll have to add some code
17:20 ObseLeTe joined #mojo
17:21 nyamned joined #mojo
17:21 ObseLeTe joined #mojo
17:23 sri tempire: weren't you interested in database internals recently? here's a neat little sqlite article http://coderweekly.com/articles/explori​ng-sqlites-virtual-database-engine.html
17:26 * sri didn't know sqlite used a register vm
18:05 tadamo_ joined #mojo
18:11 ZadYree I can't figure out why urls like /.foo are getting a timeout problem
18:15 ZadYree whatever are my other routes
18:28 ZadYree Are you all using specific 404 templates or are some people here using redirecting functions?
18:41 batman joined #mojo
18:44 dwierenga joined #mojo
19:08 nyamned joined #mojo
19:21 Mike-PerlRecruiter_ joined #mojo
19:26 tempire prompt is necessary for some commands.  Heroku deploy, for example, will only prompt for the information it needs.
19:27 sri you could have command line flags
19:27 tempire Which it has, but it's better to have a new user type one simple command, and have the command do the work.
19:27 tempire Since that's what computers are for, to make it easier.
19:28 Adura Computers are for math.
19:28 sri well, we have no use case for it in core
19:29 sri and to make it really useful you would need Term::ReadKey anyway
19:30 tempire Depends on what ::util is for.  To provide utils for core, or utils to make it easier to extend things.
19:30 sri utils for core
19:30 sri we have removed unused utils in the past
19:31 sri i actually don't even like the oneliner example i posted yesterday
19:34 * sri might actually hate prompts :o
19:35 sri imo command line flags and defaults = cpanm, prompts = CPAN.pm :)
19:35 * sri shakes fist
19:38 sri i can only think of very few cases where a prompt is necessary, and most are passwords
19:39 sri which gets *a lot* better with Term::ReadKey, but a new optional xs dependency for something we don't even use in core?
19:41 * sri pokes marcus and crab
19:49 bobkare joined #mojo
19:51 xaka what about pluginify of "cpanicy" part? in that case you could use any dependency without trashing the core
19:51 sri please elaborate
19:56 rhaen_fork joined #mojo
19:56 rhaen_fork Hej everyone.
19:56 rhaen_fork Now I am back on my Mac so I have a fork
19:57 rhaen_fork probably I should rename myself to rhaen_ithreads when I am on windows
19:57 tempire I'm not pushing for prompt in ::util
19:57 tempire but if it's there, I'll use it.
19:58 rhaen_fork ah, still the prompt discussion
19:58 rhaen_fork wasn't it removed?
19:58 sri well, prompt is gone from core for now
19:59 sri the discussion is now mostly about 3rd party users
20:00 sri but it seems like most participants are losing interest and it is almost finished
20:00 rhaen_fork hm, yep.
20:00 sri having all commands flagged as examples is a pretty good result of the discussion though
20:01 rhaen_fork So will there be something like a module as in heroku deploy?
20:17 xaka joined #mojo
20:25 thaljef joined #mojo
20:33 batman can i remove the content_length from a $ua->get() request?
20:33 batman i tried once(start => sub { ... } but it had no effect
20:34 lukep joined #mojo
20:59 ObseLeTe joined #mojo
21:07 degdeg joined #mojo
21:15 perlite joined #mojo
21:17 hesperaux joined #mojo
21:18 hesperaux Greetings
21:18 hesperaux when I use my($self) = shift(); what am I shifting?
21:19 Adura Some sort of basic Perl trick question...?
21:19 hesperaux It's definitely not a trick question
21:19 batman @_
21:19 Adura But, it is basic Perl?
21:20 hesperaux It is basic perl yes, if you like
21:20 hesperaux my question is really what are the contents of @_?
21:20 hesperaux why does it return a controller object?
21:20 Adura Check perlvar?
21:20 batman hesperaux: either @ARGV or @_ it depends
21:21 batman hesperaux: because it's the first argument passed to the method
21:21 hesperaux now we're getting somewhere
21:21 sri pretty sure the tutorial mentions that right at the start
21:21 hesperaux I must have missed that SRI
21:21 batman hesperaux: so $self->method(1, 2, 3) == Class::method($foo, 1, 2, 3);
21:21 batman where Class is some package name
21:22 sri it's not a basic perl question if i understand right
21:23 sri http://mojolicio.us/perldo​c/Mojolicious/Lite#Routes
21:23 hesperaux batman, and would $foo in that case be the object reference?
21:23 batman hesperaux: also my($self) = @_; is *almost* the same as my $self = shift;
21:23 batman hesperaux: yes
21:23 ObseLeTe joined #mojo
21:23 hesperaux sri, i've read that sentence, but to be honest it made almost no sense at all to me =/
21:24 hesperaux batman, does using my as a function imply an array syntax? is that what you're saying?
21:24 sri then i might have misunderstood and it is a basic perl question :(
21:24 Adura Also check perloop.
21:25 hesperaux Adura, I don't know what that is
21:25 Adura Did I get the term wrong?
21:25 hesperaux Probably not - I just don't know that much about Perl
21:25 Adura Guess I did...
21:25 Adura Oh, it's perlobj.
21:25 batman hesperaux: https://gist.github.com/3902145
21:26 hesperaux I've been using perl at work for a few months, but I use c-style syntax conventions in all my code and do not use objects for anything but database access (per request of the company). therefore, that's all I know
21:26 hesperaux I generally understand OOP because I've used Java quite a bit, and some PHP5
21:27 hesperaux I thought it would be nice to use a framework instead of exercising basic constructs of perl repeatedly in a mod_perl cgi
21:28 batman hesperaux: did you see that link?
21:28 hesperaux So i'm very new at this - sorry
21:28 hesperaux batman, yeah i'm looking at it now
21:28 batman hesperaux: so have you used sub routines (functions) in perl?
21:28 hesperaux yes
21:28 hesperaux that reminds me of another question i'll ask in a bit, too
21:28 batman hesperaux: so you're familiar with @_ ?
21:28 hesperaux definitely
21:29 Adura http://perldoc.perl.org/perlvar.html#@_ But, you do have to scroll up a bit.
21:29 batman ok. so shift inside a function works on @_
21:29 sri shouldn't the intermediate perl book be just what you need?
21:29 Adura http://perldoc.perl.org/perlobj.html
21:29 batman hesperaux: shift; == shift @_;
21:29 hesperaux yep, makes sense so far
21:30 batman so bless $foo, 'SomeClass'; $foo->function() == SomeClass::function($foo);
21:30 sri maybe also http://modernperlbooks.com/books/moder​n_perl/chapter_07.html#toc_T2JqZWN0cw
21:31 batman ...if you don't think about inheritance
21:31 hesperaux i'm not familiar with bless
21:32 sri guys... stop trying to explain perl oo ;p
21:32 Adura I linked thing...!
21:32 batman bless $foo, 'Class'; is the same as $foo = new Class; in java
21:32 hesperaux okay
21:33 Adura Perl5 oop is nice and barebones.
21:33 batman but no-one use bless anymore. most of us use something that again use bless. like Mojo::Base, Moo, Moose or some other library
21:34 batman i mostly use Mojo::Base these days...
21:34 sri batman: just let him read the linked books/articles
21:34 batman sri: yeah... need to get some sleep anyway, so....
21:35 hesperaux thanks batman
21:35 batman hesperaux: good luck. look at the links...
21:35 hesperaux I'll check em out
21:35 batman hesperaux: do you have the "perldoc" program installed?
21:35 Adura Use perldoc...!
21:35 purl perldoc comes with the perl distribution.  'perldoc <page>' is like 'man <page>' for perl manual pages. 'perldoc -tf <function>' will get a description of a perl function.
21:35 Adura Yes...
21:35 hesperaux yes i do
21:35 hesperaux perldoc doesn't come with perl on some distros, but i have it
21:36 * sri still recommends the free modern perl book http://www.onyxneon.com/bo​oks/modern_perl/index.html
21:36 Adura It's a nice book.
21:37 Adura http://www.wrox.com/WileyCDA/WroxTitle/B​eginning-Perl.productCd-1118013840.html Free chapters...! The first one tells you to use perldoc.
21:37 batman ok... perldoc -f shift; perldoc -f bless; perldoc perlboot
21:38 hesperaux before i read these, i have another simple question
21:39 Adura Oh-oh.
21:39 batman :D
21:39 hesperaux get '/:name' => sub {
21:39 hesperaux blah };
21:39 batman hesperaux: pasting is not something you should be doing on irc
21:39 hesperaux in this context, what does the => operator do?
21:39 Adura Same as ,
21:39 hesperaux batman, in my experience, pasting >3 lines is a problem
21:39 Adura Deliminates arguments.
21:40 hesperaux how does an arrow mean 'deliminate this'?
21:40 Adura Just does?
21:40 batman hesperaux: from my experience you might be very much disliked if you paste more than one line. keep it in mind.
21:40 hesperaux fair enough, batman
21:40 Britzel_ The arrow is jus tsyntactic sugar, you could also write ',' instead,
21:41 buu hesperaux: The point of the arrow is to suggest the two items in the list are paired together. Also might I suggest #perl on freenode for basic perl learning?
21:41 hesperaux so if i were to interpret this in java or C, it might resemble this: get('/:name', {block of code});
21:41 Adura get('/:name', sub { ... });
21:41 Adura You can even write it like that if you'd like.
21:41 hesperaux that just made so many things a lot easier to understand
21:42 hesperaux I do like to write it like that, but the rest of the perl world seems to despise that.
21:42 Adura sub calls can generally drop (), unless you confuse perl.
21:42 sri HASHROCKETS!
21:42 batman hesperaux: i tend to leave as much extra ({['"]}) out of my code as possible
21:42 hesperaux Adura, i've read that, but it tends to confuse me a lot more than perl lol
21:42 batman Adura: that is only true if the sub is declared before you start using it
21:42 Adura Heh...
21:43 hesperaux to me, having the extra ()'s make it readable
21:43 batman hesperaux: have you used map and grep?
21:43 hesperaux grep, yes; map, no
21:43 batman ok. do you write grep({ ... } @list); ?
21:44 Adura You confused them.
21:44 batman Adura: talking to me?
21:44 hesperaux i'm not sure
21:44 Adura batman means perl's grep function.
21:44 hesperaux i usually use a regex instead
21:44 hesperaux i've only used grep a few times, and i cannot remember currently what syntax I used
21:45 batman hesperaux: like grep( /abc/ @list); ?
21:45 sri batman: map/grep are not very good examples, they have special rules in the perl parser
21:45 batman sorry. missed out on ,
21:45 hesperaux sometimes i leave it in "guru syntax" if you will, simply because i'm not sure how to translate it back into something I understand
21:45 batman sri: they are _not_ special
21:45 sri batman: they are
21:45 Adura They seem pretty special.
21:45 batman i was trying to prove a point and free hesperaux's mind from () :)
21:45 hesperaux batman, regex such as if($thing =~ m/test$/gi) {do stuff; }
21:46 batman sri: please tell me how they are special...
21:46 Adura I've only needed to use +{} inside of map.
21:46 hesperaux "They seem pretty special" <--lol
21:46 batman they are not special. they are just like any other function. they just appear special
21:46 hesperaux I apologize if this is off-topic. I guess I could go to #perl@freenode, except they'd probably tear me five new assholes just for talking >_>
21:46 batman but the discussion is drifting...
21:47 Adura Is there no #noobperl?
21:47 sri batman: very special perl -E 'say map $_->{foo}, {foo => "bar"}, {foo => "bar"}'
21:47 hesperaux lol
21:49 sri the block is actually optional ;)
21:49 batman sri: crap. i almost never use them that way, so i forget :/
21:49 sri i usually pretend it doesn't exist too
21:50 hesperaux i'm on freenode now
21:50 hesperaux i prefaced my inane stupidity with a question about whether there's a noob channel
21:50 batman clever :)
21:51 batman sri: i can't even remember why it's suggested NOT to use that format :/
21:51 sri because it's special
21:51 sri nothing else works that way
21:52 sri silly parser exceptions
21:52 batman well.. nothing works like inside the regexes either but i still use them :)
21:52 sri funny thing is map/grep with block are actually slower :)
21:53 batman i'm surprised that it's slower in all cases
21:53 batman ...like your example above
21:54 batman anyway... wasn't i supposed to get some sleep? :/
21:55 batman take care
21:56 sri hesperaux: i also recommend Perl Best Practices for all questions regarding style
21:56 hesperaux night batman have a good one
21:56 hesperaux sri, alright
21:56 hesperaux I'm going to have to give up my old ways for this, aren't I?
21:57 * sri still changes his style regularly
22:03 mandreacchio joined #mojo
22:26 jzawodn joined #mojo
22:26 thaljef joined #mojo
22:28 thaljef1 joined #mojo
22:29 thaljef2 joined #mojo
22:49 human39 is there any working examples for paypal IDT or IPN integration?
23:07 sri hmm, i have a successful memory exhaustion attack against catalyst
23:45 * tempire uses grep [predicate] => @list all the time
23:46 sri bad tempire!
23:46 tempire nonsense!  it's perfect.
23:47 tempire run "this" on => this list
23:47 tempire that one. => right there => :)

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