[Scilab-users] Exclamation mark in variable names

classic Classic list List threaded Threaded
17 messages Options
Jens Jens
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] Exclamation mark in variable names

Hallo Scilab intimates,
Is    !a     a valid variable name in the latest version of Scilab?  Vers. 6.0.1 sees an Error: Unexpected token '!'

Kind regards
Jens

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Exclamation mark in variable names

Hello Jens,

Le 19/05/2018 à 12:35, Jens Simon Strom a écrit :
Hallo Scilab intimates,
Is    !a     a valid variable name in the latest version of Scilab?  Vers. 6.0.1 sees an Error: Unexpected token '!'

Yes it is. You have reported it as the bug 15126, and Clement has confirmed to you that this naming should still be supported.

Regards
Samuel


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Wozai Wozai
Reply | Threaded
Open this post in threaded view
|

Re: Exclamation mark in variable names

In reply to this post by Jens
Hi,

I have had the same problem, and found a solution (at least if you build
scilab by yourself), apply the following changes to the source and compile
Scilab.

1.  Changes Hotey "!" to ":" for Recalling History in Java Console
<https://github.com/rdbyk/balisc/pull/320>  

2.  Fixes Parser to Accept "!" in Variable Names
<https://github.com/rdbyk/balisc/pull/323>  

Of course the downside of this fixing approach would be, that your code only
works in "your" Scilab.
 
Cheers,

Wozai




--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Clément David-3 Clément David-3
Reply | Threaded
Open this post in threaded view
|

Re: Exclamation mark in variable names

Hi,

Thanks for your experimental work on that topic. I guess we could merge the parser fix easily
however the `!` usage to recall a previous command will remain problematic. This usage does not seem
to be documented somewhere in the help page, maybe we could discard it. What's your opinion on that
?

Thanks,

--
Clément

Le vendredi 25 mai 2018 à 01:17 -0700, Wozai a écrit :

> Hi,
>
> I have had the same problem, and found a solution (at least if you build
> scilab by yourself), apply the following changes to the source and compile
> Scilab.
>
> 1.  Changes Hotey "!" to ":" for Recalling History in Java Console
> <https://github.com/rdbyk/balisc/pull/320
>
> 2.  Fixes Parser to Accept "!" in Variable Names
> <https://github.com/rdbyk/balisc/pull/323
>
> Of course the downside of this fixing approach would be, that your code only
> works in "your" Scilab.
>  
> Cheers,
>
> Wozai
>
>
>
>
> --
> Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Exclamation mark in variable names

Hello,

Le 25/05/2018 à 10:45, Clément David a écrit :
> Hi,
>
> Thanks for your experimental work on that topic. I guess we could merge the parser fix easily
> however the `!` usage to recall a previous command will remain problematic. This usage does not seem
> to be documented somewhere in the help page, maybe we could discard it. What's your opinion on that
> ?

It is an historical and standard feature, used not only in Scilab language.
Please see the entry http://bugzilla.scilab.org/10776

The only issue is that it is still undocumented. It could be described
in the Console's page.

Samuel

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Wozai Wozai
Reply | Threaded
Open this post in threaded view
|

Re: Exclamation mark in variable names

Hi,

I think it should be possible to execute things like "!A=123" in the Java
Console.

Cheers,

Wozai



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Exclamation mark in variable names

Le 25/05/2018 à 11:08, Wozai a écrit :
> Hi,
>
> I think it should be possible to execute things like "!A=123" in the Java
> Console.

Just prepend a space, and it works.

Samuel

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Exclamation mark in variable names

In reply to this post by Samuel GOUGEON
Le 25/05/2018 à 11:02, Samuel Gougeon a écrit :
Hello,

Le 25/05/2018 à 10:45, Clément David a écrit :
Hi,

Thanks for your experimental work on that topic. I guess we could merge the parser fix easily
however the `!` usage to recall a previous command will remain problematic. This usage does not seem
to be documented somewhere in the help page, maybe we could discard it. What's your opinion on that
?

It is an historical and standard feature, used not only in Scilab language.
Please see the entry http://bugzilla.scilab.org/10776

The only issue is that it is still undocumented. It could be described in the Console's page.

"The only issue" : hmm, not really. Even if the missing documentation is the main one, IMO this (already) very handy feature could be improved in at least two ways:
  • when no match is found in the history, nothing happens. For people who does not know the feature (or who has forgotten that it is available), this could be easily puzzling and felt as a bug.
    => when no match is found, Scilab shall print a message "No match found in history"

  • A listbox listing matches could be displayed, to select the only entry searched for.
    This might be done in two ways :

    • either typing "!" + one char as the very first characters would enter a completion mode based on the history, with matches listed in a listbox as described hereabove

    • or this could be done only after validating with <enter>, or CTRL+space as for the feature completion (but here targeted to the history with the leading "!")
If a completion mode is implemented, then the message "no match found in history" could be displayed in the listbox instead of in the console (note that the general feature completion triggered with CTRL+space displays nothing when no match is found).

By the way, as for this "!" history recall, the existing interactive usage of the completion is not documented in the Console page. Let's add both in the page, as they presently are.

Regards
Samuel


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Jens Jens
Reply | Threaded
Open this post in threaded view
|

Re: Exclamation mark in variable names

Hi,
The `!` usage to recall a previous command is discussed here in detail. I don't miss it.  My question was different.

How about implementing again the "!" as a valid character in variable names as documented? How long is the reasonable response time for fixing the reported bug?

Regards Jens

--------------------------------------------------------------




Am 26.05.2018 14:10, schrieb Samuel Gougeon:
Le 25/05/2018 à 11:02, Samuel Gougeon a écrit :
Hello,

Le 25/05/2018 à 10:45, Clément David a écrit :
Hi,

Thanks for your experimental work on that topic. I guess we could merge the parser fix easily
however the `!` usage to recall a previous command will remain problematic. This usage does not seem
to be documented somewhere in the help page, maybe we could discard it. What's your opinion on that
?

It is an historical and standard feature, used not only in Scilab language.
Please see the entry http://bugzilla.scilab.org/10776

The only issue is that it is still undocumented. It could be described in the Console's page.

"The only issue" : hmm, not really. Even if the missing documentation is the main one, IMO this (already) very handy feature could be improved in at least two ways:
  • when no match is found in the history, nothing happens. For people who does not know the feature (or who has forgotten that it is available), this could be easily puzzling and felt as a bug.
    => when no match is found, Scilab shall print a message "No match found in history"

  • A listbox listing matches could be displayed, to select the only entry searched for.
    This might be done in two ways :

    • either typing "!" + one char as the very first characters would enter a completion mode based on the history, with matches listed in a listbox as described hereabove

    • or this could be done only after validating with <enter>, or CTRL+space as for the feature completion (but here targeted to the history with the leading "!")
If a completion mode is implemented, then the message "no match found in history" could be displayed in the listbox instead of in the console (note that the general feature completion triggered with CTRL+space displays nothing when no match is found).

By the way, as for this "!" history recall, the existing interactive usage of the completion is not documented in the Console page. Let's add both in the page, as they presently are.

Regards
Samuel



_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Exclamation mark in variable names

Le 27/05/2018 à 10:52, Jens Simon Strom a écrit :
Hi,
The `!` usage to recall a previous command is discussed here in detail. I don't miss it.  My question was different.

I was answering to the "What's your opinion?" question by Clément.

Yes, i definitely agree on that both questions are completely independent, and that since the fix for variables names is deemed easy, it should be applied ASAP and fastly made available in the continuous built.

Regards
Samuel


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Wozai Wozai
Reply | Threaded
Open this post in threaded view
|

Re: Exclamation mark in variable names

Hi,

In theory they are "completely independent", but currently as a matter of
fact there is a clash wrt. to the
semantics of the "!" character.

Does is it really make sense allowing "!" in identifier names, while keeping
the the current history
recall feature, and assuming, that the user prepends a space in front of
expressions like "!A=1" to
get them executed in the Java console?

My conclusion: if both features are going to be kept, then the clash wrt "!"
should be resolved ASAP,
anyhow.

Cheers,

Wozai




--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Exclamation mark in variable names

Le 27/05/2018 à 13:45, Wozai a écrit :
> Hi,
>
> In theory they are "completely independent", but currently as a matter of
> fact there is a clash wrt. to the semantics of the "!" character.

Wozai, i am afraid i don't catch your point.
Your point is not specifically about Scilab 6, is it?
You already disagreed with Scilab 5 behavior about using "!" to recall
the history, while "!" was actually accepted in identifiers, didn't you?

If so, then, your point is clearly distinct from Jens (and any user
using variable names including "!") urgent claim,
that is specific to a Scilab 5 => 6 change.

If "!" is reintroduced among allowed characters in identifiers --
including as the first one --,
and "!" is not changed into ":" to recall the history, do we get with
the fixed Scilab 6 anything else than the Scilab < 6 behavior?

Samuel

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Wozai Wozai
Reply | Threaded
Open this post in threaded view
|

Re: Exclamation mark in variable names

Dear Samuel,

my point is, it wasn't possible to execute "!A=1" in Scilab 5.x (without
prepending
a space) and IMHO one should really *improve* the situation in Scilab 6,
rather than
just restoring the status quo.

Cheers,

Wozai




--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Exclamation mark in variable names

Le 27/05/2018 à 16:30, Wozai a écrit :
Dear Samuel,

my point is, it wasn't possible to execute "!A=1" in Scilab 5.x (without prepending
a space) and IMHO one should really *improve* the situation in Scilab 6,
rather than just restoring the status quo.

Thank you Wozai for having confirmed my reading of your messages.

What Jens and i see is that Scilab 6 has not kept a status quo: by removing "!" from allowed characters, and by not fixing this, Scilab 6 is downgraded now for almost 3 years it is released. Unfortunately, this is not a status quo.

I definitively agree that improving Scilab is necessary. This is why i am involved in it. But i definitely disagree about the fact that what is considered as an improvement or a downgrade is the decision of one person or a very few people just declaring that "This is better than existing features. It must be changed!" (with a frequent trailing exclamation mark).

Other users than you and me, more numerous than you alone, could easily consider that keeping the usage of "!" as the history call is preferable, because they use to use it in other environments, and then would consider this change as a regression, not an improvement.

You seem to consider that using very occasionally a leading space to address a variable is really a big deal. But how many coders name preferably their variables with a leading "!" such that having to prepend a space actually becomes a big deal? I am sorry, but in all the external codes i had to work on for 20 years, variables with a leading "!" were rare enough that i don't remember having met a single one.

The usual way to propose an improvement is to post a wish on Bugzilla. Yours is welcome!

I let Clement pushing the fix for the parser, and i hope it will be straightforwardly merged.

I will wait 2-3 weeks before documenting the history recall and CTRL+Space completion
features in the Console page. If within this time it is decided to change for ":", the page won't
have to be possibly updated afterwards.

Samuel

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Rafael Guerra Rafael Guerra
Reply | Threaded
Open this post in threaded view
|

Re: Exclamation mark in variable names

Another two cents.

Allowing a leading exclamation mark in variable names seems to be, IMHO, a bad idea because (1) most computer languages do not seem to allow it and (2) some when encountering it, will interpret as logical negation.

 

Regards,

Rafael

 

From: users [mailto:[hidden email]] On Behalf Of Samuel Gougeon
Sent: Sunday, May 27, 2018 5:14 PM
To: Users mailing list for Scilab <[hidden email]>
Subject: Re: [Scilab-users] Exclamation mark in variable names

 

Le 27/05/2018 à 16:30, Wozai a écrit :

Dear Samuel,
 
my point is, it wasn't possible to execute "!A=1" in Scilab 5.x (without prepending
a space) and IMHO one should really *improve* the situation in Scilab 6,
rather than just restoring the status quo.


Thank you Wozai for having confirmed my reading of your messages.

What Jens and i see is that Scilab 6 has not kept a status quo: by removing "!" from allowed characters, and by not fixing this, Scilab 6 is downgraded now for almost 3 years it is released. Unfortunately, this is not a status quo.

I definitively agree that improving Scilab is necessary. This is why i am involved in it. But i definitely disagree about the fact that what is considered as an improvement or a downgrade is the decision of one person or a very few people just declaring that "This is better than existing features. It must be changed!" (with a frequent trailing exclamation mark).

Other users than you and me, more numerous than you alone, could easily consider that keeping the usage of "!" as the history call is preferable, because they use to use it in other environments, and then would consider this change as a regression, not an improvement.

You seem to consider that using very occasionally a leading space to address a variable is really a big deal. But how many coders name preferably their variables with a leading "!" such that having to prepend a space actually becomes a big deal? I am sorry, but in all the external codes i had to work on for 20 years, variables with a leading "!" were rare enough that i don't remember having met a single one.

The usual way to propose an improvement is to post a wish on Bugzilla. Yours is welcome!

I let Clement pushing the fix for the parser, and i hope it will be straightforwardly merged.

I will wait 2-3 weeks before documenting the history recall and CTRL+Space completion
features in the Console page. If within this time it is decided to change for ":", the page won't
have to be possibly updated afterwards.

Samuel


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Exclamation mark in variable names

In reply to this post by Samuel GOUGEON
Le 26/05/2018 à 14:10, Samuel Gougeon a écrit :
Le 25/05/2018 à 11:02, Samuel Gougeon a écrit :
Hello,

Le 25/05/2018 à 10:45, Clément David a écrit :
Hi,

Thanks for your experimental work on that topic. I guess we could merge the parser fix easily
however the `!` usage to recall a previous command will remain problematic. This usage does not seem
to be documented somewhere in the help page, maybe we could discard it. What's your opinion on that
?

It is an historical and standard feature, used not only in Scilab language.
Please see the entry http://bugzilla.scilab.org/10776

The only issue is that it is still undocumented. It could be described in the Console's page.

"The only issue" : hmm, not really. Even if the missing documentation is the main one, IMO this (already) very handy feature could be improved in at least two ways:
  • when no match is found in the history, nothing happens. For people who does not know the feature (or who has forgotten that it is available), this could be easily puzzling and felt as a bug.
    => when no match is found, Scilab shall print a message "No match found in history"

  • A listbox listing matches could be displayed, to select the only entry searched for.
    This might be done in two ways :

    • either typing "!" + one char as the very first characters would enter a completion mode based on the history, with matches listed in a listbox as described hereabove

    • or this could be done only after validating with <enter>, or CTRL+space as for the feature completion (but here targeted to the history with the leading "!")
If a completion mode is implemented, then the message "no match found in history" could be displayed in the listbox instead of in the console (note that the general feature completion triggered with CTRL+space displays nothing when no match is found).

This request for improvements is now reported here: http://bugzilla.scilab.org/15592


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Clément David-3 Clément David-3
Reply | Threaded
Open this post in threaded view
|

Re: Exclamation mark in variable names

In reply to this post by Samuel GOUGEON
Hello,

Le dimanche 27 mai 2018 à 12:20 +0200, Samuel Gougeon a écrit :

> Le 27/05/2018 à 10:52, Jens Simon Strom a écrit :
> > Hi,
> > The `!` usage to recall a previous command is discussed here in detail. I don't miss it.  My
> > question was different.
>  
> I was answering to the "What's your opinion?" question by Clément.
>
> Yes, i definitely agree on that both questions are completely independent, and that since the fix
> for variables names is deemed easy, it should be applied ASAP and fastly made available in the
> continuous built.

"Fixes Parser to Accept "!" in Variable Names
<https://github.com/rdbyk/balisc/pull/323> " has been merged through
https://codereview.scilab.org/#/c/20069/ .

Thanks for your contribution !

--
Clément
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users