Re: [Scilab-users] setmemory() <= Re: Reintroducing stacksize on Scilab 6 ? was (Re: multiple element by element between large matrix and vector)

2015-10-01 Thread Clément David
Hello Samuel,

> So, my questions are:
> * can't the same be implemented in Scilab 6?

No it can not be exactly the same as we no more used a stack approach
for Scilab 6.

> * If yes: is there a way to implement it in such a way that sharing 
> between global and local+intermediate variables/memory would be set 
> dynamically, in a transparent way for the user that would not have to
> specify fixed amounts for each kind of variables?

We can handle raw data for ArrayOf based variables (any matrices data type). 
Which means that if the user allocate 100x100 double matrix, we would only 
check 1*8 against the sett-ed limitation (no global / local distinction, 
datatype or class memory layout not included).

This approach is the simplest one and do not manage list / mlist nor 
user-allocated data. In my view, this is sufficient to handle the basic 
multiplication mistake or any other basic memory-bound operation.

In fact we can handle the allocation implementation per Scilab type so
we just have to choose what is handled or not (this does not cover
gateways allocation).

> * How the "default" buffer is initially sized in Scilab 5? Does it
> take 
> into account the available memory at the time of launching the Scilab
> session, such as it could be different from a Scilab session to the 
> other, particularly when several concurrent Scilab sessions are 
> simultaneously run on the same computer? How could it be managed in 
> Scilab 6,  while the former Scilab memory limit that became quite 
> smaller than common available RAM does no longer hold?

The static settings is defined in etc/scilab.start for Scilab 5 with
value 1000*8 bytes for *all* datatypes. You can pass the '-mem'
argument that will modify this value at startup.

As Simon written, this is not possible to automatically handle that for
each user as Scilab's usage will vary. We just set a sane default value
(probably the same value as in Scilab 5) and allow each user to modify
it at Scilab's startup or later.

> * Is this setting a memory reservation?.. in such a way that
> increasing 
> the java heap max size makes this memory unavailable for other
> processes 
> external to Scilab, or even unavailable for other Scilab sessions 
> running on the same computer?

Yep this is static memory reservation settings (call Java Heap Space)
that can be only tuned at the JVM startup.

> * Does each Scilab session have its own java heap, or is the java
> heap 
> shared? 

This is the first case ; each OS process is independent and the Java
Heap Space is allocated per process.

> In the first case, including its setting through setmemory() of 
> a session could be meaningful.

--
Clément
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Function

2015-10-01 Thread Stéphane Mottelet

Le 01/10/2015 12:36, Rafael Guerra a écrit :
I can only think of Da Vinci's wise words: "simplicity is the ultimate 
sophistication"

+1, definitively


> To: users@lists.scilab.org
> From: cfutt...@gmail.com
> Date: Wed, 30 Sep 2015 23:51:11 +0200
> Subject: Re: [Scilab-users] Function
>
> Hi Christophe, et al.
>
> Sarcasm can create an unpleasant atmosphere, which is generally not
> desirable in a forum. Just ot be clear, I don't see any sarcasm in my
> own response. If you see it otherwise, please explain.
>
> When it comes to my points, please bear in mind that I did find the
> question by Peter Q highly suspicious. I think that very simple
> questions needs to be turned over and studied further. Also please be
> aware that if young people show up and need answers, it could interfere
> with educational programs. Therefore skepticism may be just right under
> certain circumstances.
>
> An approach for helpers in the forum could be, that if a question is
> very simple, consider asking questions, like for example "what is the
> general purpose?" - and/or - "can you explain more about the problem
> you're trying to solve?"
>
> I appreciate Samuels reply in that the answer may not be so simple, if
> the space is not a simple cartesian space. This was also part of the
> thoughts underlying my response. I was thinking, "where's the catch?"
>
> I do think that the forum members should be concerned with interfering
> with educational programs (like classes in school).
>
> Best regards,
> Claus
>
> On 30-09-2015 10:18, Dang, Christophe wrote:
> > Hello,
> >
> >> De : users [mailto:users-boun...@lists.scilab.org] De la part de 
Peter Q.

> >> Envoyé : mardi 29 septembre 2015 21:34
> >>
> >> Thanks guys for answer.
> > You're welcome.
> >
> > I personally think that we should sometimes simply answer 
elementary questions without sarcasm, as it is good news: the 
popularity of Scilab increases and people start using it without being 
senior calculators (this is also for myself, as I confess I have been 
myself sometimes sarcastic).

