FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 01-30-2010, 12:29 PM
Paulo Cavalcanti
 
Default Would you use a programming language with missing features?

I always say one should not blame the system (OS, language, whatever) for his/her
programming mistakes.

Unfortunately, Fedora has presently two programming languages with
missing features, and the user maybe completely unaware of this.


The first one is python. The GUI provided with python is called tkinter,
which is based on tk, which, in turn, is based on tcl. Since threads are disabled in Fedora's tcl,
as a consequence, one cannot use python+tkinter+threads.


I believe there are hundreds of computer courses, based on python, around the world.
But maybe threads are a minor subject, and can be just forgotten ...

https://www.redhat.com/archives/fedora-devel-list/2009-August/msg00462.html


I am not saying the points raised in the above link are not important, but
the solution is pretty obvious to me.

The second language is called Lazarus, a clone of the indefectible Delphi.
Lazarus is based on fpc (Free Pascal), and for a long time, Firebird was the only database

which could be used reliably via Lazarus components. In Fedora 10, finally, mysql 5.0 started
to work via components, but this is no longer true in Fedora 12, which ships mysql 5.1:

Fortunately, the fix is easy:


https://bugzilla.redhat.com/show_bug.cgi?id=554984

Database components are the only reason one would like to use an old environment, such as Lazarus, in my opinion.


I hope someone can address these issues, which certainly affect a lot of people.

Thanks.
--
Paulo Roma Cavalcanti
LCG - UFRJ

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 01-30-2010, 01:05 PM
Ralf Ertzinger
 
Default Would you use a programming language with missing features?

Hi.

On Sat, 30 Jan 2010 11:29:09 -0200, Paulo Cavalcanti wrote

> The first one is python. The GUI provided with python is called
> tkinter, which is based on tk, which, in turn, is based on tcl. Since
> threads are disabled in Fedora's tcl,
> as a consequence, one cannot use python+tkinter+threads.

Or you could just use pygtk, which does threads just fine.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 01-30-2010, 02:16 PM
Milos Jakubicek
 
Default Would you use a programming language with missing features?

On 30.1.2010 14:29, Paulo Cavalcanti wrote:

> https://www.redhat.com/archives/fedora-devel-list/2009-August/msg00462.html
>
> I am not saying the points raised in the above link are not important, but
> the solution is pretty obvious to me.

Obviously it isn't if you looked at the BZ link in the answer to you in
the 2009-August thread:

https://bugzilla.redhat.com/show_bug.cgi?id=443246

You can try filing a new bugreport or just get in touch with both the
maintainer of tcl/tk and eggdrop (quick googling shows there were some
workarounds which could make it working with threaded tcl/tk as well)
and try to find out the solution that will make eggdrop working with
enabled threads.

(...and yes, I was recently doing a comparison of python GUIs and can
just recommend switching to PyQt, like I did, or PyGtk -- if you prefer).

> The second language is called Lazarus, a clone of the indefectible/ /Delphi.
> Lazarus is based on fpc (Free Pascal), and for a long time, Firebird was
> the only database
> which could be used reliably via Lazarus components. In Fedora 10,
> finally, mysql 5.0 started
> to work via components, but this is no longer true in Fedora 12, which
> ships mysql 5.1:
>
> Fortunately, the fix is easy:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=554984

Agree that this one should be easy to fix (*provided that the patch you
are mentioning indeed works*), try to ping the maintainer once more --
it is not there so terribly long (2 weeks).

Regards,
Milos
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 01-30-2010, 02:26 PM
Haïkel Guémar
 
Default Would you use a programming language with missing features?

Le 30/01/2010 14:29, Paulo Cavalcanti a écrit :
> The first one is python. The GUI provided with python is called tkinter,
> which is based on tk, which, in turn, is based on tcl. Since threads are
> disabled in Fedora's tcl,
> as a consequence, one cannot use python+tkinter+threads.
>

Tkinter is not thread-safe even if you built tcl with threads support,
though there's a thread-safe variant aka mtTkinter. Basically, it
doesn't matter from a python/Tkinter user standpoint.

