Google "programming language" and look at the #1 rank ;)

Just a few links to make you happy - look at the #1 link for each:

Googling "Programming":
http://www.google.com/search?sourceid=mozclient&ie=utf-8&oe=utf-8&q=prog
ramming

Googling "Programming Language":
http://www.google.com/search?hl=en&lr=&ie=UTF-8&q=programming+language&b
tnG=Search

Googling "Best Programming Language":
http://www.google.com/search?hl=en&lr=&ie=UTF-8&q=best+programming+langu
age&btnG=Search

Actually got this from a python-zelaot workmate :slight_smile:

Googling "Programming":

http://www.google.com/search?q=programming

Googling "Programming Language":

http://www.google.com/search?q=programming+language

Googling "Best Programming Language":

http://www.google.com/search?q=best+programming+language

They got line-wrapped by the extraneous stuff; these should work better.

  Sean O'Dell

路路路

On Tuesday 17 August 2004 17:23, Mehr, Assaph (Assaph) wrote:

In article <338366A6D2E2CA4C9DAEAE652E12A1DE01D58B62@au3010avexu1.global.avaya.com>,

Just a few links to make you happy - look at the #1 link for each:

Googling "Programming":
prog - Google Search
ramming

I get a link to "Programming in C" first and second is "Python
Programming Language"

Googling "Programming Language":
programming language - Google Search
tnG=Search

I get "Pythong Programming Language" as #1, "Java Technology" #2 and
"Ruby Home Page" #3.

Googling "Best Programming Language":
best programming langu - Google Search
age&btnG=Search

"Ruby Home Page" shows up as the first link for this query :wink:

Did Ruby show up first in all cases for you?

Phil

路路路

Mehr, Assaph (Assaph) <assaph@avaya.com> wrote:

Hi,

Just a few links to make you happy - look at the #1 link for each:

Googling "Programming":
prog - Google Search
ramming

Googling "Programming Language":
programming language - Google Search
tnG=Search

Googling "Best Programming Language":
best programming langu - Google Search
age&btnG=Search

That is nice. Now, to cement this, we should all put a link on our web site:

<a href="http://www.ruby-lang.org">Best programming language</a>

路路路

--
Sascha Ebach

Each time I recommend Ruby to another programmer, and
point them to a few web pages they see things like
that. Then they tell me the Ruby programmers and I are
full of ourselves. I really wouldn't want to put that
on a website :slight_smile: Even though Ruby *is* the best
programming language. /me runs from the angry Python
mob.

路路路

--- Sascha Ebach <se@hexatex.de> wrote:

That is nice. Now, to cement this, we should all put
a link on our web site:

<a href="http://www.ruby-lang.org">Best programming
language</a>

--
Sascha Ebach

----------------------------------------
-- Name: David Ross
-- Phone: 865.539.3798
-- Email: drossruby [at] yahoo [dot] com
----------------------------------------

__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo

They are just jealous.
They've never before been *proud* of the language they use.
Programming in Ruby, its like living in a country that one
can feel patriotic for. Still I didn't find such a country.
Frankly, I doubt such a country could exist for me.
On the other hand.. Ruby does.

I'm so very glad that Ruby fills in for this lost land.

:slight_smile:

Alex

路路路

On Wed, Aug 18, 2004 at 05:21:15PM +0900, David Ross wrote:

Each time I recommend Ruby to another programmer, and
point them to a few web pages they see things like
that. Then they tell me the Ruby programmers and I are
full of ourselves. I really wouldn't want to put that
on a website :slight_smile: Even though Ruby *is* the best
programming language. /me runs from the angry Python
mob.

David Ross wrote:

that. Then they tell me the Ruby programmers and I are
full of ourselves. I really wouldn't want to put that

Reminds me of a good quote:

"I'm not closed minded, they're just WRONG!"

:stuck_out_tongue:

