Re: [SailfishDevel] python development

2013-12-23 Thread Thomas Perl
2013/12/19 David Jensen :
> Nokia's original book on Meego featured, I think, Python as the development. I
> do not see this book on Amazon. However, almost none of the articles I have
> seen  relating to Jolla mention Python. I assumed Nokia believed Python was an
> ideal language for an open system that was easily modifiable by others.  I get
> the impression the language is C++. This is more difficult than Java and
> possibly also Objective C. How does Jolla expect their system to be adapted as
> open if the language developers have to deal with is C++, with Python a vague
> afterthought?

Python 3 and a QML Plugin that can be used to call Python code from
QML will be available soon in the repositories, we're testing
integration and making sure everything works and the API is stable. We
use Python 3 instead of Python 2, because Python 2 is going away
soon[1].

With that said, the language for native Sailfish user interfaces is
QML, which has a built-in JavaScript engine, and support for
JavaScript expressions and blocks. You can do "native" development
with QML and JavaScript alone, or go with the C++/QML/JS or
QML/JS/Python combo. There's nothing stopping you from linking against
any other dynamic language, you just have to write the binding / data
passing between QML (the UI layer) and your favorite language manually
(in C/C++).

HTH :)
Thomas

[1] http://www.python.org/dev/peps/pep-0404/
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] python development

2013-12-21 Thread Maciej Jaros

David Jensen (2013-12-19 21:46):

Nokia's original book on Meego featured, I think, Python as the development. I
do not see this book on Amazon. However, almost none of the articles I have
seen  relating to Jolla mention Python. I assumed Nokia believed Python was an
ideal language for an open system that was easily modifiable by others.  I get
the impression the language is C++. This is more difficult than Java and
possibly also Objective C. How does Jolla expect their system to be adapted as
open if the language developers have to deal with is C++, with Python a vague
afterthought?


I would say nothing is harder then Objective C ;-), but to not start a 
rant - I don't think you will find a developer that never used C++ (or 
at least not after any technical university I know). Also note that most 
of the languages are based on C++ (including Java), so the syntax 
shouldn't be too shocking ;-). Python on the other hand is more similar 
to Pascal which is less popular. I won't talk about Objective C, because 
I don't know any similar language ;-). Probably due to the fact that 
Apple was creating it in the same time as C++ was developed...


Having said that. You can install python on Jolla/Sailfish using pckon 
:

pkcon install python

Regards,
Nux.

___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] python development

2013-12-19 Thread christopher . lamb

Hi Sven

I have just done some digging into the history of Java and Qt, and was  
surprised to find that Qt is longer in the tooth than I had thought.


Interestingly both Qt and Java emerged at roughly the same time.

Trolltech [1] starting to write Qt in 1991. The earliest date I can  
find for a release [2] is 1998 for 1.4.0


Java [3] development also started in 1991, and was first released in 1995.

Thus at the start of Qt development, Java was either not available at  
all, or at best just a promise of things to come, and very far from  
the obvious choice that it might seem today.


Chris


[1] http://en.wikipedia.org/wiki/Trolltech

[2] http://no.wikipedia.org/wiki/Qt

[3] http://en.wikipedia.org/wiki/Java_(programming_language)


Zitat von "Sven Putze" :

The interesting question is, why did the original creators of Qt  
opt for C++, rather than the more obvious Java? I suspect that the  
answer is in the multi-platform ethos of Qt. Quite simply there is  
an open source C++ compiler available for almost any architecture  
you can think off, which is not the case for Java, especially in  
the mobile arena.


Hi,

there was no Java available at the time when Qt was created. And  
when Java came out, the desktop computers were much slower/smaller,  
so keep on using C++ to create fast native code was a natural  
choice. Quite the same situation with those small tiny computers we  
use to put in our pockets today. There is still a need for fast  
native code if you think in terms like performance or power usage  
(=battery life).

But hey, I am no preacher of the church of C++.
If people want to use Python, they should. They "only" must put  
everything needed inside their app.


BR.
Sven
___
SailfishOS.org Devel mailing list





___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] python development

