Camelia, the Perl 6 bug

IRC log for #mojo, 2013-09-10

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

All times shown according to UTC.

Time Nick Message
00:10 good_news_everyone joined #mojo
00:10 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/sOhJtA
00:10 good_news_everyone mojo/master 1fa14ed Sebastian Riedel: more consistent logging for delayed rendering
00:10 good_news_everyone left #mojo
00:11 sri render_later would disable that log message before, which is kind of silly, better have it signal delayed rendering all the time
00:20 jberger joined #mojo
00:42 jberger_ joined #mojo
00:43 marty joined #mojo
00:44 marty joined #mojo
00:52 good_news_everyone joined #mojo
00:52 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/wTpMEg
00:52 good_news_everyone mojo/master cb7c669 Sebastian Riedel: test delayed rendering of template
00:52 good_news_everyone left #mojo
00:57 shmuel joined #mojo
01:02 laouji joined #mojo
01:24 basic6_ joined #mojo
01:37 good_news_everyone joined #mojo
01:37 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/ShkBxw
01:37 good_news_everyone mojo/master ccf0745 Sebastian Riedel: small optimizations
01:37 good_news_everyone left #mojo
01:54 crab templar is not as strange as templater
02:02 d4rkie joined #mojo
02:02 gtodd joined #mojo
03:14 preflex_ joined #mojo
03:42 btyler joined #mojo
04:46 russum left #mojo
05:03 andrei joined #mojo
05:17 dqw joined #mojo
05:36 hesperaux joined #mojo
05:39 hesperaux__ joined #mojo
05:47 dotandimet joined #mojo
06:02 dod joined #mojo
06:07 dod joined #mojo
06:12 jwang joined #mojo
06:33 Vandal joined #mojo
06:42 denis_boyun joined #mojo
06:43 ladnaV joined #mojo
06:49 Vandal joined #mojo
06:53 dod joined #mojo
07:03 trone joined #mojo
07:05 ladnaV joined #mojo
07:06 basiliscos joined #mojo
07:09 n0n joined #mojo
07:22 arpadszasz joined #mojo
07:24 Vandal joined #mojo
07:30 n0n joined #mojo
07:33 mire joined #mojo
07:37 ladnaV joined #mojo
07:38 n0n1 joined #mojo
08:10 Vandal joined #mojo
08:33 dotan joined #mojo
08:33 ladnaV joined #mojo
08:43 ver joined #mojo
08:45 Vandal joined #mojo
09:25 fhelmber_ joined #mojo
09:32 Vandal joined #mojo
09:33 Vandal joined #mojo
09:37 dotandimet joined #mojo
09:40 n0n joined #mojo
09:42 n0n hi. is there a pendant to startup()?
09:42 n0n or rather a best practice?
09:42 batman n0n: what do you mean?
09:42 n0n shutdown()
09:43 n0n a method that runs on program termination
09:43 entro joined #mojo
09:43 n0n do i have to go with signal handling?
09:45 ladnaV joined #mojo
09:45 n0n DESTROY?
09:46 crab EXTERMINATE!
09:46 n0n LASERBRAIN
09:52 bjoernfan ... oh... I just added -m production to my command line stuff and all my database indexing just got a few infinities faster... uhm..
09:53 batman n0n: DESTROY will probably not work. too many plugins keeping the $app object around (partially guessing)
09:54 crab bjoernfan: explain
09:57 n0n tested it. when i use "daemon" to start, DESTROY "fires". when doing "psgi", it does not...
09:57 n0n @batman: suggestions?
09:57 n0n alternatives...
09:57 batman n0n: explain what you want to achieve
09:58 n0n pretty simple: i'm collecting stats (CHI stats) and want to spit them out at program end
09:58 bjoernfan crab: I don't even know where to start. I pass a dbh handle to my models... a regular DBI->connect, and saw that other indexing commands just hanged around waiting there instead of doing what I expected it to do in the model... and I started thinking of the preforking issues with database handles and hypnotoad and whatnot, and just tried -m production because I saw it somewhere before, and... well, what took
09:58 n0n (after CTRL-C)
09:58 bjoernfan a minute yesterday just got finished in 8 seconds.
09:59 n0n SIGTERM -> sub
09:59 n0n that is possible. but I asked for a "nicer" way
10:00 batman n0n: sounds like a very, very, very risky design
10:00 batman i think you should reconsider, and save it some other way
10:01 bjoernfan crab: It's not faster in my production environment though, I'll get back to you if I find anything weird.
10:09 dotandimet joined #mojo
10:18 Vandal joined #mojo
10:23 Adura joined #mojo
10:30 Adurah joined #mojo
10:32 denisboyun joined #mojo
10:32 maxhq joined #mojo
10:33 Adurah joined #mojo
10:34 Adurah joined #mojo
10:40 ladnaV joined #mojo
10:47 Vandal joined #mojo
10:55 marty joined #mojo
10:56 bd for some reasing this test: $t->get_ok('/')->status_is(302); is failing for this route: $r->get('/' => sub { shift->redirect_to('menu') });
10:57 bd according to curl a 302 is returned though
10:58 basiliscos joined #mojo
10:59 batman bd: have you tried adding ->content_is('') and ->header_like(Location => qr{ ... }); tests?
10:59 ladnaV joined #mojo
11:00 bd batman: no but it fails with #          got: '200'
11:00 batman add the tests i suggested and see what it says.
11:01 batman it's probably *something else* :/
11:01 bd #          got: 'Your Mojo is working!'
11:01 bd so the test doesn't lie ;)
11:03 batman then you probably haven't set up your test right
11:03 batman is this a lite or full app?
11:04 bd it's a full app
11:04 bd looking at the routes I see two for /
11:04 batman did you do $t = Test::Mojo->new('My::Full::App'); ?
11:04 batman maybe you even should do use Test::More; isa_ok $t->app, 'My::Full:App';
11:04 bd batman: no i din't, I forgot the name
11:05 batman then that's it
11:05 batman the default is the Mojolicious::Lite defined by Mojo::UserAgent.
11:05 batman (or something)
11:05 batman that's the app you got the "Your Mojo is working" message from
11:05 bd so I got bitten by a sane default ;)
11:06 batman indeed.
11:06 batman sane_defaults++
11:06 bd thx
11:07 batman your welcome :)
11:07 batman you're
11:07 * batman need to focus more
11:07 n0n joined #mojo
11:17 Vandal joined #mojo
11:17 drFlox joined #mojo
11:38 bowtie joined #mojo
11:46 arpadszasz joined #mojo
11:47 n0n joined #mojo
12:18 ryozi joined #mojo
12:38 jberger joined #mojo
12:56 * sri yawns
13:02 ladnaV joined #mojo
13:03 * gtodd tries to build his own stackoverflow-ish site for internal use .... with Mojolicious ...
13:04 gtodd the entire value of SO web sites is in the comments tools
13:05 gtodd which is non trivial to replicate :)
13:06 gtodd and I must say I'm *shocked* jberger hasn't done this yet and released it as a plugin ... :)
13:07 * jberger feels rather honored by that comment
13:07 Mikey i'm about to rip off SO's markdown editor
13:08 jberger gtodd Mikey, their editor is available as open source
13:08 jberger I use it I'm galileo
13:08 jberger In
13:08 Mikey i thought the "next version" would be open source
13:08 Mikey are you talking about wmd-editor
13:08 jberger Google pagedown
13:08 eduard joined #mojo
13:08 Mikey oOOo
13:10 eduard hi, can I use Mojo::UserAgent on files like $url = 'file://dbx_aktuell.html'  ?
13:10 eduard or better: how?
13:11 * jberger is finally finishing his non blocking mangopaste
13:11 jberger eduard, I've never tried, I'm going to guess it doesn't work
13:12 jberger Why do you need it?
13:12 eduard ;-) that's how it seems - I like the DOM Parser of mojo vs Mechanize ...
13:13 eduard I do a dry run against a commercial website (not my own)
13:14 gtodd Mikey :-)
13:14 gtodd jberger: doh! :)
13:15 gtodd jberger: I guess I meant more the stars/voting/favourites part of their whole "web application"
13:16 gtodd jberger: /me know nothing about redis NoSQL etc. so ... slow going
13:17 jberger eduard, setup a tiny mojo static server app (I blogged this once) or use App::http_this
13:17 gtodd hmm although the redis book I started reading/skimming seemed to use SO as  an example
13:18 jberger gtodd, I have a mostly useful mango ODM on my github if you want a nosql odm
13:19 eduard thanks jberger will set up a static server
13:19 gtodd jberger: wow ... could I use it to make something with redis
13:20 gtodd I wonder ... learning on the way you see ...
13:20 jberger gtodd, probably too bound to mango for redis
13:20 * gtodd skims through local clones of jberger's repos ....
13:20 gtodd :)
13:21 jberger But you might look at how it works
13:21 gtodd ok I will look at it thanks
13:21 * jberger blushes
13:21 gtodd wtf there's a dissertation in here?!?
13:21 gtodd hehe
13:21 gtodd j/k
13:22 jberger Keep in mind that the odm is an abstract class meant for subclassing
13:22 gtodd hmm
13:23 jberger gtodd a modern latex compiler with pgf and you can build your very own copy of my phd thesis
13:23 gtodd :)
13:23 jberger I recommend using latexmk for compile order management
13:24 jberger (Or the pdf is on my personal github page) :-P
13:25 gtodd I used olde fashioned troff for mine :)
13:26 gtodd then learned perl by converting it to latex :)
13:26 Mikey physics!  UIC!  sweet
13:26 gtodd but that was in the 1990s
13:27 Mikey one of the devs working on my mojolicious project here at Wayne State University has his PhD in physics from here
13:27 gtodd I have stuff like this scattered around my play_and_learn_app:
13:27 Mikey so that's two physicist doctors hacking mojo apps that i know of.
13:28 gtodd use Redis ;
13:28 gtodd my $redis = Redis->new;
13:28 gtodd get '/like' => sub {
13:28 gtodd my $self = shift;
13:28 gtodd my $counter = $redis->incr('counter');
13:28 gtodd sorry :-|
13:28 batman gtodd: https://metacpan.org/module/Mojo::Redis
13:28 gtodd anyway ... it must be the wrong way of doing it...
13:29 jberger Mikey, :-)
13:29 gtodd since trying to translate/hook that into the user profile in order to "remember" the likes/unlikes for each user is painful
13:31 gtodd after a vote it goes into the postgresql user tables somewhere  .... with the redis thinigie just being a sort of a cache
13:31 gtodd or so I thought ... :-|
13:31 jberger gtodd I'm starting to lean toward angular.js for stuff like that
13:32 gtodd I guess I need to see how someone designs and builds such an application so the mango examples will be helpful
13:32 Mikey we adopted backbone for our app
13:32 mire joined #mojo
13:32 gtodd jberger: vanilla.js ?? :-)
13:32 Mikey angular is noce tho.  but we just need the code organization, not so much the magic.  we're doing a lot of custom stuff.  no room for magic here.
13:32 jberger Look at preaction.github.com for a recent talk from chicago.pm
13:32 jberger Vanilla ;-)
13:33 gtodd ok so the js does that for me ??? I heop I have the basic logic of a a nosql/sql site correct at least :-)
13:33 Mikey we were using mongodb, but we threw it out 1.5 years ago
13:34 gtodd Mikey: get some backbone!
13:34 eduard jberger:  works here with "http://localhost:3001/dbx_aktuell.html"   :)  THANK YOU!
13:35 jberger eduard, nice
13:36 bluescreen joined #mojo
13:36 sri that reminds me... i once had a branch with partial file:// support :)
13:36 sri http://pastie.org/8313824 # this is how far i got... but supporting windows is terrible... so i gave up
13:37 gtodd frameworks like backbone make me happy/sad ...   playing with javascript helped me learn about anonymous subroutines / data structures in perl ... (happy!) but then I realized I had to learn javascript (sad) because playing goes nowhere ....
13:38 Mikey javascript is a decent language with all the modern amenities
13:38 Mikey late 90s js and modern js go into separate parts of my memory
13:39 gtodd I realized I don't know anything about computer programming languages ... I only know perl ... which is almost the same thing but .... :-)
13:39 Mikey you'd be surprised how much you know by knowing perl.
13:39 gtodd I think I liked "Elegant Javascript" because js seemed perlish ...
13:40 gtodd then there's perlito :-D
13:43 gtodd I guess the two (.pl .js) are complementary in some ways  ...
13:43 sri suppose if file:// support was done properly i wouldn't mind it... whole thing could go into Mojo::UserAgent::Transactor::file or so with only the timer remaining in Mojo::UserAgent
13:44 gtodd jberger: do any of your projects  CMS etc use angular right now?
13:44 jberger None that are publicly available
13:46 jberger Perl and js have similar closures and similar scoping (at least in functions)
13:47 jberger Also always use var, like always use my
13:48 jberger sri, would it be easier for it to setup a temporary static file server and pull from that?
13:49 sri jberger: have you looked at the patch? :O
13:49 jberger Canonize what eduard just did
13:49 jberger No :-P
13:50 eduard jberger: I just put all the files I want to test against into 'public' directory and was done with it ...
13:50 sri how could translating a file:// url to http:// and managing a server possibly be less complicated?
13:50 jberger True, your paste is pretty simple
13:51 jberger twas just an offhand thought
13:51 * jberger needs to get to work
13:52 sri discussion is moot though, doubt anyone cares enough to make any solution work on windows
13:53 gtodd jberger: thanks
13:53 gryphon joined #mojo
13:54 * jberger definitely does not
13:54 jberger gtodd o/
14:01 Vandal joined #mojo
14:22 btyler joined #mojo
14:22 whatitdo joined #mojo
14:26 asarch joined #mojo
14:31 btyler joined #mojo
14:39 espent joined #mojo
14:42 bluescreen joined #mojo
14:42 bluescreen joined #mojo
15:07 yokoda joined #mojo
15:17 zackiv31 joined #mojo
15:19 Vandal joined #mojo
15:22 russum joined #mojo
15:29 sh4 joined #mojo
15:37 dqw joined #mojo
15:40 russum left #mojo
15:52 trone joined #mojo
15:52 ladnaV joined #mojo
15:55 KindTwo joined #mojo
16:02 bluescreen joined #mojo
16:07 bluescreen joined #mojo
16:16 basiliscos joined #mojo
16:21 jamesw joined #mojo
16:25 asarch joined #mojo
16:27 Dandre joined #mojo
16:32 dod joined #mojo
16:34 Vandal joined #mojo
16:49 arpadszasz joined #mojo
17:13 whatitdo joined #mojo
17:20 Mikey any idea why a $ws->send() from Mojo::UserAgent which works fine under linux would just not work in OpenBSD
17:40 dvinciguerra joined #mojo
17:53 denis_boyun joined #mojo
17:58 d4rkie joined #mojo
18:02 bluescreen joined #mojo
18:03 * marcus needs a new phone.
18:03 marcus the old one got very worn suddenly.
18:13 punter joined #mojo
18:31 bowtie_ joined #mojo
18:36 bowtie joined #mojo
18:41 * marty agrees with marcus
18:43 marcus turns out I will be in Portland on the 20th
18:45 marty attending the "feast" event I hope.   :)
19:08 whatitdo joined #mojo
19:08 bowtie_ joined #mojo
19:08 n0n joined #mojo
19:19 sri fingerprints in the cloud... yay!
19:36 marty That's what I thought.  Store all your biometric and personal info in our cloud, trust us.  yikes!
19:46 sri "fingerprints are only stored on the phone... so it's all cool you guys... apple would never put a backdoor into ios!"
19:47 Mikey anyone not known to be non compliant is compliant.
19:49 Mikey .. or not worth it.
19:50 gryphon joined #mojo
19:59 marty I still think I'm going to try the new iphone and see how it compares to my android.  Plus, I can use either for control my new mindstorms ev3.   weeeeeee
19:59 marty s/for/to
20:08 KindOne joined #mojo
20:08 sri if i get a new iphone it would be a 5c
20:12 mire joined #mojo
20:15 heytrav joined #mojo
20:27 heytrav joined #mojo
20:33 tempire Oh my. I guess the mojocasts have fallen out of favor.
20:40 gtodd tempire: ?
20:41 gryphon_ joined #mojo
20:42 gtodd tempire: for sure another season's worth is needed ...
20:43 tempire not enough viewers to warrant the investment.
20:43 gtodd sigh
20:44 gtodd what about outsourcing production ... offshore ... england or something
20:44 gtodd :)
20:47 rem_lex| joined #mojo
20:51 tempire quality goes down.
20:57 sri tempire: errata has become a problem https://github.com/kraih/mojo/wiki#screencasts
20:57 btyler tempire: I know I'm only one, but the mojocasts helped me a ton. the docs are great, but they're mostly useful once you already know what to look for.
20:57 tempire sri: I know. It was inevitable.
20:58 btyler regardless of whether the casts continue, I think there's certainly a need for something gentler and more directed than the docs
20:59 tempire btyler: you're nominated.
20:59 tempire go.
20:59 sri a good book is needed imo
20:59 sri we have reached the necessary stability now
21:00 btyler tempire: sorry, I don't mean to seem like I'm asking for more, just wanted to express appreciation. I do want to start writing some tutorials and stuff once I get a little more fluent with things
21:00 tempire \o/
21:00 tempire blog entries are always welcomed, no matter the skill level.
21:06 perlite_ joined #mojo
21:39 good_news_everyone joined #mojo
21:39 good_news_everyone [mojo] kraih tagged v4.35 at bf2447f: http://git.io/CvUr5Q
21:39 good_news_everyone left #mojo
21:41 sri but yea, we could definitely use more blog posts
22:27 KindOne joined #mojo
22:36 abhishekisnot joined #mojo
22:37 abhishekisnot Mojolicious and Moo - I am starting a webapp using mojolicious and was surprised to know Mojolicious wont work with Moo - Is there anything obvious I am missing
22:37 abhishekisnot Here is the code example  - https://gist.github.com/abhishekisnot/6513541
22:42 sri abhishekisnot: it appears the Moo constructor doesn't accept a blessed hashref, nothing we could do about that, you have to report it as a bug
22:44 sri considering that this has its own error message, it could be that Moo is incompatible with Mojolicious
22:44 sri but you have to discuss that with mst
22:46 sri Moose does not appear to have this limitation
22:46 abhishekisnot sri: I just tested out Moose, which seems to work all fine
22:47 sri so i guess your chances are pretty good that it might be considered a bug in Moo
22:48 jberger seriously? I was able to subclass PDL using Moo
22:49 jberger And nothing works with PDL
22:50 * jberger will also look when he gets home
22:54 dotandimet joined #mojo
23:00 asarch joined #mojo
23:18 abhishekisnot http://pastie.org/private/vjrbhh3ed0vpjkfk7owwhq
23:19 abhishekisnot sri: Is that a correct test case?
23:21 jberger_ joined #mojo
23:32 sri abhishekisnot: overkill
23:32 sri perl -E 'package Foo { use Moo; has bar => (is => "rw") }; say Foo->new(Foo->new(bar => "baz"))->bar'
23:35 abhishekisnot hmm, that does not work with Moose either
23:38 sri then Moose doesn't replace the constructor in the controller case
23:38 sri it's prolly higher up in the ISA chain
23:41 jberger joined #mojo
23:46 good_news_everyone joined #mojo
23:46 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/mqqo_A
23:46 good_news_everyone mojo/master 0177187 Sebastian Riedel: improved compatibility with different object systems
23:46 good_news_everyone left #mojo
23:46 sri whatever, it costs us nothing to be more compatible
23:47 sri i imagine there will be other problems wit Moose though, since ISA is borked BUILD and friends won't work
23:49 sri abhishekisnot: Moo should work now
23:53 abhishekisnot sri: thank you, it works.

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