Re: Removing C++ SDK examples, clearly encouraging Python extensions (was: LibreOffice prints on tuesdays)

2013-04-12 Thread Olivier R.
Hi *,


Bjoern Michaelsen wrote
 There is no dominant IDE (much less so a crossplatform one) and there
 seems to
 be a lot flux on which IDE is the en vouge one each year. Thus aiming to
 have
 simple, stable and robust build environment that is generic and
 independant is
 key -- whatever is the IDE du jour should be able to integrate that
 easily.

Adding examples of extensions in Python is a really good idea, as those who
like this language have almost nothing to learn how to begin with LO. There
is examples on forums, wikis or websites, but it’s sometimes obsolete or
confusing.

But, what is missing the most for programming LO with Python is good error
reports. You already have this on Linux, but on Windows, there is nothing
like this. By default, we are blind.

There is no error report if Python crash while running.
There is no error report if there is a syntax error (except when installing
extension, but not if you modify the code directly in extension folder).
There is no stdout for the command “print”.

Debugging on Windows is painful.

It’s possible to do some workaround with:

if sys.platform.startswith('win'):
import codecs
sys.stdout = codecs.open(stdout.txt, w, utf-8)

and with:

print(s)
sys.stdout.flush()

Better than nothing, but LO/Python programming on Windows is still
difficult.

So, if we could simply have a window where LO/Python reports all encountered
errors and where to display what we want with “print”, that would be a
tremendous improvement.

Regards,
Olivier





--
View this message in context: 
http://nabble.documentfoundation.org/LibreOffice-prints-on-tuesdays-tp4047259p4049515.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Removing C++ SDK examples, clearly encouraging Python extensions (was: LibreOffice prints on tuesdays)

2013-04-03 Thread Thorsten Behrens
Bjoern Michaelsen wrote:
 As for IDEs: Actually I dont think that many Python stuff is done in
 a IDE -- most is simply written in an editor.

I think you are wrong, at least when we're talking about the classic
3rd party mostly-closed-classic-development-shop.

It seems to be a real market -
  http://wiki.python.org/moin/IntegratedDevelopmentEnvironments

 Instead of caring about a zoo of IDEs or enterprisy deployment
 tools, what is needed is:
 a/ well maintained examples
 b/ some tutorials and youtube vidoes showing how simple it is

False dichotomy - you'd want to appeal both to the casual hacker that
wants the quick solution, _and_ the enterprise...

My 2 cents,

-- Thorsten


signature.asc
Description: Digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Removing C++ SDK examples, clearly encouraging Python extensions (was: LibreOffice prints on tuesdays)

2013-04-03 Thread Thorsten Behrens
Bjoern Michaelsen wrote:
 Also -- and this is a proposal for the ESC to discuss: I would like
 to remove the C++ examples there.

 I tried hard to make them work and just couldnt get them to build
 (trying it on Windows, just to make things more interesting).

I don't think this is quite the message I want to convey to the
ecosystem. While I'm with you that c++ extensions are the least
desirable option *iff* you're free to chose your language,
gratuitously cutting it off (or giving that impression) creates more
pain than it solves IMO. As much as LibO core is nailed to c++
eternally, so are other people's backends.

Cheers,

-- Thorsten


signature.asc
Description: Digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Removing C++ SDK examples, clearly encouraging Python extensions (was: LibreOffice prints on tuesdays)

2013-04-03 Thread Bjoern Michaelsen
Hi,

On Wed, Apr 03, 2013 at 10:56:46AM +0200, Thorsten Behrens wrote:
 I don't think this is quite the message I want to convey to the
 ecosystem. 

Then someone needs to fix the examples. As that did not happen dispite it
being a well-known issue, it makes little sense to wait for a miracle any
longer. As is, the C++ stuff is not helping. Quite the opposite. If nobody
steps up for that, it better to kill that then leaving this booby trap
lingering around. Not doing so is even more distructive.

 As much as LibO core is nailed to c++
 eternally, so are other people's backends.

As much as it it is perverted, I would prefer people to bind their backend to
Python and Python to LibreOffice than trying their luck with C++ and failing
miserably on that, just because UNO should be able to do that. The first
gives a ugly but working solution, while the second never enters the ecosystem.

 http://en.wikipedia.org/wiki/Worse_is_better