You can mix Tkinter and threading modules in the same script but as with
most toolkits, you must not (well shouldn't) make GUI calls outside the
main thread. That's how Gtk+, Qt, Swing work.

If you keep that in mind, you'll have no problem making a python
application using threads and Tkinter (the same goes for PyQt4 and PyGtk).

Anyway, fixing threaded tcl/tk by itself is a worthy goal.

H.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 01-30-2010, 04:05 PM
Paulo Cavalcanti
 
Default Would you use a programming language with missing features?

On Sat, Jan 30, 2010 at 1:16 PM, Milos Jakubicek <xjakub@fi.muni.cz> wrote:

On 30.1.2010 14:29, Paulo Cavalcanti wrote:




https://www.redhat.com/archives/fedora-devel-list/2009-August/msg00462.html



I am not saying the points raised in the above link are not important, but

the solution is pretty obvious to me.




Obviously it isn't if you looked at the BZ link in the answer to you in the 2009-August thread:



https://bugzilla.redhat.com/show_bug.cgi?id=443246

At least, there should have been, since the beginning, two tcl available

in Fedora:

tcl and tcl-non-threaded

*


You can try filing a new bugreport or just get in touch with both the maintainer of tcl/tk and eggdrop (quick googling shows there were some workarounds which could make it working with threaded tcl/tk as well) and try to find out the solution that will make eggdrop working with enabled threads.


There are at least two official ways of using threaded tcl and eggdrop:

http://eggwiki.org/Threaded_Tcl

*



(...and yes, I was recently doing a comparison of python GUIs and can just recommend switching to PyQt, like I did, or PyGtk -- if you prefer).



I am not talking about developing systems, but learning python. tkinter
is part of python, which makes it very easy to write simple programs, and run in Windows, for instance (I know there is PyQt for windows, but one has to go to Riverbank...).


It is not a pleasant situation when your code does not work because
the programming language does not do what it is supposed to.

I am not raising any kind of rant here. I am just pointing that there is a problem

that could have been already solved.
--
Paulo Roma Cavalcanti
LCG - UFRJ

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 01-30-2010, 07:14 PM
Haïkel Guémar
 
Default Would you use a programming language with missing features?

Le 30/01/2010 18:05, Paulo Cavalcanti a écrit :
> It is not a pleasant situation when your code does not work because
> the programming language does not do what it is supposed to.
>
> I am not raising any kind of rant here. I am just pointing that there is
> a problem
> that could have been already solved.
>

The use case provided there is broken by design, multiple threads try
use the same Label object.
http://mail.python.org/pipermail/python-bugs-list/2008-September/060101.html


Since Tkinter is currently *not* thread-safe, you shouldn't expect this
stuff working properly.
Whether you compile tcl/tk with threads support doesn't matter, the
problem *lies* in the python layer. It might work on your machine, but
it's guaranteed to work elsewhere.
http://mail.python.org/pipermail/tkinter-discuss/2008-October/001677.html
Anyway, if you need a multithreaded Tkinter, then you'll have to build
mtTkinter which is not packaged for Fedora at that time.


AFAIK, your Python/Tkinter installation *does* as it's supposed to do.



> I am not talking about developing systems, but learning python.
> tkinter
> is part of python, which makes it very easy to write simple programs,
> and run in Windows, for instance (I know there is PyQt for windows, >
but one has to go to Riverbank...).

PyQt4 is dual licensed on all platforms, there are even GPL'ed windows
binaries on Riverbank site. You'll need a commercial license only if
you're unable to distribute your code in a GPL compatible license.

H.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 01-30-2010, 11:24 PM
Paulo Cavalcanti
 
Default Would you use a programming language with missing features?

On Sat, Jan 30, 2010 at 6:14 PM, Haïkel Guémar <karlthered@gmail.com> wrote:

Le 30/01/2010 18:05, Paulo Cavalcanti a écrit :

> It is not a pleasant situation when your code does not work because

> the programming language does not do what it is supposed to.

>

> I am not raising any kind of rant here. I am just pointing that there is

> a problem

> that could have been already solved.

>



The use case provided there is broken by design, multiple threads try

use the same Label object.

http://mail.python.org/pipermail/python-bugs-list/2008-September/060101.html



Until here, we agree. Whenever a tkinter object is accessed from
another thread, the program will abort (when tcl is not built with thread enabled).

*



Since Tkinter is currently *not* thread-safe, you shouldn't expect this

stuff working properly.

Surely, it will not be thread safe when tcl is not built with thread support.

*

Whether you compile tcl/tk with threads support doesn't matter, the

problem *lies* in the python layer. It might work on your machine, but

it's guaranteed to work elsewhere.

Maybe it is not 100% safe

http://mail.python.org/pipermail/tkinter-discuss/2008-October/001683.html


but I did not see a single example where it does not work when tcl is built with thread enabled.
"Now what you can do when tcl/tk is compiled with --enable-threads and
python has thread support too is creating threads in python and

changing tk widgets in another thread. tkinter will schedule these
calls from other threads to run in the main thread (with a probability
to fail)."

I can not comment the "probability of fail". I would have to look at

tkinter code.
*
http://mail.python.org/pipermail/tkinter-discuss/2008-October/001677.html

Anyway, if you need a multithreaded Tkinter, then you'll have to build

mtTkinter which is not packaged for Fedora at that time.

mtTkinter just makes the program work either with tcl thread enabled or not.
It is a very small module (160 lines):

Usage:


*** import mtTkinter as Tkinter
*** # Use "Tkinter." as usual.

or

*** from mtTkinter import *
*** # Use Tkinter module definitions as usual.

It also has a small test, which I am attaching a screen shot.


One can read:

mtTkinter works with or without Tcl thread support

Anyway, the discussion was good and maybe it is useful to other people too.

Thanks.

--
Paulo Roma Cavalcanti

LCG - UFRJ

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 01-30-2010, 11:34 PM
Milos Jakubicek
 
Default Would you use a programming language with missing features?

On 31.1.2010 01:24, Paulo Cavalcanti wrote:
>
> Anyway, the discussion was good and maybe it is useful to other people too.
>



Well, really: if you want to change something, file the bugreport, or
get in touch with relevant maintainers. I'm not a tcl/tk/python expert,
but if you think that your request is ligitimate and could be fulfilled,
go ahead and discuss this with the relevant people. Discussion here
might be interesting but doesn't bring much, not every package
maintainer reads the list (unfortunately), and most of them carefully
choose which threads they will follow. They definitely don't read
threads with such a provocative subject (I'd just mark it as read
normally as well) -- be explicit, using something like "build tcl with
thread support" would definitely atract the relevant people more likely.

Regards,
Milos
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 02-01-2010, 07:39 PM
Paulo Cavalcanti
 
Default Would you use a programming language with missing features?

On Sat, Jan 30, 2010 at 10:34 PM, Milos Jakubicek <xjakub@fi.muni.cz> wrote:

On 31.1.2010 01:24, Paulo Cavalcanti wrote:




Anyway, the discussion was good and maybe it is useful to other people too.










Well, really: if you want to change something, file the bugreport, or get in touch with relevant maintainers. I'm not a tcl/tk/python expert, but if you think that your request is ligitimate and could be fulfilled, go ahead and discuss this with the relevant people. Discussion here might be interesting but doesn't bring much, not every package maintainer reads the list (unfortunately), and most of them carefully choose which threads they will follow. They definitely don't read threads with such a provocative subject (I'd just mark it as read normally as well) -- be explicit, using something like "build tcl with thread support" would definitely atract the relevant people more likely.




To whom it may concern (and maybe review):

https://bugzilla.redhat.com/show_bug.cgi?id=560787

Thanks.


--
Paulo Roma Cavalcanti
LCG - UFRJ

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 02-02-2010, 01:16 PM
Muayyad AlSadi
 
Default Would you use a programming language with missing features?

just for the rerecords, only Gtk and Qt have good international support
tk and alike got serious problems rendering many scripts
including Arabic script (which is used by many languages and it's the
second most widely used script after latin script)
(wx works fine because in linux it depend on Gtk)

Python TkInter and tcl/tk is an example of big sad show case for linux
because in windows TkInter or tcl/tk supports Arabic perfectly

that's because the developers of freetype in Linux dropped opentype
support and moved that to the unfinished harfbazz

I hope when harfbazz is finished all toolkits that depends on freetype
moves to harfbazz
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 

Thread Tools




All times are GMT. The time now is 04:36 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org