It is currently Fri Oct 02, 2026 11:26 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: warning! decimal comma/dot
PostPosted: Thu Jun 18, 2015 5:44 pm  (#21) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12850
Yawn; you folk can do better. lololol

:)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: warning! decimal comma/dot
PostPosted: Fri Jun 19, 2015 1:31 am  (#22) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
dinasset wrote:
Really, in this case, i guess that there is a bug in TinyScheme: it SHOULD take care of "locale", it is used worldwide...

Well, your problem is that it indeed cares about the locale... but that you cannot override that.

_________________
Image


Top
 Post subject: Re: warning! decimal comma/dot
PostPosted: Fri Jun 19, 2015 2:20 am  (#23) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
Yes, Ofnuts, this is what I wanted to say.
Not because I do not like local editing (should I print a bill I certainly appreciate an editing understandable in my country), but because almost all application softwares around only accept and manage the US editing, the "locale" should not be constrained, there must be an escape or mode selection.
I didn't try but I suppose that also in the opposite direction (string->number) will fail, should the string received by another software application be in the US format, so that a string containing 1 as integer part and 234 as decimal part will be transformed into the number 1234 in a country like Italy, but I do not even try because I do not see a practical use.

_________________
"Where am I ?"


Top
 Post subject: Re: warning! decimal comma/dot
PostPosted: Fri Jun 19, 2015 2:36 pm  (#24) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
dinasset wrote:
Yes, Ofnuts, this is what I wanted to say.
Not because I do not like local editing (should I print a bill I certainly appreciate an editing understandable in my country), but because almost all application softwares around only accept and manage the US editing, the "locale" should not be constrained, there must be an escape or mode selection.
I didn't try but I suppose that also in the opposite direction (string->number) will fail, should the string received by another software application be in the US format, so that a string containing 1 as integer part and 234 as decimal part will be transformed into the number 1234 in a country like Italy, but I do not even try because I do not see a practical use.


You can always come to the dark side and use Python. Let me give you an example:

from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np

R=10
turns=3.25
samples=500

steps=np.linspace(-1,+1,samples)
a=np.linspace(0,2*np.pi*turns,samples)
r=R*np.sqrt(1-steps*steps)

x=np.cos(a)*r
y=np.sin(a)*r
z=R*steps

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot(x, y, z)
plt.show()


This gives:
Attachment:
LineOnSphere.png
LineOnSphere.png [ 123.4 KiB | Viewed 1310 times ]


And that's the first time I used numpy (the vector computation library) and matplotlib. Getting the math correct (spiral on a sphere) was the hardest part. Python never got in the way...

_________________
Image


Top
 Post subject: Re: warning! decimal comma/dot
PostPosted: Sat Jun 20, 2015 9:57 am  (#25) 
Offline
Script Coder
User avatar

Joined: Dec 27, 2014
Posts: 508
ofnuts wrote:
Odinbc wrote:
Would it be practical to have a Gimp python plug-in that can use something like numpy and matplotlib code? I'm more curious in knowing if it's possible to somehow use Graphviz with Gimp. I don't really need this; I only became curious when using a Zim Desktop Wiki Graphviz plug-in.


Numpy would definitely have it uses if you have to do some intensive computing. Matplotlib could have its uses too (to render 3D shapes for instance...). There is a staggering wealth of libraries for Python... I have scripts that read/write XML/CSV/XLS files...), your imagination is the limit, not the functionality deemed sufficient by the script engine authors.

And yes, you can use graphwiz in a Gimp script.

BTW numpy is a standard Python library and is already used by a few Gimp Python plugins such as John Lakkas' Color Grading (http://registry.gimp.org/node/26187).

@Odin
I think this discussion about Python libraries (ie. everything since item #24) could/should be split to a separate thread - the original problem Dinasset encountered is actually quite a serious problem potentially affecting all of us and we need to find a good solution; meanwhile the possibilities of Python library functionality being made available to Gimp users through plugins is a quite separate issue but may have some considerable merit and should become an on-going discussion in its own right...


Top
Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group