Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #71190 > unrolled thread

Python Internet Database

Started byjunnia@gmail.com
First post2014-05-09 13:45 -0700
Last post2014-05-20 03:08 +0100
Articles 6 — 5 participants

Back to article view | Back to comp.lang.python


Contents

  Python Internet Database junnia@gmail.com - 2014-05-09 13:45 -0700
    Re: Python Internet Database Chris Angelico <rosuav@gmail.com> - 2014-05-10 07:06 +1000
    Re: Python Internet Database Ian Kelly <ian.g.kelly@gmail.com> - 2014-05-09 15:07 -0600
    Re: Python Internet Database Terry Reedy <tjreedy@udel.edu> - 2014-05-09 17:15 -0400
    Re: Python Internet Database Ian Kelly <ian.g.kelly@gmail.com> - 2014-05-09 15:30 -0600
    Re: Python Internet Database Joshua Landau <joshua@landau.ws> - 2014-05-20 03:08 +0100

#71190 — Python Internet Database

Fromjunnia@gmail.com
Date2014-05-09 13:45 -0700
SubjectPython Internet Database
Message-ID<caf3590c-ddd5-4921-98e3-3a49a3109899@googlegroups.com>
I am writing a PhD thesis comparing computer languages, and Python and Ruby is among the languages I am working with. I am using the Rasch Model to measure latent traits and  like productivity, expressivity, referential transparency and efficiency. If a member of this list wants to read a short tutorial about the Rasch Model, here is the address: 

http://strues.org/languages

To keep with my work, I need an Internet Data Base from where a person writing a program in Python could fetch libraries, applications, compilers, etc. One of the things I need to measure is how complete and easy to use is such a data base. I will give a concrete example.

Suppose that a person is writing programs in sbcl, an implementation of Common Lisp. That person needs a compiler for Python. All he needs to do is add the following line to the REPL (Read Eval Print Loop) line:

(ql:quickload :cl-python)

 In a few seconds, Lisp will access a Internet Data Base and will download and install a Python compiler written in Common Lisp. This Python compiler will be completely integrated with Common Lisp, in the sense that one can mix Python and Common Lisp programs.  The Common Lisp compiler will pass the Pystone, etc. Suppose now that this same Common Lisp programmer needs to add a few routines written in Fortran. He can fetch a Fortran compiler written in Common Lisp as easily as he did with CL-Python: (ql:quick load :f2cl) will do the magic. If he needs to generate beautiful pdf, he can download cl-pdf. If he needs an efficient Internet server, he can use Hunchentoot. Everything can be fetched by the ql:quickload command.

Of course Common Lisp is not the only language with this kind of facility. Racket has its own database: PLaneT. Again, one can get many applications and libraries from PLantet repository. I wonder if Python has a similar repository. Suppose I want a Fortran to Python converter; then I would type: > sys f2py  If I want an emacs like editor, I would type > sys pyemacs, and so on. By the way, although emacs itself is largely written in elisp, there are many emacs clones that one can find in Lisp repositories; for instance, hemlock is the most famous of these clones. Racket has its own environment, that is drracket, that accept even images mixed to the text.

I made a list of 9 things that I would like to see in such a repository.  By the way, I heard that Ruby has an Internet repository too. If people from this list know about the Ruby repository, I would appreciate information on how to use it. In any case, information about the Python repository will be very useful.

People who are funding my thesis would like to check for the following applications. I mean, I will check whether the repository offers the applications and libraries listed below.

1 - Internet servers. In Lisp, one has hunchentoot. In Racket, one has the Racket Web Framework. Bigloo has hiphop.

2 - Jit compiler for using from a web server. I mean, one has a web server running under Apache in a hosting service like Hostgator, Daddy Host or another inexpensive service. I decide to run a few applications in Racket, but the application  requires number crunching. I install the Jit Racket in the hosting service, and call it from my dynamic generated page. My programs will run almost at the speed of optimised C.

3 - Music generation. I would like generation of musical scores and midi files.

4 - Text editor that mimics emacs. In Common Lisp, one has hemlock. I would like something in the lines of hemlock.

5 - CAD and electronic CAD. Something in the lines of PTC.

6 - The repository service is the other thing that I want to check. I mean, I want the address of the Python equivalent of quicklisp and PLaneT.