> >
> > If we suspect some lazy student, maybe we could discuss to have a 
common and adapted answer, such as asking first for the formulas 
before helping coding it.

> >
> > Regards
> >
> > --
> > Christophe Dang Ngoc Chan
> > Mechanical calculation engineer
> > This e-mail may contain confidential and/or privileged 
information. If you are not the intended recipient (or have received 
this e-mail in error), please notify the sender immediately and 
destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.

> > ___
> > users mailing list
> > users@lists.scilab.org
> > http://lists.scilab.org/mailman/listinfo/users
>
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



--
Département de Génie Informatique
EA 4297 Transformations Intégrées de la Matière Renouvelable
Université de Technologie de Compiègne -  CS 60319
60203 Compiègne cedex

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Function

2015-10-01 Thread Rafael Guerra
I can only think of Da Vinci's wise words: "simplicity is the ultimate 
sophistication"

> To: users@lists.scilab.org
> From: cfutt...@gmail.com
> Date: Wed, 30 Sep 2015 23:51:11 +0200
> Subject: Re: [Scilab-users] Function
> 
> Hi Christophe, et al.
> 
> Sarcasm can create an unpleasant atmosphere, which is generally not 
> desirable in a forum. Just ot be clear, I don't see any sarcasm in my 
> own response. If you see it otherwise, please explain.
> 
> When it comes to my points, please bear in mind that I did find the 
> question by Peter Q highly suspicious. I think that very simple 
> questions needs to be turned over and studied further. Also please be 
> aware that if young people show up and need answers, it could interfere 
> with educational programs. Therefore skepticism may be just right under 
> certain circumstances.
> 
> An approach for helpers in the forum could be, that if a question is 
> very simple, consider asking questions, like for example "what is the 
> general purpose?" - and/or - "can you explain more about the problem 
> you're trying to solve?"
> 
> I appreciate Samuels reply in that the answer may not be so simple, if 
> the space is not a simple cartesian space. This was also part of the 
> thoughts underlying my response. I was thinking, "where's the catch?"
> 
> I do think that the forum members should be concerned with interfering 
> with educational programs (like classes in school).
> 
> Best regards,
> Claus
> 
> On 30-09-2015 10:18, Dang, Christophe wrote:
> > Hello,
> >
> >> De : users [mailto:users-boun...@lists.scilab.org] De la part de Peter Q.
> >> Envoyé : mardi 29 septembre 2015 21:34
> >>
> >> Thanks guys for answer.
> > You're welcome.
> >
> > I personally think that we should sometimes simply answer elementary 
> > questions without sarcasm, as it is good news: the popularity of Scilab 
> > increases and people start using it without being senior calculators (this 
> > is also for myself, as I confess I have been myself sometimes sarcastic).
> >
> > If we suspect some lazy student, maybe we could discuss to have a common 
> > and adapted answer, such as asking first for the formulas before helping 
> > coding it.
> >
> > Regards
> >
> > --
> > Christophe Dang Ngoc Chan
> > Mechanical calculation engineer
> > This e-mail may contain confidential and/or privileged information. If you 
> > are not the intended recipient (or have received this e-mail in error), 
> > please notify the sender immediately and destroy this e-mail. Any 
> > unauthorized copying, disclosure or distribution of the material in this 
> > e-mail is strictly forbidden.
> > ___
> > users mailing list
> > users@lists.scilab.org
> > http://lists.scilab.org/mailman/listinfo/users
> 
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
  ___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] setmemory() <= Re: Reintroducing stacksize on Scilab 6 ? was (Re: multiple element by element between large matrix and vector)

2015-10-01 Thread Simon Marchetto

Le 30/09/2015 16:04, Samuel Gougeon a écrit :
 In a practical way, what can be noticed is that when using a lot of 
graphics in Scilab -- like for image processing --, some java 
exceptions can be avoided by increasing the size of the java heap.


Before increasing the Java heap, one should wonder if the needed graphic 
or the image processing really has to use so much memory:

- Is the design of this image processing good ?
- Do this graphic really need millions of vertices or points ?
Because you can't always increase the memory, or/and the data could get 
even bigger than you thought. So you increase the memory only when the 
design can't be changed. Easy to say than done, I admit :-)


Simon


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Cannot understand scilex behavior when piping

2015-10-01 Thread Laurent Bonaventure

