Python vs Scheme

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Python vs Scheme

Developers mailing list
this email is deliberately a little provocative. If I have not seen wrong
in the source archive there are 51 .scm scripts and 11 .py Scheme scripts
has a complex syntax and I do not know how much it is used today. What are
the advantages of Scheme compared to Python? Would it make sense to rewrite
plugins that still use Scheme in Python and remove the Scheme language?
_______________________________________________
gimp-developer-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

Re: Python vs Scheme

Simon Budig
Hi Massimo.

Massimo Fidanza via gimp-developer-list ([hidden email]) wrote:
> in the source archive there are 51 .scm scripts and 11 .py Scheme scripts
> has a complex syntax and I do not know how much it is used today. What are
> the advantages of Scheme compared to Python? Would it make sense to rewrite
> plugins that still use Scheme in Python and remove the Scheme language?

The main advantage of scheme is, that we can easily ship the interpreter
within gimp. With python we'll always depend on an external python
installation.

Yeah, scheme sometimes can be a bit optuse, but in my eyes having an
interpreter within the gimp distribution is a strong point to consider.

Bye,
        Simon

--
              [hidden email]              http://simon.budig.de/
_______________________________________________
gimp-developer-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

Re: Python vs Scheme

Developers mailing list
Hi Simon,
the better way - in my opinion - should be the best technical solution
(let's call it Scheme) BUT with the best user experience (let's call it
'script builder'?).
A normal user cannot start and study Scheme (or Python) in order to have a
script... should need a script builder/recorder.

Thanks,
Maurizio

Il giorno mer 22 lug 2020 alle ore 16:37 Simon Budig <[hidden email]> ha
scritto:

> Hi Massimo.
>
> Massimo Fidanza via gimp-developer-list ([hidden email])
> wrote:
> > in the source archive there are 51 .scm scripts and 11 .py Scheme scripts
> > has a complex syntax and I do not know how much it is used today. What
> are
> > the advantages of Scheme compared to Python? Would it make sense to
> rewrite
> > plugins that still use Scheme in Python and remove the Scheme language?
>
> The main advantage of scheme is, that we can easily ship the interpreter
> within gimp. With python we'll always depend on an external python
> installation.
>
> Yeah, scheme sometimes can be a bit optuse, but in my eyes having an
> interpreter within the gimp distribution is a strong point to consider.
>
> Bye,
>         Simon
>
> --
>               [hidden email]              http://simon.budig.de/
> _______________________________________________
> gimp-developer-list mailing list
> List address:    [hidden email]
> List membership:
> https://mail.gnome.org/mailman/listinfo/gimp-developer-list
> List archives:   https://mail.gnome.org/archives/gimp-developer-list
>
_______________________________________________
gimp-developer-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

Re: Python vs Scheme

Shlomi Fish
In reply to this post by Developers mailing list
Hi,

On Wed, 22 Jul 2020 15:32:43 +0200
Massimo Fidanza via gimp-developer-list <[hidden email]> wrote:

> this email is deliberately a little provocative. If I have not seen wrong
> in the source archive there are 51 .scm scripts and 11 .py Scheme scripts
> has a complex syntax and I do not know how much it is used today. What are
> the advantages of Scheme compared to Python? Would it make sense to rewrite
> plugins that still use Scheme in Python and remove the Scheme language?