is a powerful concept -- and in this case it means: let people get something
working out in Python, for possible migration to C++ later.

For all realistic scenarios UNO does _not_ deliver in the mentioned scenarios:
It is not usable by the target market -- and that is all that matters. FWIW I
have some relatives working on industry solutions -- they also integrate with
Office products. If someone working in such projects gets one day to get some
basic setup running for working on LibreOffice integrations, he is lucky (more
likely are 2-3 hours). Currently only the Python stuff allows you to get
results in that timeframe. The C++ stuff is scaring away contributors that
would have settled for something working (like the Python stuff).

And just because we dont advertise C++ SDK usage on the webpages anymore,
doesnt mean that we wouldnt support someone trying to do that (hey, that guy
might even provide working examples than).

Consider this: _Iff_ there would be a huge interest in doing enterprisy C++
integration for LibreOffice, there are two possible outcomes: We would either
be swamped with bug reports and outrage on the documentation or people silently
give up. We are clearly not seeing the first.

Best,

Bjoern

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Removing C++ SDK examples, clearly encouraging Python extensions (was: LibreOffice prints on tuesdays)

2013-04-03 Thread Bjoern Michaelsen
Hi,

On Wed, Apr 03, 2013 at 10:50:46AM +0200, Thorsten Behrens wrote:
 Bjoern Michaelsen wrote:
  As for IDEs: Actually I dont think that many Python stuff is done in
  a IDE -- most is simply written in an editor.
 
 I think you are wrong, at least when we're talking about the classic
 3rd party mostly-closed-classic-development-shop.
 
 It seems to be a real market -
   http://wiki.python.org/moin/IntegratedDevelopmentEnvironments

There is no dominant IDE (much less so a crossplatform one) and there seems to
be a lot flux on which IDE is the en vouge one each year. Thus aiming to have
simple, stable and robust build environment that is generic and independant is
key -- whatever is the IDE du jour should be able to integrate that easily.
 
  Instead of caring about a zoo of IDEs or enterprisy deployment
  tools, what is needed is:
  a/ well maintained examples
  b/ some tutorials and youtube vidoes showing how simple it is
 
 False dichotomy - you'd want to appeal both to the casual hacker that
 wants the quick solution, _and_ the enterprise...

The second follows the first, not the other way around. Thus aim for the first
to get the second.

Best,

Bjoern
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Removing C++ SDK examples, clearly encouraging Python extensions (was: LibreOffice prints on tuesdays)

2013-04-03 Thread Michael Meeks

On Wed, 2013-04-03 at 12:20 +0200, Bjoern Michaelsen wrote:
 As much as it it is perverted, I would prefer people to bind their backend

Lets discuss this on Thursday in the ESC call :-)

ATB,

Michael.

-- 
michael.me...@suse.com  , Pseudo Engineer, itinerant idiot

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Removing C++ SDK examples, clearly encouraging Python extensions (was: LibreOffice prints on tuesdays)

2013-04-03 Thread Thorsten Behrens
Bjoern Michaelsen wrote:
  Bjoern Michaelsen wrote:
   As for IDEs: Actually I dont think that many Python stuff is done in
   a IDE -- most is simply written in an editor.
 

and:
 There is no dominant IDE (much less so a crossplatform one) and
 there seems to be a lot flux on which IDE is the en vouge one each
 year.

Sure - but still your precondition was wrong to start with, so further
arguing the case based on that is pointless. As Michael suggests,
let's punt to ESC tomorrow.

Cheers,

-- Thorsten


signature.asc
Description: Digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Removing C++ SDK examples, clearly encouraging Python extensions (was: LibreOffice prints on tuesdays)

2013-04-02 Thread Bjoern Michaelsen
Hi,

On Mon, Apr 01, 2013 at 06:43:27AM -0400, Dan Lewis wrote:
  What is the purpose of this extension? Why print only on Tuesdays?

The real purpose of this extension is to be an example on how to write a simple
extension:

 https://plus.google.com/101094190333184858950/posts/dpLf3s6C2r5

Being nonsensical actually help at being an example, because if you write an
example that is actually useful, it tends to feature-creep into something
complex and unwieldy.

