[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

"Living Dangerous" stage 2, summarizing ideas

Gregory Brown

1/8/2006 11:10:00 PM

Okay, the thread on "Why Living Dangerous can be A Good Thing" is
going quite well.
I'd like to start drafting up notes for my article, so I've put them
on a wiki page.

http://tinyurl...

Feel free to add sections, tweak definitions, etc etc and add your own content.
However, please be mindful of the fact that this is intended to be a
summary of the community consensus, so please do ask here on RubyTalk
if you have doubts that you're opinion would be at least generally in
line with that of the community before adding it to the notes on the
wiki.

Please do reference any websites you are getting your materials from,
if you do so.

keep in mind, the key issues are:

1. Defining what the open nature of ruby is.
2. Addressing the concerns of those who find ruby 'dangerous'
3. Showing the benefits of ruby's openness and dynamicity.
4. Exposing the potential issues that arise from this, and how to avoid them

As usual, I am overwhelmed by the RubyTalk effect, so please keep
those contributions coming!


11 Answers

james_b

1/8/2006 11:22:00 PM

0

Gregory Brown wrote:
> Okay, the thread on "Why Living Dangerous can be A Good Thing" is
> going quite well.
> I'd like to start drafting up notes for my article, so I've put them
> on a wiki page.
>
> http://tinyurl...
>
> Feel free to add sections, tweak definitions, etc etc and add your own content.
> However, please be mindful of the fact that this is intended to be a
> summary of the community consensus, so please do ask here on RubyTalk
> if you have doubts that you're opinion would be at least generally in
> line with that of the community before adding it to the notes on the
> wiki.

If this is a Ruby community thing, would it make more sense to collect
this info on the RubyGarden wiki?

James

--

http://www.ru... - Ruby Help & Documentation
http://www.artima.c... - Ruby Code & Style: Writers wanted
http://www.rub... - The Ruby Store for Ruby Stuff
http://www.jame... - Playing with Better Toys
http://www.30seco... - Building Better Tools


Chad Perrin

1/8/2006 11:48:00 PM

0

On Mon, Jan 09, 2006 at 08:10:04AM +0900, Gregory Brown wrote:
> Okay, the thread on "Why Living Dangerous can be A Good Thing" is
> going quite well.
> I'd like to start drafting up notes for my article, so I've put them
> on a wiki page.
>
> http://tinyurl...

Is the "living dangerous" (as opposed to "living dangerously")
intentional for some reason I'm missing?

--
Chad Perrin [ CCD CopyWrite | http://ccd.ap... ]

"Real ugliness is not harsh-looking syntax, but having to
build programs out of the wrong concepts." - Paul Graham


Gregory Brown

1/9/2006 12:04:00 AM

0

On 1/8/06, James Britt <james_b@neurogami.com> wrote:
> Gregory Brown wrote:
> > Okay, the thread on "Why Living Dangerous can be A Good Thing" is
> > going quite well.
> > I'd like to start drafting up notes for my article, so I've put them
> > on a wiki page.
> >
> > http://tinyurl...
> >
> > Feel free to add sections, tweak definitions, etc etc and add your own content.
> > However, please be mindful of the fact that this is intended to be a
> > summary of the community consensus, so please do ask here on RubyTalk
> > if you have doubts that you're opinion would be at least generally in
> > line with that of the community before adding it to the notes on the
> > wiki.
>
> If this is a Ruby community thing, would it make more sense to collect
> this info on the RubyGarden wiki?

good point! We can move it over there, sure.

new link:
http://rubygarden.org/ruby?TheOpenNa...


james_b

1/9/2006 12:18:00 AM

0

Chad Perrin wrote:
> On Mon, Jan 09, 2006 at 08:10:04AM +0900, Gregory Brown wrote:
>
>>Okay, the thread on "Why Living Dangerous can be A Good Thing" is
>>going quite well.
>>I'd like to start drafting up notes for my article, so I've put them
>>on a wiki page.
>>
>>http://tinyurl...
>
>
> Is the "living dangerous" (as opposed to "living dangerously")
> intentional for some reason I'm missing?

I think of it as a play on "Think dangerous."

James

"Do you know your last name is an adverb?"
from the film "Johnny Dangerously"

--

http://www.ru... - Ruby Help & Documentation
http://www.artima.c... - Ruby Code & Style: Writers wanted
http://www.rub... - The Ruby Store for Ruby Stuff
http://www.jame... - Playing with Better Toys
http://www.30seco... - Building Better Tools


Lyndon Samson

1/9/2006 1:04:00 AM

0

On 1/9/06, Gregory Brown <gregory.t.brown@gmail.com> wrote:
>
> Okay, the thread on "Why Living Dangerous can be A Good Thing" is
> going quite well.
> I'd like to start drafting up notes for my article, so I've put them
> on a wiki page.
>
> http://tinyurl...
>
> Feel free to add sections, tweak definitions, etc etc and add your own
> content.
> However, please be mindful of the fact that this is intended to be a
> summary of the community consensus, so please do ask here on RubyTalk
> if you have doubts that you're opinion would be at least generally in
> line with that of the community before adding it to the notes on the
> wiki.
>
> Please do reference any websites you are getting your materials from,
> if you do so.
>
> keep in mind, the key issues are:
>
> 1. Defining what the open nature of ruby is.


To me Ruby seems a little schizophrenic. It has the concept of classes as
object templates, but they are almost like prototypes, mutable after
creation. So a cross between C++/Java Class style and Javascript/IO
prototype OO. There is no concept of Interfaces, so no limiting the coupling
'surface area' of caller/callee interaction. Its a nice mix because you
don't 'have' to make use of mutable Objects/Classes, but they are like
programmer candy if you need them. I'm hoping Ruby 2/Rite goes even further,
allowing fully 'custom' OO.


2. Addressing the concerns of those who find ruby 'dangerous'
3. Showing the benefits of ruby's openness and dynamicity.
4. Exposing the potential issues that arise from this, and how to avoid them

As usual, I am overwhelmed by the RubyTalk effect, so please keep
those contributions coming!





--
Into RFID? www.rfidnewsupdate.com Simple, fast, news.

Gene Tani

1/9/2006 2:34:00 AM

0


James Britt wrote:
> Chad Perrin wrote:
> > On Mon, Jan 09, 2006 at 08:10:04AM +0900, Gregory Brown wrote:
> >
> >
> > Is the "living dangerous" (as opposed to "living dangerously")
> > intentional for some reason I'm missing?
>
> I think of it as a play on "Think dangerous."
>

who 1st used the D-word, Matz, maybe?

http://www.rubyist.net/~matz/slides/rc2005/mgp...

and theOpenNatureOfRuby wiki page is blank, what are entries supposed
to look like?

Gregory Brown

1/9/2006 2:53:00 AM

0

On 1/8/06, James Britt <james_b@neurogami.com> wrote:
> Chad Perrin wrote:
> > On Mon, Jan 09, 2006 at 08:10:04AM +0900, Gregory Brown wrote:
> >
> >>Okay, the thread on "Why Living Dangerous can be A Good Thing" is
> >>going quite well.
> >>I'd like to start drafting up notes for my article, so I've put them
> >>on a wiki page.
> >>
> >>http://tinyurl...
> >
> >
> > Is the "living dangerous" (as opposed to "living dangerously")
> > intentional for some reason I'm missing?
>
> I think of it as a play on "Think dangerous."

It is something of that matter, yes :O)


Gregory Brown

1/9/2006 10:06:00 AM

0

On 1/9/06, Gene Tani <gene.tani@gmail.com> wrote:

> and theOpenNatureOfRuby wiki page is blank, what are entries supposed
> to look like?

um... no it's not. Are you looking at the tarpit?


zimba.tm@gmail.com

1/9/2006 10:15:00 AM

0

Hi,

I wanted to change the wiki but I'm not sure what I think is right
really is.

It seems to me that you forgot two cases where ruby's open nature is an
inconvenient. Due to ruby's open-class and lack of contraints, it seems
to me that you can't trust ruby code right away. You can't execute an
external code in your application in a specific boundary. You can't
trust it to be "evil" without reviewing it.

I have two example in mind.

First example. Imaging you're building a big web application where
users can submit their templates (eg. blog or wiki hosting) and you're
using embedded ruby in html. How can you trust that the user won't send
an "evil" template without reviewing it ? (disregarding javascript XSS
exploits)

Second example. You're implementing a remote execution mechanism with
agents. Like Java's JINI, you want clients to send pieces of code that
will be executed in the server's environment and then give the result
back. It's a bit like the client would send blocks to the server. How
do you avoid the client sending "evil" code that would redefine how the
server would work ?

I'm curious how these issues can be solved. I think _why used
obfuscation for http://tryruby.... but it's not applicable for
open-source projects. There is also the SAFE variable that limit ruby's
capabilities. But I think it's only applicable to the whole code, so
it's not a solution. Finally, you can taint classes to make the
unmutable but then you loose ruby's dynamicness.

Cheers,
zimba.tm

J. Ryan Sobol

1/9/2006 3:14:00 PM

0

On Jan 9, 2006, at 5:18 AM, zimbatm wrote:

> First example. Imaging you're building a big web application where
> users can submit their templates (eg. blog or wiki hosting) and you're
> using embedded ruby in html. How can you trust that the user won't
> send
> an "evil" template without reviewing it ? (disregarding javascript XSS
> exploits)

> Second example. You're implementing a remote execution mechanism with
> agents. Like Java's JINI, you want clients to send pieces of code that
> will be executed in the server's environment and then give the result
> back. It's a bit like the client would send blocks to the server. How
> do you avoid the client sending "evil" code that would redefine how
> the
> server would work ?

These problems are one and the same: never, ever, ever trust user
data. (completed web forms, templates, client-side code, etc.)
Would you really not examine the template if it where embedded PHP or
something similar? Is it not possible for client-side code to do
"bad things" in JINI? I argue that this is not the fault of the
language, but problems inherent to the world the application lives in.

~ ryan ~