Hi Antoine.

I guess that the corresponding command in Linux would be "scilab-adv-cli".

And yes, that would be very nice of you!

Thanks for your interest in my predicament!

Laurent

Le 01/10/2015 16:26, Antoine Monmayrant a écrit :

Hi,

I'm not sure I'll be of any help, as I'm using Scilab on a linux machine.
Is there an equivalent of scilex.exe on linux?
(Is it scilab-adv-cli or scilab-cli?)
If yes, I can try to run a test case under Linux using the corresponding
equivalent to see if it's a problem with pipes or pipes on Windows.

Antoine

Le 10/01/2015 03:51 PM, Laurent Bonaventure a écrit :

Hello.

I'm still trying to understand the difference in behavior when opening
a graphic windows, between:
- opening it directly from Scilex
- opening it from Scilex, but when Scilex stdin is piped

I managed to narrow down the behavior to the opening of a new graphic
window by java.

In Scilex (Windows 7+Scilab 5.5.2), if you type:

jimport org.scilab.modules.graphic_objects.builder.Builder
jimport org.scilab.modules.graphic_objects.CallGraphicController
p=jinvoke(Builder,"createNewFigureWithAxes")
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,357,%f)
//__GO_MENUBAR_VISIBLE__, false
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,355,%f)
//__GO_TOOLBAR_VISIBLE__, false
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,358,%f)
//__GO_INFOBAR_VISIBLE__, false
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,357,%t)
//__GO_MENUBAR_VISIBLE__, true
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,355,%t)
//__GO_TOOLBAR_VISIBLE__, true
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,358,%t)
//__GO_INFOBAR_VISIBLE__, true

then you get an empty graphic window (java), and when you select
Edit/Axes Properties, the Tk "graphic editor" window shows up
immediately.

If you send the same commands to Scilex "through a pipe" (eg: cat |
scilex) (assuming you have "cat" on your windows), then the graphic
window appears normally, but the Tk window don't show up when you
select Edit/Axes Properties.

Strangely, if you then close the graphic window and then reopen it (by
sending the above commands again), the Tk windows shows up (too late).

Could someone give me a hint about what's going on here? Why isn't Tk
interacting correctly with the java graphic window in the "pipe" case,
while everything goes normally in the "non-pipe" case?

Thanks

Laurent Bonaventure

Le 20/09/2015 04:41, Laurent Bonaventure a écrit :

Hello.

I'm still trying to pipe instructions into scilex (Windows 7, Scilab
5.4).

When I send a plot command, scilex opens the graphics window and draw my
polyline -> Great !

Then I try to open the graphics editor from within the graphics window
(e.g. Edit/Axes properties) : nothing happens.

Then I close the graphics window.

Then I send the plot command again. And poof! The graphics windows opens
AND the long awaited graphics editor too. Except that nothing works
in it.

I guess it's some sort of handlers problem: the graphics window cannot
communicate correctly with the scilab kernel and get the correct
handlers to the figure.

What's more strange, is that the behaviour is correct when I start
scilex from within an interactive console (cmd)...

Steps to reproduce (you need some utility like cat from gnuwin32, or any
way to pipe commands to scilex) :

(Incorrect behaviour, with a pipe)

cat | scilex
x = 0:0.1:10
plot(x,cos(x))




plot(x,cos(x))


(Correct behaviour, without pipe)

scilex
x = 0:0.1:10
plot(x,cos(x))




I don't understand how scilex can see any difference between both
approaches, and why it would have a different behaviour based on that
difference. From its point of view, there shouldn't be any difference.

Ah! And the -nw switch doesn't change anything... You get exactly the
same behaviour in both cases.

Can someone give me some sort of solution, or pointers, or even give me
an idea for a workaround. I need to pipe things in scilex, and I need
the first approach to work correctly...

Thank you.
Laurent



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users




___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Cannot understand scilex behavior when piping

2015-10-01 Thread Laurent Bonaventure

Hello.

I'm still trying to understand the difference in behavior when opening a 
graphic windows, between:

- opening it directly from Scilex
- opening it from Scilex, but when Scilex stdin is piped

I managed to narrow down the behavior to the opening of a new graphic 
window by java.


In Scilex (Windows 7+Scilab 5.5.2), if you type:

jimport org.scilab.modules.graphic_objects.builder.Builder
jimport org.scilab.modules.graphic_objects.CallGraphicController
p=jinvoke(Builder,"createNewFigureWithAxes")
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,357,%f) 
//__GO_MENUBAR_VISIBLE__, false
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,355,%f) 
//__GO_TOOLBAR_VISIBLE__, false
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,358,%f) 
//__GO_INFOBAR_VISIBLE__, false
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,357,%t) 
//__GO_MENUBAR_VISIBLE__, true
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,355,%t) 
//__GO_TOOLBAR_VISIBLE__, true
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,358,%t) 
//__GO_INFOBAR_VISIBLE__, true


then you get an empty graphic window (java), and when you select 
Edit/Axes Properties, the Tk "graphic editor" window shows up immediately.


If you send the same commands to Scilex "through a pipe" (eg: cat | 
scilex) (assuming you have "cat" on your windows), then the graphic 
window appears normally, but the Tk window don't show up when you select 
Edit/Axes Properties.


Strangely, if you then close the graphic window and then reopen it (by 
sending the above commands again), the Tk windows shows up (too late).


Could someone give me a hint about what's going on here? Why isn't Tk 
interacting correctly with the java graphic window in the "pipe" case, 
while everything goes normally in the "non-pipe" case?


Thanks

Laurent Bonaventure

Le 20/09/2015 04:41, Laurent Bonaventure a écrit :

Hello.

I'm still trying to pipe instructions into scilex (Windows 7, Scilab 5.4).

When I send a plot command, scilex opens the graphics window and draw my
polyline -> Great !

Then I try to open the graphics editor from within the graphics window
(e.g. Edit/Axes properties) : nothing happens.

Then I close the graphics window.

Then I send the plot command again. And poof! The graphics windows opens
AND the long awaited graphics editor too. Except that nothing works in it.

I guess it's some sort of handlers problem: the graphics window cannot
communicate correctly with the scilab kernel and get the correct
handlers to the figure.

What's more strange, is that the behaviour is correct when I start
scilex from within an interactive console (cmd)...

Steps to reproduce (you need some utility like cat from gnuwin32, or any
way to pipe commands to scilex) :

(Incorrect behaviour, with a pipe)

cat | scilex
x = 0:0.1:10
plot(x,cos(x))




plot(x,cos(x))


(Correct behaviour, without pipe)

scilex
x = 0:0.1:10
plot(x,cos(x))




I don't understand how scilex can see any difference between both
approaches, and why it would have a different behaviour based on that
difference. From its point of view, there shouldn't be any difference.

Ah! And the -nw switch doesn't change anything... You get exactly the
same behaviour in both cases.

Can someone give me some sort of solution, or pointers, or even give me
an idea for a workaround. I need to pipe things in scilex, and I need
the first approach to work correctly...

Thank you.
Laurent



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Cannot understand scilex behavior when piping

2015-10-01 Thread Antoine Monmayrant

Hi,

I'm not sure I'll be of any help, as I'm using Scilab on a linux machine.
Is there an equivalent of scilex.exe on linux?
(Is it scilab-adv-cli or scilab-cli?)
If yes, I can try to run a test case under Linux using the corresponding 
equivalent to see if it's a problem with pipes or pipes on Windows.


Antoine

Le 10/01/2015 03:51 PM, Laurent Bonaventure a écrit :

Hello.

I'm still trying to understand the difference in behavior when opening 
a graphic windows, between:

- opening it directly from Scilex
- opening it from Scilex, but when Scilex stdin is piped

I managed to narrow down the behavior to the opening of a new graphic 
window by java.


In Scilex (Windows 7+Scilab 5.5.2), if you type:

jimport org.scilab.modules.graphic_objects.builder.Builder
jimport org.scilab.modules.graphic_objects.CallGraphicController
p=jinvoke(Builder,"createNewFigureWithAxes")
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,357,%f) 
//__GO_MENUBAR_VISIBLE__, false
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,355,%f) 
//__GO_TOOLBAR_VISIBLE__, false
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,358,%f) 
//__GO_INFOBAR_VISIBLE__, false
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,357,%t) 
//__GO_MENUBAR_VISIBLE__, true
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,355,%t) 
//__GO_TOOLBAR_VISIBLE__, true
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,358,%t) 
//__GO_INFOBAR_VISIBLE__, true


then you get an empty graphic window (java), and when you select 
Edit/Axes Properties, the Tk "graphic editor" window shows up 
immediately.


