poll: change in Maple that you want most?

acer's picture

What single change in Maple would you want more than any other?

Maybe it's an enhancement, or a functionality change, or a bug fix.

Comments

builtin identity

Okay, maybe its not top of the list, but I'd like to see a builtin identity procedure, possibly assigned to `()`.  So `()`(a,b,c) evaluates to a,b,c.

The need for an identity comes up rather frequently when programming and it seems a shame to require a user generated procedure, ()-> args.

While it doesn't solve the problem, I just noticed that `@`() returns the identity procedure ()->args.

example

As an example, consider the simple task of converting, say,

L := [x,y,z]:

to [x=f(x), y=f(y), z=f(z)]

The way I would usually do this is either

[seq(q=f(q), q in L)];

or

map(q -> (q=f(q), L);

The seq should be slightly faster because the user-defined procedure is not called with each conversion.  However, it requires declaring a local (q), which, while not a big deal, can be a nuisance, particularly if this is embedded in some other code.  With a built-in identity, say the suggested `()`, one could do

map(`()`=f, L);

which is short, clear, probably as fast as seq and doesn't require declaring a local.  I suppose one could argue that `()` isn't as clear as, say Id, but there seems little chance of getting that as a reserved word.

in other systems

In Mathematica it is 'Identity', in Maxima 'identity', and in Axiom 'id'. All of them, though seem to work only for a single argument.

identities

I don't know whether an identity should work with multiple arguments or not.  It should accept multiple arguments, the issue is whether it returns only the first, or all the arguments.  I can see uses for both. It should return NULL if given an empty argument list, which suggests it should return all arguments. 

I suppose one could design it to accept an index that indicate which arguments to return, however, that may detract from its simplicity.  What ever form it took, I'd find it useful.

Axel Vogt's picture

taking care for the careless

It is a bit vague and I am afraid it can be done only partially
and to be 'activated' only on demand (it may make things slow):

have a syntax check like in compiling environments, immediate or
on call, even possible typos

provide warnings for dangerous use (say: assumptions on a variable
which is used in a definition, but invisible is altered)

solving equations or using transforms may report their assumptions
(like a*x + b = 0 ---> "a not 0")

integrals should show up conditions under which they *can* be done
(well, why only integrals ...)

a help system with intelligent search function (case insensitive,
semantic distances for typos, allowing combinations, s.th. like
Google)

a dictionary, which refers also back to Maple ("nice to know what
it is - but what to do in Maple?")

enlarging the Function Advisor (and why restrict to functions? it
is a good resource ... cross connection to 'methods' doable?)

beyond: give a reasonable chance to find something in the Maple
Application Center or at MaplePrimes


And last, but not least: do not let die the slim functionality of
the classical interface, bring it to Java (to reduce costs), but
kick off all the gimmicks in that case


"Dear Santa Claus - I know you are used to lists and not to items
only. Please be aware of possible, further updates. Also I hope
you will care for wishes of my comrades, as we often share gifts."

PS: sorry, if this is beyond/besides your intention ..

literate sources

I want to see the library source code together with its (now hidden) comments.

Programmable Document Components

I'd like to be able to program document components like you can program Maplets. It is really hard to build anything complicated when you have to use the build-in editor for each button.

acer's picture

worksheet DOM

I was thinking about this a while back...

I first got curious after looking at Maple 12's Explore:-explore routine, which gets used by the new "Explore" context-sensitive menu entry. Basically, this routine works by reading in a template .mw using XMLTools:-ReadFile, manipulating the template a bit with subs, then calling INTERFACE_WORKSHEET on the result. It reads in a template, fills in with a number of sliders (to correspond to free variables), and opens the result in new tab in the Standard GUI. The template already has some GUI components inside it.

I see the template files under here, in my Maple 12 Linux installation,

<maple12>/data/assistants/

So far, so fun. I made a few different template .mw files of my own, to try things like building a non-Maplet Matrix browser. I set some appropriate parts as auto-execute. And in some circumstances INTERFACE_HELP might be used to generate the display.

Then I just started editing .mw files in vi. And then I started looking at what XMLTools does. This is where it gets tricky.

In theory, we should be able to create a suite of Maple procedures which can emit the appropriate (nested calling) tree data structure that XMLTools can then convert into .mw form. It should be possible to create such procedures so that they allow one to read, edit, and write out the XML source with the Maple GUI's embedded components in it. But it's not completely easy, even with the schema stuff under,

<maple12>/data/xml/schema/worksheet/

It might be nicer with a DOM set up for worksheets. Part of the trouble (or so it seemed to me) was the lack of names for the nodes. Perhaps one could walk the Maple structure given by XMLTools and put an attribute on each node to specify both a name and the name of the parent. Perhaps something like SPATH might help.

The basic idea is that, even if one cannot edit the GUI components inside the current worksheet, it might be possible to programatically read in, edit and augment, and write-out or display in a new tab a worksheet with embedded components.

I believe that this mapleprimes community has enough talent to design such procedures, if it so wished.

ps. This is why I was asking about the format of images embedded in .mw files.

acer

gkokovidis's picture

poll: change in Maple that you want most?

An editor like the one that comes with Matlab.  I want to write Maple code in a Maple editor, with syntax highlighting, and click on a run button, and have the code execute inside of Maple.  I'm aware of vim and emacs, but there should be something that comes with Maple by default.  Command completion with the Classic gui would be nice as well.  Or better yet, make all of the functionality of the Standard Gui version the same across both versions of Classic and Standard.

 

Regards,
Georgios Kokovidis
Dräger Medical


alec's picture

VS Shell

It's actually quite easy to implement (even manually) using (free) Visual Studio shell.

Alec

Maple changes

1. Decent LaTeX support for creating documents. The Maple document mode is not a sustainable nor is it universal. The industry standard is LaTeX, and Maple fonts are ugly.

2. A decent and consistent reconciliation between the two input modes. Having two parsers is insanity, and it has created too much confusion, if it has not killed the product.  Everybody is confused about

Classic/Standard/2D-Input/Maple-Input.

3. Support for Classic.

4. Fix the bugs in "solve". Why is it taking so long? Does it have to to with Groebner? My research colleagues are forced to use Maple 9.5 because the bugs introduced in solve after 9.5 have not been fixed. Maple should strive to be a research tool, not a substandard document creation tool.

 

What industry?

I suspect a lot more people use some sort of equation creator in word or powerpoint to write math:   high school teachers, undergraduate students, engineers doing presentations etc.

roman_pearce's picture

speed

Maple needs speed. It needs to be a computational platform where users can code efficient algorithms and work with very large sets of data - symbolic and numeric. It needs asymptotically fast algorithms, new tools for visualization, and a focus on efficient primitives so that Maple programs are fast. This will make the library fast. Wherever possible, these primitives should be parallelized so that sequential code achieves some parallel speedup.

There is no sense in building just a pretty system. Maple has to handle the big problems of the day, or its usefulness and popularity will decline. That means any problem that can conceivably be done on a workstation, whose capacity is rapidly approaching O(10^10).

alec's picture

IDE

There are, certainly, many things needed improvement. The most important for me would be dropping that Java monster (as well as 2D-input) and returning back to a normal native interface, with 1D-input and normal help - in the pdf form perhaps (say, using recent RoboHelp), with graphics in png and svg, and worksheet export to pdf (with links and bookmarks), to LaTeX, and to html.

Alec

acer's picture

thank you

I would like to thank all who posted to this thread. The points raised are very interesting. Hopefully, having several major contributors to this site offer their suggestions/needs will induce those ideas to be weighed and judged carefully.

ps. I'm still editing my list...

acer

O(x) - O(x) = O(x)

That's all.

And, of course,  1.21*O(x) = O(x).

Sandor

alec's picture

Maplemint

Being realistic, and choosing only one bug distracting me the most, the first thing that comes to mind is maplemint crashing Maple,

maplemint(`convert/CompSeq`);

It was reported in 2006.

Alec

acer's picture

mint

I'm not sure why maplemint is still a Library routine, when it is not kept as up-to-date as the standalone executable `mint` and also does not have as many options.

Perhaps the maplemint command should be changed, to simply call out to mint. Here's a really crude Linux-specific version of that, just to illustrate.

> mint := proc(f,extras::string:="")
> local fname,oldiface;
>   fname := "/tmp/foo";
>   oldiface := interface('verboseproc');
>   interface('verboseproc'=3);
>   writeto(fname);
>   printf("%a := ", f);
>   print(f);
>   printf(":\n");
>   writeto(terminal):
>   fclose(fname);
>   interface('verboseproc'=oldiface);
>   system(cat("/usr/local/maple/maple12.01/bin/mint ",extras," ",fname));
>   NULL;
> end proc:
>
> mint(`convert/CompSeq`);
    |\^/|      Maple 12 Diagnostic Program
._|\|   |/|_.  Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2007
 \  MINT   /   All rights reserved. Maple is a trademark of
 <____ ____>   Waterloo Maple Inc.
      |
Procedure convert/CompSeq( e1 ) on lines 1 to 77
  These local variables were used but never assigned a value:  result
>
> mint(`convert/CompSeq`,"-i 3");
    |\^/|      Maple 12 Diagnostic Program
._|\|   |/|_.  Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2007
 \  MINT   /   All rights reserved. Maple is a trademark of
 <____ ____>   Waterloo Maple Inc.
      |
Nested Anonymous Procedure proc( s ) on lines 44 to 56
  There are 2 equations used as statements on lines 50, 54
  Global names usage:  `&:=`, `&function`
Procedure convert/CompSeq( e1 ) on lines 1 to 77
  These local variables were used but never assigned a value:  result
  Global names usage:  `&%`, `&%%`, `&%%%`, `&ERROR`, `&RETURN`, `&args`,
      `&break`, `&done`, `&expseq`, `&for`, `&function`, `&hashtab`, `&if`,
      `&local`, `&next`, `&proc`, `&quit`, `&read`, `&save`, `&series`,
      `&statseq`, `&stop`, CompSeq, globals, locals, params, `||enate`
Global names used in this file:  `convert/CompSeq`

There are many ways to improve the above, naturally. The call to `system` could be replaced by an appropriate `ssystem` call, so that the ascii description at the top of mint's output could be removed. And it could be platform independent, etc, etc.

acer

under Win XP

This adapted version is working for me in command line Maple 12 under Win XP:

mint := proc(f,extras::string:="")
  local fname,oldiface;
    fname := "c:/temp/foo";
    oldiface := interface('verboseproc');
    interface('verboseproc'=3);
    writeto(fname);
    printf("%a := ", f);
    print(f);
    printf(":\n");
    writeto(terminal):
    fclose(fname);
    interface('verboseproc'=oldiface);
    system(cat(kernelopts(bindir),"/mint ",extras," ",fname));
    NULL;
  end proc:

Note that I have installed Maple 12 in a directory without spaces.
I have not got it work from a GUI yet.

acer's picture

hmm

Thanks Alejandro,

Does it work in the Standard GUI for you, if you set interface('verboseproc'=3) outside of the procedure?

Is it a surprise to anyone else, if verboseproc could not be set inside a proc in a Standard worksheet?

acer

in the Standard GUI

What I get, either  if I set interface('verboseproc'=3) outside of the procedure or not is a text window with the following output:

    |\^/|      Maple 12 Diagnostic Program
._|\|   |/|_.  Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2007
 \  MINT   /   All rights reserved. Maple is a trademark of
 <____ ____>   Waterloo Maple Inc.
      |        
on line     1: `convert/CompSeq` := proc(e1)  ...  end;
                                                   ^ syntax error
Exit Value: 3

But I have not looked yet what this problem could be.

acer's picture

ok, thanks

Ok, thanks. There is something going on with print of a proc from within a procedure, but I'm not sure exactly what.

I got the following to work, in the Standard GUI in Linux,

mint := proc(f,extras::string:="")
local fname,k,oldiface;
   fname := "/tmp/foo";
   oldiface := interface('verboseproc');
   interface('verboseproc'=3);
   writeto(fname);
   printf("%a := ", f);
   printf("%a",eval(f));
   printf(":\n");
   writeto(terminal):
   fclose(fname);
   interface('verboseproc'=oldiface);
   k:=ssystem(cat("/usr/local/maple/maple12.01/bin/mint ",extras," ",fname));
   if k[1]>=0 then printf("%s",k[2]); end if;
   NULL; 
end proc:

mint(`convert/CompSeq`);

It could be made nicer, by using StringTools to Drop the mint preamble text in the 2nd operand of the result from ssystem.

acer

-Better LaTeX support would

-Better LaTeX support would be nice, this would make life easier i guess.

-not much else for now.

Maple is a great tool. Well Done

alec's picture

Change is to was

I would change "is" to "was".

Maple was a great tool.

Now it can't even compete with free software, see that thread.

Alec

alec's picture

Great improvement

Acer,

That, certainly, would be a great imrovement.

I use mint a lot as a standalone program, but the possibility of using it from Maple as maplemint seems extremely attractive.

Alec

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}