Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline mikekaganski  
#1 Posted : 06 October 2016 01:23:25(UTC)
mikekaganski


Rank: Advanced Member

Groups: Registered
Joined: 17/01/2013(UTC)
Posts: 296
Man
Russian Federation
Location: Khabarovsk, Russia

Was thanked: 151 time(s) in 107 post(s)
A bit of prerequisite history:

1. "Assign variables/functions put into the vector/matrix" feature announced.

2. "Extracting submatrices using ranges as indices" feature requested.

3. Its implementation announced.

4. Question about putting a matrix into a submatrix posted.

Currently it's impossible to use assignments like this:

AssignSubmatrix.png

The proposal is to enable such syntax.
Best regards,
Mike Kaganski

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Jean Giraud  
#2 Posted : 06 October 2016 18:33:21(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
I understand the code you are proposing, but wonder if useful.
It would be local anyway, which Smath has it already.

Forum Insert SubMatrix.gif
Offline mikekaganski  
#3 Posted : 07 October 2016 00:31:21(UTC)
mikekaganski


Rank: Advanced Member

Groups: Registered
Joined: 17/01/2013(UTC)
Posts: 296
Man
Russian Federation
Location: Khabarovsk, Russia

Was thanked: 151 time(s) in 107 post(s)
1. What I propose can be seen as "syntactic sugar". As such, it is not strictly *required*, but desirable.
2. Also, this proposal enables syntax that seem "natural" based on previous enhancements (cited in the first post). It improves consistency and discoverability (intuitivity) of features.
3. It enables syntax known from MathCad. This is again not a requirement, but lowers learning curve for newcomers.

All talk about "unneeded features" on the basis that the feature *may be* implemented using programming is bullshit. Yes, you can, and actually you even don't need SMath for this, only abacus being Turing-complete. So what? Let's call SMath not needed, and spend time on reinventing wheels, or searching for wheels someone had implemented before, and then spend time on debugging because when you took someone else' code, you didn't see that that code used "foreign" concept of MathCad zero-based indices? Or difficult-to-find bugs in edge cases?

You may only call a proposal not needed, if it makes software *worse* in some sense. E.g., has a different paradigm and thus makes interface inconsistent.

Developers may decide not to implement useful features, because they may percept it to be too difficult to implement compared to possible benefit (so their time would be better spent for other tasks), or it may be impossible in used architecture, or something. Then't OK. But that's another story.

There also exists the following, for some, more substantial need:
4. Speed. In-built functions involving mass operations like vectorize() or this one may be optimized much better, and even use multi-processing (vectorizing) e.g. in GPU, thus parallelizing work manifold WRT functional approach. User functions in SMath, being greatest feature, are inherently slower than in-built/plugin.
Best regards,
Mike Kaganski
Offline Jean Giraud  
#4 Posted : 07 October 2016 01:52:36(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
You can improve your "syntactic sugar" even more practical, Mathcad style.
i:=1..n
j:=1..n
M[i,j :=Mandelbrot
Offline Andrey Ivashov  
#5 Posted : 16 January 2018 07:49:04(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
You can improve your "syntactic sugar" even more practical, Mathcad style.
i:=1..n
j:=1..n
M[i,j :=Mandelbrot


Started implementation of this feature in order to improve compatibility with other software:
arrays_calc.PNG

Best regards, Andrey Ivashov.
thanks 4 users thanked Andrey Ivashov for this useful post.
on 16/01/2018(UTC),  on 16/01/2018(UTC),  on 16/01/2018(UTC),  on 16/01/2018(UTC)
Offline mkraska  
#6 Posted : 16 January 2018 10:06:53(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
Originally Posted by: Andrey Ivashov Go to Quoted Post

Started implementation of this feature in order to improve compatibility with other software:

Best regards, Andrey Ivashov.


Besides compatiblity to "other software" this will improve the readibility in comparison to the vectorize operator, which is not really clear to third party users.
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Jean Giraud  
#7 Posted : 16 January 2018 16:56:46(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: Andrey Ivashov Go to Quoted Post
Started implementation of this feature in order to improve compatibility with other software:

Nice feature, Andrey ... keep up !
Vectorize operator works well.

Jean

VectorizeMaths.PNG

Pattern Mandelbrot RGB.sm (58kb) downloaded 34 time(s).

Pattern Mandelbrot.sm (109kb) downloaded 39 time(s).

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.