Re: Technology solutions for Ruby?

2007-07-25 Thread Bruno Desthuilliers
vasudevram a écrit :
 Bruno Desthuilliers wrote:
 
 
s/some/great/g
 
Both Ruby and Python are known for this.
  
 Thanks for the info. 

This is not exactly a scoop, you know ?-)

I'd say that - wrt/ advanced programming tricks - *most* of what you
  can do with one can be done with the other - but usually in a *very*
 different way. While Ruby and Python have similar features and may
 look very similar at first sight, their respective object models are
 totally different.
 
 Can you briefly explain what you mean by their respective object
 models are totally different? Do you refer to how the object-
 orientation (classes, objects, etc.) is implemented in the two
 languages?

Obviously, yes.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Technology solutions for Ruby?

2007-07-24 Thread vasudevram

Bruno Desthuilliers wrote:

s/some/great/g

Both Ruby and Python are known for this.

Thanks for the info. (I don't know much about metaprogramming etc. in
either languages - just started exploring those topics recently.)


I'd say that - wrt/ advanced programming tricks - *most* of what you
can do with one can be done with the other - but usually in a *very*
different way. While Ruby and Python have similar features and may
look
very similar at first sight, their respective object models are
totally
different.

Can you briefly explain what you mean by their respective object
models are totally different? Do you refer to how the object-
orientation (classes, objects, etc.) is implemented in the two
languages?

Thanks
Vasudev



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Technology solutions for Ruby?