In addition note that one can write code in any language which has or can have
access to the GIMP PDB ( see https://wiki.gimp.org/wiki/Hacking:Plugins_v3 )
and they will all be able to call each others' procedures. In addition to
Scheme and Python, there are C plugins and there was gimp-perl in the past as
well, and there can be others.

For some of the advantages of Lisp-like languages, see:

* https://www.youtube.com/watch?v=4NO83wZVT0A

* http://www.paulgraham.com/onlisp.html

As you may be aware, both Scheme and Python are turing-complete (
https://en.wikipedia.org/wiki/Turing_completeness ).

> _______________________________________________
> gimp-developer-list mailing list
> List address:    [hidden email]
> List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
> List archives:   https://mail.gnome.org/archives/gimp-developer-list



--

Shlomi Fish       https://www.shlomifish.org/
https://www.shlomifish.org/open-source/projects/fortune-mod/

“Talk Like a Pirate Day” is the only day of the year when Chuck Norris only
talks like a pirate, and does not actually act like one.
    — https://www.shlomifish.org/humour/bits/facts/Chuck-Norris/

Please reply to list if it's a mailing list post - https://shlom.in/reply .
_______________________________________________
gimp-developer-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

Re: Python vs Scheme

Liam R E Quin
In reply to this post by Developers mailing list
On Wed, 2020-07-22 at 15:32 +0200, Massimo Fidanza via gimp-developer-
list wrote:
> What are
> the advantages of Scheme compared to Python?

Or, since JavaScript is massively more wiel yused than Python, why not
abandond Python now that JavaScript is supported?

Because it's about choice.

As Simon wrote, there's a core interpreter that's built in; Scheme is
probably still widely taught in computer science courses & it's fast to
parse. So GIMP can ship with scripts and know they will work.

Then there's a set of optional interpreters, often contributed from
outside, and that can be distributed separately from GIMP, for example
to split off dependency issues. I don't need Python 2 (or 3) installed
to have GIMP.

As to the languages, Scheme is a very small language, and not
especially difficult, although the functional aspect can be hard for
people from a procedural scripting background. The Little Schemer book
(MIT Press probably) is old but a good intro and it's thin.

As Maurizio wrote, a script recorder would make life a lot easier;
right now the necessary infrastructure isn't really in place, but it's
on its way. GIMP does not use the traditional MVC command-chain pattern
internally today, and e.g. stores the bitmap result of operations in
the undo history, not the actions needed to recreate the effect.

ankh

--
Liam Quin - web slave for https://www.fromoldbooks.org/
with fabulous vintage art and fascinating texts to read.

In full-time voluntary servitude.

_______________________________________________
gimp-developer-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

Re: Python vs Scheme

Kevin Cozens-2
In reply to this post by Shlomi Fish
On 2020-07-22 11:09 a.m., Shlomi Fish wrote:
> In addition to Scheme and Python, there are C plugins and there was
> gimp-perl in the past as well, and there can be others.

In addition to C plug-ins the list is: Scheme, Python, Perl, and Ruby. The
Ruby binding might be out-of-date and I also don't know how current is the
Perl binding.

--
Cheers!

Kevin.

http://www.ve3syb.ca/               | "Nerds make the shiny things that
https://www.patreon.com/KevinCozens | distract the mouth-breathers, and
                                     | that's why we're powerful"
Owner of Elecraft K2 #2172          |
#include <disclaimer/favourite>     |             --Chris Hardwick
_______________________________________________
gimp-developer-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

Re: Python vs Scheme

Developers mailing list
While waiting for your answer, I delved into the topic and found several
scripts created in Scheme, I also noticed that Gimp uses its interpreter
derived from TinyScheme, whose development is not very active, while the
cousins of the Gnome project use Guile , which in the last release has
benefited from many optimizations
https://www.gnu.org/software/guile/news/gnu-guile-300-released.html I
looked around a bit and saw that already with the release of Guile 2.0,
developers had been offered support to replace the TinyScheme interpreter
with Guile
https://www.gimpusers.com/forums/gimp-developer/13578-gimp-and-guile-2-0
why then this was not happen?

Il giorno mer 22 lug 2020 alle ore 18:59 Kevin Cozens <[hidden email]> ha
scritto:

> On 2020-07-22 11:09 a.m., Shlomi Fish wrote:
> > In addition to Scheme and Python, there are C plugins and there was
> > gimp-perl in the past as well, and there can be others.
>
> In addition to C plug-ins the list is: Scheme, Python, Perl, and Ruby. The
> Ruby binding might be out-of-date and I also don't know how current is the
> Perl binding.
>
> --
> Cheers!
>
> Kevin.
>
> http://www.ve3syb.ca/               | "Nerds make the shiny things that
> https://www.patreon.com/KevinCozens | distract the mouth-breathers, and
>                                      | that's why we're powerful"
> Owner of Elecraft K2 #2172          |
> #include <disclaimer/favourite>     |             --Chris Hardwick
> _______________________________________________
> gimp-developer-list mailing list
> List address:    [hidden email]
> List membership:
> https://mail.gnome.org/mailman/listinfo/gimp-developer-list
> List archives:   https://mail.gnome.org/archives/gimp-developer-list
>
_______________________________________________
gimp-developer-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

Re: Python vs Scheme

Michael Schumacher


On 7/22/20 8:30 PM, Massimo Fidanza via gimp-developer-list wrote:


> I looked around a bit and saw that already with the release of Guile 2.0,
> developers had been offered support to replace the TinyScheme interpreter
> with Guile
> https://www.gimpusers.com/forums/gimp-developer/13578-gimp-and-guile-2-0
> why then this was not happen?

It seems like Julian never followed up on Marco's suggestion to get this
into Git.


--
Regards,
Michael
GPG: 96A8 B38A 728A 577D 724D 60E5 F855 53EC B36D 4CDD
_______________________________________________
gimp-developer-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list