Methinks Rubyists tend to be less rabid than those LISPers... (what's (with
(all (those (brackets (anyhow? (and (where's (the (syntax?))))))))))

路路路

"David Ross" <drossruby@yahoo.com> wrote:

Each time I recommend Ruby to another programmer, and
point them to a few web pages they see things like
that. Then they tell me the Ruby programmers and I are
full of ourselves. I really wouldn't want to put that
on a website :slight_smile: Even though Ruby *is* the best > programming language. /me runs from the angry Python > mob. Sascha Ebach <se@hexatex.de> wrote:
> <a href="http://www.ruby-lang.org">Best programming language</a>

Well you have to pity them becuase they are usually
people who know only *that* language. It is really sad

8]

I try to sway them with kind words, and ask them they
try Ruby. If that doesn't work. I use the

"Programming in Ruby will get you Japanese chicks and
cuties" line. :slight_smile:

Japanese or Nippon, whichever I feel at the time.

Gets them everytime (*when they are male anyway)

路路路

--- David Morton <mortonda@dgrmm.net> wrote:

David Ross wrote:

> that. Then they tell me the Ruby programmers and I
are
> full of ourselves. I really wouldn't want to put
that
Reminds me of a good quote:

"I'm not closed minded, they're just WRONG!"

:stuck_out_tongue:

-----------------------------------------
-- Name: David Ross
-- Phone: 865.539.3798
-- Email: drossruby [at] yahoo [dot] com
-----------------------------------------

__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail

As a user of both Ruby and Lisp, I assure you that are a noisy few
among the adherents of both languages. Lisp evangelists generally
sound different than Ruby evangelists. But I'd be hard pressed decide
which are more "rabid".

bill

路路路

On Thu, Aug 19, 2004 at 06:10:55AM +0900, Dave Burt wrote:

Methinks Rubyists tend to be less rabid than those LISPers... (what's (with
(all (those (brackets (anyhow? (and (where's (the (syntax?))))))))))

"David Ross" <drossruby@yahoo.com> wrote:
> Each time I recommend Ruby to another programmer, and
> point them to a few web pages they see things like
> that. Then they tell me the Ruby programmers and I are
> full of ourselves. I really wouldn't want to put that
> on a website :slight_smile: Even though Ruby *is* the best > > programming language. /me runs from the angry Python > > mob. > > Sascha Ebach <se@hexatex.de> wrote:
> > <a href="http://www.ruby-lang.org">Best programming language</a>

--
#S(SIGNATURE :EMAIL "bill@32768.com" :WEBSITE "http://32768.com/bill&quot;\)

Hey now, that's not quite fair. Amusing, but not quite
fair. I'm pretty fond of Lisp-ish languages these
days. It's a nice break from the syntax overload of a
lot of other languages :slight_smile:

-- Brian Wisti

路路路

--- Dave Burt <burtdav@hotmail.com> wrote:

Methinks Rubyists tend to be less rabid than those
LISPers... (what's (with
(all (those (brackets (anyhow? (and (where's (the
(syntax?))))))))))

"David Ross" <drossruby@yahoo.com> wrote:
> Each time I recommend Ruby to another programmer,
and
> point them to a few web pages they see things like
> that. Then they tell me the Ruby programmers and I
are
> full of ourselves. I really wouldn't want to put
that
> on a website :slight_smile: Even though Ruby *is* the best
> programming language. /me runs from the angry
Python
> mob.

Sascha Ebach <se@hexatex.de> wrote:
> > <a href="http://www.ruby-lang.org">Best
programming language</a>

__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail

Hi all,

Are there any libraries that handle YAML->XML conversion? I want to use in-line YAML to allow command-line insertion of XML fragments into a document.

e.g. addxml.rb --entry "config : {name : url, value : www.blah.com }"

would enter:
<config>
    <name>url</name>
    <value>www.blah.com</value>
</config>

Not a hard problem, but I wasn wondering if I was missing any useful standard methods that I overlooked.

Thanks.
Nick

David Morton wrote:

路路路

David Ross wrote:

that. Then they tell me the Ruby programmers and I are
full of ourselves. I really wouldn't want to put that

Reminds me of a good quote:

"I'm not closed minded, they're just WRONG!"

:stuck_out_tongue:

I am having problems returning a value from a proc object:

@@mappings.each{ |hsh|
聽聽聽聽聽聽聽聽begin
聽聽聽聽聽聽聽聽聽聽if( hsh['type'] == c['type'] ) then
聽聽聽聽聽聽聽聽聽聽聽聽eval( "comp=#{hsh['template']}" )
聽聽聽聽聽聽聽聽聽聽聽聽hsh.each_key{ |key|
聽聽聽聽聽聽聽聽聽聽聽聽聽聽m = proc { @@ignore.each{ |i| return true if( key == i ) } }.call
聽聽聽聽聽聽聽聽聽聽聽聽聽puts m;
聽聽聽聽聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽聽聽聽聽has_mapping = true;
聽聽聽聽聽聽聽聽聽聽end
聽聽聽聽聽聽聽聽rescue; raise "Unable to evaluate passed in expression: #{hsh['template']}"; end
聽聽聽聽聽聽聽聽break if( has_mapping ); }

It is at the line: m = proc { @@ignore.each{ |i| return true if( key == i ) } }.call
that I am having the problem. I want "m" to be true, but instead it leaves the calling function.

I have modified the line to be:

m = nil;
proc { @@ignore.each{ |i| m=true if( key == i ) } }.call

but I was just wondering if I could return a value w/o having to leave the outer function.

Zach

Hi,

Are there any libraries that handle YAML->XML conversion? I want to use
in-line YAML to allow command-line insertion of XML fragments into a
document.

e.g. addxml.rb --entry "config : {name : url, value : www.blah.com }"

would enter:
<config>
    <name>url</name>
    <value>www.blah.com</value>
</config>

Just a proof-of-concept thing (not insertion but dumping.)

% cat xmlgenerator.rb
require 'soap/marshal'

class XMLGenerator < SOAP::SOAPGenerator
  def obj_to_xml(obj)
    soap = SOAP::Mapping.obj2soap(obj)
    soap.elename = XSD::QName.new(nil, soap.type.name)
    convert_to_xml(soap)
  end

  def hash_to_xml(hash, name)
    soap = SOAP::SOAPElement.from_obj(hash)
    soap.elename = XSD::QName.new(nil, name)
    convert_to_xml(soap)
  end

private

  def convert_to_xml(soap)
    @generate_explicit_type = false
    ns = XSD::NS.new
    @buf = ''
    @indent = ''
    encode_data(ns, true, soap, nil)
    @buf
  end
end

generator = XMLGenerator.new

class Config
  def initialize(name, value)
    @name = name
    @value = value
  end
end

obj1 = Config.new("url", "www.blah.com")
puts generator.obj_to_xml(obj1)

require 'yaml'
obj2 = YAML.load("config : {name : url, value : www.blah.com }")
puts generator.hash_to_xml(obj2, 'root')

% ruby xmlgenerator.rb

<Config>
  <name>url</name>
  <value>www.blah.com</value>
</Config>

<root>
  <config>
    <name>url</name>
    <value>www.blah.com</value>
  </config>
</root>

Regards,
// NaHi

路路路

On Thu, 19 Aug 2004 12:36:51 +0900, Nicholas Van Weerdenburg <nick@activehitconsulting.com> wrote:

Zach Dennis wrote:

I am having problems returning a value from a proc object:

@@mappings.each{ |hsh|
       begin
         if( hsh['type'] == c['type'] ) then
           eval( "comp=#{hsh['template']}" )
           hsh.each_key{ |key|
             m = proc { @@ignore.each{ |i| return true if( key == i ) } }.call
            puts m;
           }
           has_mapping = true;
         end
       rescue; raise "Unable to evaluate passed in expression: #{hsh['template']}"; end
       break if( has_mapping ); }

It is at the line: m = proc { @@ignore.each{ |i| return true if( key == i ) } }.call
that I am having the problem. I want "m" to be true, but instead it leaves the calling function.

I have modified the line to be:

m = nil;
proc { @@ignore.each{ |i| m=true if( key == i ) } }.call

but I was just wondering if I could return a value w/o having to leave the outer function.

Use break:

def fn
   m = proc {break 3}.call
   "m = #{m}"
end

p fn # ==> "m = 3"

That's great! Two interesting approaches.

Thanks,
Nick

NAKAMURA, Hiroshi wrote:

路路路

Hi,

On Thu, 19 Aug 2004 12:36:51 +0900, Nicholas Van Weerdenburg ><nick@activehitconsulting.com> wrote:

Are there any libraries that handle YAML->XML conversion? I want to use
in-line YAML to allow command-line insertion of XML fragments into a
document.

e.g. addxml.rb --entry "config : {name : url, value : www.blah.com }"

would enter:
<config>
   <name>url</name>
   <value>www.blah.com</value>
</config>
   
Just a proof-of-concept thing (not insertion but dumping.)

% cat xmlgenerator.rb
require 'soap/marshal'

class XMLGenerator < SOAP::SOAPGenerator
def obj_to_xml(obj)
   soap = SOAP::Mapping.obj2soap(obj)
   soap.elename = XSD::QName.new(nil, soap.type.name)
   convert_to_xml(soap)
end

def hash_to_xml(hash, name)
   soap = SOAP::SOAPElement.from_obj(hash)
   soap.elename = XSD::QName.new(nil, name)
   convert_to_xml(soap)
end

private

def convert_to_xml(soap)
   @generate_explicit_type = false
   ns = XSD::NS.new
   @buf = ''
   @indent = ''
   encode_data(ns, true, soap, nil)
   @buf
end
end

generator = XMLGenerator.new

class Config
def initialize(name, value)
   @name = name
   @value = value
end
end

obj1 = Config.new("url", "www.blah.com")
puts generator.obj_to_xml(obj1)

require 'yaml'
obj2 = YAML.load("config : {name : url, value : www.blah.com }")
puts generator.hash_to_xml(obj2, 'root')

% ruby xmlgenerator.rb

<Config>
<name>url</name>
<value>www.blah.com</value>
</Config>

<root>
<config>
   <name>url</name>
   <value>www.blah.com</value>
</config>
</root>

Regards,
// NaHi

Joel VanderWerf wrote:

Use break:

def fn
  m = proc {break 3}.call
  "m = #{m}"
end

p fn # ==> "m = 3"

Thanks for the response Joel.

Zach