7 - Image generation. pdf generation. Something in the lines of cl-pdf and cl-png, fl-vector, etc. Of course, I need programs written in Python itself, not call to C libraries.

8 - Usable compilers for other languages. For example, a JIT compiler for Python itself written in Python. Compilers for Fortran, compilers for Common Lisp, for Javascript, etc. BTW, the compiler generator of Common Lisp has the same name as the Python language. In other words, the language in which the Common Lisp compiler is written is called Python too. Therefore, when I ask for a compiler generator in Python, many people send me a link to this Common Lisp Python compiler generator. What I want is a compiler generator in Python, the scripting language.

9 - Computer algebra. Something in the lines of Maxima will do.

I don't hope to find all these nine things in a single repository. Even if you tell me that there is nothing in Python similar to Maxima or to the Common Lisp Python compiler generator or even to hemlock, your information will be very useful. The list is tough, so that no language is able to offer all items. 

[toc] | [next] | [standalone]


#71193

FromChris Angelico <rosuav@gmail.com>
Date2014-05-10 07:06 +1000
Message-ID<mailman.9831.1399669604.18130.python-list@python.org>
In reply to#71190
On Sat, May 10, 2014 at 6:45 AM,  <junnia@gmail.com> wrote:
> To keep with my work, I need an Internet Data Base from where a person writing a program in Python could fetch libraries, applications, compilers, etc. One of the things I need to measure is how complete and easy to use is such a data base. I will give a concrete example.
>

I'm not entirely sure, but I think PyPI (the Python Package Index)
might be what you're looking for. It has all sorts of things that
aren't in the Python standard library (and, for various reasons, some
things which are).

> 1 - Internet servers. In Lisp, one has hunchentoot. In Racket, one has the Racket Web Framework. Bigloo has hiphop.
>

Python has some of this built in; not sure what you mean by "internet
servers", but you can easily write some of the more common services in
Python (eg web (HTTP), mail (SMTP), etc). I don't know of a way to
conveniently write a Python DNS server, for instance, short of working
with sockets manually, but most of what people commonly use is there.

> 2 - Jit compiler for using from a web server. I mean, one has a web server running under Apache in a hosting service like Hostgator, Daddy Host or another inexpensive service. I decide to run a few applications in Racket, but the application  requires number crunching. I install the Jit Racket in the hosting service, and call it from my dynamic generated page. My programs will run almost at the speed of optimised C.
>

For number crunching, you can use the numpy library, which is highly
efficient. For general JIT compilation of actual Python code, PyPy
will do that. AFAIK there's no standard module for that, though.

> 3 - Music generation. I would like generation of musical scores and midi files.

I'm not aware of anything in particular, but a GNU LilyPond input file
is simple text, so I'd just write a program that produces a .ly file
and then run it through LilyPond to generate both score and MIDI. But
if you don't need printable score, the MIDI file itself is pretty
simple; there may be a module that will help, but even without, it's
pretty straight-forward in any language.

I don't know about your other requests, but check out PyPI and see
what you can find - and do also check the standard library, if you
haven't already. Each new version adds even more cool stuff; we've
recently gained a dedicated statistics module, for instance, and a new
asynchronous I/O structure.

ChrisA

[toc] | [prev] | [next] | [standalone]


#71194

FromIan Kelly <ian.g.kelly@gmail.com>
Date2014-05-09 15:07 -0600
Message-ID<mailman.9832.1399669687.18130.python-list@python.org>
In reply to#71190
On Fri, May 9, 2014 at 2:45 PM,  <junnia@gmail.com> wrote:
> I am writing a PhD thesis comparing computer languages, and Python and Ruby is among the languages I am working with. I am using the Rasch Model to measure latent traits and  like productivity, expressivity, referential transparency and efficiency. If a member of this list wants to read a short tutorial about the Rasch Model, here is the address:
>
> http://strues.org/languages
>
> To keep with my work, I need an Internet Data Base from where a person writing a program in Python could fetch libraries, applications, compilers, etc. One of the things I need to measure is how complete and easy to use is such a data base. I will give a concrete example.

It sounds to me like you're looking for PyPI:
https://pypi.python.org/pypi

The official way to install packages from PyPI is using the pip
package manager, e.g.:
> pip install numpy

pip is included with sufficiently recent Python releases, or can be
installed separately.

[toc] | [prev] | [next] | [standalone]


#71195

FromTerry Reedy <tjreedy@udel.edu>
Date2014-05-09 17:15 -0400
Message-ID<mailman.9833.1399670173.18130.python-list@python.org>
In reply to#71190
On 5/9/2014 4:45 PM, junnia@gmail.com wrote:
> I am writing a PhD thesis comparing computer languages, and Python
> and Ruby is among the languages I am working with. I am using the
> Rasch Model to measure latent traits and  like productivity,
> expressivity, referential transparency and efficiency. If a member of
> this list wants to read a short tutorial about the Rasch Model, here
> is the address:
>
> http://strues.org/languages
>
> To keep with my work, I need an Internet Data Base from where a
> person writing a program in Python could fetch libraries,
> applications, compilers, etc. One of the things I need to measure is
> how complete and easy to use is such a data base. I will give a
> concrete example.

https://pypi.python.org/pypi

> Suppose that a person is writing programs in sbcl, an implementation
> of Common Lisp. That person needs a compiler for Python. All he needs
> to do is add the following line to the REPL (Read Eval Print Loop)
> line:
>
> (ql:quickload :cl-python)
>
> In a few seconds, Lisp will access a Internet Data Base and will
> download and install a Python compiler written in Common Lisp. This
> Python compiler will be completely integrated with Common Lisp, in
> the sense that one can mix Python and Common Lisp programs.  The
> Common Lisp compiler will pass the Pystone, etc. Suppose now that
> this same Common Lisp programmer needs to add a few routines written
> in Fortran. He can fetch a Fortran compiler written in Common Lisp as
> easily as he did with CL-Python: (ql:quick load :f2cl) will do the
> magic. If he needs to generate beautiful pdf, he can download cl-pdf.
> If he needs an efficient Internet server, he can use Hunchentoot.
> Everything can be fetched by the ql:quickload command.
>
> Of course Common Lisp is not the only language with this kind of
> facility. Racket has its own database: PLaneT. Again, one can get
> many applications and libraries from PLantet repository. I wonder if
> Python has a similar repository. Suppose I want a Fortran to Python
> converter; then I would type: > sys f2py  If I want an emacs like
> editor, I would type > sys pyemacs, and so on. By the way, although
> emacs itself is largely written in elisp, there are many emacs clones
> that one can find in Lisp repositories; for instance, hemlock is the
> most famous of these clones. Racket has its own environment, that is
> drracket, that accept even images mixed to the text.
>
> I made a list of 9 things that I would like to see in such a
> repository.  By the way, I heard that Ruby has an Internet repository
> too. If people from this list know about the Ruby repository, I would
> appreciate information on how to use it. In any case, information
> about the Python repository will be very useful.
>
> People who are funding my thesis would like to check for the
> following applications. I mean, I will check whether the repository
> offers the applications and libraries listed below.
>
> 1 - Internet servers. In Lisp, one has hunchentoot. In Racket, one
> has the Racket Web Framework. Bigloo has hiphop.

multiple available.

> 2 - Jit compiler

pypy is an implementation of python in python, with jit compiler.

 > for using from a web server.

This is really specialized. It seems that your requirements list is 
based on, and therefore biased toward, what is available for 
lisp/racket.  Webservers are typically not computation bound, so jit 
compiler is not too relevant.

However, you can run Python-coded webservers on pypy if you want to and 
see a benefit. However, pypu really shines on integer math.

 > I mean, one has a web server running under Apache

There is a mod-python for running Python on Apache.

> in a hosting service like Hostgator,
> Daddy Host or another inexpensive service. I decide to run a few
> applications in Racket, but the application  requires number
> crunching. I install the Jit Racket in the hosting service, and call
> it from my dynamic generated page. My programs will run almost at the
> speed of optimised C.

> 3 - Music generation. I would like generation of musical scores and
> midi files.

Search pypi.

> 4 - Text editor that mimics emacs. In Common Lisp, one has hemlock. I
> would like something in the lines of hemlock.

Python people who want emacs use emacs with Python extension, not a mimic.

