Issue 135 in toped: TELL: lists: new features

2 views
Skip to first unread message

to...@googlecode.com

unread,
Mar 30, 2012, 3:49:07 PM3/30/12
to toped...@googlegroups.com
Status: New
Owner: analogc...@gmx.net
Labels: Type-Enhancement Priority-Medium OpSys-All Component-Tell Usability

New issue 135 by analogc...@gmx.net: TELL: lists: new features
http://code.google.com/p/toped/issues/detail?id=135

The features I want to request can be implemented by UDFs but since this is
a fundamental data-structure it would be nice to implement it on lower
level.

1.) get sub-lists from lists: (without destroying the original list)
example:
int list a = {1,2,3,4,5,6};
int list b = a[2:4]; //b == {3,4,5}, a is still {1,2,3,4,5,6}

2.) fundamental mathematical operations on lists at least for type int,
real.
example:
int list a = {1,2,3};
int list b = a + 3; //same for -, /, *

best
armin


to...@googlecode.com

unread,
Apr 14, 2012, 2:32:28 PM4/14/12
to toped...@googlegroups.com
Updates:
Status: Started

Comment #1 on issue 135 by krustev....@gmail.com: TELL: lists: new features
http://code.google.com/p/toped/issues/detail?id=135

I'm not sure about 2.)
- First the syntax:-
An operation like "addition" for example could be confusing. Somebody could
associate it with adding a component to the list. The multiplication might
be associated with multiplying the number of list components (python folks
for example).
- It is not a generic case for all lists. It is an operation for the
numeric lists only.
- could be achieved with one line of code if we introduce some functions
like "range" or "index" then

int list a = {1,2,3}

foreach (int i; index(a)) a[i] = a[i]+3;
or
foreach (int i; range(0,len(a))) a[i] = a[i]+3;
(the above are just ideas)

to...@googlecode.com

unread,
Apr 14, 2012, 4:29:24 PM4/14/12
to toped...@googlegroups.com

Comment #2 on issue 135 by analogc...@gmx.net: TELL: lists: new features
http://code.google.com/p/toped/issues/detail?id=135

ad 2.)
suggestion:
* all index operations should stay within the [] operator as it is already
the case
* all other operations on lists of numbers are done in the mathematical
sense (e.g. as it is implemented in Matlab)

Finally it is just a question of definition. I'm not sure if we should be
compatible to each available programming language.

The main reason for this request is because of performance, code simplicity
and readability. Mathematical operations on lists within a mathematical
task (and geometry is the main task in Toped ;) will be done regular. Thus,
the support of regular actions motivates their usage and elevates the
scripting language to a higher level.

Actually exact your implementation of the "scalar addition" is done in the
UDF-library (not yet checked in). But the main disadvantage is by sure that
for each list operation the number of computing tasks is much much higher
than with an predefined internal operator.

For now I don't have so large applications that performance is an issue.
So, I'm fine with the implementation as a script. But as you know,
everything under development rises with exponential progression (at least
stated by R. Kurzweil) ;)


to...@googlecode.com

unread,
Apr 15, 2012, 5:58:06 AM4/15/12
to toped...@googlegroups.com
Updates:
Status: Fixed

Comment #3 on issue 135 by krustev....@gmail.com: TELL: lists: new features
http://code.google.com/p/toped/issues/detail?id=135

Updates implementing 1.) - in r2127

About 2.)
I understand the rationale behind the request and I agree with it - hence
the discussion is about the way to do it. I agree also that we don't have
to be compatible with all languages/scripts around but hey, this includes
Matlab :). Yet we can get ideas from there, what we do.
Seriously, the important point here is that those operations relate to a
certain type of lists - i.e. numerical ones.
I have number of suggestions:
- this seems to deserve a separate thread - so let's raise a separate issue
(scalar operations over lists) and continue the discussion there
- looking at it I found some dodgy points in our "foreach" implementation.
I'll do some additional tests and will eventually raise a separate issue
about it.
- I'll change the status to "Fixed", check the implementation of 1.) and
eventually close this issue.


to...@googlecode.com

unread,
Apr 15, 2012, 6:27:31 PM4/15/12
to toped...@googlegroups.com
Issue 135: TELL: lists: new features
http://code.google.com/p/toped/issues/detail?id=135

This issue is now blocking issue 141.
See http://code.google.com/p/toped/issues/detail?id=141

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

to...@googlecode.com

unread,
May 8, 2012, 8:10:12 PM5/8/12
to toped...@googlegroups.com

Comment #5 on issue 135 by krustev....@gmail.com: TELL: lists: new features
http://code.google.com/p/toped/issues/detail?id=135

About 2 - After the latest updates in Issue 141, now

int list a = {1,2,3};
foreach(int i; a) i = a+3; //same for -, /, * or any other more complex
operation

I guess we have to close this issue now.

to...@googlecode.com

unread,
May 8, 2012, 8:14:35 PM5/8/12
to toped...@googlegroups.com

Comment #6 on issue 135 by krustev....@gmail.com: TELL: lists: new features
http://code.google.com/p/toped/issues/detail?id=135

About 2 - After the latest updates in Issue 141, now the original example
can be resolved using:

int list a = {1,2,3};
foreach(int i; a) i = i+3; //same for -, /, * or any other more complex

to...@googlecode.com

unread,
May 13, 2012, 4:17:14 PM5/13/12
to toped...@googlegroups.com
Updates:
Status: Verified

Comment #7 on issue 135 by krustev....@gmail.com: TELL: lists: new features
http://code.google.com/p/toped/issues/detail?id=135

(No comment was entered for this change.)

Reply all
Reply to author
Forward
0 new messages