Re: Getting rid of the route maker

2008-07-19 Thread Magnus Holm
Sure, you're the boss. Camping is ready when you are ready!

Well, I don't have any new ideas. We just need to clean up the documentation!

On Mon, Jul 7, 2008 at 6:46 PM, _why <[EMAIL PROTECTED]> wrote:
> On Thu, Jul 03, 2008 at 02:52:41AM +0200, Magnus Holm wrote:
>> Come on, you lazy interrogative! Are your shoes too heavy? :-(
>
> Bzzt!  (Drawing on backup camping power grids...)  Very sorry to be
> bad about this.  Yeah, lots of Shoes stuff going on this week as
> we're shooting for a July 31st release and there many bothersome bugs
> to smash.
>
> You've all done a lot of fanastic work and I say we keep working a
> bit longer.  I just merged zimbatm's week-old patches and I think it
> would be great if we could get more campers to mess with judofyr's
> gems, as I think camping 2.0 will inspire some breakages.
>
> Augusttime would be better for me, but let's talk about what you
> guys want to do.
>
> _why
> ___
> Camping-list mailing list
> Camping-list@rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>



-- 
Magnus Holm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Getting rid of the route maker

2008-07-07 Thread _why
On Thu, Jul 03, 2008 at 02:52:41AM +0200, Magnus Holm wrote:
> Come on, you lazy interrogative! Are your shoes too heavy? :-(

Bzzt!  (Drawing on backup camping power grids...)  Very sorry to be
bad about this.  Yeah, lots of Shoes stuff going on this week as
we're shooting for a July 31st release and there many bothersome bugs
to smash.

You've all done a lot of fanastic work and I say we keep working a
bit longer.  I just merged zimbatm's week-old patches and I think it
would be great if we could get more campers to mess with judofyr's
gems, as I think camping 2.0 will inspire some breakages.

Augusttime would be better for me, but let's talk about what you
guys want to do.

_why
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Getting rid of the route maker

2008-07-02 Thread Magnus Holm
On Tue, Jun 24, 2008 at 5:07 PM, _why <[EMAIL PROTECTED]> wrote:

> On Tue, Jun 24, 2008 at 01:05:54PM +0200, Magnus Holm wrote:
> > Man, that's way better than removing 135 bytes! I *love* the
> implementation!
>
> I have always wanted to use Method#to_proc in Camping.
>
> > Alright! What about releasing 2.0? I've closed a lot of tickets on the
> > tracker, and I don't think we need more for a 2.0. There is no point
> > of waiting anymore, IMO!
>
> I have two things left: I need to figure out if I want to merge
> zimbatm's Markaby patch.  And I'd like to go through Rack a bit more
> myself and see if I can cut down the work we're doing.  Hopefully
> today or tomorrow, though!
>
> _why
> ___
> Camping-list mailing list
> Camping-list@rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>

Come on, you lazy interrogative! Are your shoes too heavy? :-(

-- 
Magnus Holm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Getting rid of the route maker

2008-06-25 Thread Manfred Stienstra


On Jun 25, 2008, at 3:18 PM, zimbatm wrote:

One contra argument is that markaby is pretty old. Last time I checked
the trunk it was in a weird state. If I remember well,
it has been made Camping incompatible in favor of some Rails (!)  
goodness.


Yeah, I removed Markaby from one of our Rails projects because it  
seemed to be leaking memory like crazy when I updated Rails. I don't  
have any empirical evidence unfortunately, but I think Markaby needs a  
refresh in order to work properly with either Camping > 1.0 or Rails >  
1.0.


Manfred
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Getting rid of the route maker

2008-06-25 Thread zimbatm
2008/6/24 _why <[EMAIL PROTECTED]>:
> I need to figure out if I want to merge zimbatm's Markaby patch.

These are the reasons behind the patch :
* Historically Markaby was expurged to attain the 0 dependencies
walhalla. Rack has changed it all
* Camping apps are really nice in a 1 file setup. Markaby is the perfect match
* (minor) Object#meta_def is not into camping's source, making the code clearer

One contra argument is that markaby is pretty old. Last time I checked
the trunk it was in a weird state. If I remember well,
it has been made Camping incompatible in favor of some Rails (!) goodness.

Cheers,
  zimbatm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Getting rid of the route maker

2008-06-24 Thread Magnus Holm
Nice! You should also go through the documentation, it's pretty bad at
the moment...

On Tue, Jun 24, 2008 at 5:07 PM, _why <[EMAIL PROTECTED]> wrote:
> On Tue, Jun 24, 2008 at 01:05:54PM +0200, Magnus Holm wrote:
>> Man, that's way better than removing 135 bytes! I *love* the implementation!
>
> I have always wanted to use Method#to_proc in Camping.
>
>> Alright! What about releasing 2.0? I've closed a lot of tickets on the
>> tracker, and I don't think we need more for a 2.0. There is no point
>> of waiting anymore, IMO!
>
> I have two things left: I need to figure out if I want to merge
> zimbatm's Markaby patch.  And I'd like to go through Rack a bit more
> myself and see if I can cut down the work we're doing.  Hopefully
> today or tomorrow, though!
>
> _why
> ___
> Camping-list mailing list
> Camping-list@rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>



-- 
Magnus Holm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Getting rid of the route maker

2008-06-24 Thread _why
On Tue, Jun 24, 2008 at 01:05:54PM +0200, Magnus Holm wrote:
> Man, that's way better than removing 135 bytes! I *love* the implementation!

I have always wanted to use Method#to_proc in Camping.

> Alright! What about releasing 2.0? I've closed a lot of tickets on the
> tracker, and I don't think we need more for a 2.0. There is no point
> of waiting anymore, IMO!

I have two things left: I need to figure out if I want to merge
zimbatm's Markaby patch.  And I'd like to go through Rack a bit more
myself and see if I can cut down the work we're doing.  Hopefully
today or tomorrow, though!

_why
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Getting rid of the route maker

2008-06-24 Thread Julik Tarkhanov

Then I'm +1.
Can't wait to see my tests fail with 2.0 (I will obviously have to  
update Mosquito for the new version, although if we still have .run  
it should

work unmodified).

On Jun 24, 2008, at 3:14 PM, Magnus Holm wrote:


R isn't gone! Feel free to use both (and if you use R, it would not
add more routes:

module Camping::Controllers
  class Index;end
  class Advanced < R '/(some regex';end
  # /advanced will NOT route to Advanced
end

On Tue, Jun 24, 2008 at 3:09 PM, Julik Tarkhanov
<[EMAIL PROTECTED]> wrote:

Does that mean we are losing the possinility for multiple routes per
controller and such?
Or should I return something magic from self.urls to make controllers
function the pre-2.0 way?

On Jun 24, 2008, at 1:05 PM, Magnus Holm wrote:

Alright! What about releasing 2.0? I've closed a lot of tickets on  
the


tracker, and I don't think we need more for a 2.0. There is no point

of waiting anymore, IMO!

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list





--
Magnus Holm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Getting rid of the route maker

2008-06-24 Thread Magnus Holm
R isn't gone! Feel free to use both (and if you use R, it would not
add more routes:

module Camping::Controllers
  class Index;end
  class Advanced < R '/(some regex';end
  # /advanced will NOT route to Advanced
end

On Tue, Jun 24, 2008 at 3:09 PM, Julik Tarkhanov
<[EMAIL PROTECTED]> wrote:
> Does that mean we are losing the possinility for multiple routes per
> controller and such?
> Or should I return something magic from self.urls to make controllers
> function the pre-2.0 way?
>
> On Jun 24, 2008, at 1:05 PM, Magnus Holm wrote:
>
> Alright! What about releasing 2.0? I've closed a lot of tickets on the
>
> tracker, and I don't think we need more for a 2.0. There is no point
>
> of waiting anymore, IMO!
>
> ___
> Camping-list mailing list
> Camping-list@rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>



-- 
Magnus Holm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Getting rid of the route maker

2008-06-24 Thread Julik Tarkhanov
Does that mean we are losing the possinility for multiple routes per  
controller and such?
Or should I return something magic from self.urls to make controllers  
function the pre-2.0 way?


On Jun 24, 2008, at 1:05 PM, Magnus Holm wrote:


Alright! What about releasing 2.0? I've closed a lot of tickets on the
tracker, and I don't think we need more for a 2.0. There is no point
of waiting anymore, IMO!


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Getting rid of the route maker

2008-06-24 Thread Magnus Holm
Man, that's way better than removing 135 bytes! I *love* the implementation!

Alright! What about releasing 2.0? I've closed a lot of tickets on the
tracker, and I don't think we need more for a 2.0. There is no point
of waiting anymore, IMO!

On Tue, Jun 24, 2008 at 12:14 AM, _why <[EMAIL PROTECTED]> wrote:
> On Mon, Jun 23, 2008 at 12:16:35AM +0200, Magnus Holm wrote:
>> The route maker's job is basically two things:
>> - Make sure that all controllers includes the right mixins
>> - If any controllers doesn't respond to "urls" (aka. haven't been inherited
>>   from R) define "urls" as ClassName.downcase
>>
>> The first point can be accomplished within R, but not the latter. But it
>> should be noted that the latter also can cause some troubles.
>
> Or, maybe, instead of getting rid of #2 we could make it go a bit
> beyond just downcasing to help steer us away from regexps.
>
>  module Blog::Controllers
>class Index # automatically '/'
>  def get; end
>end
>
>class ViewN # automatically '/view/(\d+)'
>  def get id; end
>end
>
>class ViewX # automatically '/view/(\w+)'
>  def get name; end
>end
>
>class ViewYMD # automatically '/view/(\d+)/(\d+)/(\d+)'
>  def get time; end
>end
>  end
>
> _why
> ___
> Camping-list mailing list
> Camping-list@rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>



-- 
Magnus Holm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Getting rid of the route maker

2008-06-23 Thread _why
On Mon, Jun 23, 2008 at 12:16:35AM +0200, Magnus Holm wrote:
> The route maker's job is basically two things:
> - Make sure that all controllers includes the right mixins
> - If any controllers doesn't respond to "urls" (aka. haven't been inherited
>   from R) define "urls" as ClassName.downcase
> 
> The first point can be accomplished within R, but not the latter. But it
> should be noted that the latter also can cause some troubles.