2013-12-19 Thread Sven Putze
> The interesting question is, why did the original creators of Qt opt for C++, 
> rather than the more obvious Java? I suspect that the answer is in the 
> multi-platform ethos of Qt. Quite simply there is an open source C++ compiler 
> available for almost any architecture you can think off, which is not the 
> case for Java, especially in the mobile arena.

Hi,

there was no Java available at the time when Qt was created. And when Java came 
out, the desktop computers were much slower/smaller, so keep on using C++ to 
create fast native code was a natural choice. Quite the same situation with 
those small tiny computers we use to put in our pockets today. There is still a 
need for fast native code if you think in terms like performance or power usage 
(=battery life).
But hey, I am no preacher of the church of C++.
If people want to use Python, they should. They "only" must put everything 
needed inside their app.

BR.
Sven
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] python development

2013-12-19 Thread christopher . lamb

Hi David

You are pointing your finger at the wrong place. The blame (if any),  
belongs to Qt and not Jolla.


Jolla made the sensible decision not to reinvent the wheel. Instead  
they chose to leverage Qt, which is a strong contender as the de-facto  
multi-platform development toolkit, and one which is gaining  
increasing traction as the number of mobile platforms it supports grows.


Qt is programmed with a cocktail of C++, descriptive QML and Javascript.

Typically QML is used for the GUI stuff, Javascript for simple logic,  
and C++ from backend "heavy-lifting".


Depending on the nature of your project, and your preferences and  
experience you will have a different mix of these 3 languages /  
idioms. It is quite possible to create a Qt project with no more C++  
required than that generated in the default project. (I only use C++  
when I really can find no better way, while others will opt for a C++  
driven project).


Python is an alternative with bindings to Qt. If you search the  
archives of this mailing list you will find many questions on Python  
and Qt / Sailfish. So it is there, and it is being used, and there are  
ardent fans of Qt + Python out there.


The interesting question is, why did the original creators of Qt opt  
for C++, rather than the more obvious Java? I suspect that the answer  
is in the multi-platform ethos of Qt. Quite simply there is an open  
source C++ compiler available for almost any architecture you can  
think off, which is not the case for Java, especially in the mobile  
arena.


You should not find QML hard to learn, and if you have Java /  
Objective C experience, then I don't see why a limited amount of C++  
should put you off.



Chris


Zitat von "David Jensen" :

Nokia's original book on Meego featured, I think, Python as the  
development. I

do not see this book on Amazon. However, almost none of the articles I have
seen  relating to Jolla mention Python. I assumed Nokia believed  
Python was an
ideal language for an open system that was easily modifiable by  
others.  I get

the impression the language is C++. This is more difficult than Java and
possibly also Objective C. How does Jolla expect their system to be  
adapted as

open if the language developers have to deal with is C++, with Python a vague
afterthought?


David Jensen

___
SailfishOS.org Devel mailing list





___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] python development

2013-12-19 Thread Filip Kłębczyk

W dniu 19.12.2013 21:46, David Jensen pisze:

Nokia's original book on Meego featured, I think, Python as the development. I
do not see this book on Amazon. However, almost none of the articles I have
seen  relating to Jolla mention Python. I assumed Nokia believed Python was an
ideal language for an open system that was easily modifiable by others.  I get
the impression the language is C++. This is more difficult than Java and
possibly also Objective C. How does Jolla expect their system to be adapted as
open if the language developers have to deal with is C++, with Python a vague
afterthought?


You can already do Qt/QML + Python apps for Sailfish - check pyotherside 
(examples included) -> https://github.com/nemomobile-packages/pyotherside


Support in Harbour for PyOtherside apps is also coming soon(TM). In 
other words nothing prevents you to do Python apps for Sailfish OS.


Regards,
Filip

___
SailfishOS.org Devel mailing list


[SailfishDevel] python development

2013-12-19 Thread David Jensen
Nokia's original book on Meego featured, I think, Python as the development. I
do not see this book on Amazon. However, almost none of the articles I have
seen  relating to Jolla mention Python. I assumed Nokia believed Python was an
ideal language for an open system that was easily modifiable by others.  I get
the impression the language is C++. This is more difficult than Java and
possibly also Objective C. How does Jolla expect their system to be adapted as
open if the language developers have to deal with is C++, with Python a vague
afterthought?  


David Jensen

___
SailfishOS.org Devel mailing list