If you send the same commands to Scilex "through a pipe" (eg: cat | 
scilex) (assuming you have "cat" on your windows), then the graphic 
window appears normally, but the Tk window don't show up when you 
select Edit/Axes Properties.


Strangely, if you then close the graphic window and then reopen it (by 
sending the above commands again), the Tk windows shows up (too late).


Could someone give me a hint about what's going on here? Why isn't Tk 
interacting correctly with the java graphic window in the "pipe" case, 
while everything goes normally in the "non-pipe" case?


Thanks

Laurent Bonaventure

Le 20/09/2015 04:41, Laurent Bonaventure a écrit :

Hello.

I'm still trying to pipe instructions into scilex (Windows 7, Scilab 
5.4).


When I send a plot command, scilex opens the graphics window and draw my
polyline -> Great !

Then I try to open the graphics editor from within the graphics window
(e.g. Edit/Axes properties) : nothing happens.

Then I close the graphics window.

Then I send the plot command again. And poof! The graphics windows opens
AND the long awaited graphics editor too. Except that nothing works 
in it.


I guess it's some sort of handlers problem: the graphics window cannot
communicate correctly with the scilab kernel and get the correct
handlers to the figure.

What's more strange, is that the behaviour is correct when I start
scilex from within an interactive console (cmd)...

Steps to reproduce (you need some utility like cat from gnuwin32, or any
way to pipe commands to scilex) :

(Incorrect behaviour, with a pipe)

cat | scilex
x = 0:0.1:10
plot(x,cos(x))




plot(x,cos(x))


(Correct behaviour, without pipe)

scilex
x = 0:0.1:10
plot(x,cos(x))




I don't understand how scilex can see any difference between both
approaches, and why it would have a different behaviour based on that
difference. From its point of view, there shouldn't be any difference.

Ah! And the -nw switch doesn't change anything... You get exactly the
same behaviour in both cases.

Can someone give me some sort of solution, or pointers, or even give me
an idea for a workaround. I need to pipe things in scilex, and I need
the first approach to work correctly...

Thank you.
Laurent



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Cannot understand scilex behavior when piping

2015-10-01 Thread Antoine Monmayrant

Well,

I am not sure I can test your stuff.
When I manually feed scilab-adv-cli with your code, I get the following 
error when trying to open Edit/Axes Prop... :



--> Undefined variable: TCL_EvalStr

at line44 of function ged ( 
/home/myhome/softs/scilab-6.0.0-alpha-1/share/scilab/modules/graphics/macros/ged.sci 
line 52 )


Is scilab-adv-cli really the equivalent?
Or are all the non-cli things deactivated?

Antoine


Le 10/01/2015 04:36 PM, Laurent Bonaventure a écrit :

Hi Antoine.

I guess that the corresponding command in Linux would be 
"scilab-adv-cli".


And yes, that would be very nice of you!

Thanks for your interest in my predicament!

Laurent

Le 01/10/2015 16:26, Antoine Monmayrant a écrit :

Hi,

I'm not sure I'll be of any help, as I'm using Scilab on a linux 
machine.

Is there an equivalent of scilex.exe on linux?
(Is it scilab-adv-cli or scilab-cli?)
If yes, I can try to run a test case under Linux using the corresponding
equivalent to see if it's a problem with pipes or pipes on Windows.

Antoine

Le 10/01/2015 03:51 PM, Laurent Bonaventure a écrit :

Hello.

I'm still trying to understand the difference in behavior when opening
a graphic windows, between:
- opening it directly from Scilex
- opening it from Scilex, but when Scilex stdin is piped

I managed to narrow down the behavior to the opening of a new graphic
window by java.

In Scilex (Windows 7+Scilab 5.5.2), if you type:

jimport org.scilab.modules.graphic_objects.builder.Builder
jimport org.scilab.modules.graphic_objects.CallGraphicController
p=jinvoke(Builder,"createNewFigureWithAxes")
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,357,%f)
//__GO_MENUBAR_VISIBLE__, false
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,355,%f)
//__GO_TOOLBAR_VISIBLE__, false
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,358,%f)
//__GO_INFOBAR_VISIBLE__, false
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,357,%t)
//__GO_MENUBAR_VISIBLE__, true
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,355,%t)
//__GO_TOOLBAR_VISIBLE__, true
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,358,%t)
//__GO_INFOBAR_VISIBLE__, true

then you get an empty graphic window (java), and when you select
Edit/Axes Properties, the Tk "graphic editor" window shows up
immediately.