Or, maybe, instead of getting rid of #2 we could make it go a bit
beyond just downcasing to help steer us away from regexps.

  module Blog::Controllers
class Index # automatically '/'
  def get; end
end

class ViewN # automatically '/view/(\d+)'
  def get id; end
end

class ViewX # automatically '/view/(\w+)'
  def get name; end
end

class ViewYMD # automatically '/view/(\d+)/(\d+)/(\d+)'
  def get time; end
end
  end 

_why
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Getting rid of the route maker

2008-06-23 Thread Magnus Holm
Yeah, I had to move the internal controller to the bottom, so it would include
Models too. I've never liked the route maker, and if we can do almost the same
without (and 135 bytes) it I would be happy.

Do you have any plans on making Equipment Camping 2.0 ready? Is there much to
do? Perhaps you could push it to GitHub?

On Mon, Jun 23, 2008 at 12:17 PM, zimbatm <[EMAIL PROTECTED]> wrote:
> Hey, why not. I'd much prefer to at least allow a "class Name < R;
> end" construct
>
> Longer answer :
>
> The constants problem can also be avoided by checking it's type. I
> never encountered that problem because that Controllers module is
> exactly there to separate the code logic. Other constants must go one
> level higher. Otherwise, we could scrap the modules all together an
> build our apps on a 1 module level.
>
> The real problem, I believe, is the late module inclusion. It makes it
> harder to build plugins and such. While developing the "Equipment"
> library, I had a weird inclusion mechanism I wish I didn't had to do.
> Ruby also has some quirks regarding module inclusion into other
> modules and late method definition in reopened parent module. So while
> your patch might fix the most cases, I believe there is more work to
> be done here. Anyways, keep up the good work.
>
> Cheers,
>  zimbatm
> ___
> Camping-list mailing list
> Camping-list@rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>