2007-07-24 Thread Chris Mellon
On 7/16/07, vasudevram [EMAIL PROTECTED] wrote:

 [ Though the OP posted his message to comp.lang.ruby, I'm cross-
 posting it to comp.lang.python, since he mentions Python as a possible
 alternative he's looking at, and also because I've recommended Python
 for his stated needs. Also, interested to see what other Pythonistas
 have to say in response to my reply.
  - Vasudev]

  On Jul 16, 2007, at 2:21 AM, Michael Reiland wrote:

  At the heart of the issue is the fact that I refuse to use Java for this
 project, I prefer not to use .Net because of the portability issues,
 and
 I'd like to get away from C++ for obvious reasons.

  To me this means Ruby, Python, or, as mentioned above, Perl.  If anyone
 can tell me of a way to meet the above requirements in either Python
 or
 Perl, I'm all ears (I just prefer Ruby).

 Yes, I think it would be really great for the Ruby community and for
 the growth of the language if wxRuby was more mature as a GUI toolkit.
 (Not knocking the wxRuby developers at all, its great that they've
 even done what they have - I know that creating other language (like
 Ruby) bindings to a C++ lib is a non-trivial task).

 My suggestion: Python + wxPython + Python DBI + (Py2Exe + InnoSetup)
 *might* meet all your needs. (As with any decision about what software
 technologies to use, you'll have to evaluate the suggested options to
 see if they fit your needs.)

 Note: I've used and like both Ruby and Python (saying this after using
 many, though not all, language features and libraries of both
 languages), and am not trying to discourage you from using Ruby for
 your needs; its just that, based on your needs as described, it looks
 to me as if Python meets them better than Ruby at present:

  1. GUI - Native Look and Feel.  According to wxRuby the bindings aren't
 mature enough for production use.  Does anyone have any experience
 with
 this and/or can you offer alternatives that provide a native look and
 feel (I

 I don't know enough about wxRuby to comment.

 wxPython has this (Native Look and Feel), I think (used it some, a
 while ago), not 100% sure, you can check on the site  - http:/
 www.wxpython.org
  - to make sure. The site does say that it is cross-platform:

 wxPython is a cross-platform toolkit. This means that the same
 program will run on multiple platforms without modification. Currently
 supported platforms are 32-bit Microsoft Windows, most Unix or unix-
 like systems, and Macintosh OS X.
 

 but that doesn't necessarily mean that it will have native look and
 feel on all supported platforms. (The two are not the same thing.)
 That's why you will need to check.

 wxPython pros: Its fairly easy to learn, at least for simple GUI apps
 (e.g. a few widgets / controls and a file dialog or two). I was able
 to build these simple ones - see the code, article and screenshots
 available here (or from links from here):

 http://www.packtpub.com/article/Using_xtopdf

 - in quite a short time, starting from zero knowledge of wxPython (I
 did know some Python from before), just by looking at the sample apps,
 and some reading of the docs.

 See the quotes about wxPython: http://www.wxpython.org/quotes.php

 2. Databases - contemplating using ActiveRecord, but I would like to use
 ODBC to support multiple types of DB's in a uniform way (if you know
 of
 alternatives to ODBC or ActiveRecord, please let me know).

 I think, but again, not sure, that Python DBI + appropriate database
 drivers, may meet this need. Basically Python DBI is similar to ODBC
 (roughly), and to Perl DBI + DBD, as I understand. There's also ODBC
 support in the Win32 extensions package for Python - IIRC, Google for
 'win32all' to get it. Its also available as a link from the Python for
 Win32 MSI installer on python.org.
 I've used Python ODBC some, it works and is easy to use.
 See this for a simple example:

 http://jugad.livejournal.com/2006/07/07/

 (See the second post at that page, titled Publishing ODBC database
 content as PDF
 . The code shown in the post is not indented as per proper the Python
 syntax (LiveJournal messed up the indentation), sorry about that, but
 its trivial to correct if you know Python indenting rules). Also read
 the Python ODBC docs and examples, of course.

 3. Binary - Are there any utilities for compiling Ruby into a binary
 executable?  The issue is twofold, speed, and not handing the
 customer
 the source :)

 For Python, there is py2exe (for Windows only). I used py2exe recently
 and it works well enough for the simple cases that I tried. (I tried
 building EXEs for a simple Python hello-world program, and for a
 simple wxPython GUI app based on my xtopdf toolkit. Both worked ok.)
 For cross-platform (Windows and Linux, IIRC), there is PyInstaller
 (Google for it), haven't tried it out yet, just downloaded it
 recently.

 I don't think you'll gain much speed by this compiling step, though
 (over and above what Python gives you itself, when it compiles
 your .py files 

Re: Technology solutions for Ruby?

2007-07-16 Thread vasudevram

[ Though the OP posted his message to comp.lang.ruby, I'm cross-
posting it to comp.lang.python, since he mentions Python as a possible
alternative he's looking at, and also because I've recommended Python
for his stated needs. Also, interested to see what other Pythonistas
have to say in response to my reply.
 - Vasudev]

 On Jul 16, 2007, at 2:21 AM, Michael Reiland wrote:

 At the heart of the issue is the fact that I refuse to use Java for this
project, I prefer not to use .Net because of the portability issues,
and
I'd like to get away from C++ for obvious reasons.

 To me this means Ruby, Python, or, as mentioned above, Perl.  If anyone
can tell me of a way to meet the above requirements in either Python
or
Perl, I'm all ears (I just prefer Ruby).

Yes, I think it would be really great for the Ruby community and for
the growth of the language if wxRuby was more mature as a GUI toolkit.
(Not knocking the wxRuby developers at all, its great that they've
even done what they have - I know that creating other language (like
Ruby) bindings to a C++ lib is a non-trivial task).

My suggestion: Python + wxPython + Python DBI + (Py2Exe + InnoSetup)
*might* meet all your needs. (As with any decision about what software
technologies to use, you'll have to evaluate the suggested options to
see if they fit your needs.)

Note: I've used and like both Ruby and Python (saying this after using
many, though not all, language features and libraries of both
languages), and am not trying to discourage you from using Ruby for
your needs; its just that, based on your needs as described, it looks
to me as if Python meets them better than Ruby at present:

 1. GUI - Native Look and Feel.  According to wxRuby the bindings aren't