If you send the same commands to Scilex "through a pipe" (eg: cat |
scilex) (assuming you have "cat" on your windows), then the graphic
window appears normally, but the Tk window don't show up when you
select Edit/Axes Properties.

Strangely, if you then close the graphic window and then reopen it (by
sending the above commands again), the Tk windows shows up (too late).

Could someone give me a hint about what's going on here? Why isn't Tk
interacting correctly with the java graphic window in the "pipe" case,
while everything goes normally in the "non-pipe" case?

Thanks

Laurent Bonaventure

Le 20/09/2015 04:41, Laurent Bonaventure a écrit :

Hello.

I'm still trying to pipe instructions into scilex (Windows 7, Scilab
5.4).

When I send a plot command, scilex opens the graphics window and 
draw my

polyline -> Great !

Then I try to open the graphics editor from within the graphics window
(e.g. Edit/Axes properties) : nothing happens.

Then I close the graphics window.

Then I send the plot command again. And poof! The graphics windows 
opens

AND the long awaited graphics editor too. Except that nothing works
in it.

I guess it's some sort of handlers problem: the graphics window cannot
communicate correctly with the scilab kernel and get the correct
handlers to the figure.

What's more strange, is that the behaviour is correct when I start
scilex from within an interactive console (cmd)...

Steps to reproduce (you need some utility like cat from gnuwin32, 
or any

way to pipe commands to scilex) :

(Incorrect behaviour, with a pipe)

cat | scilex
x = 0:0.1:10
plot(x,cos(x))




plot(x,cos(x))


(Correct behaviour, without pipe)

scilex
x = 0:0.1:10
plot(x,cos(x))




I don't understand how scilex can see any difference between both
approaches, and why it would have a different behaviour based on that
difference. From its point of view, there shouldn't be any difference.

Ah! And the -nw switch doesn't change anything... You get exactly the
same behaviour in both cases.

Can someone give me some sort of solution, or pointers, or even 
give me

an idea for a workaround. I need to pipe things in scilex, and I need
the first approach to work correctly...

Thank you.
Laurent



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users




___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users




--
+++

 Antoine Monmayrant LAAS - CNRS
 7 avenue du Colonel Roche
 BP 54200
 31031 TOULOUSE Cedex 4
 FRANCE

 

Re: [Scilab-users] Cannot understand scilex behavior when piping

2015-10-01 Thread Laurent Bonaventure

Thank you for trying.

Anyway, I have a virtual linux somewhere, so I guess I could try it 
myself with Scilab 5.5.2. on linux; if the difference of behavior 
doesn't reproduce, that would narrow the search more.


See you,
Laurent

Le 01/10/2015 16:43, Antoine Monmayrant a écrit :

Well,

I am not sure I can test your stuff.
When I manually feed scilab-adv-cli with your code, I get the following
error when trying to open Edit/Axes Prop... :


--> Undefined variable: TCL_EvalStr

at line44 of function ged (
/home/myhome/softs/scilab-6.0.0-alpha-1/share/scilab/modules/graphics/macros/ged.sci
line 52 )

Is scilab-adv-cli really the equivalent?
Or are all the non-cli things deactivated?

Antoine


Le 10/01/2015 04:36 PM, Laurent Bonaventure a écrit :

Hi Antoine.

I guess that the corresponding command in Linux would be
"scilab-adv-cli".

And yes, that would be very nice of you!

Thanks for your interest in my predicament!

Laurent

Le 01/10/2015 16:26, Antoine Monmayrant a écrit :

Hi,

I'm not sure I'll be of any help, as I'm using Scilab on a linux
machine.
Is there an equivalent of scilex.exe on linux?
(Is it scilab-adv-cli or scilab-cli?)
If yes, I can try to run a test case under Linux using the corresponding
equivalent to see if it's a problem with pipes or pipes on Windows.

Antoine

Le 10/01/2015 03:51 PM, Laurent Bonaventure a écrit :

Hello.

I'm still trying to understand the difference in behavior when opening
a graphic windows, between:
- opening it directly from Scilex
- opening it from Scilex, but when Scilex stdin is piped

I managed to narrow down the behavior to the opening of a new graphic
window by java.

In Scilex (Windows 7+Scilab 5.5.2), if you type:

