Camelia, the Perl 6 bug

IRC log for #mojo, 2012-10-05

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

All times shown according to UTC.

Time Nick Message
00:16 jnap joined #mojo
00:27 motoboi My first pull request |m|
00:36 Mike-PerlRecruiter joined #mojo
01:04 mandreacchio joined #mojo
01:05 mandreacchio joined #mojo
01:07 laouji joined #mojo
01:32 mandreacchio_ joined #mojo
01:48 human39 joined #mojo
02:01 marty joined #mojo
02:19 * tempire coagulates
02:24 noganex_ joined #mojo
02:27 zivester joined #mojo
02:28 Thursdaydoesntmatte joined #mojo
02:38 asarch joined #mojo
02:44 * buu explodes tempire
02:57 xaka joined #mojo
02:59 Foxcool joined #mojo
03:42 Foxcool_ joined #mojo
03:44 asarch joined #mojo
03:59 Foxcool_ joined #mojo
04:02 kitt_vl joined #mojo
04:22 kitt_vl joined #mojo
04:30 Foxcool joined #mojo
04:32 macae joined #mojo
05:06 marty joined #mojo
05:12 * dross implodes tempire
05:14 laouji_rouge joined #mojo
05:23 kitt_vl joined #mojo
05:27 jontaylor joined #mojo
05:29 jontaylor Hey guys, I've been building an RPC server using mojolicious and decided that it would be nice to give it back to the community
05:29 jontaylor but I'm looking for suggestions on the best way to package it up for re-usability
05:30 jontaylor obviously people just forking it to add custom bits for every use they have would be a bit inefficient as there wouldn't be a clear way for them to cleanly merge in updates
05:30 jontaylor In the past building rails apps I would bundle the entire app into a Ruby gem using the Rails engines method
05:31 jontaylor but i'm not sure how to achieve the same thing with mojo
05:46 crab make a plugin?
05:47 jontaylor can a plugin be an entire app?
05:49 buu OF COURSE IT CAN AT ZOMBO .COM
05:49 buu WHERE YOU CAN DO ANNNNNNYTHING
05:50 buu jontaylor: To be an rpc server is pretty simple thing, the vast majority of the code is in the actual service providers
05:50 buu How much code do you have that's not domain specific?
05:51 jontaylor buu: originally it was 100% domain specific but i've entirely reduced that to 0 now
05:51 jontaylor its a fairly simple thing, but i'm making a really hard effort to open source as much as I can
05:51 jontaylor it basically does things like this
05:51 jontaylor http://localhost/call/simple/DateTime/-%3Enow
05:52 jontaylor but you can chain method calls together
05:53 buu Ah, a very literal rpc server
05:53 buu Haven't you heard that's trendy and uncool?
05:53 buu =]
05:53 jontaylor so you can do stuff like http://localhost/call/simple/MyClass/::find/n​ame=something&job=dev/-%3Efirst/-%3Ename
05:53 AmeliePoulain joined #mojo
05:54 jontaylor heh, yeah I agree
05:54 buu Is that the actual syntax?
05:54 jontaylor this particular client had a big legacy app with lots of model logic, and they want to build lots of "portal" web apps powered by web services
05:54 jontaylor their devs were spending ages making tons of webservice controllers to expose things
05:54 jontaylor I support a few different syntaxs
05:55 jontaylor thats the "simple" one
05:55 buu But yeah, if you wanted to open source what you had I'd go with either A) a plugin thatadds this functionality under the /call/ 'namespace' or just distribute it as a ready to go app
05:55 buu Like mojomojo
05:55 jontaylor i'll have a quick google for that, thanks :)
05:57 jontaylor Distributing as a ready to go app isn't so bad I guess since I use git
05:57 buu (It's on cpan)
05:57 jontaylor if people add their own extra things in, they 'should' still be able to merge in updates
05:57 buu If it's super easy to just plug things into your app, or rather make the models available for calling, then I'd go with just an app
05:57 buu I download it, configure it with my objects and let it go
05:57 buu I'm not building it into something
05:57 jontaylor thats the idea
05:57 jontaylor you configure a whitelist of what you allow
05:57 buu Mojo can just host sub-apps though
05:57 buu So even if you do that you can plug it in =]
05:58 jontaylor yeah its important for it to be standalone incase it completely whacks the main app :)
05:58 kitt_vl joined #mojo
06:12 ovnimancer joined #mojo
06:22 Vandal joined #mojo
06:53 Mike-PerlRecruiter2 joined #mojo
06:54 Mike-PerlRecruiter_ joined #mojo
06:56 d4rkie joined #mojo
06:58 marcus joined #mojo
07:11 kitt_vl joined #mojo
07:12 Mike-PerlRecruiter_ joined #mojo
07:19 marcus jontaylor: if you want to go the plugin route, you could look at https://metacpan.org/source/SRI/Mojolicious​-3.44/lib/Mojolicious/Plugin/PODRenderer.pm - otherwise I'd go for an embeddable app.
07:20 jontaylor thanks marcus i'd forgotten about the PODRenderer, its essentially exactly what I was looking for isn't it
07:20 jontaylor it adds a full stack of routes/controllers/views
07:20 marcus yeah
07:26 keedi joined #mojo
07:35 fhelmber_ joined #mojo
07:35 spleenjack joined #mojo
07:41 yakudza joined #mojo
07:43 yakudza hello ppl
07:44 yakudza Is there any way to safe configuration to file by means of Mojolicious::Plugin::Config
07:44 yakudza ?
07:47 crab no.
07:50 yakudza is there any other varians of plugins with this ability ?
07:53 pau4o joined #mojo
07:57 dross_ joined #mojo
07:58 dross_ joined #mojo
07:59 dross_ joined #mojo
08:00 dross_ joined #mojo
08:01 marcus yakudza: do you mean 'save configuration to file' ?
08:01 yakudza yes
08:02 marcus yakudza: I suppose you could use https://metacpan.org/module/Mo​jolicious::Plugin::JSONConfig and then generate the config using Mojo::JSON quite easily.
08:02 yakudza hm. nice
08:02 yakudza thanks
08:16 davido joined #mojo
08:19 dross_ :3
08:21 memowe O HAI
08:24 buu HELLO FRIENDS
08:24 buu WHAT IS THE BEST WAY TO MODIFY THE STASH 'GLOBALLY'?
08:28 buu I guess bridges?
08:28 buu Bridges always answer
08:28 memowe buu: $c->stash(GLOBALLY => 'LOLWUT');
08:29 memowe :P
08:29 buu memowe: Where do I run that code?
08:29 memowe In your controller methods
08:31 buu =[
08:31 buu I meant doing it once at startup for all controllers
08:31 buu But I just found app->defaults
08:41 cosmincx joined #mojo
09:21 batman left #mojo
09:23 batman joined #mojo
09:49 dog_chocolate joined #mojo
09:50 dog_chocolate Does Mojolicious have a method for returning the app directory path or do I need to roll my own?  Had a mooch through the docs and can't find anything
09:55 Kwa dog_chocolate: use Cwd qw/getcwd/?
09:57 memowe dog_chocolate: what about $app->home->* (http://mojolicio.us/perldoc/Mojo/Home)?
09:58 memowe M::Home objects stringify to a path to the app home directory
10:02 dog_chocolate Cheers, still getting to grips with how it's all structured, didn't spot that Mojolicious subclasses Mojo =p
10:02 sri http://i.qkme.me/3r7ot0.jpg
10:03 sri \o\
10:03 sri /o/
10:06 sri marcus, tempire, crab: at least vote! https://github.com/kraih/mojo/issues/389
10:06 marcus sri: that one came in last night, it's not like it's been rotting there for a week
10:12 good_news_everyone joined #mojo
10:12 good_news_everyone [mojo] kraih pushed 2 new commits to master: http://git.io/VoYrEw
10:12 good_news_everyone [mojo/master] Document use of charset when encoding parameters. - Welton Rodrigo Torres Nascimento
10:12 good_news_everyone [mojo/master] Merge pull request #388 from weltonrodrigo/param_charset_doc - Sebastian Riedel
10:12 good_news_everyone left #mojo
10:13 sri marcus: some have though ;p
10:13 Lucas1 joined #mojo
10:19 sri i'm not really back btw. still traveling for a few days :)
10:20 * sri waves
10:21 good_news_everyone joined #mojo
10:21 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/Fm3sIA
10:21 good_news_everyone [mojo/master] bump version - Sebastian Riedel
10:21 good_news_everyone left #mojo
10:46 ObseLeTe joined #mojo
10:47 AmeliePoulain joined #mojo
10:56 Ulti I have $self->config(hypnotoad => {listen => ['http://*:3000'], workers => 4, proxy => 1});  in my startup sub, is this not the correct way to tell hypnotoad which port I want it to listen on?
11:02 marcus sri: nice.
11:03 marcus sri: no, they both came in last night
11:03 * marcus is leaving for Cyprus tomorrow.
11:04 marcus sri: I've started working on a web page for mojocon 2013 :p
11:04 marcus And I even have a designer for it :-o
11:21 bogdan_agafonov joined #mojo
11:21 bogdan_agafonov hello everyone!
11:21 purl Hello World!
11:22 bogdan_agafonov seems that i got awful nickname ahah
11:34 Coff joined #mojo
11:41 sri marcus: sweet
11:41 sri i've alrady closed 3 tickets :)
11:51 marcus bogdan_agafonov: yes :)
11:52 marcus sri: Where in the world is Sebastian Riedel?
12:18 Foxcool_ joined #mojo
12:25 tadamo joined #mojo
12:50 vervain joined #mojo
13:01 bogdan_agafonov left #mojo
13:24 bluescreen joined #mojo
13:42 marty joined #mojo
13:45 marty joined #mojo
13:56 gryphon joined #mojo
14:02 ryozi joined #mojo
14:19 sh4 joined #mojo
14:19 Jason_ joined #mojo
14:27 dog_chocolate Hi, got a couple of questions about the way Mojo uses Session cookies
14:27 knshaum joined #mojo
14:27 dog_chocolate I really like the way it does it, encrypting the contents to prevent tampering saves writing a bunch of backend session tracking stuff
14:28 dog_chocolate I was intending to add the user's id to the session cookie when they login and set the expiry to say an hour or something
14:28 dog_chocolate because the contents are encrypted it means users can't masquerade as other users
14:29 dog_chocolate but it's the expiry date I'm a bit concerned about, as far as I can see this is the expiry date on the cookie which can be manipulated by the user
14:30 dog_chocolate so a user could login once and ensure they never have to do that again by altering the expiry date on the cookie
14:30 dog_chocolate does the sessions stuff have any in built counter to this or would I need to come up with my own solution?
14:33 vervain I may be mistake, I've not looked in a while... but the gist is that he expired time is part of the JSON session data, which is then b64 encoded and signed by the session.  So the user can't alter it.
14:33 vervain So it's not Cookie expire time, it's Session expire time.
14:33 vervain Dive into Mojolicious::Sessions and have a look.
14:34 vervain And not to nitpick; but the session data is b64 encoded and then signed; i.e. _not_ encrypted.
14:34 vervain ( or it may be signed before encoding - like I say - not looked for a while )
14:40 dog_chocolate vervain: cheers, I thought I'd tested that and it didn't seem to be behaving that way, let me double check
14:40 dog_chocolate Timestamping each individual piece of data was what I was intending to do manually
14:43 dog_chocolate vervain: Heh yes it seems you're right =)
14:43 dog_chocolate ta
14:44 vervain NP.  I was in your shoes once and remember it well. :-)
14:48 dog_chocolate ok, in that case, do you remember if you set expiration on the session, is this one timestamp value for all keys stored?  or does the timestamp apply to only the keys set on that call, allowing differing expiry times on different keys?
14:49 dog_chocolate the docs seem to imply the former
14:51 dog_chocolate ok, it's the former
15:03 sh4|2 joined #mojo
15:23 asarch joined #mojo
15:29 batman off topic: is there a way to run a script before any of the other tests are started with prove?
15:29 batman i would really like to clean out my database before each test-run...
15:29 vervain I do that with test/directory numbering.  e.g. 00_style, 01_schema, ...
15:30 batman doesn't work if you want to do -j5 or whatever
15:30 vervain Right
15:30 vervain ./foo.script; prove... then ;-)
15:30 batman :D
15:30 batman hehe
15:31 vervain I have scenarios like that too... and then shell aliases to various incantations.
15:33 batman i can't remember what the test module is called which allow you to load tests from a sub-dir...
15:35 inokenty joined #mojo
15:48 rem_lex|pivo joined #mojo
15:50 jnap joined #mojo
15:55 Leandr joined #mojo
16:00 xaka joined #mojo
16:37 asarch joined #mojo
16:52 Britzel joined #mojo
16:56 pau4o left #mojo
17:28 tempire Behold.  The evil leader has returned.  Make way.
17:28 tempire MAKE WAY!
17:39 labrown joined #mojo
17:45 good_news_everyone joined #mojo
17:45 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/CKY3Uw
17:45 good_news_everyone [mojo/master] added FAQ answer for EV/ithreads incompatibility - Sebastian Riedel
17:45 good_news_everyone left #mojo
17:45 sri I'M ON A PLANE!
17:46 tempire I'm in a house.
17:46 tempire But I'm also on the internet.
17:49 marcus Apathy - it's not just a song by the industrial rock band KMFDM
17:49 GabrielVieira joined #mojo
18:19 ObseLeTe joined #mojo
18:36 motoboi joined #mojo
18:37 abra joined #mojo
19:21 Mike-PerlRecruiter_ joined #mojo
19:29 yakudza joined #mojo
19:36 * sri is still unsure about #389, HTML4 support is not a goal for Mojo::DOM, but being relaxed is... https://github.com/kraih/mojo/issues/389
20:02 motoboi joined #mojo
20:04 kitt_vl joined #mojo
20:08 noganex_ joined #mojo
20:08 timbunce_ joined #mojo
20:08 Kwakwa joined #mojo
20:08 Mike-PerlRecruiter2 joined #mojo
20:08 rem_lex| joined #mojo
20:08 ryozi_ joined #mojo
20:08 tl joined #mojo
20:12 memowe joined #mojo
20:14 sh4 joined #mojo
20:17 xaka joined #mojo
20:53 marcus sri: yeah, I still think it's trt with being relaxed.
20:53 marcus But I accept being downvoted ;)
20:53 marcus mostly because the alternative would be to lie on my stomach and kick my feet in the ground.
20:54 Mike-PerlRecruiter joined #mojo
20:58 good_news_everyone joined #mojo
20:58 good_news_everyone [mojo] kraih pushed 2 new commits to master: http://git.io/eq0OeQ
20:58 good_news_everyone [mojo/master] HTML4 allows whitespace between the -- and > ending a comment - Joel Berger
20:58 good_news_everyone [mojo/master] Merge pull request #390 from jberger/html4-comments - Sebastian Riedel
20:58 good_news_everyone left #mojo
21:05 good_news_everyone joined #mojo
21:05 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/AruZrg
21:05 good_news_everyone [mojo/master] documentation and test tweaks - Sebastian Riedel
21:05 good_news_everyone left #mojo
21:24 sri tempire: haha, i figured you would switch :D
21:25 tempire That was my original plan, but I was testing everyone.
21:25 tempire :)
21:44 motoboi Can someone explain me why is not necessary to escape '@' or '/'?
21:44 motoboi Mojo don't percent encode those
21:47 diegok motoboi: does it work? :)
21:59 motoboi Actually not. But URI::Encode don't encode them either.
22:10 motoboi More specifically, those "unsafe" characters are not percent-encoded when sent as application/x-www-form-urlencoded.
22:10 motoboi That seems correct, although Chrome percent-encode everything...
22:15 ObseLeTe joined #mojo
22:16 jzawodn joined #mojo
22:17 marcus https://twitter.com/scrottie​/statuses/253295313517953026 wow, centos seems quite broken.
22:17 marcus maybe just as well, might teach ops people that using the system perl is not cool.
22:35 vervain Not sure it's 'ops people'.  I have to explain that to _plenty_ of so-called perl experts.  Folks who were great a perl but needed the environment build for them.
22:36 vervain s/have to/have had to/
22:37 Jason_ joined #mojo
23:11 davido joined #mojo
23:40 timbunce__ joined #mojo
23:59 Jason__ joined #mojo

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