1 страниц (7 вхождений)
Assign submatrices - Сообщения
#1 Опубликовано: 05.10.2016 19:23:25
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:

The proposal is to enable such syntax.
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:
The proposal is to enable such syntax.
С уважением,
Михаил Каганский
#2 Опубликовано: 06.10.2016 12:33:21
#3 Опубликовано: 06.10.2016 18:31:21
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.
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.
С уважением,
Михаил Каганский
#4 Опубликовано: 06.10.2016 19:52:36
You can improve your "syntactic sugar" even more practical, Mathcad style.
i:=1..n
j:=1..n
M[i,j :=Mandelbrot
i:=1..n
j:=1..n
M[i,j :=Mandelbrot
#5 Опубликовано: 16.01.2018 01:49:04
4 пользователям понравился этот пост
Martin Kraska 16.01.2018 04:04:00, frapuano 16.01.2018 04:35:00, Davide Carpi 16.01.2018 05:31:00, Radovan Omorjan 16.01.2018 14:22:00
#6 Опубликовано: 16.01.2018 04:06:53
Wrote
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://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#7 Опубликовано: 16.01.2018 10:56:46
WroteStarted implementation of this feature in order to improve compatibility with other software:
Nice feature, Andrey ... keep up !
Vectorize operator works well.
Jean
Pattern Mandelbrot RGB.sm (57 КиБ) скачан 53 раз(а).
Pattern Mandelbrot.sm (108 КиБ) скачан 59 раз(а).
1 страниц (7 вхождений)
-
Новые сообщения
-
Нет новых сообщений