jimport org.scilab.modules.graphic_objects.builder.Builder
jimport org.scilab.modules.graphic_objects.CallGraphicController
p=jinvoke(Builder,"createNewFigureWithAxes")
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,357,%f)
//__GO_MENUBAR_VISIBLE__, false
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,355,%f)
//__GO_TOOLBAR_VISIBLE__, false
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,358,%f)
//__GO_INFOBAR_VISIBLE__, false
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,357,%t)
//__GO_MENUBAR_VISIBLE__, true
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,355,%t)
//__GO_TOOLBAR_VISIBLE__, true
jinvoke(CallGraphicController,"setGraphicObjectProperty",p,358,%t)
//__GO_INFOBAR_VISIBLE__, true

then you get an empty graphic window (java), and when you select
Edit/Axes Properties, the Tk "graphic editor" window shows up
immediately.

If you send the same commands to Scilex "through a pipe" (eg: cat |
scilex) (assuming you have "cat" on your windows), then the graphic
window appears normally, but the Tk window don't show up when you
select Edit/Axes Properties.

Strangely, if you then close the graphic window and then reopen it (by
sending the above commands again), the Tk windows shows up (too late).

Could someone give me a hint about what's going on here? Why isn't Tk
interacting correctly with the java graphic window in the "pipe" case,
while everything goes normally in the "non-pipe" case?

Thanks

Laurent Bonaventure

Le 20/09/2015 04:41, Laurent Bonaventure a écrit :

Hello.

I'm still trying to pipe instructions into scilex (Windows 7, Scilab
5.4).

When I send a plot command, scilex opens the graphics window and
draw my
polyline -> Great !

Then I try to open the graphics editor from within the graphics window
(e.g. Edit/Axes properties) : nothing happens.

Then I close the graphics window.

Then I send the plot command again. And poof! The graphics windows
opens
AND the long awaited graphics editor too. Except that nothing works
in it.

I guess it's some sort of handlers problem: the graphics window cannot
communicate correctly with the scilab kernel and get the correct
handlers to the figure.

What's more strange, is that the behaviour is correct when I start
scilex from within an interactive console (cmd)...

Steps to reproduce (you need some utility like cat from gnuwin32,
or any
way to pipe commands to scilex) :

(Incorrect behaviour, with a pipe)

cat | scilex
x = 0:0.1:10
plot(x,cos(x))




plot(x,cos(x))


(Correct behaviour, without pipe)

scilex
x = 0:0.1:10
plot(x,cos(x))




I don't understand how scilex can see any difference between both
approaches, and why it would have a different behaviour based on that
difference. From its point of view, there shouldn't be any difference.

Ah! And the -nw switch doesn't change anything... You get exactly the
same behaviour in both cases.

Can someone give me some sort of solution, or pointers, or even
give me
an idea for a workaround. I need to pipe things in scilex, and I need
the first approach to work correctly...

Thank you.
Laurent



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users





Re: [Scilab-users] setmemory() <= Re: Reintroducing stacksize on Scilab 6 ? was (Re: multiple element by element between large matrix and vector)

2015-10-01 Thread Clément David
Le mercredi 30 septembre 2015 à 16:04 +0200, Samuel Gougeon a écrit :

> The meaning of my first post was that, from a user point of view, 
> knowing that the amount of memory involved in a Scilab session is of 
> "Scilab global kind" or of "Scilab intermediate kind" or of "java
> kind"  
> or of "TCL kind" (for so-called TCL interpreters) is of no
> importance. 
> The only thing that really matters is that my calculations and
> graphics 
> work within a specified total amount of memory. In an ideal world,
> even 
> the size of the java heap should be dynamically set as a part of the 
> total amount of memory set for the Scilab session. It might not be 
> possible, but it was the idea of my question/discussion.
> 
> Samuel

I think I was not clear enough. For me if you want to limit the
allocated memory for the whole process, you have to use some OS
specific features for that (ulimit or cgroups on Linux for exemple). My
point is just to avoid swapping and slowing down the whole computer on
Scilab beginner mistake.

In fact, it seems to be possible (at least on Windows using "Job
Objects" and Linux using "Cgroups") but out of scope for me.

> PS: By the way, in Scilab 5, are the TCL variables -- that are 
> "persistent" -- stored in the global area, or anywhere else?

Anywhere else (in the TCL allocated space) ! Each gateway can allocate
any data without being managed by Scilab. The stack usually only
contains an handle (an mlist containing a single pointer) used to
access the data.

--
Clément
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users