Camelia, the Perl 6 bug

IRC log for #mojo, 2013-02-18

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

All times shown according to UTC.

Time Nick Message
00:02 tempire freman: you want either hypnotoad or the regular daemon
00:17 Molaf_ joined #mojo
00:27 GabrielVieira joined #mojo
00:35 freman hypnotoad is a dream, regular daemon looks like reality atm
00:35 freman but I was having issues getting the regular daemon to background and run nice out of init.d
00:52 bpmedley freman: Why can't you run hypnotoad out of init.d?
00:52 freman I can, it's the regular daemon I was having problems running out of init.d
00:53 bpmedley freman: I'm confused.  What are you trying to do exactly?
00:53 freman my problem is the project (admittedly my fault) wasn't written to be hypnotoad friendly, heartbeats can quite often be lost :(
00:53 freman I will fix these issues later, just don't have the time today, tomorrow, or this week
00:53 bpmedley freman: So, you're having some issues under hypnotoad and you want to transition back to morbo or some other method?
00:54 freman yeh for an interim time
00:56 bpmedley freman: Can you run morbo under nohup?
00:57 freman hmmm nohup... there's an idea - I'll give that a try and see how it behaves, thanks!
01:07 ka2u joined #mojo
01:07 Averna joined #mojo
01:16 hlin joined #mojo
01:39 KindTwo joined #mojo
01:44 mattastrophe joined #mojo
01:59 d4rkie joined #mojo
01:59 d4rkie joined #mojo
02:24 GabrielVieira joined #mojo
02:49 * sri added $collection->stats and $db->stats to mango
02:50 crab i need to find a reason to write papaya
02:58 tv joined #mojo
03:07 sri Bender1: trust marty
03:07 Bender1 OK, sri
03:07 phillipadsmith Hrm… if I use the %= javascript helper in a route-specific template, is there a way to indicate specifically where to put it in the default layout?
03:16 sri and some syntactic sugar... $collection->find->all instead of $collection->find({})->all
03:34 egopro joined #mojo
03:43 sri and $db->eval is also working now
04:29 Miked joined #mojo
04:32 shmuel joined #mojo
04:43 egopro joined #mojo
04:47 preflex_ joined #mojo
04:50 gryphon joined #mojo
05:12 ka2u joined #mojo
05:15 jnbek joined #mojo
06:02 shmuel joined #mojo
06:24 shmuel joined #mojo
06:40 arpadszasz joined #mojo
06:57 egopro joined #mojo
07:02 Vandal joined #mojo
07:06 jzawodn joined #mojo
07:08 Mike-PerlRecruiter_ joined #mojo
07:08 dpetrov_ joined #mojo
07:40 Miked joined #mojo
07:40 daxim_ joined #mojo
07:45 daxim__ joined #mojo
07:53 dod joined #mojo
07:56 spleenjack joined #mojo
08:02 suy joined #mojo
08:18 dod joined #mojo
08:26 Kulag joined #mojo
08:32 Kulag joined #mojo
08:32 fhelmber_ joined #mojo
08:38 ladnaV joined #mojo
08:42 kitt_vl joined #mojo
08:53 cosimo joined #mojo
09:04 Vandal joined #mojo
09:08 arthas joined #mojo
09:17 ver joined #mojo
09:17 yakudza joined #mojo
09:26 ObseLeTe joined #mojo
09:38 dhg joined #mojo
09:46 nelio joined #mojo
10:13 jpn joined #mojo
10:14 marcus freman_: can't you just tweak the heartbeat interval/timeouts?
10:14 marcus freman_: https://metacpan.org/module/Mojo::S​erver::Hypnotoad#heartbeat_interval
10:31 Mikey zmq + pgsql + mojolicious = <3
10:35 maxhq joined #mojo
10:37 dotan joined #mojo
11:03 mugenken joined #mojo
11:32 spleenjack joined #mojo
11:42 ObseLeTe joined #mojo
12:13 TitanOfOld joined #mojo
12:20 SmokeMachine joined #mojo
12:21 SmokeMac_ joined #mojo
13:09 ladnaV joined #mojo
13:28 daxim_ joined #mojo
13:40 cobra joined #mojo
13:41 jpn joined #mojo
13:45 gryphon joined #mojo
13:50 Britzel_ joined #mojo
13:58 ka2u joined #mojo
14:01 TitanOfOld joined #mojo
14:03 d4rkie joined #mojo
14:17 inokenty joined #mojo
14:26 ObseLeTe joined #mojo
14:33 bluescreen joined #mojo
14:35 Vandal joined #mojo
14:42 bluescreen joined #mojo
14:42 bluescreen_ joined #mojo
14:44 ladnaV joined #mojo
15:08 moltar joined #mojo
15:12 Molaf__ joined #mojo
15:17 Akron joined #mojo
15:30 Akron Would MojoX::Date::RFC3339 be the right place for a Mojo::Date compliant implementation for RFC3339? I'm regularly missing it in Mojolicious and don't want to use DateTime (it's in Atom, XRD, subset of html5 datetime etc.).
15:31 phillipadsmith joined #mojo
15:51 ver joined #mojo
16:01 labrown joined #mojo
16:02 moltar joined #mojo
16:21 azawawi joined #mojo
16:21 azawawi hi everyone
16:21 Mikey hiya
16:22 azawawi Does morbo use its own port... i.e. it override the port inside your Mojo application?
16:26 azawawi and how to detect that my mojo application is running inside morbo?
16:27 moltar joined #mojo
16:27 Akron azawawi: What do you mean with "port inside your Mojo application"?
16:27 azawawi the listening port of my application
16:28 azawawi https://github.com/azawawi/farabi/commit/​55666ac44082473dac2175555d74ea2a3dadd478    # look at the last 2 lines
16:28 Mikey don't you specify this with --listen
16:28 Mikey i know hypnotoad has a hypnotoad { } config
16:28 Mikey but i didn't know that was the case for morbo
16:28 mire joined #mojo
16:29 azawawi but shouldnt morbo respect my application settings?
16:29 azawawi Mojolicious::Commands->start_app('Farabi', 'daemon', '-l', "http://$host:$port");
16:30 azawawi if the port or host is changed, morbo does not read them...
16:30 Akron You define "daemon" in your app and want to wrap that in Morbo? Why?
16:30 azawawi to make it easier for newbies. I am developing Farabi https://metacpan.org/module/Farabi
16:31 azawawi farabi daemon -l blah blah...
16:31 azawawi or
16:31 azawawi farabi --port XYZ
16:32 jberger why should farabi ever need to be run under anything but daemon?
16:32 Akron I think the recipe of galileo is much easier and should work with morbo as well as with hypnotoad.
16:33 Akron https://github.com/jberger/Ga​lileo#RUNNING_THE_APPLICATION
16:33 azawawi jberger: i need a development mode in unreleased and a production mode
16:34 jberger oh, sorry, of course, for your use
16:34 azawawi jberger: basically related to the websocket session. If i am developing a feature in Farabi and i changed a Perl file, then morbo would restart it...
16:34 jberger yeah, use my recipe
16:34 azawawi jberger: show me where... ? :)
16:34 sri you won't ever be able to configure morbo from the inside, it can't work
16:34 jberger morbo `which farabi`
16:34 azawawi sri: i figured so after looking at the code
16:35 jberger but actually thats only needed after installation
16:35 Akron azawawi: jbergers recipe is in the link.
16:35 jberger morbo bin/farabi or morbo script/farabi will work while developing won't it?
16:35 azawawi Akron: thanks i didnt pay attention :)
16:35 Akron azawawi: ;)
16:36 azawawi sri: and is there a way to disable the other mojo commands?
16:37 azawawi sri: i.e. why do i need farabi generate or farabi cpanify
16:38 sri just use your own command namespace
16:39 azawawi sri: Got it ... thanks. https://metacpan.org/module/Mo​jolicious::Commands#namespaces
16:40 azawawi im working now on adding 'new Mojo project' from inside Farabi
16:42 jberger oh and you can make Farabi::Command::daemon which inherits from Mojolicious::Command::Daemon
16:42 jberger oh I like that
16:42 jberger for galileo
16:42 jberger ::daemon of course
16:42 sri that's how it's supposed to be used
16:43 azawawi http://feather.perl6.nl:3030/   # So far... Added a problems tab, Perl syntax checking, JSHint linter...
16:43 jberger I have just been adding commands in galileo to those in mojo
16:43 jberger because I still wanted daemon
16:43 sri it's pretty obvious when you look at how the generator command works :) https://github.com/kraih/mojo/blob/mast​er/lib/Mojolicious/Command/generate.pm
16:43 jberger never thought of removing Mojolicious::Commands from the namespaces and then inheriting from the few I want
16:43 * jberger looks
16:43 azawawi jberger: see :)
16:44 jberger no it makes plenty of sense, just never thought that way
16:44 azawawi jberger: usability :)
16:45 sri the generate command is just another Mojolicious::Commands instance in a different namespace
16:46 Akron azawawi: Looks really cool!
16:46 Akron azawawi++
16:47 * azawawi reads https://metacpan.org/module/​Mojolicious::Command::daemon
16:48 jberger package Farabi::Command::daemon; use Mojo::Base 'Mojolicious::Command::daemon'; 1;
16:48 jberger :-)
16:50 azawawi Part of the problem in building an IDE for Perl
16:50 azawawi is that we have a lot of useful command-line tools
16:51 azawawi but they dont expose any useful API (i.e. to be used in the same Perl process)
16:51 azawawi Regex::Debugger is great but no API
16:52 azawawi in Java world, things are different. Focus is usually on the API.
16:52 azawawi and this means it is easier to integrate into your application.
16:54 jberger the problem with rxrx is it is necessarily tied to the terminal
16:54 jberger it more that most would be rather hard to make API-ified
16:55 jberger now you could find one of the javascript consoles and try to make it display in that :-P
16:55 sri i think that problem is deep in the perl dna... there's no AST after all :(
16:56 azawawi sri: true
16:57 azawawi one of the complaints i got about Farabi when i started developing it...
16:58 azawawi is that it is mostly JS...
16:58 marcus hmm
16:58 sri in fact, i believe if you try hard enough most of perls problems can be traced back to that one deficiency
16:58 dotan joined #mojo
16:58 marcus https://github.com/marcusramberg/Mo​jolicious-Plugin-Proxy/pull/1/files # wonder if this actually a good idea...
17:00 * azawawi back to work... &
17:02 sri marcus: $req->clone can fail
17:03 sri anyway, it was never designed for this use case, so there are many unknowns
17:03 marcus sri: I'm also worried about forwarding post and put actions indiscriminately.
17:03 marcus or delete for instance.
17:04 marcus sri: I guess ->clone could have some troubles with complex bodies.
17:04 sri it was made for user agent redirects
17:05 sri and yea, forwarding the raw request like that is wrong in many many ways even if it works
17:05 sri you have to at least adjust headers
17:05 sri remove hop by hop headers and the like
17:25 avkhozov joined #mojo
17:39 GabrielVieira joined #mojo
17:45 ObseLeTe joined #mojo
17:46 mjadmjadm joined #mojo
17:47 marcus sri: *nods*
17:49 Akron sri: Any opinion regarding MojoX::Date::RFC3339?
17:57 Kulag joined #mojo
18:00 sri Akron: nope
18:01 Akron Means: MojoX is fine and RFC3339 is not important enough for core?
18:05 crab no, it means he has no opinion.
18:11 mire joined #mojo
18:12 Akron crab: I interpret more widely. ;) Do you have an opinion?
18:19 crab Akron: not really. what do you want to do?
18:23 Akron crab: Basically I want to publish a Mojo::Date based/compatible module for RFC3339 - without the overhead of DateTime. It's the most widely used standard for web stuff I think, so I ask for the possibility to be in core. http://goo.gl/h7f7L
18:24 Akron And because regarding the former disencouragement of using the MojoX namespace, but as far as I understood, it's fine now again ...
18:28 crab the code looks fairly sensible, but as for putting it in core, where does one encounter rfc3339 timestamps "in the wild"?
18:29 Akron Atom, HTML5 <time> attribute (although there is nearly everything allowed), XRD ...
18:30 Akron Nearly all microformats like hAtom, hCalendar, hCard, hReview (in the variant of ISO-8601).
18:39 dhg joined #mojo
18:48 dhg joined #mojo
18:53 basic6 joined #mojo
18:54 dhg joined #mojo
18:57 mattastrophe joined #mojo
19:08 Mike-PerlRecruiter_ joined #mojo
19:12 anaio joined #mojo
19:15 al802 joined #mojo
19:16 dhg joined #mojo
19:17 alester joined #mojo
19:24 al802 Hi guys
19:24 al802 Could someone explain how I can secure the default mojolicious session cookie, e.g. I want to set secure=1 $self->{secure}=1;
19:43 crab [2013-02-19 01:13:01] [debug] Template "portfolio.html.ep" not found.
19:43 crab is there an easy way to track down what makes it look for that template?
19:44 dhg joined #mojo
19:44 crab never mind. i got it.
19:57 mattastrophe joined #mojo
19:58 dhg joined #mojo
20:09 * nicomen summons mst
20:10 dhg joined #mojo
20:10 vervain joined #mojo
20:20 anaio joined #mojo
20:20 dhg joined #mojo
20:35 lukep joined #mojo
20:36 dhg joined #mojo
20:39 rhaen he ho :)
20:41 marcus nicomen: Hope you remembered the black candles.
20:51 rhaen marcus: hej
20:51 rhaen marcus: do you have a couple of minutes to spend? You could do me a favor.
20:51 marcus rhaen: o/
20:51 rhaen this means yes?
20:51 nicomen marcus: pm?
20:52 marcus rhaen: If I can do it while watching House of Cards.
20:52 rhaen no, you should read something :)
20:52 nicomen marcus: kevin spacey dies, now you have time...
20:52 dhg joined #mojo
20:52 rhaen ok, I am going back to write some test cases
20:52 marcus rhaen: I can read something.
20:53 marcus nicomen: somehow I doubt that ;)
20:53 rhaen cool. wait - I'll post the link
20:53 rhaen could you check: https://github.com/rafl/pu​ppet-module-perlbrew/wiki
20:53 rhaen and read the pages for "Usage" and "Class Rewrite"
20:54 rhaen that would be awesome.
20:54 nicomen ooh puppet and perlbrew, intrguiing
20:54 rem_lex| joined #mojo
20:54 rhaen I have an idea how to rewrite everything
20:54 rhaen nicomen: yep, that's an awesome module (oh, will be)
20:55 rhaen nicomen: those are the design, come have a look - tell me what you think and it might happen in the future.
20:59 nelio joined #mojo
21:00 dhg joined #mojo
21:06 marcus http://trac.nginx.org/nginx/changeset/5073/nginx # great news \m/
21:06 dhg joined #mojo
21:07 sri \o/
21:08 jberger marcus, !!!
21:08 rhaen webscale?
21:08 marcus Think I'll build nginx from source for wirc.pl
21:09 marcus rhaen: nginx is most def. web scale :)
21:09 rhaen ok
21:10 rhaen isn't YouPorn using nginx?
21:10 rhaen yep, that's webscale.
21:18 marcus if only I could find the darn repository
21:19 dhg joined #mojo
21:19 nicomen in SOVJET RUSSIA the repository finds tou
21:19 nicomen *you
21:19 marcus svn://svn.nginx.org/nginx
21:19 marcus yay svn
21:19 rhaen hm.
21:21 dhg joined #mojo
21:22 sri maybe they are trying to make a statement... apache should stick with version management and leave the web server business to nginx :)
21:23 marcus they also provide a mercurial version.
21:23 Mikey i like svn
21:23 Mikey git makes me sick
21:23 sri decadent russians
21:24 sri cvs4evar!
21:24 * jberger keeps copies files with date on the header
21:25 * jberger could barely stop laughing long enough to type that :-)
21:25 marcus Mikey: motion sickness from how fast the branch switchin gis?
21:25 marcus jberger: myapp.old myapp.reallyold
21:26 nicomen I still don't understand why I can't pull stuff while I have uncommitted things around
21:26 marcus nicomen: use legit and do git sync
21:26 nicomen I still don't understand why I can't pull stuff while I have uncommitted things around
21:26 marcus it stashes/pulls/pushes
21:26 jberger I did one time have folders like 'newestestest'
21:26 jberger just one time
21:26 jberger :-)
21:27 nicomen also I still don't get why it is so hard to do common things
21:27 nicomen like revert a commit, except it's not revert
21:27 marcus ?
21:27 dod joined #mojo
21:28 nicomen like revert a commit, and it's not the command called revert
21:28 nicomen also, I have ended up in weird states when getting conflicts quite a few times where a checkout and manual patching is the only solution I can come up with
21:28 marcus nicomen: git revert reverts a given commit?
21:29 dod joined #mojo
21:29 jberger git reset --hard HEAD~1 <---- really go back one commit
21:29 marcus nicomen: "Given one or more existing commits, revert the changes that the related patches introduce, and record some new commits that record them. This requires your working tree to be clean (no modifications from the HEAD commit)."
21:29 marcus jberger: also, fuck any published history
21:30 jberger thats what I mean by "really"
21:30 nicomen marcus: hm ah you are right, maybe I have it the wrong way now after using only git for some years
21:31 nicomen revert in svn was reset?
21:31 rhaen hm, git reverts builds a diff from the previous commit and applies it reverse.
21:31 rhaen So yes - the history is visible but the changes of the "bad" commit are removed.
21:32 rhaen git reset means - F*ck history, go back in time and if you push that repo everybody who cloned it will become your best friend.
21:32 nicomen hehe
21:33 rhaen been there. Done that - I am wearing this T-Shirt.
21:33 nicomen and what's with the default of making everything a merge commit...
21:33 nicomen hey I got your changes, now I am committing them again just to make sure! ;)
21:33 rhaen muahhha
21:33 nicomen but with my changes added!
21:34 jberger right, only use 'git reset' on your local branch
21:34 marcus nicomen: you can configure git to default to rebase instead of merge.
21:34 jberger once you've pushed, don't do that anymore
21:34 nicomen oh and the fact commits are not sequential makes everything harder
21:35 nicomen but I guess it would've been hard to achieve the same system without uuids
21:35 jberger git log shows the order
21:35 marcus I pretty much had no luck using branches when we were using svn.
21:35 marcus too slow, and merges was a nightmare
21:35 nicomen jberger: yeah I'm talking about easily seeing that a commit has been skipped for instance in a CI output
21:35 nicomen or anywhere really
21:35 marcus svn couldn't even keep track of where your branch had diverged.
21:36 nicomen marcus: I remember using snv-merge for that
21:36 jberger yeah, thats harder
21:36 nicomen oh and svk was nice
21:36 jberger I liked this site when I was trying to get into git
21:36 jberger http://thkoch2001.github.com/whygitisbetter/
21:36 marcus except when it broke down and ate your life.
21:36 marcus which was 'eventually'
21:36 marcus (svk)
21:36 nicomen svk or svn-merge?
21:37 marcus never used svn-merge
21:37 nicomen really, I used it for local stuff and pushing whenever I was online
21:50 dod joined #mojo
21:51 dhg joined #mojo
22:05 al802 Guys, can someone answer a few questions on sessions ?
22:07 al802 e.g. the default Mojolicious session cookie is managed automatically, e.g. it's expiry date is updated, and load/save are called transparently, but if I create a new session with Mojolicious::Sessions->new;
22:07 al802 Do I have to manage these things myself ?
22:07 dhg joined #mojo
22:08 al802 or do new sessions automatically work like the Mojolicious default session?
22:18 marcus running nginx-trunk on wirc.pl now \o/ web sockets seem to work great.
22:19 dhg joined #mojo
22:22 sri \o/
22:22 BeDa joined #mojo
22:26 marcus also, got ssl setup too, and chrome seems to love my free cert.
22:33 dhg joined #mojo
22:53 sri marcus: house of cards good?
22:54 marcus sr: great.
22:57 dhg joined #mojo
23:03 marcus sri even
23:06 al802 joined #mojo
23:07 al802 Clarification on session documentation?
23:07 al802 Is this correct $sessions->load(Mojolicious::Controller->new);
23:07 al802 it does not make sense to me
23:07 al802 the documentation switch between accessor and variable access e.g.
23:08 al802 $sessions->cookie_name('myapp');
23:08 dhg joined #mojo
23:08 al802 $c->session(expiration => 604800);
23:15 jberger al802 what are you trying to do?
23:15 hesco joined #mojo
23:16 BeDa joined #mojo
23:16 dhg joined #mojo
23:20 al802 well to start with I'm trying to set the secure flag
23:20 al802 but cannot seem to set this
23:22 al802 Also is it possible to have multiple sessions with different names
23:22 dhg joined #mojo
23:23 al802 on the secure flag, I followed the docs (runnin under SSL) but the browser shows the cookies are not secure
23:24 al802 the docs say  my $secure = $sessions->secure;   $sessions  = $sessions->secure(1);
23:24 al802 but this implies (from the examples) that you must create your own sessions using my $sessions = Mojolicious::Sessions->new;
23:26 al802 I'm am trying to understand the relationship with the accessor $self->sessions too and if that would even exist if you create your own session with new?
23:28 al802 I think be cause sessions.pm does ($stash->{'mojo.session'} = $session;)
23:28 al802 you can only have a single session
23:31 sri app->sessions->secure(1)
23:32 dabudabu joined #mojo
23:32 al802 what is app?
23:34 al802 app->sessions->secure(1) Can't locate object method "sessions" via package "app" (perhaps you forgot to load "app"?) at (eval 266)[/usr/share/perl5/perl5db.pl:638] line 2.
23:35 al802 so before you can access sessions, it must exist or you will get an error
23:35 marty al802:  Does this help.    http://mojolicio.us/perldoc​/Mojolicious/Controller#app
23:36 al802 I've just found $self->app->sessions
23:36 al802 0  Mojolicious::Sessions=HASH(0x3cae0d0)    'cookie_name' => 'mojolicious'    'default_expiration' => 3600
23:36 al802 this is confusing and is not the way it's documetned
23:39 al802 my app is started as documented for hypnotoad and runs the Mojolicious::Commands->start_app('MyApp') script, so that must indirectly create the "app" instance
23:40 sri http://mojolicio.us/perldoc#TUTORIAL
23:40 sri please start there
23:40 al802 i've been working 20 hours day for the past 4 weeks on mojo
23:41 al802 So i'm have been reading the docs
23:41 al802 it just gets a bit confusing sometimes and my sessions example demonstrates that
23:42 al802 now I don't want in any way to put mojo down, I think it's the best think since sliced bread, actually better.
23:43 al802 I only come here as a very last resort, because I know how busy you guys are, and  I very very much appreciate your help and more importantly the effort put into this project
23:44 Averna joined #mojo
23:49 marty al802:  Maybe examining some of the mojolicious tests will help.  I think if you look at tls_lite_app.t you might find some test that shed light on things.
23:51 al802 I will do thank you
23:57 jberger al802, much of the documentation uses the lite app notation for clarity
23:58 jpn joined #mojo
23:58 jberger app is a lite function which returns the application instance
23:58 jberger this is $self in your main module (the one that subclasses Mojolicious)
23:59 jberger or you can get it via the ->app method in many other classes

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