> 5 - CAD and electronic CAD. Something in the lines of PTC.
>
> 6 - The repository service is the other thing that I want to check. I
> mean, I want the address of the Python equivalent of quicklisp and
> PLaneT.

see above

> 7 - Image generation. pdf generation. Something in the lines of
> cl-pdf and cl-png, fl-vector, etc. Of course, I need programs written
> in Python itself, not call to C libraries.

This is a stupid requirement. CPython, written in Python, is designed to 
make interfacing to C libraries easy. It also interfaces to Fortran (see 
numpy), and interactively calling Fortran functions was perhaps the 
first killer application of Python in the mid 1959s.

> 8 - Usable compilers for other languages. For example, a JIT compiler
> for Python itself written in Python.

See pypy.

 > Compilers for Fortran, compilers
> for Common Lisp, for Javascript, etc. BTW, the compiler generator of
> Common Lisp has the same name as the Python language. In other words,
> the language in which the Common Lisp compiler is written is called
> Python too. Therefore, when I ask for a compiler generator in Python,
> many people send me a link to this Common Lisp Python compiler
> generator. What I want is a compiler generator in Python, the
> scripting language.
>
> 9 - Computer algebra. Something in the lines of Maxima will do.
>
> I don't hope to find all these nine things in a single repository.

Well, there is lots of Python projects on SourceForge, Bitbucket, 
Github, ... .  Why expect all in one place?

> Even if you tell me that there is nothing in Python similar to Maxima
> or to the Common Lisp Python compiler generator or even to hemlock,
> your information will be very useful. The list is tough, so that no
> language is able to offer all items.


-- 
Terry Jan Reedy

[toc] | [prev] | [next] | [standalone]


#71196

FromIan Kelly <ian.g.kelly@gmail.com>
Date2014-05-09 15:30 -0600
Message-ID<mailman.9834.1399671106.18130.python-list@python.org>
In reply to#71190
On Fri, May 9, 2014 at 2:45 PM,  <junnia@gmail.com> wrote:
> 1 - Internet servers. In Lisp, one has hunchentoot. In Racket, one has the Racket Web Framework. Bigloo has hiphop.

twisted, tornado, Django, pylons, turbogears, bottle, flask among many others.

> 2 - Jit compiler for using from a web server. I mean, one has a web server running under Apache in a hosting service like Hostgator, Daddy Host or another inexpensive service. I decide to run a few applications in Racket, but the application  requires number crunching. I install the Jit Racket in the hosting service, and call it from my dynamic generated page. My programs will run almost at the speed of optimised C.

PyPy is an alternate implementation of Python written in Python with
JIT compilation.  It is compatible with various web frameworks.
You'll find it at pypy.org.

> 4 - Text editor that mimics emacs. In Common Lisp, one has hemlock. I would like something in the lines of hemlock.

Why not just use emacs?  It has a python mode.

> 7 - Image generation. pdf generation. Something in the lines of cl-pdf and cl-png, fl-vector, etc. Of course, I need programs written in Python itself, not call to C libraries.

The pillow library (successor to the defunct Python Imaging Library)
is probably the best known.  It's not a C library, but it is an
extension library, meaning it is a Python library written in C.

> 9 - Computer algebra. Something in the lines of Maxima will do.

Try SymPy.

[toc] | [prev] | [next] | [standalone]


#71786

FromJoshua Landau <joshua@landau.ws>
Date2014-05-20 03:08 +0100
Message-ID<mailman.10149.1400551745.18130.python-list@python.org>
In reply to#71190
On 9 May 2014 22:06, Chris Angelico <rosuav@gmail.com> wrote:
> On Sat, May 10, 2014 at 6:45 AM,  <junnia@gmail.com> wrote:
>> 2 - Jit compiler for using from a web server. I mean, one has a web server running under Apache in a hosting service like Hostgator, Daddy Host or another inexpensive service. I decide to run a few applications in Racket, but the application  requires number crunching. I install the Jit Racket in the hosting service, and call it from my dynamic generated page. My programs will run almost at the speed of optimised C.
>>
>
> For number crunching, you can use the numpy library, which is highly
> efficient. For general JIT compilation of actual Python code, PyPy
> will do that. AFAIK there's no standard module for that, though.

There's also Numba for JIT compilation of Numpy code inside CPython.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web