-- 
Magnus Holm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Getting rid of the route maker

2008-06-23 Thread zimbatm
Hey, why not. I'd much prefer to at least allow a "class Name < R;
end" construct

Longer answer :

The constants problem can also be avoided by checking it's type. I
never encountered that problem because that Controllers module is
exactly there to separate the code logic. Other constants must go one
level higher. Otherwise, we could scrap the modules all together an
build our apps on a 1 module level.

The real problem, I believe, is the late module inclusion. It makes it
harder to build plugins and such. While developing the "Equipment"
library, I had a weird inclusion mechanism I wish I didn't had to do.
Ruby also has some quirks regarding module inclusion into other
modules and late method definition in reopened parent module. So while
your patch might fix the most cases, I believe there is more work to
be done here. Anyways, keep up the good work.

Cheers,
  zimbatm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Getting rid of the route maker

2008-06-22 Thread Magnus Holm
The route maker's job is basically two things:
- Make sure that all controllers includes the right mixins
- If any controllers doesn't respond to "urls" (aka. haven't been inherited
  from R) define "urls" as ClassName.downcase

The first point can be accomplished within R, but not the latter. But it
should be noted that the latter also can cause some troubles. It's assuming
all constants under Controllers are class and all should be publicly
accessible:

module Camping::Controllers
  LIMIT = 6
  # Ops! Crashing time!

  class HiddenStuff;end
  # Ops! Hacking time!
end

By removing the route maker you must explicitly define controllers by
inherited it from R:

module Camping::Controllers
  class Posts
  end
  # No longer working!
  # Stick with this:
  class Posts < R '/posts'
  end
end

What do you think? (It's also 135 bytes smaller). Code available here:
http://github.com/judofyr/camping/tree/no_route_maker

--
Magnus Holm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list