mature enough for production use.  Does anyone have any experience
with
this and/or can you offer alternatives that provide a native look and
feel (I

I don't know enough about wxRuby to comment.

wxPython has this (Native Look and Feel), I think (used it some, a
while ago), not 100% sure, you can check on the site  - http:/
www.wxpython.org
 - to make sure. The site does say that it is cross-platform:

wxPython is a cross-platform toolkit. This means that the same
program will run on multiple platforms without modification. Currently
supported platforms are 32-bit Microsoft Windows, most Unix or unix-
like systems, and Macintosh OS X.


but that doesn't necessarily mean that it will have native look and
feel on all supported platforms. (The two are not the same thing.)
That's why you will need to check.

wxPython pros: Its fairly easy to learn, at least for simple GUI apps
(e.g. a few widgets / controls and a file dialog or two). I was able
to build these simple ones - see the code, article and screenshots
available here (or from links from here):

http://www.packtpub.com/article/Using_xtopdf

- in quite a short time, starting from zero knowledge of wxPython (I
did know some Python from before), just by looking at the sample apps,
and some reading of the docs.

See the quotes about wxPython: http://www.wxpython.org/quotes.php

2. Databases - contemplating using ActiveRecord, but I would like to use
ODBC to support multiple types of DB's in a uniform way (if you know
of
alternatives to ODBC or ActiveRecord, please let me know).

I think, but again, not sure, that Python DBI + appropriate database
drivers, may meet this need. Basically Python DBI is similar to ODBC
(roughly), and to Perl DBI + DBD, as I understand. There's also ODBC
support in the Win32 extensions package for Python - IIRC, Google for
'win32all' to get it. Its also available as a link from the Python for
Win32 MSI installer on python.org.
I've used Python ODBC some, it works and is easy to use.
See this for a simple example:

http://jugad.livejournal.com/2006/07/07/

(See the second post at that page, titled Publishing ODBC database
content as PDF
. The code shown in the post is not indented as per proper the Python
syntax (LiveJournal messed up the indentation), sorry about that, but
its trivial to correct if you know Python indenting rules). Also read
the Python ODBC docs and examples, of course.

3. Binary - Are there any utilities for compiling Ruby into a binary
executable?  The issue is twofold, speed, and not handing the
customer
the source :)

For Python, there is py2exe (for Windows only). I used py2exe recently
and it works well enough for the simple cases that I tried. (I tried
building EXEs for a simple Python hello-world program, and for a
simple wxPython GUI app based on my xtopdf toolkit. Both worked ok.)
For cross-platform (Windows and Linux, IIRC), there is PyInstaller
(Google for it), haven't tried it out yet, just downloaded it
recently.

I don't think you'll gain much speed by this compiling step, though
(over and above what Python gives you itself, when it compiles
your .py files to .pyc files). The purpose of py2exe is more to hide
the source code than to speed it up, as I understand (could be wrong).

Note: 

Re: Technology solutions for Ruby?