As such, I would like to add this extension to:

 http://api.libreoffice.org/examples/examples.html#python_examples

Also -- and this is a proposal for the ESC to discuss: I would like to remove
the C++ examples there. Im not kidding, April fools is over in my time zone.

I tried hard to make them work and just couldnt get them to build (trying it on
Windows, just to make things more interesting).  Right now, it is orders of
magnitude easier to just work on core repo that to try write UNO-stuff against
a standalone SDK. As contributors might assume otherwise ('If building an
extension is this hard, working on the core product must be impossible') this
kills us possible contributors.

So right now:
- C++ extensions are essentially useless: they have a higher barrier to entry
  than the core product
- Python extensions have the lowest barrier to entry

So my proposal is:
- Remove the C++ example stuff until someone comes along and provides trivial
  to use ones that are easier to build than the core product on all platforms.
- Add more Python examples
- Encourage writing extensions in Python or hacking directly on the core
  product in C++:
  - building C++ extensions are a mightmare to set up right now
  - even Java is orders of magnitude more complex than Python because of the
static typing and queryInterface() madness and the lack of Pythons mapping
of getFoo() methods to properties
  - the migration path into the core product should a extension become part of
the core product would be:
- written as a Python extension in RAD mode
- moved into the core product when qualifying
- C++ified there, which is easier than doing it out of the product

Making sense?

Best,

Bjoern
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Removing C++ SDK examples, clearly encouraging Python extensions (was: LibreOffice prints on tuesdays)

2013-04-02 Thread Cedric Bosdonnat
On Tue, 2013-04-02 at 11:33 +0200, Bjoern Michaelsen wrote:
 Also -- and this is a proposal for the ESC to discuss: I would like to remove
 the C++ examples there. Im not kidding, April fools is over in my time zone.
 
 I tried hard to make them work and just couldnt get them to build (trying it 
 on
 Windows, just to make things more interesting).  Right now, it is orders of
 magnitude easier to just work on core repo that to try write UNO-stuff against
 a standalone SDK. As contributors might assume otherwise ('If building an
 extension is this hard, working on the core product must be impossible') this
 kills us possible contributors.

I would be all for your point.

 So right now:
 - C++ extensions are essentially useless: they have a higher barrier to entry
   than the core product
 - Python extensions have the lowest barrier to entry

Yeah, pushing for Java and Python extensions is good as it would target
almost all the potential extension developers.

To push people to hack on python extensions, we would need to provide
them tools and documentation to do it. While documentation is a possibly
a matter of gathering nice examples and updating old pyuno docs,
providing tools is different. IMHO what would be needed:

  * make uno-skeletonmaker generate python code skeleton
  * add python support to ooeclipse using pydev (or add UNO support to a
python IDE)

--
Cedric

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Removing C++ SDK examples, clearly encouraging Python extensions (was: LibreOffice prints on tuesdays)

2013-04-02 Thread Bjoern Michaelsen
Hi,

On Tue, Apr 02, 2013 at 11:47:18AM +0200, Cedric Bosdonnat wrote:
 IMHO what would be needed:
 
   * make uno-skeletonmaker generate python code skeleton
   * add python support to ooeclipse using pydev (or add UNO support to a
 python IDE)

I see both not being that essential, to be honest:

We dont need uno-skeletonmaker much for Python as it is has introspection. You
can e.g.:

 print(unoobject)

on any UNO object and it tells you all you need to know about it.

As for IDEs: Actually I dont think that many Python stuff is done in a IDE --
most is simply written in an editor. Also IDEs might give people (rightfully in
most cases) the feeling that there is a lot of dark magic going on when
building a project.  That is not the impression we want to create -- The
'Tuesday printer'-extension is completely self-contained:

You can edit it and run the 'build' script in it, which repack the zip and have
your modified extension. Looking at the trivial 'build' script wont scare
anybody and it is generic and trivial to integrate ad-hoc into _any_ IDE.

Instead of caring about a zoo of IDEs or enterprisy deployment tools, what is
needed is:
a/ well maintained examples
b/ some tutorials and youtube vidoes showing how simple it is

Best,

Bjoern
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice