[jira] [Commented] (SYSTEMML-2078) Support for global constants

2018-03-11 Thread LI Guobao (JIRA)

[ 
https://issues.apache.org/jira/browse/SYSTEMML-2078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16394613#comment-16394613
 ] 

LI Guobao commented on SYSTEMML-2078:
-

ok. Thanks [~mboehm7] . I will try to work on this issue by following your 
hints.

> Support for global constants
> 
>
> Key: SYSTEMML-2078
> URL: https://issues.apache.org/jira/browse/SYSTEMML-2078
> Project: SystemML
>  Issue Type: Sub-task
>Reporter: Matthias Boehm
>Priority: Major
>
> Similar to R, where variables of the surrounding context are accessible, this 
> task aims to introduce global constant variables. Furthermore, we should also 
> add builtin constants such as NaN, INF, and PI.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SYSTEMML-2078) Support for global constants

2018-03-10 Thread Matthias Boehm (JIRA)

[ 
https://issues.apache.org/jira/browse/SYSTEMML-2078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16394389#comment-16394389
 ] 

Matthias Boehm commented on SYSTEMML-2078:
--

thanks for asking [~Guobao] - I would prefer not to introduce a stateful 
builtin function like that because it would be very hard to properly integrate 
it for the general case. For example, what are the semantics if this builtin 
function is called out of {{parfor}} iterations?

Instead, this task captures two much simpler aspects: 
1) The support for predefined constants such as NaN, and INF, which people 
currently have to write as 0.0/0.0 and 1.0/0.0, respectively. Providing the 
builtin constants just makes several scripts more readable and less error prone.
2) A changed scoping semantics, where the parent environment (including live 
variables) is visible (but cannot be modified) in called functions even though 
these variables are not explicitly passed. This would be consistent with R and 
would also allow simple global constant (simply assign in the main script or 
some function and these variables become globally available).  

> Support for global constants
> 
>
> Key: SYSTEMML-2078
> URL: https://issues.apache.org/jira/browse/SYSTEMML-2078
> Project: SystemML
>  Issue Type: Sub-task
>Reporter: Matthias Boehm
>Priority: Major
>
> Similar to R, where variables of the surrounding context are accessible, this 
> task aims to introduce global constant variables. Furthermore, we should also 
> add builtin constants such as NaN, INF, and PI.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SYSTEMML-2078) Support for global constants

2018-03-08 Thread LI Guobao (JIRA)

[ 
https://issues.apache.org/jira/browse/SYSTEMML-2078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16391518#comment-16391518
 ] 

LI Guobao commented on SYSTEMML-2078:
-

I have an idea about this. Could we add a built-in function to attribute a 
value to a global constant variable like this "global(size, 10)"?

> Support for global constants
> 
>
> Key: SYSTEMML-2078
> URL: https://issues.apache.org/jira/browse/SYSTEMML-2078
> Project: SystemML
>  Issue Type: Sub-task
>Reporter: Matthias Boehm
>Priority: Major
>
> Similar to R, where variables of the surrounding context are accessible, this 
> task aims to introduce global constant variables. Furthermore, we should also 
> add builtin constants such as NaN, INF, and PI.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)