2007-07-16 Thread vasudevram
On Jul 16, 10:25 pm, vasudevram [EMAIL PROTECTED] wrote:
 [ Though the OP posted his message to comp.lang.ruby, I'm cross-
 posting it to comp.lang.python, since he mentions Python as a possible
 alternative he's looking at, and also because I've recommended Python
 for his stated needs. Also, interested to see what other Pythonistas
 have to say in response to my reply.
  - Vasudev]

  On Jul 16, 2007, at 2:21 AM, Michael Reiland wrote:
  At the heart of the issue is the fact that I refuse to use Java for this

 project, I prefer not to use .Net because of the portability issues,
 and
 I'd like to get away from C++ for obvious reasons.

  To me this means Ruby, Python, or, as mentioned above, Perl.  If anyone

 can tell me of a way to meet the above requirements in either Python
 or
 Perl, I'm all ears (I just prefer Ruby).

 Yes, I think it would be really great for the Ruby community and for
 the growth of the language if wxRuby was more mature as a GUI toolkit.
 (Not knocking the wxRuby developers at all, its great that they've
 even done what they have - I know that creating other language (like
 Ruby) bindings to a C++ lib is a non-trivial task).

 My suggestion: Python + wxPython + Python DBI + (Py2Exe + InnoSetup)
 *might* meet all your needs. (As with any decision about what software
 technologies to use, you'll have to evaluate the suggested options to
 see if they fit your needs.)

 Note: I've used and like both Ruby and Python (saying this after using
 many, though not all, language features and libraries of both
 languages), and am not trying to discourage you from using Ruby for
 your needs; its just that, based on your needs as described, it looks
 to me as if Python meets them better than Ruby at present:

  1. GUI - Native Look and Feel.  According to wxRuby the bindings aren't

 mature enough for production use.  Does anyone have any experience
 with
 this and/or can you offer alternatives that provide a native look and
 feel (I

 I don't know enough about wxRuby to comment.

 wxPython has this (Native Look and Feel), I think (used it some, a
 while ago), not 100% sure, you can check on the site  - http:/www.wxpython.org
  - to make sure. The site does say that it is cross-platform:

 wxPython is a cross-platform toolkit. This means that the same
 program will run on multiple platforms without modification. Currently
 supported platforms are 32-bit Microsoft Windows, most Unix or unix-
 like systems, and Macintosh OS X.
 

 but that doesn't necessarily mean that it will have native look and
 feel on all supported platforms. (The two are not the same thing.)
 That's why you will need to check.

 wxPython pros: Its fairly easy to learn, at least for simple GUI apps
 (e.g. a few widgets / controls and a file dialog or two). I was able
 to build these simple ones - see the code, article and screenshots
 available here (or from links from here):

 http://www.packtpub.com/article/Using_xtopdf

 - in quite a short time, starting from zero knowledge of wxPython (I
 did know some Python from before), just by looking at the sample apps,
 and some reading of the docs.

 See the quotes about wxPython:http://www.wxpython.org/quotes.php

 2. Databases - contemplating using ActiveRecord, but I would like to use

 ODBC to support multiple types of DB's in a uniform way (if you know
 of
 alternatives to ODBC or ActiveRecord, please let me know).

 I think, but again, not sure, that Python DBI + appropriate database
 drivers, may meet this need. Basically Python DBI is similar to ODBC
 (roughly), and to Perl DBI + DBD, as I understand. There's also ODBC
 support in the Win32 extensions package for Python - IIRC, Google for
 'win32all' to get it. Its also available as a link from the Python for
 Win32 MSI installer on python.org.
 I've used Python ODBC some, it works and is easy to use.
 See this for a simple example:

 http://jugad.livejournal.com/2006/07/07/

 (See the second post at that page, titled Publishing ODBC database
 content as PDF
 . The code shown in the post is not indented as per proper the Python
 syntax (LiveJournal messed up the indentation), sorry about that, but
 its trivial to correct if you know Python indenting rules). Also read
 the Python ODBC docs and examples, of course.

 3. Binary - Are there any utilities for compiling Ruby into a binary

 executable?  The issue is twofold, speed, and not handing the
 customer
 the source :)

 For Python, there is py2exe (for Windows only). I used py2exe recently
 and it works well enough for the simple cases that I tried. (I tried
 building EXEs for a simple Python hello-world program, and for a
 simple wxPython GUI app based on my xtopdf toolkit. Both worked ok.)
 For cross-platform (Windows and Linux, IIRC), there is PyInstaller
 (Google for it), haven't tried it out yet, just downloaded it
 recently.

 I don't think you'll gain much speed by this compiling step, though
 (over and above what Python gives you itself, when it compiles
 your 

Re: Technology solutions for Ruby?

2007-07-16 Thread kyosohma
On Jul 16, 1:46 pm, vasudevram [EMAIL PROTECTED] wrote:
 On Jul 16, 10:25 pm, vasudevram [EMAIL PROTECTED] wrote:



  [ Though the OP posted his message to comp.lang.ruby, I'm cross-
  posting it to comp.lang.python, since he mentions Python as a possible
  alternative he's looking at, and also because I've recommended Python
  for his stated needs. Also, interested to see what other Pythonistas
  have to say in response to my reply.
   - Vasudev]

   On Jul 16, 2007, at 2:21 AM, Michael Reiland wrote:
   At the heart of the issue is the fact that I refuse to use Java for this

  project, I prefer not to use .Net because of the portability issues,
  and
  I'd like to get away from C++ for obvious reasons.

   To me this means Ruby, Python, or, as mentioned above, Perl.  If anyone

  can tell me of a way to meet the above requirements in either Python
  or
  Perl, I'm all ears (I just prefer Ruby).

  Yes, I think it would be really great for the Ruby community and for
  the growth of the language if wxRuby was more mature as a GUI toolkit.
  (Not knocking the wxRuby developers at all, its great that they've
  even done what they have - I know that creating other language (like
  Ruby) bindings to a C++ lib is a non-trivial task).

  My suggestion: Python + wxPython + Python DBI + (Py2Exe + InnoSetup)
  *might* meet all your needs. (As with any decision about what software
  technologies to use, you'll have to evaluate the suggested options to
  see if they fit your needs.)

  Note: I've used and like both Ruby and Python (saying this after using
  many, though not all, language features and libraries of both
  languages), and am not trying to discourage you from using Ruby for
  your needs; its just that, based on your needs as described, it looks
  to me as if Python meets them better than Ruby at present:

   1. GUI - Native Look and Feel.  According to wxRuby the bindings aren't

  mature enough for production use.  Does anyone have any experience
  with
  this and/or can you offer alternatives that provide a native look and
  feel (I

  I don't know enough about wxRuby to comment.

  wxPython has this (Native Look and Feel), I think (used it some, a
  while ago), not 100% sure, you can check on the site  - 
  http:/www.wxpython.org
   - to make sure. The site does say that it is cross-platform:

  wxPython is a cross-platform toolkit. This means that the same
  program will run on multiple platforms without modification. Currently
  supported platforms are 32-bit Microsoft Windows, most Unix or unix-
  like systems, and Macintosh OS X.
  

  but that doesn't necessarily mean that it will have native look and
  feel on all supported platforms. (The two are not the same thing.)
  That's why you will need to check.

  wxPython pros: Its fairly easy to learn, at least for simple GUI apps
  (e.g. a few widgets / controls and a file dialog or two). I was able
  to build these simple ones - see the code, article and screenshots
  available here (or from links from here):

 http://www.packtpub.com/article/Using_xtopdf

  - in quite a short time, starting from zero knowledge of wxPython (I
  did know some Python from before), just by looking at the sample apps,
  and some reading of the docs.

  See the quotes about wxPython:http://www.wxpython.org/quotes.php

  2. Databases - contemplating using ActiveRecord, but I would like to use

  ODBC to support multiple types of DB's in a uniform way (if you know
  of
  alternatives to ODBC or ActiveRecord, please let me know).

  I think, but again, not sure, that Python DBI + appropriate database
  drivers, may meet this need. Basically Python DBI is similar to ODBC
  (roughly), and to Perl DBI + DBD, as I understand. There's also ODBC
  support in the Win32 extensions package for Python - IIRC, Google for
  'win32all' to get it. Its also available as a link from the Python for
  Win32 MSI installer on python.org.
  I've used Python ODBC some, it works and is easy to use.
  See this for a simple example:

 http://jugad.livejournal.com/2006/07/07/

  (See the second post at that page, titled Publishing ODBC database
  content as PDF
  . The code shown in the post is not indented as per proper the Python
  syntax (LiveJournal messed up the indentation), sorry about that, but
  its trivial to correct if you know Python indenting rules). Also read
  the Python ODBC docs and examples, of course.

  3. Binary - Are there any utilities for compiling Ruby into a binary

  executable?  The issue is twofold, speed, and not handing the
  customer
  the source :)

  For Python, there is py2exe (for Windows only). I used py2exe recently
  and it works well enough for the simple cases that I tried. (I tried
  building EXEs for a simple Python hello-world program, and for a
  simple wxPython GUI app based on my xtopdf toolkit. Both worked ok.)
  For cross-platform (Windows and Linux, IIRC), there is PyInstaller
  (Google for it), haven't tried it out yet, just downloaded it
  

Re: Technology solutions for Ruby?

2007-07-16 Thread Cameron Laird
In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] wrote:
.
.
.
wxPython uses the native widgets of the platform it is running on in
most (if not all) cases, so if you want the native look  feel, than
that is the way I would go. They have the best user's group I've seen
so far as well.

Mike


Now you have me curious--when you write of the best user's group
..., do you mean URL: http://www.python-forum.de/forum-19.html ?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Technology solutions for Ruby?

2007-07-16 Thread Bruno Desthuilliers
vasudevram a écrit :
(snip)
To me this means Ruby, Python, or, as mentioned above, Perl.  If anyone
 
 can tell me of a way to meet the above requirements in either Python
 or
 Perl, I'm all ears (I just prefer Ruby).

1. GUI - Native Look and Feel.  According to wxRuby the bindings aren't 
 mature enough for production use.  
(snip)
 wxPython has this (Native Look and Feel), I think

It does - just like wxRuby, since both are language-specific bindings to 
the C++ wxWidgets toolkit.

And FWIW, wxPython has been used on production for many years, so I 
think it qualifies as production ready !-)

(snip)
2. Databases - contemplating using ActiveRecord, but I would like to use 
 ODBC to support multiple types of DB's in a uniform way (if you know
 of
 alternatives to ODBC or ActiveRecord, please let me know).

In Python, you may want to have a look at SQLAlchemy, which offers lots 
of things from the db abstraction layer to the full-blown (and 
possibily somewhat ActiveRecord-like, cf the Elixir project) ORM.

(snip)
3. Binary - Are there any utilities for compiling Ruby into a binary 
 executable?  The issue is twofold, speed, and not handing the
 customer
 the source :)

OP
IIRC, Ruby is actually still an interpreted language. Python is much 
like Java wrt/ this issue : it's byte-compiled (the difference being 
that this step is automagically managed by the VM).

IOW, you won't gain any speed from the existing packaging systems(but 
then, if your project is mostly a GUI/DB tunnel, the two most critical 
parts are already somewhat optimized). And the level of protection 
gained from these packaging systems is very debatable at best (which, 
FWIW, is also the case with Java).
/OP

(snip)
 I first learned Python, have been using it for some time for various
 projects, and then learned Ruby, and have done some projects with Ruby
 too.
 
 I've been reading both the Ruby Cookbook and the Python Cookbook
 rather thoroughly in the last few weeks (and trying out and modifying
 many of the recipes), and what I've observed is that the two languages
 are roughly similar in features.

Yes.

(snip)
 For more advanced language features related to object-orientation,
 metaclasses / metaprogramming, both have some support,

s/some/great/g

Both Ruby and Python are known for this.

 but you might
 or might not be able to do in one, what you can do in the other.

I'd say that - wrt/ advanced programming tricks - *most* of what you 
can do with one can be done with the other - but usually in a *very* 
different way. While Ruby and Python have similar features and may look 
very similar at first sight, their respective object models are totally 
different.

OP
Basically, it's a matter of
- which language *you* prefer
- which one has the best libs for your app

It seems that, in your case, you prefer Ruby but Python may *or not* 
have the best/more mature toolkit. So the best thing to do would be to 
first try to write a quick 'proof of concept' program in the language 
you prefer. Then, if you're still in doubt, write the same program in 
Python.

My 2 cents (and friendly salutations to the Ruby community).
-- 
http://mail.python.org/mailman/listinfo/python-list